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

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 (58) hide show
  1. package/CHANGELOG.md +931 -909
  2. package/README.md +21 -28
  3. package/dist/esm/Audio.js +1 -1
  4. package/dist/esm/Checkbox.js +1 -1
  5. package/dist/esm/CheckboxGroup.js +1 -1
  6. package/dist/esm/DatePicker.js +1 -1
  7. package/dist/esm/Form.js +1 -1
  8. package/dist/esm/FormItem.js +1 -1
  9. package/dist/esm/ImagePreview.js +1 -1
  10. package/dist/esm/InputNumber.js +1 -1
  11. package/dist/esm/Menu.js +1 -1
  12. package/dist/esm/MenuItem.js +1 -1
  13. package/dist/esm/NumberKeyboard.js +1 -1
  14. package/dist/esm/PullToRefresh.js +1 -1
  15. package/dist/esm/Radio.js +1 -1
  16. package/dist/esm/RadioGroup.js +1 -1
  17. package/dist/esm/Swipe.js +1 -1
  18. package/dist/esm/Swiper.js +1 -2
  19. package/dist/esm/SwiperItem.js +1 -1
  20. package/dist/esm/Table.js +1 -1
  21. package/dist/esm/Uploader.js +1 -1
  22. package/dist/esm/{audio.taro-DzSc40G9.js → audio.taro-CD-vP_u0.js} +7 -8
  23. package/dist/esm/{checkbox.taro-Dc054oRo.js → checkbox.taro-CgqJyhrh.js} +4 -5
  24. package/dist/esm/{datepicker.taro-DTyJrlhD.js → datepicker.taro-BxaZ3Fjv.js} +3 -4
  25. package/dist/esm/{formitem.taro-Dmt5-wxG.js → formitem.taro-DogVddcs.js} +2 -2
  26. package/dist/esm/{imagepreview.taro-DtgQJEQ_.js → imagepreview.taro-CF-CCJ1Q.js} +1 -1
  27. package/dist/esm/{inputnumber.taro-WN5Drnyz.js → inputnumber.taro-D9mteLSI.js} +26 -9
  28. package/dist/esm/{menu.taro-CrPdDbYM.js → menu.taro-CLbOM_Z4.js} +12 -5
  29. package/dist/esm/{menuitem.taro-DMV3j4DK.js → menuitem.taro-CNaseNcY.js} +1 -1
  30. package/dist/esm/{numberkeyboard.taro-BA0iCeGP.js → numberkeyboard.taro-Cz6rKxk3.js} +38 -27
  31. package/dist/esm/nutui-react.es.js +15 -15
  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/{swipe.taro-yUhne9XU.js → swipe.taro-Bsk2fnEl.js} +0 -1
  35. package/dist/esm/{swiperitem.taro-DeiNSrJV.js → swiperitem.taro-BleF1EOs.js} +0 -5
  36. package/dist/esm/{table.taro-D2M3D2Vj.js → table.taro-B6WCKTkO.js} +6 -5
  37. package/dist/esm/{uploader.taro-DfO2HWvy.js → uploader.taro-DagHZaNI.js} +4 -2
  38. package/dist/locales/base.js +1 -1
  39. package/dist/locales/en-US.js +1 -1
  40. package/dist/locales/id-ID.js +1 -1
  41. package/dist/locales/tr-TR.js +1 -1
  42. package/dist/locales/zh-CN.js +1 -1
  43. package/dist/locales/zh-TW.js +1 -1
  44. package/dist/locales/zh-UG.js +1 -1
  45. package/dist/nutui.react.es.js +207 -151
  46. package/dist/nutui.react.umd.js +207 -151
  47. package/dist/types/packages/cell/cell.d.ts +1 -1
  48. package/dist/types/packages/cell/cell.taro.d.ts +2 -2
  49. package/dist/types/packages/formitem/formitem.d.ts +1 -0
  50. package/dist/types/packages/formitem/formitem.taro.d.ts +5 -0
  51. package/dist/types/packages/inputnumber/inputnumber.d.ts +1 -1
  52. package/dist/types/packages/inputnumber/inputnumber.taro.d.ts +1 -1
  53. package/dist/types/packages/menuitem/menuitem.d.ts +1 -0
  54. package/dist/types/packages/menuitem/menuitem.taro.d.ts +5 -0
  55. package/dist/types/packages/swiper/swiper.taro.d.ts +2 -1
  56. package/dist/types/packages/swiperitem/swiperitem.d.ts +0 -1
  57. package/package.json +2 -2
  58. package/dist/types/packages/griditem/types.d.ts +0 -13
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v2.6.14 Wed Jul 24 2024 13:29:51 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v2.6.16 Sat Aug 03 2024 09:52:17 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+" });
@@ -7542,15 +7541,15 @@ 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
7554
  } = { ...defaultProps$10, ...props };
