@nutui/nutui-react 2.0.0-alpha.11 → 2.0.0-alpha.12

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 (86) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/esm/ActionSheet/style/style.css +1 -1
  3. package/dist/esm/ActionSheet.js +28 -37
  4. package/dist/esm/CountDown/style/style.css +1 -1
  5. package/dist/esm/CountDown.js +20 -15
  6. package/dist/esm/Ellipsis/style/style.css +1 -1
  7. package/dist/esm/SearchBar/style/style.css +1 -1
  8. package/dist/esm/SearchBar.js +33 -87
  9. package/dist/esm/ShortPassword/style/style.css +1 -1
  10. package/dist/esm/ShortPassword.js +65 -133
  11. package/dist/esm/Toast/style/style.css +1 -1
  12. package/dist/esm/Toast.js +86 -102
  13. package/dist/esm/VirtualList/style/style.css +1 -1
  14. package/dist/esm/VirtualList.js +29 -25
  15. package/dist/esm/types/src/packages/actionsheet/actionsheet.d.ts +11 -15
  16. package/dist/esm/types/src/packages/actionsheet/actionsheet.taro.d.ts +11 -15
  17. package/dist/esm/types/src/packages/actionsheet/index.d.ts +1 -0
  18. package/dist/esm/types/src/packages/actionsheet/index.taro.d.ts +1 -0
  19. package/dist/esm/types/src/packages/configprovider/configprovider.d.ts +2 -1
  20. package/dist/esm/types/src/packages/configprovider/configprovider.taro.d.ts +2 -1
  21. package/dist/esm/types/src/packages/configprovider/index.d.ts +1 -0
  22. package/dist/esm/types/src/packages/configprovider/index.taro.d.ts +1 -0
  23. package/dist/esm/types/src/packages/configprovider/types.d.ts +1 -0
  24. package/dist/esm/types/src/packages/countdown/countdown.d.ts +5 -4
  25. package/dist/esm/types/src/packages/countdown/countdown.taro.d.ts +5 -4
  26. package/dist/esm/types/src/packages/countdown/index.d.ts +1 -0
  27. package/dist/esm/types/src/packages/countdown/index.taro.d.ts +1 -0
  28. package/dist/esm/types/src/packages/ellipsis/ellipsis.taro.d.ts +1 -0
  29. package/dist/esm/types/src/packages/searchbar/index.d.ts +1 -0
  30. package/dist/esm/types/src/packages/searchbar/index.taro.d.ts +1 -0
  31. package/dist/esm/types/src/packages/searchbar/searchbar.d.ts +4 -31
  32. package/dist/esm/types/src/packages/searchbar/searchbar.taro.d.ts +4 -31
  33. package/dist/esm/types/src/packages/shortpassword/index.d.ts +1 -0
  34. package/dist/esm/types/src/packages/shortpassword/index.taro.d.ts +1 -0
  35. package/dist/esm/types/src/packages/shortpassword/shortpassword.d.ts +17 -20
  36. package/dist/esm/types/src/packages/shortpassword/shortpassword.taro.d.ts +17 -20
  37. package/dist/esm/types/src/packages/toast/Notification.d.ts +9 -13
  38. package/dist/esm/types/src/packages/toast/index.d.ts +1 -0
  39. package/dist/esm/types/src/packages/toast/index.taro.d.ts +1 -0
  40. package/dist/esm/types/src/packages/toast/toast.d.ts +19 -26
  41. package/dist/esm/types/src/packages/toast/toast.taro.d.ts +9 -11
  42. package/dist/esm/types/src/packages/virtuallist/index.d.ts +1 -0
  43. package/dist/esm/types/src/packages/virtuallist/index.taro.d.ts +1 -0
  44. package/dist/esm/types/src/packages/virtuallist/type.d.ts +0 -18
  45. package/dist/esm/types/src/packages/virtuallist/utils.d.ts +3 -3
  46. package/dist/esm/types/src/packages/virtuallist/virtuallist.d.ts +15 -4
  47. package/dist/esm/types/src/packages/virtuallist/virtuallist.taro.d.ts +13 -14
  48. package/dist/locales/base.js +1 -1
  49. package/dist/locales/en-US.js +1 -1
  50. package/dist/locales/id-ID.js +1 -1
  51. package/dist/locales/tr-TR.js +10 -2
  52. package/dist/locales/zh-CN.js +1 -1
  53. package/dist/locales/zh-TW.js +1 -1
  54. package/dist/locales/zh-UG.js +1 -1
  55. package/dist/nutui.react.es.js +442 -512
  56. package/dist/nutui.react.umd.js +442 -512
  57. package/dist/packages/actionsheet/actionsheet.scss +26 -73
  58. package/dist/packages/countdown/countdown.scss +2 -0
  59. package/dist/packages/ellipsis/ellipsis.scss +4 -0
  60. package/dist/packages/searchbar/searchbar.scss +13 -71
  61. package/dist/packages/shortpassword/shortpassword.scss +1 -88
  62. package/dist/packages/toast/toast.scss +20 -7
  63. package/dist/packages/virtuallist/virtuallist.scss +0 -12
  64. package/dist/style.css +1 -1
  65. package/dist/style.mjs +1 -1
  66. package/dist/styles/variables-jmapp.scss +56 -60
  67. package/dist/styles/variables.scss +30 -53
  68. package/dist/types/packages/actionsheet/actionsheet.d.ts +11 -15
  69. package/dist/types/packages/actionsheet/index.d.ts +1 -0
  70. package/dist/types/packages/configprovider/configprovider.d.ts +2 -1
  71. package/dist/types/packages/configprovider/index.d.ts +1 -0
  72. package/dist/types/packages/configprovider/types.d.ts +1 -0
  73. package/dist/types/packages/countdown/countdown.d.ts +5 -4
  74. package/dist/types/packages/countdown/index.d.ts +1 -0
  75. package/dist/types/packages/searchbar/index.d.ts +1 -0
  76. package/dist/types/packages/searchbar/searchbar.d.ts +4 -31
  77. package/dist/types/packages/shortpassword/index.d.ts +1 -0
  78. package/dist/types/packages/shortpassword/shortpassword.d.ts +17 -20
  79. package/dist/types/packages/toast/Notification.d.ts +9 -13
  80. package/dist/types/packages/toast/index.d.ts +1 -0
  81. package/dist/types/packages/toast/toast.d.ts +19 -26
  82. package/dist/types/packages/virtuallist/index.d.ts +1 -0
  83. package/dist/types/packages/virtuallist/type.d.ts +0 -18
  84. package/dist/types/packages/virtuallist/utils.d.ts +3 -3
  85. package/dist/types/packages/virtuallist/virtuallist.d.ts +15 -4
  86. package/package.json +1 -1
@@ -9,7 +9,7 @@ var __publicField = (obj, key, value) => {
9
9
  return value;
10
10
  };
11
11
  /*!
12
- * @nutui/nutui-react v2.0.0-alpha.11 Wed May 24 2023 16:40:03 GMT+0800 (China Standard Time)
12
+ * @nutui/nutui-react v2.0.0-alpha.12 Fri May 26 2023 15:23:48 GMT+0800 (China Standard Time)
13
13
  * (c) 2023 @jdf2e.
14
14
  * Released under the MIT License.
15
15
  */
@@ -725,7 +725,7 @@ Check the top-level render call using <` + t + ">.");
725
725
  process.env.NODE_ENV === "production" ? h.exports = ur() : h.exports = sr();
726
726
  })(ir);
727
727
  const lr = D.Fragment, cr = D.jsx, vr = D.jsxs;
728
- const a$w = {
728
+ const a$x = {
729
729
  className: "",
730
730
  style: void 0,
731
731
  name: "ArrowDown2",
@@ -734,7 +734,7 @@ Check the top-level render call using <` + t + ">.");
734
734
  onClick: () => {
735
735
  }
