@nutui/nutui-react-taro 2.6.13 → 2.6.15-beta.0

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 (51) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/esm/Address.js +1 -1
  3. package/dist/esm/Calendar.js +1 -1
  4. package/dist/esm/CalendarItem.js +1 -1
  5. package/dist/esm/Cascader.js +1 -1
  6. package/dist/esm/Empty/style/style.css +1 -1
  7. package/dist/esm/Form.js +1 -1
  8. package/dist/esm/FormItem.js +1 -1
  9. package/dist/esm/InfiniteLoading.js +1 -1
  10. package/dist/esm/Menu.js +1 -1
  11. package/dist/esm/MenuItem.js +1 -1
  12. package/dist/esm/Sticky.js +1 -1
  13. package/dist/esm/Uploader/style/style.css +1 -1
  14. package/dist/esm/Uploader.js +1 -1
  15. package/dist/esm/WaterMark.js +1 -1
  16. package/dist/esm/{address.taro-CtVpobLw.js → address.taro-BYzOGUEN.js} +1 -1
  17. package/dist/esm/{calendar.taro-Bf5owfGd.js → calendar.taro-BXrHr8bg.js} +1 -1
  18. package/dist/esm/{calendaritem.taro-PLHReAvU.js → calendaritem.taro-CRultyrO.js} +3 -1
  19. package/dist/esm/{cascader.taro-y9_hSUSJ.js → cascader.taro-jxe42b68.js} +2 -2
  20. package/dist/esm/{formitem.taro-tLWeQ0P5.js → formitem.taro-Dmt5-wxG.js} +3 -2
  21. package/dist/esm/{infiniteloading.taro-g1RbqnSS.js → infiniteloading.taro-TbcBB0Qr.js} +7 -7
  22. package/dist/esm/{menu.taro-JDg_-XpO.js → menu.taro-CrPdDbYM.js} +1 -1
  23. package/dist/esm/{menuitem.taro-BFfGgTms.js → menuitem.taro-DMV3j4DK.js} +4 -2
  24. package/dist/esm/nutui-react.es.js +11 -11
  25. package/dist/esm/{sticky.taro-DZzgkigZ.js → sticky.taro-Zbz7wQH8.js} +29 -31
  26. package/dist/esm/{uploader.taro-CiamsRGo.js → uploader.taro-DfO2HWvy.js} +13 -11
  27. package/dist/esm/{watermark.taro-BR12yZQt.js → watermark.taro-CZ6R5FlJ.js} +3 -3
  28. package/dist/locales/base.js +1 -1
  29. package/dist/locales/en-US.js +1 -1
  30. package/dist/locales/id-ID.js +1 -1
  31. package/dist/locales/tr-TR.js +1 -1
  32. package/dist/locales/zh-CN.js +1 -1
  33. package/dist/locales/zh-TW.js +1 -1
  34. package/dist/locales/zh-UG.js +1 -1
  35. package/dist/nutui.react.es.js +61 -50
  36. package/dist/nutui.react.umd.js +61 -50
  37. package/dist/packages/empty/empty.scss +1 -1
  38. package/dist/packages/uploader/uploader.scss +3 -1
  39. package/dist/style.css +1 -1
  40. package/dist/styles/variables-jmapp.scss +1 -0
  41. package/dist/styles/variables.scss +1 -0
  42. package/dist/types/packages/configprovider/types.d.ts +1 -1
  43. package/dist/types/packages/form/types.d.ts +1 -0
  44. package/dist/types/packages/griditem/types.d.ts +13 -0
  45. package/dist/types/packages/infiniteloading/infiniteloading.taro.d.ts +2 -1
  46. package/dist/types/packages/watermark/watermark.d.ts +2 -0
  47. package/dist/types/packages/watermark/watermark.taro.d.ts +10 -0
  48. package/dist/types/utils/get-scroll-parent.d.ts +1 -1
  49. package/dist/types/utils/use-client-rect.d.ts +1 -1
  50. package/package.json +1 -1
  51. package/dist/types/packages/form/usewatch.d.ts +0 -2
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v2.6.13 Fri Jul 12 2024 13:57:50 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v2.6.14 Wed Jul 24 2024 13:29:51 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -3961,13 +3961,10 @@ const Sticky = (props) => {
3961
3961
  width: ""
3962
3962
  };
