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

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 (189) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/esm/ActionSheet/style/style.css +1 -1
  3. package/dist/esm/ActionSheet.js +28 -37
  4. package/dist/esm/Address/style/style.css +1 -1
  5. package/dist/esm/AnimatingNumbers/style/style.css +1 -1
  6. package/dist/esm/AnimatingNumbers.js +22 -26
  7. package/dist/esm/Calendar/style/style.css +1 -1
  8. package/dist/esm/Cascader/style/style.css +1 -1
  9. package/dist/esm/CountDown/style/style.css +1 -1
  10. package/dist/esm/CountDown.js +20 -15
  11. package/dist/esm/DatePicker/style/style.css +1 -1
  12. package/dist/esm/Ellipsis/style/style.css +1 -1
  13. package/dist/esm/ImagePreview/style/style.css +1 -1
  14. package/dist/esm/NumberKeyboard/style/style.css +1 -1
  15. package/dist/esm/Picker/style/style.css +1 -1
  16. package/dist/esm/Popup/style/style.css +1 -1
  17. package/dist/esm/SearchBar/style/style.css +1 -1
  18. package/dist/esm/SearchBar.js +33 -87
  19. package/dist/esm/ShortPassword/style/style.css +1 -1
  20. package/dist/esm/ShortPassword.js +65 -133
  21. package/dist/esm/SideNavBar/style/style.css +1 -1
  22. package/dist/esm/TimeSelect/style/style.css +1 -1
  23. package/dist/esm/Toast/style/style.css +1 -1
  24. package/dist/esm/Toast.js +86 -102
  25. package/dist/esm/TrendArrow/style/style.css +1 -1
  26. package/dist/esm/TrendArrow.js +30 -35
  27. package/dist/esm/Video.js +8 -12
  28. package/dist/esm/VirtualList/style/style.css +1 -1
  29. package/dist/esm/VirtualList.js +29 -25
  30. package/dist/esm/WaterMark.js +8 -11
  31. package/dist/esm/types/src/packages/actionsheet/actionsheet.d.ts +11 -15
  32. package/dist/esm/types/src/packages/actionsheet/actionsheet.taro.d.ts +11 -15
  33. package/dist/esm/types/src/packages/actionsheet/index.d.ts +1 -0
  34. package/dist/esm/types/src/packages/actionsheet/index.taro.d.ts +1 -0
  35. package/dist/esm/types/src/packages/animatingnumbers/countup.d.ts +7 -8
  36. package/dist/esm/types/src/packages/animatingnumbers/countup.taro.d.ts +7 -8
  37. package/dist/esm/types/src/packages/animatingnumbers/demo.d.ts +1 -0
  38. package/dist/esm/types/src/packages/animatingnumbers/demo.taro.d.ts +1 -0
  39. package/dist/esm/types/src/packages/animatingnumbers/index.d.ts +1 -0
  40. package/dist/esm/types/src/packages/animatingnumbers/index.taro.d.ts +1 -0
  41. package/dist/esm/types/src/packages/avatargroup/avatargroup.taro.d.ts +13 -0
  42. package/dist/esm/types/src/packages/avatargroup/index.taro.d.ts +1 -1
  43. package/dist/esm/types/src/packages/configprovider/configprovider.d.ts +2 -1
  44. package/dist/esm/types/src/packages/configprovider/configprovider.taro.d.ts +2 -1
  45. package/dist/esm/types/src/packages/configprovider/index.d.ts +1 -0
  46. package/dist/esm/types/src/packages/configprovider/index.taro.d.ts +1 -0
  47. package/dist/esm/types/src/packages/configprovider/types.d.ts +1 -0
  48. package/dist/esm/types/src/packages/countdown/countdown.d.ts +5 -4
  49. package/dist/esm/types/src/packages/countdown/countdown.taro.d.ts +5 -4
  50. package/dist/esm/types/src/packages/countdown/index.d.ts +1 -0
  51. package/dist/esm/types/src/packages/countdown/index.taro.d.ts +1 -0
  52. package/dist/esm/types/src/packages/ellipsis/ellipsis.taro.d.ts +1 -0
  53. package/dist/esm/types/src/packages/searchbar/index.d.ts +1 -0
  54. package/dist/esm/types/src/packages/searchbar/index.taro.d.ts +1 -0
  55. package/dist/esm/types/src/packages/searchbar/searchbar.d.ts +4 -31
  56. package/dist/esm/types/src/packages/searchbar/searchbar.taro.d.ts +4 -31
  57. package/dist/esm/types/src/packages/shortpassword/index.d.ts +1 -0
  58. package/dist/esm/types/src/packages/shortpassword/index.taro.d.ts +1 -0
  59. package/dist/esm/types/src/packages/shortpassword/shortpassword.d.ts +17 -20
  60. package/dist/esm/types/src/packages/shortpassword/shortpassword.taro.d.ts +17 -20
  61. package/dist/esm/types/src/packages/toast/Notification.d.ts +9 -13
  62. package/dist/esm/types/src/packages/toast/index.d.ts +1 -0
  63. package/dist/esm/types/src/packages/toast/index.taro.d.ts +1 -0
  64. package/dist/esm/types/src/packages/toast/toast.d.ts +19 -26
  65. package/dist/esm/types/src/packages/toast/toast.taro.d.ts +9 -11
  66. package/dist/esm/types/src/packages/trendarrow/trendarrow.d.ts +8 -10
  67. package/dist/esm/types/src/packages/trendarrow/trendarrow.taro.d.ts +8 -10
  68. package/dist/esm/types/src/packages/video/index.d.ts +1 -0
  69. package/dist/esm/types/src/packages/video/index.taro.d.ts +2 -1
  70. package/dist/esm/types/src/packages/video/video.d.ts +5 -9
  71. package/dist/esm/types/src/packages/video/video.taro.d.ts +6 -9
  72. package/dist/esm/types/src/packages/virtuallist/index.d.ts +1 -0
  73. package/dist/esm/types/src/packages/virtuallist/index.taro.d.ts +1 -0
  74. package/dist/esm/types/src/packages/virtuallist/type.d.ts +0 -18
  75. package/dist/esm/types/src/packages/virtuallist/utils.d.ts +3 -3
  76. package/dist/esm/types/src/packages/virtuallist/virtuallist.d.ts +15 -4
  77. package/dist/esm/types/src/packages/virtuallist/virtuallist.taro.d.ts +13 -14
  78. package/dist/esm/types/src/packages/watermark/demo.d.ts +0 -1
  79. package/dist/esm/types/src/packages/watermark/demo.taro.d.ts +0 -1
  80. package/dist/esm/types/src/packages/watermark/index.d.ts +1 -0
  81. package/dist/esm/types/src/packages/watermark/index.taro.d.ts +1 -0
  82. package/dist/esm/types/src/packages/watermark/watermark.d.ts +3 -4
  83. package/dist/esm/types/src/packages/watermark/watermark.taro.d.ts +3 -4
  84. package/dist/locales/base.js +1 -1
  85. package/dist/locales/en-US.js +1 -1
  86. package/dist/locales/id-ID.js +1 -1
  87. package/dist/locales/tr-TR.js +10 -2
  88. package/dist/locales/zh-CN.js +1 -1
  89. package/dist/locales/zh-TW.js +1 -1
  90. package/dist/locales/zh-UG.js +1 -1
  91. package/dist/nutui.react.es.js +525 -590
  92. package/dist/nutui.react.umd.js +525 -590
  93. package/dist/packages/actionsheet/actionsheet.scss +26 -73
  94. package/dist/packages/animatingnumbers/countup.scss +0 -21
  95. package/dist/packages/countdown/countdown.scss +2 -0
  96. package/dist/packages/ellipsis/ellipsis.scss +4 -0
  97. package/dist/packages/popup/popup.scss +98 -47
  98. package/dist/packages/searchbar/searchbar.scss +13 -71
  99. package/dist/packages/shortpassword/shortpassword.scss +1 -88
  100. package/dist/packages/toast/toast.scss +20 -7
  101. package/dist/packages/trendarrow/trendarrow.scss +4 -3
  102. package/dist/packages/virtuallist/virtuallist.scss +0 -12
  103. package/dist/style.css +1 -1
  104. package/dist/style.mjs +1 -1
  105. package/dist/styles/variables-jmapp.scss +58 -68
  106. package/dist/styles/variables.scss +32 -61
  107. package/dist/types/packages/actionsheet/actionsheet.d.ts +44 -16
  108. package/dist/types/packages/actionsheet/index.d.ts +1 -0
  109. package/dist/types/packages/animate/animate.d.ts +20 -4
  110. package/dist/types/packages/animatingnumbers/countup.d.ts +7 -8
  111. package/dist/types/packages/animatingnumbers/index.d.ts +1 -0
  112. package/dist/types/packages/audio/audio.d.ts +60 -12
  113. package/dist/types/packages/avatar/avatar.d.ts +50 -10
  114. package/dist/types/packages/avatargroup/avatargroup.d.ts +40 -8
  115. package/dist/types/packages/backtop/backtop.d.ts +25 -5
  116. package/dist/types/packages/badge/badge.d.ts +30 -6
  117. package/dist/types/packages/button/button.d.ts +50 -10
  118. package/dist/types/packages/cascader/cascader.d.ts +85 -17
  119. package/dist/types/packages/cell/cell.d.ts +30 -6
  120. package/dist/types/packages/cellgroup/cellgroup.d.ts +15 -3
  121. package/dist/types/packages/checkboxgroup/checkboxgroup.d.ts +40 -8
  122. package/dist/types/packages/circleprogress/circleprogress.d.ts +35 -7
  123. package/dist/types/packages/col/col.d.ts +15 -3
  124. package/dist/types/packages/collapse/collapse.d.ts +25 -5
  125. package/dist/types/packages/collapseitem/collapseitem.d.ts +20 -4
  126. package/dist/types/packages/configprovider/configprovider.d.ts +11 -2
  127. package/dist/types/packages/configprovider/index.d.ts +1 -0
  128. package/dist/types/packages/configprovider/types.d.ts +1 -0
  129. package/dist/types/packages/countdown/countdown.d.ts +68 -15
  130. package/dist/types/packages/countdown/index.d.ts +1 -0
  131. package/dist/types/packages/divider/divider.d.ts +10 -2
  132. package/dist/types/packages/drag/drag.d.ts +15 -3
  133. package/dist/types/packages/elevator/elevator.d.ts +45 -9
  134. package/dist/types/packages/ellipsis/ellipsis.d.ts +45 -9
  135. package/dist/types/packages/empty/empty.d.ts +20 -4
  136. package/dist/types/packages/fixednav/fixednav.d.ts +50 -10
  137. package/dist/types/packages/grid/grid.d.ts +35 -7
  138. package/dist/types/packages/griditem/griditem.d.ts +5 -1
  139. package/dist/types/packages/image/image.d.ts +65 -13
  140. package/dist/types/packages/imagepreview/imagepreview.d.ts +50 -10
  141. package/dist/types/packages/indicator/indicator.d.ts +15 -3
  142. package/dist/types/packages/input/input.d.ts +100 -20
  143. package/dist/types/packages/inputnumber/inputnumber.d.ts +85 -17
  144. package/dist/types/packages/menu/menu.d.ts +25 -5
  145. package/dist/types/packages/menuitem/menuitem.d.ts +35 -7
  146. package/dist/types/packages/noticebar/noticebar.d.ts +60 -12
  147. package/dist/types/packages/notify/notify.d.ts +25 -5
  148. package/dist/types/packages/numberkeyboard/numberkeyboard.d.ts +50 -10
  149. package/dist/types/packages/overlay/overlay.d.ts +40 -8
  150. package/dist/types/packages/pagination/pagination.d.ts +55 -11
  151. package/dist/types/packages/picker/picker.d.ts +55 -11
  152. package/dist/types/packages/popup/popup.d.ts +75 -15
  153. package/dist/types/packages/price/price.d.ts +35 -7
  154. package/dist/types/packages/progress/progress.d.ts +40 -8
  155. package/dist/types/packages/pulltorefresh/pulltorefresh.d.ts +50 -10
  156. package/dist/types/packages/radio/radio.d.ts +45 -9
  157. package/dist/types/packages/radiogroup/radiogroup.d.ts +30 -6
  158. package/dist/types/packages/range/range.d.ts +80 -16
  159. package/dist/types/packages/rate/rate.d.ts +50 -10
  160. package/dist/types/packages/searchbar/index.d.ts +1 -0
  161. package/dist/types/packages/searchbar/searchbar.d.ts +76 -45
  162. package/dist/types/packages/shortpassword/index.d.ts +1 -0
  163. package/dist/types/packages/shortpassword/shortpassword.d.ts +89 -24
  164. package/dist/types/packages/skeleton/skeleton.d.ts +35 -7
  165. package/dist/types/packages/step/step.d.ts +20 -4
  166. package/dist/types/packages/steps/steps.d.ts +15 -3
  167. package/dist/types/packages/sticky/sticky.d.ts +25 -5
  168. package/dist/types/packages/swipe/swipe.d.ts +47 -11
  169. package/dist/types/packages/swiper/swiper.d.ts +65 -13
  170. package/dist/types/packages/switch/switch.d.ts +30 -6
  171. package/dist/types/packages/tabbar/tabbar.d.ts +35 -7
  172. package/dist/types/packages/tabbaritem/tabbaritem.d.ts +10 -2
  173. package/dist/types/packages/tabpane/tabpane.d.ts +15 -3
  174. package/dist/types/packages/tabs/tabs.d.ts +60 -12
  175. package/dist/types/packages/textarea/textarea.d.ts +60 -12
  176. package/dist/types/packages/toast/Notification.d.ts +9 -13
  177. package/dist/types/packages/toast/index.d.ts +1 -0
  178. package/dist/types/packages/toast/toast.d.ts +19 -26
  179. package/dist/types/packages/trendarrow/trendarrow.d.ts +57 -15
  180. package/dist/types/packages/uploader/uploader.d.ts +180 -36
  181. package/dist/types/packages/video/index.d.ts +1 -0
  182. package/dist/types/packages/video/video.d.ts +27 -11
  183. package/dist/types/packages/virtuallist/index.d.ts +1 -0
  184. package/dist/types/packages/virtuallist/type.d.ts +0 -18
  185. package/dist/types/packages/virtuallist/utils.d.ts +3 -3
  186. package/dist/types/packages/virtuallist/virtuallist.d.ts +51 -4
  187. package/dist/types/packages/watermark/index.d.ts +1 -0
  188. package/dist/types/packages/watermark/watermark.d.ts +72 -17
  189. 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.13 Wed May 31 2023 14:48:32 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$k = "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$k, 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$k}__left` }, title ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$k}__title` }, title) : null, description ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$k}__description` }, description) : null) : null, extra ? /* @__PURE__ */ React.createElement(
