@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
@@ -30,40 +30,7 @@ var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
30
30
  });
31
31
  export var PullToRefresh = function(p) {
32
32
  var doRefresh = function doRefresh() {
33
- return _doRefresh.apply(this, arguments);
34
- };
35
- var classPrefix = 'nut-pulltorefresh';
36
- var locale = useConfig().locale;
37
- var props = _object_spread({}, defaultProps, p, {
38
- pullingText: p.pullingText || locale.pullToRefresh.pullingText,
39
- canReleaseText: p.canReleaseText || locale.pullToRefresh.canReleaseText,
40
- refreshingText: p.refreshingText || locale.pullToRefresh.refreshingText,
41
- completeText: p.completeText || locale.pullToRefresh.completeText
42
- });
43
- var classes = classNames(classPrefix, props.className, "".concat(classPrefix, "-").concat(props.type));
44
- var headHeight = props.headHeight;
45
- var threshold = props.threshold;
46
- var _useState = _sliced_to_array(useState('pulling'), 2), status = _useState[0], setStatus = _useState[1];
47
- var _useSpring = _sliced_to_array(useSpring(function() {
48
- return {
49
- from: {
50
- height: 0
51
- },
52
- config: {
53
- tension: 300,
54
- friction: 30,
55
- clamp: true
56
- }
57
- };
58
- }), 2), springStyles = _useSpring[0], api = _useSpring[1];
59
- var elementRef = useRef(null);
60
- var pullingRef = useRef(false);
61
- useEffect(function() {
62
- var _elementRef_current;
63
- (_elementRef_current = elementRef.current) === null || _elementRef_current === void 0 ? void 0 : _elementRef_current.addEventListener('touchmove', function() {});
64
- }, []);
65
- function _doRefresh() {
66
- _doRefresh = _async_to_generator(function() {
33
+ return _async_to_generator(function() {
67
34
  var e;
68
35
  return _ts_generator(this, function(_state) {
69
36
  switch(_state.label){
@@ -94,8 +61,8 @@ export var PullToRefresh = function(p) {
94
61
  case 3:
95
62
  e = _state.sent();
96
63
  api.start({
97
- to: /*#__PURE__*/ function() {
98
- var _ref = _async_to_generator(function(next) {
64
+ to: function(next) {
65
+ return _async_to_generator(function() {
99
66
  return _ts_generator(this, function(_state) {
100
67
  switch(_state.label){
101
68
  case 0:
@@ -113,11 +80,8 @@ export var PullToRefresh = function(p) {
113
80
  ];
114
81
  }
115
82
  });
116
- });
117
- return function(next) {
118
- return _ref.apply(this, arguments);
119
- };
120
- }()
83
+ })();
84
+ }
121
85
  });
122
86
  throw e;
123
87
  case 4:
@@ -134,8 +98,8 @@ export var PullToRefresh = function(p) {
134
98
  _state.label = 6;
135
99
  case 6:
136
100
  api.start({
137
- to: /*#__PURE__*/ function() {
138
- var _ref = _async_to_generator(function(next) {
101
+ to: function(next) {
102
+ return _async_to_generator(function() {
139
103
  return _ts_generator(this, function(_state) {
140
104
  switch(_state.label){
141
105
  case 0:
@@ -153,20 +117,46 @@ export var PullToRefresh = function(p) {
153
117
  ];
154
118
  }
155
119
  });
156
- });
157
- return function(next) {
158
- return _ref.apply(this, arguments);
159
- };
160
- }()
120
+ })();
121
+ }
161
122
  });
162
123
  return [
163
124
  2
164
125
  ];
165
126
  }
166
127
  });
167
- });
168
- return _doRefresh.apply(this, arguments);
169
- }
128
+ })();
129
+ };
130
+ var classPrefix = 'nut-pulltorefresh';
131
+ var locale = useConfig().locale;
132
+ var props = _object_spread({}, defaultProps, p, {
133
+ pullingText: p.pullingText || locale.pullToRefresh.pullingText,
134
+ canReleaseText: p.canReleaseText || locale.pullToRefresh.canReleaseText,
135
+ refreshingText: p.refreshingText || locale.pullToRefresh.refreshingText,
136
+ completeText: p.completeText || locale.pullToRefresh.completeText
137
+ });
138
+ var classes = classNames(classPrefix, props.className, "".concat(classPrefix, "-").concat(props.type));
139
+ var headHeight = props.headHeight;
140
+ var threshold = props.threshold;
141
+ var _useState = _sliced_to_array(useState('pulling'), 2), status = _useState[0], setStatus = _useState[1];
142
+ var _useSpring = _sliced_to_array(useSpring(function() {
143
+ return {
144
+ from: {
145
+ height: 0
146
+ },
147
+ config: {
148
+ tension: 300,
149
+ friction: 30,
150
+ clamp: true
151
+ }
152
+ };
153
+ }), 2), springStyles = _useSpring[0], api = _useSpring[1];
154
+ var elementRef = useRef(null);
155
+ var pullingRef = useRef(false);
156
+ useEffect(function() {
157
+ var _elementRef_current;
158
+ (_elementRef_current = elementRef.current) === null || _elementRef_current === void 0 ? void 0 : _elementRef_current.addEventListener('touchmove', function() {});
159
+ }, []);
170
160
  useDrag(function(state) {
171
161
  var getScrollTop = function getScrollTop(element) {
172
162
  return 'scrollTop' in element ? element.scrollTop : element.scrollY;
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  import { Radio } from "./radio";
3
2
  import { RadioGroup } from "../radiogroup/radiogroup";
4
3
  var InnerRadio = Radio;
@@ -100,7 +100,7 @@
100
100
  display: inline-flex;
101
101
  align-items: center;
102
102
  color: $rate-font-color;
103
- font-family: 'JD';
103
+ font-family: 'JDZH-Regular';
104
104
  line-height: 1;
105
105
 
106
106
  &-normal {
@@ -80,7 +80,7 @@
80
80
  display: inline-flex;
81
81
  align-items: center;
82
82
  color: var(--nutui-rate-font-color, var(--nutui-color-primary-icon, #ff3333));
83
- font-family: "JD";
83
+ font-family: "JDZH-Regular";
84
84
  line-height: 1;
85
85
  }
86
86
  .nut-rate-score-normal {
@@ -100,7 +100,7 @@
100
100
  display: inline-flex;
101
101
  align-items: center;
102
102
  color: $rate-font-color;
103
- font-family: 'JD';
103
+ font-family: 'JDZH-Regular';
104
104
  line-height: 1;
105
105
 
106
106
  &-normal {
@@ -80,7 +80,7 @@
80
80
  display: inline-flex;
81
81
  align-items: center;
82
82
  color: var(--nutui-rate-font-color, var(--nutui-color-primary-icon, #ff3333));
83
- font-family: "JD";
83
+ font-family: "JDZH-Regular";
84
84
  line-height: 1;
85
85
  }
86
86
  .nut-rate-score-normal {
@@ -100,7 +100,7 @@
100
100
  display: inline-flex;
101
101
  align-items: center;
102
102
  color: $rate-font-color;
103
- font-family: 'JD';
103
+ font-family: 'JDZH-Regular';
104
104
  line-height: 1;
105
105
 
106
106
  &-normal {
@@ -80,7 +80,7 @@
80
80
  display: inline-flex;
81
81
  align-items: center;
82
82
  color: var(--nutui-rate-font-color, var(--nutui-color-primary-icon, #ff3333));
83
- font-family: "JD";
83
+ font-family: "JDZH-Regular";
84
84
  line-height: 1;
85
85
  }
86
86
  .nut-rate-score-normal {
@@ -27,7 +27,7 @@ export var SearchBar = function(props) {
27
27
  var classPrefix = 'nut-searchbar';
28
28
  var locale = useConfig().locale;
29
29
  var searchInputRef = useRef(null);
30
- var _$_object_spread = _object_spread({}, defaultProps, props), outerValue = _$_object_spread.value, defaultValue = _$_object_spread.defaultValue, style = _$_object_spread.style, placeholder = _$_object_spread.placeholder, shape = _$_object_spread.shape, className = _$_object_spread.className, disabled = _$_object_spread.disabled, maxLength = _$_object_spread.maxLength, clearable = _$_object_spread.clearable, readOnly = _$_object_spread.readOnly, autoFocus = _$_object_spread.autoFocus, backable = _$_object_spread.backable, right = _$_object_spread.right, left = _$_object_spread.left, leftIn = _$_object_spread.leftIn, rightIn = _$_object_spread.rightIn, tag = _$_object_spread.tag, onChange = _$_object_spread.onChange, onFocus = _$_object_spread.onFocus, onBlur = _$_object_spread.onBlur, onClear = _$_object_spread.onClear, onSearch = _$_object_spread.onSearch, onInputClick = _$_object_spread.onInputClick, onItemClick = _$_object_spread.onItemClick;
30
+ var _$_object_spread = _object_spread({}, defaultProps, props), outerValue = _$_object_spread.value, defaultValue = _$_object_spread.defaultValue, style = _$_object_spread.style, placeholder = _$_object_spread.placeholder, shape = _$_object_spread.shape, className = _$_object_spread.className, disabled = _$_object_spread.disabled, maxLength = _$_object_spread.maxLength, clearable = _$_object_spread.clearable, readOnly = _$_object_spread.readOnly, autoFocus = _$_object_spread.autoFocus, backable = _$_object_spread.backable, right = _$_object_spread.right, left = _$_object_spread.left, leftIn = _$_object_spread.leftIn, rightIn = _$_object_spread.rightIn, tag = _$_object_spread.tag, inputProps = _$_object_spread.inputProps, onChange = _$_object_spread.onChange, onFocus = _$_object_spread.onFocus, onBlur = _$_object_spread.onBlur, onClear = _$_object_spread.onClear, onSearch = _$_object_spread.onSearch, onInputClick = _$_object_spread.onInputClick, onItemClick = _$_object_spread.onItemClick;
31
31
  var _usePropsValue = _sliced_to_array(usePropsValue({
32
32
  value: outerValue,
33
33
  defaultValue: defaultValue,
@@ -127,7 +127,7 @@ export var SearchBar = function(props) {
127
127
  ]);
128
128
  var renderField = function() {
129
129
  var inputCls = classNames("".concat(classPrefix, "-input"));
130
- return /*#__PURE__*/ React.createElement("input", {
130
+ return /*#__PURE__*/ React.createElement("input", _object_spread({
131
131
  className: inputCls,
132
132
  ref: searchInputRef,
133
133
  value: value || '',
@@ -140,7 +140,7 @@ export var SearchBar = function(props) {
140
140
  onFocus: handleFocus,
141
141
  onBlur: handleBlur,
142
142
  onClick: handleInputClick
143
- });
143
+ }, inputProps));
144
144
  };
145
145
  var renderValueByTags = useCallback(function() {
146
146
  if (!value) {
@@ -52,11 +52,9 @@ export var Skeleton = function(props) {
52
52
  };
53
53
  var _useState = _sliced_to_array(useState(false), 2), animate = _useState[0], setAnimate = _useState[1];
54
54
  var playAnimation = function() {
55
- setAnimate(false) // 首先将 animate 设置为 false
56
- ;
55
+ setAnimate(false); // 首先将 animate 设置为 false
57
56
  setTimeout(function() {
58
- setAnimate(true) // 1 毫秒后再设置为 true,触发动画
59
- ;
57
+ setAnimate(true); // 1 毫秒后再设置为 true,触发动画
60
58
  }, 10);
61
59
  };
62
60
  useEffect(function() {
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  import { Swiper } from "./swiper";
3
2
  import SwiperItem from "../swiperitem";
4
3
  var InnerSwiper = Swiper;
@@ -61,8 +61,8 @@ export var Switch = function(props) {
61
61
  (_obj = {}, _define_property(_obj, "".concat(classPrefix, "-close"), !value), _define_property(_obj, "".concat(classPrefix, "-disabled"), disabled), _define_property(_obj, "".concat(classPrefix, "-disabled-close"), disabled && !value), _obj)
62
62
  ]);
63
63
  };
64
- var onClick = /*#__PURE__*/ function() {
65
- var _ref = _async_to_generator(function() {
64
+ var onClick = function() {
65
+ return _async_to_generator(function() {
66
66
  var e;
67
67
  return _ts_generator(this, function(_state) {
68
68
  switch(_state.label){
@@ -107,11 +107,8 @@ export var Switch = function(props) {
107
107
  ];
108
108
  }
109
109
  });
110
- });
111
- return function onClick() {
112
- return _ref.apply(this, arguments);
113
- };
114
- }();
110
+ })();
111
+ };
115
112
  var _obj, _obj1;
116
113
  return /*#__PURE__*/ React.createElement("div", _object_spread({
117
114
  className: classes(),
@@ -99,22 +99,24 @@ var InternalUploader = function(props, ref) {
99
99
  ]);
100
100
  useImperativeHandle(ref, function() {
101
101
  return {
102
- submit: /*#__PURE__*/ _async_to_generator(function() {
103
- return _ts_generator(this, function(_state) {
104
- switch(_state.label){
105
- case 0:
106
- return [
107
- 4,
108
- uploadAction(uploadQueue)
109
- ];
110
- case 1:
111
- _state.sent();
112
- return [
113
- 2
114
- ];
115
- }
116
- });
117
- }),
102
+ submit: function() {
103
+ return _async_to_generator(function() {
104
+ return _ts_generator(this, function(_state) {
105
+ switch(_state.label){
106
+ case 0:
107
+ return [
108
+ 4,
109
+ uploadAction(uploadQueue)
110
+ ];
111
+ case 1:
112
+ _state.sent();
113
+ return [
114
+ 2
115
+ ];
116
+ }
117
+ });
118
+ })();
119
+ },
118
120
  clear: function() {
119
121
  clearUploadQueue();
120
122
  }
@@ -171,8 +173,8 @@ var InternalUploader = function(props, ref) {
171
173
  }
172
174
  });
173
175
  };
174
- var fileChange = /*#__PURE__*/ function() {
175
- var _ref = _async_to_generator(function(event) {
176
+ var fileChange = function(event) {
177
+ return _async_to_generator(function() {
176
178
  var $el, files, _files, filesArr, tasks;
177
179
  return _ts_generator(this, function(_state) {
178
180
  switch(_state.label){
@@ -210,7 +212,6 @@ var InternalUploader = function(props, ref) {
210
212
  case 3:
211
213
  _files = filterFiles(_files);
212
214
  tasks = _files.map(function(file) {
213
- var _file_type;
214
215
  var info = {
215
216
  uid: idCountRef.current++,
216
217
  status: autoUpload ? 'uploading' : 'ready',
@@ -219,7 +220,7 @@ var InternalUploader = function(props, ref) {
219
220
  name: file.name,
220
221
  type: file.type
221
222
  };
222
- if (preview && ((_file_type = file.type) === null || _file_type === void 0 ? void 0 : _file_type.includes('image'))) {
223
+ if (preview) {
223
224
  var reader = new FileReader();
224
225
  reader.onload = function(event) {
225
226
  fileListRef.current = _to_consumable_array(fileListRef.current).concat([
@@ -259,13 +260,10 @@ var InternalUploader = function(props, ref) {
259
260
  ];
260
261
  }
261
262
  });
262
- });
263
- return function fileChange(event) {
264
- return _ref.apply(this, arguments);
265
- };
266
- }();
267
- var uploadAction = /*#__PURE__*/ function() {
268
- var _ref = _async_to_generator(function(tasks) {
263
+ })();
264
+ };
265
+ var uploadAction = function(tasks) {
266
+ return _async_to_generator(function() {
269
267
  var taskIds;
270
268
  return _ts_generator(this, function(_state) {
271
269
  switch(_state.label){
@@ -284,8 +282,8 @@ var InternalUploader = function(props, ref) {
284
282
  }));
285
283
  return [
286
284
  4,
287
- Promise.all(tasks.map(/*#__PURE__*/ function() {
288
- var _ref = _async_to_generator(function(currentTask, index) {
285
+ Promise.all(tasks.map(function(currentTask, index) {
286
+ return _async_to_generator(function() {
289
287
  var result, list, e, list1;
290
288
  return _ts_generator(this, function(_state) {
291
289
  switch(_state.label){
@@ -332,11 +330,8 @@ var InternalUploader = function(props, ref) {
332
330
  ];
333
331
  }
334
332
  });
335
- });
336
- return function(currentTask, index) {
337
- return _ref.apply(this, arguments);
338
- };
339
- }())).catch(function(errs) {
333
+ })();
334
+ })).catch(function(errs) {
340
335
  return console.error(errs);
341
336
  })
342
337
  ];
@@ -347,11 +342,8 @@ var InternalUploader = function(props, ref) {
347
342
  ];
348
343
  }
349
344
  });
350
- });
351
- return function uploadAction(tasks) {
352
- return _ref.apply(this, arguments);
353
- };
354
- }();
345
+ })();
346
+ };
355
347
  var handleItemClick = function(file, index) {
356
348
  onFileItemClick === null || onFileItemClick === void 0 ? void 0 : onFileItemClick(file, index);
357
349
  };
@@ -59,20 +59,16 @@ export var WaterMark = function(props) {
59
59
  setBase64Url(canvas.toDataURL());
60
60
  };
61
61
  } else if (content) {
62
- ctx.textBaseline = 'middle' // 设置或返回在绘制文本时使用的当前文本基线。(正中)
63
- ;
64
- ctx.textAlign = 'center' // 设置或返回文本内容的当前对齐方式。
65
- ;
62
+ ctx.textBaseline = 'middle'; // 设置或返回在绘制文本时使用的当前文本基线。(正中)
63
+ ctx.textAlign = 'center'; // 设置或返回文本内容的当前对齐方式。
66
64
  // 文字绕中间旋转
67
65
  ctx.translate(markWidth / 2, markHeight / 2);
68
66
  ctx.rotate(Math.PI / 180 * Number(rotate));
69
67
  var markSize = Number(fontSize) * ratio;
70
68
  ctx.font = "".concat(fontStyle, " normal ").concat(fontWeight, " ").concat(markSize, "px/").concat(markHeight, "px ").concat(fontFamily);
71
69
  ctx.fillStyle = color;
72
- ctx.fillText(content, startX, startY) // 在画布上绘制"被填充的"文本。
73
- ;
74
- ctx.restore() // 返回之前保存过的路径状态和属性。
75
- ;
70
+ ctx.fillText(content, startX, startY); // 在画布上绘制"被填充的"文本。
71
+ ctx.restore(); // 返回之前保存过的路径状态和属性。
76
72
  setBase64Url(canvas.toDataURL());
77
73
  }
78
74
  } else {
@@ -1 +1 @@
1
- import React from "react";
1
+ export { };
@@ -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 {
@@ -50,6 +50,14 @@ export interface BasePopup extends BaseProps, BaseOverlay {
50
50
  */
51
51
  round: boolean
52
52
  /**
53
+ * 上下滑动调整高度,当前只支持从底部弹出
54
+ */
55
+ resizable: boolean
56
+ /**
57
+ * 设置最小高度
58
+ */
59
+ minHeight: string
60
+ /**
53
61
  * 打开弹框时触发
54
62
  */
55
63
  onOpen: () => void
@@ -65,4 +73,16 @@ export interface BasePopup extends BaseProps, BaseOverlay {
65
73
  * 点击关闭图标时触发
66
74
  */
67
75
  onCloseIconClick: (e: any) => boolean | void
76
+ /**
77
+ * 滑动时触发
78
+ */
79
+ onTouchMove: (height: number, e: any, direction: 'up' | 'down') => void
80
+ /**
81
+ * 开始触碰时触发
82
+ */
83
+ onTouchStart: (height: number, e: any) => void
84
+ /**
85
+ * 结束触碰时触发
86
+ */
87
+ onTouchEnd: (height: number, e: any) => void
68
88
  }
@@ -1,10 +1,16 @@
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
  /**
7
- * 价格类型
13
+ * 价格类型, 支持自定义颜色
8
14
  */
9
15
  color: PriceColor
10
16
  /**
@@ -16,9 +22,9 @@ export interface BasePrice extends BaseProps {
16
22
  */
17
23
  symbol: string
18
24
  /**
19
- * 小数位位数
25
+ * 小数位位数,传入null数据原样输出
20
26
  */
21
- digits: number
27
+ digits: number | null
22
28
  /**
23
29
  * 是否按照千分号形式显示
24
30
  */
@@ -1 +1,6 @@
1
- export { };
1
+ export var PriceColorEnum = /*#__PURE__*/ function(PriceColorEnum) {
2
+ PriceColorEnum["Primary"] = "primary";
3
+ PriceColorEnum["Gray"] = "gray";
4
+ PriceColorEnum["Darkgray"] = "darkgray";
5
+ return PriceColorEnum;
6
+ }({});
@@ -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 {};
@@ -72,10 +72,7 @@ export function triggerDrag(el) {
72
72
  * @param {number} endY 结束触摸点的 Y 坐标
73
73
  * @param {number} duration 移动持续时间(毫秒)
74
74
  */ export function simulateTouchMove(element, startX, startY, endX, endY, duration) {
75
- return _simulateTouchMove.apply(this, arguments);
76
- }
77
- function _simulateTouchMove() {
78
- _simulateTouchMove = _async_to_generator(function(element, startX, startY, endX, endY, duration) {
75
+ return _async_to_generator(function() {
79
76
  var touch, touchList, distanceX, distanceY, startTime, elapsed, progress, currentX, currentY, currentTouch, currentTouchList;
80
77
  return _ts_generator(this, function(_state) {
81
78
  switch(_state.label){
@@ -128,8 +125,7 @@ function _simulateTouchMove() {
128
125
  ];
129
126
  }
130
127
  });
131
- });
132
- return _simulateTouchMove.apply(this, arguments);
128
+ })();
133
129
  }
134
130
  /**
135
131
  * 模拟触摸缩放方法
@@ -138,10 +134,7 @@ function _simulateTouchMove() {
138
134
  * @param {number} endDistance 结束触摸点的距离
139
135
  * @param {number} duration 缩放持续时间(毫秒)
140
136
  */ export function simulateTouchZoom(element, startDistance, endDistance, duration) {
141
- return _simulateTouchZoom.apply(this, arguments);
142
- }
143
- function _simulateTouchZoom() {
144
- _simulateTouchZoom = _async_to_generator(function(element, startDistance, endDistance, duration) {
137
+ return _async_to_generator(function() {
145
138
  var centerX, centerY, startScale, endScale, startTouches, endTouches, progress, currentScale, currentDistance, currentTouches;
146
139
  return _ts_generator(this, function(_state) {
147
140
  switch(_state.label){
@@ -201,6 +194,5 @@ function _simulateTouchZoom() {
201
194
  ];
202
195
  }
203
196
  });
204
- });
205
- return _simulateTouchZoom.apply(this, arguments);
197
+ })();
206
198
  }
@@ -45,10 +45,7 @@ function legacyUnmount(container) {
45
45
  return unmountComponentAtNode(container);
46
46
  }
47
47
  function concurrentUnmount(container) {
48
- return _concurrentUnmount.apply(this, arguments);
49
- }
50
- function _concurrentUnmount() {
51
- _concurrentUnmount = _async_to_generator(function(container) {
48
+ return _async_to_generator(function() {
52
49
  return _ts_generator(this, function(_state) {
53
50
  // Delay to unmount to avoid React 18 sync warning
54
51
  return [
@@ -60,8 +57,7 @@ function _concurrentUnmount() {
60
57
  })
61
58
  ];
62
59
  });
63
- });
64
- return _concurrentUnmount.apply(this, arguments);
60
+ })();
65
61
  }
66
62
  export function unmount(container) {
67
63
  if (createRoot) {
@@ -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>;