7556
7555
  useImperativeHandle(ref, () => ({
@@ -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,7 +7643,6 @@ const CheckboxGroup = React__default.forwardRef(
7644
7643
  );
7645
7644
  }
7646
7645
  );
7647
- CheckboxGroup.defaultProps = defaultProps$10;
7648
7646
  CheckboxGroup.displayName = "NutCheckboxGroup";
7649
7647
  const defaultProps$$ = {
7650
7648
  ...ComponentDefaults,
@@ -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() {
@@ -10124,6 +10121,7 @@ const _FormItem = class _FormItem extends React__default.Component {
10124
10121
  rules: rules2,
10125
10122
  className,
10126
10123
  style,
10124
+ align,
10127
10125
  errorMessageAlign
10128
10126
  } = {
10129
10127
  ...defaultProps$X,
@@ -10139,6 +10137,7 @@ const _FormItem = class _FormItem extends React__default.Component {
10139
10137
  {
10140
10138
  className: `nut-form-item ${className}`,
10141
10139
  style,
10140
+ align,
10142
10141
  onClick: (e2) => this.props.onClick && this.props.onClick(e2, this.componentRef)
10143
10142
  },
10144
10143
  label ? /* @__PURE__ */ React__default.createElement("div", { className: "nut-cell-title nut-form-item-label" }, renderLabel) : null,
@@ -10550,6 +10549,17 @@ const InputNumber = (props) => {
10550
10549
  if (text === "-") return null;
10551
10550
  return text;
10552
10551
  };
10552
+ const clampValue = (valueStr) => {
10553
+ if (valueStr === null) return defaultValue;
10554
+ const val = Number(parseFloat(valueStr || "0").toFixed(digits));
10555
+ return Math.max(Number(min), Math.min(Number(max), val));
10556
+ };
10557
+ const handleValueChange = (valueStr, e2) => {
10558
+ const val = clampValue(valueStr);
10559
+ if (val !== Number(shadowValue)) {
10560
+ onChange == null ? void 0 : onChange(val, e2);
10561
+ }
10562
+ };
10553
10563
  const handleInputChange = (e2) => {
10554
10564
  setInputValue(e2.target.value);
10555
10565
  const valueStr = parseValue(e2.target.value);
@@ -10560,26 +10570,31 @@ const InputNumber = (props) => {
10560
10570
  setShadowValue(defaultValue);
10561
10571
  }
10562
10572
  } else {
10563
- setShadowValue(valueStr);
10564
- }
10565
- if (!async) {
10566
- onChange == null ? void 0 : onChange(parseFloat(valueStr || "0").toFixed(digits), e2);
10573
+ setShadowValue(clampValue(valueStr));
10567
10574
  }
10575
+ !async && handleValueChange(valueStr, e2);
10568
10576
  };
10569
10577
  const handleFocus = (e2) => {
10570
10578
  setFocused(true);
10571
10579
  setInputValue(
10572
10580
  shadowValue !== void 0 && shadowValue !== null ? bound2(Number(shadowValue), Number(min), Number(max)).toString() : ""
10573
10581
  );
10574
- onFocus && onFocus(e2);
10582
+ onFocus == null ? void 0 : onFocus(e2);
10575
10583
  };
10576
10584
  const handleBlur = (e2) => {
10577
10585
  setFocused(false);
10578
- onBlur && onBlur(e2);
10579
- if (async) {
10580
- const valueStr = parseValue(e2.target.value);
10581
- onChange == null ? void 0 : onChange(parseFloat(valueStr || "0").toFixed(digits), e2);
10586
+ onBlur == null ? void 0 : onBlur(e2);
10587
+ const valueStr = parseValue(e2.target.value);
10588
+ if (valueStr === null) {
10589
+ if (allowEmpty) {
10590
+ setShadowValue(null);
10591
+ } else {
10592
+ setShadowValue(defaultValue);
10593
+ }
10594
+ } else {
10595
+ setShadowValue(clampValue(valueStr));
10582
10596
  }
10597
+ async && handleValueChange(valueStr, e2);
10583
10598
  };
10584
10599
  return /* @__PURE__ */ React__default.createElement("div", { className: classes, style, ...restProps }, /* @__PURE__ */ React__default.createElement("div", { className: "nut-input-minus", onClick: handleReduce }, /* @__PURE__ */ React__default.createElement(
10585
10600
  a$1,
@@ -10614,6 +10629,7 @@ const InputNumber = (props) => {
10614
10629
  InputNumber.displayName = "NutInputNumber";
10615
10630
  const defaultProps$U = {
10616
10631
  ...ComponentDefaults,
10632
+ titleIcon: null,
10617
10633
  columns: 1,
10618
10634
  direction: "down",
10619
10635
  icon: null,
@@ -10916,7 +10932,15 @@ const Menu = (props) => {
10916
10932
  const menuTitle = () => {
10917
10933
  return React__default.Children.map(children, (child, index) => {
10918
10934
  if (React__default.isValidElement(child)) {
10919
- const { title, options, value, defaultValue, disabled, direction } = child.props;
10935
+ const {
10936
+ title,
10937
+ titleIcon,
10938
+ options,
10939
+ value,
10940
+ defaultValue,
10941
+ disabled,
10942
+ direction
10943
+ } = child.props;
10920
10944
  const selected = options == null ? void 0 : options.filter(
10921
10945
  (option) => option.value === (value !== void 0 ? value : defaultValue)
10922
10946
  );
@@ -10927,17 +10951,32 @@ const Menu = (props) => {
10927
10951
  return selected[0].text;
10928
10952
  return "";
10929
10953
  };
10954
+ const finallyIcon = () => {
10955
+ if (titleIcon) return titleIcon;
10956
+ if (icon) return icon;
10957
+ return direction === "up" ? /* @__PURE__ */ React__default.createElement(
10958
+ a$2,
10959
+ {
10960
+ className: "nut-menu-title-icon",
10961
+ width: "12px",
10962
+ height: "12px"
10963
+ }
10964
+ ) : /* @__PURE__ */ React__default.createElement(
10965
+ g$6,
10966
+ {
10967
+ className: "nut-menu-title-icon",
10968
+ width: "12px",
10969
+ height: "12px"
10970
+ }
10971
+ );
10972
+ };
10930
10973
  return /* @__PURE__ */ React__default.createElement(
10931
10974
  "div",
10932
10975
  {
10933
- className: classNames(
10934
- "nut-menu-title ",
10935
- {
10936
- active: showMenuItem[index],
10937
- disabled
10938
- },
10939
- className
10940
- ),
10976
+ className: classNames("nut-menu-title", `nut-menu-title-${index}`, {
10977
+ active: showMenuItem[index],
10978
+ disabled
10979
+ }),
10941
10980
  style: { color: showMenuItem[index] ? activeColor : "" },
10942
10981
  key: index,
10943
10982
  onClick: () => {
@@ -10946,7 +10985,7 @@ const Menu = (props) => {
10946
10985
  }
10947
10986
  },
10948
10987
  /* @__PURE__ */ React__default.createElement("div", { className: "nut-menu-title-text" }, finallyTitle()),
10949
- icon || (direction === "up" ? /* @__PURE__ */ React__default.createElement(a$2, { className: "nut-menu-title-icon", size: "12px" }) : /* @__PURE__ */ React__default.createElement(g$6, { className: "nut-menu-title-icon", size: "12px" }))
10988
+ finallyIcon()
10950
10989
  );
10951
10990
  }
10952
10991
  return null;
@@ -10975,6 +11014,16 @@ const Menu = (props) => {
10975
11014
  };
10976
11015
  Menu.displayName = "NutMenu";
10977
11016
  Menu.Item = MenuItem;
11017
+ const defaultProps$S = {
11018
+ ...ComponentDefaults,
11019
+ visible: false,
11020
+ rightActions: "",
11021
+ type: "default",
11022
+ custom: [],
11023
+ random: false,
11024
+ onClose: () => {
11025
+ }
11026
+ };
10978
11027
  const NumberKeyboard = (props) => {
10979
11028
  const { locale } = useConfig$1();
10980
11029
  const {
@@ -10992,7 +11041,7 @@ const NumberKeyboard = (props) => {
10992
11041
  onClose,
10993
11042
  onConfirm,
10994
11043
  ...rest
10995
- } = props;
11044
+ } = { ...defaultProps$S, ...props };
10996
11045
  const classPrefix2 = "nut-numberkeyboard";
10997
11046
  const getBasicKeys = () => {
10998
11047
  const keys = new Array(9).fill(0).map((_, index) => {
@@ -11038,17 +11087,35 @@ const NumberKeyboard = (props) => {
11038
11087
  };
11039
11088
  const onTouchEnd = (item2) => {
11040
11089
  setActive(false);
11041
- if (item2.type === "num" || item2.type === "custom") {
11042
- onChange && onChange(item2.id);
11043
- }
11044
- if (item2.type === "close") {
11045
- onClose && onClose();
11046
- }
11047
- if (item2.type === "delete") {
11048
- onDelete && onDelete();
11090
+ switch (item2.type) {
11091
+ case "num":
11092
+ case "custom":
11093
+ onChange == null ? void 0 : onChange(item2.id);
11094
+ break;
11095
+ case "close":
11096
+ onClose == null ? void 0 : onClose();
11097
+ break;
11098
+ case "delete":
11099
+ onDelete == null ? void 0 : onDelete();
11100
+ break;
11101
+ case "confirm":
11102
+ onConfirm == null ? void 0 : onConfirm();
11103
+ break;
11049
11104
  }
11050
- if (item2.type === "confirm") {
11051
- onConfirm && onConfirm();
11105
+ };
11106
+ const renderContent = (item2) => {
11107
+ switch (item2.type) {
11108
+ case "num":
11109
+ case "custom":
11110
+ return /* @__PURE__ */ React__default.createElement("div", null, item2.id);
11111
+ case "delete":
11112
+ return /* @__PURE__ */ React__default.createElement(DeleteIcon, null);
11113
+ case "close":
11114
+ return /* @__PURE__ */ React__default.createElement(g$6, { size: 18 });
11115
+ case "confirm":
11116
+ return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, confirmText || locale.done);
11117
+ default:
11118
+ return null;
11052
11119
  }
11053
11120
  };
11054
11121
  return /* @__PURE__ */ React__default.createElement("div", { key: item.id, className: `${classPrefix2}-body-wrapper` }, /* @__PURE__ */ React__default.createElement(
@@ -11065,22 +11132,19 @@ const NumberKeyboard = (props) => {
11065
11132
  onTouchEnd: () => onTouchEnd(item),
11066
11133
  onTouchCancel: () => onTouchEnd(item)
11067
11134
  },
11068
- (item.type === "num" || item.type === "custom") && /* @__PURE__ */ React__default.createElement("div", null, item.id),
11069
- item.type === "delete" && /* @__PURE__ */ React__default.createElement(DeleteIcon, null),
11070
- item.type === "close" && /* @__PURE__ */ React__default.createElement(g$6, { size: 18 }),
11071
- item.type === "confirm" && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, confirmText || locale.done)
11135
+ renderContent(item)
11072
11136
  ));
11073
11137
  };
11074
11138
  return /* @__PURE__ */ React__default.createElement(
11075
11139
  Popup,
11076
11140
  {
11141
+ ...rest,
11077
11142
  visible,
11078
11143
  position: "bottom",
11079
11144
  onOverlayClick: onClose,
11080
11145
  onCloseIconClick: onClose,
11081
11146
  zIndex: 9999,
11082
- overlayStyle: { backgroundColor: "rgba(0, 0, 0, 0)" },
11083
- ...rest
11147
+ overlayStyle: { backgroundColor: "rgba(0, 0, 0, 0)" }
11084
11148
  },
11085
11149
  /* @__PURE__ */ React__default.createElement("div", { className: classNames(classPrefix2, className), style }, title && /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-header` }, /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-header-title` }, title), type4 === "default" && /* @__PURE__ */ React__default.createElement(
11086
11150
  "span",
@@ -11114,7 +11178,7 @@ const NumberKeyboard = (props) => {
11114
11178
  };
11115
11179
  NumberKeyboard.displayName = "NutNumberKeyboard";
11116
11180
  const RadioContext = React__default.createContext(null);
11117
- const defaultProps$S = {
11181
+ const defaultProps$R = {
11118
11182
  labelPosition: "right",
11119
11183
  onChange: (value) => {
11120
11184
  },
@@ -11136,7 +11200,7 @@ const RadioGroup = React__default.forwardRef(
11136
11200
  options,
11137
11201
  disabled,
11138
11202
  ...rest
11139
- } = { ...defaultProps$S, ...props };
11203
+ } = { ...defaultProps$R, ...props };
11140
11204
  const [val2State, setVal2State] = usePropsValue({
11141
11205
  defaultValue: props.defaultValue,
11142
11206
  value: props.value,
@@ -11193,9 +11257,8 @@ const RadioGroup = React__default.forwardRef(
11193
11257
  );
11194
11258
  }
11195
11259
  );
11196
- RadioGroup.defaultProps = defaultProps$S;
11197
11260
  RadioGroup.displayName = "NutRadioGroup";
11198
- const defaultProps$R = {
11261
+ const defaultProps$Q = {
11199
11262
  ...ComponentDefaults,
11200
11263
  disabled: false,
11201
11264
  shape: "round",
@@ -11221,7 +11284,7 @@ const Radio = (props) => {
11221
11284
  onChange,
11222
11285
  ...others
11223
11286
  } = {
11224
- ...defaultProps$R,
11287
+ ...defaultProps$Q,
11225
11288
  ...props
11226
11289
  };
11227
11290
  let { labelPosition, disabled, ...rest } = others;
@@ -11321,10 +11384,9 @@ const Radio = (props) => {
11321
11384
  renderRadioItem()
11322
11385
  );
11323
11386
  };
11324
- Radio.defaultProps = defaultProps$R;
11325
11387
  Radio.displayName = "NutRadio";
11326
11388
  Radio.Group = RadioGroup;
11327
- const defaultProps$Q = {
11389
+ const defaultProps$P = {
11328
11390
  ...ComponentDefaults,
11329
11391
  range: false,
11330
11392
  min: 0,
@@ -11353,7 +11415,7 @@ const Range = (props) => {
11353
11415
  step,
11354
11416
  value,
11355
11417
  defaultValue
11356
- } = { ...defaultProps$Q, ...props };
11418
+ } = { ...defaultProps$P, ...props };
11357
11419
  const classPrefix2 = "nut-range";
11358
11420
  const [buttonIndex, setButtonIndex] = useState(0);
11359
11421
  const [dragStatus, setDragStatus] = useState("start");
@@ -11635,7 +11697,7 @@ const Range = (props) => {
11635
11697
  ))), maxDescription !== null && /* @__PURE__ */ React__default.createElement("div", { className: "max" }, maxDescription || max));
11636
11698
  };
11637
11699
  Range.displayName = "NutRange";
11638
- const defaultProps$P = {
11700
+ const defaultProps$O = {
11639
11701
  ...ComponentDefaults,
11640
11702
  count: 5,
11641
11703
  min: 0,
@@ -11663,7 +11725,7 @@ const Rate = (props) => {
11663
11725
  onChange,
11664
11726
  onTouchEnd
11665
11727
  } = {
11666
- ...defaultProps$P,
11728
+ ...defaultProps$O,
11667
11729
  ...props
11668
11730
  };
11669
11731
  const classPrefix2 = "nut-rate";
@@ -11820,7 +11882,7 @@ const Rate = (props) => {
11820
11882
  );
11821
11883
  };
11822
11884
  Rate.displayName = "NutRate";
11823
- const defaultProps$O = {
11885
+ const defaultProps$N = {
11824
11886
  ...ComponentDefaults,
11825
11887
  placeholder: "",
11826
11888
  shape: "square",
@@ -11862,7 +11924,7 @@ const SearchBar = (props) => {
11862
11924
  onSearch,
11863
11925
  onInputClick
11864
11926
  } = {
11865
- ...defaultProps$O,
11927
+ ...defaultProps$N,
11866
11928
  ...props
11867
11929
  };
11868
11930
  const [value, setValue] = useState(() => outerValue);
@@ -11979,7 +12041,7 @@ const SearchBar = (props) => {
11979
12041
  );
11980
12042
  };
11981
12043
  SearchBar.displayName = "NutSearchBar";
11982
- const defaultProps$N = {
12044
+ const defaultProps$M = {
11983
12045
  ...ComponentDefaults,
11984
12046
  value: "",
11985
12047
  visible: false,
@@ -12016,7 +12078,7 @@ const InternalShortPassword = (props, ref) => {
12016
12078
  onCloseIconClick,
12017
12079
  ...rest
12018
12080
  } = {
12019
- ...defaultProps$N,
12081
+ ...defaultProps$M,
12020
12082
  ...props
12021
12083
  };
12022
12084
  const classPrefix2 = "nut-shortpassword";
@@ -12076,7 +12138,7 @@ const InternalShortPassword = (props, ref) => {
12076
12138
  );
12077
12139
  };
12078
12140
  const ShortPassword = React__default.forwardRef(InternalShortPassword);
12079
- const defaultProps$M = {
12141
+ const defaultProps$L = {
12080
12142
  ...ComponentDefaults,
12081
12143
  canvasId: "spcanvas",
12082
12144
  type: "png",
@@ -12095,7 +12157,7 @@ const InternalSignature = (props, ref) => {
12095
12157
  onClear,
12096
12158
  ...rest
12097
12159
  } = {
12098
- ...defaultProps$M,
12160
+ ...defaultProps$L,
12099
12161
  ...props
12100
12162
  };
12101
12163
  const classPrefix2 = `nut-signature`;
@@ -12252,7 +12314,7 @@ const Signature = React__default.forwardRef(
12252
12314
  InternalSignature
12253
12315
  );
12254
12316
  Signature.displayName = "NutSignature";
12255
- const defaultProps$L = {
12317
+ const defaultProps$K = {
12256
12318
  ...ComponentDefaults,
12257
12319
  disabled: false,
12258
12320
  activeText: "",
@@ -12270,7 +12332,7 @@ const Switch = (props) => {
12270
12332
  onChange,
12271
12333
  ...rest
12272
12334
  } = {
12273
- ...defaultProps$L,
12335
+ ...defaultProps$K,
12274
12336
  ...props
12275
12337
  };
12276
12338
  const classPrefix2 = "nut-switch";
@@ -12298,7 +12360,7 @@ const Switch = (props) => {
12298
12360
  );
12299
12361
  };
12300
12362
  Switch.displayName = "NutSwitch";
12301
- const defaultProps$K = {
12363
+ const defaultProps$J = {
12302
12364
  ...ComponentDefaults,
12303
12365
  defaultValue: "",
12304
12366
  showCount: false,
@@ -12326,7 +12388,7 @@ const TextArea = (props) => {
12326
12388
  onBlur,
12327
12389
  onFocus,
12328
12390
  ...rest
12329
- } = { ...defaultProps$K, ...props };
12391
+ } = { ...defaultProps$J, ...props };
12330
12392
  const classPrefix2 = "nut-textarea";
12331
12393
  const compositionRef = useRef(false);
12332
12394
  const format2 = (value2) => {
@@ -12469,10 +12531,12 @@ class UploaderTaro extends Upload {
12469
12531
  uploadTaro(uploadFile2, env) {
12470
12532
  var _a;
12471
12533
  const options = this.options;
12534
+ if (options.beforeXhrUpload) {
12535
+ options.beforeXhrUpload(uploadFile2, options);
12536
+ return;
12537
+ }
12472
12538
  if (env === "WEB") {
12473
12539
  this.upload();
12474
- } else if (options.beforeXhrUpload) {
12475
- options.beforeXhrUpload(uploadFile2, options);
12476
12540
  } else {
12477
12541
  const uploadTask = uploadFile2({
12478
12542
  url: options.url,
@@ -12556,7 +12620,7 @@ class FileItem {
12556
12620
  this.formData = {};
12557
12621
  }
12558
12622
  }
12559
- const defaultProps$J = {
12623
+ const defaultProps$I = {
12560
12624
  ...ComponentDefaults,
12561
12625
  percent: 0,
12562
12626
  showText: false,
@@ -12580,7 +12644,7 @@ const Progress = (props) => {
12580
12644
  delay,
12581
12645
  ...rest
12582
12646
  } = {
12583
- ...defaultProps$J,
12647
+ ...defaultProps$I,
12584
12648
  ...props
12585
12649
  };
12586
12650
  const classPrefix2 = "nut-progress";
@@ -12789,7 +12853,7 @@ const Preview = ({
12789
12853
  );
12790
12854
  }));
12791
12855
  };
12792
- const defaultProps$I = {
12856
+ const defaultProps$H = {
12793
12857
  ...ComponentDefaults,
12794
12858
  url: "",
12795
12859
  maxCount: 1,
@@ -12864,7 +12928,7 @@ const InternalUploader = (props, ref) => {
12864
12928
  beforeXhrUpload,
12865
12929
  beforeDelete,
12866
12930
  ...restProps
12867
- } = { ...defaultProps$I, ...props };
12931
+ } = { ...defaultProps$H, ...props };
12868
12932
  const [fileList, setFileList] = usePropsValue({
12869
12933
  value,
12870
12934
  defaultValue,
@@ -13155,7 +13219,7 @@ const InternalUploader = (props, ref) => {
13155
13219
  };
13156
13220
  const Uploader = React__default.forwardRef(InternalUploader);
13157
13221
  Uploader.displayName = "NutUploader";
13158
- const defaultProps$H = {
13222
+ const defaultProps$G = {
13159
13223
  ...ComponentDefaults,
13160
13224
  visible: false,
13161
13225
  description: "",
@@ -13181,7 +13245,7 @@ const ActionSheet = (props) => {
13181
13245
  className,
13182
13246
  style,
13183
13247
  ...rest
13184
- } = { ...defaultProps$H, ...props };
13248
+ } = { ...defaultProps$G, ...props };
13185
13249
  const classPrefix2 = "nut-actionsheet";
13186
13250
  const cancelActionSheet = () => {
13187
13251
  onCancel && onCancel();
@@ -13319,7 +13383,7 @@ function useParams(args) {
13319
13383
  const params = stateRef.current;
13320
13384
  return { params, setParams };
13321
13385
  }
13322
- const defaultProps$G = {
13386
+ const defaultProps$F = {
13323
13387
  title: "",
13324
13388
  content: "",
13325
13389
  header: "",
@@ -13373,7 +13437,7 @@ const BaseDialog = (props) => {
13373
13437
  beforeClose
13374
13438
  },
13375
13439
  setParams
13376
- } = useParams({ ...defaultProps$G, ...props });
13440
+ } = useParams({ ...defaultProps$F, ...props });
13377
13441
  useCustomEvent(
13378
13442
  id,
13379
13443
  ({ status, options }) => {
@@ -13498,11 +13562,11 @@ function close$1(selector) {
13498
13562
  const path = useCustomEventsPath(selector);
13499
13563
  customEvents.trigger(path, { status: false });
13500
13564
  }
13501
- BaseDialog.defaultProps = defaultProps$G;
13565
+ BaseDialog.defaultProps = defaultProps$F;
13502
13566
  BaseDialog.displayName = "NutDialog";
13503
13567
  BaseDialog.open = open$1;
13504
13568
  BaseDialog.close = close$1;
13505
- const defaultProps$F = {
13569
+ const defaultProps$E = {
13506
13570
  ...ComponentDefaults,
13507
13571
  attract: false,
13508
13572
  direction: void 0,
@@ -13527,7 +13591,7 @@ const Drag = (props) => {
13527
13591
  style,
13528
13592
  ...reset
13529
13593
  } = {
13530
- ...defaultProps$F,
13594
+ ...defaultProps$E,
13531
13595
  ...props
13532
13596
  };
13533
13597
  const classPrefix2 = "nut-drag";
@@ -13640,7 +13704,7 @@ const defaultStatus = {
13640
13704
  error: "https://storage.360buyimg.com/imgtools/f3278d0ebb-0ce360c0-c0ac-11ee-8375-193101bb1a46.png",
13641
13705
  network: "https://storage.360buyimg.com/imgtools/43c30f7e29-0d483d10-c0ac-11ee-bec4-eb4d2a09a51d.png"
13642
13706
  };
13643
- const defaultProps$E = {
13707
+ const defaultProps$D = {
13644
13708
  ...ComponentDefaults,
13645
13709
  title: "",
13646
13710
  description: "",
@@ -13664,7 +13728,7 @@ const Empty = (props) => {
13664
13728
  actions,
13665
13729
  ...rest
13666
13730
  } = {
13667
- ...defaultProps$E,
13731
+ ...defaultProps$D,
13668
13732
  ...props
13669
13733
  };
13670
13734
  const [imgStyle, setImgStyle] = useState({});
@@ -13709,7 +13773,7 @@ const Empty = (props) => {
13709
13773
  })), children);
13710
13774
  };
13711
13775
  Empty.displayName = "NutEmpty";
13712
- const defaultProps$D = {
13776
+ const defaultProps$C = {
13713
13777
  ...ComponentDefaults,
13714
13778
  type: "default",
13715
13779
  hasMore: true,
@@ -13736,7 +13800,7 @@ const InfiniteLoading = (props) => {
13736
13800
  onScroll,
13737
13801
  ...rest
13738
13802
  } = {
13739
- ...defaultProps$D,
13803
+ ...defaultProps$C,
13740
13804
  ...props
13741
13805
  };
13742
13806
  const [isInfiniting, setIsInfiniting] = useState(false);
@@ -13850,7 +13914,7 @@ const loadingMap = {
13850
13914
  circular: D$5,
13851
13915
  spinner: I
13852
13916
  };
13853
- const defaultProps$C = {
13917
+ const defaultProps$B = {
13854
13918
  ...ComponentDefaults,
13855
13919
  // 对比一下,个人感觉还是Loading1比较好看一些,所以用它作为了默认的loading图标
13856
13920
  type: "circular",
@@ -13858,7 +13922,7 @@ const defaultProps$C = {
13858
13922
  };
13859
13923
  const Loading = (props) => {
13860
13924
  const { className, style, children, direction, icon, ...rest } = {
13861
- ...defaultProps$C,
13925
+ ...defaultProps$B,
13862
13926
  ...props
13863
13927
  };
13864
13928
  const classPrefix2 = "nut-loading";
@@ -13878,7 +13942,7 @@ const Loading = (props) => {
13878
13942
  );
13879
13943
  };
13880
13944
  Loading.displayName = "NutLoading";
13881
- const defaultProps$B = {
13945
+ const defaultProps$A = {
13882
13946
  ...ComponentDefaults,
13883
13947
  align: "left",
13884
13948
  direction: "horizontal",
@@ -13921,7 +13985,7 @@ const NoticeBar = (props) => {
13921
13985
  onClick,
13922
13986
  onItemClick
13923
13987
  } = {
13924
- ...defaultProps$B,
13988
+ ...defaultProps$A,
13925
13989
  ...props
13926
13990
  };
13927
13991
  const classPrefix2 = "nut-noticebar";
@@ -14295,7 +14359,7 @@ const NoticeBar = (props) => {
14295
14359
  ) : null);
14296
14360
  };
14297
14361
  NoticeBar.displayName = "NutNoticeBar";
14298
- const defaultProps$A = {
14362
+ const defaultProps$z = {
14299
14363
  ...ComponentDefaults,
14300
14364
  id: "",
14301
14365
  duration: 3e3,
@@ -14321,7 +14385,7 @@ const Notify = (props) => {
14321
14385
  duration,
14322
14386
  onClose,
14323
14387
  onClick
14324
- } = { ...defaultProps$A, ...props };
14388
+ } = { ...defaultProps$z, ...props };
14325
14389
  useCustomEvent(id, (status) => {
14326
14390
  status ? show2() : hide2();
14327
14391
  });
@@ -14392,11 +14456,11 @@ function close(selector) {
14392
14456
  const path = useCustomEventsPath(selector);
14393
14457
  customEvents.trigger(path, false);
14394
14458
  }
14395
- Notify.defaultProps = defaultProps$A;
14459
+ Notify.defaultProps = defaultProps$z;
14396
14460
  Notify.displayName = "NutNotify";
14397
14461
  Notify.open = open;
14398
14462
  Notify.close = close;
14399
- const defaultProps$z = {
14463
+ const defaultProps$y = {
14400
14464
  ...ComponentDefaults,
14401
14465
  list: [],
14402
14466
  theme: "light",
@@ -14441,7 +14505,7 @@ const Popover = (props) => {
14441
14505
  onSelect,
14442
14506
  ...rest
14443
14507
  } = {
14444
- ...defaultProps$z,
14508
+ ...defaultProps$y,
14445
14509
  ...props
14446
14510
  };
14447
14511
  const popoverRef = useRef(null);
@@ -14699,7 +14763,7 @@ function rubberbandIfOutOfBounds(position, min, max, dimension, constant = 0.15)
14699
14763
  return position;
14700
14764
  }
14701
14765
  const sleep = (time) => new Promise((resolve) => setTimeout(resolve, time));
14702
- const defaultProps$y = {
14766
+ const defaultProps$x = {
14703
14767
  ...ComponentDefaults,
14704
14768
  type: "default",
14705
14769
  pullingText: "",
@@ -14719,7 +14783,7 @@ const PullToRefresh = (p) => {
14719
14783
  const { locale } = useConfig$1();
14720
14784
  const touch = useTouch();
14721
14785
  const props = {
14722
- ...defaultProps$y,
14786
+ ...defaultProps$x,
14723
14787
  ...p,
14724
14788
  ...{
14725
14789
  pullingText: p.pullingText || locale.pullToRefresh.pullingText,
@@ -14837,10 +14901,9 @@ const PullToRefresh = (p) => {
14837
14901
  /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-content` }, props.children)
14838
14902
  );
14839
14903
  };
14840
- PullToRefresh.defaultProps = defaultProps$y;
14841
14904
  PullToRefresh.displayName = "NutPullToRefresh";
14842
14905
  const AvatarContext = createContext({});
14843
- const defaultProps$x = {
14906
+ const defaultProps$w = {
14844
14907
  ...ComponentDefaults,
14845
14908
  maxContent: "",
14846
14909
  max: "",
@@ -14851,7 +14914,7 @@ const defaultProps$x = {
14851
14914
  };
14852
14915
  const classPrefix$b = `nut-avatar-group`;
14853
14916
  const AvatarGroup = (props) => {
14854
- const propAvatarGroup = { ...defaultProps$x, ...props };
14917
+ const propAvatarGroup = { ...defaultProps$w, ...props };
14855
14918
  const { className, style, children } = propAvatarGroup;
14856
14919
  const avatarGroupRef = useRef(null);
14857
14920
  const cls = classNames(classPrefix$b, className);
@@ -14862,7 +14925,7 @@ const AvatarGroup = (props) => {
14862
14925
  return /* @__PURE__ */ React__default.createElement(AvatarContext.Provider, { value: parentAvatar }, /* @__PURE__ */ React__default.createElement("div", { className: cls, style, ref: avatarGroupRef }, children));
14863
14926
  };
14864
14927
  AvatarGroup.displayName = "NutAvatarGroup";
14865
- const defaultProps$w = {
14928
+ const defaultProps$v = {
14866
14929
  ...ComponentDefaults,
14867
14930
  size: "",
14868
14931
  shape: "round",
@@ -14892,7 +14955,7 @@ const Avatar = (props) => {
14892
14955
  onError,
14893
14956
  ...rest
14894
14957
  } = {
14895
- ...defaultProps$w,
14958
+ ...defaultProps$v,
14896
14959
  ...props
14897
14960
  };
14898
14961
  const [maxSum, setMaxSum] = useState(0);
@@ -14982,7 +15045,7 @@ const Avatar = (props) => {
14982
15045
  };
14983
15046
  Avatar.displayName = "NutAvatar";
14984
15047
  Avatar.Group = AvatarGroup;
14985
- const defaultProps$v = {
15048
+ const defaultProps$u = {
14986
15049
  ...ComponentDefaults,
14987
15050
  rows: 1,
14988
15051
  animated: false,
@@ -15005,7 +15068,7 @@ const Skeleton = (props) => {
15005
15068
  avatarShape,
15006
15069
  ...rest
15007
15070
  } = {
15008
- ...defaultProps$v,
15071
+ ...defaultProps$u,
15009
15072
  ...props
15010
15073
  };
15011
15074
  const classPrefix2 = "nut-skeleton";
@@ -15051,7 +15114,7 @@ function preventDefault(event, isStopPropagation) {
15051
15114
  event.stopPropagation();
15052
15115
  }
15053
15116
  }
15054
- const defaultProps$u = {
15117
+ const defaultProps$t = {
15055
15118
  ...ComponentDefaults,
15056
15119
  name: ""
15057
15120
  };
@@ -15071,7 +15134,7 @@ const Swipe = forwardRef((props, instanceRef) => {
15071
15134
  };
15072
15135
  nextTick(() => getWidth());
15073
15136
  });
15074
- const { children, className, style } = { ...defaultProps$u, ...props };
15137
+ const { children, className, style } = { ...defaultProps$t, ...props };
15075
15138
  const root2 = useRef();
15076
15139
  const opened = useRef(false);
15077
15140
  const lockClick = useRef(false);
@@ -15231,9 +15294,8 @@ const Swipe = forwardRef((props, instanceRef) => {
15231
15294
  /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-wrapper`, style: wrapperStyle }, renderActionContent("left"), children, renderActionContent("right"))
15232
15295
  );
15233
15296
  });
15234
- Swipe.defaultProps = defaultProps$u;
15235
15297
  Swipe.displayName = "NutSwipe";
15236
- const defaultProps$t = {
15298
+ const defaultProps$s = {
15237
15299
  ...ComponentDefaults,
15238
15300
  id: "",
15239
15301
  icon: null,
@@ -15282,7 +15344,7 @@ const Toast = (props) => {
15282
15344
  wordBreak
15283
15345
  },
15284
15346
  setParams
15285
- } = useParams({ ...defaultProps$t, ...props });
15347
+ } = useParams({ ...defaultProps$s, ...props });
15286
15348
  const timer = useRef(-1);
15287
15349
  const [innerVisible, setInnerVisible] = usePropsValue({
15288
15350
  value: visible,
@@ -15390,11 +15452,11 @@ function hide(selector) {
15390
15452
  const path = useCustomEventsPath(selector);
15391
15453
  customEvents.trigger(path, { status: false });
15392
15454
  }
15393
- Toast.defaultProps = defaultProps$t;
15455
+ Toast.defaultProps = defaultProps$s;
15394
15456
  Toast.displayName = "NutToast";
15395
15457
  Toast.show = show;
15396
15458
  Toast.hide = hide;
15397
- const defaultProps$s = {
15459
+ const defaultProps$r = {
15398
15460
  ...ComponentDefaults,
15399
15461
  type: "shake",
15400
15462
  action: "initial",
@@ -15405,7 +15467,7 @@ const defaultProps$s = {
15405
15467
  const classPrefix$8 = `nut-animate`;
15406
15468
  const Animate = (props) => {
15407
15469
  const { className, type: type4, action, loop, onClick, children, ...rest } = {
15408
- ...defaultProps$s,
15470
+ ...defaultProps$r,
15409
15471
  ...props
15410
15472
  };
15411
15473
  const [clicked, setClicked] = useState(false);
@@ -15427,7 +15489,7 @@ const Animate = (props) => {
15427
15489
  return /* @__PURE__ */ React__default.createElement("div", { className: "nut-animate" }, /* @__PURE__ */ React__default.createElement("div", { className: cls, onClick: handleClick, ...rest }, children));
15428
15490
  };
15429
15491
  Animate.displayName = "NutAnimate";
15430
- const defaultProps$r = {
15492
+ const defaultProps$q = {
15431
15493
  ...ComponentDefaults,
15432
15494
  length: 0,
15433
15495
  value: "",
@@ -15446,7 +15508,7 @@ const CountUp = (props) => {
15446
15508
  style,
15447
15509
  ...reset
15448
15510
  } = {
15449
- ...defaultProps$r,
15511
+ ...defaultProps$q,
15450
15512
  ...props
15451
15513
  };
15452
15514
  const classPrefix2 = "nut-countup";
@@ -15520,9 +15582,9 @@ const CountUp = (props) => {
15520
15582
  );
15521
15583
  })));
15522
15584
  };
15523
- CountUp.defaultProps = defaultProps$r;
15585
+ CountUp.defaultProps = defaultProps$q;
15524
15586
  CountUp.displayName = "NutCountUp";
15525
- const defaultProps$q = {};
15587
+ const defaultProps$p = {};
15526
15588
  const _AnimatingNumbers = class _AnimatingNumbers extends Component {
15527
15589
  constructor(props) {
15528
15590
  super(props);
@@ -15532,12 +15594,12 @@ const _AnimatingNumbers = class _AnimatingNumbers extends Component {
15532
15594
  return /* @__PURE__ */ React__default.createElement("div", { className: "nut-animatingnumbers" });
15533
15595
  }
15534
15596
  };
15535
- _AnimatingNumbers.defaultProps = defaultProps$q;
15597
+ _AnimatingNumbers.defaultProps = defaultProps$p;
15536
15598
  _AnimatingNumbers.displayName = "NutAnimatingNumbers";
15537
15599
  _AnimatingNumbers.CountUp = CountUp;
15538
15600
  let AnimatingNumbers = _AnimatingNumbers;
15539
15601
  AnimatingNumbers.CountUp = CountUp;
15540
- const defaultProps$p = {
15602
+ const defaultProps$o = {
15541
15603
  ...ComponentDefaults,
15542
15604
  className: "",
15543
15605
  url: "",
@@ -15581,7 +15643,7 @@ const Audio = (props) => {
15581
15643
  iconFontClassName,
15582
15644
  ...rest
15583
15645
  } = {
15584
- ...defaultProps$p,
15646
+ ...defaultProps$o,
15585
15647
  ...props
15586
15648
  };
15587
15649
  const [playing, setPlaying] = useState(false);
@@ -15600,19 +15662,19 @@ const Audio = (props) => {
15600
15662
  audioCtx.autoplay = autoplay || false;
15601
15663
  audioCtx.loop = loop || false;
15602
15664
  audioCtx.onPause(() => {
15603
- props.onPause && props.onPause(audioCtx);
15665
+ onPause == null ? void 0 : onPause(audioCtx);
15604
15666
  });
15605
15667
  audioCtx.onEnded(() => {
15606
- if (props.loop) {
15668
+ if (loop) {
15607
15669
  console.warn(locale.audio.tips || "onPlayEnd事件在loop=false时才会触发");
15608
15670
  } else {
15609
- props.onPlayEnd && props.onPlayEnd(audioCtx);
15671
+ onPlayEnd == null ? void 0 : onPlayEnd(audioCtx);
15610
15672
  }
15611
15673
  });
15612
15674
  audioCtx.onPlay(() => {
15613
15675
  const { duration } = audioCtx;
15614
15676
  setTotalSeconds(Math.floor(duration));
15615
- props.onPlay && props.onPlay(audioCtx);
15677
+ onPlay == null ? void 0 : onPlay(audioCtx);
15616
15678
  });
15617
15679
  audioCtx.onCanplay(() => {
15618
15680
  const intervalID = setInterval(function() {
@@ -15622,7 +15684,7 @@ const Audio = (props) => {
15622
15684
  }
15623
15685
  }, 500);
15624
15686
  setIsCanPlay(true);
15625
- props.onCanPlay && props.onCanPlay(audioCtx);
15687
+ onCanPlay == null ? void 0 : onCanPlay(audioCtx);
15626
15688
  });
15627
15689
  audioCtx.onTimeUpdate(() => {
15628
15690
  const time = parseInt(`${audioCtx.currentTime}`);
@@ -15654,14 +15716,14 @@ const Audio = (props) => {
15654
15716
  statusRef.current.currentTime = Math.max(currentTime - 1, 0);
15655
15717
  setCurrentDuration(formatSeconds(statusRef.current.currentTime.toString()));
15656
15718
  audioCtx.seek(statusRef.current.currentTime);
15657
- props.onFastBack && props.onFastBack(audioCtx);
15719
+ onFastBack == null ? void 0 : onFastBack(audioCtx);
15658
15720
  };
15659
15721
  const handleForward = () => {
15660
15722
  const currentTime = Math.floor(audioCtx.currentTime);
15661
15723
  statusRef.current.currentTime = Math.min(currentTime + 1, audioCtx.duration);
15662
15724
  setCurrentDuration(formatSeconds(statusRef.current.currentTime.toString()));
15663
15725
  audioCtx.seek(statusRef.current.currentTime);
15664
- props.onForward && props.onForward(audioCtx);
15726
+ onForward == null ? void 0 : onForward(audioCtx);
15665
15727
  };
15666
15728
  const handleStatusChange = () => {
15667
15729
  setPlaying(!playing);
@@ -15745,9 +15807,8 @@ const Audio = (props) => {
15745
15807
  };
15746
15808
  return /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2} ${className}`, style, ...rest }, renderAudio());
15747
15809
  };
15748
- Audio.defaultProps = defaultProps$p;
15749
15810
  Audio.displayName = "NutAudio";
15750
- const defaultProps$o = {
15811
+ const defaultProps$n = {
15751
15812
  ...ComponentDefaults,
15752
15813
  strokeWidth: 5,
15753
15814
  radius: 50,
@@ -15771,7 +15832,7 @@ const CircleProgress = (props) => {
15771
15832
  strokeLinecap,
15772
15833
  ...restProps
15773
15834
  } = {
15774
- ...defaultProps$o,
15835
+ ...defaultProps$n,
15775
15836
  ...props
15776
15837
  };
15777
15838
  const oldValue = useRef(percent);
@@ -15871,7 +15932,7 @@ const collapseContext = {
15871
15932
  rotate: 180
15872
15933
  };
15873
15934
  const CollapseContext = createContext(collapseContext);
15874
- const defaultProps$n = {
15935
+ const defaultProps$m = {
15875
15936
  ...ComponentDefaults,
15876
15937
  title: null,
15877
15938
  name: "",
@@ -15892,7 +15953,7 @@ const CollapseItem = (props) => {
15892
15953
  className,
15893
15954
  ...rest
15894
15955
  } = {
15895
- ...defaultProps$n,
15956
+ ...defaultProps$m,
15896
15957
  ...props
15897
15958
  };
15898
15959
  const classPrefix2 = "nut-collapse-item";
@@ -16005,7 +16066,7 @@ const CollapseItem = (props) => {
16005
16066
  ));
16006
16067
  };
16007
16068
  CollapseItem.displayName = "NutCollapseItem";
16008
- const defaultProps$m = {
16069
+ const defaultProps$l = {
16009
16070
  ...ComponentDefaults,
16010
16071
  defaultActiveName: [],
16011
16072
  accordion: false,
@@ -16024,7 +16085,7 @@ const Collapse = (props) => {
16024
16085
  rotate,
16025
16086
  onChange
16026
16087
  } = {
16027
- ...defaultProps$m,
16088
+ ...defaultProps$l,
16028
16089
  ...props
16029
16090
  };
16030
16091
  const classPrefix2 = "nut-collapse";
@@ -16083,7 +16144,7 @@ const Collapse = (props) => {
16083
16144
  };
16084
16145
  Collapse.displayName = "NutCollapse";
16085
16146
  Collapse.Item = CollapseItem;
16086
- const defaultProps$l = {
16147
+ const defaultProps$k = {
16087
16148
  ...ComponentDefaults,
16088
16149
  paused: false,
16089
16150
  startTime: Date.now(),
@@ -16115,7 +16176,7 @@ const InternalCountDown = (props, ref) => {
16115
16176
  onUpdate,
16116
16177
  children,
16117
16178
  ...rest
16118
- } = { ...defaultProps$l, ...props };
16179
+ } = { ...defaultProps$k, ...props };
16119
16180
  const classPrefix2 = "nut-countdown";
16120
16181
  const [restTimeStamp, setRestTime] = useState(0);
16121
16182
  const stateRef = useRef({
@@ -16320,7 +16381,7 @@ const CountDown = React__default.forwardRef(
16320
16381
  InternalCountDown
16321
16382
  );
16322
16383
  CountDown.displayName = "NutCountDown";
16323
- const defaultProps$k = {
16384
+ const defaultProps$j = {
16324
16385
  ...ComponentDefaults,
16325
16386
  content: "",
16326
16387
  direction: "end",
@@ -16348,7 +16409,7 @@ const Ellipsis = (props) => {
16348
16409
  onClick,
16349
16410
  onChange,
16350
16411
  ...rest
16351
- } = { ...defaultProps$k, ...props };
16412
+ } = { ...defaultProps$j, ...props };
16352
16413
  const maxHeight = useRef(0);
16353
16414
  const [exceeded, setExceeded] = useState(false);
16354
16415
  const [expanded, setExpanded] = useState(false);
@@ -16640,7 +16701,7 @@ const Ellipsis = (props) => {
16640
16701
  ));
16641
16702
  };
16642
16703
  Ellipsis.displayName = "NutEllipsis";
16643
- const defaultProps$j = {
16704
+ const defaultProps$i = {
16644
16705
  total: 3,
16645
16706
  current: 0,
16646
16707
  direction: "horizontal"
@@ -16648,7 +16709,7 @@ const defaultProps$j = {
16648
16709
  const classPrefix$5 = `nut-indicator`;
16649
16710
  const Indicator = (props) => {
16650
16711
  const { total, current, children, className, direction, ...rest } = {
16651
- ...defaultProps$j,
16712
+ ...defaultProps$i,
16652
16713
  ...props
16653
16714
  };
16654
16715
  const classes = classNames({
@@ -16672,7 +16733,7 @@ const Indicator = (props) => {
16672
16733
  return /* @__PURE__ */ React__default.createElement("div", { className: classNames(classPrefix$5, classes, className), ...rest }, renderElement());
16673
16734
  };
16674
16735
  Indicator.displayName = "NutIndicator";
16675
- const defaultProps$i = {
16736
+ const defaultProps$h = {
16676
16737
  direction: "horizontal",
16677
16738
  indicator: false,
16678
16739
  autoPlay: false,
@@ -16697,7 +16758,7 @@ const Swiper = forwardRef((props, ref) => {
16697
16758
  style,
16698
16759
  ...rest
16699
16760
  } = {
16700
- ...defaultProps$i,
16761
+ ...defaultProps$h,
16701
16762
  ...props
16702
16763
  };
16703
16764
  const [current, setCurrent] = useState(defaultValue);
@@ -16808,17 +16869,11 @@ const Swiper = forwardRef((props, ref) => {
16808
16869
  renderIndicator()
16809
16870
  );
16810
16871
  });
16811
- Swiper.defaultProps = defaultProps$i;
16812
16872
  Swiper.displayName = "NutSwiper";
16813
- const defaultProps$h = {
16814
- itemId: "",
16815
- skipHiddenItemLayout: false
16816
- };
16817
16873
  const SwiperItem = (props) => {
16818
16874
  const { children, ...rest } = props;
16819
16875
  return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, children);
16820
16876
  };
16821
- SwiperItem.defaultProps = defaultProps$h;
16822
16877
  SwiperItem.displayName = "NutSwiperItem";
16823
16878
  const InnerSwiper = Swiper;
16824
16879
  InnerSwiper.Item = SwiperItem;
@@ -17550,10 +17605,6 @@ const Table = (props) => {
17550
17605
  });
17551
17606
  };
17552
17607
  const renderBodyTds = (item, rowIndex) => {
17553
- const { rowRender } = item;
17554
- if (rowRender && typeof rowRender === "function") {
17555
- return rowRender(item, rowIndex);
17556
- }
17557
17608
  return sortDataItem().map(([value, render]) => {
17558
17609
  return /* @__PURE__ */ React__default.createElement(
17559
17610
  "div",
@@ -17572,7 +17623,12 @@ const Table = (props) => {
17572
17623
  };
17573
17624
  const renderBodyTrs = () => {
17574
17625
  return innerValue.map((item, index) => {
17575
- return /* @__PURE__ */ React__default.createElement("div", { className: bodyClassPrefix, key: index }, renderBodyTds(item, index));
17626
+ const inner = renderBodyTds(item, index);
17627
+ const { rowRender } = item;
17628
+ if (rowRender && typeof rowRender === "function") {
17629
+ return rowRender(item, index, { inner });
17630
+ }
17631
+ return /* @__PURE__ */ React__default.createElement("div", { className: bodyClassPrefix, key: index }, inner);
17576
17632
  });
17577
17633
  };
17578
17634
  return /* @__PURE__ */ React__default.createElement("div", { className: cls, ...rest }, /* @__PURE__ */ React__default.createElement(