736
736
  }, y$9 = (h) => {
737
- const { className: r, style: d, name: e, color: p, width: m, height: w, onClick: n } = { ...a$w, ...h }, f = (t) => {
737
+ const { className: r, style: d, name: e, color: p, width: m, height: w, onClick: n } = { ...a$x, ...h }, f = (t) => {
738
738
  n && n(t);
739
739
  }, c = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", g = () => {
740
740
  const t = "nut-icon";
@@ -771,8 +771,8 @@ Check the top-level render call using <` + t + ">.");
771
771
  }
772
772
  ) });
773
773
  };
774
- y$9.defaultProps = a$w;
775
- const a$v = {
774
+ y$9.defaultProps = a$x;
775
+ const a$w = {
776
776
  className: "",
777
777
  style: void 0,
778
778
  name: "ArrowUp2",
@@ -780,8 +780,8 @@ Check the top-level render call using <` + t + ">.");
780
780
  height: "",
781
781
  onClick: () => {
782
782
  }
783
- }, x$g = (h) => {
784
- const { className: o, style: p, name: e, color: d, width: m, height: f, onClick: n } = { ...a$v, ...h }, g = (t) => {
783
+ }, x$h = (h) => {
784
+ const { className: o, style: p, name: e, color: d, width: m, height: f, onClick: n } = { ...a$w, ...h }, g = (t) => {
785
785
  n && n(t);
786
786
  }, i = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", w = () => {
787
787
  const t = "nut-icon";
@@ -818,8 +818,8 @@ Check the top-level render call using <` + t + ">.");
818
818
  }
819
819
  ) });
820
820
  };
821
- x$g.defaultProps = a$v;
822
- const a$u = {
821
+ x$h.defaultProps = a$w;
822
+ const a$v = {
823
823
  className: "",
824
824
  style: void 0,
825
825
  name: "CheckChecked",
@@ -828,7 +828,7 @@ Check the top-level render call using <` + t + ">.");
828
828
  onClick: () => {
829
829
  }
830
830
  }, y$8 = (h) => {
831
- const { className: r, style: d, name: e, color: p, width: m, height: f, onClick: o } = { ...a$u, ...h }, C = (t) => {
831
+ const { className: r, style: d, name: e, color: p, width: m, height: f, onClick: o } = { ...a$v, ...h }, C = (t) => {
832
832
  o && o(t);
833
833
  }, i = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", k2 = () => {
834
834
  const t = "nut-icon";
@@ -876,8 +876,8 @@ Check the top-level render call using <` + t + ">.");
876
876
  }
877
877
  ) });
878
878
  };
879
- y$8.defaultProps = a$u;
880
- const a$t = {
879
+ y$8.defaultProps = a$v;
880
+ const a$u = {
881
881
  className: "",
882
882
  style: void 0,
883
883
  name: "CheckDisabled",
@@ -885,8 +885,8 @@ Check the top-level render call using <` + t + ">.");
885
885
  height: "",
886
886
  onClick: () => {
887
887
  }
888
- }, x$f = (h) => {
889
- const { className: i, style: d, name: e, color: m, width: p, height: f, onClick: o } = { ...a$t, ...h }, g = (t) => {
888
+ }, x$g = (h) => {
889
+ const { className: i, style: d, name: e, color: m, width: p, height: f, onClick: o } = { ...a$u, ...h }, g = (t) => {
890
890
  o && o(t);
891
891
  }, r = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", C = () => {
892
892
  const t = "nut-icon";
@@ -923,8 +923,8 @@ Check the top-level render call using <` + t + ">.");
923
923
  }
924
924
  ) });
925
925
  };
926
- x$f.defaultProps = a$t;
927
- const a$s = {
926
+ x$g.defaultProps = a$u;
927
+ const a$t = {
928
928
  className: "",
929
929
  style: void 0,
930
930
  name: "CheckNormal",
@@ -933,7 +933,7 @@ Check the top-level render call using <` + t + ">.");
933
933
  onClick: () => {
934
934
  }
935
935
  }, N = (h) => {
936
- const { className: o, style: m, name: e, color: d, width: p, height: C, onClick: r } = { ...a$s, ...h }, f = (t) => {
936
+ const { className: o, style: m, name: e, color: d, width: p, height: C, onClick: r } = { ...a$t, ...h }, f = (t) => {
937
937
  r && r(t);
938
938
  }, n = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", g = () => {
939
939
  const t = "nut-icon";
@@ -970,8 +970,8 @@ Check the top-level render call using <` + t + ">.");
970
970
  }
971
971
  ) });
972
972
  };
973
- N.defaultProps = a$s;
974
- const a$r = {
973
+ N.defaultProps = a$t;
974
+ const a$s = {
975
975
  className: "",
976
976
  style: void 0,
977
977
  name: "Check",
@@ -979,8 +979,8 @@ Check the top-level render call using <` + t + ">.");
979
979
  height: "",
980
980
  onClick: () => {
981
981
  }
982
- }, x$e = (h) => {
983
- const { className: o, style: d, name: e, color: p, width: m, height: f, onClick: r } = { ...a$r, ...h }, g = (t) => {
982
+ }, x$f = (h) => {
983
+ const { className: o, style: d, name: e, color: p, width: m, height: f, onClick: r } = { ...a$s, ...h }, g = (t) => {
984
984
  r && r(t);
985
985
  }, n = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", C = () => {
986
986
  const t = "nut-icon";
@@ -1017,8 +1017,8 @@ Check the top-level render call using <` + t + ">.");
1017
1017
  }
1018
1018
  ) });
1019
1019
  };
1020
- x$e.defaultProps = a$r;
1021
- const a$q = {
1020
+ x$f.defaultProps = a$s;
1021
+ const a$r = {
1022
1022
  className: "",
1023
1023
  style: void 0,
1024
1024
  name: "Checked",
@@ -1026,8 +1026,8 @@ Check the top-level render call using <` + t + ">.");
1026
1026
  height: "",
1027
1027
  onClick: () => {
1028
1028
  }
1029
- }, x$d = (h) => {
1030
- const { className: o, style: d, name: e, color: m, width: p, height: C, onClick: r } = { ...a$q, ...h }, f = (t) => {
1029
+ }, x$e = (h) => {
1030
+ const { className: o, style: d, name: e, color: m, width: p, height: C, onClick: r } = { ...a$r, ...h }, f = (t) => {
1031
1031
  r && r(t);
1032
1032
  }, n = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", g = () => {
1033
1033
  const t = "nut-icon";
@@ -1064,8 +1064,8 @@ Check the top-level render call using <` + t + ">.");
1064
1064
  }
1065
1065
  ) });
1066
1066
  };
1067
- x$d.defaultProps = a$q;
1068
- const a$p = {
1067
+ x$e.defaultProps = a$r;
1068
+ const a$q = {
1069
1069
  className: "",
1070
1070
  style: void 0,
1071
1071
  name: "Checklist",
@@ -1073,8 +1073,8 @@ Check the top-level render call using <` + t + ">.");
1073
1073
  height: "",
1074
1074
  onClick: () => {
1075
1075
  }
1076
- }, x$c = (h) => {
1077
- const { className: i, style: d, name: e, color: p, width: m, height: f, onClick: o } = { ...a$p, ...h }, g = (t) => {
1076
+ }, x$d = (h) => {
1077
+ const { className: i, style: d, name: e, color: p, width: m, height: f, onClick: o } = { ...a$q, ...h }, g = (t) => {
1078
1078
  o && o(t);
1079
1079
  }, r = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", k2 = () => {
1080
1080
  const t = "nut-icon";
@@ -1111,8 +1111,8 @@ Check the top-level render call using <` + t + ">.");
1111
1111
  }
1112
1112
  ) });
1113
1113
  };
1114
- x$c.defaultProps = a$p;
1115
- const a$o = {
1114
+ x$d.defaultProps = a$q;
1115
+ const a$p = {
1116
1116
  className: "",
1117
1117
  style: void 0,
1118
1118
  name: "CircleClose",
@@ -1120,8 +1120,8 @@ Check the top-level render call using <` + t + ">.");
1120
1120
  height: "",
1121
1121
  onClick: () => {
1122
1122
  }
1123
- }, x$b = (h) => {
1124
- const { className: l2, style: m, name: e, color: d, width: p, height: C, onClick: o } = { ...a$o, ...h }, f = (t) => {
1123
+ }, x$c = (h) => {
1124
+ const { className: l2, style: m, name: e, color: d, width: p, height: C, onClick: o } = { ...a$p, ...h }, f = (t) => {
1125
1125
  o && o(t);
1126
1126
  }, r = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", g = () => {
1127
1127
  const t = "nut-icon";
@@ -1158,8 +1158,8 @@ Check the top-level render call using <` + t + ">.");
1158
1158
  }
1159
1159
  ) });
1160
1160
  };
1161
- x$b.defaultProps = a$o;
1162
- const a$n = {
1161
+ x$c.defaultProps = a$p;
1162
+ const a$o = {
1163
1163
  className: "",
1164
1164
  style: void 0,
1165
1165
  name: "Close",
@@ -1167,8 +1167,8 @@ Check the top-level render call using <` + t + ">.");
1167
1167
  height: "",
1168
1168
  onClick: () => {
1169
1169
  }
1170
- }, x$a = (h) => {
1171
- const { className: o, style: d, name: e, color: m, width: p, height: f, onClick: r } = { ...a$n, ...h }, g = (t) => {
1170
+ }, x$b = (h) => {
1171
+ const { className: o, style: d, name: e, color: m, width: p, height: f, onClick: r } = { ...a$o, ...h }, g = (t) => {
1172
1172
  r && r(t);
1173
1173
  }, n = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", C = () => {
1174
1174
  const t = "nut-icon";
@@ -1205,8 +1205,8 @@ Check the top-level render call using <` + t + ">.");
1205
1205
  }
1206
1206
  ) });
1207
1207
  };
1208
- x$a.defaultProps = a$n;
1209
- const a$m = {
1208
+ x$b.defaultProps = a$o;
1209
+ const a$n = {
1210
1210
  className: "",
1211
1211
  style: void 0,
1212
1212
  name: "Del",
@@ -1215,7 +1215,7 @@ Check the top-level render call using <` + t + ">.");
1215
1215
  onClick: () => {
1216
1216
  }
1217
1217
  }, y$7 = (h) => {
1218
- const { className: o, style: d, name: e, color: m, width: p, height: f, onClick: r } = { ...a$m, ...h }, g = (t) => {
1218
+ const { className: o, style: d, name: e, color: m, width: p, height: f, onClick: r } = { ...a$n, ...h }, g = (t) => {
1219
1219
  r && r(t);
1220
1220
  }, n = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", u = () => {
1221
1221
  const t = "nut-icon";
@@ -1252,8 +1252,8 @@ Check the top-level render call using <` + t + ">.");
1252
1252
  }
1253
1253
  ) });
1254
1254
  };
1255
- y$7.defaultProps = a$m;
1256
- const a$l = {
1255
+ y$7.defaultProps = a$n;
1256
+ const a$m = {
1257
1257
  className: "",
1258
1258
  style: void 0,
1259
1259
  name: "DownArrow",
@@ -1261,8 +1261,8 @@ Check the top-level render call using <` + t + ">.");
1261
1261
  height: "",
1262
1262
  onClick: () => {
1263
1263
  }
1264
- }, x$9 = (h) => {
1265
- const { className: r, style: d, name: e, color: p, width: m, height: w, onClick: n } = { ...a$l, ...h }, f = (t) => {
1264
+ }, x$a = (h) => {
1265
+ const { className: r, style: d, name: e, color: p, width: m, height: w, onClick: n } = { ...a$m, ...h }, f = (t) => {
1266
1266
  n && n(t);
1267
1267
  }, c = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", g = () => {
1268
1268
  const t = "nut-icon";
@@ -1299,8 +1299,8 @@ Check the top-level render call using <` + t + ">.");
1299
1299
  }
1300
1300
  ) });
1301
1301
  };
1302
- x$9.defaultProps = a$l;
1303
- const a$k = {
1302
+ x$a.defaultProps = a$m;
1303
+ const a$l = {
1304
1304
  className: "",
1305
1305
  style: void 0,
1306
1306
  name: "Failure",
@@ -1308,8 +1308,8 @@ Check the top-level render call using <` + t + ">.");
1308
1308
  height: "",
1309
1309
  onClick: () => {
1310
1310
  }
1311
- }, x$8 = (h) => {
1312
- const { className: r, style: d, name: e, color: m, width: p, height: f, onClick: l2 } = { ...a$k, ...h }, u = (t) => {
1311
+ }, x$9 = (h) => {
1312
+ const { className: r, style: d, name: e, color: m, width: p, height: f, onClick: l2 } = { ...a$l, ...h }, u = (t) => {
1313
1313
  l2 && l2(t);
1314
1314
  }, i = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", g = () => {
1315
1315
  const t = "nut-icon";
@@ -1346,8 +1346,8 @@ Check the top-level render call using <` + t + ">.");
1346
1346
  }
1347
1347
  ) });
1348
1348
  };
1349
- x$8.defaultProps = a$k;
1350
- const a$j = {
1349
+ x$9.defaultProps = a$l;
1350
+ const a$k = {
1351
1351
  className: "",
1352
1352
  style: void 0,
1353
1353
  name: "ImageError",
@@ -1356,7 +1356,7 @@ Check the top-level render call using <` + t + ">.");
1356
1356
  onClick: () => {
1357
1357
  }
1358
1358
  }, k$5 = (h) => {
1359
- const { className: s, style: d, name: e, color: m, width: p, height: f, onClick: o } = { ...a$j, ...h }, g = (t) => {
1359
+ const { className: s, style: d, name: e, color: m, width: p, height: f, onClick: o } = { ...a$k, ...h }, g = (t) => {
1360
1360
  o && o(t);
1361
1361
  }, c = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", u = () => {
1362
1362
  const t = "nut-icon";
@@ -1404,8 +1404,8 @@ Check the top-level render call using <` + t + ">.");
1404
1404
  }
1405
1405
  ) });
1406
1406
  };
1407
- k$5.defaultProps = a$j;
1408
- const a$i = {
1407
+ k$5.defaultProps = a$k;
1408
+ const a$j = {
1409
1409
  className: "",
1410
1410
  style: void 0,
1411
1411
  name: "Image",
@@ -1414,7 +1414,7 @@ Check the top-level render call using <` + t + ">.");
1414
1414
  onClick: () => {
1415
1415
  }
1416
1416
  }, k$4 = (h) => {
1417
- const { className: l2, style: d, name: c, color: m, width: p, height: f, onClick: r } = { ...a$i, ...h }, g = (t) => {
1417
+ const { className: l2, style: d, name: c, color: m, width: p, height: f, onClick: r } = { ...a$j, ...h }, g = (t) => {
1418
1418
  r && r(t);
1419
1419
  }, o = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", u = () => {
1420
1420
  const t = "nut-icon";
@@ -1462,7 +1462,54 @@ Check the top-level render call using <` + t + ">.");
1462
1462
  }
1463
1463
  ) });
1464
1464
  };
1465
- k$4.defaultProps = a$i;
1465
+ k$4.defaultProps = a$j;
1466
+ const a$i = {
1467
+ className: "",
1468
+ style: void 0,
1469
+ name: "Issue",
1470
+ width: "",
1471
+ height: "",
1472
+ onClick: () => {
1473
+ }
1474
+ }, x$8 = (h) => {
1475
+ const { className: o, style: m, name: s, color: d, width: p, height: f, onClick: r } = { ...a$i, ...h }, u = (t) => {
1476
+ r && r(t);
1477
+ }, n = (t) => t === "" ? "" : isNaN(Number(t)) ? String(t) : t + "px", g = () => {
1478
+ const t = "nut-icon";
1479
+ return classNames({
1480
+ [`${o}`]: o,
1481
+ [t]: true,
1482
+ [t + "-" + s]: s
1483
+ });
1484
+ }, e = {}, i = n(p || ""), l2 = n(f || "");
1485
+ i && (e.width = i), l2 && (e.height = l2);
1486
+ const C = () => ({
1487
+ ...m,
1488
+ ...e
1489
+ });
1490
+ return /* @__PURE__ */ cr(lr, { children: /* @__PURE__ */ cr(
1491
+ "svg",
1492
+ {
1493
+ className: g(),
1494
+ style: C(),
1495
+ onClick: u,
1496
+ xmlns: "http://www.w3.org/2000/svg",
1497
+ color: d,
1498
+ viewBox: "0 0 1024 1024",
1499
+ "aria-labelledby": s,
1500
+ role: "presentation",
1501
+ children: /* @__PURE__ */ cr(
1502
+ "path",
1503
+ {
1504
+ d: "M512 1024C229.831 1024 0 794.169 0 512S229.831 0 512 0s512 229.831 512 512-229.831 512-512 512zm0-955.733C266.24 68.267 68.267 266.24 68.267 512S266.24 955.733 512 955.733 955.733 757.76 955.733 512 757.76 68.267 512 68.267zm31.858 377.742c18.204 0 34.133 15.929 34.133 34.133 0 2.276 0 15.93-2.275 18.205l-34.134 195.697h29.582c18.205 0 34.134 15.93 34.134 34.134s-15.93 34.133-34.134 34.133h-91.022c-18.204 0-34.133-15.929-34.133-34.133v-20.48L480.142 512H450.56c-18.204 0-34.133-15.929-34.133-34.133s15.929-34.134 34.133-34.134h93.298zm-34.134-207.076c38.685 0 68.267 29.583 68.267 68.267s-29.582 68.267-68.267 68.267-68.266-29.583-68.266-68.267 29.582-68.267 68.266-68.267z",
1505
+ fill: "currentColor",
1506
+ fillOpacity: "0.9"
1507
+ }
1508
+ )
1509
+ }
1510
+ ) });
1511
+ };
1512
+ x$8.defaultProps = a$i;
1466
1513
  const a$h = {
1467
1514
  className: "",
1468
1515
  style: void 0,
@@ -2457,7 +2504,7 @@ Check the top-level render call using <` + t + ">.");
2457
2504
  onClick: (event) => {
2458
2505
  }
2459
2506
  };