2497
2544
  "div",
2498
2545
  {
2499
- className: `${classPrefix$i}__extra`,
2546
+ className: `${classPrefix$k}__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$k}__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$j = "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$j, className), ...rest }, title ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$j}__title` }, title) : null, description ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$j}__description` }, description) : null, /* @__PURE__ */ React.createElement(
2521
2568
  "div",
2522
2569
  {
2523
- className: `${classPrefix$h}__wrap ${divider ? `${classPrefix$h}__wrap--divider` : ""}`
2570
+ className: `${classPrefix$j}__wrap ${divider ? `${classPrefix$j}__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$i = "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$i, 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$h = `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$h}`]: true,
3332
+ [`${classPrefix$h}__center`]: children,
3333
+ [`${classPrefix$h}__left`]: contentPosition === "left",
3334
+ [`${classPrefix$h}__right`]: contentPosition === "right",
3335
+ [`${classPrefix$h}__hairline`]: true
3289
3336
  }) : classNames({
3290
- [`${classPrefix$f}`]: true,
3291
- [`${classPrefix$f}__vertical`]: direction === "vertical"
3337
+ [`${classPrefix$h}`]: true,
3338
+ [`${classPrefix$h}__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$g = "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$g}
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$f = "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$f, 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$e = "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$e,
11699
+ `${classPrefix$e}--${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$e}__titles`, {
11703
+ [`${classPrefix$e}__titles--${activeType}`]: activeType,
11704
+ [`${classPrefix$e}__titles--scrollable`]: true,
11705
+ [`${classPrefix$e}__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$e}__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$e}__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$e}__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$e}__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$e}__content__wrap` }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$e}__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$d = "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$d, 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$c = "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$c}__icon--disable`;
13964
14011
  }
13965
14012
  if (innerChecked) {
13966
14013
  if (innerIndeterminate) {
13967
- return `${classPrefix$a}__icon--indeterminate`;
14014
+ return `${classPrefix$c}__icon--indeterminate`;
13968
14015
  }
13969
- return `${classPrefix$a}__icon`;
14016
+ return `${classPrefix$c}__icon`;
13970
14017
  }
13971
- return `${classPrefix$a}__icon--unchecked`;
14018
+ return `${classPrefix$c}__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$c}__label `, {
14025
+ [`${classPrefix$c}__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$c, className, {
14045
+ [`${classPrefix$c}--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$b = `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$b}`]: true,
16513
+ [`${classPrefix$b}--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$a = "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$a, className, {
17228
+ [`${classPrefix$a}--${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);
17972
+ const val = format2(value);
17973
+ if (val.length >= comLen) {
17974
+ onComplete && onComplete(val);
18018
17975
  }
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
- };
18046
- }
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$9 = `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$9} ${className}`, ...rest }, /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$9}__image`, style: imgStyle }, imageNode), typeof description === "string" ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$9}__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$8 = "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$8}--popup-top`]: position === "top",
20091
+ [`${classPrefix$8}--popup-bottom`]: position === "bottom",
20092
+ [`${classPrefix$8}`]: true,
20093
+ [`${classPrefix$8}--${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$7 = `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$7, 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$6 = "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$6}__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$6}__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$6} ${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$6}__inner ${classPrefix$6}-${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$6}-title` }, title) : null,
21022
+ /* @__PURE__ */ React__namespace.createElement("span", { className: `${classPrefix$6}-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;
@@ -21223,7 +21130,7 @@ Please add \`${key}Action\` when creating your handler.`);
21223
21130
  onClick: (event) => {
21224
21131
  }
21225
21132
  };
21226
- const classPrefix$4 = `nut-animate`;
21133
+ const classPrefix$5 = `nut-animate`;
21227
21134
  const Animate = (props) => {
21228
21135
  const { className, type: type2, action, loop: loop2, onClick, children, ...rest } = {
21229
21136
  ...defaultProps$s,
@@ -21232,7 +21139,7 @@ Please add \`${key}Action\` when creating your handler.`);
21232
21139
  const [clicked, setClicked] = React.useState(false);
21233
21140
  const classes = classNames({
21234
21141
  "nut-ani-container": true,
21235
- [`${classPrefix$4}-${type2}`]: action === "initial" || clicked ? type2 : false,
21142
+ [`${classPrefix$5}-${type2}`]: action === "initial" || clicked ? type2 : false,
21236
21143
  loop: loop2
21237
21144
  });
21238
21145
  const cls = classNames(classes, className);
@@ -21250,37 +21157,38 @@ Please add \`${key}Action\` when creating your handler.`);
21250
21157
  Animate.defaultProps = defaultProps$s;
21251
21158
  Animate.displayName = "NutAnimate";
21252
21159
  const defaultProps$r = {
21253
- maxLen: 0,
21254
- endNumber: "",
21255
- delaySpeed: 300,
21256
- easeSpeed: 1,
21257
- thousands: false,
21258
- className: ""
21160
+ ...ComponentDefaults,
21161
+ length: 0,
21162
+ value: "",
21163
+ delay: 300,
21164
+ duration: 1,
21165
+ thousands: false
21259
21166
  };
21260
21167
  const CountUp = (props) => {
21261
21168
  const {
21262
- maxLen,
21263
- endNumber,
21264
- delaySpeed,
21265
- easeSpeed,
21169
+ length,
21170
+ value,
21171
+ delay,
21172
+ duration,
21266
21173
  className,
21267
21174
  thousands,
21175
+ style,
21268
21176
  ...reset
21269
21177
  } = {
21270
21178
  ...defaultProps$r,
21271
21179
  ...props
21272
21180
  };
21273
- const b = cn("countup");
21181
+ const classPrefix2 = "nut-countup";
21274
21182
  const countupRef = React.useRef(null);
21275
21183
  const timerRef = React.useRef(0);
21276
21184
  const numbers = Array.from({ length: 10 }, (v, i) => i);
21277
21185
  const getShowNumber = () => {
21278
- const splitArr = endNumber.split(".");
21279
- const intNumber = maxLen && splitArr[0].length < maxLen ? (Array(maxLen).join("0") + splitArr[0]).slice(-maxLen) : splitArr[0];
21186
+ const splitArr = value.split(".");
21187
+ const intNumber = length && splitArr[0].length < length ? (Array(length).join("0") + splitArr[0]).slice(-length) : splitArr[0];
21280
21188
  const currNumber = `${thousands ? intNumber.replace(/(\d)(?=(?:\d{3})+$)/g, "$1,") : intNumber}${splitArr[1] ? "." : ""}${splitArr[1] || ""}`;
21281
21189
  return currNumber.split("");
21282
21190
  };
21283
- const numerArr = React.useMemo(getShowNumber, [endNumber, maxLen, thousands]);
21191
+ const numerArr = React.useMemo(getShowNumber, [value, length, thousands]);
21284
21192
  const setNumberTransform = () => {
21285
21193
  if (countupRef.current) {
21286
21194
  const numberItems = countupRef.current.querySelectorAll(
@@ -21301,28 +21209,33 @@ Please add \`${key}Action\` when creating your handler.`);
21301
21209
  }
21302
21210
  };
21303
21211
  const numberEaseStyle = {
21304
- transition: `transform ${easeSpeed}s ease-in-out`
21212
+ transition: `transform ${duration}s ease-in-out`
21305
21213
  };
21306
21214
  React.useEffect(() => {
21307
21215
  timerRef.current = window.setTimeout(() => {
21308
21216
  setNumberTransform();
21309
- }, delaySpeed);
21217
+ }, delay);
21310
21218
  return () => {
21311
21219
  window.clearTimeout(timerRef.current);
21312
21220
  };
21313
21221
  }, [numerArr]);