3963
3963
  }
3964
- const style2 = {};
3965
- if (rootRect.height) {
3966
- style2.height = rootRect.height;
3967
- }
3968
- if (rootRect.width) {
3969
- style2.width = rootRect.width;
3970
- }
3964
+ const style2 = {
3965
+ height: rootRect.height ?? "",
3966
+ width: rootRect.width ?? ""
3967
+ };
3971
3968
  return style2;
3972
3969
  }, [fixed, rootRect.height, rootRect.width]);
3973
3970
  const stickyStyle = useMemo$1(() => {
@@ -3978,36 +3975,37 @@ const Sticky = (props) => {
3978
3975
  [position]: ""
3979
3976
  };
3980
3977
  }
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;
3978
+ const style2 = {
3979
+ height: rootRect.height ?? "",
3980
+ width: rootRect.width ?? "",
3981
+ transform: `translate3d(0, ${transform}px, 0)`,
3982
+ [position]: threshold,
3983
+ zIndex
3984
+ };
3987
3985
  return style2;
3988
3986
  }, [fixed, rootRect.height, rootRect.width, transform, position]);
3989
3987
  const handleScroll = async (scrollTop) => {
3990
3988
  const curRootRect = await getRectByTaro(rootRef.current);
3991
3989
  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
- }
3990
+ if (!curRootRect || !stickyRect) {
3991
+ console.warn("getRectByTaro获取失败", { stickyRect, curRootRect });
3992
+ return;
3993
+ }
3994
+ setRootRect(curRootRect);
3995
+ if (position === "top") {
3996
+ if (container) {
3997
+ const containerRect = await getRectByTaro(container.current);
3998
+ const difference = containerRect.bottom - threshold - curRootRect.height;
3999
+ const curTransform = difference < 0 ? difference : 0;
4000
+ setTransform(curTransform);
4001
+ const curFixed = threshold > curRootRect.top && containerRect.bottom > 0;
4002
+ setFixed(curFixed);
4005
4003
  } else {
4006
- const windowHeight = getSystemInfoSync().windowHeight;
4007
- setFixed(windowHeight - threshold < curRootRect.bottom);
4004
+ setFixed(threshold > curRootRect.top);
4008
4005
  }
4009
4006
  } else {
4010
- console.warn("getRectByTaro获取失败", { stickyRect, curRootRect });
4007
+ const windowHeight = getSystemInfoSync().windowHeight;
4008
+ setFixed(windowHeight - threshold < curRootRect.bottom);
4011
4009
  }
4012
4010
  };