2460
- const classPrefix$i = "nut-cell";
2507
+ const classPrefix$j = "nut-cell";
2461
2508
  const Cell = (props) => {
2462
2509
  const {
2463
2510
  children,
@@ -2488,19 +2535,19 @@ Check the top-level render call using <` + t + ">.");
2488
2535
  return /* @__PURE__ */ React.createElement(
2489
2536
  "div",
2490
2537
  {
2491
- className: classNames(classPrefix$i, className),
2538
+ className: classNames(classPrefix$j, className),
2492
2539
  onClick: (event) => handleClick2(event),
2493
2540
  style: baseStyle,
2494
2541
  ...rest
2495
2542
  },
2496
- children || /* @__PURE__ */ React.createElement(React.Fragment, null, title || description ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$i}__left` }, title ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$i}__title` }, title) : null, description ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$i}__description` }, description) : null) : null, extra ? /* @__PURE__ */ React.createElement(
2543
+ children || /* @__PURE__ */ React.createElement(React.Fragment, null, title || description ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$j}__left` }, title ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$j}__title` }, title) : null, description ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$j}__description` }, description) : null) : null, extra ? /* @__PURE__ */ React.createElement(
2497
2544
  "div",
2498
2545
  {
2499
- className: `${classPrefix$i}__extra`,
2546
+ className: `${classPrefix$j}__extra`,
2500
2547
  style: styles
2501
2548
  },
2502
2549
  extra
2503
- ) : null, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$i}__divider` }))
2550
+ ) : null, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$j}__divider` }))
2504
2551
  );
2505
2552
  };
2506
2553
  Cell.defaultProps = defaultProps$1r;
@@ -2511,16 +2558,16 @@ Check the top-level render call using <` + t + ">.");
2511
2558
  description: "",
2512
2559
  divider: true
2513
2560
  };
2514
- const classPrefix$h = "nut-cell-group";
2561
+ const classPrefix$i = "nut-cell-group";
2515
2562
  const CellGroup = (props) => {
2516
2563
  const { children, className, style, title, description, divider, ...rest } = {
2517
2564
  ...defaultProps$1q,
2518
2565
  ...props
2519
2566
  };
2520
- return /* @__PURE__ */ React.createElement("div", { className: classNames(classPrefix$h, className), ...rest }, title ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$h}__title` }, title) : null, description ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$h}__description` }, description) : null, /* @__PURE__ */ React.createElement(
2567
+ return /* @__PURE__ */ React.createElement("div", { className: classNames(classPrefix$i, className), ...rest }, title ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$i}__title` }, title) : null, description ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$i}__description` }, description) : null, /* @__PURE__ */ React.createElement(
2521
2568
  "div",
2522
2569
  {
2523
- className: `${classPrefix$h}__wrap ${divider ? `${classPrefix$h}__wrap--divider` : ""}`
2570
+ className: `${classPrefix$i}__wrap ${divider ? `${classPrefix$i}__wrap--divider` : ""}`
2524
2571
  },
2525
2572
  children
2526
2573
  ));
@@ -2997,7 +3044,7 @@ Check the top-level render call using <` + t + ">.");
2997
3044
  loading: true,
2998
3045
  lazy: false
2999
3046
  };
3000
- const classPrefix$g = "nut-image";
3047
+ const classPrefix$h = "nut-image";
3001
3048
  const Image$1 = (props) => {
3002
3049
  const {
3003
3050
  className,
@@ -3108,7 +3155,7 @@ Check the top-level render call using <` + t + ">.");
3108
3155
  return /* @__PURE__ */ React.createElement(
3109
3156
  "div",
3110
3157
  {
3111
- className: classNames(classPrefix$g, className),
3158
+ className: classNames(classPrefix$h, className),
3112
3159
  style: containerStyle,
3113
3160
  onClick: (e) => {
3114
3161
  imageClick(e);
@@ -3274,21 +3321,21 @@ Check the top-level render call using <` + t + ">.");
3274
3321
  contentPosition: "center",
3275
3322
  direction: "horizontal"
3276
3323
  };
3277
- const classPrefix$f = `nut-divider`;
3324
+ const classPrefix$g = `nut-divider`;
3278
3325
  const Divider = (props) => {
3279
3326
  const { children, contentPosition, style, className, direction, ...rest } = {
3280
3327
  ...defaultProps$1m,
3281
3328
  ...props
3282
3329
  };
3283
3330
  const classes = direction === "horizontal" ? classNames({
3284
- [`${classPrefix$f}`]: true,
3285
- [`${classPrefix$f}__center`]: children,
3286
- [`${classPrefix$f}__left`]: contentPosition === "left",
3287
- [`${classPrefix$f}__right`]: contentPosition === "right",
3288
- [`${classPrefix$f}__hairline`]: true
3331
+ [`${classPrefix$g}`]: true,
3332
+ [`${classPrefix$g}__center`]: children,
3333
+ [`${classPrefix$g}__left`]: contentPosition === "left",
3334
+ [`${classPrefix$g}__right`]: contentPosition === "right",
3335
+ [`${classPrefix$g}__hairline`]: true
3289
3336
  }) : classNames({
3290
- [`${classPrefix$f}`]: true,
3291
- [`${classPrefix$f}__vertical`]: direction === "vertical"
3337
+ [`${classPrefix$g}`]: true,
3338
+ [`${classPrefix$g}__vertical`]: direction === "vertical"
3292
3339
  });
3293
3340
  return /* @__PURE__ */ React.createElement("div", { className: `${classes} ${className || ""}`, style, ...rest }, children);
3294
3341
  };
@@ -3446,7 +3493,7 @@ Check the top-level render call using <` + t + ">.");
3446
3493
  };
3447
3494
  Layout.defaultProps = defaultProps$1j;
3448
3495
  Layout.displayName = "NutLayout";
3449
- const classPrefix$e = "nut-row";
3496
+ const classPrefix$f = "nut-row";
3450
3497
  const defaultProps$1i = {
3451
3498
  ...ComponentDefaults,
3452
3499
  type: "",
@@ -3481,7 +3528,7 @@ Check the top-level render call using <` + t + ">.");
3481
3528
  ${getClass("justify", justify)}
3482
3529
  ${getClass("align", align)}
3483
3530
  ${getClass("flex", wrap)}
3484
- ${classPrefix$e}
3531
+ ${classPrefix$f}
3485
3532
  `;
3486
3533
  };
3487
3534
  const parentRow = {
@@ -3580,7 +3627,7 @@ Check the top-level render call using <` + t + ">.");
3580
3627
  threshold: 0,
3581
3628
  zIndex: 2e3
3582
3629
  };
3583
- const classPrefix$d = "nut-sticky";
3630
+ const classPrefix$e = "nut-sticky";
3584
3631
  const Sticky = (props) => {
3585
3632
  const {
3586
3633
  position,
@@ -3702,7 +3749,7 @@ Check the top-level render call using <` + t + ">.");
3702
3749
  {
3703
3750
  ref: rootRef,
3704
3751
  style: { ...style, ...rootStyle },
3705
- className: classNames(classPrefix$d, className),
3752
+ className: classNames(classPrefix$e, className),
3706
3753
  ...rest
3707
3754
  },
3708
3755
  /* @__PURE__ */ React.createElement("div", { className: "nut-sticky--box", ref: stickyRef, style: stickyStyle }, children)
@@ -7112,7 +7159,7 @@ Please add \`${key}Action\` when creating your handler.`);
7112
7159
  ctrl.ref = ref;
7113
7160
  }
7114
7161
  }
7115
- const config$1 = {
7162
+ const config$2 = {
7116
7163
  default: {
7117
7164
  tension: 170,
7118
7165
  friction: 26
@@ -7138,7 +7185,7 @@ Please add \`${key}Action\` when creating your handler.`);
7138
7185
  friction: 120
7139
7186
  }
7140
7187
  };
7141
- const defaults = _extends$2({}, config$1.default, {
7188
+ const defaults = _extends$2({}, config$2.default, {
7142
7189
  mass: 1,
7143
7190
  damping: 1,
7144
7191
  easing: easings.linear,
@@ -10322,7 +10369,7 @@ Please add \`${key}Action\` when creating your handler.`);
10322
10369
  element.setAttribute("class", replaceClassName(element.className && element.className.baseVal || "", className));
10323
10370
  }
10324
10371
  }
10325
- const config = {
10372
+ const config$1 = {
10326
10373
  disabled: false
10327
10374
  };
10328
10375
  var timeoutsShape = process.env.NODE_ENV !== "production" ? propTypesExports.oneOfType([propTypesExports.number, propTypesExports.shape({
@@ -10456,7 +10503,7 @@ Please add \`${key}Action\` when creating your handler.`);
10456
10503
  var _ref2 = this.props.nodeRef ? [appearing] : [ReactDOM.findDOMNode(this), appearing], maybeNode = _ref2[0], maybeAppearing = _ref2[1];
10457
10504
  var timeouts2 = this.getTimeouts();
10458
10505
  var enterTimeout = appearing ? timeouts2.appear : timeouts2.enter;
10459
- if (!mounting && !enter || config.disabled) {
10506
+ if (!mounting && !enter || config$1.disabled) {
10460
10507
  this.safeSetState({
10461
10508
  status: ENTERED
10462
10509
  }, function() {
@@ -10483,7 +10530,7 @@ Please add \`${key}Action\` when creating your handler.`);
10483
10530
  var exit = this.props.exit;
10484
10531
  var timeouts2 = this.getTimeouts();
10485
10532
  var maybeNode = this.props.nodeRef ? void 0 : ReactDOM.findDOMNode(this);
10486
- if (!exit || config.disabled) {
10533
+ if (!exit || config$1.disabled) {
10487
10534
  this.safeSetState({
10488
10535
  status: EXITED
10489
10536
  }, function() {
@@ -11164,7 +11211,7 @@ Please add \`${key}Action\` when creating your handler.`);
11164
11211
  };
11165
11212
  const renderIcon = () => {
11166
11213
  if (closeable) {
11167
- return /* @__PURE__ */ React.createElement("div", { className: closeClasses, onClick: onHandleClickCloseIcon }, React.isValidElement(closeIcon) ? closeIcon : /* @__PURE__ */ React.createElement(x$a, { width: 12, height: 12 }));
11214
+ return /* @__PURE__ */ React.createElement("div", { className: closeClasses, onClick: onHandleClickCloseIcon }, React.isValidElement(closeIcon) ? closeIcon : /* @__PURE__ */ React.createElement(x$b, { width: 12, height: 12 }));
11168
11215
  }
11169
11216
  return null;
11170
11217
  };
@@ -11554,7 +11601,7 @@ Please add \`${key}Action\` when creating your handler.`);
11554
11601
  duration: 300,
11555
11602
  autoHeight: false
11556
11603
  };
11557
- const classPrefix$c = "nut-tabs";
11604
+ const classPrefix$d = "nut-tabs";
11558
11605
  const Tabs = (props) => {
11559
11606
  const {
11560
11607
  activeColor,
@@ -11648,14 +11695,14 @@ Please add \`${key}Action\` when creating your handler.`);
11648
11695
  }
11649
11696
  }, [children]);
11650
11697
  const classes = classNames(
11651
- classPrefix$c,
11652
- `${classPrefix$c}--${direction}`,
11698
+ classPrefix$d,
11699
+ `${classPrefix$d}--${direction}`,
11653
11700
  className
11654
11701
  );
11655
- const classesTitle = classNames(`${classPrefix$c}__titles`, {
11656
- [`${classPrefix$c}__titles--${activeType}`]: activeType,
11657
- [`${classPrefix$c}__titles--scrollable`]: true,
11658
- [`${classPrefix$c}__titles--${align}`]: align
11702
+ const classesTitle = classNames(`${classPrefix$d}__titles`, {
11703
+ [`${classPrefix$d}__titles--${activeType}`]: activeType,
11704
+ [`${classPrefix$d}__titles--scrollable`]: true,
11705
+ [`${classPrefix$d}__titles--${align}`]: align
11659
11706
  });
11660
11707
  const tabsActiveStyle = {
11661
11708
  color: activeType === "smile" ? activeColor : "",
@@ -11685,7 +11732,7 @@ Please add \`${key}Action\` when creating your handler.`);
11685
11732
  onClick: () => {
11686
11733
  tabChange(item);
11687
11734
  },
11688
- className: classNames(`${classPrefix$c}__titles-item`, {
11735
+ className: classNames(`${classPrefix$d}__titles-item`, {
11689
11736
  [`nut-tabs__titles-item--active`]: !item.disabled && String(item.value) === String(value),
11690
11737
  [`nut-tabs__titles-item--disabled`]: item.disabled,
11691
11738
  [`nut-tabs__titles-item--${align}`]: align
@@ -11696,14 +11743,14 @@ Please add \`${key}Action\` when creating your handler.`);
11696
11743
  activeType === "line" && /* @__PURE__ */ React.createElement(
11697
11744
  "div",
11698
11745
  {
11699
- className: `${classPrefix$c}__titles-item__line`,
11746
+ className: `${classPrefix$d}__titles-item__line`,
11700
11747
  style: tabsActiveStyle
11701
11748
  }
11702
11749
  ),
11703
11750
  activeType === "smile" && /* @__PURE__ */ React.createElement(
11704
11751
  "div",
11705
11752
  {
11706
- className: `${classPrefix$c}__titles-item__smile`,
11753
+ className: `${classPrefix$d}__titles-item__smile`,
11707
11754
  style: tabsActiveStyle
11708
11755
  },
11709
11756
  /* @__PURE__ */ React.createElement(x$7, { color: activeColor, width: 40, height: 20 })
@@ -11715,13 +11762,13 @@ Please add \`${key}Action\` when creating your handler.`);
11715
11762
  {
11716
11763
  ellipsis: true
11717
11764
  },
11718
- `${classPrefix$c}__titles-item__text`
11765
+ `${classPrefix$d}__titles-item__text`
11719
11766
  )
11720
11767
  },
11721
11768
  item.title
11722
11769
  )
11723
11770
  );
11724
- })), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$c}__content__wrap` }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$c}__content`, style: contentStyle }, React.Children.map(children, (child, idx) => {
11771
+ })), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$d}__content__wrap` }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$d}__content`, style: contentStyle }, React.Children.map(children, (child, idx) => {
11725
11772
  if (!React.isValidElement(child)) {
11726
11773
  return null;
11727
11774
  }
@@ -12174,7 +12221,7 @@ Please add \`${key}Action\` when creating your handler.`);
12174
12221
  }