21314
- return /* @__PURE__ */ React.createElement("div", { className: `${b()} ${className}`, ref: countupRef }, /* @__PURE__ */ React.createElement("ul", { className: b("list") }, numerArr.map((item, idx) => {
21222
+ return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2} ${className}`, ref: countupRef }, /* @__PURE__ */ React.createElement("ul", { className: `${classPrefix2}__list` }, numerArr.map((item, idx) => {
21315
21223
  return /* @__PURE__ */ React.createElement(
21316
21224
  "li",
21317
21225
  {
21318
- className: `${b("listitem", {
21319
- number: !Number.isNaN(Number(item))
21320
- })}`,
21226
+ className: `${classPrefix2}__listitem ${!Number.isNaN(Number(item)) ? `${classPrefix2}__listitem--number` : ""}`,
21321
21227
  key: idx
21322
21228
  },
21323
- !Number.isNaN(Number(item)) ? /* @__PURE__ */ React.createElement("span", { className: b("number"), style: numberEaseStyle }, [...numbers, ...numbers].map((number2, subidx) => {
21324
- return /* @__PURE__ */ React.createElement("span", { key: subidx }, number2);
21325
- })) : /* @__PURE__ */ React.createElement("span", { className: b("separator") }, item)
21229
+ !Number.isNaN(Number(item)) ? /* @__PURE__ */ React.createElement(
21230
+ "span",
21231
+ {
21232
+ className: `${classPrefix2}__number`,
21233
+ style: numberEaseStyle
21234
+ },
21235
+ [...numbers, ...numbers].map((number2, subidx) => {
21236
+ return /* @__PURE__ */ React.createElement("span", { key: subidx }, number2);
21237
+ })
21238
+ ) : /* @__PURE__ */ React.createElement("span", { className: `${classPrefix2}__separator` }, item)
21326
21239
  );
21327
21240
  })));
21328
21241
  };
@@ -21602,12 +21515,12 @@ Please add \`${key}Action\` when creating your handler.`);
21602
21515
  gap: "-8",
21603
21516
  level: "left"
21604
21517
  };
21605
- const classPrefix$3 = `nut-avatar-group`;
21518
+ const classPrefix$4 = `nut-avatar-group`;
21606
21519
  const AvatarGroup = (props) => {
21607
21520
  const propAvatarGroup = { ...defaultProps$o, ...props };
21608
21521
  const { className, style, children } = propAvatarGroup;
21609
21522
  const avatarGroupRef = React.useRef(null);
21610
- const cls = classNames(classPrefix$3, className);
21523
+ const cls = classNames(classPrefix$4, className);
21611
21524
  const parentAvatar = {
21612
21525
  propAvatarGroup,
21613
21526
  avatarGroupRef
@@ -21625,7 +21538,7 @@ Please add \`${key}Action\` when creating your handler.`);
21625
21538
  background: "#e5e9f2",
21626
21539
  clockwise: true
21627
21540
  };
21628
- const classPrefix$2 = `nut-circleprogress`;
21541
+ const classPrefix$3 = `nut-circleprogress`;
21629
21542
  const CircleProgress = (props) => {
21630
21543
  var _a2;
21631
21544
  const {
@@ -21644,7 +21557,7 @@ Please add \`${key}Action\` when creating your handler.`);
21644
21557
  ...defaultProps$n,
21645
21558
  ...props
21646
21559
  };
21647
- const classes = classNames(className, classPrefix$2);
21560
+ const classes = classNames(className, classPrefix$3);
21648
21561
  const refRandomId = Math.random().toString(36).slice(-8);
21649
21562
  const styles = {
21650
21563
  height: `${Number(radius) * 2}px`,
@@ -21893,13 +21806,16 @@ Please add \`${key}Action\` when creating your handler.`);
21893
21806
  Collapse.displayName = "NutCollapse";
21894
21807
  Collapse.Item = CollapseItem;
21895
21808
  const defaultProps$k = {
21809
+ ...ComponentDefaults,
21896
21810
  paused: false,
21897
21811
  startTime: Date.now(),
21898
21812
  endTime: Date.now(),
21813
+ remainingTime: 0,
21899
21814
  millisecond: false,
21900
21815
  format: "HH:mm:ss",
21901
21816
  autoStart: true,
21902
- time: 0
21817
+ time: 0,
21818
+ destroy: false
21903
21819
  };
21904
21820
  const InternalCountDown = (props, ref) => {
21905
21821
  useConfig();
@@ -21907,10 +21823,12 @@ Please add \`${key}Action\` when creating your handler.`);
21907
21823
  paused,
21908
21824
  startTime,
21909
21825
  endTime,
21826
+ remainingTime,
21910
21827
  millisecond,
21911
21828
  format: format2,
21912
21829
  autoStart,
21913
21830
  time,
21831
+ destroy,
21914
21832
  className,
21915
21833
  style,
21916
21834
  onEnd,
@@ -21920,7 +21838,7 @@ Please add \`${key}Action\` when creating your handler.`);
21920
21838
  children,
