@nutui/nutui-react 2.6.13 → 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 (47) hide show
  1. package/CHANGELOG.md +922 -893
  2. package/README.md +21 -28
  3. package/dist/esm/Audio.js +10 -11
  4. package/dist/esm/CalendarItem.js +3 -1
  5. package/dist/esm/CheckboxGroup.js +4 -5
  6. package/dist/esm/DatePicker.js +3 -4
  7. package/dist/esm/Dialog.js +1 -2
  8. package/dist/esm/Empty/style/style.css +1 -1
  9. package/dist/esm/Menu.js +2 -2
  10. package/dist/esm/PullToRefresh.js +0 -1
  11. package/dist/esm/RadioGroup.js +0 -1
  12. package/dist/esm/Sticky.js +24 -30
  13. package/dist/esm/Swipe.js +0 -1
  14. package/dist/esm/Swiper.js +11 -7
  15. package/dist/esm/SwiperItem.js +0 -1
  16. package/dist/esm/Table.js +6 -5
  17. package/dist/esm/Uploader/style/style.css +1 -1
  18. package/dist/esm/Uploader.js +12 -11
  19. package/dist/esm/WaterMark.js +3 -3
  20. package/dist/esm/cascader2.js +2 -2
  21. package/dist/esm/formitem2.js +3 -2
  22. package/dist/esm/menuitem2.js +2 -2
  23. package/dist/esm/radio2.js +0 -1
  24. package/dist/locales/base.js +1 -1
  25. package/dist/locales/en-US.js +1 -1
  26. package/dist/locales/id-ID.js +1 -1
  27. package/dist/locales/tr-TR.js +1 -1
  28. package/dist/locales/zh-CN.js +1 -1
  29. package/dist/locales/zh-TW.js +1 -1
  30. package/dist/locales/zh-UG.js +1 -1
  31. package/dist/nutui.react.es.js +92 -111
  32. package/dist/nutui.react.umd.js +92 -111
  33. package/dist/packages/empty/empty.scss +1 -1
  34. package/dist/packages/uploader/uploader.scss +3 -1
  35. package/dist/style.css +1 -1
  36. package/dist/styles/variables-jmapp.scss +1 -0
  37. package/dist/styles/variables.scss +1 -0
  38. package/dist/types/packages/configprovider/types.d.ts +1 -1
  39. package/dist/types/packages/form/types.d.ts +1 -0
  40. package/dist/types/packages/infiniteloading/infiniteloading.taro.d.ts +2 -1
  41. package/dist/types/packages/swiperitem/swiperitem.d.ts +0 -1
  42. package/dist/types/packages/watermark/watermark.d.ts +10 -0
  43. package/dist/types/packages/watermark/watermark.taro.d.ts +2 -0
  44. package/dist/types/utils/get-scroll-parent.d.ts +1 -1
  45. package/dist/types/utils/use-client-rect.d.ts +1 -1
  46. package/package.json +2 -2
  47. package/dist/types/packages/form/usewatch.d.ts +0 -2
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react v2.6.13 Fri Jul 12 2024 13:59:44 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.6.15 Fri Jul 26 2024 15:20:57 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -3132,13 +3132,14 @@ const Sticky = (props) => {
3132
3132
  }, []);