12175
12222
  },
12176
12223
  selectedRegion && selectedRegion[tabName[tabIndex]].id === item.id && /* @__PURE__ */ React.createElement(
12177
- x$e,
12224
+ x$f,
12178
12225
  {
12179
12226
  className: b("region-item--icon"),
12180
12227
  color: "var(--nutui-brand-color)",
@@ -12334,7 +12381,7 @@ Please add \`${key}Action\` when creating your handler.`);
12334
12381
  onSwitch && onSwitch({ type: privateType });
12335
12382
  };
12336
12383
  const headerRender = () => {
12337
- return /* @__PURE__ */ React.createElement("div", { className: b("header") }, /* @__PURE__ */ React.createElement("div", { className: "arrow-back", onClick: onSwitchModule }, privateType === "custom" && (React.isValidElement(backBtnIcon) ? backBtnIcon : /* @__PURE__ */ React.createElement(y$6, { color: "#cccccc" }))), /* @__PURE__ */ React.createElement("div", { className: b("header__title") }, privateType === "custom" ? customAddressTitle || locale.address.selectRegion : existAddressTitle || locale.address.deliveryTo), /* @__PURE__ */ React.createElement("div", { onClick: () => handClose() }, React.isValidElement(closeBtnIcon) ? closeBtnIcon : /* @__PURE__ */ React.createElement(x$b, { width: 18, height: 18, color: "#ccc" })));
12384
+ return /* @__PURE__ */ React.createElement("div", { className: b("header") }, /* @__PURE__ */ React.createElement("div", { className: "arrow-back", onClick: onSwitchModule }, privateType === "custom" && (React.isValidElement(backBtnIcon) ? backBtnIcon : /* @__PURE__ */ React.createElement(y$6, { color: "#cccccc" }))), /* @__PURE__ */ React.createElement("div", { className: b("header__title") }, privateType === "custom" ? customAddressTitle || locale.address.selectRegion : existAddressTitle || locale.address.deliveryTo), /* @__PURE__ */ React.createElement("div", { onClick: () => handClose() }, React.isValidElement(closeBtnIcon) ? closeBtnIcon : /* @__PURE__ */ React.createElement(x$c, { width: 18, height: 18, color: "#ccc" })));
12338
12385
  };
12339
12386
  React.useEffect(() => {
12340
12387
  setShowPopup(modelValue);
@@ -12386,7 +12433,7 @@ Please add \`${key}Action\` when creating your handler.`);
12386
12433
  {
12387
12434
  type: privateType,
12388
12435
  existAddress,
12389
- selectedIcon: React.isValidElement(selectedIcon) ? selectedIcon : /* @__PURE__ */ React.createElement(x$e, { color: "#FA2C19" }),
12436
+ selectedIcon: React.isValidElement(selectedIcon) ? selectedIcon : /* @__PURE__ */ React.createElement(x$f, { color: "#FA2C19" }),
12390
12437
  defaultIcon: React.isValidElement(defaultIcon) ? defaultIcon : /* @__PURE__ */ React.createElement(x$5, null),
12391
12438
  isShowCustomAddress,
12392
12439
  customAndExistTitle: customAndExistTitle || locale.address.chooseAnotherAddress,
@@ -13317,7 +13364,7 @@ Please add \`${key}Action\` when creating your handler.`);
13317
13364
  return activeIcon;
13318
13365
  }
13319
13366
  return /* @__PURE__ */ React.createElement(
13320
- x$c,
13367
+ x$d,
13321
13368
  {
13322
13369
  className: `${checked ? `${classPrefix2}__icon-check` : ""}`
13323
13370
  }
@@ -13794,7 +13841,7 @@ Please add \`${key}Action\` when creating your handler.`);
13794
13841
  },
13795
13842
  options: []
13796
13843
  };
13797
- const classPrefix$b = "nut-checkboxgroup";
13844
+ const classPrefix$c = "nut-checkboxgroup";
13798
13845
  const CheckboxGroup = React.forwardRef(
13799
13846
  (props, ref) => {
13800
13847
  const { children } = { ...defaultProps$Z, ...props };
@@ -13876,7 +13923,7 @@ Please add \`${key}Action\` when creating your handler.`);
13876
13923
  /* @__PURE__ */ React.createElement(
13877
13924
  "div",
13878
13925
  {
13879
- className: classNames(classPrefix$b, className, {
13926
+ className: classNames(classPrefix$c, className, {
13880
13927
  [`nut-checkboxgroup--${props.direction}`]: props.direction
13881
13928
  }),
13882
13929
  ...rest
@@ -13898,7 +13945,7 @@ Please add \`${key}Action\` when creating your handler.`);
13898
13945
  onChange: (value) => {
13899
13946
  }
13900
13947
  };
13901
- const classPrefix$a = "nut-checkbox";
13948
+ const classPrefix$b = "nut-checkbox";
13902
13949
  const Checkbox = (props) => {
13903
13950
  const { children } = {
13904
13951
  ...defaultProps$Y,
@@ -13954,28 +14001,28 @@ Please add \`${key}Action\` when creating your handler.`);
13954
14001
  return React.isValidElement(icon) ? icon : /* @__PURE__ */ React.createElement(N, { className: color() });
13955
14002
  }
13956
14003
  if (innerIndeterminate) {
13957
- return React.isValidElement(indeterminateIcon) ? indeterminateIcon : /* @__PURE__ */ React.createElement(x$f, { className: color() });
14004
+ return React.isValidElement(indeterminateIcon) ? indeterminateIcon : /* @__PURE__ */ React.createElement(x$g, { className: color() });
13958
14005
  }
13959
- return React.isValidElement(activeIcon) ? activeIcon : /* @__PURE__ */ React.createElement(x$d, { className: color() });
14006
+ return React.isValidElement(activeIcon) ? activeIcon : /* @__PURE__ */ React.createElement(x$e, { className: color() });
13960
14007
  };
13961
14008
  const color = () => {
13962
14009
  if (innerDisabled) {
13963
- return `${classPrefix$a}__icon--disable`;
14010
+ return `${classPrefix$b}__icon--disable`;
13964
14011
  }
13965
14012
  if (innerChecked) {
13966
14013
  if (innerIndeterminate) {
13967
- return `${classPrefix$a}__icon--indeterminate`;
14014
+ return `${classPrefix$b}__icon--indeterminate`;
13968
14015
  }
13969
- return `${classPrefix$a}__icon`;
14016
+ return `${classPrefix$b}__icon`;
13970
14017
  }
13971
- return `${classPrefix$a}__icon--unchecked`;
14018
+ return `${classPrefix$b}__icon--unchecked`;
13972
14019
  };
13973
14020
  const renderLabel = () => {
13974
14021
  return /* @__PURE__ */ React.createElement(
13975
14022
  "span",
13976
14023
  {
13977
- className: classNames(`${classPrefix$a}__label `, {
13978
- [`${classPrefix$a}__label--disabled`]: innerDisabled
14024
+ className: classNames(`${classPrefix$b}__label `, {
14025
+ [`${classPrefix$b}__label--disabled`]: innerDisabled
13979
14026
  })
13980
14027
  },
13981
14028
  children || label
@@ -13994,8 +14041,8 @@ Please add \`${key}Action\` when creating your handler.`);
13994
14041
  return /* @__PURE__ */ React.createElement(
13995
14042
  "div",
13996
14043
  {
13997
- className: classNames(classPrefix$a, className, {
13998
- [`${classPrefix$a}--reverse`]: labelPosition === "left"
14044
+ className: classNames(classPrefix$b, className, {
14045
+ [`${classPrefix$b}--reverse`]: labelPosition === "left"
13999
14046
  }),
14000
14047
  ...rest,
14001
14048
  onClick: handleClick2
@@ -14556,7 +14603,7 @@ Please add \`${key}Action\` when creating your handler.`);
14556
14603
  ...props
14557
14604
  };
14558
14605
  const { locale } = useConfig();
14559
- const [show, setShow] = React.useState(false);
14606
+ const [show2, setShow] = React.useState(false);
14560
14607
  const [currentDate, setCurrentDate] = React.useState(modelValue);
14561
14608
  const [defaultValue, setDefaultValue] = React.useState([]);
14562
14609
  const [options2, setListData] = React.useState([]);
@@ -14817,7 +14864,7 @@ Please add \`${key}Action\` when creating your handler.`);
14817
14864
  Picker$1,
14818
14865
  {
14819
14866
  title,
14820
- visible: show,
14867
+ visible: show2,
14821
14868
  options: options2,
14822
14869
  onClose: onCloseDatePicker,
14823
14870
  defaultValue,
@@ -16419,7 +16466,7 @@ Please add \`${key}Action\` when creating your handler.`);
16419
16466
  digits: 0,
16420
16467
  async: false
16421
16468
  };
16422
- const classPrefix$9 = `nut-inputnumber`;
16469
+ const classPrefix$a = `nut-inputnumber`;
16423
16470
  const InputNumber = (props) => {
16424
16471
  const {
16425
16472
  children,
@@ -16462,8 +16509,8 @@ Please add \`${key}Action\` when creating your handler.`);
16462
16509
  }, []);
16463
16510
  const classes = classNames(
16464
16511
  {
16465
- [`${classPrefix$9}`]: true,
16466
- [`${classPrefix$9}--disabled`]: disabled
16512
+ [`${classPrefix$a}`]: true,
16513
+ [`${classPrefix$a}--disabled`]: disabled
16467
16514
  },
16468
16515
  className
16469
16516
  );
@@ -16754,7 +16801,7 @@ Please add \`${key}Action\` when creating your handler.`);
16754
16801
  })
16755
16802
  },
16756
16803
  /* @__PURE__ */ React.createElement("div", { className: "nut-menu__title-text" }, finallyTitle()),
16757
- icon || (direction === "up" ? /* @__PURE__ */ React.createElement(x$g, { className: "nut-menu__title-icon" }) : /* @__PURE__ */ React.createElement(y$9, { className: "nut-menu__title-icon" }))
16804
+ icon || (direction === "up" ? /* @__PURE__ */ React.createElement(x$h, { className: "nut-menu__title-icon" }) : /* @__PURE__ */ React.createElement(y$9, { className: "nut-menu__title-icon" }))
16758
16805
  )
16759
16806
  );
16760
16807
  }
@@ -16809,18 +16856,18 @@ Please add \`${key}Action\` when creating your handler.`);
16809
16856
  closeOnClickAway,
16810
16857
  children,
16811
16858
  activeColor,
16812
- show,
16859
+ show: show2,
16813
16860
  parent,
16814
16861
  index
16815
16862
  } = {
16816
16863
  ...defaultProps$Q,
16817
16864
  ...props
16818
16865
  };
16819
- const [_showPopup, setShowPopup] = React.useState(show);
16866
+ const [_showPopup, setShowPopup] = React.useState(show2);
16820
16867
  const [_value, setValue] = React.useState(value);
16821
16868
  React.useEffect(() => {
16822
- setShowPopup(show);
16823
- }, [show]);
16869
+ setShowPopup(show2);
16870
+ }, [show2]);
16824
16871
  React.useEffect(() => {
16825
16872
  getParentOffset();
16826
16873
  }, [_showPopup]);
@@ -16937,7 +16984,7 @@ Please add \`${key}Action\` when creating your handler.`);
16937
16984
  }
16938
16985
  },