21921
21839
  ...rest
21922
21840
  } = { ...defaultProps$k, ...props };
21923
- const b = cn("countdown");
21841
+ const classPrefix2 = "nut-countdown";
21924
21842
  const [restTimeStamp, setRestTime] = React.useState(0);
21925
21843
  const stateRef = React.useRef({
21926
21844
  pauseTime: 0,
@@ -21945,8 +21863,12 @@ Please add \`${key}Action\` when creating your handler.`);
21945
21863
  return new Date(t).getTime();
21946
21864
  };
21947
21865
  const initTime = () => {
21948
- stateRef.current.handleEndTime = endTime;
21949
- stateRef.current.diffTime = Date.now() - getTimeStamp(startTime);
21866
+ if (remainingTime) {
21867
+ stateRef.current.handleEndTime = Date.now() + Number(remainingTime);
21868
+ } else {
21869
+ stateRef.current.handleEndTime = endTime;
21870
+ stateRef.current.diffTime = Date.now() - getTimeStamp(startTime);
21871
+ }
21950
21872
  if (!stateRef.current.counting)
21951
21873
  stateRef.current.counting = true;
21952
21874
  tick();
@@ -22088,7 +22010,7 @@ Please add \`${key}Action\` when creating your handler.`);
22088
22010
  if (stateRef.current.isIninted) {
22089
22011
  initTime();
22090
22012
  }
