@nutui/nutui-react 3.0.17 → 3.0.19-beta.2

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 (241) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/cjs/hooks/taro/use-custom-event.js +5 -5
  3. package/dist/cjs/hooks/use-ref-state.js +3 -3
  4. package/dist/cjs/hooks/use-touch.js +1 -2
  5. package/dist/cjs/locales/ja-JP.d.ts +3 -0
  6. package/dist/cjs/locales/ja-JP.js +168 -0
  7. package/dist/cjs/packages/address/address.js +3 -3
  8. package/dist/cjs/packages/address/utils.js +3 -3
  9. package/dist/cjs/packages/avatarcropper/avatarcropper.js +4 -7
  10. package/dist/cjs/packages/badge/style/badge.scss +1 -1
  11. package/dist/cjs/packages/badge/style/style.css +1 -1
  12. package/dist/cjs/packages/badge/style-jmapp/badge.scss +1 -1
  13. package/dist/cjs/packages/badge/style-jmapp/style.css +1 -1
  14. package/dist/cjs/packages/badge/style-jrkf/badge.scss +1 -1
  15. package/dist/cjs/packages/badge/style-jrkf/style.css +1 -1
  16. package/dist/cjs/packages/calendar/utils.js +8 -8
  17. package/dist/cjs/packages/calendarcard/icon.js +5 -5
  18. package/dist/cjs/packages/calendarcard/utils.js +6 -6
  19. package/dist/cjs/packages/cascader/cascader.js +12 -21
  20. package/dist/cjs/packages/cascader/utils.js +3 -3
  21. package/dist/cjs/packages/col/col.js +16 -11
  22. package/dist/cjs/packages/collapseitem/collapseitem.js +4 -7
  23. package/dist/cjs/packages/configprovider/configprovider.js +7 -7
  24. package/dist/cjs/packages/configprovider/index.js +6 -6
  25. package/dist/cjs/packages/configprovider/types.d.ts +1 -1
  26. package/dist/cjs/packages/countdown/countdown.js +1 -2
  27. package/dist/cjs/packages/countdown/style/countdown.scss +1 -1
  28. package/dist/cjs/packages/countdown/style/style.css +1 -1
  29. package/dist/cjs/packages/countdown/style-jmapp/countdown.scss +1 -1
  30. package/dist/cjs/packages/countdown/style-jmapp/style.css +1 -1
  31. package/dist/cjs/packages/countdown/style-jrkf/countdown.scss +1 -1
  32. package/dist/cjs/packages/countdown/style-jrkf/style.css +1 -1
  33. package/dist/cjs/packages/datepicker/datepicker.js +1 -1
  34. package/dist/cjs/packages/datepicker/utils.js +9 -9
  35. package/dist/cjs/packages/dialog/content.js +3 -3
  36. package/dist/cjs/packages/dialog/dialog.js +4 -7
  37. package/dist/cjs/packages/dialog/style/dialog.scss +9 -1
  38. package/dist/cjs/packages/dialog/style/style.css +8 -1
  39. package/dist/cjs/packages/dialog/style-jmapp/dialog.scss +9 -1
  40. package/dist/cjs/packages/dialog/style-jmapp/style.css +8 -1
  41. package/dist/cjs/packages/dialog/style-jrkf/dialog.scss +9 -1
  42. package/dist/cjs/packages/dialog/style-jrkf/style.css +8 -1
  43. package/dist/cjs/packages/elevator/elevator.js +3 -3
  44. package/dist/cjs/packages/form/index.js +0 -2
  45. package/dist/cjs/packages/form/useform.js +50 -57
  46. package/dist/cjs/packages/infiniteloading/infiniteloading.js +8 -14
  47. package/dist/cjs/packages/inputnumber/inputnumber.js +16 -28
  48. package/dist/cjs/packages/lottie/animation/dark/global.gif +0 -0
  49. package/dist/cjs/packages/lottie/animation/dark/global.json +0 -0
  50. package/dist/cjs/packages/lottie/animation/dark/loading.gif +0 -0
  51. package/dist/cjs/packages/lottie/animation/dark/loading.json +0 -0
  52. package/dist/cjs/packages/lottie/animation/dark/pulltorefresh-white.gif +0 -0
  53. package/dist/cjs/packages/lottie/animation/dark/pulltorefresh-white.json +0 -0
  54. package/dist/cjs/packages/lottie/animation/dark/pulltorefresh.gif +0 -0
  55. package/dist/cjs/packages/lottie/animation/dark/pulltorefresh.json +0 -0
  56. package/dist/cjs/packages/lottie/animation/light/global.gif +0 -0
  57. package/dist/cjs/packages/lottie/animation/light/global.json +0 -0
  58. package/dist/cjs/packages/lottie/animation/light/loading.gif +0 -0
  59. package/dist/cjs/packages/lottie/animation/light/loading.json +0 -0
  60. package/dist/cjs/packages/lottie/animation/light/pulltorefresh.gif +0 -0
  61. package/dist/cjs/packages/lottie/animation/light/pulltorefresh.json +0 -0
  62. package/dist/cjs/packages/lottie/types.js +0 -2
  63. package/dist/cjs/packages/noticebar/style/noticebar.scss +6 -0
  64. package/dist/cjs/packages/noticebar/style/style.css +6 -0
  65. package/dist/cjs/packages/noticebar/style-jmapp/noticebar.scss +6 -0
  66. package/dist/cjs/packages/noticebar/style-jmapp/style.css +6 -0
  67. package/dist/cjs/packages/noticebar/style-jrkf/noticebar.scss +6 -0
  68. package/dist/cjs/packages/noticebar/style-jrkf/style.css +6 -0
  69. package/dist/cjs/packages/notify/notify.d.ts +1 -1
  70. package/dist/cjs/packages/notify/notify.js +5 -2
  71. package/dist/cjs/packages/nutui.react.build.js +105 -105
  72. package/dist/cjs/packages/nutui.react.js +105 -105
  73. package/dist/cjs/packages/overlay/overlay.js +3 -3
  74. package/dist/cjs/packages/pickerview/pickerview.js +1 -2
  75. package/dist/cjs/packages/pickerview/utils.js +3 -3
  76. package/dist/cjs/packages/popup/popup.d.ts +1 -1
  77. package/dist/cjs/packages/popup/popup.js +59 -4
  78. package/dist/cjs/packages/popup/style/popup.scss +0 -5
  79. package/dist/cjs/packages/popup/style/style.css +0 -3
  80. package/dist/cjs/packages/popup/style-jmapp/popup.scss +0 -5
  81. package/dist/cjs/packages/popup/style-jmapp/style.css +0 -3
  82. package/dist/cjs/packages/popup/style-jrkf/popup.scss +0 -5
  83. package/dist/cjs/packages/popup/style-jrkf/style.css +0 -3
  84. package/dist/cjs/packages/price/price.js +42 -14
  85. package/dist/cjs/packages/price/style/price.scss +3 -3
  86. package/dist/cjs/packages/price/style/style.css +3 -3
  87. package/dist/cjs/packages/price/style-jmapp/price.scss +3 -3
  88. package/dist/cjs/packages/price/style-jmapp/style.css +3 -3
  89. package/dist/cjs/packages/price/style-jrkf/price.scss +3 -3
  90. package/dist/cjs/packages/price/style-jrkf/style.css +3 -3
  91. package/dist/cjs/packages/pulltorefresh/pulltorefresh.js +41 -51
  92. package/dist/cjs/packages/radio/index.js +0 -2
  93. package/dist/cjs/packages/range/utils.js +3 -3
  94. package/dist/cjs/packages/rate/style/rate.scss +1 -1
  95. package/dist/cjs/packages/rate/style/style.css +1 -1
  96. package/dist/cjs/packages/rate/style-jmapp/rate.scss +1 -1
  97. package/dist/cjs/packages/rate/style-jmapp/style.css +1 -1
  98. package/dist/cjs/packages/rate/style-jrkf/rate.scss +1 -1
  99. package/dist/cjs/packages/rate/style-jrkf/style.css +1 -1
  100. package/dist/cjs/packages/searchbar/searchbar.js +3 -3
  101. package/dist/cjs/packages/shortpassword/shortpassword.js +3 -3
  102. package/dist/cjs/packages/skeleton/skeleton.js +2 -4
  103. package/dist/cjs/packages/swiper/effects/focus.js +4 -4
  104. package/dist/cjs/packages/swiper/index.js +0 -1
  105. package/dist/cjs/packages/switch/switch.js +4 -7
  106. package/dist/cjs/packages/uploader/uploader.js +31 -39
  107. package/dist/cjs/packages/virtuallist/utils.js +6 -6
  108. package/dist/cjs/packages/watermark/watermark.js +4 -8
  109. package/dist/cjs/types/spec/address/base.js +0 -2
  110. package/dist/cjs/types/spec/avatar/taro.d.ts +7 -1
  111. package/dist/cjs/types/spec/popup/base.d.ts +5 -0
  112. package/dist/cjs/types/spec/price/base.d.ts +8 -2
  113. package/dist/cjs/types/spec/price/base.js +12 -0
  114. package/dist/cjs/types/spec/searchbar/h5.d.ts +2 -1
  115. package/dist/cjs/types/spec/searchbar/taro.d.ts +1 -0
  116. package/dist/cjs/utils/date.js +5 -5
  117. package/dist/cjs/utils/event-mocker.js +10 -18
  118. package/dist/cjs/utils/get-rect.js +4 -4
  119. package/dist/cjs/utils/get-scroll-parent.js +3 -3
  120. package/dist/cjs/utils/merge-props.js +3 -3
  121. package/dist/cjs/utils/merge.js +6 -6
  122. package/dist/cjs/utils/raf.js +3 -3
  123. package/dist/cjs/utils/render.js +5 -9
  124. package/dist/cjs/utils/rubberband.js +3 -3
  125. package/dist/cjs/utils/taro/get-rect.d.ts +1 -0
  126. package/dist/cjs/utils/taro/get-rect.js +39 -13
  127. package/dist/cjs/utils/taro/get-system-info.js +4 -4
  128. package/dist/cjs/utils/taro/platform.js +5 -5
  129. package/dist/es/hooks/use-touch.js +1 -1
  130. package/dist/es/locales/ja-JP.d.ts +3 -0
  131. package/dist/es/locales/ja-JP.js +158 -0
  132. package/dist/es/packages/avatarcropper/avatarcropper.js +4 -7
  133. package/dist/es/packages/badge/style/badge.scss +1 -1
  134. package/dist/es/packages/badge/style/style.css +1 -1
  135. package/dist/es/packages/badge/style-jmapp/badge.scss +1 -1
  136. package/dist/es/packages/badge/style-jmapp/style.css +1 -1
  137. package/dist/es/packages/badge/style-jrkf/badge.scss +1 -1
  138. package/dist/es/packages/badge/style-jrkf/style.css +1 -1
  139. package/dist/es/packages/cascader/cascader.js +12 -21
  140. package/dist/es/packages/col/col.js +17 -12
  141. package/dist/es/packages/collapseitem/collapseitem.js +4 -7
  142. package/dist/es/packages/configprovider/types.d.ts +1 -1
  143. package/dist/es/packages/countdown/countdown.js +1 -2
  144. package/dist/es/packages/countdown/style/countdown.scss +1 -1
  145. package/dist/es/packages/countdown/style/style.css +1 -1
  146. package/dist/es/packages/countdown/style-jmapp/countdown.scss +1 -1
  147. package/dist/es/packages/countdown/style-jmapp/style.css +1 -1
  148. package/dist/es/packages/countdown/style-jrkf/countdown.scss +1 -1
  149. package/dist/es/packages/countdown/style-jrkf/style.css +1 -1
  150. package/dist/es/packages/datepicker/datepicker.js +1 -1
  151. package/dist/es/packages/dialog/dialog.js +4 -7
  152. package/dist/es/packages/dialog/style/dialog.scss +9 -1
  153. package/dist/es/packages/dialog/style/style.css +8 -1
  154. package/dist/es/packages/dialog/style-jmapp/dialog.scss +9 -1
  155. package/dist/es/packages/dialog/style-jmapp/style.css +8 -1
  156. package/dist/es/packages/dialog/style-jrkf/dialog.scss +9 -1
  157. package/dist/es/packages/dialog/style-jrkf/style.css +8 -1
  158. package/dist/es/packages/form/index.js +0 -1
  159. package/dist/es/packages/form/useform.js +46 -53
  160. package/dist/es/packages/infiniteloading/infiniteloading.js +8 -14
  161. package/dist/es/packages/inputnumber/inputnumber.js +16 -28
  162. package/dist/es/packages/lottie/animation/dark/global.gif +0 -0
  163. package/dist/es/packages/lottie/animation/dark/global.json +0 -0
  164. package/dist/es/packages/lottie/animation/dark/loading.gif +0 -0
  165. package/dist/es/packages/lottie/animation/dark/loading.json +0 -0
  166. package/dist/es/packages/lottie/animation/dark/pulltorefresh-white.gif +0 -0
  167. package/dist/es/packages/lottie/animation/dark/pulltorefresh-white.json +0 -0
  168. package/dist/es/packages/lottie/animation/dark/pulltorefresh.gif +0 -0
  169. package/dist/es/packages/lottie/animation/dark/pulltorefresh.json +0 -0
  170. package/dist/es/packages/lottie/animation/light/global.gif +0 -0
  171. package/dist/es/packages/lottie/animation/light/global.json +0 -0
  172. package/dist/es/packages/lottie/animation/light/loading.gif +0 -0
  173. package/dist/es/packages/lottie/animation/light/loading.json +0 -0
  174. package/dist/es/packages/lottie/animation/light/pulltorefresh.gif +0 -0
  175. package/dist/es/packages/lottie/animation/light/pulltorefresh.json +0 -0
  176. package/dist/es/packages/lottie/types.js +1 -1
  177. package/dist/es/packages/noticebar/style/noticebar.scss +6 -0
  178. package/dist/es/packages/noticebar/style/style.css +6 -0
  179. package/dist/es/packages/noticebar/style-jmapp/noticebar.scss +6 -0
  180. package/dist/es/packages/noticebar/style-jmapp/style.css +6 -0
  181. package/dist/es/packages/noticebar/style-jrkf/noticebar.scss +6 -0
  182. package/dist/es/packages/noticebar/style-jrkf/style.css +6 -0
  183. package/dist/es/packages/notify/notify.d.ts +1 -1
  184. package/dist/es/packages/notify/notify.js +5 -2
  185. package/dist/es/packages/pickerview/pickerview.js +1 -2
  186. package/dist/es/packages/popup/popup.d.ts +1 -1
  187. package/dist/es/packages/popup/popup.js +60 -5
  188. package/dist/es/packages/popup/style/popup.scss +0 -5
  189. package/dist/es/packages/popup/style/style.css +0 -3
  190. package/dist/es/packages/popup/style-jmapp/popup.scss +0 -5
  191. package/dist/es/packages/popup/style-jmapp/style.css +0 -3
  192. package/dist/es/packages/popup/style-jrkf/popup.scss +0 -5
  193. package/dist/es/packages/popup/style-jrkf/style.css +0 -3
  194. package/dist/es/packages/price/price.js +41 -14
  195. package/dist/es/packages/price/style/price.scss +3 -3
  196. package/dist/es/packages/price/style/style.css +3 -3
  197. package/dist/es/packages/price/style-jmapp/price.scss +3 -3
  198. package/dist/es/packages/price/style-jmapp/style.css +3 -3
  199. package/dist/es/packages/price/style-jrkf/price.scss +3 -3
  200. package/dist/es/packages/price/style-jrkf/style.css +3 -3
  201. package/dist/es/packages/pulltorefresh/pulltorefresh.js +41 -51
  202. package/dist/es/packages/radio/index.js +0 -1
  203. package/dist/es/packages/rate/style/rate.scss +1 -1
  204. package/dist/es/packages/rate/style/style.css +1 -1
  205. package/dist/es/packages/rate/style-jmapp/rate.scss +1 -1
  206. package/dist/es/packages/rate/style-jmapp/style.css +1 -1
  207. package/dist/es/packages/rate/style-jrkf/rate.scss +1 -1
  208. package/dist/es/packages/rate/style-jrkf/style.css +1 -1
  209. package/dist/es/packages/searchbar/searchbar.js +3 -3
  210. package/dist/es/packages/skeleton/skeleton.js +2 -4
  211. package/dist/es/packages/swiper/index.js +0 -1
  212. package/dist/es/packages/switch/switch.js +4 -7
  213. package/dist/es/packages/uploader/uploader.js +31 -39
  214. package/dist/es/packages/watermark/watermark.js +4 -8
  215. package/dist/es/types/spec/address/base.js +1 -1
  216. package/dist/es/types/spec/avatar/taro.d.ts +7 -1
  217. package/dist/es/types/spec/popup/base.d.ts +20 -0
  218. package/dist/es/types/spec/price/base.d.ts +10 -4
  219. package/dist/es/types/spec/price/base.js +6 -1
  220. package/dist/es/types/spec/searchbar/h5.d.ts +2 -1
  221. package/dist/es/types/spec/searchbar/taro.d.ts +1 -0
  222. package/dist/es/utils/event-mocker.js +4 -12
  223. package/dist/es/utils/render.js +2 -6
  224. package/dist/es/utils/taro/get-rect.d.ts +1 -0
  225. package/dist/es/utils/taro/get-rect.js +34 -10
  226. package/dist/nutui.react.umd.js +1521 -1500
  227. package/dist/style-jmapp.css +1 -1
  228. package/dist/style-jmapp.scss +46 -46
  229. package/dist/style-jrkf.css +1 -1
  230. package/dist/style-jrkf.scss +31 -31
  231. package/dist/style.css +1 -1
  232. package/dist/style.scss +38 -38
  233. package/dist/styles/jd-font.scss +4 -4
  234. package/dist/styles/theme-dark.scss +90 -56
  235. package/dist/styles/theme-default.scss +94 -60
  236. package/dist/styles/themes/dark.css +1 -1
  237. package/dist/styles/themes/default.css +1 -1
  238. package/dist/styles/variables-jmapp.scss +4 -0
  239. package/dist/styles/variables-jrkf.scss +4 -0
  240. package/dist/styles/variables.scss +4 -0
  241. package/package.json +1 -72
