@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
@@ -2,7 +2,7 @@
2
2
  typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react"), require("react-dom")) : typeof define === "function" && define.amd ? define(["exports", "react", "react-dom"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.nutui = {}, global2.React, global2.ReactDOM));
3
3
  })(this, function(exports2, React, ReactDOM) {
4
4
  "use strict";/*!
5
- * @nutui/nutui-react v2.6.13 Fri Jul 12 2024 13:59:44 GMT+0800 (China Standard Time)
5
+ * @nutui/nutui-react v2.6.15 Fri Jul 26 2024 15:20:57 GMT+0800 (China Standard Time)
6
6
  * (c) 2023 @jdf2e.
7
7
  * Released under the MIT License.
8
8
  */
@@ -3150,13 +3150,14 @@
3150
3150
  }, []);
3151
3151
  React.useEffect(() => {
3152
3152
  if (position === "top") return;
3153
- const containerEle = container == null ? void 0 : container.current;
3154
- if (!rootRef.current && !containerEle) return;
3155
- const rootRect = getRect(rootRef.current);
3153
+ const containerEle = container && container.current;
3154
+ const rootEle = rootRef.current;
3155
+ const stickyEle = stickyRef.current;
3156
+ if (!rootEle && !containerEle) return;
3157
+ const rootRect = getRect(rootEle);
3156
3158
  const containerRect = getRect(containerEle);
3157
3159
  const clientHeight = document.documentElement.clientHeight;
3158
- const stCurrent = stickyRef.current;
3159
- const stickyRect = getRect(stCurrent);
3160
+ const stickyRect = getRect(stickyEle);
3160
3161
  let fixed = clientHeight - threshold < rootRect.bottom;
3161
3162
  if (containerEle) {
3162
3163
  fixed = containerRect.bottom > clientHeight - threshold - stickyRect.height && clientHeight - threshold - stickyRect.height > containerRect.top;
@@ -3171,19 +3172,18 @@
3171
3172
  setIsFixed(fixed);
3172
3173
  }, [position, container, threshold]);
3173
3174
  const handleScroll = React.useCallback(() => {
3174
- const containerEle = container == null ? void 0 : container.current;
3175
- if (!rootRef.current && !containerEle) return;
3176
- const rootRect = getRect(rootRef.current);
3177
- const stCurrent = stickyRef.current;
3178
- const stickyRect = getRect(stCurrent);
3175
+ const containerEle = container && container.current;
3176
+ const rootEle = rootRef.current;
3177
+ const stickyEle = stickyRef.current;
3178
+ if (!rootEle && !containerEle) return;
3179
+ const rootRect = getRect(rootEle);
3180
+ const stickyRect = getRect(stickyEle);
3179
3181
  const containerRect = getRect(containerEle);
3180
3182
  if (rootRect.height) {
3181
- setRootStyle((prev) => {
3182
- return {
3183
- ...prev,
3184
- height: rootRect.height
3185
- };
3186
- });
3183
+ setRootStyle((prev) => ({
3184
+ ...prev,
3185
+ height: rootRect.height
3186
+ }));
3187
3187
  }
3188
3188
  const getFixed = () => {
3189
3189
  let fixed2 = false;
@@ -3199,22 +3199,16 @@
3199
3199
  };
3200
3200
  };
3201
3201
  const getTransform = () => {
3202
- if (position === "top") {
3203
- if (containerEle) {
3204
- const diff = containerRect.bottom - threshold - stickyRect.height;
3205
- const transform = diff < 0 ? diff : 0;
3206
- return { transform: `translate3d(0, ${transform}px, 0)` };
3207
- }
3208
- return {};
3202
+ if (position === "top" && containerEle) {
3203
+ const diff = containerRect.bottom - threshold - stickyRect.height;
3204
+ const transform = diff < 0 ? diff : 0;
3205
+ return { transform: `translate3d(0, ${transform}px, 0)` };
3209
3206
  }
3210
- if (position === "bottom") {
3211
- if (containerEle) {
3212
- const clientHeight = document.documentElement.clientHeight;
3213
- const diff = containerRect.bottom - (clientHeight - threshold);
3214
- const transform = diff < 0 ? diff : 0;
3215
- return { transform: `translate3d(0, ${transform}px, 0)` };
3216
- }
3217
- return {};
3207
+ if (position === "bottom" && containerEle) {
3208
+ const clientHeight = document.documentElement.clientHeight;
3209
+ const diff = containerRect.bottom - (clientHeight - threshold);
3210
+ const transform = diff < 0 ? diff : 0;
3211
+ return { transform: `translate3d(0, ${transform}px, 0)` };
3218
3212
  }
3219
3213
  return {};
3220
3214
  };
@@ -3233,9 +3227,9 @@
3233
3227
  });
3234
3228
  React.useEffect(() => {
3235
3229
  const el = getElement();
3236
- el.addEventListener("scroll", handleScroll, false);
3230
+ el == null ? void 0 : el.addEventListener("scroll", handleScroll, false);
3237
3231
  return () => {
3238
- el.removeEventListener("scroll", handleScroll);
3232
+ el == null ? void 0 : el.removeEventListener("scroll", handleScroll);
3239
3233
  };
3240
3234
  }, [getElement, handleScroll]);
3241
3235
  return /* @__PURE__ */ React.createElement(
@@ -9645,7 +9639,7 @@
9645
9639
  };
9646
9640
  const syncValue = async () => {
9647
9641
  const currentValue = innerValue;
9648
- if (currentValue === void 0 || currentValue !== defaultValue || !state.tree.nodes.length) {
9642
+ if (currentValue === void 0 || ![defaultValue, value].includes(currentValue) || !state.tree.nodes.length) {
9649
9643
  return;
9650
9644
  }
9651
9645
  if (currentValue.length === 0) {
@@ -9677,7 +9671,7 @@
9677
9671
  state.initLoading = false;
9678
9672
  }
9679
9673
  }
9680
- if (needToSync.length && currentValue === defaultValue) {
9674
+ if (needToSync.length && [defaultValue, value].includes(currentValue)) {
9681
9675
  const pathNodes = state.tree.getPathNodesByValue(needToSync);
9682
9676
  pathNodes.forEach((node, index) => {
9683
9677
  state.tabsCursor = index;
@@ -10698,8 +10692,10 @@
10698
10692
  };
10699
10693
  React.useEffect(() => {
10700
10694
  setCurrentDate(resetDefaultValue() || []);
10701
- popup && resetRender();
10702
10695
  }, [defaultValue]);
10696
+ React.useEffect(() => {
10697
+ popup && resetRender();
10698
+ }, [currentDate]);
10703
10699
  const scrollToDate = (date) => {
10704
10700
  if (Utils.compareDate(date, propStartDate)) {
10705
10701
  date = propStartDate;
@@ -11534,15 +11530,15 @@
11534
11530
  className,
11535
11531
  disabled,
11536
11532
  list,
11537
- onChange,
11538
11533
  value,
11539
11534
  defaultValue,
11540
11535
  max,
11541
11536
  min,
11542
- onLimit,
11543
11537
  labelPosition,
11544
11538
  direction,
11545
11539
  options: options2,
11540
+ onChange,
11541
+ onLimit,
11546
11542
  ...rest
11547
11543
  } = { ...defaultProps$_, ...props };
11548
11544
  React.useImperativeHandle(ref, () => ({
@@ -11571,8 +11567,8 @@
11571
11567
  }
11572
11568
  }));
11573
11569
  const [_value, setValue] = usePropsValue({
11574
- value: props.value,
11575
- defaultValue: props.defaultValue,
11570
+ value,
11571
+ defaultValue,
11576
11572
  finalValue: [],
11577
11573
  onChange
11578
11574
  });
@@ -11624,7 +11620,7 @@
11624
11620
  className: classNames(
11625
11621
  classPrefix$i,
11626
11622
  {
11627
- [`nut-checkboxgroup-${props.direction}`]: props.direction,
11623
+ [`nut-checkboxgroup-${direction}`]: direction,
11628
11624
  [`nut-checkboxgroup-list`]: list
11629
11625
  },
11630
11626
  className
@@ -11636,7 +11632,6 @@
11636
11632
  );
11637
11633
  }
11638
11634
  );
11639
- CheckboxGroup.defaultProps = defaultProps$_;
11640
11635
  CheckboxGroup.displayName = "NutCheckboxGroup";
11641
11636
  const defaultProps$Z = {
11642
11637
  ...ComponentDefaults,
@@ -12457,7 +12452,7 @@
12457
12452
  if (!isEqual2) {
12458
12453
  setSelectedDate(formatValue(newDate));
12459
12454
  }
12460
- props.onChange && props.onChange(
12455
+ onChange == null ? void 0 : onChange(
12461
12456
  selectedOptions,
12462
12457
  [
12463
12458
  String(newDate.getFullYear()),
@@ -12554,8 +12549,8 @@
12554
12549
  }
12555
12550
  pickerValue[columnIndex] = (_a = arr[index]) == null ? void 0 : _a.value;
12556
12551
  setPickerValue([...pickerValue]);
12557
- if (props.filter && props.filter(type22, arr)) {
12558
- return props.filter(type22, arr);
12552
+ if (filter == null ? void 0 : filter(type22, arr)) {
12553
+ return filter == null ? void 0 : filter(type22, arr);
12559
12554
  }
12560
12555
  return arr;
12561
12556
  };
@@ -12613,7 +12608,6 @@
12613
12608
  }
12614
12609
  ));
12615
12610
  };
12616
- DatePicker.defaultProps = defaultProps$X;
12617
12611
  DatePicker.displayName = "NutDatePicker";
12618
12612
  const Context = React.createContext({});
12619
12613
  function _extends() {
@@ -13700,7 +13694,7 @@
13700
13694
  this.store = values;
13701
13695
  }
13702
13696
  };
13703
- this.setFieldsValue = (newStore) => {
13697
+ this.setFieldsValue = (newStore, needValidate = true) => {
13704
13698
  this.store = {
13705
13699
  ...this.store,
13706
13700
  ...newStore
@@ -13722,6 +13716,7 @@
13722
13716
  item.entity.onStoreChange("update");
13723
13717
  }
13724
13718
  });
13719
+ needValidate && this.validateFields();
13725
13720
  };
13726
13721
  this.setCallback = (callback) => {
13727
13722
  this.callbacks = {
@@ -13966,7 +13961,7 @@
13966
13961
  if (this.props.getValueFromEvent) {
13967
13962
  next = this.props.getValueFromEvent(...args);
13968
13963
  }
13969
- setFieldsValue({ [name]: next });
13964
+ setFieldsValue({ [name]: next }, false);
13970
13965
  }
13971
13966
  };
13972
13967
  const { validateTrigger } = this.props;
@@ -14726,7 +14721,7 @@
14726
14721
  handleClick2(item);
14727
14722
  }
