@nutui/nutui-react 2.3.11 → 2.3.12

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 (252) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/esm/ActionSheet.js +30 -86
  3. package/dist/esm/Address.js +80 -184
  4. package/dist/esm/Animate.js +21 -49
  5. package/dist/esm/AnimatingNumbers.js +47 -136
  6. package/dist/esm/Audio.js +88 -159
  7. package/dist/esm/Avatar.js +44 -91
  8. package/dist/esm/AvatarCropper.js +149 -268
  9. package/dist/esm/AvatarGroup.js +13 -44
  10. package/dist/esm/BackTop.js +34 -75
  11. package/dist/esm/Badge.js +0 -3
  12. package/dist/esm/Barrage.js +49 -83
  13. package/dist/esm/Button.js +0 -4
  14. package/dist/esm/Calendar.js +27 -119
  15. package/dist/esm/CalendarCard.js +180 -291
  16. package/dist/esm/CalendarItem.js +253 -314
  17. package/dist/esm/Card.js +38 -72
  18. package/dist/esm/Cascader.js +0 -17
  19. package/dist/esm/Cell.js +27 -62
  20. package/dist/esm/CellGroup.js +16 -45
  21. package/dist/esm/Checkbox.js +0 -6
  22. package/dist/esm/CheckboxGroup.js +49 -88
  23. package/dist/esm/CircleProgress.js +42 -93
  24. package/dist/esm/Col.js +17 -48
  25. package/dist/esm/Collapse.js +18 -49
  26. package/dist/esm/CollapseItem.js +0 -3
  27. package/dist/esm/ConfigProvider.js +3 -4
  28. package/dist/esm/CountDown.js +62 -101
  29. package/dist/esm/DatePicker.js +87 -127
  30. package/dist/esm/Dialog.js +117 -203
  31. package/dist/esm/Divider.js +16 -36
  32. package/dist/esm/Drag.js +32 -76
  33. package/dist/esm/Elevator.js +94 -133
  34. package/dist/esm/Ellipsis.js +71 -92
  35. package/dist/esm/Empty.js +31 -71
  36. package/dist/esm/FixedNav.js +32 -81
  37. package/dist/esm/Form.js +28 -61
  38. package/dist/esm/FormItem.js +0 -3
  39. package/dist/esm/Grid.js +27 -52
  40. package/dist/esm/GridItem.js +0 -4
  41. package/dist/esm/Image.js +47 -102
  42. package/dist/esm/ImagePreview.js +82 -135
  43. package/dist/esm/Indicator.js +0 -2
  44. package/dist/esm/InfiniteLoading.js +77 -159
  45. package/dist/esm/Input.js +57 -125
  46. package/dist/esm/InputNumber.js +66 -96
  47. package/dist/esm/Layout.js +4 -28
  48. package/dist/esm/Loading.js +13 -40
  49. package/dist/esm/Menu.js +51 -114
  50. package/dist/esm/MenuItem.js +0 -13
  51. package/dist/esm/NavBar.js +46 -85
  52. package/dist/esm/NoticeBar.js +153 -226
  53. package/dist/esm/Notify.js +87 -195
  54. package/dist/esm/NumberKeyboard.js +84 -150
  55. package/dist/esm/Overlay.js +0 -8
  56. package/dist/esm/Pagination.js +58 -97
  57. package/dist/esm/Picker.js +215 -283
  58. package/dist/esm/Popover.js +111 -160
  59. package/dist/esm/Popup.js +0 -12
  60. package/dist/esm/Price.js +23 -60
  61. package/dist/esm/Progress.js +47 -77
  62. package/dist/esm/PullToRefresh.js +94 -202
  63. package/dist/esm/Radio.js +0 -6
  64. package/dist/esm/RadioGroup.js +23 -56
  65. package/dist/esm/Range.js +113 -177
  66. package/dist/esm/Rate.js +48 -95
  67. package/dist/esm/Row.js +19 -43
  68. package/dist/esm/SafeArea.js +0 -2
  69. package/dist/esm/SearchBar.js +52 -119
  70. package/dist/esm/ShortPassword.js +58 -106
  71. package/dist/esm/SideNavBar.js +34 -59
  72. package/dist/esm/SideNavBarItem.js +7 -36
  73. package/dist/esm/Signature.js +49 -84
  74. package/dist/esm/Skeleton.js +31 -68
  75. package/dist/esm/Space.js +7 -34
  76. package/dist/esm/Step.js +35 -64
  77. package/dist/esm/Steps.js +16 -40
  78. package/dist/esm/Sticky.js +64 -109
  79. package/dist/esm/SubSideNavBar.js +42 -71
  80. package/dist/esm/Swipe.js +79 -143
  81. package/dist/esm/Swiper.js +136 -183
  82. package/dist/esm/SwiperItem.js +13 -38
  83. package/dist/esm/Switch.js +20 -53
  84. package/dist/esm/TabPane.js +6 -30
  85. package/dist/esm/Tabbar.js +29 -60
  86. package/dist/esm/TabbarItem.js +0 -4
  87. package/dist/esm/Table.js +92 -141
  88. package/dist/esm/Tabs.js +0 -7
  89. package/dist/esm/Tag.js +30 -74
  90. package/dist/esm/TextArea.js +37 -82
  91. package/dist/esm/TimeDetail.js +20 -58
  92. package/dist/esm/TimeSelect.js +57 -95
  93. package/dist/esm/Toast.js +110 -219
  94. package/dist/esm/Tour.js +88 -132
  95. package/dist/esm/TrendArrow.js +32 -74
  96. package/dist/esm/Uploader.js +226 -346
  97. package/dist/esm/UserContext.js +1 -1
  98. package/dist/esm/Video.js +34 -67
  99. package/dist/esm/VirtualList.js +127 -160
  100. package/dist/esm/WaterMark.js +24 -68
  101. package/dist/esm/badge2.js +23 -53
  102. package/dist/esm/button2.js +30 -63
  103. package/dist/esm/can-use-dom.js +1 -1
  104. package/dist/esm/cascader2.js +308 -538
  105. package/dist/esm/checkbox2.js +59 -96
  106. package/dist/esm/collapseitem2.js +48 -86
  107. package/dist/esm/configprovider2.js +43 -1003
  108. package/dist/esm/context.js +1 -1
  109. package/dist/esm/context2.js +1 -1
  110. package/dist/esm/context3.js +1 -1
  111. package/dist/esm/context4.js +1 -1
  112. package/dist/esm/context5.js +8 -8
  113. package/dist/esm/date.js +88 -66
  114. package/dist/esm/formitem2.js +236 -1526
  115. package/dist/esm/get-scroll-parent.js +8 -10
  116. package/dist/esm/griditem2.js +34 -52
  117. package/dist/esm/index.js +5 -12
  118. package/dist/esm/indicator2.js +13 -42
  119. package/dist/esm/menuitem2.js +81 -124
  120. package/dist/esm/overlay2.js +39 -78
  121. package/dist/esm/pad-zero.js +3 -4
  122. package/dist/esm/popup2.js +79 -124
  123. package/dist/esm/px-check.js +2 -2
  124. package/dist/esm/radio2.js +48 -79
  125. package/dist/esm/raf.js +5 -3
  126. package/dist/esm/render.js +17 -54
  127. package/dist/esm/safearea2.js +3 -5
  128. package/dist/esm/supports-passive.js +3 -3
  129. package/dist/esm/tabbaritem2.js +42 -58
  130. package/dist/esm/tabs2.js +82 -120
  131. package/dist/esm/tslib.es6.js +47 -0
  132. package/dist/esm/types/src/packages/button/demos/h5/demo1.d.ts +3 -0
  133. package/dist/esm/types/src/packages/button/demos/h5/demo2.d.ts +3 -0
  134. package/dist/esm/types/src/packages/button/demos/h5/demo3.d.ts +3 -0
  135. package/dist/esm/types/src/packages/button/demos/h5/demo4.d.ts +3 -0
  136. package/dist/esm/types/src/packages/button/demos/h5/demo5.d.ts +3 -0
  137. package/dist/esm/types/src/packages/button/demos/h5/demo6.d.ts +3 -0
  138. package/dist/esm/types/src/packages/button/demos/h5/demo7.d.ts +3 -0
  139. package/dist/esm/types/src/packages/button/demos/h5/demo8.d.ts +3 -0
  140. package/dist/esm/types/src/packages/button/demos/h5/demo9.d.ts +3 -0
  141. package/dist/esm/types/src/packages/button/demos/taro/demo1.d.ts +3 -0
  142. package/dist/esm/types/src/packages/button/demos/taro/demo10.d.ts +3 -0
  143. package/dist/esm/types/src/packages/button/demos/taro/demo2.d.ts +3 -0
  144. package/dist/esm/types/src/packages/button/demos/taro/demo3.d.ts +3 -0
  145. package/dist/esm/types/src/packages/button/demos/taro/demo4.d.ts +3 -0
  146. package/dist/esm/types/src/packages/button/demos/taro/demo5.d.ts +3 -0
  147. package/dist/esm/types/src/packages/button/demos/taro/demo6.d.ts +3 -0
  148. package/dist/esm/types/src/packages/button/demos/taro/demo7.d.ts +3 -0
  149. package/dist/esm/types/src/packages/button/demos/taro/demo8.d.ts +3 -0
  150. package/dist/esm/types/src/packages/button/demos/taro/demo9.d.ts +3 -0
  151. package/dist/esm/types/src/packages/configprovider/configprovider.d.ts +1 -0
  152. package/dist/esm/types/src/packages/configprovider/configprovider.taro.d.ts +1 -0
  153. package/dist/esm/types/src/packages/configprovider/index.d.ts +2 -2
  154. package/dist/esm/types/src/packages/configprovider/index.taro.d.ts +2 -2
  155. package/dist/esm/types/src/packages/inputnumber/inputnumber.taro.d.ts +2 -0
  156. package/dist/esm/typings.js +1 -1
  157. package/dist/esm/use-click-away.js +9 -13
  158. package/dist/esm/use-client-rect.js +4 -4
  159. package/dist/esm/use-props-value.js +10 -15
  160. package/dist/esm/use-refs.js +5 -7
  161. package/dist/esm/use-touch.js +16 -20
  162. package/dist/locales/base.js +1 -1
  163. package/dist/locales/en-US.js +1 -1
  164. package/dist/locales/id-ID.js +1 -1
  165. package/dist/locales/tr-TR.js +1 -1
  166. package/dist/locales/zh-CN.js +1 -1
  167. package/dist/locales/zh-TW.js +1 -1
  168. package/dist/locales/zh-UG.js +1 -1
  169. package/dist/nutui.react.es.js +465 -485
  170. package/dist/nutui.react.umd.js +462 -482
  171. package/dist/style.mjs +1 -1
  172. package/dist/styles/variables-jmapp.scss +4 -0
  173. package/dist/types/index.d.ts +98 -98
  174. package/dist/types/packages/actionsheet/actionsheet.d.ts +1 -1
  175. package/dist/types/packages/actionsheet/actionsheet.taro.d.ts +1 -1
  176. package/dist/types/packages/address/address.d.ts +1 -1
  177. package/dist/types/packages/address/address.taro.d.ts +1 -1
  178. package/dist/types/packages/address/customRender.d.ts +1 -1
  179. package/dist/types/packages/address/customRender.taro.d.ts +1 -1
  180. package/dist/types/packages/avatar/avatar.d.ts +1 -1
  181. package/dist/types/packages/avatar/avatar.taro.d.ts +1 -1
  182. package/dist/types/packages/button/demos/h5/demo1.d.ts +3 -0
  183. package/dist/types/packages/button/demos/h5/demo2.d.ts +3 -0
  184. package/dist/types/packages/button/demos/h5/demo3.d.ts +3 -0
  185. package/dist/types/packages/button/demos/h5/demo4.d.ts +3 -0
  186. package/dist/types/packages/button/demos/h5/demo5.d.ts +3 -0
  187. package/dist/types/packages/button/demos/h5/demo6.d.ts +3 -0
  188. package/dist/types/packages/button/demos/h5/demo7.d.ts +3 -0
  189. package/dist/types/packages/button/demos/h5/demo8.d.ts +3 -0
  190. package/dist/types/packages/button/demos/h5/demo9.d.ts +3 -0
  191. package/dist/types/packages/button/demos/taro/demo1.d.ts +3 -0
  192. package/dist/types/packages/button/demos/taro/demo10.d.ts +3 -0
  193. package/dist/types/packages/button/demos/taro/demo2.d.ts +3 -0
  194. package/dist/types/packages/button/demos/taro/demo3.d.ts +3 -0
  195. package/dist/types/packages/button/demos/taro/demo4.d.ts +3 -0
  196. package/dist/types/packages/button/demos/taro/demo5.d.ts +3 -0
  197. package/dist/types/packages/button/demos/taro/demo6.d.ts +3 -0
  198. package/dist/types/packages/button/demos/taro/demo7.d.ts +3 -0
  199. package/dist/types/packages/button/demos/taro/demo8.d.ts +3 -0
  200. package/dist/types/packages/button/demos/taro/demo9.d.ts +3 -0
  201. package/dist/types/packages/calendaritem/calendaritem.d.ts +1 -1
  202. package/dist/types/packages/calendaritem/calendaritem.taro.d.ts +1 -1
  203. package/dist/types/packages/cascader/cascader.d.ts +1 -1
  204. package/dist/types/packages/cascader/cascader.taro.d.ts +1 -1
  205. package/dist/types/packages/cell/cell.d.ts +1 -1
  206. package/dist/types/packages/cell/cell.taro.d.ts +1 -1
  207. package/dist/types/packages/checkbox/checkbox.d.ts +2 -2
  208. package/dist/types/packages/checkbox/checkbox.taro.d.ts +2 -2
  209. package/dist/types/packages/checkboxgroup/checkboxgroup.d.ts +2 -2
  210. package/dist/types/packages/checkboxgroup/checkboxgroup.taro.d.ts +2 -2
  211. package/dist/types/packages/configprovider/configprovider.d.ts +1 -0
  212. package/dist/types/packages/configprovider/configprovider.taro.d.ts +1 -0
  213. package/dist/types/packages/configprovider/index.d.ts +2 -2
  214. package/dist/types/packages/configprovider/index.taro.d.ts +2 -2
  215. package/dist/types/packages/datepicker/datepicker.d.ts +1 -1
  216. package/dist/types/packages/datepicker/datepicker.taro.d.ts +1 -1
  217. package/dist/types/packages/dialog/dialogwrap.d.ts +1 -1
  218. package/dist/types/packages/empty/empty.d.ts +16 -4
  219. package/dist/types/packages/fixednav/fixednav.d.ts +1 -1
  220. package/dist/types/packages/fixednav/fixednav.taro.d.ts +1 -1
  221. package/dist/types/packages/form/form.d.ts +1 -1
  222. package/dist/types/packages/form/form.taro.d.ts +1 -1
  223. package/dist/types/packages/form/index.d.ts +1 -1
  224. package/dist/types/packages/form/index.taro.d.ts +1 -1
  225. package/dist/types/packages/inputnumber/inputnumber.taro.d.ts +2 -0
  226. package/dist/types/packages/menu/menu.d.ts +1 -1
  227. package/dist/types/packages/menu/menu.taro.d.ts +1 -1
  228. package/dist/types/packages/numberkeyboard/numberkeyboard.d.ts +1 -1
  229. package/dist/types/packages/numberkeyboard/numberkeyboard.taro.d.ts +1 -1
  230. package/dist/types/packages/nutui.react.d.ts +98 -98
  231. package/dist/types/packages/nutui.react.taro.d.ts +98 -98
  232. package/dist/types/packages/nutui.taro.react.build.d.ts +98 -98
  233. package/dist/types/packages/picker/picker.d.ts +1 -1
  234. package/dist/types/packages/picker/picker.taro.d.ts +1 -1
  235. package/dist/types/packages/popover/popover.d.ts +1 -1
  236. package/dist/types/packages/popover/popover.taro.d.ts +1 -1
  237. package/dist/types/packages/popup/popup.d.ts +1 -1
  238. package/dist/types/packages/popup/popup.taro.d.ts +1 -1
  239. package/dist/types/packages/radio/radio.d.ts +2 -2
  240. package/dist/types/packages/radio/radio.taro.d.ts +2 -2
  241. package/dist/types/packages/rate/rate.d.ts +1 -1
  242. package/dist/types/packages/shortpassword/shortpassword.d.ts +1 -1
  243. package/dist/types/packages/shortpassword/shortpassword.taro.d.ts +1 -1
  244. package/dist/types/packages/swiper/index.d.ts +1 -1
  245. package/dist/types/packages/swiper/index.taro.d.ts +1 -1
  246. package/dist/types/packages/tabs/tabs.d.ts +1 -1
  247. package/dist/types/packages/tabs/tabs.taro.d.ts +1 -1
  248. package/dist/types/packages/timedetail/timedetail.d.ts +1 -1
  249. package/dist/types/packages/timedetail/timedetail.taro.d.ts +1 -1
  250. package/dist/types/packages/tour/tour.d.ts +1 -1
  251. package/dist/types/packages/tour/tour.taro.d.ts +1 -1
  252. package/package.json +5 -1