@@ -5,17 +5,17 @@ Object.defineProperty(exports, "__esModule", {
5
5
  function _export(target, all) {
6
6
  for(var name in all)Object.defineProperty(target, name, {
7
7
  enumerable: true,
8
- get: all[name]
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- SECRET: function() {
12
+ get SECRET () {
13
13
  return SECRET;
14
14
  },
15
- useForm: function() {
15
+ get useForm () {
16
16
  return useForm;
17
17
  },
18
- useWatch: function() {
18
+ get useWatch () {
19
19
  return useWatch;
20
20
  }
21
21
  });
@@ -40,7 +40,6 @@ var SECRET = 'NUT_FORM_INTERNAL';
40
40
  var _this = this;
41
41
  var _this1 = this;
42
42
  (0, _class_call_check._)(this, FormStore);
43
- var _this2 = this;
44
43
  // 初始化数据
45
44
  (0, _define_property._)(this, "initialValues", {});
46
45
  (0, _define_property._)(this, "updateList", []);
@@ -128,8 +127,8 @@ var SECRET = 'NUT_FORM_INTERNAL';
128
127
  (0, _define_property._)(this, "setCallback", function(callback) {
129
128
  _this.callbacks = (0, _object_spread._)({}, _this.callbacks, callback);
130
129
  });
131
- (0, _define_property._)(this, "validateEntities", /*#__PURE__*/ function() {
132
- var _ref = (0, _async_to_generator._)(function(entity, errs) {
130
+ (0, _define_property._)(this, "validateEntities", function(entity, errs) {
131
+ return (0, _async_to_generator._)(function() {
133
132
  var _entity_props, name, _entity_props_rules, rules, descriptor, validator, _this_store, param, errors, _errs;
134
133
  return (0, _ts_generator._)(this, function(_state) {
135
134
  switch(_state.label){
@@ -164,7 +163,7 @@ var SECRET = 'NUT_FORM_INTERNAL';
164
163
  ]);
165
164
  return [
166
165
  4,
167
- validator.validate((0, _define_property._)({}, name, (_this_store = _this2.store) === null || _this_store === void 0 ? void 0 : _this_store[name]))
166
+ validator.validate((0, _define_property._)({}, name, (_this_store = this.store) === null || _this_store === void 0 ? void 0 : _this_store[name]))
168
167
  ];
169
168
  case 2:
170
169
  _state.sent();
@@ -178,7 +177,7 @@ var SECRET = 'NUT_FORM_INTERNAL';
178
177
  if (errors) {
179
178
  ;
180
179
  (_errs = errs).push.apply(_errs, (0, _to_consumable_array._)(errors));
181
- _this2.errors[name] = errors;
180
+ this.errors[name] = errors;
182
181
  }
183
182
  return [
184
183
  3,
@@ -186,7 +185,7 @@ var SECRET = 'NUT_FORM_INTERNAL';
186
185
  ];
187
186
  case 4:
188
187
  if (!errs || errs.length === 0) {
189
- _this2.errors[name] = [];
188
+ this.errors[name] = [];
190
189
  }
191
190
  return [
192
191
  7
@@ -198,23 +197,21 @@ var SECRET = 'NUT_FORM_INTERNAL';
198
197
  ];
199
198
  }
200
199
  });
201
- });
202
- return function(entity, errs) {
203
- return _ref.apply(this, arguments);
204
- };
205
- }());
206
- (0, _define_property._)(this, "validateFields", /*#__PURE__*/ function() {
207
- var _ref = (0, _async_to_generator._)(function(nameList) {
208
- var filterEntities, errs;
200
+ }).call(_this);
201
+ });
202
+ (0, _define_property._)(this, "validateFields", function(nameList) {
203
+ return (0, _async_to_generator._)(function() {
204
+ var _this, filterEntities, errs;
209
205
  return (0, _ts_generator._)(this, function(_state) {
210
206
  switch(_state.label){
211
207
  case 0:
208
+ _this = this;
212
209
  filterEntities = [];
213
210
  // this.errors.length = 0
214
211
  if (!nameList || nameList.length === 0) {
215
- filterEntities = _this2.fieldEntities;
212
+ filterEntities = this.fieldEntities;
216
213
  } else {
217
- filterEntities = _this2.fieldEntities.filter(function(param) {
214
+ filterEntities = this.fieldEntities.filter(function(param) {
218
215
  var name = param.props.name;
219
216
  return nameList.includes(name);
220
217
  });
@@ -222,14 +219,14 @@ var SECRET = 'NUT_FORM_INTERNAL';
222
219
  errs = [];
223
220
  return [
224
221
  4,
225
- Promise.all(filterEntities.map(/*#__PURE__*/ function() {
226
- var _ref = (0, _async_to_generator._)(function(entity) {
222
+ Promise.all(filterEntities.map(function(entity) {
223
+ return (0, _async_to_generator._)(function() {
227
224
  return (0, _ts_generator._)(this, function(_state) {
228
225
  switch(_state.label){
229
226
  case 0:
230
227
  return [
231
228
  4,
232
- _this2.validateEntities(entity, errs)
229
+ this.validateEntities(entity, errs)
233
230
  ];
234
231
  case 1:
235
232
  _state.sent();
@@ -238,11 +235,8 @@ var SECRET = 'NUT_FORM_INTERNAL';
238
235
  ];
239
236
  }
240
237
  });
241
- });
242
- return function(entity) {
243
- return _ref.apply(this, arguments);
244
- };
245
- }()))
238
+ }).call(_this);
239
+ }))
246
240
  ];
247
241
  case 1:
248
242
  _state.sent();
@@ -252,35 +246,34 @@ var SECRET = 'NUT_FORM_INTERNAL';
252
246
  ];
253
247
  }
254
248
  });
255
- });
256
- return function(nameList) {
257
- return _ref.apply(this, arguments);
258
- };
259
- }());
260
- (0, _define_property._)(this, "submit", /*#__PURE__*/ (0, _async_to_generator._)(function() {
261
- var errors, _this_callbacks_onFinish, _this_callbacks, _this_callbacks_onFinishFailed, _this_callbacks1;
262
- return (0, _ts_generator._)(this, function(_state) {
263
- switch(_state.label){
264
- case 0:
265
- return [
266
- 4,
267
- _this2.validateFields()
268
- ];
269
- case 1:
270
- errors = _state.sent();
271
- if (errors.length === 0) {
272
- ;
273
- (_this_callbacks_onFinish = (_this_callbacks = _this2.callbacks).onFinish) === null || _this_callbacks_onFinish === void 0 ? void 0 : _this_callbacks_onFinish.call(_this_callbacks, _this2.store);
274
- } else if (errors.length > 0) {
275
- ;
276
- (_this_callbacks_onFinishFailed = (_this_callbacks1 = _this2.callbacks).onFinishFailed) === null || _this_callbacks_onFinishFailed === void 0 ? void 0 : _this_callbacks_onFinishFailed.call(_this_callbacks1, _this2.store, errors);
277
- }
278
- return [
279
- 2
280
- ];
281
- }
282
- });
283
- }));
249
+ }).call(_this);
250
+ });
251
+ (0, _define_property._)(this, "submit", function() {
252
+ return (0, _async_to_generator._)(function() {
253
+ var errors, _this_callbacks_onFinish, _this_callbacks, _this_callbacks_onFinishFailed, _this_callbacks1;
254
+ return (0, _ts_generator._)(this, function(_state) {
255
+ switch(_state.label){
256
+ case 0:
257
+ return [
258
+ 4,
259
+ this.validateFields()
260
+ ];
261
+ case 1:
262
+ errors = _state.sent();
263
+ if (errors.length === 0) {
264
+ ;
265
+ (_this_callbacks_onFinish = (_this_callbacks = this.callbacks).onFinish) === null || _this_callbacks_onFinish === void 0 ? void 0 : _this_callbacks_onFinish.call(_this_callbacks, this.store);
266
+ } else if (errors.length > 0) {
267
+ ;
268
+ (_this_callbacks_onFinishFailed = (_this_callbacks1 = this.callbacks).onFinishFailed) === null || _this_callbacks_onFinishFailed === void 0 ? void 0 : _this_callbacks_onFinishFailed.call(_this_callbacks1, this.store, errors);
269
+ }
270
+ return [
271
+ 2
272
+ ];
273
+ }
274
+ });
275
+ }).call(_this);
276
+ });
284
277
  (0, _define_property._)(this, "resetFields", function(namePaths) {
285
278
  if (namePaths && namePaths.length) {
286
279
  namePaths.forEach(function(path) {
@@ -100,8 +100,8 @@ var InfiniteLoading = function InfiniteLoading(props) {
100
100
  transition: isTouching.current ? "height 0s cubic-bezier(0.25,0.1,0.25,1)" : "height 0.2s cubic-bezier(0.25,0.1,0.25,1)"
101
101
  };
102
102
  };
103
- var handleScroll = /*#__PURE__*/ function() {
104
- var _ref = (0, _async_to_generator._)(function() {
103
+ var handleScroll = function handleScroll() {
104
+ return (0, _async_to_generator._)(function() {
105
105
  return (0, _ts_generator._)(this, function(_state) {
106
106
  switch(_state.label){
107
107
  case 0:
@@ -123,11 +123,8 @@ var InfiniteLoading = function InfiniteLoading(props) {
123
123
  ];
124
124
  }
125
125
  });
126
- });
127
- return function handleScroll() {
128
- return _ref.apply(this, arguments);
129
- };
130
- }();
126
+ })();
127
+ };
131
128
  var infiniteDone = function infiniteDone() {
132
129
  setIsInfiniting(false);
133
130
  };
@@ -163,8 +160,8 @@ var InfiniteLoading = function InfiniteLoading(props) {
163
160
  isTouching.current = false;
164
161
  }
165
162
  };
166
- var touchEnd = /*#__PURE__*/ function() {
167
- var _ref = (0, _async_to_generator._)(function() {
163
+ var touchEnd = function touchEnd() {
164
+ return (0, _async_to_generator._)(function() {
168
165
  return (0, _ts_generator._)(this, function(_state) {
169
166
  switch(_state.label){
170
167
  case 0:
@@ -194,11 +191,8 @@ var InfiniteLoading = function InfiniteLoading(props) {
194
191
  ];
195
192
  }
196
193
  });
197
- });
198
- return function touchEnd() {
199
- return _ref.apply(this, arguments);
200
- };
201
- }();
194
+ })();
195
+ };
202
196
  var getWindowScrollTop = function getWindowScrollTop() {
203
197
  return window.scrollY !== undefined ? window.scrollY : (document.documentElement || document.body.parentNode || document.body).scrollTop;
204
198
  };
@@ -105,8 +105,8 @@ var InputNumber = function InputNumber(props) {
105
105
  var stepAmount = parseFloat(stepValue) * symbol;
106
106
  return (currentValue * dig + stepAmount * dig) / dig;
107
107
  };
108
- var update = /*#__PURE__*/ function() {
109
- var _ref = (0, _async_to_generator._)(function(negative, e) {
108
+ var update = function update(negative, e) {
109
+ return (0, _async_to_generator._)(function() {
110
110
  var shouldOverBoundary, maybeResume, nextValue;
111
111
  return (0, _ts_generator._)(this, function(_state) {
112
112
  switch(_state.label){
@@ -137,13 +137,10 @@ var InputNumber = function InputNumber(props) {
137
137
  ];
138
138
  }
139
139
  });
140
- });
141
- return function update(negative, e) {
142
- return _ref.apply(this, arguments);
143
- };
144
- }();
145
- var handleReduce = /*#__PURE__*/ function() {
146
- var _ref = (0, _async_to_generator._)(function(e) {
140
+ })();
141
+ };
142
+ var handleReduce = function handleReduce(e) {
143
+ return (0, _async_to_generator._)(function() {
147
144
  return (0, _ts_generator._)(this, function(_state) {
148
145
  switch(_state.label){
149
146
  case 0:
@@ -161,13 +158,10 @@ var InputNumber = function InputNumber(props) {
161
158
  ];
162
159
  }
163
160
  });
164
- });
165
- return function handleReduce(e) {
166
- return _ref.apply(this, arguments);
167
- };
168
- }();
169
- var handlePlus = /*#__PURE__*/ function() {
170
- var _ref = (0, _async_to_generator._)(function(e) {
161
+ })();
162
+ };
163
+ var handlePlus = function handlePlus(e) {
164
+ return (0, _async_to_generator._)(function() {
171
165
  return (0, _ts_generator._)(this, function(_state) {
172
166
  switch(_state.label){
173
167
  case 0:
@@ -185,18 +179,15 @@ var InputNumber = function InputNumber(props) {
185
179
  ];
186
180
  }
187
181
  });
188
- });
189
- return function handlePlus(e) {
190
- return _ref.apply(this, arguments);
191
- };
192
- }();
182
+ })();
183
+ };
193
184
  var parseValue = function parseValue(text) {
194
185
  if (text === '') return null;
195
186
  if (text === '-') return null;
196
187
  return text;
197
188
  };
198
- var handleInputChange = /*#__PURE__*/ function() {
199
- var _ref = (0, _async_to_generator._)(function(e) {
189
+ var handleInputChange = function handleInputChange(e) {
190
+ return (0, _async_to_generator._)(function() {
200
191
  var valueStr, maybeResume;
201
192
  return (0, _ts_generator._)(this, function(_state) {
202
193
  switch(_state.label){
@@ -224,11 +215,8 @@ var InputNumber = function InputNumber(props) {
224
215
  ];
225
216
  }
226
217
  });
227
- });
228
- return function handleInputChange(e) {
229
- return _ref.apply(this, arguments);
230
- };
231
- }();
218
+ })();
219
+ };
232
220
  var handleFocus = function handleFocus(e) {
233
221
  setFocused(true);
234
222
  setInputValue(shadowValue !== undefined && shadowValue !== null ? (0, _bound.bound)(Number(shadowValue), Number(min), Number(max)).toString() : '');
@@ -2,5 +2,3 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- var _interop_require_default = require("@swc/helpers/_/_interop_require_default");
6
- var _react = /*#__PURE__*/ _interop_require_default._(require("react"));
@@ -51,6 +51,9 @@
51
51
  min-width: $noticebar-left-icon-width;
52
52
  margin-right: $noticebar-icon-gap;
53
53
  background-size: 100% 100%;
54
+ .nut-icon {
55
+ color: $noticebar-color;
56
+ }
54
57
  }
55
58
 
56
59
  &-right-icon {
@@ -63,12 +66,14 @@
63
66
  .nut-icon {
64
67
  width: 12px;
65
68
  height: 12px;
69
+ color: $noticebar-color;
66
70
  }
67
71
  }
68
72
 
69
73
  &-wrap {
70
74
  display: flex;
71
75
  flex: 1;
76
+ align-items: center;
72
77
  height: $noticebar-line-height;
73
78
  line-height: $noticebar-line-height;
74
79
  overflow: hidden;
@@ -77,6 +82,7 @@
77
82
  .nut-noticebar-box-wrap-content {
78
83
  position: absolute;
79
84
  white-space: nowrap;
85
+ color: $noticebar-color;
80
86
 
81
87
  &.nut-ellipsis {
82
88
  max-width: 100%;
@@ -45,6 +45,9 @@
45
45
  margin-right: var(--nutui-noticebar-icon-gap, 4px);
46
46
  background-size: 100% 100%;
47
47
  }
48
+ .nut-noticebar .nut-noticebar-box-left-icon .nut-icon {
49
+ color: var(--nutui-noticebar-color, #d9500b);
50
+ }
48
51
  .nut-noticebar .nut-noticebar-box-right-icon {
49
52
  display: flex;
50
53
  align-items: center;
@@ -55,10 +58,12 @@
55
58
  .nut-noticebar .nut-noticebar-box-right-icon .nut-icon {
56
59
  width: 12px;
57
60
  height: 12px;
61
+ color: var(--nutui-noticebar-color, #d9500b);
58
62
  }
59
63
  .nut-noticebar .nut-noticebar-box-wrap {
60
64
  display: flex;
61
65
  flex: 1;
66
+ align-items: center;
62
67
  height: var(--nutui-noticebar-line-height, 24px);
63
68
  line-height: var(--nutui-noticebar-line-height, 24px);
64
69
  overflow: hidden;
@@ -67,6 +72,7 @@
67
72
  .nut-noticebar .nut-noticebar-box-wrap .nut-noticebar-box-wrap-content {
68
73
  position: absolute;
69
74
  white-space: nowrap;
75
+ color: var(--nutui-noticebar-color, #d9500b);
70
76
  }
71
77
  .nut-noticebar .nut-noticebar-box-wrap .nut-noticebar-box-wrap-content.nut-ellipsis {
72
78
  max-width: 100%;
@@ -51,6 +51,9 @@
51
51
  min-width: $noticebar-left-icon-width;
52
52
  margin-right: $noticebar-icon-gap;
53
53
  background-size: 100% 100%;
54
+ .nut-icon {
55
+ color: $noticebar-color;
56
+ }
54
57
  }
55
58
 
56
59
  &-right-icon {
@@ -63,12 +66,14 @@
63
66
  .nut-icon {
64
67
  width: 12px;
65
68
  height: 12px;
69
+ color: $noticebar-color;
66
70
  }
67
71
  }
68
72
 
69
73
  &-wrap {
70
74
  display: flex;
71
75
  flex: 1;
76
+ align-items: center;
72
77
  height: $noticebar-line-height;
73
78
  line-height: $noticebar-line-height;
74
79
  overflow: hidden;
@@ -77,6 +82,7 @@
77
82
  .nut-noticebar-box-wrap-content {
78
83
  position: absolute;
79
84
  white-space: nowrap;
85
+ color: $noticebar-color;
80
86
 
81
87
  &.nut-ellipsis {
82
88
  max-width: 100%;
@@ -45,6 +45,9 @@
45
45
  margin-right: var(--nutui-noticebar-icon-gap, 4px);
46
46
  background-size: 100% 100%;
47
47
  }
48
+ .nut-noticebar .nut-noticebar-box-left-icon .nut-icon {
49
+ color: var(--nutui-noticebar-color, #d9500b);
50
+ }
48
51
  .nut-noticebar .nut-noticebar-box-right-icon {
49
52
  display: flex;
50
53
  align-items: center;
@@ -55,10 +58,12 @@
55
58
  .nut-noticebar .nut-noticebar-box-right-icon .nut-icon {
56
59
  width: 12px;
57
60
  height: 12px;
61
+ color: var(--nutui-noticebar-color, #d9500b);
58
62
  }
59
63
  .nut-noticebar .nut-noticebar-box-wrap {
60
64
  display: flex;
61
65
  flex: 1;
66
+ align-items: center;
62
67
  height: var(--nutui-noticebar-line-height, 24px);
63
68
  line-height: var(--nutui-noticebar-line-height, 24px);
64
69
  overflow: hidden;
@@ -67,6 +72,7 @@
67
72
  .nut-noticebar .nut-noticebar-box-wrap .nut-noticebar-box-wrap-content {
68
73
  position: absolute;
69
74
  white-space: nowrap;
75
+ color: var(--nutui-noticebar-color, #d9500b);
70
76
  }
71
77
  .nut-noticebar .nut-noticebar-box-wrap .nut-noticebar-box-wrap-content.nut-ellipsis {
72
78
  max-width: 100%;
@@ -51,6 +51,9 @@
51
51
  min-width: $noticebar-left-icon-width;
52
52
  margin-right: $noticebar-icon-gap;
53
53
  background-size: 100% 100%;
54
+ .nut-icon {
55
+ color: $noticebar-color;
56
+ }
54
57
  }
55
58
 
56
59
  &-right-icon {
@@ -63,12 +66,14 @@
63
66
  .nut-icon {
64
67
  width: 12px;
65
68
  height: 12px;
69
+ color: $noticebar-color;
66
70
  }
67
71
  }
68
72
 
69
73
  &-wrap {
70
74
  display: flex;
71
75
  flex: 1;
76
+ align-items: center;
72
77
  height: $noticebar-line-height;
73
78
  line-height: $noticebar-line-height;
74
79
  overflow: hidden;
@@ -77,6 +82,7 @@
77
82
  .nut-noticebar-box-wrap-content {
78
83
  position: absolute;
79
84
  white-space: nowrap;
85
+ color: $noticebar-color;
80
86
 
81
87
  &.nut-ellipsis {
82
88
  max-width: 100%;
@@ -45,6 +45,9 @@
45
45
  margin-right: var(--nutui-noticebar-icon-gap, 4px);
46
46
  background-size: 100% 100%;
47
47
  }
48
+ .nut-noticebar .nut-noticebar-box-left-icon .nut-icon {
49
+ color: var(--nutui-noticebar-color, #d9500b);
50
+ }
48
51
  .nut-noticebar .nut-noticebar-box-right-icon {
49
52
  display: flex;
50
53
  align-items: center;
@@ -55,10 +58,12 @@
55
58
  .nut-noticebar .nut-noticebar-box-right-icon .nut-icon {
56
59
  width: 12px;
57
60
  height: 12px;
61
+ color: var(--nutui-noticebar-color, #d9500b);
58
62
  }
59
63
  .nut-noticebar .nut-noticebar-box-wrap {
60
64
  display: flex;
61
65
  flex: 1;
66
+ align-items: center;
62
67
  height: var(--nutui-noticebar-line-height, 24px);
63
68
  line-height: var(--nutui-noticebar-line-height, 24px);
64
69
  overflow: hidden;
@@ -67,6 +72,7 @@
67
72
  .nut-noticebar .nut-noticebar-box-wrap .nut-noticebar-box-wrap-content {
68
73
  position: absolute;
69
74
  white-space: nowrap;
75
+ color: var(--nutui-noticebar-color, #d9500b);
70
76
  }
71
77
  .nut-noticebar .nut-noticebar-box-wrap .nut-noticebar-box-wrap-content.nut-ellipsis {
72
78
  max-width: 100%;
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  declare const _default: {
3
- text(message: string | React.ReactNode, option?: {}): void;
3
+ text(message: string | React.ReactNode, option?: {}): Promise<void>;
4
4
  hide(): void;
5
5
  };
6
6
  export default _default;
@@ -39,8 +39,11 @@ function getInstance(props, callback) {
39
39
  }
40
40
  function notice(opts) {
41
41
  opts = (0, _object_spread._)({}, options, opts);
42
- getInstance(opts, function(notification) {
43
- messageInstance = notification;
42
+ return new Promise(function(resolve) {
43
+ getInstance(opts, function(notification) {
44
+ messageInstance = notification;
45
+ resolve();
46
+ });
44
47
  });
45
48
  }
46
49
  var errorMsg = function errorMsg(message) {