16939
16986
  item.value === _value ? /* @__PURE__ */ React.createElement("i", null, icon || /* @__PURE__ */ React.createElement(
16940
- x$e,
16987
+ x$f,
16941
16988
  {
16942
16989
  color: activeColor,
16943
16990
  className: getIconCName(item.value, value)
@@ -17121,7 +17168,7 @@ Please add \`${key}Action\` when creating your handler.`);
17121
17168
  direction: "vertical",
17122
17169
  options: []
17123
17170
  };
17124
- const classPrefix$8 = "nut-radiogroup";
17171
+ const classPrefix$9 = "nut-radiogroup";
17125
17172
  const RadioGroup = React.forwardRef(
17126
17173
  (props, ref) => {
17127
17174
  const {
@@ -17177,8 +17224,8 @@ Please add \`${key}Action\` when creating your handler.`);
17177
17224
  /* @__PURE__ */ React.createElement(
17178
17225
  "div",
17179
17226
  {
17180
- className: classNames(classPrefix$8, className, {
17181
- [`${classPrefix$8}--${props.direction}`]: props.direction
17227
+ className: classNames(classPrefix$9, className, {
17228
+ [`${classPrefix$9}--${props.direction}`]: props.direction
17182
17229
  }),
17183
17230
  ...rest
17184
17231
  },
@@ -17725,15 +17772,15 @@ Please add \`${key}Action\` when creating your handler.`);
17725
17772
  disabled: false,
17726
17773
  maxLength: 9999,
17727
17774
  clearable: true,
17728
- clearSize: "12px",
17729
- align: "left",
17730
- readonly: true,
17775
+ readOnly: false,
17731
17776
  autoFocus: false,
17732
- label: "",
17733
- leftinIcon: /* @__PURE__ */ React.createElement(x$2, { width: "12", height: "12" })
17777
+ left: "",
17778
+ right: "",
17779
+ rightIn: "",
17780
+ leftIn: /* @__PURE__ */ React.createElement(x$2, { width: "12", height: "12" })
17734
17781
  };
17735
17782
  const SearchBar = (props) => {
17736
- const searchbarBem = cn("searchbar");
17783
+ const classPrefix2 = "nut-searchbar";
17737
17784
  const { locale } = useConfig();
17738
17785
  const searchRef = React.useRef(null);
17739
17786
  const [value, setValue] = React.useState(() => props.value);
@@ -17744,32 +17791,22 @@ Please add \`${key}Action\` when creating your handler.`);
17744
17791
  disabled,
17745
17792
  maxLength,
17746
17793
  clearable,
17747
- clearSize,
17748
- align,
17749
17794
  readOnly,
17750
17795
  autoFocus,
17751
- label,
17752
- actionText,
17753
- leftinIcon,
17754
- rightinIcon,
17755
- leftoutIcon,
17756
- rightoutIcon,
17796
+ right,
17797
+ left,
17798
+ leftIn,
17799
+ rightIn,
17757
17800
  onChange,
17758
17801
  onFocus,
17759
17802
  onBlur,
17760
17803
  onClear,
17761
- onCancel,
17762
17804
  onSearch,
17763
- onClickInput,
17764
- onClickLeftinIcon,
17765
- onClickLeftoutIcon,
17766
- onClickRightinIcon,
17767
- onClickRightoutIcon
17805
+ onClickInput
17768
17806
  } = {
17769
17807
  ...defaultProps$K,
17770
17808
  ...props
17771
17809
  };
17772
- const alignClass = `${align}`;
17773
17810
  const forceFocus = () => {
17774
17811
  const searchSelf = searchRef.current;
17775
17812
  searchSelf && searchSelf.focus();
@@ -17799,7 +17836,7 @@ Please add \`${key}Action\` when creating your handler.`);
17799
17836
  return /* @__PURE__ */ React.createElement(
17800
17837
  "input",
17801
17838
  {
17802
- className: `${searchbarBem("input")} ${searchbarBem(alignClass)} ${shape === "round" ? searchbarBem("round") : ""} ${clearable ? searchbarBem("input-clear") : ""}`,
17839
+ className: `${classPrefix2}__input ${shape === "round" ? `${classPrefix2}__round` : ""} ${clearable ? `${classPrefix2}__input-clear` : ""}`,
17803
17840
  ref: searchRef,
17804
17841
  style: { ...props.style },
17805
17842
  value: value || "",
@@ -17818,76 +17855,34 @@ Please add \`${key}Action\` when creating your handler.`);
17818
17855
  const clickInput = (e) => {
17819
17856
  onClickInput && onClickInput(e);
17820
17857
  };
17821
- const renderLeftinIcon = () => {
17822
- if (!leftinIcon)
17858
+ const renderLeftIn = () => {
17859
+ if (!leftIn)
17823
17860
  return null;
17824
- return /* @__PURE__ */ React.createElement(
17825
- "div",
17826
- {
17827
- className: `${searchbarBem("leftin-icon")} ${searchbarBem("icon")}`,
17828
- onClick: (e) => clickLeftIcon("in-left", e)
17829
- },
17830
- leftinIcon
17831
- );
17861
+ return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__leftin ${classPrefix2}__icon` }, leftIn);
17832
17862
  };
17833
- const renderLeftoutIcon = () => {
17834
- if (!leftoutIcon)
17863
+ const renderLeft = () => {
17864
+ if (!left)
17835
17865
  return null;
17836
- return /* @__PURE__ */ React.createElement(
17837
- "div",
17838
- {
17839
- className: `${searchbarBem("leftout-icon")}`,
17840
- onClick: (e) => clickLeftIcon("out-left", e)
17841
- },
17842
- leftoutIcon
17843
- );
17866
+ return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__left` }, left);
17844
17867
  };
17845
- const clickLeftIcon = (flag, event) => {
17846
- if (flag === "in-left") {
17847
- onClickLeftinIcon && onClickLeftinIcon(value, event);
17848
- } else {
17849
- onClickLeftoutIcon && onClickLeftoutIcon(value, event);
17850
- }
17851
- };
17852
- const renderRightinIcon = () => {
17853
- if (!rightinIcon)
17868
+ const renderRightIn = () => {
17869
+ if (!rightIn)
17854
17870
  return null;
17855
- return /* @__PURE__ */ React.createElement(
17856
- "div",
17857
- {
17858
- className: `${searchbarBem("rightin-icon")} ${searchbarBem("icon")}`,
17859
- onClick: (e) => clickRightIcon("in-right", e)
17860
- },
17861
- rightinIcon
17862
- );
17871
+ return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__rightin ${classPrefix2}__icon` }, rightIn);
17863
17872
  };
17864
- const renderRightoutIcon = () => {
17865
- if (!rightoutIcon)
17873
+ const renderRight = () => {
17874
+ if (!right)
17866
17875
  return null;
17867
- return /* @__PURE__ */ React.createElement(
17868
- "div",
17869
- {
17870
- className: `${searchbarBem("rightout-icon")}`,
17871
- onClick: (e) => clickRightIcon("out-right", e)
17872
- },
17873
- rightoutIcon
17874
- );
17875
- };
17876
- const clickRightIcon = (flag, event) => {
17877
- if (flag === "in-left") {
17878
- onClickRightinIcon && onClickRightinIcon(value, event);
17879
- } else {
17880
- onClickRightoutIcon && onClickRightoutIcon(value, event);
17881
- }
17876
+ return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__right` }, right);
17882
17877
  };
17883
17878
  const handleClear = () => {
17884
17879
  return /* @__PURE__ */ React.createElement(
17885
17880
  "div",
17886
17881
  {
17887
- className: `${searchbarBem("clear")} ${rightinIcon ? "pos-right" : ""}`,
17882
+ className: `${classPrefix2}__clear ${rightIn ? "pos-right" : ""}`,
17888
17883
  onClick: (e) => clearaVal(e)
17889
17884
  },
17890
- /* @__PURE__ */ React.createElement(x$b, { width: clearSize, height: clearSize, color: "#555" })
17885
+ /* @__PURE__ */ React.createElement(x$c, { color: "#555", width: 12, height: 12 })
17891
17886
  );
17892
17887
  };
17893
17888
  const clearaVal = (event) => {
@@ -17898,12 +17893,6 @@ Please add \`${key}Action\` when creating your handler.`);
17898
17893
  onClear && onClear(event);
17899
17894
  forceFocus();
17900
17895
  };
17901
- const renderRightLabel = () => {
17902
- if (actionText) {
17903
- return /* @__PURE__ */ React.createElement("div", { className: searchbarBem("action-text"), onClick: search }, actionText);
17904
- }
17905
- return null;
17906
- };
17907
17896
  const onKeypress = (e) => {
17908
17897
  if (e.key === "Enter") {
17909
17898
  const event = e.nativeEvent;
@@ -17913,68 +17902,28 @@ Please add \`${key}Action\` when creating your handler.`);
17913
17902
  onSearch && onSearch(value);
17914
17903
  }
17915
17904
  };
17916
- const search = () => {
17917
- onSearch && onSearch(value);
17918
- };
17919
- const renderLabel = () => {
17920
- if (label) {
17921
- return /* @__PURE__ */ React.createElement("div", { className: searchbarBem("label") }, label);
17922
- }
17923
- return null;
17924
- };
17925
17905
  return /* @__PURE__ */ React.createElement(
17926
17906
  "div",
17927
17907
  {
17928
- className: `${searchbarBem()} ${disabled ? searchbarBem("disabled") : ""} ${className || ""}`,
17929
- style: { ...props.style, background: props.background }
17908
+ className: `${classPrefix2} ${disabled ? `${classPrefix2}__disabled` : ""} ${className || ""}`,
17909
+ style: { ...props.style }
17930
17910
  },
17931
- renderLeftoutIcon(),
17932
- renderLabel(),
17933
- /* @__PURE__ */ React.createElement(
17934
- "div",
17935
- {
17936
- className: `${searchbarBem("content")}`,
17937
- style: { background: props.inputBackground }
17938
- },
17939
- renderLeftinIcon(),
17940
- renderField(),
17941
- renderRightinIcon(),
17942
- clearable && value && handleClear()
17943
- ),
17944
- renderRightoutIcon(),
17945
- renderRightLabel()
17911
+ renderLeft(),
17912
+ /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__content` }, renderLeftIn(), renderField(), renderRightIn(), clearable && value && handleClear()),
17913
+ renderRight()
17946
17914
  );
17947
17915
  };
17948
17916
  SearchBar.defaultProps = defaultProps$K;
17949
17917
  SearchBar.displayName = "NutSearchBar";
17950
17918
  const defaultProps$J = {
17951
17919
  ...ComponentDefaults,
17952
- title: "",
17953
- description: "",
17954
- tips: "",
17955
- tipsIcon: null,
17956
- iconSize: 11,
17920
+ value: "",
17957
17921
  visible: false,
17958
- modelValue: "",
17959
- errorMsg: "",
17960
- noButton: true,
17961
- closeOnClickOverlay: true,
17922
+ plain: false,
17923
+ hideFooter: true,
17962
17924
  length: 6,
17963
17925
  // 1~6
17964
- className: "",
17965
- autoFocus: false,
17966
- onChange: (value) => {
17967
- },
17968
- onOk: (value) => {
17969
- },
17970
- onCancel: () => {
17971
- },
17972
- onClose: () => {
17973
- },
17974
- onTips: () => {
17975
- },
17976
- onComplete: (value) => {
17977
- }
17926
+ autoFocus: false
17978
17927
  };
17979
17928
  const ShortPassword = (props) => {
17980
17929
  const { locale } = useConfig();
@@ -17982,86 +17931,54 @@ Please add \`${key}Action\` when creating your handler.`);
17982
17931
  title,
17983
17932
  description,
17984
17933
  tips,
17985
- tipsIcon,
17986
- iconSize,
17987
17934
  visible,
17988
- modelValue,
17989
- errorMsg: errorMsg2,
17990
- noButton,
17991
- closeOnClickOverlay,
17935
+ value,
17936
+ error,
17937
+ hideFooter,
17992
17938
  length,
17939
+ plain,
17993
17940
  style,
17994
17941
  className,
17942
+ closeable,
17943
+ autoFocus,
17944
+ onFocus,
17995
17945
  onChange,
17996
- onOk,
17946
+ onConfirm,
17997
17947
  onTips,
17998
17948
  onCancel,
17999
17949
  onClose,
18000
17950
  onComplete,
18001
- autoFocus,
18002
- ...reset
18003
- } = props;
18004
- const b = cn("shortpassword");
18005
- const textInput = React.useRef(null);
18006
- const range2 = (val) => {
18007
- return Math.min(Math.max(4, val), 6);
17951
+ onClickOverlay,
17952
+ onClickCloseIcon,
17953
+ ...rest
17954
+ } = {
17955
+ ...defaultProps$J,
17956
+ ...props
18008
17957
  };
18009
- const [innerVisible, setInnerVisible] = React.useState(visible);
18010
- const [comLen, setComLen] = React.useState(range2(Number(length)));
18011
- const [inputValue, setInputValue] = React.useState("");
17958
+ const classPrefix2 = "nut-shortpassword";
17959
+ const comLen = React.useMemo(() => {
17960
+ return Math.min(Math.max(4, length || 4), 6);
17961
+ }, [length]);
17962
+ const format2 = (val) => {
17963
+ return val.slice(0, comLen);
17964
+ };
17965
+ const [inputValue, setInputValue] = usePropsValue({ value, onChange });
18012
17966
  React.useEffect(() => {
18013
- setInnerVisible(visible);
17967
+ if (visible && autoFocus) {
17968
+ onFocus && onFocus();
17969
+ }
18014
17970
  }, [visible]);