@@ -1,15 +1,8 @@
1
- var __defProp = Object.defineProperty;
2
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
- var __publicField = (obj, key, value) => {
4
- __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
- return value;
6
- };
7
1
  /*!
8
- * @nutui/nutui-react v2.3.11 Fri Feb 23 2024 19:38:03 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react v2.3.12 Fri Mar 01 2024 16:09:25 GMT+0800 (China Standard Time)
9
3
  * (c) 2023 @jdf2e.
10
4
  * Released under the MIT License.
11
5
  */
12
- var _a;
13
6
  import * as React from "react";
14
7
  import React__default, { useCallback, createContext, useContext, useState, useRef, useEffect, useLayoutEffect, forwardRef, useMemo as useMemo$1, useImperativeHandle, isValidElement, Component } from "react";
15
8
  import * as ReactDOM from "react-dom";
@@ -28,34 +21,44 @@ var classnames = { exports: {} };
28
21
  (function() {
29
22
  var hasOwn = {}.hasOwnProperty;
30
23
  function classNames2() {
31
- var classes = [];
24
+ var classes = "";
32
25
  for (var i = 0; i < arguments.length; i++) {
33
26
  var arg = arguments[i];
34
- if (!arg)
35
- continue;
36
- var argType = typeof arg;
37
- if (argType === "string" || argType === "number") {
38
- classes.push(arg);
39
- } else if (Array.isArray(arg)) {
40
- if (arg.length) {
41
- var inner = classNames2.apply(null, arg);
42
- if (inner) {
43
- classes.push(inner);
44
- }
45
- }
46
- } else if (argType === "object") {
47
- if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes("[native code]")) {
48
- classes.push(arg.toString());
49
- continue;
50
- }
51
- for (var key in arg) {
52
- if (hasOwn.call(arg, key) && arg[key]) {
53
- classes.push(key);
54
- }
55
- }
27
+ if (arg) {
28
+ classes = appendClass(classes, parseValue(arg));
29
+ }
30
+ }
31
+ return classes;
32
+ }
33
+ function parseValue(arg) {
34
+ if (typeof arg === "string" || typeof arg === "number") {
35
+ return arg;
36
+ }
37
+ if (typeof arg !== "object") {
38
+ return "";
39
+ }
40
+ if (Array.isArray(arg)) {
41
+ return classNames2.apply(null, arg);
42
+ }
43
+ if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes("[native code]")) {
44
+ return arg.toString();
45
+ }
46
+ var classes = "";
47
+ for (var key in arg) {
48
+ if (hasOwn.call(arg, key) && arg[key]) {
49
+ classes = appendClass(classes, key);
56
50
  }
57
51
  }
58
- return classes.join(" ");
52
+ return classes;
53
+ }
54
+ function appendClass(value, newClass) {
55
+ if (!newClass) {
56
+ return value;
57
+ }
58
+ if (value) {
59
+ return value + " " + newClass;
60
+ }
61
+ return value + newClass;
59
62
  }
60
63
  if (module.exports) {
61
64
  classNames2.default = classNames2;
@@ -1686,8 +1689,8 @@ lodash_isequal.exports;
1686
1689
  var reIsNative = RegExp(
1687
1690
  "^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
1688
1691
  );
1689
- var Buffer2 = moduleExports ? root2.Buffer : void 0, Symbol2 = root2.Symbol, Uint8Array2 = root2.Uint8Array, propertyIsEnumerable = objectProto2.propertyIsEnumerable, splice = arrayProto.splice, symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0;
1690
- var nativeGetSymbols = Object.getOwnPropertySymbols, nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : void 0, nativeKeys = overArg(Object.keys, Object);
1692
+ var Buffer = moduleExports ? root2.Buffer : void 0, Symbol2 = root2.Symbol, Uint8Array = root2.Uint8Array, propertyIsEnumerable = objectProto2.propertyIsEnumerable, splice = arrayProto.splice, symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0;
1693
+ var nativeGetSymbols = Object.getOwnPropertySymbols, nativeIsBuffer = Buffer ? Buffer.isBuffer : void 0, nativeKeys = overArg(Object.keys, Object);
1691
1694
  var DataView = getNative(root2, "DataView"), Map2 = getNative(root2, "Map"), Promise2 = getNative(root2, "Promise"), Set2 = getNative(root2, "Set"), WeakMap2 = getNative(root2, "WeakMap"), nativeCreate = getNative(Object, "create");
1692
1695
  var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map2), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set2), weakMapCtorString = toSource(WeakMap2);
1693
1696
  var symbolProto2 = Symbol2 ? Symbol2.prototype : void 0, symbolValueOf = symbolProto2 ? symbolProto2.valueOf : void 0;
@@ -2019,7 +2022,7 @@ lodash_isequal.exports;
2019
2022
  object4 = object4.buffer;
2020
2023
  other = other.buffer;
2021
2024
  case arrayBufferTag:
2022
- if (object4.byteLength != other.byteLength || !equalFunc(new Uint8Array2(object4), new Uint8Array2(other))) {
2025
+ if (object4.byteLength != other.byteLength || !equalFunc(new Uint8Array(object4), new Uint8Array(other))) {
2023
2026
  return false;
2024
2027
  }
2025
2028
  return true;
@@ -2376,11 +2379,23 @@ const zhCN = {
2376
2379
  errorCanvasTips: "当前环境不支持Canvas"
2377
2380
  }
2378
2381
  };
2382
+ const inBrowser = typeof window !== "undefined";
2383
+ function requestAniFrame() {
2384
+ if (typeof window !== "undefined") {
2385
+ const _window = window;
2386
+ return _window.requestAnimationFrame || _window.webkitRequestAnimationFrame || function(callback) {
2387
+ _window.setTimeout(callback, 1e3 / 60);
2388
+ };
2389
+ }
2390
+ return (callback) => {
2391
+ setTimeout(callback, 1e3 / 60);
2392
+ };
2393
+ }
2394
+ const requestAniFrame$1 = requestAniFrame();
2379
2395
  const classPrefix$p = "nut-configprovider";
2380
2396
  const defaultConfigRef = {
2381
2397
  current: {
2382
- locale: zhCN,
2383
- direction: "ltr"
2398
+ locale: zhCN
2384
2399
  }
2385
2400
  };
2386
2401
  const getDefaultConfig = () => {
@@ -2397,16 +2412,24 @@ function convertThemeVarsToCSSVars(themeVars) {
2397
2412
  });
2398
2413
  return cssVars;
2399
2414
  }