22091
- }, [endTime, startTime]);
22013
+ }, [endTime, startTime, remainingTime]);
22092
22014
  React.useEffect(() => {
22093
22015
  if (autoStart) {
22094
22016
  initTime();
@@ -22102,20 +22024,28 @@ Please add \`${key}Action\` when creating your handler.`);
22102
22024
  return componentWillUnmount;
22103
22025
  }, []);
22104
22026
  const componentWillUnmount = () => {
22105
- clearInterval(stateRef.current.timer);
22027
+ destroy && cancelAnimationFrame(stateRef.current.timer);
22106
22028
  };
22107
22029
  const renderTime = (() => {
22108
22030
  return formatRemainTime(stateRef.current.restTime);
22109
22031
  })();
22110
- return /* @__PURE__ */ React.createElement("div", { className: `${b()} ${className || ""}`, style: { ...style }, ...rest }, children || /* @__PURE__ */ React.createElement(
22032
+ return /* @__PURE__ */ React.createElement(
22111
22033
  "div",
22112
22034
  {
22113
- className: b("block"),
22114
- dangerouslySetInnerHTML: {
22115
- __html: `${renderTime}`
22035
+ className: `${classPrefix2} ${className}`,
22036
+ style: { ...style },
22037
+ ...rest
22038
+ },
22039
+ children || /* @__PURE__ */ React.createElement(
22040
+ "div",
22041
+ {
22042
+ className: `${classPrefix2}__block`,
22043
+ dangerouslySetInnerHTML: {
22044
+ __html: `${renderTime}`
22045
+ }
22116
22046
  }
22117
- }
22118
- ));
22047
+ )
22048
+ );
22119
22049
  };
22120
22050
  const CountDown = React.forwardRef(InternalCountDown);
22121
22051
  CountDown.defaultProps = defaultProps$k;
@@ -22130,7 +22060,7 @@ Please add \`${key}Action\` when creating your handler.`);
22130
22060
  symbol: "...",
22131
22061
  lineHeight: "20"
22132
22062
  };
22133
- const classPrefix$1 = `nut-ellipsis`;
22063
+ const classPrefix$2 = `nut-ellipsis`;
22134
22064
  const Ellipsis = (props) => {
22135
22065
  var _a2, _b;
22136
22066
  const {
@@ -22153,7 +22083,7 @@ Please add \`${key}Action\` when creating your handler.`);
22153
22083
  const [expanded, setExpanded] = React.useState(false);
22154
22084
  const ellipsis = React.useRef();
22155
22085
  const root2 = React.useRef(null);
22156
- const classes = classNames(classPrefix$1, className);
22086
+ const classes = classNames(classPrefix$2, className);
22157
22087
  React.useLayoutEffect(() => {
22158
22088
  if (content) {
22159
22089
  createContainer();
@@ -22297,6 +22227,7 @@ Please add \`${key}Action\` when creating your handler.`);
22297
22227
  Ellipsis.defaultProps = defaultProps$j;
22298
22228
  Ellipsis.displayName = "NutEllipsis";
22299
22229
  const defaultProps$i = {
22230
+ ...ComponentDefaults,
22300
22231
  source: {
22301
22232
  type: {},
22302
22233
  src: ""
@@ -22311,15 +22242,13 @@ Please add \`${key}Action\` when creating your handler.`);
22311
22242
  loop: false
22312
22243
  }
22313
22244
  };
22245
+ const classPrefix$1 = `nut-video`;
22314
22246
  const Video = (props) => {
22315
22247
  const {
22316
22248
  children,
22317
22249
  source,
22318
22250
  options: options2,
22319
22251
  className,
22320
- play,
22321
- pause,
22322
- playend,
22323
22252
  onPlay,
22324
22253
  onPause,
22325
22254
  onPlayEnd,
@@ -22329,8 +22258,7 @@ Please add \`${key}Action\` when creating your handler.`);
22329
22258
  ...props
22330
22259
  };
22331
22260
  const rootRef = React.useRef(null);
22332
- const b = cn("video");
22333
- const classes = classNames(className, b(""));
22261
+ const classes = classNames(className, classPrefix$1);
22334
22262
  React.useEffect(() => {
22335
22263
  init();
22336
22264
  }, []);
@@ -22350,16 +22278,13 @@ Please add \`${key}Action\` when creating your handler.`);
22350
22278
  }
