@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
@@ -111,22 +111,24 @@ var InternalUploader = function InternalUploader(props, ref) {
111
111
  ]);
112
112
  (0, _react.useImperativeHandle)(ref, function() {
113
113
  return {
114
- submit: /*#__PURE__*/ (0, _async_to_generator._)(function() {
115
- return (0, _ts_generator._)(this, function(_state) {
116
- switch(_state.label){
117
- case 0:
118
- return [
119
- 4,
120
- uploadAction(uploadQueue)
121
- ];
122
- case 1:
123
- _state.sent();
124
- return [
125
- 2
126
- ];
127
- }
128
- });
129
- }),
114
+ submit: function submit() {
115
+ return (0, _async_to_generator._)(function() {
116
+ return (0, _ts_generator._)(this, function(_state) {
117
+ switch(_state.label){
118
+ case 0:
119
+ return [
120
+ 4,
121
+ uploadAction(uploadQueue)
122
+ ];
123
+ case 1:
124
+ _state.sent();
125
+ return [
126
+ 2
127
+ ];
128
+ }
129
+ });
130
+ })();
131
+ },
130
132
  clear: function clear() {
131
133
  clearUploadQueue();
132
134
  }
@@ -183,8 +185,8 @@ var InternalUploader = function InternalUploader(props, ref) {
183
185
  }
184
186
  });
185
187
  };