18015
17971
  React.useEffect(() => {
18016
- if (typeof modelValue !== "undefined") {
18017
- setInputValue(modelValue);
18018
- }
18019
- }, [modelValue]);
18020
- const changeValue = (e) => {
18021
- let inputValue2 = e.target.value;
18022
- if (String(inputValue2).length > comLen) {
18023
- inputValue2 = inputValue2.slice(0, comLen);
18024
- }
18025
- setInputValue(inputValue2);
18026
- if (String(inputValue2).length === comLen) {
18027
- onComplete && onComplete(inputValue2);
18028
- }
18029
- onChange && onChange(inputValue2);
18030
- };
18031
- const systemStyle = () => {
18032
- const u = navigator.userAgent;
18033
- const isAndroid = u.indexOf("Android") > -1 || u.indexOf("Linux") > -1;
18034
- const isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
18035
- let style2 = {};
18036
- if (isIOS) {
18037
- style2 = {
18038
- paddingRight: "1200px"
18039
- };
18040
- }
18041
- if (isAndroid) {
18042
- style2 = {
18043
- opacity: 0,
18044
- zIndex: 10
18045
- };
17972
+ const val = format2(value);
17973
+ if (val.length >= comLen) {
17974
+ onComplete && onComplete(val);
18046
17975
  }
18047
- return style2;
18048
- };
18049
- const focus = () => {
18050
- if (textInput.current) {
18051
- textInput.current.focus();
18052
- }
18053
- };
17976
+ setInputValue(format2(value));
17977
+ }, [value]);
18054
17978
  const sure = () => {
18055
- onOk && onOk(inputValue);
18056
- };
18057
- const renderIcon = (size = "11px") => {
18058
- return React.isValidElement(tipsIcon) ? React.cloneElement(tipsIcon, {
18059
- ...tipsIcon.props,
18060
- width: size,
18061
- height: size
18062
- }) : /* @__PURE__ */ React.createElement(x, { width: size, height: size });
17979
+ onConfirm && onConfirm(inputValue);
18063
17980
  };
18064
- return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(
17981
+ return /* @__PURE__ */ React.createElement(
18065
17982
  Popup,
18066
17983
  {
18067
17984
  style: {
@@ -18069,28 +17986,28 @@ Please add \`${key}Action\` when creating your handler.`);
18069
17986
  borderRadius: "12px",
18070
17987
  textAlign: "center"
18071
17988
  },
18072
- visible: innerVisible,
17989
+ visible,
18073
17990
  closeable: true,
18074
- "close-on-click-overlay": closeOnClickOverlay,
18075
17991
  onClickOverlay: onClose,
18076
- onClickCloseIcon: onClose
17992
+ onClickCloseIcon: onClose,
17993
+ ...rest
18077
17994
  },
18078
- /* @__PURE__ */ React.createElement("div", { className: `${b()} ${className}`, style: { ...style }, ...reset }, /* @__PURE__ */ React.createElement("div", { className: b("title") }, title || locale.shortpassword.title), /* @__PURE__ */ React.createElement("div", { className: b("subtitle") }, description || locale.shortpassword.description), /* @__PURE__ */ React.createElement("div", { className: b("input") }, /* @__PURE__ */ React.createElement(
18079
- "input",
17995
+ /* @__PURE__ */ React.createElement("div", { className: classNames(className, classPrefix2), style }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__title` }, title || locale.shortpassword.title), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__description` }, description || locale.shortpassword.description), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__input`, onClick: onFocus }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__input-site` }), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__input-fake` }, [...new Array(comLen).keys()].map((item, index) => {
17996
+ return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__input-fake__li`, key: index }, inputValue.length > index && /* @__PURE__ */ React.createElement(React.Fragment, null, plain ? inputValue[index] : /* @__PURE__ */ React.createElement(
17997
+ "div",
17998
+ {
17999
+ className: `${classPrefix2}__input-fake__li__icon`
18000
+ }
18001
+ )));
18002
+ }))), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__message` }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__message__error` }, error), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__message__forget`, onClick: onTips }, tips || /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(x, { width: 11, height: 11, style: { marginRight: "3px" } }), locale.shortpassword.tips))), !hideFooter && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__footer` }, /* @__PURE__ */ React.createElement(
18003
+ "div",
18080
18004
  {
18081
- ref: textInput,
18082
- className: b("input-real"),
18083
- type: "number",
18084
- style: systemStyle(),
18085
- maxLength: 6,
18086
- value: inputValue,
18087
- autoFocus,
18088
- onChange: (e) => changeValue(e)
18089
- }
18090
- ), /* @__PURE__ */ React.createElement("div", { className: b("input-site") }), /* @__PURE__ */ React.createElement("div", { className: b("input-fake"), onClick: () => focus() }, [...new Array(comLen).keys()].map((item, index) => {
18091
- return /* @__PURE__ */ React.createElement("div", { className: b("input-fake__li"), key: index }, String(inputValue).length > index ? /* @__PURE__ */ React.createElement("div", { className: b("input-fake__li__icon") }) : null);
18092
- }))), /* @__PURE__ */ React.createElement("div", { className: b("message") }, /* @__PURE__ */ React.createElement("div", { className: b("message__error") }, errorMsg2), tips || locale.shortpassword.tips ? /* @__PURE__ */ React.createElement("div", { className: b("message__forget") }, renderIcon(iconSize), /* @__PURE__ */ React.createElement("div", { className: b("message__forget-tips"), onClick: onTips }, tips || locale.shortpassword.tips)) : null), !noButton ? /* @__PURE__ */ React.createElement("div", { className: b("footer") }, /* @__PURE__ */ React.createElement("div", { className: b("footer__cancel"), onClick: onCancel }, locale.cancel), /* @__PURE__ */ React.createElement("div", { className: b("footer__sure"), onClick: () => sure() }, locale.confirm)) : null)
18093
- ));
18005
+ className: `${classPrefix2}__footer__cancel`,
18006
+ onClick: onCancel
18007
+ },
18008
+ locale.cancel
18009
+ ), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__footer__sure`, onClick: sure }, locale.confirm)))
18010
+ );
18094
18011
  };
18095
18012
  ShortPassword.defaultProps = defaultProps$J;
18096
18013
  ShortPassword.displayName = "NutShortPassword";
@@ -18921,13 +18838,13 @@ Please add \`${key}Action\` when creating your handler.`);
18921
18838
  key: item.uid
18922
18839
  },
18923
18840
  previewType === "picture" && !children && /* @__PURE__ */ React.createElement("div", { className: "nut-uploader__preview-img" }, deletable && /* @__PURE__ */ React.createElement(
18924
- x$8,
18841
+ x$9,
18925
18842
  {
18926
18843
  color: "rgba(0,0,0,0.6)",
18927
18844
  className: "close",
18928
18845
  onClick: () => onDeleteItem(item, index)
18929
18846
  }
18930
- ), item.status === "ready" ? /* @__PURE__ */ React.createElement("div", { className: "nut-uploader__preview__progress" }, /* @__PURE__ */ React.createElement("div", { className: "nut-uploader__preview__progress__msg" }, item.message)) : item.status !== "success" && /* @__PURE__ */ React.createElement("div", { className: "nut-uploader__preview__progress" }, item.failIcon !== " " && item.loadingIcon !== " " && (item.status === "error" ? item.failIcon || /* @__PURE__ */ React.createElement(x$8, { color: "#fff" }) : item.loadingIcon || /* @__PURE__ */ React.createElement(
18847
+ ), item.status === "ready" ? /* @__PURE__ */ React.createElement("div", { className: "nut-uploader__preview__progress" }, /* @__PURE__ */ React.createElement("div", { className: "nut-uploader__preview__progress__msg" }, item.message)) : item.status !== "success" && /* @__PURE__ */ React.createElement("div", { className: "nut-uploader__preview__progress" }, item.failIcon !== " " && item.loadingIcon !== " " && (item.status === "error" ? item.failIcon || /* @__PURE__ */ React.createElement(x$9, { color: "#fff" }) : item.loadingIcon || /* @__PURE__ */ React.createElement(
18931
18848
  k$3,
18932
18849
  {
18933
18850
  className: "nut-icon-loading",
@@ -19021,50 +18938,40 @@ Please add \`${key}Action\` when creating your handler.`);
19021
18938
  Uploader.defaultProps = defaultProps$E;
19022
18939
  Uploader.displayName = "NutUploader";
19023
18940
  const defaultProps$D = {
19024
- cancelText: "",
19025
- optionTag: "name",
19026
- optionSubTag: "subname",
19027
- chooseTagValue: "",
18941
+ ...ComponentDefaults,
18942
+ visible: false,
19028
18943
  title: "",
19029
- color: "#ee0a24",
19030
18944
  description: "",
19031
- menuItems: [],
18945
+ options: [],
18946
+ optionKey: { name: "name", description: "description" },
18947
+ cancelText: "",
19032
18948
  onCancel: () => {
19033
18949
  },
19034
- onChoose: () => {
19035
- },
19036
- visible: false,
19037
- className: "",
19038
- style: {}
18950
+ onSelect: () => {
18951
+ }
19039
18952
  };
19040
18953
  const ActionSheet = (props) => {
19041
18954
  const {
19042
18955
  children,
19043
18956
  cancelText,
19044
- optionTag,
19045
- optionSubTag,
19046
- chooseTagValue,
18957
+ optionKey,
19047
18958
  title,
19048
- color,
19049
18959
  description,
19050
- menuItems,
18960
+ options: options2,
19051
18961
  onCancel,
19052
- onChoose,
18962
+ onSelect,
19053
18963
  visible,
19054
18964
  className,
19055
18965
  style,
19056
18966
  ...rest
19057
18967
  } = { ...defaultProps$D, ...props };
19058
- const b = cn("actionsheet");
19059
- const isHighlight = (item) => {
19060
- return props.chooseTagValue && props.chooseTagValue === item[props.optionTag || "name"] ? props.color : "$dark1";
19061
- };
18968
+ const classPrefix2 = "nut-actionsheet";
19062
18969
  const cancelActionSheet = () => {
19063
18970
  onCancel && onCancel();
19064
18971
  };
19065
18972
  const chooseItem = (item, index) => {
19066
18973
  if (!item.disable) {
19067
- onChoose && onChoose(item, index);
18974
+ onSelect && onSelect(item, index);
19068
18975
  }
19069
18976
  };
19070
18977
  return /* @__PURE__ */ React.createElement(
@@ -19077,19 +18984,25 @@ Please add \`${key}Action\` when creating your handler.`);
19077
18984
  onCancel && onCancel();
19078
18985
  }
19079
18986
  },
19080
- /* @__PURE__ */ React.createElement("div", { className: `${b()} ${className}`, style, ...rest }, title && /* @__PURE__ */ React.createElement("div", { className: b("title") }, title), description && /* @__PURE__ */ React.createElement("div", { className: `${b("item")} description` }, description), menuItems.length ? /* @__PURE__ */ React.createElement("div", { className: b("menu") }, menuItems.map((item, index) => {
18987
+ /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2} ${className}`, style, ...rest }, title && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__title` }, title), description && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__description` }, description), options2.length ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__list` }, options2.map((item, index) => {
19081
18988
  return /* @__PURE__ */ React.createElement(
19082
18989
  "div",
19083
18990
  {
19084
- className: `${b("item")} ${item.disable ? b("item-disabled") : ""}`,
19085
- style: { color: isHighlight(item) },
18991
+ className: `${classPrefix2}__item ${item.disable ? "disabled" : ""} ${item.danger ? "danger" : ""}`,
19086
18992
  key: index,
19087
18993
  onClick: () => chooseItem(item, index)
19088
18994
  },
19089
- item[optionTag],
19090
- /* @__PURE__ */ React.createElement("div", { className: "subdesc" }, item[optionSubTag])
18995
+ item[optionKey.name],
18996
+ /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}__item-description` }, item[optionKey.description])
19091
18997
  );
19092
- })) : children, cancelText && /* @__PURE__ */ React.createElement("div", { className: b("cancel"), onClick: () => cancelActionSheet() }, cancelText))
18998
+ })) : children, cancelText && /* @__PURE__ */ React.createElement(
18999
+ "div",
19000
+ {
19001
+ className: `${classPrefix2}__cancel`,
19002
+ onClick: () => cancelActionSheet()
19003
+ },
19004
+ cancelText
19005
+ ))
19093
19006
  );
19094
19007
  };
19095
19008
  ActionSheet.defaultProps = defaultProps$D;
@@ -19515,7 +19428,7 @@ Please add \`${key}Action\` when creating your handler.`);
19515
19428
  imageSize: "",
19516
19429
  status: "empty"
19517
19430
  };
19518
- const classPrefix$7 = `nut-empty`;
19431
+ const classPrefix$8 = `nut-empty`;
19519
19432
  const Empty = (props) => {
19520
19433
  const { locale } = useConfig();
19521
19434
  const {
@@ -19550,7 +19463,7 @@ Please add \`${key}Action\` when creating your handler.`);
19550
19463
  };
19551
19464
  });
19552
19465
  }, [imageSize]);
19553
- return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$7} ${className}`, ...rest }, /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$7}__image`, style: imgStyle }, imageNode), typeof description === "string" ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$7}__description` }, description || locale.noData) : description, children));
19466
+ return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$8} ${className}`, ...rest }, /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$8}__image`, style: imgStyle }, imageNode), typeof description === "string" ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$8}__description` }, description || locale.noData) : description, children));
19554
19467
  };
19555
19468
  Empty.defaultProps = defaultProps$A;
19556
19469
  Empty.displayName = "NutEmpty";
@@ -20070,7 +19983,7 @@ Please add \`${key}Action\` when creating your handler.`);
20070
19983
  },
20071
19984
  children,
20072
19985
  content