3133
3133
  useEffect(() => {
3134
3134
  if (position === "top") return;
3135
- const containerEle = container == null ? void 0 : container.current;
3136
- if (!rootRef.current && !containerEle) return;
3137
- const rootRect = getRect(rootRef.current);
3135
+ const containerEle = container && container.current;
3136
+ const rootEle = rootRef.current;
3137
+ const stickyEle = stickyRef.current;
3138
+ if (!rootEle && !containerEle) return;
3139
+ const rootRect = getRect(rootEle);
3138
3140
  const containerRect = getRect(containerEle);
3139
3141
  const clientHeight = document.documentElement.clientHeight;
3140
- const stCurrent = stickyRef.current;
3141
- const stickyRect = getRect(stCurrent);
3142
+ const stickyRect = getRect(stickyEle);
3142
3143
  let fixed = clientHeight - threshold < rootRect.bottom;
3143
3144
  if (containerEle) {
3144
3145
  fixed = containerRect.bottom > clientHeight - threshold - stickyRect.height && clientHeight - threshold - stickyRect.height > containerRect.top;
@@ -3153,19 +3154,18 @@ const Sticky = (props) => {
3153
3154
  setIsFixed(fixed);
3154
3155
  }, [position, container, threshold]);
3155
3156
  const handleScroll = useCallback(() => {
3156
- const containerEle = container == null ? void 0 : container.current;
3157
- if (!rootRef.current && !containerEle) return;
3158
- const rootRect = getRect(rootRef.current);
3159
- const stCurrent = stickyRef.current;
3160
- const stickyRect = getRect(stCurrent);
3157
+ const containerEle = container && container.current;
3158
+ const rootEle = rootRef.current;
3159
+ const stickyEle = stickyRef.current;
3160
+ if (!rootEle && !containerEle) return;
3161
+ const rootRect = getRect(rootEle);
3162
+ const stickyRect = getRect(stickyEle);
3161
3163
  const containerRect = getRect(containerEle);
3162
3164
  if (rootRect.height) {
3163
- setRootStyle((prev) => {
3164
- return {
3165
- ...prev,
3166
- height: rootRect.height
3167
- };
3168
- });
3165
+ setRootStyle((prev) => ({
3166
+ ...prev,
3167
+ height: rootRect.height
3168
+ }));
3169
3169
  }
3170
3170
  const getFixed = () => {
3171
3171
  let fixed2 = false;
@@ -3181,22 +3181,16 @@ const Sticky = (props) => {
3181
3181
  };
3182
3182
  };
3183
3183
  const getTransform = () => {
3184
- if (position === "top") {
3185
- if (containerEle) {
3186
- const diff = containerRect.bottom - threshold - stickyRect.height;
3187
- const transform = diff < 0 ? diff : 0;
3188
- return { transform: `translate3d(0, ${transform}px, 0)` };
3189
- }
3190
- return {};
3184
+ if (position === "top" && containerEle) {
3185
+ const diff = containerRect.bottom - threshold - stickyRect.height;
3186
+ const transform = diff < 0 ? diff : 0;
3187
+ return { transform: `translate3d(0, ${transform}px, 0)` };
3191
3188
  }
3192
- if (position === "bottom") {
3193
- if (containerEle) {
3194
- const clientHeight = document.documentElement.clientHeight;
3195
- const diff = containerRect.bottom - (clientHeight - threshold);
3196
- const transform = diff < 0 ? diff : 0;
3197
- return { transform: `translate3d(0, ${transform}px, 0)` };
3198
- }
3199
- return {};
3189
+ if (position === "bottom" && containerEle) {
3190
+ const clientHeight = document.documentElement.clientHeight;
3191
+ const diff = containerRect.bottom - (clientHeight - threshold);
3192
+ const transform = diff < 0 ? diff : 0;
3193
+ return { transform: `translate3d(0, ${transform}px, 0)` };
3200
3194
  }
3201
3195
  return {};
3202
3196
  };
@@ -3215,9 +3209,9 @@ const Sticky = (props) => {
3215
3209
  });
3216
3210
  useEffect(() => {
3217
3211
  const el = getElement();
3218
- el.addEventListener("scroll", handleScroll, false);
3212
+ el == null ? void 0 : el.addEventListener("scroll", handleScroll, false);
3219
3213
  return () => {
3220
- el.removeEventListener("scroll", handleScroll);
3214
+ el == null ? void 0 : el.removeEventListener("scroll", handleScroll);
3221
3215
  };
3222
3216
  }, [getElement, handleScroll]);
3223
3217
  return /* @__PURE__ */ React__default.createElement(
@@ -9627,7 +9621,7 @@ const InternalCascader = (props, ref) => {
9627
9621
  };
9628
9622
  const syncValue = async () => {
9629
9623
  const currentValue = innerValue;
9630
- if (currentValue === void 0 || currentValue !== defaultValue || !state.tree.nodes.length) {
9624
+ if (currentValue === void 0 || ![defaultValue, value].includes(currentValue) || !state.tree.nodes.length) {
9631
9625
  return;
9632
9626
  }
9633
9627
  if (currentValue.length === 0) {
@@ -9659,7 +9653,7 @@ const InternalCascader = (props, ref) => {
9659
9653
  state.initLoading = false;
9660
9654
  }
9661
9655
  }
9662
- if (needToSync.length && currentValue === defaultValue) {
9656
+ if (needToSync.length && [defaultValue, value].includes(currentValue)) {
9663
9657
  const pathNodes = state.tree.getPathNodesByValue(needToSync);
9664
9658
  pathNodes.forEach((node, index) => {
9665
9659
  state.tabsCursor = index;
@@ -10680,8 +10674,10 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
10680
10674
  };
10681
10675
  useEffect(() => {
10682
10676
  setCurrentDate(resetDefaultValue() || []);
10683
- popup && resetRender();
10684
10677
  }, [defaultValue]);
10678
+ useEffect(() => {
10679
+ popup && resetRender();
10680
+ }, [currentDate]);
10685
10681
  const scrollToDate = (date4) => {
10686
10682
  if (Utils.compareDate(date4, propStartDate)) {
10687
10683
  date4 = propStartDate;
@@ -11516,15 +11512,15 @@ const CheckboxGroup = React__default.forwardRef(
11516
11512
  className,
11517
11513
  disabled,
11518
11514
  list,
11519
- onChange,
11520
11515
  value,
11521
11516
  defaultValue,
11522
11517
  max,
11523
11518
  min,
11524
- onLimit,
11525
11519
  labelPosition,
11526
11520
  direction,
11527
11521
  options: options2,
11522
+ onChange,
11523
+ onLimit,
11528
11524
  ...rest
11529
11525
  } = { ...defaultProps$_, ...props };
11530
11526
  useImperativeHandle(ref, () => ({
@@ -11553,8 +11549,8 @@ const CheckboxGroup = React__default.forwardRef(
11553
11549
  }
11554
11550
  }));
11555
11551
  const [_value, setValue] = usePropsValue({
11556
- value: props.value,
11557
- defaultValue: props.defaultValue,
11552
+ value,
11553
+ defaultValue,
11558
11554
  finalValue: [],
11559
11555
  onChange
11560
11556
  });
@@ -11606,7 +11602,7 @@ const CheckboxGroup = React__default.forwardRef(
11606
11602
  className: classNames(
11607
11603
  classPrefix$i,
11608
11604
  {
11609
- [`nut-checkboxgroup-${props.direction}`]: props.direction,
11605
+ [`nut-checkboxgroup-${direction}`]: direction,
11610
11606
  [`nut-checkboxgroup-list`]: list
11611
11607
  },
11612
11608
  className
@@ -11618,7 +11614,6 @@ const CheckboxGroup = React__default.forwardRef(
11618
11614
  );
11619
11615
  }
11620
11616
  );
11621
- CheckboxGroup.defaultProps = defaultProps$_;
11622
11617
  CheckboxGroup.displayName = "NutCheckboxGroup";
11623
11618
  const defaultProps$Z = {
11624
11619
  ...ComponentDefaults,
@@ -12439,7 +12434,7 @@ const DatePicker = (props) => {
12439
12434
  if (!isEqual2) {
12440
12435
  setSelectedDate(formatValue(newDate));
12441
12436
  }
12442
- props.onChange && props.onChange(
12437
+ onChange == null ? void 0 : onChange(
12443
12438
  selectedOptions,
12444
12439
  [
12445
12440
  String(newDate.getFullYear()),
@@ -12536,8 +12531,8 @@ const DatePicker = (props) => {
12536
12531
  }
12537
12532
  pickerValue[columnIndex] = (_a = arr[index]) == null ? void 0 : _a.value;
12538
12533
  setPickerValue([...pickerValue]);
12539
- if (props.filter && props.filter(type22, arr)) {
12540
- return props.filter(type22, arr);
12534
+ if (filter == null ? void 0 : filter(type22, arr)) {
12535
+ return filter == null ? void 0 : filter(type22, arr);
12541
12536
  }
12542
12537
  return arr;
12543
12538
  };
@@ -12595,7 +12590,6 @@ const DatePicker = (props) => {
12595
12590
  }
12596
12591
  ));
12597
12592
  };
12598
- DatePicker.defaultProps = defaultProps$X;
12599
12593
  DatePicker.displayName = "NutDatePicker";
12600
12594
  const Context = createContext({});
12601
12595
  function _extends() {
@@ -13682,7 +13676,7 @@ class FormStore {
13682
13676
  this.store = values;
13683
13677
  }
13684
13678
  };
13685
- this.setFieldsValue = (newStore) => {
13679
+ this.setFieldsValue = (newStore, needValidate = true) => {
13686
13680
  this.store = {
13687
13681
  ...this.store,
13688
13682
  ...newStore
@@ -13704,6 +13698,7 @@ class FormStore {
13704
13698
  item.entity.onStoreChange("update");
13705
13699
  }
13706
13700
  });
13701
+ needValidate && this.validateFields();
13707
13702
  };
13708
13703
  this.setCallback = (callback) => {
13709
13704
  this.callbacks = {
@@ -13948,7 +13943,7 @@ const _FormItem = class _FormItem extends React__default.Component {
13948
13943
  if (this.props.getValueFromEvent) {
13949
13944
  next = this.props.getValueFromEvent(...args);
13950
13945
  }
13951
- setFieldsValue({ [name]: next });
13946
+ setFieldsValue({ [name]: next }, false);
13952
13947
  }
13953
13948
  };
13954
13949
  const { validateTrigger } = this.props;
@@ -14708,7 +14703,7 @@ const MenuItem = forwardRef((props, ref) => {
14708
14703
  handleClick2(item);
14709
14704
  }
14710
14705
  },
14711
- item.value === innerValue ? /* @__PURE__ */ React__default.createElement("i", null, icon || /* @__PURE__ */ React__default.createElement(
14706
+ item.value === innerValue ? /* @__PURE__ */ React__default.createElement("i", { className: "nut-menu-container-item-icon" }, icon || /* @__PURE__ */ React__default.createElement(
14712
14707
  o$5,
14713
14708
  {
14714
14709
  color: activeColor,
@@ -14718,7 +14713,7 @@ const MenuItem = forwardRef((props, ref) => {
14718
14713
  /* @__PURE__ */ React__default.createElement(
14719
14714
  "div",
14720
14715
  {
14721
- className: getIconCName(item.value, value),
14716
+ className: `nut-menu-container-item-title ${getIconCName(item.value, value)}`,
14722
14717
  style: {
14723
14718
  color: `${item.value === innerValue ? activeColor : ""}`
14724
14719
  }
@@ -14837,14 +14832,10 @@ const Menu = (props) => {
14837
14832
  return /* @__PURE__ */ React__default.createElement(
14838
14833
  "div",
14839
14834
  {
14840
- className: classNames(
14841
- "nut-menu-title ",
14842
- {
14843
- active: showMenuItem[index],
14844
- disabled
14845
- },
14846
- className
14847
- ),
14835
+ className: classNames("nut-menu-title", `nut-menu-title-${index}`, {
14836
+ active: showMenuItem[index],
14837
+ disabled
14838
+ }),
14848
14839
  style: { color: showMenuItem[index] ? activeColor : "" },
14849
14840
  key: index,
14850
14841
  onClick: (e2) => {
@@ -15121,7 +15112,6 @@ const RadioGroup = React__default.forwardRef(
15121
15112
  );
15122
15113
  }
15123
15114
  );
15124
- RadioGroup.defaultProps = defaultProps$Q;
15125
15115
  RadioGroup.displayName = "NutRadioGroup";
15126
15116
  const defaultProps$P = {
15127
15117
  ...ComponentDefaults,
@@ -15249,7 +15239,6 @@ const Radio = (props) => {
15249
15239
  renderRadioItem()
15250
15240
  );
15251
15241
  };
15252
- Radio.defaultProps = defaultProps$P;
15253
15242
  Radio.displayName = "NutRadio";
15254
15243
  Radio.Group = RadioGroup;
15255
15244
  const defaultProps$O = {
@@ -16628,6 +16617,7 @@ const defaultProps$G = {
16628
16617
  };
16629
16618
  const InternalUploader = (props, ref) => {
16630
16619
  const { locale } = useConfig();
16620
+ const fileListRef = useRef([]);
16631
16621
  const {
16632
16622
  children,
16633
16623
  uploadIcon,
@@ -16680,6 +16670,9 @@ const InternalUploader = (props, ref) => {
16680
16670
  });
16681
16671
  const [uploadQueue, setUploadQueue] = useState([]);
16682
16672
  const classes = classNames(className, "nut-uploader");
16673
+ useEffect(() => {
16674
+ fileListRef.current = fileList;
16675
+ }, [fileList]);
16683
16676
  useImperativeHandle(ref, () => ({
16684
16677
  submit: () => {
16685
16678
  Promise.all(uploadQueue).then((res) => {
@@ -16724,7 +16717,7 @@ const InternalUploader = (props, ref) => {
16724
16717
  uploadOption.onStart = (option) => {
16725
16718
  clearUploadQueue(index);
16726
16719
  setFileList(
16727
- fileList.map((item) => {
16720
+ fileListRef.current.map((item) => {
16728
16721
  if (item.uid === fileItem.uid) {
16729
16722
  item.status = "ready";
16730
16723
  item.message = locale.uploader.readyUpload;
@@ -16732,23 +16725,23 @@ const InternalUploader = (props, ref) => {
16732
16725
  return item;
16733
16726
  })
16734
16727
  );
16735
- onStart && onStart(option);
16728
+ onStart == null ? void 0 : onStart(option);
16736
16729
  };
16737
16730
  uploadOption.onProgress = (e2, option) => {
16738
16731
  setFileList(
16739
- fileList.map((item) => {
16732
+ fileListRef.current.map((item) => {
16740
16733
  if (item.uid === fileItem.uid) {
16741
16734
  item.status = UPLOADING;
16742
16735
  item.message = locale.uploader.uploading;
16743
16736
  item.percentage = (e2.loaded / e2.total * 100).toFixed(0);
16744
- onProgress && onProgress({ e: e2, option, percentage: item.percentage });
16737
+ onProgress == null ? void 0 : onProgress({ e: e2, option, percentage: item.percentage });
16745
16738
  }
16746
16739
  return item;
16747
16740
  })
16748
16741
  );
16749
16742
  };
16750
16743
  uploadOption.onSuccess = (responseText, option) => {
16751
- const list = fileList.map((item) => {
16744
+ const list = fileListRef.current.map((item) => {
16752
16745
  if (item.uid === fileItem.uid) {
16753
16746
  item.status = SUCCESS;
16754
16747
  item.message = locale.uploader.success;
@@ -16765,7 +16758,7 @@ const InternalUploader = (props, ref) => {
16765
16758
  });
16766
16759
  };
16767
16760
  uploadOption.onFailure = (responseText, option) => {
16768
- const list = fileList.map((item) => {
16761
+ const list = fileListRef.current.map((item) => {
16769
16762
  if (item.uid === fileItem.uid) {
16770
16763
  item.status = ERROR;
16771
16764
  item.message = locale.uploader.error;
@@ -16827,9 +16820,7 @@ const InternalUploader = (props, ref) => {
16827
16820
  }
16828
16821
  return true;
16829
16822
  });
16830
- if (oversizes.length) {
16831
- onOversize && onOversize(files);
16832
- }
16823
+ oversizes.length && (onOversize == null ? void 0 : onOversize(files));
16833
16824
  if (filterFile.length > maximum) {
16834
16825
  filterFile.splice(maximum, filterFile.length - maximum);
16835
16826
  }
@@ -16868,7 +16859,6 @@ const InternalUploader = (props, ref) => {
16868
16859
  const _files = filterFiles(new Array().slice.call(files));
16869
16860
  readFile(_files);
16870
16861
  }
16871
- setFileList(fileList);
16872
16862
  if (clearInput) {
16873
16863
  clearInputValue($el);
16874
16864
  }
@@ -17193,18 +17183,6 @@ const Content = (props) => {
17193
17183
  );
17194
17184
  };
17195
17185
  Content.displayName = "NutContent";
17196
- const defaultDialogProps = {
17197
- ...ComponentDefaults,
17198
- overlay: true,
17199
- overlayStyle: {},
17200
- overlayClassName: "",
17201
- onCancel: () => {
17202
- },
17203
- onClose: () => {
17204
- },
17205
- onOverlayClick: (e2) => true,
17206
- ...defaultOverlayProps
17207
- };
17208
17186
  const DialogWrap = (props) => {
17209
17187
  const {
17210
17188
  visible,
@@ -17246,7 +17224,6 @@ const DialogWrap = (props) => {
17246
17224
  /* @__PURE__ */ React__default.createElement(Content, { ...props, visible })
17247
17225
  ));
17248
17226
  };
17249
- DialogWrap.defaultProps = defaultDialogProps;
17250
17227
  DialogWrap.displayName = "NutDialogWrap";
17251
17228
  const defaultProps$E = {
17252
17229
  ...ComponentDefaults,
@@ -18779,7 +18756,6 @@ const PullToRefresh = (p) => {
18779
18756
  /* @__PURE__ */ React__default.createElement("div", null, renderStatusText())
18780
18757
  )), /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-content` }, props.children));
18781
18758
  };
18782
- PullToRefresh.defaultProps = defaultProps$x;
18783
18759
  PullToRefresh.displayName = "NutPullToRefresh";
18784
18760
  const AvatarContext = createContext({});
18785
18761
  const defaultProps$w = {
@@ -19163,7 +19139,6 @@ const Swipe = forwardRef((props, instanceRef) => {
19163
19139
  /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-wrapper`, style: wrapperStyle }, renderActionContent("left", leftRef), children, renderActionContent("right", rightRef))
19164
19140
  );
19165
19141
  });
19166
- Swipe.defaultProps = defaultProps$t;
19167
19142
  Swipe.displayName = "NutSwipe";
19168
19143
  const classPrefix$8 = "nut-toast";
19169
19144
  class Notification2 extends React.PureComponent {
@@ -19563,16 +19538,16 @@ const Audio = (props) => {
19563
19538
  percent: 0,
19564
19539
  duration: "00:00:00",
19565
19540
  second: 0,
19566
- hanMuted: props.muted,
19567
- playing: props.autoPlay,
19541
+ hanMuted: muted,
19542
+ playing: autoPlay,
19568
19543
  handPlaying: false
19569
19544
  });
19570
19545
  const classPrefix2 = "nut-audio";
19571
19546
  const handleEnded = (e2) => {
19572
- if (props.loop) {
19547
+ if (loop2) {
19573
19548
  console.warn(locale.audio.tips || "onPlayEnd事件在loop=false时才会触发");
19574
19549
  } else {
19575
- props.onEnd && props.onEnd(e2);
19550
+ onEnd == null ? void 0 : onEnd(e2);
19576
19551
  }
19577
19552
  };
19578
19553
  function watch() {
@@ -19613,25 +19588,25 @@ const Audio = (props) => {
19613
19588
  if (statusRef.current.currentTime > 0 && AudioRef.current) {
19614
19589
  statusRef.current.currentTime--;
19615
19590
  AudioRef.current.currentTime = statusRef.current.currentTime;
19616
- props.onBack && props.onBack(AudioRef.current);
19591
+ onBack == null ? void 0 : onBack(AudioRef.current);
19617
19592
  }
19618
19593
  };
19619
19594
  const handleForward = () => {
19620
19595
  if (AudioRef.current) {
19621
19596
  statusRef.current.currentTime++;
19622
19597
  AudioRef.current.currentTime = statusRef.current.currentTime;
19623
- props.onForward && props.onForward(AudioRef.current);
19598
+ onForward == null ? void 0 : onForward(AudioRef.current);
19624
19599
  }
19625
19600
  };
19626
19601
  const handleMute = () => {
19627
19602
  if (AudioRef.current) {
19628
19603
  AudioRef.current.muted = !AudioRef.current.muted;
19629
- props.onMute && props.onMute(AudioRef.current);
19604
+ onMute == null ? void 0 : onMute(AudioRef.current);
19630
19605
  }
19631
19606
  };
19632
19607
  const handlePause = (e2) => {
19633
19608
  setPlaying(false);
19634
- props.onPause && props.onPause(e2);
19609
+ onPause == null ? void 0 : onPause(e2);
19635
19610
  };
19636
19611
  const formatSeconds = (value) => {
19637
19612
  if (!value) {
@@ -19720,12 +19695,12 @@ const Audio = (props) => {
19720
19695
  };
19721
19696
  const handleCanplay = (e2) => {
19722
19697
  setIsCanPlay(true);
19723
- if (props.autoPlay && !playing) {
19698
+ if (autoPlay && !playing) {
19724
19699
  AudioRef && AudioRef.current && AudioRef.current.play();
19725
19700
  }
19726
19701
  if (AudioRef.current) {
19727
19702
  statusRef.current.second = AudioRef.current.duration || 0;
19728
- props.onCanPlay && props.onCanPlay(e2);
19703
+ onCanPlay == null ? void 0 : onCanPlay(e2);
19729
19704
  }
19730
19705
  };
19731
19706
  const onTimeupdate = (e2) => {
@@ -19754,7 +19729,6 @@ const Audio = (props) => {
19754
19729
  /* @__PURE__ */ React__default.createElement("track", { kind: "captions" })
19755
19730
  ));
19756
19731
  };
19757
- Audio.defaultProps = defaultProps$p;
19758
19732
  Audio.displayName = "NutAudio";
19759
19733
  const defaultProps$o = {
19760
19734
  ...ComponentDefaults,
@@ -20589,15 +20563,17 @@ const getPerSlidePosition$1 = (index, position, loop2, count) => {
20589
20563
  const defaultEffect = (args) => {
20590
20564
  return React__default.Children.map(args.children, (child, index) => {
20591
20565
  const { isVertical, getSpringsAxis, loop: loop2, count } = args;
20566
+ const rtl = useRtl();
20567
+ const position = rtl ? "right" : "left";
20592
20568
  return /* @__PURE__ */ React__default.createElement(
20593
20569
  animated.div,
20594
20570
  {
20595
20571
  className: "nut-swiper-slide",
20596
20572
  style: {
20597
- [isVertical ? "y" : "x"]: getSpringsAxis().to((position) => {
20598
- return getPerSlidePosition$1(index, position, loop2, count);
20573
+ [isVertical ? "y" : "x"]: getSpringsAxis().to((position2) => {
20574
+ return getPerSlidePosition$1(index, position2, loop2, count);
20599
20575
  }),
20600
- [isVertical ? "top" : "left"]: `-${index * 100}%`
20576
+ [isVertical ? "top" : position]: `-${index * 100}%`
20601
20577
  }
20602
20578
  },
20603
20579
  child
@@ -20617,6 +20593,8 @@ const getPerSlidePosition = (index, position, loop2, count) => {
20617
20593
  };
20618
20594
  const focusEffect = (args) => {
20619
20595
  return React__default.Children.map(args.children, (child, index) => {
20596
+ const rtl = useRtl();
20597
+ const position = rtl ? "right" : "left";
20620
20598
  const {
20621
20599
  isVertical,
20622
20600
  springs,
@@ -20634,11 +20612,11 @@ const focusEffect = (args) => {
20634
20612
  className: "nut-swiper-slide",
20635
20613
  style: {
20636
20614
  [isVertical ? "y" : "x"]: springs[isVertical ? "y" : "x"].to(
20637
- (position) => {
20638
- return getPerSlidePosition(index, position, loop2, count);
20615
+ (position2) => {
20616
+ return getPerSlidePosition(index, position2, loop2, count);
20639
20617
  }
20640
20618
  ),
20641
- [isVertical ? "top" : "left"]: `-${index * 100}%`,
20619
+ [isVertical ? "top" : position]: `-${index * 100}%`,
20642
20620
  scale: springs.s.to((ss) => {
20643
20621
  const scales = getRefValue(transforms);
20644
20622
  if (!scales) return 1;
@@ -20946,7 +20924,6 @@ const Swiper = React__default.forwardRef(
20946
20924
  );
20947
20925
  }
20948
20926
  );
20949
- Swiper.defaultProps = defaultProps$h;
20950
20927
  Swiper.displayName = "NutSwiper";
20951
20928
  const defaultProps$g = {
20952
20929
  onClick: (e2) => void 0
@@ -20957,7 +20934,6 @@ const SwiperItem = (props) => {
20957
20934
  const classes = classNames(classPrefix2, className);
20958
20935
  return /* @__PURE__ */ React__default.createElement("div", { className: classes, onClick: props.onClick, style }, children);
20959
20936
  };
20960
- SwiperItem.defaultProps = defaultProps$g;
20961
20937
  SwiperItem.displayName = "NutSwiperItem";
20962
20938
  const InnerSwiper = Swiper;
20963
20939
  InnerSwiper.Item = SwiperItem;
@@ -21653,10 +21629,6 @@ const Table = (props) => {
21653
21629
  });
21654
21630
  };
21655
21631
  const renderBodyTds = (item, rowIndex) => {
21656
- const { rowRender } = item;
21657
- if (rowRender && typeof rowRender === "function") {
21658
- return rowRender(item, rowIndex);
21659
- }
21660
21632
  return sortDataItem().map(([value, render2]) => {
21661
21633
  return /* @__PURE__ */ React__default.createElement(
21662
21634
  "div",
@@ -21675,7 +21647,12 @@ const Table = (props) => {
21675
21647
  };
21676
21648
  const renderBodyTrs = () => {
21677
21649
  return innerValue.map((item, index) => {
21678
- return /* @__PURE__ */ React__default.createElement("div", { className: bodyClassPrefix, key: index }, renderBodyTds(item, index));
21650
+ const inner = renderBodyTds(item, index);
21651
+ const { rowRender } = item;
21652
+ if (rowRender && typeof rowRender === "function") {
21653
+ return rowRender(item, index, { inner });
21654
+ }
21655
+ return /* @__PURE__ */ React__default.createElement("div", { className: bodyClassPrefix, key: index }, inner);
21679
21656
  });
21680
21657
  };
21681
21658
  return /* @__PURE__ */ React__default.createElement("div", { className: cls, ...rest }, /* @__PURE__ */ React__default.createElement(
@@ -22699,6 +22676,8 @@ const defaultProps$1 = {
22699
22676
  gapY: 48,
22700
22677
  width: 120,
22701
22678
  height: 64,
22679
+ startX: 0,
22680
+ startY: 0,
22702
22681
  image: "",
22703
22682
  imageWidth: 120,
22704
22683
  imageHeight: 64,
@@ -22717,6 +22696,8 @@ const WaterMark = (props) => {
22717
22696
  className,
22718
22697
  gapX,
22719
22698
  gapY,
22699
+ startX,
22700
+ startY,
22720
22701
  width,
22721
22702
  height,
22722
22703
  image,
@@ -22779,7 +22760,7 @@ const WaterMark = (props) => {
22779
22760
  const markSize = Number(fontSize) * ratio;
22780
22761
  ctx2.font = `${fontStyle} normal ${fontWeight} ${markSize}px/${markHeight}px ${fontFamily}`;
22781
22762
  ctx2.fillStyle = color;
22782
- ctx2.fillText(content, 0, 0);
22763
+ ctx2.fillText(content, startX, startY);
22783
22764
  ctx2.restore();
22784
22765
  setBase64Url(canvas.toDataURL());
22785
22766
  }