14728
14723
  },
14729
- item.value === innerValue ? /* @__PURE__ */ React.createElement("i", null, icon || /* @__PURE__ */ React.createElement(
14724
+ item.value === innerValue ? /* @__PURE__ */ React.createElement("i", { className: "nut-menu-container-item-icon" }, icon || /* @__PURE__ */ React.createElement(
14730
14725
  o$5,
14731
14726
  {
14732
14727
  color: activeColor,
@@ -14736,7 +14731,7 @@
14736
14731
  /* @__PURE__ */ React.createElement(
14737
14732
  "div",
14738
14733
  {
14739
- className: getIconCName(item.value, value),
14734
+ className: `nut-menu-container-item-title ${getIconCName(item.value, value)}`,
14740
14735
  style: {
14741
14736
  color: `${item.value === innerValue ? activeColor : ""}`
14742
14737
  }
@@ -14855,14 +14850,10 @@
14855
14850
  return /* @__PURE__ */ React.createElement(
14856
14851
  "div",
14857
14852
  {
14858
- className: classNames(
14859
- "nut-menu-title ",
14860
- {
14861
- active: showMenuItem[index],
14862
- disabled
14863
- },
14864
- className
14865
- ),
14853
+ className: classNames("nut-menu-title", `nut-menu-title-${index}`, {
14854
+ active: showMenuItem[index],
14855
+ disabled
14856
+ }),
14866
14857
  style: { color: showMenuItem[index] ? activeColor : "" },
14867
14858
  key: index,
14868
14859
  onClick: (e2) => {
@@ -15139,7 +15130,6 @@
15139
15130
  );
15140
15131
  }
15141
15132
  );
15142
- RadioGroup.defaultProps = defaultProps$Q;
15143
15133
  RadioGroup.displayName = "NutRadioGroup";
15144
15134
  const defaultProps$P = {
15145
15135
  ...ComponentDefaults,
@@ -15267,7 +15257,6 @@
15267
15257
  renderRadioItem()
15268
15258
  );
15269
15259
  };
15270
- Radio.defaultProps = defaultProps$P;
15271
15260
  Radio.displayName = "NutRadio";
15272
15261
  Radio.Group = RadioGroup;
15273
15262
  const defaultProps$O = {
@@ -16646,6 +16635,7 @@
16646
16635
  };
16647
16636
  const InternalUploader = (props, ref) => {
16648
16637
  const { locale } = useConfig();
16638
+ const fileListRef = React.useRef([]);
16649
16639
  const {
16650
16640
  children,
16651
16641
  uploadIcon,
@@ -16698,6 +16688,9 @@
16698
16688
  });
16699
16689
  const [uploadQueue, setUploadQueue] = React.useState([]);
16700
16690
  const classes = classNames(className, "nut-uploader");
16691
+ React.useEffect(() => {
16692
+ fileListRef.current = fileList;
16693
+ }, [fileList]);
16701
16694
  React.useImperativeHandle(ref, () => ({
16702
16695
  submit: () => {
16703
16696
  Promise.all(uploadQueue).then((res) => {
@@ -16742,7 +16735,7 @@
16742
16735
  uploadOption.onStart = (option) => {
16743
16736
  clearUploadQueue(index);
16744
16737
  setFileList(
16745
- fileList.map((item) => {
16738
+ fileListRef.current.map((item) => {
16746
16739
  if (item.uid === fileItem.uid) {
16747
16740
  item.status = "ready";
16748
16741
  item.message = locale.uploader.readyUpload;
@@ -16750,23 +16743,23 @@
16750
16743
  return item;
16751
16744
  })
16752
16745
  );
16753
- onStart && onStart(option);
16746
+ onStart == null ? void 0 : onStart(option);
16754
16747
  };
16755
16748
  uploadOption.onProgress = (e2, option) => {
16756
16749
  setFileList(
16757
- fileList.map((item) => {
16750
+ fileListRef.current.map((item) => {
16758
16751
  if (item.uid === fileItem.uid) {
16759
16752
  item.status = UPLOADING;
16760
16753
  item.message = locale.uploader.uploading;
16761
16754
  item.percentage = (e2.loaded / e2.total * 100).toFixed(0);
16762
- onProgress && onProgress({ e: e2, option, percentage: item.percentage });
16755
+ onProgress == null ? void 0 : onProgress({ e: e2, option, percentage: item.percentage });
16763
16756
  }
16764
16757
  return item;
16765
16758
  })
16766
16759
  );
16767
16760
  };
16768
16761
  uploadOption.onSuccess = (responseText, option) => {
16769
- const list = fileList.map((item) => {
16762
+ const list = fileListRef.current.map((item) => {
16770
16763
  if (item.uid === fileItem.uid) {
16771
16764
  item.status = SUCCESS;
16772
16765
  item.message = locale.uploader.success;
@@ -16783,7 +16776,7 @@
16783
16776
  });
16784
16777
  };
16785
16778
  uploadOption.onFailure = (responseText, option) => {
16786
- const list = fileList.map((item) => {
16779
+ const list = fileListRef.current.map((item) => {
16787
16780
  if (item.uid === fileItem.uid) {
16788
16781
  item.status = ERROR;
16789
16782
  item.message = locale.uploader.error;
@@ -16845,9 +16838,7 @@
16845
16838
  }
16846
16839
  return true;
16847
16840
  });
16848
- if (oversizes.length) {
16849
- onOversize && onOversize(files);
16850
- }
16841
+ oversizes.length && (onOversize == null ? void 0 : onOversize(files));
16851
16842
  if (filterFile.length > maximum) {
16852
16843
  filterFile.splice(maximum, filterFile.length - maximum);
16853
16844
  }
@@ -16886,7 +16877,6 @@
16886
16877
  const _files = filterFiles(new Array().slice.call(files));
16887
16878
  readFile(_files);
16888
16879
  }
16889
- setFileList(fileList);
16890
16880
  if (clearInput) {
16891
16881
  clearInputValue($el);
16892
16882
  }
@@ -17211,18 +17201,6 @@
17211
17201
  );
17212
17202
  };
17213
17203
  Content.displayName = "NutContent";
17214
- const defaultDialogProps = {
17215
- ...ComponentDefaults,
17216
- overlay: true,
17217
- overlayStyle: {},
17218
- overlayClassName: "",
17219
- onCancel: () => {
17220
- },
17221
- onClose: () => {
17222
- },
17223
- onOverlayClick: (e2) => true,
17224
- ...defaultOverlayProps
17225
- };
17226
17204
  const DialogWrap = (props) => {
17227
17205
  const {
17228
17206
  visible,
@@ -17264,7 +17242,6 @@
17264
17242
  /* @__PURE__ */ React.createElement(Content, { ...props, visible })
17265
17243
  ));
17266
17244
  };
17267
- DialogWrap.defaultProps = defaultDialogProps;
17268
17245
  DialogWrap.displayName = "NutDialogWrap";
17269
17246
  const defaultProps$E = {
17270
17247
  ...ComponentDefaults,
@@ -18797,7 +18774,6 @@
18797
18774
  /* @__PURE__ */ React.createElement("div", null, renderStatusText())
18798
18775
  )), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-content` }, props.children));
18799
18776
  };
18800
- PullToRefresh.defaultProps = defaultProps$x;
18801
18777
  PullToRefresh.displayName = "NutPullToRefresh";
18802
18778
  const AvatarContext = React.createContext({});
18803
18779
  const defaultProps$w = {
@@ -19181,7 +19157,6 @@
19181
19157
  /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-wrapper`, style: wrapperStyle }, renderActionContent("left", leftRef), children, renderActionContent("right", rightRef))
19182
19158
  );
19183
19159
  });
19184
- Swipe.defaultProps = defaultProps$t;
19185
19160
  Swipe.displayName = "NutSwipe";
19186
19161
  const classPrefix$8 = "nut-toast";
19187
19162
  class Notification extends React__namespace.PureComponent {
@@ -19581,16 +19556,16 @@
19581
19556
  percent: 0,
19582
19557
  duration: "00:00:00",
19583
19558
  second: 0,
19584
- hanMuted: props.muted,
19585
- playing: props.autoPlay,
19559
+ hanMuted: muted,
19560
+ playing: autoPlay,
19586
19561
  handPlaying: false
19587
19562
  });
19588
19563
  const classPrefix2 = "nut-audio";
19589
19564
  const handleEnded = (e2) => {
19590
- if (props.loop) {
19565
+ if (loop2) {
19591
19566
  console.warn(locale.audio.tips || "onPlayEnd事件在loop=false时才会触发");
19592
19567
  } else {
19593
- props.onEnd && props.onEnd(e2);
19568
+ onEnd == null ? void 0 : onEnd(e2);
19594
19569
  }
19595
19570
  };
19596
19571
  function watch() {
@@ -19631,25 +19606,25 @@
19631
19606
  if (statusRef.current.currentTime > 0 && AudioRef.current) {
19632
19607
  statusRef.current.currentTime--;
19633
19608
  AudioRef.current.currentTime = statusRef.current.currentTime;
19634
- props.onBack && props.onBack(AudioRef.current);
19609
+ onBack == null ? void 0 : onBack(AudioRef.current);
19635
19610
  }
19636
19611
  };
19637
19612
  const handleForward = () => {
19638
19613
  if (AudioRef.current) {
19639
19614
  statusRef.current.currentTime++;
19640
19615
  AudioRef.current.currentTime = statusRef.current.currentTime;
19641
- props.onForward && props.onForward(AudioRef.current);
19616
+ onForward == null ? void 0 : onForward(AudioRef.current);
19642
19617
  }
19643
19618
  };
19644
19619
  const handleMute = () => {
19645
19620
  if (AudioRef.current) {
19646
19621
  AudioRef.current.muted = !AudioRef.current.muted;
19647
- props.onMute && props.onMute(AudioRef.current);
19622
+ onMute == null ? void 0 : onMute(AudioRef.current);
19648
19623
  }
19649
19624
  };
19650
19625
  const handlePause = (e2) => {
19651
19626
  setPlaying(false);
19652
- props.onPause && props.onPause(e2);
19627
+ onPause == null ? void 0 : onPause(e2);
19653
19628
  };
19654
19629
  const formatSeconds = (value) => {
19655
19630
  if (!value) {
@@ -19738,12 +19713,12 @@
19738
19713
  };
19739
19714
  const handleCanplay = (e2) => {
19740
19715
  setIsCanPlay(true);
19741
- if (props.autoPlay && !playing) {
19716
+ if (autoPlay && !playing) {
19742
19717
  AudioRef && AudioRef.current && AudioRef.current.play();
19743
19718
  }
19744
19719
  if (AudioRef.current) {
19745
19720
  statusRef.current.second = AudioRef.current.duration || 0;
19746
- props.onCanPlay && props.onCanPlay(e2);
19721
+ onCanPlay == null ? void 0 : onCanPlay(e2);
19747
19722
  }
19748
19723
  };
19749
19724
  const onTimeupdate = (e2) => {
@@ -19772,7 +19747,6 @@
19772
19747
  /* @__PURE__ */ React.createElement("track", { kind: "captions" })
19773
19748
  ));
19774
19749
  };
19775
- Audio.defaultProps = defaultProps$p;
19776
19750
  Audio.displayName = "NutAudio";
19777
19751
  const defaultProps$o = {
19778
19752
  ...ComponentDefaults,
@@ -20607,15 +20581,17 @@
20607
20581
  const defaultEffect = (args) => {
20608
20582
  return React.Children.map(args.children, (child, index) => {
20609
20583
  const { isVertical, getSpringsAxis, loop: loop2, count } = args;
20584
+ const rtl = useRtl();
20585
+ const position = rtl ? "right" : "left";
20610
20586
  return /* @__PURE__ */ React.createElement(
20611
20587
  animated.div,
20612
20588
  {
20613
20589
  className: "nut-swiper-slide",
20614
20590
  style: {
20615
- [isVertical ? "y" : "x"]: getSpringsAxis().to((position) => {
20616
- return getPerSlidePosition$1(index, position, loop2, count);
20591
+ [isVertical ? "y" : "x"]: getSpringsAxis().to((position2) => {
20592
+ return getPerSlidePosition$1(index, position2, loop2, count);
20617
20593
  }),
20618
- [isVertical ? "top" : "left"]: `-${index * 100}%`
20594
+ [isVertical ? "top" : position]: `-${index * 100}%`
20619
20595
  }
20620
20596
  },
20621
20597
  child
@@ -20635,6 +20611,8 @@
20635
20611
  };
20636
20612
  const focusEffect = (args) => {
20637
20613
  return React.Children.map(args.children, (child, index) => {
20614
+ const rtl = useRtl();
20615
+ const position = rtl ? "right" : "left";
20638
20616
  const {
20639
20617
  isVertical,
20640
20618
  springs,
@@ -20652,11 +20630,11 @@
20652
20630
  className: "nut-swiper-slide",
20653
20631
  style: {
20654
20632
  [isVertical ? "y" : "x"]: springs[isVertical ? "y" : "x"].to(
20655
- (position) => {
20656
- return getPerSlidePosition(index, position, loop2, count);
20633
+ (position2) => {
20634
+ return getPerSlidePosition(index, position2, loop2, count);
20657
20635
  }
20658
20636
  ),
20659
- [isVertical ? "top" : "left"]: `-${index * 100}%`,
20637
+ [isVertical ? "top" : position]: `-${index * 100}%`,
20660
20638
  scale: springs.s.to((ss) => {
20661
20639
  const scales = getRefValue(transforms);
20662
20640
  if (!scales) return 1;
@@ -20964,7 +20942,6 @@
20964
20942
  );
20965
20943
  }
20966
20944
  );
20967
- Swiper.defaultProps = defaultProps$h;
20968
20945
  Swiper.displayName = "NutSwiper";
20969
20946
  const defaultProps$g = {
20970
20947
  onClick: (e2) => void 0
@@ -20975,7 +20952,6 @@
20975
20952
  const classes = classNames(classPrefix2, className);
20976
20953
  return /* @__PURE__ */ React.createElement("div", { className: classes, onClick: props.onClick, style }, children);
20977
20954
  };
20978
- SwiperItem.defaultProps = defaultProps$g;
20979
20955
  SwiperItem.displayName = "NutSwiperItem";
20980
20956
  const InnerSwiper = Swiper;
20981
20957
  InnerSwiper.Item = SwiperItem;
@@ -21671,10 +21647,6 @@
21671
21647
  });
21672
21648
  };
21673
21649
  const renderBodyTds = (item, rowIndex) => {
21674
- const { rowRender } = item;
21675
- if (rowRender && typeof rowRender === "function") {
21676
- return rowRender(item, rowIndex);
21677
- }
21678
21650
  return sortDataItem().map(([value, render2]) => {
21679
21651
  return /* @__PURE__ */ React.createElement(
21680
21652
  "div",
@@ -21693,7 +21665,12 @@
21693
21665
  };
21694
21666
  const renderBodyTrs = () => {
21695
21667
  return innerValue.map((item, index) => {
21696
- return /* @__PURE__ */ React.createElement("div", { className: bodyClassPrefix, key: index }, renderBodyTds(item, index));
21668
+ const inner = renderBodyTds(item, index);
21669
+ const { rowRender } = item;
21670
+ if (rowRender && typeof rowRender === "function") {
21671
+ return rowRender(item, index, { inner });
21672
+ }
21673
+ return /* @__PURE__ */ React.createElement("div", { className: bodyClassPrefix, key: index }, inner);
21697
21674
  });
21698
21675
  };
21699
21676
  return /* @__PURE__ */ React.createElement("div", { className: cls, ...rest }, /* @__PURE__ */ React.createElement(
@@ -22717,6 +22694,8 @@
22717
22694
  gapY: 48,
22718
22695
  width: 120,
22719
22696
  height: 64,
22697
+ startX: 0,
22698
+ startY: 0,
22720
22699
  image: "",
22721
22700
  imageWidth: 120,
22722
22701
  imageHeight: 64,
@@ -22735,6 +22714,8 @@
22735
22714
  className,
22736
22715
  gapX,
22737
22716
  gapY,
22717
+ startX,
22718
+ startY,
22738
22719
  width,
22739
22720
  height,
22740
22721
  image,
@@ -22797,7 +22778,7 @@
22797
22778
  const markSize = Number(fontSize) * ratio;
22798
22779
  ctx2.font = `${fontStyle} normal ${fontWeight} ${markSize}px/${markHeight}px ${fontFamily}`;
22799
22780
  ctx2.fillStyle = color;
22800
- ctx2.fillText(content, 0, 0);
22781
+ ctx2.fillText(content, startX, startY);
22801
22782
  ctx2.restore();
22802
22783
  setBase64Url(canvas.toDataURL());
22803
22784
  }
@@ -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;