20073
- )), closeable || rightIcon ? /* @__PURE__ */ React.createElement("div", { className: "right-icon", onClick: onClickIcon }, rightIcon || /* @__PURE__ */ React.createElement(x$a, { width: 12, height: 12 })) : null) : null, showNoticeBar && scrollList.current.length > 0 && isVertical ? /* @__PURE__ */ React.createElement(
19986
+ )), closeable || rightIcon ? /* @__PURE__ */ React.createElement("div", { className: "right-icon", onClick: onClickIcon }, rightIcon || /* @__PURE__ */ React.createElement(x$b, { width: 12, height: 12 })) : null) : null, showNoticeBar && scrollList.current.length > 0 && isVertical ? /* @__PURE__ */ React.createElement(
20074
19987
  "div",
20075
19988
  {
20076
19989
  className: "nut-noticebar-vertical",
@@ -20117,13 +20030,13 @@ Please add \`${key}Action\` when creating your handler.`);
20117
20030
  handleClickIcon(e);
20118
20031
  }
20119
20032
  },
20120
- rightIcon || (closeable ? /* @__PURE__ */ React.createElement(x$a, { width: 12, height: 12 }) : null)
20033
+ rightIcon || (closeable ? /* @__PURE__ */ React.createElement(x$b, { width: 12, height: 12 }) : null)
20121
20034
  )
20122
20035
  ) : null);
20123
20036
  };
20124
20037
  NoticeBar.defaultProps = defaultProps$y;
20125
20038
  NoticeBar.displayName = "NutNoticeBar";
20126
- const classPrefix$6 = "nut-notify";
20039
+ const classPrefix$7 = "nut-notify";
20127
20040
  let Notification$1 = (_a = class extends React__namespace.PureComponent {
20128
20041
  constructor(props) {
20129
20042
  super(props);
@@ -20172,17 +20085,17 @@ Please add \`${key}Action\` when creating your handler.`);
20172
20085
  }
20173
20086
  render() {
20174
20087
  const { style, message, type: type2, className, position } = this.props;
20175
- const { show } = this.state;
20088
+ const { show: show2 } = this.state;
20176
20089
  const classes = classNames({
20177
- [`${classPrefix$6}--popup-top`]: position === "top",
20178
- [`${classPrefix$6}--popup-bottom`]: position === "bottom",
20179
- [`${classPrefix$6}`]: true,
20180
- [`${classPrefix$6}--${type2}`]: true
20090
+ [`${classPrefix$7}--popup-top`]: position === "top",
20091
+ [`${classPrefix$7}--popup-bottom`]: position === "bottom",
20092
+ [`${classPrefix$7}`]: true,
20093
+ [`${classPrefix$7}--${type2}`]: true
20181
20094
  });
20182
20095
  return /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement(
20183
20096
  CSSTransition$1,
20184
20097
  {
20185
- in: show,
20098
+ in: show2,
20186
20099
  timeout: 300,
20187
20100
  classNames: "fade",
20188
20101
  unmountOnExit: true,
@@ -20657,7 +20570,7 @@ Please add \`${key}Action\` when creating your handler.`);
20657
20570
  src: "",
20658
20571
  alt: ""
20659
20572
  };
20660
- const classPrefix$5 = `nut-avatar`;
20573
+ const classPrefix$6 = `nut-avatar`;
20661
20574
  const Avatar = (props) => {
20662
20575
  var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
20663
20576
  const {
@@ -20689,7 +20602,7 @@ Please add \`${key}Action\` when creating your handler.`);
20689
20602
  [`nut-avatar-${((_a2 = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _a2.size) || size || "normal"}`]: true,
20690
20603
  [`nut-avatar-${((_b = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _b.shape) || shape}`]: true
20691
20604
  });
20692
- const cls = classNames(classPrefix$5, classes, className);
20605
+ const cls = classNames(classPrefix$6, classes, className);
20693
20606
  const styles = {
20694
20607
  width: sizeValue.indexOf(size) > -1 ? "" : `${size}px`,
20695
20608
  height: sizeValue.indexOf(size) > -1 ? "" : `${size}px`,
@@ -21005,6 +20918,7 @@ Please add \`${key}Action\` when creating your handler.`);
21005
20918
  });
21006
20919
  Swipe.defaultProps = defaultProps$t;
21007
20920
  Swipe.displayName = "NutSwipe";
20921
+ const classPrefix$5 = "nut-toast";
21008
20922
  class Notification extends React__namespace.PureComponent {
21009
20923
  constructor(props) {
21010
20924
  super(props);
@@ -21034,11 +20948,33 @@ Please add \`${key}Action\` when creating your handler.`);
21034
20948
  }
21035
20949
  }
21036
20950
  clickCover() {
21037
- const { closeOnClickOverlay } = this.props;
21038
- if (closeOnClickOverlay) {
20951
+ const { closeOnOverlayClick } = this.props;
20952
+ if (closeOnOverlayClick) {
21039
20953
  this.close();
21040
20954
  }
21041
20955
  }
20956
+ renderIcon() {
20957
+ const { icon } = this.props;
20958
+ if (typeof icon === "string") {
20959
+ let iconNode = null;
20960
+ switch (icon) {
20961
+ case "success":
20962
+ iconNode = /* @__PURE__ */ React__namespace.createElement(x$f, null);
20963
+ break;
20964
+ case "loading":
20965
+ iconNode = /* @__PURE__ */ React__namespace.createElement(k$3, { className: "nut-icon-loading" });
20966
+ break;
20967
+ case "fail":
20968
+ iconNode = /* @__PURE__ */ React__namespace.createElement(x$9, null);
20969
+ break;
20970
+ case "warn":
20971
+ iconNode = /* @__PURE__ */ React__namespace.createElement(x$8, null);
20972
+ break;
20973
+ }
20974
+ return /* @__PURE__ */ React__namespace.createElement("p", { className: `${classPrefix$5}__icon-wrapper` }, iconNode);
20975
+ }
20976
+ return icon;
20977
+ }
21042
20978
  componentDidMount() {
21043
20979
  this.startCloseTimer();
21044
20980
  }
@@ -21048,56 +20984,43 @@ Please add \`${key}Action\` when creating your handler.`);
21048
20984
  render() {
21049
20985
  const {
21050
20986
  id,
21051
- style,
21052
20987
  icon,
21053
20988
  title,
21054
- msg,
21055
- bottom,
21056
- center,
21057
- bgColor,
21058
- coverColor,
21059
- textAlignCenter,
20989
+ content,
20990
+ position,
21060
20991
  size,
21061
- customClass,
21062
- cover,
21063
- type: type2
20992
+ closeOnOverlayClick,
20993
+ style,
20994
+ className,
20995
+ contentClassName,
20996
+ contentStyle
21064
20997
  } = this.props;
21065
- const toastBem = cn("toast");
21066
20998
  const classes = classNames({
21067
- "nut-toast-center": center,
21068
20999
  "nut-toast-has-icon": icon,
21069
- "nut-toast-cover": cover,
21070
- "nut-toast-loading": type2 === "loading",
21071
- [`${customClass}`]: true,
21072
21000
  [`nut-toast-${size}`]: true
21073
21001
  });
21074
21002
  return /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement(
21075
- "div",
21003
+ Overlay,
21076
21004
  {
21077
- className: `${toastBem()} ${classes}`,
21078
- id: `toast-${id}`,
21079
- style: {
21080
- bottom: center ? "auto" : `${bottom}`,
21081
- backgroundColor: cover ? coverColor : "",
21082
- ...style
21083
- },
21005
+ visible: true,
21006
+ style,
21007
+ className: `${classPrefix$5}__overlay-default ${className}`,
21084
21008
  onClick: () => {
21009
+ console.log("onclick");
21085
21010
  this.clickCover();
21086
- }
21011
+ },
21012
+ closeOnOverlayClick
21087
21013
  },
21088
- /* @__PURE__ */ React__namespace.createElement(
21014
+ /* @__PURE__ */ React__namespace.createElement("div", { className: `${classPrefix$5} ${classes}`, id: `toast-${id}` }, /* @__PURE__ */ React__namespace.createElement(
21089
21015
  "div",
21090
21016
  {
21091
- className: toastBem("inner"),
21092
- style: {
21093
- textAlign: textAlignCenter ? "center" : "left",
21094
- backgroundColor: bgColor
21095
- }
21017
+ className: `${classPrefix$5}__inner ${classPrefix$5}-${position} ${contentClassName}`,
21018
+ style: contentStyle
21096
21019
  },
21097
- icon ? /* @__PURE__ */ React__namespace.createElement("p", { className: toastBem("icon-wrapper") }, icon) : null,
21098
- title ? /* @__PURE__ */ React__namespace.createElement("div", { className: "nut-toast-title" }, title) : null,
21099
- /* @__PURE__ */ React__namespace.createElement("span", { className: toastBem("text") }, msg)
21100
- )
21020
+ this.renderIcon(),
21021
+ title ? /* @__PURE__ */ React__namespace.createElement("div", { className: `${classPrefix$5}-title` }, title) : null,
21022
+ /* @__PURE__ */ React__namespace.createElement("span", { className: `${classPrefix$5}-text` }, content)
21023
+ ))
21101
21024
  ));
21102
21025
  }
21103
21026
  }
@@ -21126,36 +21049,20 @@ Please add \`${key}Action\` when creating your handler.`);
21126
21049
  };
21127
21050
  let messageInstance = null;
21128
21051
  const options = {
21129
- msg: "",
21052
+ ...ComponentDefaults,
21130
21053
  id: "",
21131
- style: {},
21132
- duration: 1.5,
21054
+ duration: 2,
21133
21055
  // 时长,duration为0则一直展示
21134
- center: true,
21135
- // toast是否居中展示
21136
- type: "text",
21056
+ position: "center",
21137
21057
  title: "",
21138
- customClass: "",
21139
- // 自定义样式名
21140
- bottom: "30px",
21141
- // center为false时生效,距离底部位置
21142
21058
  size: "base",
21143
21059
  // 设置字体大小,默认base,可选large\small\base
21144
21060
  icon: null,
21145
- iconSize: "20",
21146
- textAlignCenter: true,
21147
- // 文字是否居中显示,true为居中,false为left
21148
- loadingRotate: true,
21149
- // 未实现
21150
- bgColor: "rgba(0, 0, 0, .8)",
21151
21061
  onClose: () => {
21152
21062
  },
21153
- cover: false,
21154
- // 是否展示透明遮罩层
21155
- coverColor: "rgba(0, 0, 0, 0)",
21156
- // 遮罩颜色设定
21157
- closeOnClickOverlay: false
21063
+ closeOnOverlayClick: false,
21158
21064
  // 是否点击遮罩可关闭
21065
+ contentClassName: ""
21159
21066
  };
21160
21067
  function getInstance(props, callback) {
21161
21068
  if (messageInstance) {
@@ -21171,6 +21078,7 @@ Please add \`${key}Action\` when creating your handler.`);
21171
21078
  if (messageInstance) {
21172
21079
  messageInstance.destroy();
21173
21080
  messageInstance = null;
21081
+ opts.onClose && opts.onClose();
21174
21082
  }
21175
21083
  }
21176
21084
  const opts2 = { ...options, ...opts, onClose: close };
@@ -21183,32 +21091,31 @@ Please add \`${key}Action\` when creating your handler.`);
21183
21091
  console.warn("[NutUI Toast]: msg cannot be null");
21184
21092
  }
21185
21093
  };
