@nutui/nutui-react 4.0.0-beta.4 → 4.0.0-beta.6

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 (236) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/cjs/hooks/use-props-value.js +1 -1
  3. package/dist/cjs/hooks/use-touch.js +4 -4
  4. package/dist/cjs/packages/address/cascaderRender.js +1 -1
  5. package/dist/cjs/packages/address/existRender.js +1 -1
  6. package/dist/cjs/packages/animate/animate.js +1 -1
  7. package/dist/cjs/packages/audio/audio.js +1 -1
  8. package/dist/cjs/packages/avatar/avatar.js +1 -1
  9. package/dist/cjs/packages/avatarcropper/avatarcropper.js +1 -1
  10. package/dist/cjs/packages/barrage/barrage.js +1 -1
  11. package/dist/cjs/packages/button/button.js +1 -1
  12. package/dist/cjs/packages/card/card.js +1 -1
  13. package/dist/cjs/packages/cascader/utils.js +7 -6
  14. package/dist/cjs/packages/cell/cell.js +1 -1
  15. package/dist/cjs/packages/cellgroup/cellgroup.js +1 -1
  16. package/dist/cjs/packages/checkboxgroup/checkboxgroup.js +3 -3
  17. package/dist/cjs/packages/circleprogress/circleprogress.js +1 -1
  18. package/dist/cjs/packages/collapseitem/collapseitem.js +1 -1
  19. package/dist/cjs/packages/countdown/countdown.js +1 -1
  20. package/dist/cjs/packages/datepicker/datepicker.js +1 -1
  21. package/dist/cjs/packages/dialog/dialog.js +2 -2
  22. package/dist/cjs/packages/divider/divider.js +1 -1
  23. package/dist/cjs/packages/drag/drag.js +1 -1
  24. package/dist/cjs/packages/elevator/elevator.js +1 -1
  25. package/dist/cjs/packages/ellipsis/ellipsis.js +1 -1
  26. package/dist/cjs/packages/empty/empty.js +1 -1
  27. package/dist/cjs/packages/fixednav/fixednav.js +1 -1
  28. package/dist/cjs/packages/grid/grid.js +1 -1
  29. package/dist/cjs/packages/griditem/griditem.js +1 -1
  30. package/dist/cjs/packages/indicator/indicator.js +1 -1
  31. package/dist/cjs/packages/infiniteloading/infiniteloading.js +1 -1
  32. package/dist/cjs/packages/input/input.js +1 -1
  33. package/dist/cjs/packages/inputnumber/inputnumber.js +1 -1
  34. package/dist/cjs/packages/loading/loading.js +1 -1
  35. package/dist/cjs/packages/menu/menu.js +1 -1
  36. package/dist/cjs/packages/numberkeyboard/numberkeyboard.js +1 -1
  37. package/dist/cjs/packages/overlay/overlay.js +1 -1
  38. package/dist/cjs/packages/pagination/pagination.js +1 -1
  39. package/dist/cjs/packages/picker/picker.js +1 -1
  40. package/dist/cjs/packages/pickerview/pickerroller.js +1 -1
  41. package/dist/cjs/packages/popover/popover.js +1 -1
  42. package/dist/cjs/packages/price/price.js +1 -1
  43. package/dist/cjs/packages/progress/progress.js +1 -1
  44. package/dist/cjs/packages/quickenter/quickenter.js +2 -2
  45. package/dist/cjs/packages/radio/radio.js +1 -1
  46. package/dist/cjs/packages/radiogroup/radiogroup.js +3 -3
  47. package/dist/cjs/packages/shortpassword/shortpassword.js +1 -1
  48. package/dist/cjs/packages/signature/signature.js +1 -1
  49. package/dist/cjs/packages/skeleton/skeleton.js +1 -1
  50. package/dist/cjs/packages/step/step.js +1 -1
  51. package/dist/cjs/packages/sticky/sticky.js +1 -1
  52. package/dist/cjs/packages/switch/switch.js +1 -1
  53. package/dist/cjs/packages/tabbaritem/tabbaritem.js +1 -1
  54. package/dist/cjs/packages/table/table.js +1 -1
  55. package/dist/cjs/packages/tabs/tabs.js +1 -1
  56. package/dist/cjs/packages/textarea/textarea.js +1 -1
  57. package/dist/cjs/packages/timeselect/timeselect.js +1 -1
  58. package/dist/cjs/packages/tour/tour.js +1 -1
  59. package/dist/cjs/packages/trendarrow/trendarrow.js +1 -1
  60. package/dist/cjs/packages/video/video.js +1 -1
  61. package/dist/cjs/packages/virtuallist/utils.js +1 -1
  62. package/dist/cjs/packages/virtuallist/virtuallist.js +1 -1
  63. package/dist/cjs/utils/scale-f.js +1 -3
  64. package/dist/es/hooks/taro/use-custom-event.js +3 -3
  65. package/dist/es/hooks/taro/use-lock-scoll.js +1 -1
  66. package/dist/es/hooks/use-click-away.js +2 -2
  67. package/dist/es/hooks/use-lock-scroll.js +3 -3
  68. package/dist/es/hooks/use-pagination.js +1 -1
  69. package/dist/es/hooks/use-ref-state.js +3 -3
  70. package/dist/es/hooks/use-touch.js +13 -13
  71. package/dist/es/hooks/use-watch.js +1 -1
  72. package/dist/es/locales/en-US.js +4 -4
  73. package/dist/es/locales/id-ID.js +4 -4
  74. package/dist/es/locales/ja-JP.js +4 -4
  75. package/dist/es/locales/tr-TR.js +4 -4
  76. package/dist/es/locales/vi-VN.js +4 -4
  77. package/dist/es/locales/zh-CN.js +4 -4
  78. package/dist/es/locales/zh-TW.js +4 -4
  79. package/dist/es/locales/zh-UG.js +4 -4
  80. package/dist/es/packages/actionsheet/actionsheet.js +8 -8
  81. package/dist/es/packages/address/address.js +10 -10
  82. package/dist/es/packages/address/cascaderRender.js +4 -4
  83. package/dist/es/packages/address/elevatorRender.js +17 -17
  84. package/dist/es/packages/address/existRender.js +5 -5
  85. package/dist/es/packages/address/utils.js +5 -5
  86. package/dist/es/packages/animate/animate.js +4 -4
  87. package/dist/es/packages/animatingnumbers/countup.js +2 -2
  88. package/dist/es/packages/audio/audio.js +26 -26
  89. package/dist/es/packages/avatar/avatar.js +4 -4
  90. package/dist/es/packages/avatarcropper/avatarcropper.js +20 -20
  91. package/dist/es/packages/avatargroup/avatargroup.js +1 -1
  92. package/dist/es/packages/backtop/backtop.js +3 -3
  93. package/dist/es/packages/badge/badge.js +3 -3
  94. package/dist/es/packages/barrage/barrage.js +5 -5
  95. package/dist/es/packages/button/button.js +2 -2
  96. package/dist/es/packages/calendar/calendar.js +12 -12
  97. package/dist/es/packages/calendar/utils.js +7 -7
  98. package/dist/es/packages/calendarcard/calendarcard.js +22 -22
  99. package/dist/es/packages/calendarcard/icon.js +4 -4
  100. package/dist/es/packages/calendarcard/utils.js +5 -5
  101. package/dist/es/packages/calendaritem/calendaritem.js +32 -32
  102. package/dist/es/packages/card/card.js +2 -2
  103. package/dist/es/packages/cascader/cascader.js +15 -15
  104. package/dist/es/packages/cascader/utils.js +9 -8
  105. package/dist/es/packages/cell/cell.js +5 -5
  106. package/dist/es/packages/cellgroup/cellgroup.js +2 -2
  107. package/dist/es/packages/checkbox/checkbox.js +10 -10
  108. package/dist/es/packages/checkboxgroup/checkboxgroup.js +7 -7
  109. package/dist/es/packages/circleprogress/circleprogress.js +5 -5
  110. package/dist/es/packages/col/col.js +2 -2
  111. package/dist/es/packages/collapse/collapse.js +3 -3
  112. package/dist/es/packages/collapse/context.js +2 -2
  113. package/dist/es/packages/collapseitem/collapseitem.js +5 -5
  114. package/dist/es/packages/configprovider/configprovider.js +5 -5
  115. package/dist/es/packages/countdown/countdown.js +12 -12
  116. package/dist/es/packages/datepicker/datepicker.js +12 -12
  117. package/dist/es/packages/datepicker/utils.js +7 -7
  118. package/dist/es/packages/datepickerview/datepickerview.js +5 -5
  119. package/dist/es/packages/dialog/confirm.js +8 -8
  120. package/dist/es/packages/dialog/content.js +5 -5
  121. package/dist/es/packages/dialog/dialog.js +23 -23
  122. package/dist/es/packages/divider/divider.js +3 -3
  123. package/dist/es/packages/drag/drag.js +4 -4
  124. package/dist/es/packages/elevator/elevator.js +14 -14
  125. package/dist/es/packages/ellipsis/ellipsis.js +11 -11
  126. package/dist/es/packages/empty/empty.js +2 -2
  127. package/dist/es/packages/fixednav/fixednav.js +8 -8
  128. package/dist/es/packages/form/form.js +6 -6
  129. package/dist/es/packages/form/useform.js +4 -4
  130. package/dist/es/packages/formitem/formitem.js +1 -1
  131. package/dist/es/packages/grid/context.js +1 -1
  132. package/dist/es/packages/grid/grid.js +4 -4
  133. package/dist/es/packages/griditem/griditem.js +6 -6
  134. package/dist/es/packages/hoverbutton/hoverbutton.js +1 -1
  135. package/dist/es/packages/hoverbuttonitem/hoverbuttonitem.js +4 -4
  136. package/dist/es/packages/hoverbuttonitem/utils.js +1 -1
  137. package/dist/es/packages/image/image.js +8 -8
  138. package/dist/es/packages/imagepreview/imagepreview.js +13 -13
  139. package/dist/es/packages/indicator/indicator.js +5 -5
  140. package/dist/es/packages/infiniteloading/infiniteloading.js +13 -13
  141. package/dist/es/packages/input/input.js +13 -13
  142. package/dist/es/packages/inputnumber/inputnumber.js +12 -12
  143. package/dist/es/packages/layout/layout.js +1 -1
  144. package/dist/es/packages/loading/loading.js +3 -3
  145. package/dist/es/packages/menu/menu.js +13 -13
  146. package/dist/es/packages/menuitem/menuitem.js +10 -10
  147. package/dist/es/packages/navbar/navbar.js +7 -7
  148. package/dist/es/packages/noticebar/noticebar.js +25 -25
  149. package/dist/es/packages/notify/Notification.js +1 -1
  150. package/dist/es/packages/notify/notify.js +3 -3
  151. package/dist/es/packages/numberkeyboard/numberkeyboard.js +13 -13
  152. package/dist/es/packages/overlay/overlay.js +6 -6
  153. package/dist/es/packages/pagination/pagination.js +8 -8
  154. package/dist/es/packages/picker/picker.js +15 -15
  155. package/dist/es/packages/pickerview/pickerroller.js +10 -10
  156. package/dist/es/packages/pickerview/pickerview.js +3 -3
  157. package/dist/es/packages/pickerview/utils.js +6 -6
  158. package/dist/es/packages/popover/popover.js +13 -13
  159. package/dist/es/packages/popup/popup.js +22 -22
  160. package/dist/es/packages/price/price.js +8 -8
  161. package/dist/es/packages/progress/progress.js +5 -5
  162. package/dist/es/packages/pulltorefresh/pulltorefresh.js +7 -7
  163. package/dist/es/packages/quickenter/quickenter.js +14 -14
  164. package/dist/es/packages/radio/radio.js +11 -11
  165. package/dist/es/packages/radiogroup/radiogroup.js +6 -6
  166. package/dist/es/packages/range/range.js +7 -7
  167. package/dist/es/packages/range/utils.js +2 -2
  168. package/dist/es/packages/rate/rate.js +14 -14
  169. package/dist/es/packages/resultpage/resultpage.js +1 -1
  170. package/dist/es/packages/row/row.js +4 -4
  171. package/dist/es/packages/safearea/safearea.js +1 -1
  172. package/dist/es/packages/searchbar/searchbar.js +3 -3
  173. package/dist/es/packages/segmented/segmented.js +4 -4
  174. package/dist/es/packages/shortpassword/shortpassword.js +7 -7
  175. package/dist/es/packages/sidebar/sidebar.js +8 -8
  176. package/dist/es/packages/sidebar/utils.js +1 -1
  177. package/dist/es/packages/sidebaritem/sidebaritem.js +1 -1
  178. package/dist/es/packages/signature/signature.js +12 -12
  179. package/dist/es/packages/skeleton/skeleton.js +4 -4
  180. package/dist/es/packages/space/space.js +1 -1
  181. package/dist/es/packages/step/step.js +2 -2
  182. package/dist/es/packages/steps/steps.js +1 -1
  183. package/dist/es/packages/sticky/sticky.js +4 -4
  184. package/dist/es/packages/swipe/swipe.js +16 -16
  185. package/dist/es/packages/swiper/effects/default.js +2 -2
  186. package/dist/es/packages/swiper/effects/focus.js +4 -4
  187. package/dist/es/packages/swiper/swiper.js +14 -14
  188. package/dist/es/packages/swiperitem/swiperitem.js +2 -2
  189. package/dist/es/packages/switch/switch.js +6 -6
  190. package/dist/es/packages/tabbar/tabbar.js +2 -2
  191. package/dist/es/packages/tabbaritem/tabbaritem.js +10 -10
  192. package/dist/es/packages/table/table.js +10 -10
  193. package/dist/es/packages/tabpane/tabpane.js +1 -1
  194. package/dist/es/packages/tabs/tabs.js +10 -10
  195. package/dist/es/packages/tag/tag.js +10 -10
  196. package/dist/es/packages/textarea/textarea.js +12 -12
  197. package/dist/es/packages/timedetail/timedetail.js +3 -3
  198. package/dist/es/packages/timeselect/timeselect.js +6 -6
  199. package/dist/es/packages/toast/Notification.js +1 -1
  200. package/dist/es/packages/toast/toast.js +2 -2
  201. package/dist/es/packages/tour/tour.js +11 -11
  202. package/dist/es/packages/trendarrow/trendarrow.js +4 -4
  203. package/dist/es/packages/uploader/preview.js +8 -8
  204. package/dist/es/packages/uploader/uploader.js +15 -15
  205. package/dist/es/packages/video/video.js +4 -4
  206. package/dist/es/packages/virtuallist/utils.js +5 -5
  207. package/dist/es/packages/virtuallist/virtuallist.js +2 -2
  208. package/dist/es/packages/watermark/watermark.js +2 -2
  209. package/dist/es/types/spec/empty/base.js +1 -1
  210. package/dist/es/utils/clamp.js +1 -1
  211. package/dist/es/utils/date.js +3 -3
  212. package/dist/es/utils/get-rect.js +1 -1
  213. package/dist/es/utils/interceptor.js +1 -1
  214. package/dist/es/utils/is-date.js +1 -1
  215. package/dist/es/utils/is-empty.js +1 -1
  216. package/dist/es/utils/is-function.js +1 -1
  217. package/dist/es/utils/is-object.js +1 -1
  218. package/dist/es/utils/is-promise.js +1 -1
  219. package/dist/es/utils/pad-zero.js +1 -1
  220. package/dist/es/utils/px-check.js +1 -1
  221. package/dist/es/utils/scale-f.js +2 -4
  222. package/dist/es/utils/sleep.js +1 -1
  223. package/dist/es/utils/taro/ConfigurableCSSTransition.js +1 -1
  224. package/dist/es/utils/taro/get-rect-by-id.js +1 -1
  225. package/dist/es/utils/taro/get-rect.js +3 -3
  226. package/dist/es/utils/taro/get-system-info.js +2 -2
  227. package/dist/es/utils/taro/platform.js +4 -4
  228. package/dist/es/utils/upper-case-first.js +1 -1
  229. package/dist/nutui.react.umd.js +1061 -1057
  230. package/dist/style-jmapp.css +1 -1
  231. package/dist/style-jmapp.scss +34 -34
  232. package/dist/style-jrkf.css +1 -1
  233. package/dist/style-jrkf.scss +34 -34
  234. package/dist/style.css +1 -1
  235. package/dist/style.scss +30 -30
  236. package/package.json +1 -1