22351
22279
  videoRef.addEventListener("play", () => {
22352
22280
  onPlay && onPlay(videoRef);
22353
- play && play(videoRef);
22354
22281
  });
22355
22282
  videoRef.addEventListener("pause", () => {
22356
22283
  onPause && onPause(videoRef);
22357
- pause && pause(videoRef);
22358
22284
  });
22359
22285
  videoRef.addEventListener("ended", () => {
22360
22286
  videoRef.currentTime = 0;
22361
22287
  onPlayEnd && onPlayEnd(videoRef);
22362
- playend && playend(videoRef);
22363
22288
  });
22364
22289
  }
22365
22290
  };
@@ -23124,18 +23049,18 @@ Please add \`${key}Action\` when creating your handler.`);
23124
23049
  return tempIndex;
23125
23050
  };
23126
23051
  const getEndIndex = ({
23127
- sourceData,
23052
+ list,
23128
23053
  startIndex,
23129
23054
  visibleCount,
23130
- itemEqualSize = true,
23055
+ itemEqual = true,
23131
23056
  positions,
23132
23057
  offSetSize,
23133
23058
  overscan,
23134
23059
  sizeKey = "width"
23135
23060
  }) => {
23136
- const dataLength = sourceData.length;
23061
+ const dataLength = list.length;
23137
23062
  let tempIndex = null;
23138
- if (itemEqualSize) {
23063
+ if (itemEqual) {
23139
23064
  const endIndex = startIndex + visibleCount;
23140
23065
  tempIndex = dataLength > 0 ? Math.min(dataLength, endIndex) : endIndex;
23141
23066
  } else {
@@ -23184,26 +23109,35 @@ Please add \`${key}Action\` when creating your handler.`);
23184
23109
  }
23185
23110
  });
23186
23111
  };
23187
- const defaultProps$d = {};
23112
+ const defaultProps$d = {
23113
+ ...ComponentDefaults,
23114
+ list: [],
23115
+ itemHeight: 66,
23116
+ itemEqual: true,
23117
+ direction: "vertical",
23118
+ overscan: 2
23119
+ };
23188
23120
  const VirtualList = (props) => {
23189
23121
  const {
23190
- sourceData = [],
23122
+ list,
23191
23123
  ItemRender,
23192
- itemEqualSize = true,
23193
- itemSize = 200,
23194
- horizontal = false,
23195
- overscan = 2,
23124
+ itemEqual,
23125
+ itemHeight,
23126
+ direction,
23127
+ overscan,
23196
23128
  key,
23197
- handleScroll,
23198
23129
  onScroll,
23199
23130
  className,
23200
- containerSize,
23131
+ containerHeight,
23201
23132
  ...rest
23202
- } = props;
23133
+ } = {
23134
+ ...defaultProps$d,
23135
+ ...props
23136
+ };
23137
+ const horizontal = direction === "horizontal";
23203
23138
  const sizeKey = horizontal ? "width" : "height";
23204
23139
  const scrollKey = horizontal ? "scrollLeft" : "scrollTop";
23205
23140
  const offsetKey = horizontal ? "left" : "top";
23206
- useConfig();
23207
23141
  const scrollRef = React.useRef(null);
23208
23142
  const itemsRef = React.useRef(null);
23209
23143
  const firstItemRef = React.useRef(null);
@@ -23220,7 +23154,7 @@ Please add \`${key}Action\` when creating your handler.`);
23220
23154
  ]);
23221
23155
  const [listTotalSize, setListTotalSize] = React.useState(99999999);
23222
23156
  const [visibleCount, setVisibleCount] = React.useState(0);
23223
- const [offSetSize, setOffSetSize] = React.useState(containerSize || 0);
23157
+ const [offSetSize, setOffSetSize] = React.useState(containerHeight || 0);
23224
23158
  const [options2, setOptions] = React.useState({
23225
23159
  startOffset: 0,
23226
23160
  // 可视区域距离顶部的偏移量
@@ -23231,30 +23165,30 @@ Please add \`${key}Action\` when creating your handler.`);
23231
23165
  // 可视区域结束索引
23232
23166
  });
23233
23167
  React.useEffect(() => {
23234
- const pos = initPositinoCache(itemSize, sourceData.length);
23168
+ const pos = initPositinoCache(itemHeight, list.length);
23235
23169
  setPositions(pos);
23236
23170
  const totalSize = getListTotalSize(pos, horizontal);
23237
23171
  setListTotalSize(totalSize);
23238
- }, [sourceData, itemSize, horizontal]);
23172
+ }, [list, itemHeight, horizontal]);
23239
23173
  const getElement = React.useCallback(() => {
23240
23174
  var _a2;
23241
23175
  return ((_a2 = scrollRef.current) == null ? void 0 : _a2.parentElement) || document.body;
23242
23176
  }, []);