2415
+ const useRtl = () => {
2416
+ const { direction } = useConfig();
2417
+ if (direction) {
2418
+ return direction === "rtl";
2419
+ }
2420
+ return inBrowser && document.dir === "rtl";
2421
+ };
2400
2422
  const ConfigProvider = (props) => {
2401
2423
  const { style, className, children, direction, ...config2 } = props;
2402
2424
  const mergedConfig = useMemo(
2403
2425
  () => {
2404
2426
  return {
2405
2427
  ...getDefaultConfig(),
2406
- ...config2
2428
+ ...config2,
2429
+ direction
2407
2430
  };
2408
2431
  },
2409
- [config2],
2432
+ [config2, direction],
2410
2433
  (prev, next) => prev.some((prevTheme, index) => {
2411
2434
  const nextTheme = next[index];
2412
2435
  return !isequal(prevTheme, nextTheme);
@@ -2647,72 +2670,111 @@ function _inheritsLoose$1(subClass, superClass) {
2647
2670
  _setPrototypeOf$1(subClass, superClass);
2648
2671
  }
2649
2672
  var propTypes = { exports: {} };
2650
- var ReactPropTypesSecret_1;
2651
- var hasRequiredReactPropTypesSecret;
2652
- function requireReactPropTypesSecret() {
2653
- if (hasRequiredReactPropTypesSecret)
2654
- return ReactPropTypesSecret_1;
2655
- hasRequiredReactPropTypesSecret = 1;
2656
- var ReactPropTypesSecret = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
2657
- ReactPropTypesSecret_1 = ReactPropTypesSecret;
2658
- return ReactPropTypesSecret_1;
2659
- }
2660
- var factoryWithThrowingShims;
2661
- var hasRequiredFactoryWithThrowingShims;
2662
- function requireFactoryWithThrowingShims() {
2663
- if (hasRequiredFactoryWithThrowingShims)
2664
- return factoryWithThrowingShims;
2665
- hasRequiredFactoryWithThrowingShims = 1;
2666
- var ReactPropTypesSecret = requireReactPropTypesSecret();
2667
- function emptyFunction() {
2668
- }
2669
- function emptyFunctionWithReset() {
2670
- }
2671
- emptyFunctionWithReset.resetWarningCache = emptyFunction;
2672
- factoryWithThrowingShims = function() {
2673
- function shim(props, propName, componentName, location, propFullName, secret) {
2674
- if (secret === ReactPropTypesSecret) {
2675
- return;
2673
+ var reactIs = { exports: {} };
2674
+ var reactIs_production_min = {};
2675
+ /** @license React v16.13.1
2676
+ * react-is.production.min.js
2677
+ *
2678
+ * Copyright (c) Facebook, Inc. and its affiliates.
2679
+ *
2680
+ * This source code is licensed under the MIT license found in the
2681
+ * LICENSE file in the root directory of this source tree.
2682
+ */
2683
+ var hasRequiredReactIs_production_min;
2684
+ function requireReactIs_production_min() {
2685
+ if (hasRequiredReactIs_production_min)
2686
+ return reactIs_production_min;
2687
+ hasRequiredReactIs_production_min = 1;
2688
+ var b = "function" === typeof Symbol && Symbol.for, c6 = b ? Symbol.for("react.element") : 60103, d = b ? Symbol.for("react.portal") : 60106, e2 = b ? Symbol.for("react.fragment") : 60107, f = b ? Symbol.for("react.strict_mode") : 60108, g = b ? Symbol.for("react.profiler") : 60114, h = b ? Symbol.for("react.provider") : 60109, k = b ? Symbol.for("react.context") : 60110, l2 = b ? Symbol.for("react.async_mode") : 60111, m = b ? Symbol.for("react.concurrent_mode") : 60111, n = b ? Symbol.for("react.forward_ref") : 60112, p = b ? Symbol.for("react.suspense") : 60113, q = b ? Symbol.for("react.suspense_list") : 60120, r2 = b ? Symbol.for("react.memo") : 60115, t2 = b ? Symbol.for("react.lazy") : 60116, v = b ? Symbol.for("react.block") : 60121, w = b ? Symbol.for("react.fundamental") : 60117, x = b ? Symbol.for("react.responder") : 60118, y = b ? Symbol.for("react.scope") : 60119;
2689
+ function z(a2) {
2690
+ if ("object" === typeof a2 && null !== a2) {
2691
+ var u = a2.$$typeof;
2692
+ switch (u) {
2693
+ case c6:
2694
+ switch (a2 = a2.type, a2) {
2695
+ case l2:
2696
+ case m:
2697
+ case e2:
2698
+ case g:
2699
+ case f:
2700
+ case p:
2701
+ return a2;
2702
+ default:
2703
+ switch (a2 = a2 && a2.$$typeof, a2) {
2704
+ case k:
2705
+ case n:
2706
+ case t2:
2707
+ case r2:
2708
+ case h:
2709
+ return a2;
2710
+ default:
2711
+ return u;
2712
+ }
2713
+ }
2714
+ case d:
2715
+ return u;
2676
2716
  }
2677
- var err = new Error(
2678
- "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
2679
- );
2680
- err.name = "Invariant Violation";
2681
- throw err;
2682
- }
2683
- shim.isRequired = shim;
2684
- function getShim() {
2685
- return shim;
2686
2717
  }
2687
- var ReactPropTypes = {
2688
- array: shim,
2689
- bigint: shim,
2690
- bool: shim,
2691
- func: shim,
2692
- number: shim,
2693
- object: shim,
2694
- string: shim,
2695
- symbol: shim,
2696
- any: shim,
2697
- arrayOf: getShim,
2698
- element: shim,
2699
- elementType: shim,
2700
- instanceOf: getShim,
2701
- node: shim,
2702
- objectOf: getShim,
2703
- oneOf: getShim,
2704
- oneOfType: getShim,
2705
- shape: getShim,
2706
- exact: getShim,
2707
- checkPropTypes: emptyFunctionWithReset,
2708
- resetWarningCache: emptyFunction
2709
- };
2710
- ReactPropTypes.PropTypes = ReactPropTypes;
2711
- return ReactPropTypes;
2718
+ }
2719
+ function A(a2) {
2720
+ return z(a2) === m;
2721
+ }
2722
+ reactIs_production_min.AsyncMode = l2;
2723
+ reactIs_production_min.ConcurrentMode = m;
2724
+ reactIs_production_min.ContextConsumer = k;
2725
+ reactIs_production_min.ContextProvider = h;
2726
+ reactIs_production_min.Element = c6;
2727
+ reactIs_production_min.ForwardRef = n;
2728
+ reactIs_production_min.Fragment = e2;
2729
+ reactIs_production_min.Lazy = t2;
2730
+ reactIs_production_min.Memo = r2;
2731
+ reactIs_production_min.Portal = d;
2732
+ reactIs_production_min.Profiler = g;
2733
+ reactIs_production_min.StrictMode = f;
2734
+ reactIs_production_min.Suspense = p;
2735
+ reactIs_production_min.isAsyncMode = function(a2) {
2736
+ return A(a2) || z(a2) === l2;
2712
2737
  };
2713
- return factoryWithThrowingShims;
2738
+ reactIs_production_min.isConcurrentMode = A;
2739
+ reactIs_production_min.isContextConsumer = function(a2) {
2740
+ return z(a2) === k;
2741
+ };
2742
+ reactIs_production_min.isContextProvider = function(a2) {
2743
+ return z(a2) === h;
2744
+ };
2745
+ reactIs_production_min.isElement = function(a2) {
2746
+ return "object" === typeof a2 && null !== a2 && a2.$$typeof === c6;
2747
+ };
2748
+ reactIs_production_min.isForwardRef = function(a2) {
2749
+ return z(a2) === n;
2750
+ };
2751
+ reactIs_production_min.isFragment = function(a2) {
2752
+ return z(a2) === e2;
2753
+ };
2754
+ reactIs_production_min.isLazy = function(a2) {
2755
+ return z(a2) === t2;
2756
+ };
2757
+ reactIs_production_min.isMemo = function(a2) {
2758
+ return z(a2) === r2;
2759
+ };
2760
+ reactIs_production_min.isPortal = function(a2) {
2761
+ return z(a2) === d;
2762
+ };
2763
+ reactIs_production_min.isProfiler = function(a2) {
2764
+ return z(a2) === g;
2765
+ };
2766
+ reactIs_production_min.isStrictMode = function(a2) {
2767
+ return z(a2) === f;
2768
+ };
2769
+ reactIs_production_min.isSuspense = function(a2) {
2770
+ return z(a2) === p;
2771
+ };
2772
+ reactIs_production_min.isValidElementType = function(a2) {
2773
+ return "string" === typeof a2 || "function" === typeof a2 || a2 === e2 || a2 === m || a2 === g || a2 === f || a2 === p || a2 === q || "object" === typeof a2 && null !== a2 && (a2.$$typeof === t2 || a2.$$typeof === r2 || a2.$$typeof === h || a2.$$typeof === k || a2.$$typeof === n || a2.$$typeof === w || a2.$$typeof === x || a2.$$typeof === y || a2.$$typeof === v);
2774
+ };
2775
+ reactIs_production_min.typeOf = z;
2776
+ return reactIs_production_min;
2714
2777
  }
2715
- var reactIs = { exports: {} };
2716
2778
  var reactIs_development = {};
2717
2779
  /** @license React v16.13.1
2718
2780
  * react-is.development.js
@@ -2876,110 +2938,6 @@ function requireReactIs_development() {
2876
2938
  }
2877
2939
  return reactIs_development;
2878
2940
  }
2879
- var reactIs_production_min = {};
2880
- /** @license React v16.13.1
2881
- * react-is.production.min.js
2882
- *
2883
- * Copyright (c) Facebook, Inc. and its affiliates.
2884
- *
2885
- * This source code is licensed under the MIT license found in the
2886
- * LICENSE file in the root directory of this source tree.
2887
- */
2888
- var hasRequiredReactIs_production_min;
2889
- function requireReactIs_production_min() {
2890
- if (hasRequiredReactIs_production_min)
2891
- return reactIs_production_min;
2892
- hasRequiredReactIs_production_min = 1;
2893
- var b = "function" === typeof Symbol && Symbol.for, c6 = b ? Symbol.for("react.element") : 60103, d = b ? Symbol.for("react.portal") : 60106, e2 = b ? Symbol.for("react.fragment") : 60107, f = b ? Symbol.for("react.strict_mode") : 60108, g = b ? Symbol.for("react.profiler") : 60114, h = b ? Symbol.for("react.provider") : 60109, k = b ? Symbol.for("react.context") : 60110, l2 = b ? Symbol.for("react.async_mode") : 60111, m = b ? Symbol.for("react.concurrent_mode") : 60111, n = b ? Symbol.for("react.forward_ref") : 60112, p = b ? Symbol.for("react.suspense") : 60113, q = b ? Symbol.for("react.suspense_list") : 60120, r2 = b ? Symbol.for("react.memo") : 60115, t2 = b ? Symbol.for("react.lazy") : 60116, v = b ? Symbol.for("react.block") : 60121, w = b ? Symbol.for("react.fundamental") : 60117, x = b ? Symbol.for("react.responder") : 60118, y = b ? Symbol.for("react.scope") : 60119;
2894
- function z(a2) {
2895
- if ("object" === typeof a2 && null !== a2) {
2896
- var u = a2.$$typeof;
2897
- switch (u) {
2898
- case c6:
2899
- switch (a2 = a2.type, a2) {
2900
- case l2:
2901
- case m:
2902
- case e2:
2903
- case g:
2904
- case f:
2905
- case p:
2906
- return a2;
2907
- default:
2908
- switch (a2 = a2 && a2.$$typeof, a2) {
2909
- case k:
2910
- case n:
2911
- case t2:
2912
- case r2:
2913
- case h:
2914
- return a2;
2915
- default:
2916
- return u;
2917
- }
2918
- }
2919
- case d:
2920
- return u;
2921
- }
2922
- }
2923
- }
2924
- function A(a2) {
2925
- return z(a2) === m;
2926
- }
2927
- reactIs_production_min.AsyncMode = l2;
2928
- reactIs_production_min.ConcurrentMode = m;
2929
- reactIs_production_min.ContextConsumer = k;
2930
- reactIs_production_min.ContextProvider = h;
2931
- reactIs_production_min.Element = c6;
2932
- reactIs_production_min.ForwardRef = n;
2933
- reactIs_production_min.Fragment = e2;
2934
- reactIs_production_min.Lazy = t2;
2935
- reactIs_production_min.Memo = r2;
2936
- reactIs_production_min.Portal = d;
2937
- reactIs_production_min.Profiler = g;
2938
- reactIs_production_min.StrictMode = f;
2939
- reactIs_production_min.Suspense = p;
2940
- reactIs_production_min.isAsyncMode = function(a2) {
2941
- return A(a2) || z(a2) === l2;
2942
- };
2943
- reactIs_production_min.isConcurrentMode = A;
2944
- reactIs_production_min.isContextConsumer = function(a2) {
2945
- return z(a2) === k;
2946
- };
2947
- reactIs_production_min.isContextProvider = function(a2) {
2948
- return z(a2) === h;
2949
- };
2950
- reactIs_production_min.isElement = function(a2) {
2951
- return "object" === typeof a2 && null !== a2 && a2.$$typeof === c6;
2952
- };
2953
- reactIs_production_min.isForwardRef = function(a2) {
2954
- return z(a2) === n;
2955
- };
2956
- reactIs_production_min.isFragment = function(a2) {
2957
- return z(a2) === e2;
2958
- };
2959
- reactIs_production_min.isLazy = function(a2) {
2960
- return z(a2) === t2;
2961
- };
2962
- reactIs_production_min.isMemo = function(a2) {
2963
- return z(a2) === r2;
2964
- };
2965
- reactIs_production_min.isPortal = function(a2) {
2966
- return z(a2) === d;
2967
- };
2968
- reactIs_production_min.isProfiler = function(a2) {
2969
- return z(a2) === g;
2970
- };
2971
- reactIs_production_min.isStrictMode = function(a2) {
2972
- return z(a2) === f;
2973
- };
2974
- reactIs_production_min.isSuspense = function(a2) {
2975
- return z(a2) === p;
2976
- };
2977
- reactIs_production_min.isValidElementType = function(a2) {
2978
- return "string" === typeof a2 || "function" === typeof a2 || a2 === e2 || a2 === m || a2 === g || a2 === f || a2 === p || a2 === q || "object" === typeof a2 && null !== a2 && (a2.$$typeof === t2 || a2.$$typeof === r2 || a2.$$typeof === h || a2.$$typeof === k || a2.$$typeof === n || a2.$$typeof === w || a2.$$typeof === x || a2.$$typeof === y || a2.$$typeof === v);
2979
- };
2980
- reactIs_production_min.typeOf = z;
2981
- return reactIs_production_min;
2982
- }
2983
2941
  var hasRequiredReactIs;
2984
2942
  function requireReactIs() {
2985
2943
  if (hasRequiredReactIs)
@@ -3068,6 +3026,16 @@ function requireObjectAssign() {
3068
3026
  };
3069
3027
  return objectAssign;
3070
3028
  }
3029
+ var ReactPropTypesSecret_1;
3030
+ var hasRequiredReactPropTypesSecret;
3031
+ function requireReactPropTypesSecret() {
3032
+ if (hasRequiredReactPropTypesSecret)
3033
+ return ReactPropTypesSecret_1;
3034
+ hasRequiredReactPropTypesSecret = 1;
3035
+ var ReactPropTypesSecret = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
3036
+ ReactPropTypesSecret_1 = ReactPropTypesSecret;
3037
+ return ReactPropTypesSecret_1;
3038
+ }
3071
3039
  var has;
3072
3040
  var hasRequiredHas;
3073
3041
  function requireHas() {
@@ -3585,6 +3553,61 @@ function requireFactoryWithTypeCheckers() {
3585
3553
  };
3586
3554
  return factoryWithTypeCheckers;
3587
3555
  }
3556
+ var factoryWithThrowingShims;
3557
+ var hasRequiredFactoryWithThrowingShims;
3558
+ function requireFactoryWithThrowingShims() {
3559
+ if (hasRequiredFactoryWithThrowingShims)
3560
+ return factoryWithThrowingShims;
3561
+ hasRequiredFactoryWithThrowingShims = 1;
3562
+ var ReactPropTypesSecret = requireReactPropTypesSecret();
3563
+ function emptyFunction() {
3564
+ }
3565
+ function emptyFunctionWithReset() {
3566
+ }
3567
+ emptyFunctionWithReset.resetWarningCache = emptyFunction;
3568
+ factoryWithThrowingShims = function() {
3569
+ function shim(props, propName, componentName, location, propFullName, secret) {
3570
+ if (secret === ReactPropTypesSecret) {
3571
+ return;
3572
+ }
3573
+ var err = new Error(
3574
+ "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
3575
+ );
3576
+ err.name = "Invariant Violation";
3577
+ throw err;
3578
+ }
3579
+ shim.isRequired = shim;
3580
+ function getShim() {
3581
+ return shim;
3582
+ }
3583
+ var ReactPropTypes = {
3584
+ array: shim,
3585
+ bigint: shim,
3586
+ bool: shim,
3587
+ func: shim,
3588
+ number: shim,
3589
+ object: shim,
3590
+ string: shim,
3591
+ symbol: shim,
3592
+ any: shim,
3593
+ arrayOf: getShim,
3594
+ element: shim,
3595
+ elementType: shim,
3596
+ instanceOf: getShim,
3597
+ node: shim,
3598
+ objectOf: getShim,
3599
+ oneOf: getShim,
3600
+ oneOfType: getShim,
3601
+ shape: getShim,
3602
+ exact: getShim,
3603
+ checkPropTypes: emptyFunctionWithReset,
3604
+ resetWarningCache: emptyFunction
3605
+ };
3606
+ ReactPropTypes.PropTypes = ReactPropTypes;
3607
+ return ReactPropTypes;
3608
+ };
3609
+ return factoryWithThrowingShims;
3610
+ }
3588
3611
  if (process.env.NODE_ENV !== "production") {
3589
3612
  var ReactIs = requireReactIs();
3590
3613
  var throwOnDirectAccess = true;
@@ -4430,6 +4453,19 @@ function getAllScrollableParents(element, scrollableParents = []) {
4430
4453
  }
4431
4454
  return getAllScrollableParents(element.parentElement, scrollableParents);
4432
4455
  }
4456
+ let passiveSupported = false;
4457
+ if (canUseDom) {
4458
+ try {
4459
+ const opts = Object.defineProperty({}, "passive", {
4460
+ get() {
4461
+ passiveSupported = true;
4462
+ }
4463
+ });
4464
+ window.addEventListener("test-passive-supported", null, opts);
4465
+ } catch (e2) {
4466
+ console.log(e2);
4467
+ }
4468
+ }
4433
4469
  let totalLockCount = 0;
4434
4470
  const BODY_LOCK_CLASS = "nut-overflow-hidden";
4435
4471
  function getScrollableElement(el) {
@@ -4478,7 +4514,7 @@ function useLockScroll(rootRef, shouldLock) {
4478
4514
  document.addEventListener(
4479
4515
  "touchmove",
4480
4516
  onTouchMove,
4481
- false
4517
+ passiveSupported ? { passive: false } : false
4482
4518
  );
4483
4519
  if (!totalLockCount) {
4484
4520
  document.body.classList.add(BODY_LOCK_CLASS);
@@ -5086,18 +5122,6 @@ const SafeArea = (props) => {
5086
5122
  }
5087
5123
  );
5088
5124
  };
5089
- function requestAniFrame() {
5090
- if (typeof window !== "undefined") {
5091
- const _window = window;
5092
- return _window.requestAnimationFrame || _window.webkitRequestAnimationFrame || function(callback) {
5093
- _window.setTimeout(callback, 1e3 / 60);
5094
- };
5095
- }
5096
- return (callback) => {
5097
- setTimeout(callback, 1e3 / 60);
5098
- };
5099
- }
5100
- const requestAniFrame$1 = requestAniFrame();
5101
5125
  const defaultProps$1i = {
5102
5126
  ...ComponentDefaults,
5103
5127
  target: "",
@@ -5172,13 +5196,13 @@ const BackTop = (props) => {
5172
5196
  window.cancelAnimationFrame = window.webkitCancelAnimationFrame;
5173
5197
  };
5174
5198
  function addEventListener() {
5175
- var _a2, _b;
5176
- (_a2 = scrollEl.current) == null ? void 0 : _a2.addEventListener("scroll", scrollListener, false);
5199
+ var _a, _b;
5200
+ (_a = scrollEl.current) == null ? void 0 : _a.addEventListener("scroll", scrollListener, false);
5177
5201
  (_b = scrollEl.current) == null ? void 0 : _b.addEventListener("resize", scrollListener, false);
5178
5202
  }
5179
5203
  function removeEventListener() {
5180
- var _a2, _b;
5181
- (_a2 = scrollEl.current) == null ? void 0 : _a2.removeEventListener("scroll", scrollListener, false);
5204
+ var _a, _b;
5205
+ (_a = scrollEl.current) == null ? void 0 : _a.removeEventListener("scroll", scrollListener, false);
5182
5206
  (_b = scrollEl.current) == null ? void 0 : _b.removeEventListener("resize", scrollListener, false);
5183
5207
  }
5184
5208
  const goTop = (e2) => {
@@ -10428,7 +10452,7 @@ const Elevator = (props) => {
10428
10452
  onDragEnd: ({ offset }) => {
10429
10453
  touchState.current.y2 = offset[1];
10430
10454
  const delta = (touchState.current.y2 - touchState.current.y1) / spaceHeight || 0;
10431
- const cacheIndex = state.current.anchorIndex + Math.ceil(delta);
10455
+ const cacheIndex = state.current.anchorIndex + Math.round(delta);
10432
10456
  setCodeIndex(cacheIndex);
10433
10457
  scrollTo(cacheIndex);
10434
10458
  resetScrollState();
@@ -10458,7 +10482,8 @@ const Elevator = (props) => {
10458
10482
  calculateHeight();
10459
10483
  }
10460
10484
  const target = e2.target;
10461
- const { scrollTop } = target;
10485
+ let { scrollTop } = target;
10486
+ scrollTop = Math.ceil(scrollTop);
10462
10487
  state.current.scrollY = scrollTop;
10463
10488
  setScrollY(scrollTop);
10464
10489
  for (let i = 0; i < listHeight.length - 1; i++) {
@@ -11042,8 +11067,8 @@ const SubSideNavBar = (props) => {
11042
11067
  onClick && onClick({ title, value, isShow });
11043
11068
  };
11044
11069
  useEffect(() => {
11045
- var _a2, _b;
11046
- const childNodes = (_a2 = listRef.current) == null ? void 0 : _a2.children;
11070
+ var _a, _b;
11071
+ const childNodes = (_a = listRef.current) == null ? void 0 : _a.children;
11047
11072
  (_b = listRef.current) == null ? void 0 : _b.setAttribute("level", "1");
11048
11073
  childNodes && setListLevel(childNodes);
11049
11074
  }, [setListLevel]);
@@ -11091,7 +11116,7 @@ const defaultProps$1b = {
11091
11116
  color: ""
11092
11117
  };
11093
11118
  const Badge = (props) => {
11094
- var _a2;
11119
+ var _a;
11095
11120
  const { className, style, value, max, children, dot, top, right, color } = {
11096
11121
  ...defaultProps$1b,
11097
11122
  ...props
@@ -11123,7 +11148,7 @@ const Badge = (props) => {
11123
11148
  `${classPrefix2}-content`,
11124
11149
  { [`${classPrefix2}-sup`]: isNumber() || isString() || dot },
11125
11150
  {
11126
- [`${classPrefix2}-one`]: typeof content() === "string" && ((_a2 = `${content()}`) == null ? void 0 : _a2.length) === 1
11151
+ [`${classPrefix2}-one`]: typeof content() === "string" && ((_a = `${content()}`) == null ? void 0 : _a.length) === 1
11127
11152
  }
11128
11153
  );
11129
11154
  const getStyle = () => {
@@ -11560,22 +11585,19 @@ const convertListToOptions = (list, options2) => {
11560
11585
  };
11561
11586
  class Tree {
11562
11587
  constructor(nodes, config2) {
11563
- __publicField(this, "nodes");
11564
- __publicField(this, "config");
11565
- // eslint-disable-next-line class-methods-use-this
11566
- __publicField(this, "isLeaf", (node, lazy) => {
11588
+ this.isLeaf = (node, lazy) => {
11567
11589
  const { leaf, children } = node;
11568
11590
  const hasChildren = Array.isArray(children) && Boolean(children.length);
11569
11591
  return leaf || !hasChildren && !lazy;
11570
- });
11571
- __publicField(this, "hasChildren", (node, lazy) => {
11592
+ };
11593
+ this.hasChildren = (node, lazy) => {
11572
11594
  const isLeaf = this.isLeaf(node, lazy);
11573
11595
  if (isLeaf) {
11574
11596
  return false;
11575
11597
  }
11576
11598
  const { children } = node;
11577
11599
  return Array.isArray(children) && Boolean(children.length);
11578
- });
11600
+ };
11579
11601
  this.config = {
11580
11602
  value: "value",
11581
11603
  text: "text",
@@ -11622,7 +11644,6 @@ class Tree {
11622
11644
  return pathNodes;
11623
11645
  }
11624
11646
  }
11625
- const Tree$1 = Tree;
11626
11647
  const defaultProps$16 = {
11627
11648
  ...ComponentDefaults,
11628
11649
  activeColor: "",
@@ -11698,7 +11719,7 @@ const InternalCascader = (props, ref) => {
11698
11719
  paneKey: ""
11699
11720
  }
11700
11721
  ],
11701
- tree: new Tree$1([], {}),
11722
+ tree: new Tree([], {}),
11702
11723
  tabsCursor: 0,
11703
11724
  // 选中的tab项
11704
11725
  initLoading: false,
@@ -11728,7 +11749,7 @@ const InternalCascader = (props, ref) => {
11728
11749
  } else {
11729
11750
  state.optionsData = options2;
11730
11751
  }
11731
- state.tree = new Tree$1(state.optionsData, {
11752
+ state.tree = new Tree(state.optionsData, {
11732
11753
  value: state.configs.optionKey.valueKey,
11733
11754
  text: state.configs.optionKey.textKey,
11734
11755
  children: state.configs.optionKey.childrenKey
@@ -11770,10 +11791,10 @@ const InternalCascader = (props, ref) => {
11770
11791
  needToSync = [parent.value];
11771
11792
  state.initLoading = true;
11772
11793
  const last = await currentValue.slice(1).reduce(async (p, value2) => {
11773
- var _a2;
11794
+ var _a;
11774
11795
  const parent2 = await p;
11775
11796
  await invokeLazyLoad(parent2);
11776
- const node = (_a2 = parent2 == null ? void 0 : parent2.children) == null ? void 0 : _a2.find(
11797
+ const node = (_a = parent2 == null ? void 0 : parent2.children) == null ? void 0 : _a.find(
11777
11798
  (item) => item.value === value2
11778
11799
  );
11779
11800
  if (node) {
@@ -11809,8 +11830,8 @@ const InternalCascader = (props, ref) => {
11809
11830
  let lazyLoadPromise = state.lazyLoadMap.get(node);
11810
11831
  if (!lazyLoadPromise) {
11811
11832
  lazyLoadPromise = new Promise((resolve) => {
11812
- var _a2, _b;
11813
- (_b = (_a2 = state.configs).onLoad) == null ? void 0 : _b.call(_a2, node, resolve);
11833
+ var _a, _b;
11834
+ (_b = (_a = state.configs).onLoad) == null ? void 0 : _b.call(_a, node, resolve);
11814
11835
  });
11815
11836
  state.lazyLoadMap.set(node, lazyLoadPromise);
11816
11837
  }
@@ -11880,9 +11901,9 @@ const InternalCascader = (props, ref) => {
11880
11901
  setOptionsData(state.panes);
11881
11902
  };
11882
11903
  const renderItem = (pane, node, index) => {
11883
- var _a2;
11904
+ var _a;
11884
11905
  const classPrefix22 = "nut-cascader-item";
11885
- const checked = ((_a2 = pane.selectedNode) == null ? void 0 : _a2.value) === node.value;
11906
+ const checked = ((_a = pane.selectedNode) == null ? void 0 : _a.value) === node.value;
11886
11907
  const classes = classNames(
11887
11908
  {
11888
11909
  active: checked,
@@ -11928,7 +11949,7 @@ const InternalCascader = (props, ref) => {
11928
11949
  value: tabvalue,
11929
11950
  title: () => {
11930
11951
  return optionsData.map((pane, index) => {
11931
- var _a2, _b;
11952
+ var _a, _b;
11932
11953
  return /* @__PURE__ */ React__default.createElement(
11933
11954
  "div",
11934
11955
  {
@@ -11939,15 +11960,15 @@ const InternalCascader = (props, ref) => {
11939
11960
  className: `nut-tabs-titles-item ${tabvalue === pane.paneKey ? "nut-tabs-titles-item-active" : ""}`,
11940
11961
  key: pane.paneKey
11941
11962
  },
11942
- /* @__PURE__ */ React__default.createElement("span", { className: "nut-tabs-titles-item-text" }, !state.initLoading && state.panes.length && ((_a2 = pane == null ? void 0 : pane.selectedNode) == null ? void 0 : _a2.text), !state.initLoading && state.panes.length && !((_b = pane == null ? void 0 : pane.selectedNode) == null ? void 0 : _b.text) && "请选择", !(!state.initLoading && state.panes.length) && "Loading..."),
11963
+ /* @__PURE__ */ React__default.createElement("span", { className: "nut-tabs-titles-item-text" }, !state.initLoading && state.panes.length && ((_a = pane == null ? void 0 : pane.selectedNode) == null ? void 0 : _a.text), !state.initLoading && state.panes.length && !((_b = pane == null ? void 0 : pane.selectedNode) == null ? void 0 : _b.text) && "请选择", !(!state.initLoading && state.panes.length) && "Loading..."),
11943
11964
  /* @__PURE__ */ React__default.createElement("span", { className: "nut-tabs-titles-item-line" })
11944
11965
  );
11945
11966
  });
11946
11967
  }
11947
11968
  },
11948
11969
  !state.initLoading && state.panes.length ? optionsData.map((pane) => {
11949
- var _a2;
11950
- return /* @__PURE__ */ React__default.createElement(Tabs.TabPane, { key: pane.paneKey, value: pane.paneKey }, /* @__PURE__ */ React__default.createElement("div", { className: classesPane }, (_a2 = pane.nodes) == null ? void 0 : _a2.map(
11970
+ var _a;
11971
+ return /* @__PURE__ */ React__default.createElement(Tabs.TabPane, { key: pane.paneKey, value: pane.paneKey }, /* @__PURE__ */ React__default.createElement("div", { className: classesPane }, (_a = pane.nodes) == null ? void 0 : _a.map(
11951
11972
  (node, index) => renderItem(pane, node, index)
11952
11973
  )));
11953
11974
  }) : /* @__PURE__ */ React__default.createElement(Tabs.TabPane, null, /* @__PURE__ */ React__default.createElement("div", { className: classesPane }))
@@ -13141,8 +13162,8 @@ const Calendar = React__default.forwardRef((props, ref) => {
13141
13162
  onDayClick && onDayClick(param);
13142
13163
  };
13143
13164
  const scrollToDate = (date4) => {
13144
- var _a2;
13145
- (_a2 = calendarRef.current) == null ? void 0 : _a2.scrollToDate(date4);
13165
+ var _a;
13166
+ (_a = calendarRef.current) == null ? void 0 : _a.scrollToDate(date4);
13146
13167
  };
13147
13168
  const yearMonthChange = (param) => {
13148
13169
  onPageChange && onPageChange(param);
@@ -14080,14 +14101,14 @@ const InternalPickerPanel = (props, ref) => {
14080
14101
  moving: moving.current
14081
14102
  }));
14082
14103
  useEffect(() => {
14083
- var _a2, _b, _c;
14084
- const options22 = false;
14085
- (_a2 = PickerPanelRef.current) == null ? void 0 : _a2.addEventListener("touchstart", touchStart, options22);
14104
+ var _a, _b, _c;
14105
+ const options22 = passiveSupported ? { passive: false } : false;
14106
+ (_a = PickerPanelRef.current) == null ? void 0 : _a.addEventListener("touchstart", touchStart, options22);
14086
14107
  (_b = PickerPanelRef.current) == null ? void 0 : _b.addEventListener("touchmove", touchMove, options22);
14087
14108
  (_c = PickerPanelRef.current) == null ? void 0 : _c.addEventListener("touchend", touchEnd, options22);
14088
14109
  return () => {
14089
- var _a3, _b2, _c2;
14090
- (_a3 = PickerPanelRef.current) == null ? void 0 : _a3.removeEventListener("touchstart", touchStart);
14110
+ var _a2, _b2, _c2;
14111
+ (_a2 = PickerPanelRef.current) == null ? void 0 : _a2.removeEventListener("touchstart", touchStart);
14091
14112
  (_b2 = PickerPanelRef.current) == null ? void 0 : _b2.removeEventListener("touchmove", touchMove);
14092
14113
  (_c2 = PickerPanelRef.current) == null ? void 0 : _c2.removeEventListener("touchend", touchEnd);
14093
14114
  };
@@ -14191,8 +14212,8 @@ const InternalPicker = (props, ref) => {
14191
14212
  defaultValue: [...defaultValue],
14192
14213
  finalValue: [...defaultValue],
14193
14214
  onChange: (val) => {
14194
- var _a2;
14195
- (_a2 = props.onConfirm) == null ? void 0 : _a2.call(props, setSelectedOptions(), val);
14215
+ var _a;
14216
+ (_a = props.onConfirm) == null ? void 0 : _a.call(props, setSelectedOptions(), val);
14196
14217
  }
14197
14218
  });
14198
14219
  const [innerVisible, setInnerVisible] = usePropsValue({
@@ -14200,8 +14221,8 @@ const InternalPicker = (props, ref) => {
14200
14221
  defaultValue: false,
14201
14222
  finalValue: false,
14202
14223
  onChange: (val) => {
14203
- var _a2;
14204
- (_a2 = props.onClose) == null ? void 0 : _a2.call(props, setSelectedOptions(), innerValue);
14224
+ var _a;
14225
+ (_a = props.onClose) == null ? void 0 : _a.call(props, setSelectedOptions(), innerValue);
14205
14226
  }
14206
14227
  });
14207
14228
  const [innerValue, setInnerValue] = useState(selectedValue);
@@ -14303,14 +14324,14 @@ const InternalPicker = (props, ref) => {
14303
14324
  return options22;
14304
14325
  };
14305
14326
  const chooseItem = (columnOptions, columnIndex2) => {
14306
- var _a2, _b;
14327
+ var _a, _b;
14307
14328
  const values = [];
14308
14329
  const start2 = columnIndex2;
14309
14330
  if (columnOptions && Object.keys(columnOptions).length) {
14310
14331
  if (values[columnIndex2] !== columnOptions.value) {
14311
14332
  if (columnsType() === "cascade") {
14312
14333
  values[columnIndex2] = columnOptions.value || "";
14313
- while ((_a2 = columnOptions == null ? void 0 : columnOptions.children) == null ? void 0 : _a2[0]) {
14334
+ while ((_a = columnOptions == null ? void 0 : columnOptions.children) == null ? void 0 : _a[0]) {
14314
14335
  values[columnIndex2 + 1] = columnOptions.children[0].value;
14315
14336
  columnIndex2++;
14316
14337
  columnOptions = columnOptions.children[0];
@@ -14386,9 +14407,9 @@ const InternalPicker = (props, ref) => {
14386
14407
  visible: innerVisible,
14387
14408
  position: "bottom",
14388
14409
  onOverlayClick: () => {
14389
- var _a2;
14410
+ var _a;
14390
14411
  if (closeOnOverlayClick) {
14391
- (_a2 = props.onCancel) == null ? void 0 : _a2.call(props);
14412
+ (_a = props.onCancel) == null ? void 0 : _a.call(props);
14392
14413
  setInnerVisible(false);
14393
14414
  }
14394
14415
  },
@@ -14579,7 +14600,7 @@ const DatePicker = (props) => {
14579
14600
  }
14580
14601
  };
14581
14602
  const handlePickerChange = (selectedOptions, selectedValue, index) => {
14582
- var _a2;
14603
+ var _a;
14583
14604
  const rangeType = type4.toLocaleLowerCase();
14584
14605
  if (["date", "datetime", "datehour", "month-day", "year-month"].includes(
14585
14606
  rangeType
@@ -14618,7 +14639,7 @@ const DatePicker = (props) => {
14618
14639
  } else if (rangeType === "datehour") {
14619
14640
  date4 = new Date(year, month, day, Number(formatDate[3]));
14620
14641
  }
14621
- const isEqual2 = ((_a2 = new Date(selectedDate)) == null ? void 0 : _a2.getTime()) === (date4 == null ? void 0 : date4.getTime());
14642
+ const isEqual2 = ((_a = new Date(selectedDate)) == null ? void 0 : _a.getTime()) === (date4 == null ? void 0 : date4.getTime());
14622
14643
  date4 && isDate(date4) && !isEqual2 && setSelectedDate(formatValue(date4));
14623
14644
  }
14624
14645
  props.onChange && props.onChange(selectedOptions, selectedValue, index);
@@ -14635,7 +14656,7 @@ const DatePicker = (props) => {
14635
14656
  return { text: padMin + fatter, value: padMin };
14636
14657
  };
14637
14658
  const generateColumn = (min, max, val, type22, columnIndex) => {
14638
- var _a2;
14659
+ var _a;
14639
14660
  let cmin = min;
14640
14661
  const arr = [];
14641
14662
  let index = 0;
@@ -14650,7 +14671,7 @@ const DatePicker = (props) => {
14650
14671
  index++;
14651
14672
  }
14652
14673
  }
14653
- pickerValue[columnIndex] = (_a2 = arr[index]) == null ? void 0 : _a2.value;
14674
+ pickerValue[columnIndex] = (_a = arr[index]) == null ? void 0 : _a.value;
14654
14675
  setPickerValue([...pickerValue]);
14655
14676
  if (props.filter && props.filter(type22, arr)) {
14656
14677
  return props.filter(type22, arr);
@@ -15771,21 +15792,13 @@ Schema.validators = validators;
15771
15792
  const SECRET = "NUT_FORM_INTERNAL";
15772
15793
  class FormStore {
15773
15794
  constructor() {
15774
- // 初始化数据
15775
- __publicField(this, "initialValues", {});
15776
- __publicField(this, "updateList", []);
15777
- // 存放表单中所有的数据 eg. {password: "ddd",username: "123"}
15778
- __publicField(this, "store", {});
15779
- // 所有的组件实例
15780
- __publicField(this, "fieldEntities", []);
15781
- // 校验成功或失败的回调,onFinish、onFinishFailed
15782
- __publicField(this, "callbacks", {});
15783
- __publicField(this, "errors", {});
15784
- /**
15785
- * 注册组件实例
15786
- * @param field
15787
- */
15788
- __publicField(this, "registerField", (field) => {
15795
+ this.initialValues = {};
15796
+ this.updateList = [];
15797
+ this.store = {};
15798
+ this.fieldEntities = [];
15799
+ this.callbacks = {};
15800
+ this.errors = {};
15801
+ this.registerField = (field) => {
15789
15802
  this.fieldEntities.push(field);
15790
15803
  return () => {
15791
15804
  this.fieldEntities = this.fieldEntities.filter((item) => item !== field);
@@ -15793,19 +15806,12 @@ class FormStore {
15793
15806
  delete this.store[field.props.name];
15794
15807
  }
15795
15808
  };
15796
- });
15797
- /**
15798
- * 获取 formItem 的值
15799
- * @param name
15800
- */
15801
- __publicField(this, "getFieldValue", (name) => {
15802
- var _a2;
15803
- return (_a2 = this.store) == null ? void 0 : _a2[name];
15804
- });
15805
- /**
15806
- * 获取全部字段
15807
- */
15808
- __publicField(this, "getFieldsValue", (nameList) => {
15809
+ };
15810
+ this.getFieldValue = (name) => {
15811
+ var _a;
15812
+ return (_a = this.store) == null ? void 0 : _a[name];
15813
+ };
15814
+ this.getFieldsValue = (nameList) => {
15809
15815
  if (typeof nameList === "boolean") {
15810
15816
  return JSON.parse(JSON.stringify(this.store));
15811
15817
  }
@@ -15814,23 +15820,14 @@ class FormStore {
15814
15820
  fieldsValue[field] = this.getFieldValue(field);
15815
15821
  });
15816
15822
  return fieldsValue;
15817
- });
15818
- /**
15819
- * 设置 form 的初始值,之后在 reset 的时候使用
15820
- * @param values
15821
- * @param init
15822
- */
15823
- __publicField(this, "setInitialValues", (values, init) => {
15823
+ };
15824
+ this.setInitialValues = (values, init) => {
15824
15825
  if (init) {
15825
15826
  this.initialValues = values;
15826
15827
  this.store = values;
15827
15828
  }
15828
- });
15829
- /**
15830
- * 存储组件数据
15831
- * @param newStore { [name]: newValue }
15832
- */
15833
- __publicField(this, "setFieldsValue", (newStore) => {
15829
+ };
15830
+ this.setFieldsValue = (newStore) => {
15834
15831
  this.store = {
15835
15832
  ...this.store,
15836
15833
  ...newStore
@@ -15852,15 +15849,15 @@ class FormStore {
15852
15849
  item.entity.onStoreChange("update");
15853
15850
  }
15854
15851
  });
15855
- });
15856
- __publicField(this, "setCallback", (callback) => {
15852
+ };
15853
+ this.setCallback = (callback) => {
15857
15854
  this.callbacks = {
15858
15855
  ...this.callbacks,
15859
15856
  ...callback
15860
15857
  };
15861
- });
15862
- __publicField(this, "validateFields", async (nameList) => {
15863
- var _a2;
15858
+ };
15859
+ this.validateFields = async (nameList) => {
15860
+ var _a;
15864
15861
  let filterEntitys = [];
15865
15862
  const errs = [];
15866
15863
  this.errors.length = 0;
@@ -15886,7 +15883,7 @@ class FormStore {
15886
15883
  }
15887
15884
  const validator = new Schema(descriptor);
15888
15885
  try {
15889
- await validator.validate({ [name]: (_a2 = this.store) == null ? void 0 : _a2[name] });
15886
+ await validator.validate({ [name]: (_a = this.store) == null ? void 0 : _a[name] });
15890
15887
  } catch ({ errors }) {
15891
15888
  if (errors) {
15892
15889
  errs.push(...errors);
@@ -15900,25 +15897,24 @@ class FormStore {
15900
15897
  entity.onStoreChange("validate");
15901
15898
  }
15902
15899
  return errs;
15903
- });
15904
- __publicField(this, "submit", async () => {
15905
- var _a2, _b, _c, _d;
15900
+ };
15901
+ this.submit = async () => {
15902
+ var _a, _b, _c, _d;
15906
15903
  const errors = await this.validateFields();
15907
15904
  if (errors.length === 0) {
15908
- (_b = (_a2 = this.callbacks).onFinish) == null ? void 0 : _b.call(_a2, this.store);
15905
+ (_b = (_a = this.callbacks).onFinish) == null ? void 0 : _b.call(_a, this.store);
15909
15906
  } else if (errors.length > 0) {
15910
15907
  (_d = (_c = this.callbacks).onFinishFailed) == null ? void 0 : _d.call(_c, this.store, errors);
15911
15908
  }
15912
- });
15913
- __publicField(this, "resetFields", () => {
15909
+ };
15910
+ this.resetFields = () => {
15914
15911
  this.errors.length = 0;
15915
15912
  this.store = this.initialValues;
15916
15913
  this.fieldEntities.forEach((entity) => {
15917
15914
  entity.onStoreChange("reset");
15918
15915
  });
15919
- });
15920
- // 监听事件
15921
- __publicField(this, "registerUpdate", (field, shouldUpdate) => {
15916
+ };
15917
+ this.registerUpdate = (field, shouldUpdate) => {
15922
15918
  this.updateList.push({
15923
15919
  entity: field,
15924
15920
  condition: shouldUpdate
@@ -15926,11 +15922,11 @@ class FormStore {
15926
15922
  return () => {
15927
15923
  this.updateList = this.updateList.filter((i) => i.entity !== field);
15928
15924
  };
15929
- });
15930
- __publicField(this, "dispatch", ({ name }) => {
15925
+ };
15926
+ this.dispatch = ({ name }) => {
15931
15927
  this.validateFields([name]);
15932
- });
15933
- __publicField(this, "getInternal", (key) => {
15928
+ };
15929
+ this.getInternal = (key) => {
15934
15930
  if (key === SECRET) {
15935
15931
  return {
15936
15932
  registerField: this.registerField,
@@ -15942,8 +15938,8 @@ class FormStore {
15942
15938
  registerUpdate: this.registerUpdate
15943
15939
  };
15944
15940
  }
15945
- });
15946
- __publicField(this, "getForm", () => {
15941
+ };
15942
+ this.getForm = () => {
15947
15943
  return {
15948
15944
  getFieldValue: this.getFieldValue,
15949
15945
  getFieldsValue: this.getFieldsValue,
@@ -15954,7 +15950,7 @@ class FormStore {
15954
15950
  errors: this.errors,
15955
15951
  getInternal: this.getInternal
15956
15952
  };
15957
- });
15953
+ };
15958
15954
  this.callbacks = {
15959
15955
  onFinish: () => {
15960
15956
  },
@@ -16074,19 +16070,15 @@ const defaultProps$W = {
16074
16070
  shouldUpdate: false,
16075
16071
  noStyle: false
16076
16072
  };
16077
- class FormItem extends React__default.Component {
16073
+ const _FormItem = class _FormItem extends React__default.Component {
16078
16074
  constructor(props) {
16079
16075
  super(props);
16080
- __publicField(this, "cancelRegister");
16081
- __publicField(this, "componentRef");
16082
- __publicField(this, "eventOff");
16083
- // children添加value属性和onChange事件
16084
- __publicField(this, "getControlled", (children) => {
16085
- var _a2;
16076
+ this.getControlled = (children) => {
16077
+ var _a;
16086
16078
  const { setFieldsValue, getFieldValue } = this.context;
16087
16079
  const { dispatch } = this.context.getInternal(SECRET);
16088
16080
  const { name = "" } = this.props;
16089
- if ((_a2 = children == null ? void 0 : children.props) == null ? void 0 : _a2.defaultValue) {
16081
+ if ((_a = children == null ? void 0 : children.props) == null ? void 0 : _a.defaultValue) {
16090
16082
  console.warn("通过 initialValue 设置初始值");
16091
16083
  }
16092
16084
  const fieldValue = getFieldValue(name);
@@ -16108,7 +16100,7 @@ class FormItem extends React__default.Component {
16108
16100
  const { validateTrigger } = this.props;
16109
16101
  let validateTriggers = [this.props.trigger || "onChange"];
16110
16102
  if (validateTrigger) {
16111
- validateTriggers = typeof validateTrigger === "string" ? [...validateTriggers, validateTrigger] : [...validateTriggers, ...validateTrigger];
16103
+ validateTriggers = typeof validateTrigger === "string" ? [validateTrigger] : [...validateTrigger];
16112
16104
  validateTriggers.forEach((trigger) => {
16113
16105
  const originTrigger = controlled[trigger];
16114
16106
  controlled[trigger] = (...args) => {
@@ -16138,21 +16130,21 @@ class FormItem extends React__default.Component {
16138
16130
  };
16139
16131
  }
16140
16132
  return controlled;
16141
- });
16142
- __publicField(this, "refresh", () => {
16133
+ };
16134
+ this.refresh = () => {
16143
16135
  this.setState(({ resetCount }) => ({
16144
16136
  resetCount: resetCount + 1
16145
16137
  }));
16146
- });
16147
- __publicField(this, "onStoreChange", (type4) => {
16138
+ };
16139
+ this.onStoreChange = (type4) => {
16148
16140
  if (type4 === "reset") {
16149
16141
  this.context.errors[this.props.name] = [];
16150
16142
  this.refresh();
16151
16143
  } else {
16152
16144
  this.forceUpdate();
16153
16145
  }
16154
- });
16155
- __publicField(this, "renderLayout", (childNode) => {
16146
+ };
16147
+ this.renderLayout = (childNode) => {
16156
16148
  const {
16157
16149
  label,
16158
16150
  name,
@@ -16187,7 +16179,7 @@ class FormItem extends React__default.Component {
16187
16179
  item[0].message
16188
16180
  ))
16189
16181
  );
16190
- });
16182
+ };
16191
16183
  this.componentRef = React__default.createRef();
16192
16184
  this.state = {
16193
16185
  resetCount: 1
@@ -16220,9 +16212,10 @@ class FormItem extends React__default.Component {
16220
16212
  }
16221
16213
  return /* @__PURE__ */ React__default.createElement(React__default.Fragment, { key: this.state.resetCount }, this.props.noStyle ? returnChildNode : this.renderLayout(returnChildNode));
16222
16214
  }
16223
- }
16224
- __publicField(FormItem, "defaultProps", defaultProps$W);
16225
- __publicField(FormItem, "contextType", Context);
16215
+ };
16216
+ _FormItem.defaultProps = defaultProps$W;
16217
+ _FormItem.contextType = Context;
16218
+ let FormItem = _FormItem;
16226
16219
  const InnerForm = Form;
16227
16220
  InnerForm.Item = FormItem;
16228
16221
  InnerForm.useForm = useForm;
@@ -16311,12 +16304,12 @@ const Input = forwardRef(
16311
16304
  setValue("");
16312
16305
  },
16313
16306
  focus: () => {
16314
- var _a2;
16315
- (_a2 = inputRef.current) == null ? void 0 : _a2.focus();
16307
+ var _a;
16308
+ (_a = inputRef.current) == null ? void 0 : _a.focus();
16316
16309
  },
16317
16310
  blur: () => {
16318
- var _a2;
16319
- (_a2 = inputRef.current) == null ? void 0 : _a2.blur();
16311
+ var _a;
16312
+ (_a = inputRef.current) == null ? void 0 : _a.blur();
16320
16313
  },
16321
16314
  get nativeElement() {
16322
16315
  return inputRef.current;
@@ -16406,14 +16399,14 @@ const Input = forwardRef(
16406
16399
  handleInput(e2.currentTarget.value);
16407
16400
  },
16408
16401
  onCompositionStart: (e2) => {
16409
- var _a2;
16402
+ var _a;
16410
16403
  composingRef.current = true;
16411
- (_a2 = props.onCompositionStart) == null ? void 0 : _a2.call(props, e2);
16404
+ (_a = props.onCompositionStart) == null ? void 0 : _a.call(props, e2);
16412
16405
  },
16413
16406
  onCompositionEnd: (e2) => {
16414
- var _a2;
16407
+ var _a;
16415
16408
  composingRef.current = false;
16416
- (_a2 = props.onCompositionEnd) == null ? void 0 : _a2.call(props, e2);
16409
+ (_a = props.onCompositionEnd) == null ? void 0 : _a.call(props, e2);
16417
16410
  }
16418
16411
  }
16419
16412
  ),
@@ -16480,14 +16473,15 @@ const InputNumber = (props) => {
16480
16473
  const [focused, setFocused] = useState(false);
16481
16474
  const inputRef = useRef(null);
16482
16475
  useEffect(() => {
16483
- var _a2, _b;
16476
+ var _a, _b;
16484
16477
  if (focused) {
16485
- (_b = (_a2 = inputRef.current) == null ? void 0 : _a2.select) == null ? void 0 : _b.call(_a2);
16478
+ (_b = (_a = inputRef.current) == null ? void 0 : _a.select) == null ? void 0 : _b.call(_a);
16486
16479
  }
16487
16480
  }, [focused]);
16488
16481
  const [shadowValue, setShadowValue] = usePropsValue({
16489
16482
  value: typeof value === "string" ? parseFloat(value) : value,
16490
16483
  defaultValue: typeof defaultValue === "string" ? parseFloat(defaultValue) : defaultValue,
16484
+ finalValue: 0,
16491
16485
  onChange: (value2) => {
16492
16486
  }
16493
16487
  });
@@ -17427,6 +17421,7 @@ const defaultProps$O = {
17427
17421
  marks: {}
17428
17422
  };
17429
17423
  const Range = (props) => {
17424
+ const rtl = useRtl();
17430
17425
  const {
17431
17426
  className,
17432
17427
  range: range3,
@@ -17539,15 +17534,17 @@ const Range = (props) => {
17539
17534
  transition: dragStatus ? "none" : void 0
17540
17535
  };
17541
17536
  }
17537
+ const dir = rtl ? "right" : "left";
17542
17538
  return {
17543
17539
  width: calcMainAxis(),
17544
- left: calcOffset(),
17540
+ [dir]: calcOffset(),
17545
17541
  transition: dragStatus ? "none" : void 0
17546
17542
  };
17547
17543
  };
17548
17544
  const marksStyle = (mark) => {
17545
+ const dir = rtl ? "right" : "left";
17549
17546
  let style = {
17550
- left: `${(mark - min) / scope() * 100}%`
17547
+ [dir]: `${(mark - min) / scope() * 100}%`
17551
17548
  };
17552
17549
  if (vertical) {
17553
17550
  style = {
@@ -17639,6 +17636,7 @@ const Range = (props) => {
17639
17636
  let delta = touch.deltaX.current;
17640
17637
  let total = rect.width;
17641
17638
  let diff = delta / total * scope();
17639
+ diff = rtl ? -diff : diff;
17642
17640
  if (vertical) {
17643
17641
  delta = touch.deltaY.current;
17644
17642
  total = rect.height;
@@ -17796,8 +17794,8 @@ const Rate = (props) => {
17796
17794
  setScore(value2);
17797
17795
  };
17798
17796
  const getScoreByPosition = (x) => {
17799
- var _a2;
17800
- if ((_a2 = rateRects.current) == null ? void 0 : _a2.length) {
17797
+ var _a;
17798
+ if ((_a = rateRects.current) == null ? void 0 : _a.length) {
17801
17799
  for (let index = rateRects.current.length - 1; index >= 0; index--) {
17802
17800
  const item = rateRects.current[index];
17803
17801
  if (item && x > item.left) {
@@ -18477,22 +18475,14 @@ TextArea.defaultProps = defaultProps$I;
18477
18475
  TextArea.displayName = "NutTextArea";
18478
18476
  class UploadOptions {
18479
18477
  constructor() {
18480
- __publicField(this, "url", "");
18481
- __publicField(this, "name", "file");
18482
- __publicField(this, "fileType", "image");
18483
- __publicField(this, "formData");
18484
- __publicField(this, "sourceFile");
18485
- __publicField(this, "method", "post");
18486
- __publicField(this, "xhrState", 200);
18487
- __publicField(this, "timeout", 30 * 1e3);
18488
- __publicField(this, "headers", {});
18489
- __publicField(this, "withCredentials", false);
18490
- __publicField(this, "onStart");
18491
- __publicField(this, "taroFilePath");
18492
- __publicField(this, "onProgress");
18493
- __publicField(this, "onSuccess");
18494
- __publicField(this, "onFailure");
18495
- __publicField(this, "beforeXhrUpload");
18478
+ this.url = "";
18479
+ this.name = "file";
18480
+ this.fileType = "image";
18481
+ this.method = "post";
18482
+ this.xhrState = 200;
18483
+ this.timeout = 30 * 1e3;
18484
+ this.headers = {};
18485
+ this.withCredentials = false;
18496
18486
  }
18497
18487
  }
18498
18488
  const UPLOADING = "uploading";
@@ -18500,11 +18490,10 @@ const SUCCESS = "success";
18500
18490
  const ERROR = "error";
18501
18491
  class Upload {
18502
18492
  constructor(options2) {
18503
- __publicField(this, "options");
18504
18493
  this.options = options2;
18505
18494
  }
18506
18495
  upload() {
18507
- var _a2;
18496
+ var _a;
18508
18497
  const { options: options2 } = this;
18509
18498
  const xhr = new XMLHttpRequest();
18510
18499
  xhr.timeout = options2.timeout;
@@ -18512,16 +18501,16 @@ class Upload {
18512
18501
  xhr.upload.addEventListener(
18513
18502
  "progress",
18514
18503
  (e2) => {
18515
- var _a3;
18516
- (_a3 = options2.onProgress) == null ? void 0 : _a3.call(options2, e2, options2);
18504
+ var _a2;
18505
+ (_a2 = options2.onProgress) == null ? void 0 : _a2.call(options2, e2, options2);
18517
18506
  },
18518
18507
  false
18519
18508
  );
18520
18509
  xhr.onreadystatechange = () => {
18521
- var _a3, _b;
18510
+ var _a2, _b;
18522
18511
  if (xhr.readyState === 4) {
18523
18512
  if (xhr.status === options2.xhrState) {
18524
- (_a3 = options2.onSuccess) == null ? void 0 : _a3.call(options2, xhr.responseText, options2);
18513
+ (_a2 = options2.onSuccess) == null ? void 0 : _a2.call(options2, xhr.responseText, options2);
18525
18514
  } else {
18526
18515
  (_b = options2.onFailure) == null ? void 0 : _b.call(options2, xhr.responseText, options2);
18527
18516
  }
@@ -18532,7 +18521,7 @@ class Upload {
18532
18521
  for (const [key, value] of Object.entries(options2.headers)) {
18533
18522
  xhr.setRequestHeader(key, value);
18534
18523
  }
18535
- (_a2 = options2.onStart) == null ? void 0 : _a2.call(options2, options2);
18524
+ (_a = options2.onStart) == null ? void 0 : _a.call(options2, options2);
18536
18525
  if (options2.beforeXhrUpload) {
18537
18526
  options2.beforeXhrUpload(xhr, options2);
18538
18527
  } else {
@@ -18577,6 +18566,7 @@ const defaultProps$H = {
18577
18566
  delay: 0
18578
18567
  };
18579
18568
  const Progress = (props) => {
18569
+ const rtl = useRtl();
18580
18570
  const {
18581
18571
  className,
18582
18572
  style,
@@ -18670,7 +18660,7 @@ const Progress = (props) => {
18670
18660
  "div",
18671
18661
  {
18672
18662
  className: `${classPrefix2}-text`,
18673
- style: { left: `${displayPercent}%` }
18663
+ style: rtl ? { right: `${displayPercent}%` } : { left: `${displayPercent}%` }
18674
18664
  },
18675
18665
  children || /* @__PURE__ */ React__default.createElement(
18676
18666
  "div",
@@ -18704,7 +18694,7 @@ const Preview = ({
18704
18694
  return item.loadingIcon || /* @__PURE__ */ React__default.createElement(t$2, { className: "nut-icon-loading", color: "#fff" });
18705
18695
  };
18706
18696
  return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, fileList.length !== 0 && fileList.map((item, index) => {
18707
- var _a2;
18697
+ var _a;
18708
18698
  return /* @__PURE__ */ React__default.createElement(
18709
18699
  "div",
18710
18700
  {
@@ -18719,7 +18709,7 @@ const Preview = ({
18719
18709
  onClick: () => onDeleteItem(item, index)
18720
18710
  }
18721
18711
  ),
18722
- previewType === "picture" && !children && /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader-preview-img" }, item.status === "ready" ? /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader-preview-progress" }, /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader-preview-progress-msg" }, item.message)) : item.status !== "success" && /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader-preview-progress" }, renderIcon(item), /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader-preview-progress-msg" }, item.message)), ((_a2 = item.type) == null ? void 0 : _a2.includes("image")) ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, item.url && /* @__PURE__ */ React__default.createElement(
18712
+ previewType === "picture" && !children && /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader-preview-img" }, item.status === "ready" ? /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader-preview-progress" }, /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader-preview-progress-msg" }, item.message)) : item.status !== "success" && /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader-preview-progress" }, renderIcon(item), /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader-preview-progress-msg" }, item.message)), ((_a = item.type) == null ? void 0 : _a.includes("image")) ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, item.url && /* @__PURE__ */ React__default.createElement(
18723
18713
  "img",
18724
18714
  {
18725
18715
  className: "nut-uploader-preview-img-c",
@@ -18773,18 +18763,11 @@ const Preview = ({
18773
18763
  };
18774
18764
  class FileItem {
18775
18765
  constructor() {
18776
- __publicField(this, "status", "ready");
18777
- __publicField(this, "message", "准备中..");
18778
- __publicField(this, "uid", (/* @__PURE__ */ new Date()).getTime().toString());
18779
- __publicField(this, "name");
18780
- __publicField(this, "url");
18781
- __publicField(this, "type");
18782
- __publicField(this, "path");
18783
- __publicField(this, "percentage", 0);
18784
- __publicField(this, "formData", {});
18785
- __publicField(this, "responseText");
18786
- __publicField(this, "loadingIcon");
18787
- __publicField(this, "failIcon");
18766
+ this.status = "ready";
18767
+ this.message = "准备中..";
18768
+ this.uid = (/* @__PURE__ */ new Date()).getTime().toString();
18769
+ this.percentage = 0;
18770
+ this.formData = {};
18788
18771
  }
18789
18772
  }
18790
18773
  const defaultProps$G = {
@@ -18892,11 +18875,11 @@ const InternalUploader = (props, ref) => {
18892
18875
  el.value = "";
18893
18876
  };
18894
18877
  const executeUpload = (fileItem, index) => {
18895
- var _a2, _b;
18878
+ var _a, _b;
18896
18879
  const uploadOption = new UploadOptions();
18897
18880
  uploadOption.url = url2;
18898
18881
  for (const [key, value2] of Object.entries(data)) {
18899
- (_a2 = fileItem.formData) == null ? void 0 : _a2.append(key, value2);
18882
+ (_a = fileItem.formData) == null ? void 0 : _a.append(key, value2);
18900
18883
  }
18901
18884
  uploadOption.formData = fileItem.formData;
18902
18885
  uploadOption.timeout = timeout2 * 1;
@@ -18983,7 +18966,7 @@ const InternalUploader = (props, ref) => {
18983
18966
  };
18984
18967
  const readFile = (files) => {
18985
18968
  files.forEach((file, index) => {
18986
- var _a2;
18969
+ var _a;
18987
18970
  const formData = new FormData();
18988
18971
  formData.append(name, file);
18989
18972
  const fileItem = new FileItem();
@@ -18994,7 +18977,7 @@ const InternalUploader = (props, ref) => {
18994
18977
  fileItem.uid = file.lastModified + fileItem.uid;
18995
18978
  fileItem.message = autoUpload ? locale.uploader.readyUpload : locale.uploader.waitingUpload;
18996
18979
  executeUpload(fileItem, index);
18997
- if (preview && ((_a2 = file.type) == null ? void 0 : _a2.includes("image"))) {
18980
+ if (preview && ((_a = file.type) == null ? void 0 : _a.includes("image"))) {
18998
18981
  const reader = new FileReader();
18999
18982
  reader.onload = (event) => {
19000
18983
  fileItem.url = event.target.result;
@@ -19232,8 +19215,8 @@ function legacyUnmount(container) {
19232
19215
  }
19233
19216
  async function concurrentUnmount(container) {
19234
19217
  return Promise.resolve().then(() => {
19235
- var _a2;
19236
- (_a2 = container[MARK]) == null ? void 0 : _a2.unmount();
19218
+ var _a;
19219
+ (_a = container[MARK]) == null ? void 0 : _a.unmount();
19237
19220
  delete container[MARK];
19238
19221
  });
19239
19222
  }
@@ -19334,7 +19317,6 @@ const confirm = (config2, renderFunc) => {
19334
19317
  update: update2
19335
19318
  };
19336
19319
  };
19337
- const confirm$1 = confirm;
19338
19320
  const Content = (props) => {
19339
19321
  const {
19340
19322
  visible,
@@ -19549,11 +19531,11 @@ const BaseDialog = (props, ref) => {
19549
19531
  };
19550
19532
  const Dialog = forwardRef(BaseDialog);
19551
19533
  Dialog.confirm = (props) => {
19552
- return confirm$1(props);
19534
+ return confirm(props);
19553
19535
  };
19554
19536
  ["alert"].forEach((type4) => {
19555
19537
  Dialog[type4] = (props) => {
19556
- return confirm$1({
19538
+ return confirm({
19557
19539
  ...props,
19558
19540
  isNotice: false,
19559
19541
  noticeType: type4
@@ -19756,16 +19738,16 @@ const InfiniteLoading = (props) => {
19756
19738
  const distance = useRef(0);
19757
19739
  const classes = classNames(classPrefix$d, className);
19758
19740
  useEffect(() => {
19759
- var _a2;
19741
+ var _a;
19760
19742
  if (target && document.getElementById(target)) {
19761
19743
  scrollEl.current = document.getElementById(target);
19762
19744
  } else {
19763
19745
  scrollEl.current = window;
19764
19746
  }
19765
- (_a2 = scrollEl.current) == null ? void 0 : _a2.addEventListener("scroll", handleScroll, capture);
19747
+ (_a = scrollEl.current) == null ? void 0 : _a.addEventListener("scroll", handleScroll, capture);
19766
19748
  return () => {
19767
- var _a3;
19768
- (_a3 = scrollEl.current) == null ? void 0 : _a3.removeEventListener("scroll", handleScroll, capture);
19749
+ var _a2;
19750
+ (_a2 = scrollEl.current) == null ? void 0 : _a2.removeEventListener("scroll", handleScroll, capture);
19769
19751
  };
19770
19752
  }, [hasMore, isInfiniting, onLoadMore]);
19771
19753
  useEffect(() => {
@@ -20317,10 +20299,9 @@ const NoticeBar = (props) => {
20317
20299
  NoticeBar.defaultProps = defaultProps$z;
20318
20300
  NoticeBar.displayName = "NutNoticeBar";
20319
20301
  const classPrefix$c = "nut-notify";
20320
- let Notification$1 = (_a = class extends React.PureComponent {
20302
+ let Notification$1 = class Notification extends React.PureComponent {
20321
20303
  constructor(props) {
20322
20304
  super(props);
20323
- __publicField(this, "closeTimer");
20324
20305
  this.close = this.close.bind(this);
20325
20306
  this.startCloseTimer = this.startCloseTimer.bind(this);
20326
20307
  this.clearCloseTimer = this.clearCloseTimer.bind(this);
@@ -20393,7 +20374,7 @@ let Notification$1 = (_a = class extends React.PureComponent {
20393
20374
  )
20394
20375
  ));
20395
20376
  }
20396
- }, __publicField(_a, "newInstance"), _a);
20377
+ };
20397
20378
  Notification$1.newInstance = (properties, callback) => {
20398
20379
  const element = document.createElement("div");
20399
20380
  const id = properties.id ? properties.id : `${(/* @__PURE__ */ new Date()).getTime()}`;
@@ -20559,8 +20540,8 @@ const Popover = (props) => {
20559
20540
  }
20560
20541
  useClickAway(
20561
20542
  () => {
20562
- var _a2;
20563
- (_a2 = props.onClick) == null ? void 0 : _a2.call(props);
20543
+ var _a;
20544
+ (_a = props.onClick) == null ? void 0 : _a.call(props);
20564
20545
  onClose == null ? void 0 : onClose();
20565
20546
  },
20566
20547
  targetSet,
@@ -20596,11 +20577,11 @@ const Popover = (props) => {
20596
20577
  return `${prefixCls2} ${prefixCls2}-${direction} ${prefixCls2}-${location}`;
20597
20578
  };
20598
20579
  const getRootPosition = () => {
20599
- var _a2, _b;
20580
+ var _a, _b;
20600
20581
  const styles = {};
20601
20582
  if (!rootPosition)
20602
20583
  return {};
20603
- const contentWidth = (_a2 = popoverContentRef.current) == null ? void 0 : _a2.clientWidth;
20584
+ const contentWidth = (_a = popoverContentRef.current) == null ? void 0 : _a.clientWidth;
20604
20585
  const contentHeight = (_b = popoverContentRef.current) == null ? void 0 : _b.clientHeight;
20605
20586
  const { width, height, left, top, right } = rootPosition;
20606
20587
  const direction = location.split("-")[0];
@@ -20673,12 +20654,12 @@ const Popover = (props) => {
20673
20654
  return styles;
20674
20655
  };
20675
20656
  const handleSelect = (item, index) => {
20676
- var _a2;
20657
+ var _a;
20677
20658
  if (!item.disabled) {
20678
20659
  onSelect == null ? void 0 : onSelect(item, index);
20679
20660
  }
20680
20661
  if (closeOnActionClick) {
20681
- (_a2 = props.onClick) == null ? void 0 : _a2.call(props);
20662
+ (_a = props.onClick) == null ? void 0 : _a.call(props);
20682
20663
  onClose == null ? void 0 : onClose();
20683
20664
  }
20684
20665
  };
@@ -20688,8 +20669,8 @@ const Popover = (props) => {
20688
20669
  className: "nut-popover-wrapper",
20689
20670
  ref: popoverRef,
20690
20671
  onClick: () => {
20691
- var _a2;
20692
- (_a2 = props.onClick) == null ? void 0 : _a2.call(props);
20672
+ var _a;
20673
+ (_a = props.onClick) == null ? void 0 : _a.call(props);
20693
20674
  if (!visible) {
20694
20675
  onOpen == null ? void 0 : onOpen();
20695
20676
  } else {
@@ -20739,8 +20720,8 @@ const Popover = (props) => {
20739
20720
  {
20740
20721
  className: "nut-popover-menu-item-action-icon",
20741
20722
  onClick: (e2) => {
20742
- var _a2, _b;
20743
- return (_b = (_a2 = item.action) == null ? void 0 : _a2.onClick) == null ? void 0 : _b.call(_a2, e2);
20723
+ var _a, _b;
20724
+ return (_b = (_a = item.action) == null ? void 0 : _a.onClick) == null ? void 0 : _b.call(_a, e2);
20744
20725
  }
20745
20726
  },
20746
20727
  item.action.icon
@@ -20817,8 +20798,8 @@ const PullToRefresh = (p) => {
20817
20798
  const elementRef = useRef(null);
20818
20799
  const pullingRef = useRef(false);
20819
20800
  useEffect(() => {
20820
- var _a2;
20821
- (_a2 = elementRef.current) == null ? void 0 : _a2.addEventListener("touchmove", () => {
20801
+ var _a;
20802
+ (_a = elementRef.current) == null ? void 0 : _a.addEventListener("touchmove", () => {
20822
20803
  });
20823
20804
  }, []);
20824
20805
  async function doRefresh() {
@@ -20901,23 +20882,23 @@ const PullToRefresh = (p) => {
20901
20882
  axis: "y",
20902
20883
  target: elementRef,
20903
20884
  enabled: !props.disabled,
20904
- eventOptions: false
20885
+ eventOptions: passiveSupported ? { passive: false } : false
20905
20886
  }
20906
20887
  );
20907
20888
  const renderIcons = (status2) => {
20908
20889
  return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement("i", { className: `${classPrefix2}-head-content-icons` }, (status2 === "pulling" || status2 === "complete") && /* @__PURE__ */ React__default.createElement(t$2, null), (status2 === "canRelease" || status2 === "refreshing") && /* @__PURE__ */ React__default.createElement(t$1, null)));
20909
20890
  };
20910
20891
  const renderStatusIcon = () => {
20911
- var _a2;
20892
+ var _a;
20912
20893
  if (props.renderIcon) {
20913
- return (_a2 = props.renderIcon) == null ? void 0 : _a2.call(props, status);
20894
+ return (_a = props.renderIcon) == null ? void 0 : _a.call(props, status);
20914
20895
  }
20915
20896
  return renderIcons(status);
20916
20897
  };
20917
20898
  const renderStatusText = () => {
20918
- var _a2;
20899
+ var _a;
20919
20900
  if (props.renderText) {
20920
- return (_a2 = props.renderText) == null ? void 0 : _a2.call(props, status);
20901
+ return (_a = props.renderText) == null ? void 0 : _a.call(props, status);
20921
20902
  }
20922
20903
  if (status === "pulling")
20923
20904
  return props.pullingText;
@@ -20987,7 +20968,7 @@ const defaultProps$v = {
20987
20968
  };
20988
20969
  const classPrefix$9 = `nut-avatar`;
20989
20970
  const Avatar = (props) => {
20990
- var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
20971
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
20991
20972
  const {
20992
20973
  children,
20993
20974
  size,
@@ -21014,7 +20995,7 @@ const Avatar = (props) => {
21014
20995
  const parent = useContext(AvatarContext);
21015
20996
  const sizeValue = ["large", "normal", "small"];
21016
20997
  const classes = classNames({
21017
- [`nut-avatar-${((_a2 = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _a2.size) || size || "normal"}`]: true,
20998
+ [`nut-avatar-${((_a = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _a.size) || size || "normal"}`]: true,
21018
20999
  [`nut-avatar-${((_b = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _b.shape) || shape}`]: true
21019
21000
  });
21020
21001
  const cls = classNames(classPrefix$9, classes, className);
@@ -21032,20 +21013,20 @@ const Avatar = (props) => {
21032
21013
  color: `${(_g = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _g.maxColor}`
21033
21014
  };
21034
21015
  useEffect(() => {
21035
- var _a3;
21036
- const avatarChildren = (_a3 = parent == null ? void 0 : parent.avatarGroupRef) == null ? void 0 : _a3.current.children;
21016
+ var _a2;
21017
+ const avatarChildren = (_a2 = parent == null ? void 0 : parent.avatarGroupRef) == null ? void 0 : _a2.current.children;
21037
21018
  if (avatarChildren) {
21038
21019
  avatarLength(avatarChildren);
21039
21020
  }
21040
21021
  }, []);
21041
21022
  const avatarLength = (children2) => {
21042
- var _a3, _b2, _c2;
21023
+ var _a2, _b2, _c2;
21043
21024
  for (let i = 0; i < children2.length; i++) {
21044
21025
  if (children2[i] && children2[i].classList && children2[i].classList[0] === "nut-avatar") {
21045
21026
  children2[i].setAttribute("data-index", i + 1);
21046
21027
  }
21047
21028
  }
21048
- const index = Number((_b2 = (_a3 = avatarRef == null ? void 0 : avatarRef.current) == null ? void 0 : _a3.dataset) == null ? void 0 : _b2.index);
21029
+ const index = Number((_b2 = (_a2 = avatarRef == null ? void 0 : avatarRef.current) == null ? void 0 : _a2.dataset) == null ? void 0 : _b2.index);
21049
21030
  const maxCount = (_c2 = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _c2.max;
21050
21031
  setMaxSum(children2.length);
21051
21032
  setAvatarIndex(index);
@@ -21184,20 +21165,20 @@ const Swipe = forwardRef((props, instanceRef) => {
21184
21165
  const leftWidth = actionWidth.left;
21185
21166
  const rightWidth = actionWidth.right;
21186
21167
  const onTouchStart = (event) => {
21187
- var _a2;
21168
+ var _a;
21188
21169
  if (!props.disabled) {
21189
21170
  startOffset.current = state.offset;
21190
21171
  touch.start(event);
21191
- (_a2 = props.onTouchStart) == null ? void 0 : _a2.call(props, event);
21172
+ (_a = props.onTouchStart) == null ? void 0 : _a.call(props, event);
21192
21173
  }
21193
21174
  };
21194
21175
  const onTouchMove = (event) => {
21195
- var _a2;
21176
+ var _a;
21196
21177
  if (props.disabled) {
21197
21178
  return;
21198
21179
  }
21199
21180
  touch.move(event);
21200
- (_a2 = props.onTouchMove) == null ? void 0 : _a2.call(props, event);
21181
+ (_a = props.onTouchMove) == null ? void 0 : _a.call(props, event);
21201
21182
  if (touch.isHorizontal()) {
21202
21183
  lockClick.current = true;
21203
21184
  const newState = { ...state, dragging: true };
@@ -21214,14 +21195,14 @@ const Swipe = forwardRef((props, instanceRef) => {
21214
21195
  }
21215
21196
  };
21216
21197
  const onTouchEnd = (event) => {
21217
- var _a2;
21198
+ var _a;
21218
21199
  if (state.dragging) {
21219
21200
  setState((v) => ({ ...v, dragging: false }));
21220
21201
  toggle(state.offset > 0 ? "left" : "right");
21221
21202
  setTimeout(() => {
21222
21203
  lockClick.current = false;
21223
21204
  }, 0);
21224
- (_a2 = props.onTouchEnd) == null ? void 0 : _a2.call(props, event);
21205
+ (_a = props.onTouchEnd) == null ? void 0 : _a.call(props, event);
21225
21206
  }
21226
21207
  };
21227
21208
  const toggle = (side) => {
@@ -21236,18 +21217,18 @@ const Swipe = forwardRef((props, instanceRef) => {
21236
21217
  }
21237
21218
  };
21238
21219
  const open = (side) => {
21239
- var _a2;
21220
+ var _a;
21240
21221
  opened.current = true;
21241
21222
  const offset = side === "left" ? leftWidth : -rightWidth;
21242
21223
  const name = props.name;
21243
- (_a2 = props.onOpen) == null ? void 0 : _a2.call(props, { name, position: side });
21224
+ (_a = props.onOpen) == null ? void 0 : _a.call(props, { name, position: side });
21244
21225
  setState((v) => ({ ...v, offset: Number(offset) || 0 }));
21245
21226
  };
21246
21227
  const close = (position) => {
21247
- var _a2;
21228
+ var _a;
21248
21229
  if (opened.current) {
21249
21230
  opened.current = false;
21250
- (_a2 = props.onClose) == null ? void 0 : _a2.call(props, {
21231
+ (_a = props.onClose) == null ? void 0 : _a.call(props, {
21251
21232
  name: props.name,
21252
21233
  position: position || "left"
21253
21234
  });
@@ -21338,10 +21319,9 @@ const Swipe = forwardRef((props, instanceRef) => {
21338
21319
  Swipe.defaultProps = defaultProps$t;
21339
21320
  Swipe.displayName = "NutSwipe";
21340
21321
  const classPrefix$8 = "nut-toast";
21341
- class Notification extends React.PureComponent {
21322
+ class Notification2 extends React.PureComponent {
21342
21323
  constructor(props) {
21343
21324
  super(props);
21344
- __publicField(this, "closeTimer");
21345
21325
  this.close = this.close.bind(this);
21346
21326
  this.startCloseTimer = this.startCloseTimer.bind(this);
21347
21327
  this.clearCloseTimer = this.clearCloseTimer.bind(this);
@@ -21455,8 +21435,7 @@ class Notification extends React.PureComponent {
21455
21435
  ));
21456
21436
  }
21457
21437
  }
21458
- __publicField(Notification, "newInstance");
21459
- Notification.newInstance = (properties, callback) => {
21438
+ Notification2.newInstance = (properties, callback) => {
21460
21439
  const element = document.createElement("div");
21461
21440
  const id = properties.id ? properties.id : `${(/* @__PURE__ */ new Date()).getTime()}`;
21462
21441
  element.id = id;
@@ -21476,7 +21455,7 @@ Notification.newInstance = (properties, callback) => {
21476
21455
  }
21477
21456
  });
21478
21457
  }
21479
- render(/* @__PURE__ */ React.createElement(Notification, { ...properties, ref }), element);
21458
+ render(/* @__PURE__ */ React.createElement(Notification2, { ...properties, ref }), element);
21480
21459
  };
21481
21460
  let messageInstance = null;
21482
21461
  let options = {
@@ -21502,7 +21481,7 @@ function getInstance(props, callback) {
21502
21481
  messageInstance.destroy();
21503
21482
  messageInstance = null;
21504
21483
  }
21505
- Notification.newInstance(props, (notification) => {
21484
+ Notification2.newInstance(props, (notification) => {
21506
21485
  return callback && callback(notification);
21507
21486
  });
21508
21487
  }
@@ -21667,7 +21646,7 @@ const CountUp = (props) => {
21667
21646
  CountUp.defaultProps = defaultProps$r;
21668
21647
  CountUp.displayName = "NutCountUp";
21669
21648
  const defaultProps$q = {};
21670
- class AnimatingNumbers extends Component {
21649
+ const _AnimatingNumbers = class _AnimatingNumbers extends Component {
21671
21650
  constructor(props) {
21672
21651
  super(props);
21673
21652
  this.state = {};
@@ -21675,10 +21654,11 @@ class AnimatingNumbers extends Component {
21675
21654
  render() {
21676
21655
  return /* @__PURE__ */ React__default.createElement("div", { className: "nut-animatingnumbers" });
21677
21656
  }
21678
- }
21679
- __publicField(AnimatingNumbers, "defaultProps", defaultProps$q);
21680
- __publicField(AnimatingNumbers, "displayName", "NutAnimatingNumbers");
21681
- __publicField(AnimatingNumbers, "CountUp", CountUp);
21657
+ };
21658
+ _AnimatingNumbers.defaultProps = defaultProps$q;
21659
+ _AnimatingNumbers.displayName = "NutAnimatingNumbers";
21660
+ _AnimatingNumbers.CountUp = CountUp;
21661
+ let AnimatingNumbers = _AnimatingNumbers;
21682
21662
  AnimatingNumbers.CountUp = CountUp;
21683
21663
  const defaultProps$p = {
21684
21664
  ...ComponentDefaults,
@@ -21941,7 +21921,7 @@ const defaultProps$o = {
21941
21921
  };
21942
21922
  const classPrefix$6 = `nut-circleprogress`;
21943
21923
  const CircleProgress = (props) => {
21944
- var _a2;
21924
+ var _a;
21945
21925
  const {
21946
21926
  children,
21947
21927
  percent,
@@ -22000,7 +21980,7 @@ const CircleProgress = (props) => {
22000
21980
  });
22001
21981
  return stopArr;
22002
21982
  };
22003
- return /* @__PURE__ */ React__default.createElement("div", { className: classes, style: styles, ...restProps }, /* @__PURE__ */ React__default.createElement("svg", { viewBox: "0 0 100 100" }, /* @__PURE__ */ React__default.createElement("defs", null, /* @__PURE__ */ React__default.createElement("linearGradient", { id: refRandomId, x1: "100%", y1: "0%", x2: "0%", y2: "0%" }, (_a2 = stop2()) == null ? void 0 : _a2.map((item, index) => {
21983
+ return /* @__PURE__ */ React__default.createElement("div", { className: classes, style: styles, ...restProps }, /* @__PURE__ */ React__default.createElement("svg", { viewBox: "0 0 100 100" }, /* @__PURE__ */ React__default.createElement("defs", null, /* @__PURE__ */ React__default.createElement("linearGradient", { id: refRandomId, x1: "100%", y1: "0%", x2: "0%", y2: "0%" }, (_a = stop2()) == null ? void 0 : _a.map((item, index) => {
22004
21984
  return /* @__PURE__ */ React__default.createElement("stop", { key: index, offset: item.key, stopColor: item.value });
22005
21985
  }))), /* @__PURE__ */ React__default.createElement(
22006
21986
  "path",
@@ -22086,8 +22066,8 @@ const CollapseItem = (props) => {
22086
22066
  }
22087
22067
  };
22088
22068
  const getOffsetHeight = () => {
22089
- var _a2;
22090
- const height = (_a2 = contentRef.current) == null ? void 0 : _a2.offsetHeight;
22069
+ var _a;
22070
+ const height = (_a = contentRef.current) == null ? void 0 : _a.offsetHeight;
22091
22071
  return height ? `${height}px` : "";
22092
22072
  };
22093
22073
  const toggle = () => {
@@ -22468,7 +22448,7 @@ const defaultProps$k = {
22468
22448
  };
22469
22449
  const classPrefix$5 = `nut-ellipsis`;
22470
22450
  const Ellipsis = (props) => {
22471
- var _a2, _b;
22451
+ var _a, _b;
22472
22452
  const {
22473
22453
  children,
22474
22454
  content,
@@ -22608,7 +22588,7 @@ const Ellipsis = (props) => {
22608
22588
  const handleClick2 = () => {
22609
22589
  onClick && onClick();
22610
22590
  };
22611
- return /* @__PURE__ */ React__default.createElement("div", { className: classes, onClick: handleClick2, ref: root2, ...rest }, /* @__PURE__ */ React__default.createElement("div", null, !exceeded ? content : null, exceeded && !expanded ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, (_a2 = ellipsis.current) == null ? void 0 : _a2.leading, expandText ? /* @__PURE__ */ React__default.createElement(
22591
+ return /* @__PURE__ */ React__default.createElement("div", { className: classes, onClick: handleClick2, ref: root2, ...rest }, /* @__PURE__ */ React__default.createElement("div", null, !exceeded ? content : null, exceeded && !expanded ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, (_a = ellipsis.current) == null ? void 0 : _a.leading, expandText ? /* @__PURE__ */ React__default.createElement(
22612
22592
  "span",
22613
22593
  {
22614
22594
  className: "nut-ellipsis-text",
@@ -22896,7 +22876,7 @@ const Swiper = React__default.forwardRef((props, ref) => {
22896
22876
  isEmit = false,
22897
22877
  movingStatus = false
22898
22878
  }) => {
22899
- var _a2;
22879
+ var _a;
22900
22880
  if (swiperItemCount <= 1)
22901
22881
  return;
22902
22882
  const targetActive = getActive(pace);
@@ -22913,7 +22893,7 @@ const Swiper = React__default.forwardRef((props, ref) => {
22913
22893
  setChildOffset(childOffset);
22914
22894
  }
22915
22895
  if (isEmit && active !== targetActive) {
22916
- (_a2 = props.onChange) == null ? void 0 : _a2.call(props, (targetActive + swiperItemCount) % swiperItemCount);
22896
+ (_a = props.onChange) == null ? void 0 : _a.call(props, (targetActive + swiperItemCount) % swiperItemCount);
22917
22897
  }
22918
22898
  active = targetActive;
22919
22899
  setActive(targetActive);
@@ -23074,13 +23054,13 @@ const Swiper = React__default.forwardRef((props, ref) => {
23074
23054
  { name: "touchend", e: onTouchEnd }
23075
23055
  ];
23076
23056
  events.forEach((item) => {
23077
- var _a2;
23078
- (_a2 = container.current) == null ? void 0 : _a2.addEventListener(item.name, item.e, false);
23057
+ var _a;
23058
+ (_a = container.current) == null ? void 0 : _a.addEventListener(item.name, item.e, false);
23079
23059
  });
23080
23060
  return () => {
23081
23061
  events.forEach((item) => {
23082
- var _a2;
23083
- (_a2 = container.current) == null ? void 0 : _a2.removeEventListener(item.name, item.e, false);
23062
+ var _a;
23063
+ (_a = container.current) == null ? void 0 : _a.removeEventListener(item.name, item.e, false);
23084
23064
  });
23085
23065
  };
23086
23066
  });
@@ -23196,8 +23176,8 @@ const ImagePreview = (props) => {
23196
23176
  defaultValue,
23197
23177
  finalValue: defaultValue,
23198
23178
  onChange: (val) => {
23199
- var _a2;
23200
- (_a2 = props.onChange) == null ? void 0 : _a2.call(props, val);
23179
+ var _a;
23180
+ (_a = props.onChange) == null ? void 0 : _a.call(props, val);
23201
23181
  }
23202
23182
  });
23203
23183
  const [showPop, setShowPop] = useState(visible);
@@ -23308,9 +23288,9 @@ const ImagePreview = (props) => {
23308
23288
  );
23309
23289
  };
23310
23290
  const slideChangeEnd = (page) => {
23311
- var _a2;
23291
+ var _a;
23312
23292
  setActive(page + 1);
23313
- (_a2 = props.onChange) == null ? void 0 : _a2.call(props, page + 1);
23293
+ (_a = props.onChange) == null ? void 0 : _a.call(props, page + 1);
23314
23294
  };
23315
23295
  const onCloseInner = () => {
23316
23296
  setShowPop(false);
@@ -23609,8 +23589,8 @@ const Step = (props) => {
23609
23589
  return index === +parent.propSteps.value ? "process" : "wait";
23610
23590
  };
23611
23591
  const handleClickStep = () => {
23612
- var _a2, _b;
23613
- ((_a2 = parent.propSteps) == null ? void 0 : _a2.onStepClick) && ((_b = parent.propSteps) == null ? void 0 : _b.onStepClick(value));
23592
+ var _a, _b;
23593
+ ((_a = parent.propSteps) == null ? void 0 : _a.onStepClick) && ((_b = parent.propSteps) == null ? void 0 : _b.onStepClick(value));
23614
23594
  };
23615
23595
  const classPrefix2 = `nut-step`;
23616
23596
  const classes = classNames(
@@ -24327,8 +24307,8 @@ const VirtualList = (props) => {
24327
24307
  setListTotalSize(totalSize);
24328
24308
  }, [list, itemHeight, horizontal]);
24329
24309
  const getElement = useCallback(() => {
24330
- var _a2;
24331
- return ((_a2 = scrollRef.current) == null ? void 0 : _a2.parentElement) || document.body;
24310
+ var _a;
24311
+ return ((_a = scrollRef.current) == null ? void 0 : _a.parentElement) || document.body;
24332
24312
  }, []);
24333
24313
  useEffect(() => {
24334
24314
  if (containerHeight)
@@ -24505,8 +24485,8 @@ const InternalBarrage = (props, ref) => {
24505
24485
  barrageCWidth.current = barrageBody.current.offsetWidth;
24506
24486
  }
24507
24487
  setTimeout(() => {
24508
- var _a2;
24509
- (_a2 = barrageBody.current) == null ? void 0 : _a2.style.setProperty(
24488
+ var _a;
24489
+ (_a = barrageBody.current) == null ? void 0 : _a.style.setProperty(
24510
24490
  "--move-distance",
24511
24491
  `-${barrageCWidth.current}px`
24512
24492
  );
@@ -24755,8 +24735,8 @@ const TimeSelect = (props) => {
24755
24735
  ];
24756
24736
  }
24757
24737
  newActiveTime = newActiveTime.filter((item) => {
24758
- var _a2;
24759
- return ((_a2 = item[optionKey.childrenKey]) == null ? void 0 : _a2.length) > 0;
24738
+ var _a;
24739
+ return ((_a = item[optionKey.childrenKey]) == null ? void 0 : _a.length) > 0;
24760
24740
  });
24761
24741
  setActiveTime(newActiveTime);
24762
24742
  onTimeChange && onTimeChange(selectTime, newActiveTime);