@@ -21,8 +21,8 @@ var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
21
21
  alt: ''
22
22
  });
23
23
  var classPrefix = "nut-avatar";
24
- export var Avatar = function(props) {
25
- var _ref = _object_spread({}, defaultProps, props), children = _ref.children, size = _ref.size, shape = _ref.shape, background = _ref.background, color = _ref.color, src = _ref.src, alt = _ref.alt, icon = _ref.icon, fit = _ref.fit, className = _ref.className, style = _ref.style, onClick = _ref.onClick, onError = _ref.onError, rest = _object_without_properties(_ref, [
24
+ export var Avatar = function Avatar(props) {
25
+ var _$_object_spread = _object_spread({}, defaultProps, props), children = _$_object_spread.children, size = _$_object_spread.size, shape = _$_object_spread.shape, background = _$_object_spread.background, color = _$_object_spread.color, src = _$_object_spread.src, alt = _$_object_spread.alt, icon = _$_object_spread.icon, fit = _$_object_spread.fit, className = _$_object_spread.className, style = _$_object_spread.style, onClick = _$_object_spread.onClick, onError = _$_object_spread.onError, rest = _object_without_properties(_$_object_spread, [
26
26
  "children",
27
27
  "size",
28
28
  "shape",
@@ -91,10 +91,10 @@ export var Avatar = function(props) {
91
91
  avatarLength,
92
92
  avatarGroupRef
93
93
  ]);
94
- var errorEvent = function() {
94
+ var errorEvent = function errorEvent() {
95
95
  onError && onError();
96
96
  };
97
- var clickAvatar = function(e) {
97
+ var clickAvatar = function clickAvatar(e) {
98
98
  onClick && onClick(e);
99
99
  };
100
100
  return /*#__PURE__*/ React.createElement(React.Fragment, null, (showMax || !(propAvatarGroup === null || propAvatarGroup === void 0 ? void 0 : propAvatarGroup.max) || avatarIndex <= (propAvatarGroup === null || propAvatarGroup === void 0 ? void 0 : propAvatarGroup.max)) && /*#__PURE__*/ React.createElement("div", _object_spread_props(_object_spread({
@@ -36,7 +36,7 @@ var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
36
36
  shape: 'square'
37
37
  });
38
38
  var classPrefix = "nut-avatar-cropper";
39
- export var AvatarCropper = function(props) {
39
+ export var AvatarCropper = function AvatarCropper(props) {
40
40
  var locale = useConfig().locale;
41
41
  defaultProps.toolbar = [
42
42
  /*#__PURE__*/ React.createElement(Button, {
@@ -54,7 +54,7 @@ export var AvatarCropper = function(props) {
54
54
  key: "confirm"
55
55
  }, locale.confirm)
56
56
  ];
57
- var _ref = _object_spread({}, defaultProps, props), children = _ref.children, maxZoom = _ref.maxZoom, space = _ref.space, toolbar = _ref.toolbar, toolbarPosition = _ref.toolbarPosition, editText = _ref.editText, shape = _ref.shape, className = _ref.className, style = _ref.style, onConfirm = _ref.onConfirm, onCancel = _ref.onCancel, rest = _object_without_properties(_ref, [
57
+ var _$_object_spread = _object_spread({}, defaultProps, props), children = _$_object_spread.children, maxZoom = _$_object_spread.maxZoom, space = _$_object_spread.space, toolbar = _$_object_spread.toolbar, toolbarPosition = _$_object_spread.toolbarPosition, editText = _$_object_spread.editText, shape = _$_object_spread.shape, className = _$_object_spread.className, style = _$_object_spread.style, onConfirm = _$_object_spread.onConfirm, onCancel = _$_object_spread.onCancel, rest = _object_without_properties(_$_object_spread, [
58
58
  "children",
59
59
  "maxZoom",
60
60
  "space",
@@ -143,7 +143,7 @@ export var AvatarCropper = function(props) {
143
143
  isAngle
144
144
  ]);
145
145
  // 文件转base64
146
- var fileToDataURL = function(file) {
146
+ var fileToDataURL = function fileToDataURL(file) {
147
147
  return new Promise(function(resolve) {
148
148
  var reader = new FileReader();
149
149
  reader.onloadend = function(e) {
@@ -153,7 +153,7 @@ export var AvatarCropper = function(props) {
153
153
  });
154
154
  };
155
155
  // base64转图片
156
- var dataURLToImage = function(dataURL) {
156
+ var dataURLToImage = function dataURLToImage(dataURL) {
157
157
  return new Promise(function(resolve) {
158
158
  var img = new Image();
159
159
  img.onload = function() {
@@ -205,7 +205,7 @@ export var AvatarCropper = function(props) {
205
205
  draw
206
206
  ]);
207
207
  // 设置绘制图片
208
- var setDrawImgs = function(image) {
208
+ var setDrawImgs = function setDrawImgs(image) {
209
209
  var rect = getRect(cropperPopupRef.current);
210
210
  if (!rect) return;
211
211
  var clientWidth = rect.width, clientHeight = rect.height;
@@ -231,7 +231,7 @@ export var AvatarCropper = function(props) {
231
231
  }));
232
232
  resetScale(scale);
233
233
  };
234
- var inputImageChange = function(event) {
234
+ var inputImageChange = function inputImageChange(event) {
235
235
  return _async_to_generator(function() {
236
236
  var $el, files, base64, image;
237
237
  return _ts_generator(this, function(_state) {
@@ -263,7 +263,7 @@ export var AvatarCropper = function(props) {
263
263
  });
264
264
  })();
265
265
  };
266
- var resetScale = function(scale) {
266
+ var resetScale = function resetScale(scale) {
267
267
  setState(_object_spread_props(_object_spread({}, state), {
268
268
  moveX: 0,
269
269
  moveY: 0,
@@ -272,7 +272,7 @@ export var AvatarCropper = function(props) {
272
272
  defScale: scale || state.defScale
273
273
  }));
274
274
  };
275
- var setScale = function(scale) {
275
+ var setScale = function setScale(scale) {
276
276
  scale = clamp(scale, +0.3, +maxZoom + 1);
277
277
  if (scale !== state.scale) {
278
278
  setState(_object_spread_props(_object_spread({}, state), {
@@ -281,7 +281,7 @@ export var AvatarCropper = function(props) {
281
281
  }
282
282
  };
283
283
  // 计算两个点的距离
284
- var getDistance = function(touches) {
284
+ var getDistance = function getDistance(touches) {
285
285
  return Math.sqrt(Math.pow(touches[0].clientX - touches[1].clientX, 2) + Math.pow(touches[0].clientY - touches[1].clientY, 2));
286
286
  };
287
287
  var _useState5 = _sliced_to_array(useState({
@@ -291,7 +291,7 @@ export var AvatarCropper = function(props) {
291
291
  startDistance: 0
292
292
  }), 2), startMove = _useState5[0], setStartMove = _useState5[1];
293
293
  var startMoveX = startMove.startMoveX, startMoveY = startMove.startMoveY, startScale = startMove.startScale, startDistance = startMove.startDistance;
294
- var onTouchStart = function(event) {
294
+ var onTouchStart = function onTouchStart(event) {
295
295
  var touches = event.touches;
296
296
  var offsetX = touch.offsetX;
297
297
  touch.start(event);
@@ -309,7 +309,7 @@ export var AvatarCropper = function(props) {
309
309
  }));
310
310
  }
311
311
  };
312
- var onTouchMove = function(event) {
312
+ var onTouchMove = function onTouchMove(event) {
313
313
  var touches = event.touches;
314
314
  touch.move(event);
315
315
  if (moving || zooming) {
@@ -330,7 +330,7 @@ export var AvatarCropper = function(props) {
330
330
  setScale(scale);
331
331
  }
332
332
  };
333
- var onTouchEnd = function(event) {
333
+ var onTouchEnd = function onTouchEnd(event) {
334
334
  var stopPropagation = false;
335
335
  if (moving || zooming) {
336
336
  stopPropagation = !(moving && startMoveX === state.moveX && startMoveY === state.moveY);
@@ -361,12 +361,12 @@ export var AvatarCropper = function(props) {
361
361
  preventDefault(event, stopPropagation);
362
362
  touch.reset();
363
363
  };
364
- var reset = function() {
364
+ var reset = function reset() {
365
365
  setState(_object_spread_props(_object_spread({}, state), {
366
366
  angle: 0
367
367
  }));
368
368
  };
369
- var rotate = function() {
369
+ var rotate = function rotate() {
370
370
  if (state.angle === 270) {
371
371
  setState(_object_spread_props(_object_spread({}, state), {
372
372
  angle: 0
@@ -377,7 +377,7 @@ export var AvatarCropper = function(props) {
377
377
  angle: state.angle + 90
378
378
  }));
379
379
  };
380
- var cancel = function() {
380
+ var cancel = function cancel() {
381
381
  var isEmit = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true;
382
382
  setVisible(false);
383
383
  resetScale();
@@ -385,7 +385,7 @@ export var AvatarCropper = function(props) {
385
385
  isEmit && onCancel && onCancel();
386
386
  };
387
387
  // 裁剪图片
388
- var confirm = function() {
388
+ var confirm = function confirm() {
389
389
  var canvas = canvasRef.current;
390
390
  var sx = drawImage.sx, sy = drawImage.sy, swidth = drawImage.swidth;
391
391
  var width = swidth;
@@ -403,7 +403,7 @@ export var AvatarCropper = function(props) {
403
403
  onConfirm && onConfirm(imageDataURL);
404
404
  cancel(false);
405
405
  };
406
- var ToolBar = function() {
406
+ var ToolBar = function ToolBar() {
407
407
  var actions = [
408
408
  cancel,
409
409
  reset,
@@ -416,13 +416,13 @@ export var AvatarCropper = function(props) {
416
416
  return /*#__PURE__*/ React.createElement("div", {
417
417
  key: index,
418
418
  className: "".concat(classPrefix, "-popup-toolbar-item"),
419
- onClick: function(_e) {
419
+ onClick: function onClick(_e) {
420
420
  return action();
421
421
  }
422
422
  }, toolbar[index]);
423
423
  }));
424
424
  };
425
- var CropperPopup = function() {
425
+ var CropperPopup = function CropperPopup() {
426
426
  return /*#__PURE__*/ React.createElement("div", {
427
427
  ref: cropperPopupRef,
428
428
  className: "".concat(classPrefix, "-popup"),
@@ -453,7 +453,7 @@ export var AvatarCropper = function(props) {
453
453
  type: "file",
454
454
  accept: "image/*",
455
455
  className: "".concat(classPrefix, "-input"),
456
- onChange: function(e) {
456
+ onChange: function onChange(e) {
457
457
  return inputImageChange(e);
458
458
  },
459
459
  "aria-label": locale.avatarCropper.selectImage
@@ -13,7 +13,7 @@ var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
13
13
  level: 'left'
14
14
  });
15
15
  var classPrefix = "nut-avatar-group";
16
- export var AvatarGroup = function(props) {
16
+ export var AvatarGroup = function AvatarGroup(props) {
17
17
  var propAvatarGroup = _object_spread({}, defaultProps, props);
18
18
  var className = propAvatarGroup.className, style = propAvatarGroup.style, children = propAvatarGroup.children;
19
19
  var avatarGroupRef = useRef(null);
@@ -15,7 +15,7 @@ var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
15
15
  zIndex: 900,
16
16
  duration: 1000
17
17
  });
18
- export var BackTop = function(props) {
18
+ export var BackTop = function BackTop(props) {
19
19
  var _$_object_spread = _object_spread({}, defaultProps, props), children = _$_object_spread.children, target = _$_object_spread.target, threshold = _$_object_spread.threshold, zIndex = _$_object_spread.zIndex, className = _$_object_spread.className, duration = _$_object_spread.duration, icon = _$_object_spread.icon, style = _$_object_spread.style, onClick = _$_object_spread.onClick;
20
20
  var classPrefix = 'nut-backtop';
21
21
  var _useState = _sliced_to_array(useState(false), 2), backTop = _useState[0], setBackTop = _useState[1];
@@ -101,12 +101,12 @@ export var BackTop = function(props) {
101
101
  zIndex: zIndex
102
102
  }, style),
103
103
  icon: !children && (icon || /*#__PURE__*/ React.createElement(Top, null)),
104
- onClick: function(e) {
104
+ onClick: function onClick(e) {
105
105
  goTop(e);
106
106
  }
107
107
  }, children && /*#__PURE__*/ React.createElement("div", {
108
108
  className: "nut-hoverbutton-item-container",
109
- onClick: function(e) {
109
+ onClick: function onClick(e) {
110
110
  goTop(e);
111
111
  }
112
112
  }, children));
@@ -16,7 +16,7 @@ var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
16
16
  size: 'large',
17
17
  disabled: false
18
18
  });
19
- export var Badge = function(props) {
19
+ export var Badge = function Badge(props) {
20
20
  var isIcon = function isIcon() {
21
21
  if ((typeof value === "undefined" ? "undefined" : _type_of(value)) === 'object' && value) return value;
22
22
  };
@@ -31,7 +31,7 @@ export var Badge = function(props) {
31
31
  var _$_object_spread = _object_spread({}, defaultProps, props), className = _$_object_spread.className, style = _$_object_spread.style, value = _$_object_spread.value, max = _$_object_spread.max, children = _$_object_spread.children, dot = _$_object_spread.dot, top = _$_object_spread.top, right = _$_object_spread.right, fill = _$_object_spread.fill, size = _$_object_spread.size, disabled = _$_object_spread.disabled;
32
32
  var classPrefix = 'nut-badge';
33
33
  var classes = classNames(classPrefix, className);
34
- var getContent = function() {
34
+ var getContent = function getContent() {
35
35
  if (dot || value === 0) return null;
36
36
  if (typeof value === 'number') {
37
37
  return max < value ? "".concat(max, "+") : "".concat(value);
@@ -40,7 +40,7 @@ export var Badge = function(props) {
40
40
  };
41
41
  var _obj;
42
42
  var contentClasses = classNames((_obj = {}, _define_property(_obj, "".concat(classPrefix, "-sup"), isNumber() || isString() || dot), _define_property(_obj, "".concat(classPrefix, "-number"), isNumber()), _define_property(_obj, "".concat(classPrefix, "-one"), typeof getContent() === 'string' && ((_this = "".concat(getContent())) === null || _this === void 0 ? void 0 : _this.length) === 1), _define_property(_obj, "".concat(classPrefix, "-dot"), dot), _define_property(_obj, "".concat(classPrefix, "-dot-").concat(size), dot), _define_property(_obj, "".concat(classPrefix, "-").concat(fill), fill === 'outline'), _define_property(_obj, "".concat(classPrefix, "-content"), children), _define_property(_obj, "".concat(classPrefix, "-disabled"), disabled), _obj));
43
- var getPositionStyle = function() {
43
+ var getPositionStyle = function getPositionStyle() {
44
44
  return _define_property({
45
45
  top: "".concat(Number(top) || 0, "px")
46
46
  }, rtl ? 'left' : 'right', "".concat(Number(right) || 0, "px"));
@@ -13,8 +13,8 @@ var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
13
13
  gapY: 10
14
14
  });
15
15
  var classPrefix = "nut-barrage";
16
- var InternalBarrage = function(props, ref) {
17
- var _ref = _object_spread({}, defaultProps, props), className = _ref.className, interval = _ref.interval, loop = _ref.loop, list = _ref.list, duration = _ref.duration, rows = _ref.rows, gapY = _ref.gapY, restProps = _object_without_properties(_ref, [
16
+ var InternalBarrage = function InternalBarrage(props, ref) {
17
+ var _$_object_spread = _object_spread({}, defaultProps, props), className = _$_object_spread.className, interval = _$_object_spread.interval, loop = _$_object_spread.loop, list = _$_object_spread.list, duration = _$_object_spread.duration, rows = _$_object_spread.rows, gapY = _$_object_spread.gapY, restProps = _object_without_properties(_$_object_spread, [
18
18
  "className",
19
19
  "interval",
20
20
  "loop",
@@ -33,7 +33,7 @@ var InternalBarrage = function(props, ref) {
33
33
  var classes = classNames(classPrefix, className);
34
34
  useImperativeHandle(ref, function() {
35
35
  return {
36
- add: function(word) {
36
+ add: function add(word) {
37
37
  var _index = index.current % list.length;
38
38
  if (!loop && index.current === list.length) {
39
39
  list.splice(list.length, 0, word);
@@ -59,7 +59,7 @@ var InternalBarrage = function(props, ref) {
59
59
  }, [
60
60
  list
61
61
  ]);
62
- var run = function() {
62
+ var run = function run() {
63
63
  clearInterval(timer.current);
64
64
  var intervalCache = interval;
65
65
  var _index = (loop ? index.current % list.length : index.current) % rows;
@@ -71,7 +71,7 @@ var InternalBarrage = function(props, ref) {
71
71
  play();
72
72
  }, intervalCache);
73
73
  };
74
- var play = function() {
74
+ var play = function play() {
75
75
  if (!loop && index.current >= list.length) {
76
76
  return;
77
77
  }
@@ -19,10 +19,10 @@ var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
19
19
  icon: null,
20
20
  rightIcon: null,
21
21
  nativeType: 'button',
22
- onClick: function() {}
22
+ onClick: function onClick() {}
23
23
  });
24
24
  export var Button = /*#__PURE__*/ React.forwardRef(function(props, ref) {
25
- var _ref = _object_spread({}, defaultProps, props), color = _ref.color, shape = _ref.shape, fill = _ref.fill, loading = _ref.loading, disabled = _ref.disabled, type = _ref.type, size = _ref.size, block = _ref.block, icon = _ref.icon, rightIcon = _ref.rightIcon, children = _ref.children, className = _ref.className, style = _ref.style, nativeType = _ref.nativeType, description = _ref.description, onClick = _ref.onClick, rest = _object_without_properties(_ref, [
25
+ var _$_object_spread = _object_spread({}, defaultProps, props), color = _$_object_spread.color, shape = _$_object_spread.shape, fill = _$_object_spread.fill, loading = _$_object_spread.loading, disabled = _$_object_spread.disabled, type = _$_object_spread.type, size = _$_object_spread.size, block = _$_object_spread.block, icon = _$_object_spread.icon, rightIcon = _$_object_spread.rightIcon, children = _$_object_spread.children, className = _$_object_spread.className, style = _$_object_spread.style, nativeType = _$_object_spread.nativeType, description = _$_object_spread.description, onClick = _$_object_spread.onClick, rest = _object_without_properties(_$_object_spread, [
26
26
  "color",
27
27
  "shape",
28
28
  "fill",
@@ -23,40 +23,40 @@ var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
23
23
  showSubTitle: true,
24
24
  scrollAnimation: true,
25
25
  firstDayOfWeek: 0,
26
- disableDate: function(date) {
26
+ disableDate: function disableDate(date) {
27
27
  return false;
28
28
  },
29
29
  renderHeaderButtons: undefined,
30
30
  renderDay: undefined,
31
31
  renderDayTop: undefined,
32
32
  renderDayBottom: undefined,
33
- onClose: function() {},
34
- onConfirm: function(param) {},
35
- onDayClick: function(data) {},
36
- onPageChange: function(param) {}
33
+ onClose: function onClose() {},
34
+ onConfirm: function onConfirm(param) {},
35
+ onDayClick: function onDayClick(data) {},
36
+ onPageChange: function onPageChange(param) {}
37
37
  });
38
38
  export var Calendar = /*#__PURE__*/ React.forwardRef(function(props, ref) {
39
39
  var locale = useConfig().locale;
40
40
  var _$_object_spread = _object_spread({}, defaultProps, props), style = _$_object_spread.style, className = _$_object_spread.className, children = _$_object_spread.children, popup = _$_object_spread.popup, visible = _$_object_spread.visible, type = _$_object_spread.type, autoBackfill = _$_object_spread.autoBackfill, title = _$_object_spread.title, defaultValue = _$_object_spread.defaultValue, startDate = _$_object_spread.startDate, endDate = _$_object_spread.endDate, showToday = _$_object_spread.showToday, startText = _$_object_spread.startText, endText = _$_object_spread.endText, confirmText = _$_object_spread.confirmText, showTitle = _$_object_spread.showTitle, showSubTitle = _$_object_spread.showSubTitle, scrollAnimation = _$_object_spread.scrollAnimation, firstDayOfWeek = _$_object_spread.firstDayOfWeek, closeIcon = _$_object_spread.closeIcon, disableDate = _$_object_spread.disableDate, renderHeaderButtons = _$_object_spread.renderHeaderButtons, renderBottomButton = _$_object_spread.renderBottomButton, renderDay = _$_object_spread.renderDay, renderDayTop = _$_object_spread.renderDayTop, renderDayBottom = _$_object_spread.renderDayBottom, onClose = _$_object_spread.onClose, onConfirm = _$_object_spread.onConfirm, onDayClick = _$_object_spread.onDayClick, onPageChange = _$_object_spread.onPageChange;
41
41
  var calendarRef = useRef(null);
42
- var close = function() {
42
+ var close = function close() {
43
43
  onClose && onClose();
44
44
  };
45
- var choose = function(param) {
45
+ var choose = function choose(param) {
46
46
  close();
47
47
  onConfirm && onConfirm(param);
48
48
  };
49
- var closePopup = function() {
49
+ var closePopup = function closePopup() {
50
50
  close();
51
51
  };
52
- var select = function(param) {
52
+ var select = function select(param) {
53
53
  onDayClick && onDayClick(param);
54
54
  };
55
- var scrollToDate = function(date) {
55
+ var scrollToDate = function scrollToDate(date) {
56
56
  var _calendarRef_current;
57
57
  (_calendarRef_current = calendarRef.current) === null || _calendarRef_current === void 0 ? void 0 : _calendarRef_current.scrollToDate(date);
58
58
  };
59
- var yearMonthChange = function(param) {
59
+ var yearMonthChange = function yearMonthChange(param) {
60
60
  onPageChange && onPageChange(param);
61
61
  };
62
62
  React.useImperativeHandle(ref, function() {
@@ -64,7 +64,7 @@ export var Calendar = /*#__PURE__*/ React.forwardRef(function(props, ref) {
64
64
  scrollToDate: scrollToDate
65
65
  };
66
66
  });
67
- var renderItem = function() {
67
+ var renderItem = function renderItem() {
68
68
  return /*#__PURE__*/ React.createElement(CalendarItem, {
69
69
  ref: calendarRef,
70
70
  style: style,
@@ -1,9 +1,9 @@
1
1
  import { Utils } from "../../utils/date";
2
- export var splitDate = function(date) {
2
+ export var splitDate = function splitDate(date) {
3
3
  var split = date.indexOf('-') !== -1 ? '-' : '/';
4
4
  return date.split(split);
5
5
  };
6
- export var isMultiple = function(day, days) {
6
+ export var isMultiple = function isMultiple(day, days) {
7
7
  if (days.length > 0) {
8
8
  return days.some(function(item) {
9
9
  return Utils.isEqual(item, day);
@@ -11,20 +11,20 @@ export var isMultiple = function(day, days) {
11
11
  }
12
12
  return false;
13
13
  };
14
- export var isCurrDay = function(month, day) {
14
+ export var isCurrDay = function isCurrDay(month, day) {
15
15
  var date = "".concat(month.curData[0], "/").concat(month.curData[1], "/").concat(day);
16
16
  return Utils.isEqual(date, Utils.date2Str(new Date(), '/'));
17
17
  };
18
- export var getCurrDate = function(day, month) {
18
+ export var getCurrDate = function getCurrDate(day, month) {
19
19
  return "".concat(month.curData[0], "/").concat(month.curData[1], "/").concat(Utils.getNumTwoBit(+day.day));
20
20
  };
21
- export var isStart = function(day, days) {
21
+ export var isStart = function isStart(day, days) {
22
22
  return Utils.isEqual(days[0], day);
23
23
  };
24
- export var isEnd = function(day, days) {
24
+ export var isEnd = function isEnd(day, days) {
25
25
  return Utils.isEqual(days[1], day);
26
26
  };
27
27
  // 开始结束时间是否相等
28
- export var isStartAndEnd = function(days) {
28
+ export var isStartAndEnd = function isStartAndEnd(days) {
29
29
  return days.length >= 2 && Utils.isEqual(days[0], days[1]);
30
30
  };
@@ -37,7 +37,7 @@ export var CalendarCard = /*#__PURE__*/ React.forwardRef(function(props, ref) {
37
37
  }), 2), month = _useState[0], setMonth = _useState[1];
38
38
  // 当前月份对应的日期(6 * 7 视图)
39
39
  var _useState1 = _sliced_to_array(useState([]), 2), days = _useState1[0], setDays = _useState1[1];
40
- var valueToRange = function(val) {
40
+ var valueToRange = function valueToRange(val) {
41
41
  if (Array.isArray(val)) {
42
42
  return val.map(function(date) {
43
43
  return convertDateToDay(date);
@@ -47,7 +47,7 @@ export var CalendarCard = /*#__PURE__*/ React.forwardRef(function(props, ref) {
47
47
  convertDateToDay(val)
48
48
  ] : [];
49
49
  };
50
- var rangeTovalue = function(range) {
50
+ var rangeTovalue = function rangeTovalue(range) {
51
51
  if (Array.isArray(range)) {
52
52
  return range.map(function(day) {
53
53
  return convertDayToDate(day);
@@ -62,7 +62,7 @@ export var CalendarCard = /*#__PURE__*/ React.forwardRef(function(props, ref) {
62
62
  defaultValue: defaultValue ? valueToRange(defaultValue) : undefined,
63
63
  finalValue: []
64
64
  }), 2), innerValue = _usePropsValue[0], setInnerValue = _usePropsValue[1];
65
- var change = function(v) {
65
+ var change = function change(v) {
66
66
  setInnerValue(v);
67
67
  if (type === 'single') {
68
68
  var date = convertDayToDate(v[0]);
@@ -107,10 +107,10 @@ export var CalendarCard = /*#__PURE__*/ React.forwardRef(function(props, ref) {
107
107
  getDays,
108
108
  firstDayOfWeek
109
109
  ]);
110
- var isSameDay = function(day1, day2) {
110
+ var isSameDay = function isSameDay(day1, day2) {
111
111
  return (day1 === null || day1 === void 0 ? void 0 : day1.year) === (day2 === null || day2 === void 0 ? void 0 : day2.year) && (day1 === null || day1 === void 0 ? void 0 : day1.month) === (day2 === null || day2 === void 0 ? void 0 : day2.month) && (day1 === null || day1 === void 0 ? void 0 : day1.date) === (day2 === null || day2 === void 0 ? void 0 : day2.date);
112
112
  };
113
- var compareDay = function(day1, day2) {
113
+ var compareDay = function compareDay(day1, day2) {
114
114
  if (day1 && day2) {
115
115
  if (day1.year === day2.year) {
116
116
  if (day1.month === day2.month) {
@@ -121,7 +121,7 @@ export var CalendarCard = /*#__PURE__*/ React.forwardRef(function(props, ref) {
121
121
  return day1.year - day2.year;
122
122
  }
123
123
  };
124
- var isDisable = function(day) {
124
+ var isDisable = function isDisable(day) {
125
125
  if (disableDay && disableDay(day)) {
126
126
  return true;
127
127
  }
@@ -133,7 +133,7 @@ export var CalendarCard = /*#__PURE__*/ React.forwardRef(function(props, ref) {
133
133
  }
134
134
  return false;
135
135
  };
136
- var isActive = function(day) {
136
+ var isActive = function isActive(day) {
137
137
  if (type === 'single' || type === 'multiple') {
138
138
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
139
139
  try {
@@ -162,13 +162,13 @@ export var CalendarCard = /*#__PURE__*/ React.forwardRef(function(props, ref) {
162
162
  }
163
163
  return false;
164
164
  };
165
- var isStart = function(day) {
165
+ var isStart = function isStart(day) {
166
166
  return (type === 'range' || type === 'week') && innerValue.length === 2 && isSameDay(day, innerValue[0]);
167
167
  };
168
- var isEnd = function(day) {
168
+ var isEnd = function isEnd(day) {
169
169
  return (type === 'range' || type === 'week') && innerValue.length === 2 && isSameDay(day, innerValue[1]);
170
170
  };
171
- var isMid = function(day) {
171
+ var isMid = function isMid(day) {
172
172
  if (type === 'range' || type === 'week') {
173
173
  if (innerValue.length === 2) {
174
174
  var c1 = compareDay(innerValue[0], day);
@@ -180,11 +180,11 @@ export var CalendarCard = /*#__PURE__*/ React.forwardRef(function(props, ref) {
180
180
  }
181
181
  return false;
182
182
  };
183
- var isWeekend = function(day) {
183
+ var isWeekend = function isWeekend(day) {
184
184
  var d = new Date(day.year, day.month - 1, day.date).getDay();
185
185
  return d === 0 || d === 6;
186
186
  };
187
- var getClasses = function(day) {
187
+ var getClasses = function getClasses(day) {
188
188
  /**
189
189
  * active: single、multiple 激活日期
190
190
  * start: 范围开始日期
@@ -215,7 +215,7 @@ export var CalendarCard = /*#__PURE__*/ React.forwardRef(function(props, ref) {
215
215
  }
216
216
  return res;
217
217
  };
218
- var jumpTo = function(year, month) {
218
+ var jumpTo = function jumpTo(year, month) {
219
219
  if (startDate) {
220
220
  var c = compareDay({
221
221
  year: year,
@@ -241,7 +241,7 @@ export var CalendarCard = /*#__PURE__*/ React.forwardRef(function(props, ref) {
241
241
  month: month
242
242
  });
243
243
  };
244
- var jump = function() {
244
+ var jump = function jump() {
245
245
  var step = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 1;
246
246
  var current = month.year * 12 + month.month;
247
247
  var newMonth = (current + step) % 12;
@@ -257,7 +257,7 @@ export var CalendarCard = /*#__PURE__*/ React.forwardRef(function(props, ref) {
257
257
  jumpTo: jumpTo
258
258
  };
259
259
  });
260
- var handleDayClick = function(day) {
260
+ var handleDayClick = function handleDayClick(day) {
261
261
  onDayClick === null || onDayClick === void 0 ? void 0 : onDayClick(day);
262
262
  if (day.type === 'prev' || day.type === 'next' || isDisable(day)) {
263
263
  return;
@@ -337,19 +337,19 @@ export var CalendarCard = /*#__PURE__*/ React.forwardRef(function(props, ref) {
337
337
  }
338
338
  };
339
339
  var monthTitle = locale.calendaritem.monthTitle;
340
- var renderHeader = function() {
340
+ var renderHeader = function renderHeader() {
341
341
  return /*#__PURE__*/ React.createElement("div", {
342
342
  className: "".concat(prefixCls, "-header")
343
343
  }, /*#__PURE__*/ React.createElement("div", {
344
344
  className: "".concat(prefixCls, "-header-left")
345
345
  }, /*#__PURE__*/ React.createElement("div", {
346
346
  className: "double-left",
347
- onClick: function() {
347
+ onClick: function onClick() {
348
348
  return jump(-12);
349
349
  }
350
350
  }, /*#__PURE__*/ React.createElement(DoubleLeft, null)), /*#__PURE__*/ React.createElement("div", {
351
351
  className: "left",
352
- onClick: function() {
352
+ onClick: function onClick() {
353
353
  return jump(-1);
354
354
  }
355
355
  }, /*#__PURE__*/ React.createElement(ArrowLeft, null))), /*#__PURE__*/ React.createElement("div", {
@@ -358,12 +358,12 @@ export var CalendarCard = /*#__PURE__*/ React.forwardRef(function(props, ref) {
358
358
  className: "".concat(prefixCls, "-header-right")
359
359
  }, /*#__PURE__*/ React.createElement("div", {
360
360
  className: "right",
361
- onClick: function() {
361
+ onClick: function onClick() {
362
362
  return jump(1);
363
363
  }
364
364
  }, /*#__PURE__*/ React.createElement(ArrowRight, null)), /*#__PURE__*/ React.createElement("div", {
365
365
  className: "double-right",
366
- onClick: function() {
366
+ onClick: function onClick() {
367
367
  return jump(12);
368
368
  }
369
369
  }, /*#__PURE__*/ React.createElement(DoubleRight, null))));
@@ -382,7 +382,7 @@ export var CalendarCard = /*#__PURE__*/ React.forwardRef(function(props, ref) {
382
382
  firstDayOfWeek,
383
383
  locale.calendaritem.weekdays
384
384
  ]);
385
- var renderContent = function() {
385
+ var renderContent = function renderContent() {
386
386
  return /*#__PURE__*/ React.createElement("div", {
387
387
  className: "".concat(prefixCls, "-content")
388
388
  }, /*#__PURE__*/ React.createElement("div", {
@@ -400,7 +400,7 @@ export var CalendarCard = /*#__PURE__*/ React.forwardRef(function(props, ref) {
400
400
  return /*#__PURE__*/ React.createElement("div", {
401
401
  className: classNames("".concat(prefixCls, "-day"), day.type, getClasses(day)),
402
402
  key: "".concat(day.year, "-").concat(day.month, "-").concat(day.date),
403
- onClick: function() {
403
+ onClick: function onClick() {
404
404
  return handleDayClick(day);
405
405
  }
406
406
  }, /*#__PURE__*/ React.createElement("div", {
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- export var ArrowLeft = function() {
2
+ export var ArrowLeft = function ArrowLeft() {
3
3
  return /*#__PURE__*/ React.createElement("svg", {
4
4
  xmlns: "http://www.w3.org/2000/svg",
5
5
  width: "18",
@@ -9,7 +9,7 @@ export var ArrowLeft = function() {
9
9
  d: "M6.605 9.49a.771.771 0 0 1 0-.98l3.6-4.372a.771.771 0 0 1 1.19.981L8.2 9l3.197 3.881a.771.771 0 1 1-1.191.98l-3.6-4.37Z"
10
10
  }));
11
11
  };
12
- export var ArrowRight = function() {
12
+ export var ArrowRight = function ArrowRight() {
13
13
  return /*#__PURE__*/ React.createElement("svg", {
14
14
  xmlns: "http://www.w3.org/2000/svg",
15
15
  width: "18",
@@ -19,7 +19,7 @@ export var ArrowRight = function() {
19
19
  d: "M11.396 9.49a.771.771 0 0 0 0-.98l-3.6-4.372a.771.771 0 0 0-1.191.981L9.8 9l-3.196 3.881a.771.771 0 0 0 1.19.98l3.6-4.37Z"
20
20
  }));
21
21
  };
22
- export var DoubleLeft = function() {
22
+ export var DoubleLeft = function DoubleLeft() {
23
23
  return /*#__PURE__*/ React.createElement("svg", {
24
24
  xmlns: "http://www.w3.org/2000/svg",
25
25
  width: "18",
@@ -29,7 +29,7 @@ export var DoubleLeft = function() {
29
29
  d: "M13.853 4.026a.771.771 0 0 1 .12 1.085L10.864 9l3.11 3.889a.771.771 0 1 1-1.204.963L9.272 9.482a.771.771 0 0 1 0-.964l3.497-4.371a.771.771 0 0 1 1.084-.12Zm-5.245 0a.771.771 0 0 1 .12 1.085L5.617 9l3.111 3.889a.771.771 0 0 1-1.205.963L4.026 9.482a.771.771 0 0 1 0-.964l3.497-4.371a.771.771 0 0 1 1.085-.12Z"
30
30
  }));
31
31
  };
32
- export var DoubleRight = function() {
32
+ export var DoubleRight = function DoubleRight() {
33
33
  return /*#__PURE__*/ React.createElement("svg", {
34
34
  xmlns: "http://www.w3.org/2000/svg",
35
35
  width: "18",
@@ -1,17 +1,17 @@
1
1
  import { Utils } from "../../utils/date";
2
- export var convertDateToDay = function(date) {
2
+ export var convertDateToDay = function convertDateToDay(date) {
3
3
  return date ? {
4
4
  year: date.getFullYear(),
5
5
  month: date.getMonth() + 1,
6
6
  date: date.getDate()
7
7
  } : null;
8
8
  };
9
- export var convertDayToDate = function(day) {
9
+ export var convertDayToDate = function convertDayToDate(day) {
10
10
  return day ? new Date(day.year, day.month - 1, day.date) : null;
11
11
  };
12
12
  /**
13
13
  * 获取当月面板中前一个月的日期数据
14
- */ export var getPrevMonthDays = function(year, month, firstDayOfWeek) {
14
+ */ export var getPrevMonthDays = function getPrevMonthDays(year, month, firstDayOfWeek) {
15
15
  var prevMonth = month - 1;
16
16
  var prevYear = year;
17
17
  if (prevMonth <= 0) {
@@ -36,7 +36,7 @@ export var convertDayToDate = function(day) {
36
36
  };
37
37
  /**
38
38
  * 获取当前月的日期数据
39
- */ export var getCurrentMonthDays = function(year, month) {
39
+ */ export var getCurrentMonthDays = function getCurrentMonthDays(year, month) {
40
40
  var days = Utils.getMonthDays("".concat(year), "".concat(month));
41
41
  return Array.from(Array(days), function(_, k) {
42
42
  return {
@@ -49,7 +49,7 @@ export var convertDayToDate = function(day) {
49
49
  };
50
50
  /**
51
51
  * 根据日期获取当前周的起始日期
52
- */ export var getCurrentWeekDays = function(day, firstDayOfWeek) {
52
+ */ export var getCurrentWeekDays = function getCurrentWeekDays(day, firstDayOfWeek) {
53
53
  var current = new Date(day.year, day.month - 1, day.date);
54
54
  var count = (current.getDay() + 7 - firstDayOfWeek) % 7;
55
55
  return [