21094
+ function show(option) {
21095
+ if (typeof option === "string") {
21096
+ errorMsg(option);
21097
+ return notice({ content: option });
21098
+ }
21099
+ errorMsg(option.content);
21100
+ return notice({
21101
+ ...option
21102
+ });
21103
+ }
21104
+ function config(config2) {
21105
+ if (config2.duration !== void 0) {
21106
+ options.duration = config2.duration;
21107
+ }
21108
+ if (config2.position !== void 0) {
21109
+ options.position = config2.position;
21110
+ }
21111
+ if (config2.closeOnOverlayClick !== void 0) {
21112
+ options.closeOnOverlayClick = config2.closeOnOverlayClick;
21113
+ }
21114
+ }
21186
21115
  const Toast = {
21187
- text(msg, option = {}) {
21188
- errorMsg(msg);
21189
- return notice({ msg, type: "text", ...option });
21190
- },
21191
- success(msg, option = {}) {
21192
- errorMsg(msg);
21193
- return notice({ msg, icon: "success", type: "success", ...option });
21194
- },
21195
- fail(msg, option = {}) {
21196
- errorMsg(msg);
21197
- return notice({ msg, icon: "failure", type: "fail", ...option });
21198
- },
21199
- loading(msg, option = {}) {
21200
- errorMsg(msg);
21201
- return notice({ msg, icon: /* @__PURE__ */ React__namespace.createElement(k$3, null), type: "loading", ...option });
21202
- },
21203
- warn(msg, option = {}) {
21204
- errorMsg(msg);
21205
- return notice({ msg, icon: "tips", type: "warn", ...option });
21206
- },
21207
- customIcon(msg, option = {}) {
21208
- errorMsg(msg);
21209
- return notice({ msg, ...option });
21210
- },
21211
- hide() {
21116
+ show,
21117
+ config,
21118
+ clear() {
21212
21119
  if (messageInstance) {
21213
21120
  messageInstance.destroy();
21214
21121
  messageInstance = null;
@@ -21893,13 +21800,16 @@ Please add \`${key}Action\` when creating your handler.`);
21893
21800
  Collapse.displayName = "NutCollapse";
21894
21801
  Collapse.Item = CollapseItem;
21895
21802
  const defaultProps$k = {
21803
+ ...ComponentDefaults,
21896
21804
  paused: false,
21897
21805
  startTime: Date.now(),
21898
21806
  endTime: Date.now(),
21807
+ remainingTime: 0,
21899
21808
  millisecond: false,
21900
21809
  format: "HH:mm:ss",
21901
21810
  autoStart: true,
21902
- time: 0
21811
+ time: 0,
21812
+ destroy: false
21903
21813
  };
21904
21814
  const InternalCountDown = (props, ref) => {
21905
21815
  useConfig();
@@ -21907,10 +21817,12 @@ Please add \`${key}Action\` when creating your handler.`);
21907
21817
  paused,
21908
21818
  startTime,
21909
21819
  endTime,
21820
+ remainingTime,
21910
21821
  millisecond,
21911
21822
  format: format2,
21912
21823
  autoStart,
21913
21824
  time,
21825
+ destroy,
21914
21826
  className,
21915
21827
  style,
21916
21828
  onEnd,
@@ -21920,7 +21832,7 @@ Please add \`${key}Action\` when creating your handler.`);
21920
21832
  children,
21921
21833
  ...rest
21922
21834
  } = { ...defaultProps$k, ...props };
21923
- const b = cn("countdown");
21835
+ const classPrefix2 = "nut-countdown";
21924
21836
  const [restTimeStamp, setRestTime] = React.useState(0);
21925
21837
  const stateRef = React.useRef({
21926
21838
  pauseTime: 0,
@@ -21945,8 +21857,12 @@ Please add \`${key}Action\` when creating your handler.`);
21945
21857
  return new Date(t).getTime();
21946
21858
  };
21947
21859
  const initTime = () => {
21948
- stateRef.current.handleEndTime = endTime;
21949
- stateRef.current.diffTime = Date.now() - getTimeStamp(startTime);
21860
+ if (remainingTime) {
21861
+ stateRef.current.handleEndTime = Date.now() + Number(remainingTime);
21862
+ } else {
21863
+ stateRef.current.handleEndTime = endTime;
21864
+ stateRef.current.diffTime = Date.now() - getTimeStamp(startTime);
21865
+ }
21950
21866
  if (!stateRef.current.counting)
21951
21867
  stateRef.current.counting = true;
21952
21868
  tick();
@@ -22088,7 +22004,7 @@ Please add \`${key}Action\` when creating your handler.`);
22088
22004
  if (stateRef.current.isIninted) {
22089
22005
  initTime();
22090
22006
  }
22091
- }, [endTime, startTime]);
22007
+ }, [endTime, startTime, remainingTime]);
22092
22008
  React.useEffect(() => {
22093
22009
  if (autoStart) {
22094
22010
  initTime();
@@ -22102,20 +22018,28 @@ Please add \`${key}Action\` when creating your handler.`);
22102
22018
  return componentWillUnmount;
22103
22019
  }, []);
22104
22020
  const componentWillUnmount = () => {
22105
- clearInterval(stateRef.current.timer);
22021
+ destroy && cancelAnimationFrame(stateRef.current.timer);
22106
22022
  };
22107
22023
  const renderTime = (() => {
22108
22024
  return formatRemainTime(stateRef.current.restTime);
22109
22025
  })();
22110
- return /* @__PURE__ */ React.createElement("div", { className: `${b()} ${className || ""}`, style: { ...style }, ...rest }, children || /* @__PURE__ */ React.createElement(
22026
+ return /* @__PURE__ */ React.createElement(
22111
22027
  "div",
22112
22028
  {
22113
- className: b("block"),
22114
- dangerouslySetInnerHTML: {
22115
- __html: `${renderTime}`
22029
+ className: `${classPrefix2} ${className}`,
22030
+ style: { ...style },
22031
+ ...rest
22032
+ },
22033
+ children || /* @__PURE__ */ React.createElement(
22034
+ "div",
22035
+ {
22036
+ className: `${classPrefix2}__block`,
22037
+ dangerouslySetInnerHTML: {
22038
+ __html: `${renderTime}`
22039
+ }
22116
22040
  }
22117
- }
22118
- ));
22041
+ )
22042
+ );
22119
22043
  };
22120
22044
  const CountDown = React.forwardRef(InternalCountDown);
22121
22045
  CountDown.defaultProps = defaultProps$k;
@@ -23124,18 +23048,18 @@ Please add \`${key}Action\` when creating your handler.`);
23124
23048
  return tempIndex;
23125
23049
  };
23126
23050
  const getEndIndex = ({
23127
- sourceData,
23051
+ list,
23128
23052
  startIndex,
23129
23053
  visibleCount,
23130
- itemEqualSize = true,
23054
+ itemEqual = true,
23131
23055
  positions,
23132
23056
  offSetSize,
23133
23057
  overscan,
23134
23058
  sizeKey = "width"
23135
23059
  }) => {
23136
- const dataLength = sourceData.length;
23060
+ const dataLength = list.length;
23137
23061
  let tempIndex = null;
23138
- if (itemEqualSize) {
23062
+ if (itemEqual) {
23139
23063
  const endIndex = startIndex + visibleCount;
23140
23064
  tempIndex = dataLength > 0 ? Math.min(dataLength, endIndex) : endIndex;
23141
23065
  } else {
@@ -23184,26 +23108,35 @@ Please add \`${key}Action\` when creating your handler.`);
23184
23108
  }
23185
23109
  });
23186
23110
  };
23187
- const defaultProps$d = {};
23111
+ const defaultProps$d = {
23112
+ ...ComponentDefaults,
23113
+ list: [],
23114
+ itemHeight: 66,
23115
+ itemEqual: true,
23116
+ direction: "vertical",
23117
+ overscan: 2
23118
+ };
23188
23119
  const VirtualList = (props) => {
23189
23120
  const {
23190
- sourceData = [],
23121
+ list,
23191
23122
  ItemRender,
23192
- itemEqualSize = true,
23193
- itemSize = 200,
23194
- horizontal = false,
23195
- overscan = 2,
23123
+ itemEqual,
23124
+ itemHeight,
23125
+ direction,
23126
+ overscan,
23196
23127
  key,
23197
- handleScroll,
23198
23128
  onScroll,
23199
23129
  className,
23200
- containerSize,
23130
+ containerHeight,
23201
23131
  ...rest
23202
- } = props;
23132
+ } = {
23133
+ ...defaultProps$d,
23134
+ ...props
23135
+ };
23136
+ const horizontal = direction === "horizontal";
23203
23137
  const sizeKey = horizontal ? "width" : "height";
23204
23138
  const scrollKey = horizontal ? "scrollLeft" : "scrollTop";
23205
23139
  const offsetKey = horizontal ? "left" : "top";
23206
- useConfig();
23207
23140
  const scrollRef = React.useRef(null);
23208
23141
  const itemsRef = React.useRef(null);
23209
23142
  const firstItemRef = React.useRef(null);
@@ -23220,7 +23153,7 @@ Please add \`${key}Action\` when creating your handler.`);
23220
23153
  ]);
23221
23154
  const [listTotalSize, setListTotalSize] = React.useState(99999999);
23222
23155
  const [visibleCount, setVisibleCount] = React.useState(0);
23223
- const [offSetSize, setOffSetSize] = React.useState(containerSize || 0);
23156
+ const [offSetSize, setOffSetSize] = React.useState(containerHeight || 0);
23224
23157
  const [options2, setOptions] = React.useState({
23225
23158
  startOffset: 0,
23226
23159
  // 可视区域距离顶部的偏移量
@@ -23231,30 +23164,30 @@ Please add \`${key}Action\` when creating your handler.`);
23231
23164
  // 可视区域结束索引
23232
23165
  });
23233
23166
  React.useEffect(() => {
23234
- const pos = initPositinoCache(itemSize, sourceData.length);
23167
+ const pos = initPositinoCache(itemHeight, list.length);
23235
23168
  setPositions(pos);
23236
23169
  const totalSize = getListTotalSize(pos, horizontal);
23237
23170
  setListTotalSize(totalSize);
23238
- }, [sourceData, itemSize, horizontal]);
23171
+ }, [list, itemHeight, horizontal]);
23239
23172
  const getElement = React.useCallback(() => {
23240
23173
  var _a2;
23241
23174
  return ((_a2 = scrollRef.current) == null ? void 0 : _a2.parentElement) || document.body;
23242
23175
  }, []);
23243
23176
  React.useEffect(() => {
23244
- if (containerSize)
23177
+ if (containerHeight)
23245
23178
  return;
23246
23179
  const size = horizontal ? getElement().offsetWidth : getElement().offsetHeight;
23247
23180
  setOffSetSize(size);
23248
- }, [getElement, horizontal, containerSize]);
23181
+ }, [getElement, horizontal, containerHeight]);
23249
23182
  React.useEffect(() => {
23250
23183
  if (offSetSize === 0)
23251
23184
  return;
23252
- const count = Math.ceil(offSetSize / itemSize) + overscan;
23185
+ const count = Math.ceil(offSetSize / itemHeight) + overscan;
23253
23186
  setVisibleCount(count);
23254
23187
  setOptions((options22) => {
23255
23188
  return { ...options22, endIndex: count };
23256
23189
  });
23257
- }, [getElement, horizontal, itemSize, overscan, offSetSize]);
23190
+ }, [getElement, horizontal, itemHeight, overscan, offSetSize]);
23258
23191
  const updateTotalSize = React.useCallback(() => {
23259
23192
  if (!itemsRef.current)
23260
23193
  return;
@@ -23270,14 +23203,14 @@ Please add \`${key}Action\` when creating your handler.`);
23270
23203
  const scrollSize = getElement()[scrollKey];
23271
23204
  const startIndex = binarySearch(positions, scrollSize, horizontal);
23272
23205
  const overStart = startIndex - overscan > -1 ? startIndex - overscan : 0;
23273
- if (!itemEqualSize) {
23206
+ if (!itemEqual) {
23274
23207
  updateTotalSize();
23275
23208
  }
23276
23209
  const endIndex = getEndIndex({
23277
- sourceData,
23210
+ list,
23278
23211
  startIndex,
23279
23212
  visibleCount,
23280
- itemEqualSize,
23213
+ itemEqual,
23281
23214
  positions,
23282
23215
  offSetSize,
23283
23216
  sizeKey,
@@ -23285,27 +23218,24 @@ Please add \`${key}Action\` when creating your handler.`);
23285
23218
  });
23286
23219
  const startOffset = positions[startIndex][offsetKey];
23287
23220
  setOptions({ startOffset, startIndex, overStart, endIndex });
23288
- if (endIndex > sourceData.length - 1) {
23221
+ if (endIndex > list.length - 1) {
23289
23222
  if (onScroll) {
23290
23223
  onScroll();
23291
- } else if (handleScroll) {
23292
- handleScroll();
23293
23224
  }
23294
23225
  }
23295
23226
  });
23296
23227
  }, [
23297
23228
  positions,
23298
23229
  getElement,
23299
- sourceData,
23230
+ list,
23300
23231
  visibleCount,
23301
- itemEqualSize,
23232
+ itemEqual,
23302
23233
  updateTotalSize,
23303
23234
  offsetKey,
23304
23235
  sizeKey,
23305
23236
  scrollKey,
23306
23237
  horizontal,
23307
23238
  overscan,
23308
- handleScroll,
23309
23239
  offSetSize
23310
23240
  ]);
23311
23241
  React.useEffect(() => {
@@ -23321,7 +23251,7 @@ Please add \`${key}Action\` when creating your handler.`);
23321
23251
  className: className ? `${className} nut-virtualList-box` : "nut-virtualList-box",
23322
23252
  ...rest,
23323
23253
  style: {
23324
- [sizeKey]: containerSize ? `${offSetSize}px` : ""
23254
+ [sizeKey]: containerHeight ? `${offSetSize}px` : ""
23325
23255
  }
23326
23256
  },
23327
23257
  /* @__PURE__ */ React.createElement(
@@ -23343,7 +23273,7 @@ Please add \`${key}Action\` when creating your handler.`);
23343
23273
  transform: horizontal ? `translate3d(${options2.startOffset}px,0,0)` : `translate3d(0,${options2.startOffset}px,0)`
23344
23274
  }
23345
23275
  },
23346
- sourceData.slice(options2.overStart, options2.endIndex).map((data, index) => {
23276
+ list.slice(options2.overStart, options2.endIndex).map((data, index) => {
23347
23277
  const { startIndex, overStart } = options2;
23348
23278
  const dataIndex = overStart + index;
23349
23279
  const styleVal = dataIndex < startIndex ? "none" : "block";
@@ -23740,7 +23670,7 @@ Please add \`${key}Action\` when creating your handler.`);
23740
23670
  },
23741
23671
  item.title,
23742
23672
  " ",
23743
- item.sorter && (sorterIcon || /* @__PURE__ */ React.createElement(x$9, { width: "12px", height: "12px" }))
23673
+ item.sorter && (sorterIcon || /* @__PURE__ */ React.createElement(x$a, { width: "12px", height: "12px" }))
23744
23674
  );
23745
23675
  });
23746
23676
  };
@@ -23886,7 +23816,7 @@ Please add \`${key}Action\` when creating your handler.`);
23886
23816
  },
23887
23817
  closeIcon
23888
23818
  ) : /* @__PURE__ */ React.createElement(
23889
- x$a,
23819
+ x$b,
23890
23820
  {
23891
23821
  width: 12,
23892
23822
  height: 12,