4013
4011
  const getElement = useCallback(() => {
@@ -5720,7 +5718,7 @@ const InternalCascader = (props, ref) => {
5720
5718
  };
5721
5719
  const syncValue = async () => {
5722
5720
  const currentValue = innerValue;
5723
- if (currentValue === void 0 || currentValue !== defaultValue || !state.tree.nodes.length) {
5721
+ if (currentValue === void 0 || ![defaultValue, value].includes(currentValue) || !state.tree.nodes.length) {
5724
5722
  return;
5725
5723
  }
5726
5724
  if (currentValue.length === 0) {
@@ -5752,7 +5750,7 @@ const InternalCascader = (props, ref) => {
5752
5750
  state.initLoading = false;
5753
5751
  }
5754
5752
  }
5755
- if (needToSync.length && currentValue === defaultValue) {
5753
+ if (needToSync.length && [defaultValue, value].includes(currentValue)) {
5756
5754
  const pathNodes = state.tree.getPathNodesByValue(needToSync);
5757
5755
  pathNodes.forEach((node, index) => {
5758
5756
  state.tabsCursor = index;
@@ -6730,8 +6728,10 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
6730
6728
  };
6731
6729
  useEffect(() => {
6732
6730
  setCurrentDate(resetDefaultValue() || []);
6733
- popup && resetRender();
6734
6731
  }, [defaultValue]);
6732
+ useEffect(() => {
6733
+ popup && resetRender();
6734
+ }, [currentDate]);
6735
6735
  const scrollToDate = (date4) => {
6736
6736
  if (Utils.compareDate(date4, propStartDate)) {
6737
6737
  date4 = propStartDate;
@@ -9793,7 +9793,7 @@ class FormStore {
9793
9793
  this.store = values;
9794
9794
  }
9795
9795
  };
9796
- this.setFieldsValue = (newStore) => {
9796
+ this.setFieldsValue = (newStore, needValidate = true) => {
9797
9797
  this.store = {
9798
9798
  ...this.store,
9799
9799
  ...newStore
@@ -9815,6 +9815,7 @@ class FormStore {
9815
9815
  item.entity.onStoreChange("update");
9816
9816
  }
9817
9817
  });
9818
+ needValidate && this.validateFields();
9818
9819
  };
9819
9820
  this.setCallback = (callback) => {
9820
9821
  this.callbacks = {
@@ -10064,7 +10065,7 @@ const _FormItem = class _FormItem extends React__default.Component {
10064
10065
  if (this.props.getValueFromEvent) {
10065
10066
  next = this.props.getValueFromEvent(...args);
10066
10067
  }
10067
- setFieldsValue({ [name]: next });
10068
+ setFieldsValue({ [name]: next }, false);
10068
10069
  }
10069
10070
  };
10070
10071
  const { validateTrigger } = this.props;
@@ -10797,18 +10798,20 @@ const MenuItem = forwardRef((props, ref) => {
10797
10798
  handleClick(item);
10798
10799
  }
10799
10800
  },
10800
- item.value === innerValue ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, icon || /* @__PURE__ */ React__default.createElement(
10801
+ item.value === innerValue ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, icon ? React__default.cloneElement(icon, {
10802
+ className: `nut-menu-container-item-icon ${icon.props.className || ""}`
10803
+ }) : /* @__PURE__ */ React__default.createElement(
10801
10804
  g$3,
10802
10805
  {
10803
10806
  color: activeColor,
10804
10807
  size: 16,
10805
- className: getIconCName(item.value, value)
10808
+ className: `nut-menu-container-item-icon ${getIconCName(item.value, value)}`
10806
10809
  }
10807
10810
  )) : null,
10808
10811
  /* @__PURE__ */ React__default.createElement(
10809
10812
  View,
10810
10813
  {
10811
- className: getIconCName(item.value, value),
10814
+ className: `nut-menu-container-item-title ${getIconCName(item.value, value)}`,
10812
10815
  style: {
10813
10816
  color: `${item.value === innerValue ? activeColor : ""}`
10814
10817
  }
@@ -12882,6 +12885,10 @@ const InternalUploader = (props, ref) => {
12882
12885
  clearUploadQueue();
12883
12886
  }
12884
12887
  }));
12888
+ const fileListRef = useRef([]);
12889
+ useEffect(() => {
12890
+ fileListRef.current = fileList;
12891
+ }, [fileList]);
12885
12892
  const clearUploadQueue = (index = -1) => {
12886
12893
  if (index > -1) {
12887
12894
  uploadQueue.splice(index, 1);
@@ -12961,7 +12968,7 @@ const InternalUploader = (props, ref) => {
12961
12968
  uploadOption.onStart = (option) => {
12962
12969
  clearUploadQueue(index);
12963
12970
  setFileList(
12964
- fileList.map((item) => {
12971
+ fileListRef.current.map((item) => {
12965
12972
  if (item.uid === fileItem.uid) {
12966
12973
  item.status = "ready";
12967
12974
  item.message = locale.uploader.readyUpload;
@@ -12969,23 +12976,23 @@ const InternalUploader = (props, ref) => {
12969
12976
  return item;
12970
12977
  })
12971
12978
  );
12972
- onStart && onStart(option);
12979
+ onStart == null ? void 0 : onStart(option);
12973
12980
  };
12974
12981
  uploadOption.onProgress = (e2, option) => {
12975
12982
  setFileList(
12976
- fileList.map((item) => {
12983
+ fileListRef.current.map((item) => {
12977
12984
  if (item.uid === fileItem.uid) {
12978
12985
  item.status = UPLOADING;
12979
12986
  item.message = locale.uploader.uploading;
12980
12987
  item.percentage = e2.progress;
12981
- onProgress && onProgress({ e: e2, option, percentage: item.percentage });
12988
+ onProgress == null ? void 0 : onProgress({ e: e2, option, percentage: item.percentage });
12982
12989
  }
12983
12990
  return item;
12984
12991
  })
12985
12992
  );
12986
12993
  };
12987
12994
  uploadOption.onSuccess = (responseText, option) => {
12988
- const list = fileList.map((item) => {
12995
+ const list = fileListRef.current.map((item) => {
12989
12996
  if (item.uid === fileItem.uid) {
12990
12997
  item.status = SUCCESS;
12991
12998
  item.message = locale.uploader.success;
@@ -13001,7 +13008,7 @@ const InternalUploader = (props, ref) => {
13001
13008
  });
13002
13009
  };
13003
13010
  uploadOption.onFailure = (responseText, option) => {
13004
- const list = fileList.map((item) => {
13011
+ const list = fileListRef.current.map((item) => {
13005
13012
  if (item.uid === fileItem.uid) {
13006
13013
  item.status = ERROR;
13007
13014
  item.message = locale.uploader.error;
@@ -13063,8 +13070,8 @@ const InternalUploader = (props, ref) => {
13063
13070
  if (preview) {
13064
13071
  fileItem.url = fileType === "video" ? file.thumbTempFilePath : filepath;
13065
13072
  }
13066
- setFileList([...fileList, fileItem]);
13067
13073
  executeUpload(fileItem, index);
13074
+ setFileList([...fileList, fileItem]);
13068
13075
  });
13069
13076
  };
13070
13077
  const filterFiles = (files) => {
@@ -13078,9 +13085,7 @@ const InternalUploader = (props, ref) => {
13078
13085
  }
13079
13086
  return true;
13080
13087
  });
13081
- if (oversizes.length) {
13082
- onOversize && onOversize(files);
13083
- }
13088
+ oversizes.length && (onOversize == null ? void 0 : onOversize(files));
13084
13089
  const currentFileLength = filterFile.length + fileList.length;
13085
13090
  if (currentFileLength > maximum) {
13086
13091
  filterFile.splice(filterFile.length - (currentFileLength - maximum));
@@ -13728,7 +13733,8 @@ const InfiniteLoading = (props) => {
13728
13733
  className,
13729
13734
  onRefresh,
13730
13735
  onLoadMore,
13731
- onScroll
13736
+ onScroll,
13737
+ ...rest
13732
13738
  } = {
13733
13739
  ...defaultProps$D,
13734
13740
  ...props
@@ -13822,6 +13828,7 @@ const InfiniteLoading = (props) => {
13822
13828
  return /* @__PURE__ */ React__default.createElement(
13823
13829
  ScrollView,
13824
13830
  {
13831
+ ...rest,
13825
13832
  className: classes,
13826
13833
  scrollY: true,
13827
13834
  id: "scroller",
@@ -18591,6 +18598,8 @@ const defaultProps$1 = {
18591
18598
  gapY: 48,
18592
18599
  width: 120,
18593
18600
  height: 64,
18601
+ startX: 0,
18602
+ startY: 0,
18594
18603
  image: "",
18595
18604
  imageWidth: 120,
18596
18605
  imageHeight: 64,
@@ -18609,6 +18618,8 @@ const WaterMark = (props) => {
18609
18618
  className,
18610
18619
  gapX,
18611
18620
  gapY,
18621
+ startX,
18622
+ startY,
18612
18623
  width,
18613
18624
  height,
18614
18625
  image,
@@ -18689,7 +18700,7 @@ const WaterMark = (props) => {
18689
18700
  const markSize = Number(fontSize) * ratio;
18690
18701
  ctx.font = `${fontStyle} normal ${fontWeight} ${markSize}px/${markHeight}px ${fontFamily}`;
18691
18702
  ctx.fillStyle = color;
18692
- ctx.fillText(content, 0, 0);
18703
+ ctx.fillText(content, startX, startY);
18693
18704
  ctx.restore();
18694
18705
  setBase64Url(canvas.toDataURL());
18695
18706
  }
@@ -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.13 Fri Jul 12 2024 13:57:50 GMT+0800 (China Standard Time)
5
+ * @nutui/nutui-react-taro v2.6.14 Wed Jul 24 2024 13:29:51 GMT+0800 (China Standard Time)
6
6
  * (c) 2023 @jdf2e.
7
7
  * Released under the MIT License.
8
8
  */
@@ -3977,13 +3977,10 @@
3977
3977
  width: ""
3978
3978
  };
3979
3979
  }
3980
- const style2 = {};
3981
- if (rootRect.height) {
3982
- style2.height = rootRect.height;
3983
- }
3984
- if (rootRect.width) {
3985
- style2.width = rootRect.width;
3986
- }
3980
+ const style2 = {
3981
+ height: rootRect.height ?? "",
3982
+ width: rootRect.width ?? ""
3983
+ };
3987
3984
  return style2;
3988
3985
  }, [fixed, rootRect.height, rootRect.width]);
3989
3986
  const stickyStyle = React.useMemo(() => {
@@ -3994,36 +3991,37 @@
3994
3991
  [position]: ""
3995
3992
  };
3996
3993
  }
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;
3994
+ const style2 = {
3995
+ height: rootRect.height ?? "",
3996
+ width: rootRect.width ?? "",
3997
+ transform: `translate3d(0, ${transform}px, 0)`,
3998
+ [position]: threshold,
3999
+ zIndex
4000
+ };
4003
4001
  return style2;
4004
4002
  }, [fixed, rootRect.height, rootRect.width, transform, position]);
4005
4003
  const handleScroll = async (scrollTop) => {
4006
4004
  const curRootRect = await getRectByTaro(rootRef.current);
4007
4005
  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
- }
4006
+ if (!curRootRect || !stickyRect) {
4007
+ console.warn("getRectByTaro获取失败", { stickyRect, curRootRect });
4008
+ return;
4009
+ }
4010
+ setRootRect(curRootRect);
4011
+ if (position === "top") {
4012
+ if (container) {
4013
+ const containerRect = await getRectByTaro(container.current);
4014
+ const difference = containerRect.bottom - threshold - curRootRect.height;
4015
+ const curTransform = difference < 0 ? difference : 0;
4016
+ setTransform(curTransform);
4017
+ const curFixed = threshold > curRootRect.top && containerRect.bottom > 0;
4018
+ setFixed(curFixed);
4021
4019
  } else {
4022
- const windowHeight = Taro.getSystemInfoSync().windowHeight;
4023
- setFixed(windowHeight - threshold < curRootRect.bottom);
4020
+ setFixed(threshold > curRootRect.top);
4024
4021
  }
4025
4022
  } else {
4026
- console.warn("getRectByTaro获取失败", { stickyRect, curRootRect });
4023
+ const windowHeight = Taro.getSystemInfoSync().windowHeight;
4024
+ setFixed(windowHeight - threshold < curRootRect.bottom);
4027
4025
  }
4028
4026
  };
4029
4027
  const getElement = React.useCallback(() => {
@@ -5736,7 +5734,7 @@
5736
5734
  };
5737
5735
  const syncValue = async () => {
5738
5736
  const currentValue = innerValue;
5739
- if (currentValue === void 0 || currentValue !== defaultValue || !state.tree.nodes.length) {
5737
+ if (currentValue === void 0 || ![defaultValue, value].includes(currentValue) || !state.tree.nodes.length) {
5740
5738
  return;
5741
5739
  }
5742
5740
  if (currentValue.length === 0) {
@@ -5768,7 +5766,7 @@
5768
5766
  state.initLoading = false;
5769
5767
  }
5770
5768
  }
5771
- if (needToSync.length && currentValue === defaultValue) {
5769
+ if (needToSync.length && [defaultValue, value].includes(currentValue)) {
5772
5770
  const pathNodes = state.tree.getPathNodesByValue(needToSync);
5773
5771
  pathNodes.forEach((node, index) => {
5774
5772
  state.tabsCursor = index;
@@ -6746,8 +6744,10 @@
6746
6744
  };
6747
6745
  React.useEffect(() => {
6748
6746
  setCurrentDate(resetDefaultValue() || []);
6749
- popup && resetRender();
6750
6747
  }, [defaultValue]);
6748
+ React.useEffect(() => {
6749
+ popup && resetRender();
6750
+ }, [currentDate]);
6751
6751
  const scrollToDate = (date2) => {
6752
6752
  if (Utils.compareDate(date2, propStartDate)) {
6753
6753
  date2 = propStartDate;
@@ -9809,7 +9809,7 @@
9809
9809
  this.store = values;
9810
9810
  }
9811
9811
  };
9812
- this.setFieldsValue = (newStore) => {
9812
+ this.setFieldsValue = (newStore, needValidate = true) => {
9813
9813
  this.store = {
9814
9814
  ...this.store,
9815
9815
  ...newStore
@@ -9831,6 +9831,7 @@
9831
9831
  item.entity.onStoreChange("update");
9832
9832
  }
9833
9833
  });
9834
+ needValidate && this.validateFields();
9834
9835
  };
9835
9836
  this.setCallback = (callback) => {
9836
9837
  this.callbacks = {
@@ -10080,7 +10081,7 @@
10080
10081
  if (this.props.getValueFromEvent) {
10081
10082
  next = this.props.getValueFromEvent(...args);
10082
10083
  }
10083
- setFieldsValue({ [name]: next });
10084
+ setFieldsValue({ [name]: next }, false);
10084
10085
  }
10085
10086
  };
10086
10087
  const { validateTrigger } = this.props;
@@ -10813,18 +10814,20 @@
10813
10814
  handleClick(item);
10814
10815
  }
10815
10816
  },
10816
- item.value === innerValue ? /* @__PURE__ */ React.createElement(React.Fragment, null, icon || /* @__PURE__ */ React.createElement(
10817
+ item.value === innerValue ? /* @__PURE__ */ React.createElement(React.Fragment, null, icon ? React.cloneElement(icon, {
10818
+ className: `nut-menu-container-item-icon ${icon.props.className || ""}`
10819
+ }) : /* @__PURE__ */ React.createElement(
10817
10820
  g$3,
10818
10821
  {
10819
10822
  color: activeColor,
10820
10823
  size: 16,
10821
- className: getIconCName(item.value, value)
10824
+ className: `nut-menu-container-item-icon ${getIconCName(item.value, value)}`
10822
10825
  }
10823
10826
  )) : null,
10824
10827
  /* @__PURE__ */ React.createElement(
10825
10828
  components.View,
10826
10829
  {
10827
- className: getIconCName(item.value, value),
10830
+ className: `nut-menu-container-item-title ${getIconCName(item.value, value)}`,
10828
10831
  style: {
10829
10832
  color: `${item.value === innerValue ? activeColor : ""}`
10830
10833
  }
@@ -12898,6 +12901,10 @@
12898
12901
  clearUploadQueue();
12899
12902
  }
12900
12903
  }));
12904
+ const fileListRef = React.useRef([]);
12905
+ React.useEffect(() => {
12906
+ fileListRef.current = fileList;
12907
+ }, [fileList]);
12901
12908
  const clearUploadQueue = (index = -1) => {
12902
12909
  if (index > -1) {
12903
12910
  uploadQueue.splice(index, 1);
@@ -12977,7 +12984,7 @@
12977
12984
  uploadOption.onStart = (option) => {
12978
12985
  clearUploadQueue(index);
12979
12986
  setFileList(
12980
- fileList.map((item) => {
12987
+ fileListRef.current.map((item) => {
12981
12988
  if (item.uid === fileItem.uid) {
12982
12989
  item.status = "ready";
12983
12990
  item.message = locale.uploader.readyUpload;
@@ -12985,23 +12992,23 @@
12985
12992
  return item;
12986
12993
  })
12987
12994
  );
12988
- onStart && onStart(option);
12995
+ onStart == null ? void 0 : onStart(option);
12989
12996
  };
12990
12997
  uploadOption.onProgress = (e2, option) => {
12991
12998
  setFileList(
12992
- fileList.map((item) => {
12999
+ fileListRef.current.map((item) => {
12993
13000
  if (item.uid === fileItem.uid) {
12994
13001
  item.status = UPLOADING;
12995
13002
  item.message = locale.uploader.uploading;
12996
13003
  item.percentage = e2.progress;
12997
- onProgress && onProgress({ e: e2, option, percentage: item.percentage });
13004
+ onProgress == null ? void 0 : onProgress({ e: e2, option, percentage: item.percentage });
12998
13005
  }
12999
13006
  return item;
13000
13007
  })
13001
13008
  );
13002
13009
  };
13003
13010
  uploadOption.onSuccess = (responseText, option) => {
13004
- const list = fileList.map((item) => {
13011
+ const list = fileListRef.current.map((item) => {
13005
13012
  if (item.uid === fileItem.uid) {
13006
13013
  item.status = SUCCESS;
13007
13014
  item.message = locale.uploader.success;
@@ -13017,7 +13024,7 @@
13017
13024
  });
13018
13025
  };
13019
13026
  uploadOption.onFailure = (responseText, option) => {
13020
- const list = fileList.map((item) => {
13027
+ const list = fileListRef.current.map((item) => {
13021
13028
  if (item.uid === fileItem.uid) {
13022
13029
  item.status = ERROR;
13023
13030
  item.message = locale.uploader.error;
@@ -13079,8 +13086,8 @@
13079
13086
  if (preview) {
13080
13087
  fileItem.url = fileType === "video" ? file.thumbTempFilePath : filepath;
13081
13088
  }
13082
- setFileList([...fileList, fileItem]);
13083
13089
  executeUpload(fileItem, index);
13090
+ setFileList([...fileList, fileItem]);
13084
13091
  });
13085
13092
  };
13086
13093
  const filterFiles = (files) => {
@@ -13094,9 +13101,7 @@
13094
13101
  }
13095
13102
  return true;
13096
13103
  });
13097
- if (oversizes.length) {
13098
- onOversize && onOversize(files);
13099
- }
13104
+ oversizes.length && (onOversize == null ? void 0 : onOversize(files));
13100
13105
  const currentFileLength = filterFile.length + fileList.length;
13101
13106
  if (currentFileLength > maximum) {
13102
13107
  filterFile.splice(filterFile.length - (currentFileLength - maximum));
@@ -13744,7 +13749,8 @@
13744
13749
  className,
13745
13750
  onRefresh,
13746
13751
  onLoadMore,
13747
- onScroll
13752
+ onScroll,
13753
+ ...rest
13748
13754
  } = {
13749
13755
  ...defaultProps$D,
13750
13756
  ...props
@@ -13838,6 +13844,7 @@
13838
13844
  return /* @__PURE__ */ React.createElement(
13839
13845
  components.ScrollView,
13840
13846
  {
13847
+ ...rest,
13841
13848
  className: classes,
13842
13849
  scrollY: true,
13843
13850
  id: "scroller",
@@ -18607,6 +18614,8 @@
18607
18614
  gapY: 48,
18608
18615
  width: 120,
18609
18616
  height: 64,
18617
+ startX: 0,
18618
+ startY: 0,
18610
18619
  image: "",
18611
18620
  imageWidth: 120,
18612
18621
  imageHeight: 64,
@@ -18625,6 +18634,8 @@
18625
18634
  className,
18626
18635
  gapX,
18627
18636
  gapY,
18637
+ startX,
18638
+ startY,
18628
18639
  width,
18629
18640
  height,
18630
18641
  image,
@@ -18705,7 +18716,7 @@
18705
18716
  const markSize = Number(fontSize) * ratio;
18706
18717
  ctx.font = `${fontStyle} normal ${fontWeight} ${markSize}px/${markHeight}px ${fontFamily}`;
18707
18718
  ctx.fillStyle = color;
18708
- ctx.fillText(content, 0, 0);
18719
+ ctx.fillText(content, startX, startY);
18709
18720
  ctx.restore();
18710
18721
  setBase64Url(canvas.toDataURL());
18711
18722
  }
@@ -5,7 +5,7 @@
5
5
  flex-direction: column;
6
6
  justify-content: center;
7
7
  padding: $empty-padding;
8
- background-color: $color-background-overlay;
8
+ background-color: $empty-background-color;
9
9
 
10
10
  &-image {
11
11
  width: $empty-image-size;
@@ -174,7 +174,9 @@
174
174
  }
175
175
 
176
176
  &-c {
177
- width: 100%;
177
+ display: flex;
178
+ justify-content: center;
179
+ align-items: center;
178
180
  height: 100%;
179
181
  position: initial;
180
182
  border-radius: $uploader-image-border-radius;