23243
23177
  React.useEffect(() => {
23244
- if (containerSize)
23178
+ if (containerHeight)
23245
23179
  return;
23246
23180
  const size = horizontal ? getElement().offsetWidth : getElement().offsetHeight;
23247
23181
  setOffSetSize(size);
23248
- }, [getElement, horizontal, containerSize]);
23182
+ }, [getElement, horizontal, containerHeight]);
23249
23183
  React.useEffect(() => {
23250
23184
  if (offSetSize === 0)
23251
23185
  return;
23252
- const count = Math.ceil(offSetSize / itemSize) + overscan;
23186
+ const count = Math.ceil(offSetSize / itemHeight) + overscan;
23253
23187
  setVisibleCount(count);
23254
23188
  setOptions((options22) => {
23255
23189
  return { ...options22, endIndex: count };
23256
23190
  });
23257
- }, [getElement, horizontal, itemSize, overscan, offSetSize]);
23191
+ }, [getElement, horizontal, itemHeight, overscan, offSetSize]);
23258
23192
  const updateTotalSize = React.useCallback(() => {
23259
23193
  if (!itemsRef.current)
23260
23194
  return;
@@ -23270,14 +23204,14 @@ Please add \`${key}Action\` when creating your handler.`);
23270
23204
  const scrollSize = getElement()[scrollKey];
23271
23205
  const startIndex = binarySearch(positions, scrollSize, horizontal);
23272
23206
  const overStart = startIndex - overscan > -1 ? startIndex - overscan : 0;
23273
- if (!itemEqualSize) {
23207
+ if (!itemEqual) {
23274
23208
  updateTotalSize();
23275
23209
  }
23276
23210
  const endIndex = getEndIndex({
23277
- sourceData,
23211
+ list,
23278
23212
  startIndex,
23279
23213
  visibleCount,
23280
- itemEqualSize,
23214
+ itemEqual,
23281
23215
  positions,
23282
23216
  offSetSize,
23283
23217
  sizeKey,
@@ -23285,27 +23219,24 @@ Please add \`${key}Action\` when creating your handler.`);
23285
23219
  });
23286
23220
  const startOffset = positions[startIndex][offsetKey];
23287
23221
  setOptions({ startOffset, startIndex, overStart, endIndex });
23288
- if (endIndex > sourceData.length - 1) {
23222
+ if (endIndex > list.length - 1) {
23289
23223
  if (onScroll) {
23290
23224
  onScroll();
23291
- } else if (handleScroll) {
23292
- handleScroll();
23293
23225
  }
23294
23226
  }
23295
23227
  });
23296
23228
  }, [
23297
23229
  positions,
23298
23230
  getElement,
23299
- sourceData,
23231
+ list,
23300
23232
  visibleCount,
23301
- itemEqualSize,
23233
+ itemEqual,
23302
23234
  updateTotalSize,
23303
23235
  offsetKey,
23304
23236
  sizeKey,
23305
23237
  scrollKey,
23306
23238
  horizontal,
23307
23239
  overscan,
23308
- handleScroll,
23309
23240
  offSetSize
23310
23241
  ]);
23311
23242
  React.useEffect(() => {
@@ -23321,7 +23252,7 @@ Please add \`${key}Action\` when creating your handler.`);
23321
23252
  className: className ? `${className} nut-virtualList-box` : "nut-virtualList-box",
23322
23253
  ...rest,
23323
23254
  style: {
23324
- [sizeKey]: containerSize ? `${offSetSize}px` : ""
23255
+ [sizeKey]: containerHeight ? `${offSetSize}px` : ""
23325
23256
  }
23326
23257
  },
23327
23258
  /* @__PURE__ */ React.createElement(
@@ -23343,7 +23274,7 @@ Please add \`${key}Action\` when creating your handler.`);
23343
23274
  transform: horizontal ? `translate3d(${options2.startOffset}px,0,0)` : `translate3d(0,${options2.startOffset}px,0)`
23344
23275
  }
23345
23276
  },
23346
- sourceData.slice(options2.overStart, options2.endIndex).map((data, index) => {
23277
+ list.slice(options2.overStart, options2.endIndex).map((data, index) => {
23347
23278
  const { startIndex, overStart } = options2;
23348
23279
  const dataIndex = overStart + index;
23349
23280
  const styleVal = dataIndex < startIndex ? "none" : "block";
@@ -23740,7 +23671,7 @@ Please add \`${key}Action\` when creating your handler.`);
23740
23671
  },
23741
23672
  item.title,
23742
23673
  " ",
23743
- item.sorter && (sorterIcon || /* @__PURE__ */ React.createElement(x$9, { width: "12px", height: "12px" }))
23674
+ item.sorter && (sorterIcon || /* @__PURE__ */ React.createElement(x$a, { width: "12px", height: "12px" }))
23744
23675
  );
23745
23676
  });
23746
23677
  };
@@ -23886,7 +23817,7 @@ Please add \`${key}Action\` when creating your handler.`);
23886
23817
  },
23887
23818
  closeIcon