186
- var fileChange = /*#__PURE__*/ function() {
187
- var _ref = (0, _async_to_generator._)(function(event) {
188
+ var fileChange = function fileChange(event) {
189
+ return (0, _async_to_generator._)(function() {
188
190
  var $el, files, _files, filesArr, tasks;
189
191
  return (0, _ts_generator._)(this, function(_state) {
190
192
  switch(_state.label){
@@ -222,7 +224,6 @@ var InternalUploader = function InternalUploader(props, ref) {
222
224
  case 3:
223
225
  _files = filterFiles(_files);
224
226
  tasks = _files.map(function(file) {
225
- var _file_type;
226
227
  var info = {
227
228
  uid: idCountRef.current++,
228
229
  status: autoUpload ? 'uploading' : 'ready',
@@ -231,7 +232,7 @@ var InternalUploader = function InternalUploader(props, ref) {
231
232
  name: file.name,
232
233
  type: file.type
233
234
  };
234
- if (preview && ((_file_type = file.type) === null || _file_type === void 0 ? void 0 : _file_type.includes('image'))) {
235
+ if (preview) {
235
236
  var reader = new FileReader();
236
237
  reader.onload = function(event) {
237
238
  fileListRef.current = (0, _to_consumable_array._)(fileListRef.current).concat([
@@ -271,13 +272,10 @@ var InternalUploader = function InternalUploader(props, ref) {
271
272
  ];
272
273
  }
273
274
  });
274
- });
275
- return function fileChange(event) {
276
- return _ref.apply(this, arguments);
277
- };
278
- }();
279
- var uploadAction = /*#__PURE__*/ function() {
280
- var _ref = (0, _async_to_generator._)(function(tasks) {
275
+ })();
276
+ };
277
+ var uploadAction = function uploadAction(tasks) {
278
+ return (0, _async_to_generator._)(function() {
281
279
  var taskIds;
282
280
  return (0, _ts_generator._)(this, function(_state) {
283
281
  switch(_state.label){
@@ -296,8 +294,8 @@ var InternalUploader = function InternalUploader(props, ref) {
296
294
  }));
297
295
  return [
298
296
  4,
299
- Promise.all(tasks.map(/*#__PURE__*/ function() {
300
- var _ref = (0, _async_to_generator._)(function(currentTask, index) {
297
+ Promise.all(tasks.map(function(currentTask, index) {
298
+ return (0, _async_to_generator._)(function() {
301
299
  var result, list, e, list1;
302
300
  return (0, _ts_generator._)(this, function(_state) {
303
301
  switch(_state.label){
@@ -344,11 +342,8 @@ var InternalUploader = function InternalUploader(props, ref) {
344
342
  ];
345
343
  }
346
344
  });
347
- });
348
- return function(currentTask, index) {
349
- return _ref.apply(this, arguments);
350
- };
351
- }())).catch(function(errs) {
345
+ })();
346
+ })).catch(function(errs) {
352
347
  return console.error(errs);
353
348
  })
354
349
  ];
@@ -359,11 +354,8 @@ var InternalUploader = function InternalUploader(props, ref) {
359
354
  ];
360
355
  }
361
356
  });
362
- });
363
- return function uploadAction(tasks) {
364
- return _ref.apply(this, arguments);
365
- };
366
- }();
357
+ })();
358
+ };
367
359
  var handleItemClick = function handleItemClick(file, index) {
368
360
  onFileItemClick === null || onFileItemClick === void 0 ? void 0 : onFileItemClick(file, index);
369
361
  };
@@ -6,23 +6,23 @@ Object.defineProperty(exports, "__esModule", {
6
6
  function _export(target, all) {
7
7
  for(var name in all)Object.defineProperty(target, name, {
8
8
  enumerable: true,
9
- get: all[name]
9
+ get: Object.getOwnPropertyDescriptor(all, name).get
10
10
  });
11
11
  }
12
12
  _export(exports, {
13
- binarySearch: function() {
13
+ get binarySearch () {
14
14
  return binarySearch;
15
15
  },
16
- getEndIndex: function() {
16
+ get getEndIndex () {
17
17
  return getEndIndex;
18
18
  },
19
- getListTotalSize: function() {
19
+ get getListTotalSize () {
20
20
  return getListTotalSize;
21
21
  },
22
- initPositinoCache: function() {
22
+ get initPositinoCache () {
23
23
  return initPositinoCache;
24
24
  },
25
- updateItemSize: function() {
25
+ get updateItemSize () {
26
26
  return updateItemSize;
27
27
  }
28
28
  });
@@ -71,20 +71,16 @@ var WaterMark = function WaterMark(props) {
71
71
  setBase64Url(canvas.toDataURL());
72
72
  };
73
73
  } else if (content) {
74
- ctx.textBaseline = 'middle' // 设置或返回在绘制文本时使用的当前文本基线。(正中)
75
- ;
76
- ctx.textAlign = 'center' // 设置或返回文本内容的当前对齐方式。
77
- ;
74
+ ctx.textBaseline = 'middle'; // 设置或返回在绘制文本时使用的当前文本基线。(正中)
75
+ ctx.textAlign = 'center'; // 设置或返回文本内容的当前对齐方式。
78
76
  // 文字绕中间旋转
79
77
  ctx.translate(markWidth / 2, markHeight / 2);
80
78
  ctx.rotate(Math.PI / 180 * Number(rotate));
81
79
  var markSize = Number(fontSize) * ratio;
82
80
  ctx.font = "".concat(fontStyle, " normal ").concat(fontWeight, " ").concat(markSize, "px/").concat(markHeight, "px ").concat(fontFamily);
83
81
  ctx.fillStyle = color;
84
- ctx.fillText(content, startX, startY) // 在画布上绘制"被填充的"文本。
85
- ;
86
- ctx.restore() // 返回之前保存过的路径状态和属性。
87
- ;
82
+ ctx.fillText(content, startX, startY); // 在画布上绘制"被填充的"文本。
83
+ ctx.restore(); // 返回之前保存过的路径状态和属性。
88
84
  setBase64Url(canvas.toDataURL());
89
85
  }
90
86
  } else {
@@ -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"));
@@ -1,7 +1,13 @@
1
- import { ITouchEvent } from '@tarojs/components';
1
+ import { ITouchEvent, ImageProps } from '@tarojs/components';
2
2
  import { BaseAvatar, BaseAvatarGroup } from './base';
3
3
  export interface TaroAvatarProps extends Omit<BaseAvatar, 'onClick'> {
4
4
  avatarIndex: number;
5
+ /** 图片裁剪、缩放的模式,同 Taro Image 的 mode 属性 */
6
+ mode: keyof ImageProps.Mode;
7
+ /**
8
+ * @deprecated 请使用 mode 属性代替
9
+ */
10
+ fit: BaseAvatar['fit'];
5
11
  onClick: (e: ITouchEvent) => void;
6
12
  }
7
13
  export interface TaroAvatarGroupProps extends BaseAvatarGroup {
@@ -16,8 +16,13 @@ export interface BasePopup extends BaseProps, BaseOverlay {
16
16
  destroyOnClose: boolean;
17
17
  overlay: boolean;
18
18
  round: boolean;
19
+ resizable: boolean;
20
+ minHeight: string;
19
21
  onOpen: () => void;
20
22
  onClose: () => void;
21
23
  onOverlayClick: (e: any) => boolean | void;
22
24
  onCloseIconClick: (e: any) => boolean | void;
25
+ onTouchMove: (height: number, e: any, direction: 'up' | 'down') => void;
26
+ onTouchStart: (height: number, e: any) => void;
27
+ onTouchEnd: (height: number, e: any) => void;
23
28
  }
@@ -1,12 +1,18 @@
1
1
  import { BaseProps } from '../../base/props';
2
2
  import { SimpleValue, UISize } from '../../base/atoms';
3
3
  export type PriceSize = Exclude<UISize, 'mini'>;
4
- export type PriceColor = 'primary' | 'gray' | 'darkgray';
4
+ export type SpecificPriceColor = 'primary' | 'gray' | 'darkgray';
5
+ export type PriceColor = SpecificPriceColor | string;
6
+ export declare enum PriceColorEnum {
7
+ Primary = "primary",
8
+ Gray = "gray",
9
+ Darkgray = "darkgray"
10
+ }
5
11
  export interface BasePrice extends BaseProps {
6
12
  color: PriceColor;
7
13
  price: SimpleValue;
8
14
  symbol: string;
9
- digits: number;
15
+ digits: number | null;
10
16
  thousands: boolean;
11
17
  position: string;
12
18
  size: PriceSize;
@@ -2,3 +2,15 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
+ Object.defineProperty(exports, "PriceColorEnum", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return PriceColorEnum;
9
+ }
10
+ });
11
+ var PriceColorEnum = /*#__PURE__*/ function(PriceColorEnum) {
12
+ PriceColorEnum["Primary"] = "primary";
13
+ PriceColorEnum["Gray"] = "gray";
14
+ PriceColorEnum["Darkgray"] = "darkgray";
15
+ return PriceColorEnum;
16
+ }({});
@@ -1,4 +1,4 @@
1
- import type { ChangeEvent, FocusEvent, MouseEvent } from 'react';
1
+ import type { ChangeEvent, FocusEvent, MouseEvent, InputHTMLAttributes } from 'react';
2
2
  import { BaseSearchBar } from './base';
3
3
  export interface WebSearchBarProps extends Omit<BaseSearchBar, 'onChange' | 'onFocus' | 'onBlur' | 'onClear' | 'onInputClick'> {
4
4
  onChange?: (value: string, event?: ChangeEvent<HTMLInputElement>) => void;
@@ -6,4 +6,5 @@ export interface WebSearchBarProps extends Omit<BaseSearchBar, 'onChange' | 'onF
6
6
  onBlur?: (value: string, event: FocusEvent<HTMLInputElement>) => void;
7
7
  onClear?: (event: MouseEvent<HTMLDivElement>) => void;
8
8
  onInputClick?: (event: MouseEvent<HTMLInputElement>) => void;
9
+ inputProps?: Partial<InputHTMLAttributes<HTMLInputElement>>;
9
10
  }
@@ -9,5 +9,6 @@ export interface TaroSearchBarProps extends Omit<BaseSearchBar, 'onChange' | 'on
9
9
  onBlur?: (value: string, event: BaseEventOrig<inputValueEventDetail>) => void;
10
10
  onClear?: (event: ITouchEvent) => void;
11
11
  onInputClick?: (event: ITouchEvent) => void;
12
+ inputProps?: Partial<InputProps>;
12
13
  }
13
14
  export {};
@@ -5,20 +5,20 @@ 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
- Utils: function() {
12
+ get Utils () {
13
13
  return Utils;
14
14
  },
15
- getCurrMonthData: function() {
15
+ get getCurrMonthData () {
16
16
  return getCurrMonthData;
17
17
  },
18
- getDaysStatus: function() {
18
+ get getDaysStatus () {
19
19
  return getDaysStatus;
20
20
  },
21
- getPreMonthDates: function() {
21
+ get getPreMonthDates () {
22
22
  return getPreMonthDates;
23
23
  }
24
24
  });
@@ -5,23 +5,23 @@ 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
- simulateTouchMove: function() {
12
+ get simulateTouchMove () {
13
13
  return simulateTouchMove;
14
14
  },
15
- simulateTouchZoom: function() {
15
+ get simulateTouchZoom () {
16
16
  return simulateTouchZoom;
17
17
  },
18
- sleep: function() {
18
+ get sleep () {
19
19
  return sleep;
20
20
  },
21
- trigger: function() {
21
+ get trigger () {
22
22
  return trigger;
23
23
  },
24
- triggerDrag: function() {
24
+ get triggerDrag () {
25
25
  return triggerDrag;
26
26
  }
27
27
  });
@@ -89,10 +89,7 @@ function triggerDrag(el) {
89
89
  trigger(el, 'touchend', x, y);
90
90
  }
91
91
  function simulateTouchMove(element, startX, startY, endX, endY, duration) {
92
- return _simulateTouchMove.apply(this, arguments);
93
- }
94
- function _simulateTouchMove() {
95
- _simulateTouchMove = (0, _async_to_generator._)(function(element, startX, startY, endX, endY, duration) {
92
+ return (0, _async_to_generator._)(function() {
96
93
  var touch, touchList, distanceX, distanceY, startTime, elapsed, progress, currentX, currentY, currentTouch, currentTouchList;
97
94
  return (0, _ts_generator._)(this, function(_state) {
98
95
  switch(_state.label){
@@ -145,14 +142,10 @@ function _simulateTouchMove() {
145
142
  ];
146
143
  }
147
144
  });
148
- });
149
- return _simulateTouchMove.apply(this, arguments);
145
+ })();
150
146
  }
151
147
  function simulateTouchZoom(element, startDistance, endDistance, duration) {
152
- return _simulateTouchZoom.apply(this, arguments);
153
- }
154
- function _simulateTouchZoom() {
155
- _simulateTouchZoom = (0, _async_to_generator._)(function(element, startDistance, endDistance, duration) {
148
+ return (0, _async_to_generator._)(function() {
156
149
  var centerX, centerY, startScale, endScale, startTouches, endTouches, progress, currentScale, currentDistance, currentTouches;
157
150
  return (0, _ts_generator._)(this, function(_state) {
158
151
  switch(_state.label){
@@ -212,6 +205,5 @@ function _simulateTouchZoom() {
212
205
  ];
213
206
  }
214
207
  });
215
- });
216
- return _simulateTouchZoom.apply(this, arguments);
208
+ })();
217
209
  }
@@ -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
- getRect: function() {
12
+ get getRect () {
13
13
  return getRect;
14
14
  },
15
- inBrowser: function() {
15
+ get inBrowser () {
16
16
  return inBrowser;
17
17
  },
18
- isWindow: function() {
18
+ get isWindow () {
19
19
  return isWindow;
20
20
  }
21
21
  });
@@ -5,14 +5,14 @@ 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
- getAllScrollableParents: function() {
12
+ get getAllScrollableParents () {
13
13
  return getAllScrollableParents;
14
14
  },
15
- getScrollParent: function() {
15
+ get getScrollParent () {
16
16
  return getScrollParent;
17
17
  }
18
18
  });
@@ -5,14 +5,14 @@ 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
- mergeProp: function() {
12
+ get mergeProp () {
13
13
  return mergeProp;
14
14
  },
15
- mergeProps: function() {
15
+ get mergeProps () {
16
16
  return mergeProps;
17
17
  }
18
18
  });
@@ -5,23 +5,23 @@ 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
- clone: function() {
12
+ get clone () {
13
13
  return clone;
14
14
  },
15
- isPlainObject: function() {
15
+ get isPlainObject () {
16
16
  return isPlainObject;
17
17
  },
18
- main: function() {
18
+ get main () {
19
19
  return main;
20
20
  },
21
- merge: function() {
21
+ get merge () {
22
22
  return merge;
23
23
  },
24
- recursive: function() {
24
+ get recursive () {
25
25
  return recursive;
26
26
  }
27
27
  });
@@ -5,14 +5,14 @@ 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
- cancelRaf: function() {
12
+ get cancelRaf () {
13
13
  return cancelRaf;
14
14
  },
15
- default: function() {
15
+ get default () {
16
16
  return _default;
17
17
  }
18
18
  });
@@ -5,14 +5,14 @@ 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
- render: function() {
12
+ get render () {
13
13
  return render;
14
14
  },
15
- unmount: function() {
15
+ get unmount () {
16
16
  return unmount;
17
17
  }
18
18
  });
@@ -64,10 +64,7 @@ function legacyUnmount(container) {
64
64
  return unmountComponentAtNode(container);
65
65
  }
66
66
  function concurrentUnmount(container) {
67
- return _concurrentUnmount.apply(this, arguments);
68
- }
69
- function _concurrentUnmount() {
70
- _concurrentUnmount = (0, _async_to_generator._)(function(container) {
67
+ return (0, _async_to_generator._)(function() {
71
68
  return (0, _ts_generator._)(this, function(_state) {
72
69
  // Delay to unmount to avoid React 18 sync warning
73
70
  return [
@@ -79,8 +76,7 @@ function _concurrentUnmount() {
79
76
  })
80
77
  ];
81
78
  });
82
- });
83
- return _concurrentUnmount.apply(this, arguments);
79
+ })();
84
80
  }
85
81
  function unmount(container) {
86
82
  if (createRoot) {
@@ -5,14 +5,14 @@ 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
- rubberband: function() {
12
+ get rubberband () {
13
13
  return rubberband;
14
14
  },
15
- rubberbandIfOutOfBounds: function() {
15
+ get rubberbandIfOutOfBounds () {
16
16
  return rubberbandIfOutOfBounds;
17
17
  }
18
18
  });
@@ -10,3 +10,4 @@ export interface Rect {
10
10
  }
11
11
  export declare function makeRect(width: number, height: number): Rect;
12
12
  export declare const getRectInMultiPlatform: (element: any, harmonyId?: string) => Promise<Rect>;
13
+ export declare const getRectInMultiPlatformWithoutCache: (element: any, harmonyId?: string) => Promise<Rect>;
@@ -5,14 +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
- getRectInMultiPlatform: function() {
12
+ get getRectInMultiPlatform () {
13
13
  return getRectInMultiPlatform;
14
14
  },
15
- makeRect: function() {
15
+ get getRectInMultiPlatformWithoutCache () {
16
+ return getRectInMultiPlatformWithoutCache;
17
+ },
18
+ get makeRect () {
16
19
  return makeRect;
17
20
  }
18
21
  });
@@ -33,12 +36,10 @@ function makeRect(width, height) {
33
36
  height: height
34
37
  };
35
38
  }
36
- var getRectInMultiPlatform = /*#__PURE__*/ function() {
37
- var _ref = (0, _async_to_generator._)(function(element) {
38
- var harmonyId;
39
- var _arguments = arguments;
39
+ var getRectInMultiPlatform = function getRectInMultiPlatform(element) {
40
+ var harmonyId = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : '';
41
+ return (0, _async_to_generator._)(function() {
40
42
  return (0, _ts_generator._)(this, function(_state) {
41
- harmonyId = _arguments.length > 1 && _arguments[1] !== void 0 ? _arguments[1] : '';
42
43
  if (element) {
43
44
  if (_getrect.inBrowser) {
44
45
  return [
@@ -69,8 +70,33 @@ var getRectInMultiPlatform = /*#__PURE__*/ function() {
69
70
  Promise.resolve(makeRect(0, 0))
70
71
  ];
71
72
  });
72
- });
73
- return function getRectInMultiPlatform(element) {
74
- return _ref.apply(this, arguments);
75
- };
76
- }();
73
+ })();
74
+ };
75
+ var getRectInMultiPlatformWithoutCache = function getRectInMultiPlatformWithoutCache(element) {
76
+ var harmonyId = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : '';
77
+ return (0, _async_to_generator._)(function() {
78
+ return (0, _ts_generator._)(this, function(_state) {
79
+ if (element) {
80
+ if (_getrect.inBrowser) {
81
+ return [
82
+ 2,
83
+ Promise.resolve((0, _getrect.getRect)(element))
84
+ ];
85
+ }
86
+ return [
87
+ 2,
88
+ new Promise(function(resolve, reject) {
89
+ (0, _taro.createSelectorQuery)().select("#".concat(harmonyId || element.uid)).boundingClientRect().exec(function(param) {
90
+ var _param = (0, _sliced_to_array._)(param, 1), rects = _param[0];
91
+ resolve(rects);
92
+ });
93
+ })
94
+ ];
95
+ }
96
+ return [
97
+ 2,
98
+ Promise.resolve(makeRect(0, 0))
99
+ ];
100
+ });
101
+ })();
102
+ };
@@ -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
- getAppBaseInfo: function() {
12
+ get getAppBaseInfo () {
13
13
  return getAppBaseInfo;
14
14
  },
15
- getDeviceInfo: function() {
15
+ get getDeviceInfo () {
16
16
  return getDeviceInfo;
17
17
  },
18
- getWindowInfo: function() {
18
+ get getWindowInfo () {
19
19
  return getWindowInfo;
20
20
  }
21
21
  });