23888
23819
  ) : /* @__PURE__ */ React.createElement(
23889
- x$a,
23820
+ x$b,
23890
23821
  {
23891
23822
  width: 12,
23892
23823
  height: 12,
@@ -24242,43 +24173,42 @@ Please add \`${key}Action\` when creating your handler.`);
24242
24173
  TimeSelect.defaultProps = defaultProps$2;
24243
24174
  TimeSelect.displayName = "NutTimeSelect";
24244
24175
  const defaultProps$1 = {
24245
- rate: 0,
24176
+ ...ComponentDefaults,
24177
+ value: 0,
24246
24178
  digits: 2,
24247
- showSign: false,
24248
- showZero: false,
24179
+ symbol: false,
24180
+ zero: false,
24249
24181
  arrowLeft: false,
24250
- syncTextColor: true,
24251
- textColor: "#333",
24182
+ syncColor: true,
24183
+ color: "#333",
24252
24184
  riseColor: "#fa2c19",
24253
24185
  dropColor: "#64b578",
24254
- upIcon: null,
24255
- downIcon: null,
24256
- className: ""
24186
+ riseIcon: null,
24187
+ downIcon: null
24257
24188
  };
24258
24189
  const TrendArrow = (props) => {
24259
24190
  const {
24260
- rate,
24191
+ value,
24261
24192
  digits,
24262
- showSign,
24263
- showZero,
24193
+ symbol,
24194
+ zero,
24264
24195
  arrowLeft,
24265
- syncTextColor,
24266
- textColor,
24196
+ syncColor,
24197
+ color,
24267
24198
  riseColor,
24268
24199
  dropColor,
24269
- upIcon,
24200
+ riseIcon,
24270
24201
  downIcon,
24271
24202
  className,
24203
+ style,
24272
24204
  children,
24273
24205
  ...rest
24274
24206
  } = { ...defaultProps$1, ...props };
24275
- const b = cn("trendarrow");
24276
- const handleClick2 = () => {
24277
- };
24278
- const rateTrend = React.useRef(rate > 0);
24207
+ const classPrefix2 = "nut-trendarrow";
24208
+ const rateTrend = React.useRef(value > 0);
24279
24209
  const myFixed = (num, digit = 2) => {
24280
24210
  if (Object.is(parseFloat(num), NaN)) {
24281
- return console.log(`传入的值:${num}不是一个数字`);
24211
+ return console.warn(`传入的值:${num}不是一个数字`);
24282
24212
  }
24283
24213
  num = parseFloat(num);
24284
24214
  const numPow = Math.pow(10, digit);
@@ -24286,20 +24216,20 @@ Please add \`${key}Action\` when creating your handler.`);
24286
24216
  };
24287
24217
  const calcStyle = (() => {
24288
24218
  const arrowColor = rateTrend.current ? riseColor : dropColor;
24289
- const textEquArrowColor = syncTextColor ? arrowColor : textColor;
24290
- const style = {
24291
- color: rate === 0 ? textColor : textEquArrowColor
24219
+ const textEquArrowColor = syncColor ? arrowColor : color;
24220
+ const style2 = {
24221
+ color: value === 0 ? color : textEquArrowColor
24292
24222
  };
24293
- return style;
24223
+ return style2;
24294
24224
  })();
24295
24225
  const calcRate = (() => {
24296
- rateTrend.current = rate > 0;
24297
- const absRate = Math.abs(rate);
24298
- if (!showZero && rate === 0) {
24226
+ rateTrend.current = value > 0;
24227
+ const absRate = Math.abs(value);
24228
+ if (!zero && value === 0) {
24299
24229
  return "--";
24300
24230
  }
24301
24231
  const resultRate = `${// eslint-disable-next-line no-nested-ternary
24302
- showSign && rate !== 0 ? rateTrend.current ? "+" : "-" : ""}${myFixed(Number(absRate), digits)}%`;
24232
+ symbol && value !== 0 ? rateTrend.current ? "+" : "-" : ""}${myFixed(Number(absRate), digits)}%`;
24303
24233
  return resultRate;
24304
24234
  })();
24305
24235
  const calcIconProps = (() => {
@@ -24310,13 +24240,21 @@ Please add \`${key}Action\` when creating your handler.`);
24310
24240
  })();
24311
24241
  const renderContent = (arrowLeft2) => {
24312
24242
  const classNameSuffix = !arrowLeft2 ? "icon-after" : "icon-before";
24313
- return /* @__PURE__ */ React.createElement("span", { className: `${b(classNameSuffix)} ${b("rate")}`, style: calcStyle }, calcRate);
24243
+ return /* @__PURE__ */ React.createElement(
24244
+ "span",
24245
+ {
24246
+ className: `${classPrefix2}__${classNameSuffix} ${classPrefix2}__value`,
24247
+ style: calcStyle
24248
+ },
24249
+ calcRate
24250
+ );
24314
24251
  };
24315
- return /* @__PURE__ */ React.createElement("div", { className: `${b()} ${className}`, ...rest, onClick: handleClick2 }, !arrowLeft && renderContent(!arrowLeft), children || /* @__PURE__ */ React.createElement(React.Fragment, null, Number(rate) !== 0 && /* @__PURE__ */ React.createElement(React.Fragment, null, rateTrend ? /* @__PURE__ */ React.createElement(y, { color: calcIconProps.color }) : /* @__PURE__ */ React.createElement(y$1, { color: calcIconProps.color }))), arrowLeft && renderContent(!arrowLeft));
24252
+ return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2} ${className}`, style, ...rest }, !arrowLeft && renderContent(!arrowLeft), Number(value) !== 0 && /* @__PURE__ */ React.createElement(React.Fragment, null, rateTrend.current ? /* @__PURE__ */ React.createElement(React.Fragment, null, riseIcon || /* @__PURE__ */ React.createElement(y, { color: calcIconProps.color })) : /* @__PURE__ */ React.createElement(React.Fragment, null, downIcon || /* @__PURE__ */ React.createElement(y$1, { color: calcIconProps.color }))), arrowLeft && renderContent(!arrowLeft));
24316
24253
  };
24317
24254
  TrendArrow.defaultProps = defaultProps$1;
24318
24255
  TrendArrow.displayName = "NutTrendArrow";
24319
24256
  const defaultProps = {
24257
+ ...ComponentDefaults,
24320
24258
  content: "",
24321
24259
  fullPage: true,
24322
24260
  zIndex: 2e3,
@@ -24328,9 +24266,8 @@ Please add \`${key}Action\` when creating your handler.`);
24328
24266
  imageWidth: 120,
24329
24267
  imageHeight: 64,
24330
24268
  rotate: -22,
24331
- fontColor: "rgba(0,0,0,.15)",
24269
+ color: "rgba(0,0,0,.15)",
24332
24270
  fontStyle: "normal",
24333
- fontFamily: "PingFang SC",
24334
24271
  fontWeight: "normal",
24335
24272
  fontSize: 14
24336
24273
  };
@@ -24349,22 +24286,20 @@ Please add \`${key}Action\` when creating your handler.`);
24349
24286
  imageWidth,
24350
24287
  imageHeight,
24351
24288
  rotate,
24352
- fontColor,
24289
+ color,
24353
24290
  fontStyle,
24354
24291
  fontFamily,
24355
24292
  fontWeight,
24356
24293
  fontSize,
24357
- style,
24358
- children
24294
+ style
24359
24295
  } = {
24360
24296
  ...defaultProps,
24361
24297
  ...props
24362
24298
  };
24363
24299
  const [base64Url, setBase64Url] = React.useState("");
24364
- const b = cn("watermark");
24365
- const classes = classNames({
24366
- [`${b("")}`]: true,
24367
- [`${b("")}-full-page`]: fullPage
24300
+ const classPrefix2 = "nut-watermark";
24301
+ const classes = classNames(classPrefix2, {
24302
+ [`${classPrefix2}-full-page`]: fullPage
24368
24303
  });
24369
24304
  const cls = classNames(classes, className);
24370
24305
  React.useEffect(() => {
@@ -24406,7 +24341,7 @@ Please add \`${key}Action\` when creating your handler.`);
24406
24341
  ctx2.rotate(Math.PI / 180 * Number(rotate));
24407
24342
  const markSize = Number(fontSize) * ratio;
24408
24343
  ctx2.font = `${fontStyle} normal ${fontWeight} ${markSize}px/${markHeight}px ${fontFamily}`;
24409
- ctx2.fillStyle = fontColor;
24344
+ ctx2.fillStyle = color;
24410
24345
  ctx2.fillText(content, 0, 0);
24411
24346
  ctx2.restore();
24412
24347
  setBase64Url(canvas.toDataURL());