@nutui/nutui-react 2.3.12-beta.0 → 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 (184) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/esm/ActionSheet.js +30 -76
  3. package/dist/esm/Address.js +80 -171
  4. package/dist/esm/Animate.js +21 -49
  5. package/dist/esm/AnimatingNumbers.js +47 -120
  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/Barrage.js +49 -83
  12. package/dist/esm/Calendar.js +27 -119
  13. package/dist/esm/CalendarCard.js +180 -291
  14. package/dist/esm/CalendarItem.js +253 -314
  15. package/dist/esm/Card.js +38 -72
  16. package/dist/esm/Cell.js +27 -62
  17. package/dist/esm/CellGroup.js +16 -45
  18. package/dist/esm/CheckboxGroup.js +49 -85
  19. package/dist/esm/CircleProgress.js +42 -93
  20. package/dist/esm/Col.js +17 -48
  21. package/dist/esm/Collapse.js +18 -49
  22. package/dist/esm/ConfigProvider.js +3 -2
  23. package/dist/esm/CountDown.js +62 -101
  24. package/dist/esm/DatePicker.js +87 -127
  25. package/dist/esm/Dialog.js +116 -196
  26. package/dist/esm/Divider.js +16 -36
  27. package/dist/esm/Drag.js +32 -76
  28. package/dist/esm/Elevator.js +93 -133
  29. package/dist/esm/Ellipsis.js +71 -92
  30. package/dist/esm/Empty.js +31 -70
  31. package/dist/esm/FixedNav.js +32 -81
  32. package/dist/esm/Form.js +28 -61
  33. package/dist/esm/Grid.js +27 -51
  34. package/dist/esm/Image.js +47 -102
  35. package/dist/esm/ImagePreview.js +82 -135
  36. package/dist/esm/InfiniteLoading.js +77 -159
  37. package/dist/esm/Input.js +57 -125
  38. package/dist/esm/InputNumber.js +66 -96
  39. package/dist/esm/Layout.js +4 -28
  40. package/dist/esm/Loading.js +13 -40
  41. package/dist/esm/Menu.js +51 -105
  42. package/dist/esm/NavBar.js +46 -85
  43. package/dist/esm/NoticeBar.js +153 -226
  44. package/dist/esm/Notify.js +87 -178
  45. package/dist/esm/NumberKeyboard.js +84 -150
  46. package/dist/esm/Pagination.js +58 -97
  47. package/dist/esm/Picker.js +215 -276
  48. package/dist/esm/Popover.js +111 -159
  49. package/dist/esm/Price.js +23 -60
  50. package/dist/esm/Progress.js +47 -77
  51. package/dist/esm/PullToRefresh.js +94 -201
  52. package/dist/esm/RadioGroup.js +23 -53
  53. package/dist/esm/Range.js +113 -177
  54. package/dist/esm/Rate.js +48 -95
  55. package/dist/esm/Row.js +19 -43
  56. package/dist/esm/SearchBar.js +52 -119
  57. package/dist/esm/ShortPassword.js +58 -106
  58. package/dist/esm/SideNavBar.js +34 -59
  59. package/dist/esm/SideNavBarItem.js +7 -36
  60. package/dist/esm/Signature.js +49 -84
  61. package/dist/esm/Skeleton.js +31 -68
  62. package/dist/esm/Space.js +7 -34
  63. package/dist/esm/Step.js +35 -64
  64. package/dist/esm/Steps.js +16 -40
  65. package/dist/esm/Sticky.js +64 -108
  66. package/dist/esm/SubSideNavBar.js +42 -71
  67. package/dist/esm/Swipe.js +79 -143
  68. package/dist/esm/Swiper.js +136 -183
  69. package/dist/esm/SwiperItem.js +13 -38
  70. package/dist/esm/Switch.js +20 -53
  71. package/dist/esm/TabPane.js +6 -30
  72. package/dist/esm/Tabbar.js +29 -59
  73. package/dist/esm/Table.js +92 -141
  74. package/dist/esm/Tag.js +30 -74
  75. package/dist/esm/TextArea.js +37 -82
  76. package/dist/esm/TimeDetail.js +20 -58
  77. package/dist/esm/TimeSelect.js +57 -95
  78. package/dist/esm/Toast.js +110 -197
  79. package/dist/esm/Tour.js +88 -132
  80. package/dist/esm/TrendArrow.js +32 -74
  81. package/dist/esm/Uploader.js +226 -346
  82. package/dist/esm/UserContext.js +1 -1
  83. package/dist/esm/Video.js +34 -67
  84. package/dist/esm/VirtualList.js +127 -160
  85. package/dist/esm/WaterMark.js +24 -68
  86. package/dist/esm/badge2.js +23 -53
  87. package/dist/esm/button2.js +30 -63
  88. package/dist/esm/can-use-dom.js +1 -1
  89. package/dist/esm/cascader2.js +307 -536
  90. package/dist/esm/checkbox2.js +59 -96
  91. package/dist/esm/collapseitem2.js +48 -86
  92. package/dist/esm/configprovider2.js +43 -1003
  93. package/dist/esm/context.js +1 -1
  94. package/dist/esm/context2.js +1 -1
  95. package/dist/esm/context3.js +1 -1
  96. package/dist/esm/context4.js +1 -1
  97. package/dist/esm/context5.js +8 -8
  98. package/dist/esm/date.js +88 -66
  99. package/dist/esm/formitem2.js +236 -1510
  100. package/dist/esm/get-scroll-parent.js +8 -10
  101. package/dist/esm/griditem2.js +34 -52
  102. package/dist/esm/index.js +5 -12
  103. package/dist/esm/indicator2.js +13 -42
  104. package/dist/esm/menuitem2.js +81 -124
  105. package/dist/esm/overlay2.js +39 -78
  106. package/dist/esm/pad-zero.js +3 -4
  107. package/dist/esm/popup2.js +79 -124
  108. package/dist/esm/px-check.js +2 -2
  109. package/dist/esm/radio2.js +48 -79
  110. package/dist/esm/raf.js +5 -3
  111. package/dist/esm/render.js +17 -54
  112. package/dist/esm/safearea2.js +3 -5
  113. package/dist/esm/supports-passive.js +3 -3
  114. package/dist/esm/tabbaritem2.js +42 -58
  115. package/dist/esm/tabs2.js +82 -120
  116. package/dist/esm/tslib.es6.js +47 -0
  117. package/dist/esm/types/src/packages/button/demos/h5/demo1.d.ts +3 -0
  118. package/dist/esm/types/src/packages/button/demos/h5/demo2.d.ts +3 -0
  119. package/dist/esm/types/src/packages/button/demos/h5/demo3.d.ts +3 -0
  120. package/dist/esm/types/src/packages/button/demos/h5/demo4.d.ts +3 -0
  121. package/dist/esm/types/src/packages/button/demos/h5/demo5.d.ts +3 -0
  122. package/dist/esm/types/src/packages/button/demos/h5/demo6.d.ts +3 -0
  123. package/dist/esm/types/src/packages/button/demos/h5/demo7.d.ts +3 -0
  124. package/dist/esm/types/src/packages/button/demos/h5/demo8.d.ts +3 -0
  125. package/dist/esm/types/src/packages/button/demos/h5/demo9.d.ts +3 -0
  126. package/dist/esm/types/src/packages/button/demos/taro/demo1.d.ts +3 -0
  127. package/dist/esm/types/src/packages/button/demos/taro/demo10.d.ts +3 -0
  128. package/dist/esm/types/src/packages/button/demos/taro/demo2.d.ts +3 -0
  129. package/dist/esm/types/src/packages/button/demos/taro/demo3.d.ts +3 -0
  130. package/dist/esm/types/src/packages/button/demos/taro/demo4.d.ts +3 -0
  131. package/dist/esm/types/src/packages/button/demos/taro/demo5.d.ts +3 -0
  132. package/dist/esm/types/src/packages/button/demos/taro/demo6.d.ts +3 -0
  133. package/dist/esm/types/src/packages/button/demos/taro/demo7.d.ts +3 -0
  134. package/dist/esm/types/src/packages/button/demos/taro/demo8.d.ts +3 -0
  135. package/dist/esm/types/src/packages/button/demos/taro/demo9.d.ts +3 -0
  136. package/dist/esm/types/src/packages/configprovider/configprovider.d.ts +1 -0
  137. package/dist/esm/types/src/packages/configprovider/configprovider.taro.d.ts +1 -0
  138. package/dist/esm/types/src/packages/configprovider/index.d.ts +2 -2
  139. package/dist/esm/types/src/packages/configprovider/index.taro.d.ts +2 -2
  140. package/dist/esm/types/src/packages/inputnumber/inputnumber.taro.d.ts +2 -0
  141. package/dist/esm/typings.js +1 -1
  142. package/dist/esm/use-click-away.js +9 -13
  143. package/dist/esm/use-client-rect.js +4 -4
  144. package/dist/esm/use-props-value.js +10 -15
  145. package/dist/esm/use-refs.js +5 -7
  146. package/dist/esm/use-touch.js +16 -20
  147. package/dist/locales/base.js +1 -1
  148. package/dist/locales/en-US.js +1 -1
  149. package/dist/locales/id-ID.js +1 -1
  150. package/dist/locales/tr-TR.js +1 -1
  151. package/dist/locales/zh-CN.js +1 -1
  152. package/dist/locales/zh-TW.js +1 -1
  153. package/dist/locales/zh-UG.js +1 -1
  154. package/dist/nutui.react.es.js +242 -284
  155. package/dist/nutui.react.umd.js +239 -281
  156. package/dist/style.mjs +1 -1
  157. package/dist/styles/variables-jmapp.scss +4 -0
  158. package/dist/types/packages/button/demos/h5/demo1.d.ts +3 -0
  159. package/dist/types/packages/button/demos/h5/demo2.d.ts +3 -0
  160. package/dist/types/packages/button/demos/h5/demo3.d.ts +3 -0
  161. package/dist/types/packages/button/demos/h5/demo4.d.ts +3 -0
  162. package/dist/types/packages/button/demos/h5/demo5.d.ts +3 -0
  163. package/dist/types/packages/button/demos/h5/demo6.d.ts +3 -0
  164. package/dist/types/packages/button/demos/h5/demo7.d.ts +3 -0
  165. package/dist/types/packages/button/demos/h5/demo8.d.ts +3 -0
  166. package/dist/types/packages/button/demos/h5/demo9.d.ts +3 -0
  167. package/dist/types/packages/button/demos/taro/demo1.d.ts +3 -0
  168. package/dist/types/packages/button/demos/taro/demo10.d.ts +3 -0
  169. package/dist/types/packages/button/demos/taro/demo2.d.ts +3 -0
  170. package/dist/types/packages/button/demos/taro/demo3.d.ts +3 -0
  171. package/dist/types/packages/button/demos/taro/demo4.d.ts +3 -0
  172. package/dist/types/packages/button/demos/taro/demo5.d.ts +3 -0
  173. package/dist/types/packages/button/demos/taro/demo6.d.ts +3 -0
  174. package/dist/types/packages/button/demos/taro/demo7.d.ts +3 -0
  175. package/dist/types/packages/button/demos/taro/demo8.d.ts +3 -0
  176. package/dist/types/packages/button/demos/taro/demo9.d.ts +3 -0
  177. package/dist/types/packages/configprovider/configprovider.d.ts +1 -0
  178. package/dist/types/packages/configprovider/configprovider.taro.d.ts +1 -0
  179. package/dist/types/packages/configprovider/index.d.ts +2 -2
  180. package/dist/types/packages/configprovider/index.taro.d.ts +2 -2
  181. package/dist/types/packages/empty/empty.d.ts +15 -3
  182. package/dist/types/packages/inputnumber/inputnumber.taro.d.ts +2 -0
  183. package/dist/types/packages/rate/rate.d.ts +1 -1
  184. package/package.json +5 -1
@@ -1,19 +1,12 @@
1
1
  (function(global2, factory) {
2
2
  typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react"), require("react-dom")) : typeof define === "function" && define.amd ? define(["exports", "react", "react-dom"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory((global2.nutui = global2.nutui || {}, global2.nutui.react = {}), global2.React, global2.ReactDOM));
3
3
  })(this, function(exports2, React, ReactDOM) {
4
- "use strict";var __defProp = Object.defineProperty;
5
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
- var __publicField = (obj, key, value) => {
7
- __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
8
- return value;
9
- };
10
- /*!
11
- * @nutui/nutui-react v2.3.12-beta.0 Thu Feb 29 2024 14:38:01 GMT+0800 (China Standard Time)
4
+ "use strict";/*!
5
+ * @nutui/nutui-react v2.3.12 Fri Mar 01 2024 16:09:25 GMT+0800 (China Standard Time)
12
6
  * (c) 2023 @jdf2e.
13
7
  * Released under the MIT License.
14
8
  */
15
9
 
16
- var _a;
17
10
  function _interopNamespaceDefault(e2) {
18
11
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
19
12
  if (e2) {
@@ -1714,8 +1707,8 @@ Check the top-level render call using <` + t2 + ">.");
1714
1707
  var reIsNative = RegExp(
1715
1708
  "^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
1716
1709
  );
1717
- 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;
1718
- var nativeGetSymbols = Object.getOwnPropertySymbols, nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : void 0, nativeKeys = overArg(Object.keys, Object);
1710
+ 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;
1711
+ var nativeGetSymbols = Object.getOwnPropertySymbols, nativeIsBuffer = Buffer ? Buffer.isBuffer : void 0, nativeKeys = overArg(Object.keys, Object);
1719
1712
  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");
1720
1713
  var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map2), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set2), weakMapCtorString = toSource(WeakMap2);
1721
1714
  var symbolProto2 = Symbol2 ? Symbol2.prototype : void 0, symbolValueOf = symbolProto2 ? symbolProto2.valueOf : void 0;
@@ -2047,7 +2040,7 @@ Check the top-level render call using <` + t2 + ">.");
2047
2040
  object2 = object2.buffer;
2048
2041
  other = other.buffer;
2049
2042
  case arrayBufferTag:
2050
- if (object2.byteLength != other.byteLength || !equalFunc(new Uint8Array2(object2), new Uint8Array2(other))) {
2043
+ if (object2.byteLength != other.byteLength || !equalFunc(new Uint8Array(object2), new Uint8Array(other))) {
2051
2044
  return false;
2052
2045
  }
2053
2046
  return true;
@@ -2404,11 +2397,23 @@ Check the top-level render call using <` + t2 + ">.");
2404
2397
  errorCanvasTips: "当前环境不支持Canvas"
2405
2398
  }
2406
2399
  };
2400
+ const inBrowser = typeof window !== "undefined";
2401
+ function requestAniFrame() {
2402
+ if (typeof window !== "undefined") {
2403
+ const _window = window;
2404
+ return _window.requestAnimationFrame || _window.webkitRequestAnimationFrame || function(callback) {
2405
+ _window.setTimeout(callback, 1e3 / 60);
2406
+ };
2407
+ }
2408
+ return (callback) => {
2409
+ setTimeout(callback, 1e3 / 60);
2410
+ };
2411
+ }
2412
+ const requestAniFrame$1 = requestAniFrame();
2407
2413
  const classPrefix$p = "nut-configprovider";
2408
2414
  const defaultConfigRef = {
2409
2415
  current: {
2410
- locale: zhCN,
2411
- direction: "ltr"
2416
+ locale: zhCN
2412
2417
  }
2413
2418
  };
2414
2419
  const getDefaultConfig = () => {
@@ -2425,16 +2430,24 @@ Check the top-level render call using <` + t2 + ">.");
2425
2430
  });
2426
2431
  return cssVars;
2427
2432
  }
2433
+ const useRtl = () => {
2434
+ const { direction } = useConfig();
2435
+ if (direction) {
2436
+ return direction === "rtl";
2437
+ }
2438
+ return inBrowser && document.dir === "rtl";
2439
+ };
2428
2440
  const ConfigProvider = (props) => {
2429
2441
  const { style, className, children, direction, ...config2 } = props;
2430
2442
  const mergedConfig = useMemo(
2431
2443
  () => {
2432
2444
  return {
2433
2445
  ...getDefaultConfig(),
2434
- ...config2
2446
+ ...config2,
2447
+ direction
2435
2448
  };
2436
2449
  },
2437
- [config2],
2450
+ [config2, direction],
2438
2451
  (prev, next) => prev.some((prevTheme, index) => {
2439
2452
  const nextTheme = next[index];
2440
2453
  return !isequal(prevTheme, nextTheme);
@@ -5127,18 +5140,6 @@ Check the top-level render call using <` + t2 + ">.");
5127
5140
  }
5128
5141
  );
5129
5142
  };
5130
- function requestAniFrame() {
5131
- if (typeof window !== "undefined") {
5132
- const _window = window;
5133
- return _window.requestAnimationFrame || _window.webkitRequestAnimationFrame || function(callback) {
5134
- _window.setTimeout(callback, 1e3 / 60);
5135
- };
5136
- }
5137
- return (callback) => {
5138
- setTimeout(callback, 1e3 / 60);
5139
- };
5140
- }
5141
- const requestAniFrame$1 = requestAniFrame();
5142
5143
  const defaultProps$1i = {
5143
5144
  ...ComponentDefaults,
5144
5145
  target: "",
@@ -5213,13 +5214,13 @@ Check the top-level render call using <` + t2 + ">.");
5213
5214
  window.cancelAnimationFrame = window.webkitCancelAnimationFrame;
5214
5215
  };
5215
5216
  function addEventListener() {
5216
- var _a2, _b;
5217
- (_a2 = scrollEl.current) == null ? void 0 : _a2.addEventListener("scroll", scrollListener, false);
5217
+ var _a, _b;
5218
+ (_a = scrollEl.current) == null ? void 0 : _a.addEventListener("scroll", scrollListener, false);
5218
5219
  (_b = scrollEl.current) == null ? void 0 : _b.addEventListener("resize", scrollListener, false);
5219
5220
  }
5220
5221
  function removeEventListener() {
5221
- var _a2, _b;
5222
- (_a2 = scrollEl.current) == null ? void 0 : _a2.removeEventListener("scroll", scrollListener, false);
5222
+ var _a, _b;
5223
+ (_a = scrollEl.current) == null ? void 0 : _a.removeEventListener("scroll", scrollListener, false);
5223
5224
  (_b = scrollEl.current) == null ? void 0 : _b.removeEventListener("resize", scrollListener, false);
5224
5225
  }
5225
5226
  const goTop = (e2) => {
@@ -11084,8 +11085,8 @@ Please add \`${key}Action\` when creating your handler.`);
11084
11085
  onClick && onClick({ title, value, isShow });
11085
11086
  };
11086
11087
  React.useEffect(() => {
11087
- var _a2, _b;
11088
- const childNodes = (_a2 = listRef.current) == null ? void 0 : _a2.children;
11088
+ var _a, _b;
11089
+ const childNodes = (_a = listRef.current) == null ? void 0 : _a.children;
11089
11090
  (_b = listRef.current) == null ? void 0 : _b.setAttribute("level", "1");
11090
11091
  childNodes && setListLevel(childNodes);
11091
11092
  }, [setListLevel]);
@@ -11133,7 +11134,7 @@ Please add \`${key}Action\` when creating your handler.`);
11133
11134
  color: ""
11134
11135
  };
11135
11136
  const Badge = (props) => {
11136
- var _a2;
11137
+ var _a;
11137
11138
  const { className, style, value, max, children, dot, top, right, color } = {
11138
11139
  ...defaultProps$1b,
11139
11140
  ...props
@@ -11165,7 +11166,7 @@ Please add \`${key}Action\` when creating your handler.`);
11165
11166
  `${classPrefix2}-content`,
11166
11167
  { [`${classPrefix2}-sup`]: isNumber() || isString() || dot },
11167
11168
  {
11168
- [`${classPrefix2}-one`]: typeof content() === "string" && ((_a2 = `${content()}`) == null ? void 0 : _a2.length) === 1
11169
+ [`${classPrefix2}-one`]: typeof content() === "string" && ((_a = `${content()}`) == null ? void 0 : _a.length) === 1
11169
11170
  }
11170
11171
  );
11171
11172
  const getStyle = () => {
@@ -11602,22 +11603,19 @@ Please add \`${key}Action\` when creating your handler.`);
11602
11603
  };
11603
11604
  class Tree {
11604
11605
  constructor(nodes, config2) {
11605
- __publicField(this, "nodes");
11606
- __publicField(this, "config");
11607
- // eslint-disable-next-line class-methods-use-this
11608
- __publicField(this, "isLeaf", (node, lazy) => {
11606
+ this.isLeaf = (node, lazy) => {
11609
11607
  const { leaf, children } = node;
11610
11608
  const hasChildren = Array.isArray(children) && Boolean(children.length);
11611
11609
  return leaf || !hasChildren && !lazy;
11612
- });
11613
- __publicField(this, "hasChildren", (node, lazy) => {
11610
+ };
11611
+ this.hasChildren = (node, lazy) => {
11614
11612
  const isLeaf = this.isLeaf(node, lazy);
11615
11613
  if (isLeaf) {
11616
11614
  return false;
11617
11615
  }
11618
11616
  const { children } = node;
11619
11617
  return Array.isArray(children) && Boolean(children.length);
11620
- });
11618
+ };
11621
11619
  this.config = {
11622
11620
  value: "value",
11623
11621
  text: "text",
@@ -11811,10 +11809,10 @@ Please add \`${key}Action\` when creating your handler.`);
11811
11809
  needToSync = [parent.value];
11812
11810
  state.initLoading = true;
11813
11811
  const last = await currentValue.slice(1).reduce(async (p, value2) => {
11814
- var _a2;
11812
+ var _a;
11815
11813
  const parent2 = await p;
11816
11814
  await invokeLazyLoad(parent2);
11817
- const node = (_a2 = parent2 == null ? void 0 : parent2.children) == null ? void 0 : _a2.find(
11815
+ const node = (_a = parent2 == null ? void 0 : parent2.children) == null ? void 0 : _a.find(
11818
11816
  (item) => item.value === value2
11819
11817
  );
11820
11818
  if (node) {
@@ -11850,8 +11848,8 @@ Please add \`${key}Action\` when creating your handler.`);
11850
11848
  let lazyLoadPromise = state.lazyLoadMap.get(node);
11851
11849
  if (!lazyLoadPromise) {
11852
11850
  lazyLoadPromise = new Promise((resolve) => {
11853
- var _a2, _b;
11854
- (_b = (_a2 = state.configs).onLoad) == null ? void 0 : _b.call(_a2, node, resolve);
11851
+ var _a, _b;
11852
+ (_b = (_a = state.configs).onLoad) == null ? void 0 : _b.call(_a, node, resolve);
11855
11853
  });
11856
11854
  state.lazyLoadMap.set(node, lazyLoadPromise);
11857
11855
  }
@@ -11921,9 +11919,9 @@ Please add \`${key}Action\` when creating your handler.`);
11921
11919
  setOptionsData(state.panes);
11922
11920
  };
11923
11921
  const renderItem = (pane, node, index) => {
11924
- var _a2;
11922
+ var _a;
11925
11923
  const classPrefix22 = "nut-cascader-item";
11926
- const checked = ((_a2 = pane.selectedNode) == null ? void 0 : _a2.value) === node.value;
11924
+ const checked = ((_a = pane.selectedNode) == null ? void 0 : _a.value) === node.value;
11927
11925
  const classes = classNames(
11928
11926
  {
11929
11927
  active: checked,
@@ -11969,7 +11967,7 @@ Please add \`${key}Action\` when creating your handler.`);
11969
11967
  value: tabvalue,
11970
11968
  title: () => {
11971
11969
  return optionsData.map((pane, index) => {
11972
- var _a2, _b;
11970
+ var _a, _b;
11973
11971
  return /* @__PURE__ */ React.createElement(
11974
11972
  "div",
11975
11973
  {
@@ -11980,15 +11978,15 @@ Please add \`${key}Action\` when creating your handler.`);
11980
11978
  className: `nut-tabs-titles-item ${tabvalue === pane.paneKey ? "nut-tabs-titles-item-active" : ""}`,
11981
11979
  key: pane.paneKey
11982
11980
  },
11983
- /* @__PURE__ */ React.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..."),
11981
+ /* @__PURE__ */ React.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..."),
11984
11982
  /* @__PURE__ */ React.createElement("span", { className: "nut-tabs-titles-item-line" })
11985
11983
  );
11986
11984
  });
11987
11985
  }
11988
11986
  },
11989
11987
  !state.initLoading && state.panes.length ? optionsData.map((pane) => {
11990
- var _a2;
11991
- return /* @__PURE__ */ React.createElement(Tabs.TabPane, { key: pane.paneKey, value: pane.paneKey }, /* @__PURE__ */ React.createElement("div", { className: classesPane }, (_a2 = pane.nodes) == null ? void 0 : _a2.map(
11988
+ var _a;
11989
+ return /* @__PURE__ */ React.createElement(Tabs.TabPane, { key: pane.paneKey, value: pane.paneKey }, /* @__PURE__ */ React.createElement("div", { className: classesPane }, (_a = pane.nodes) == null ? void 0 : _a.map(
11992
11990
  (node, index) => renderItem(pane, node, index)
11993
11991
  )));
11994
11992
  }) : /* @__PURE__ */ React.createElement(Tabs.TabPane, null, /* @__PURE__ */ React.createElement("div", { className: classesPane }))
@@ -13182,8 +13180,8 @@ Please add \`${key}Action\` when creating your handler.`);
13182
13180
  onDayClick && onDayClick(param);
13183
13181
  };
13184
13182
  const scrollToDate = (date2) => {
13185
- var _a2;
13186
- (_a2 = calendarRef.current) == null ? void 0 : _a2.scrollToDate(date2);
13183
+ var _a;
13184
+ (_a = calendarRef.current) == null ? void 0 : _a.scrollToDate(date2);
13187
13185
  };
13188
13186
  const yearMonthChange = (param) => {
13189
13187
  onPageChange && onPageChange(param);
@@ -14121,14 +14119,14 @@ Please add \`${key}Action\` when creating your handler.`);
14121
14119
  moving: moving.current
14122
14120
  }));
14123
14121
  React.useEffect(() => {
14124
- var _a2, _b, _c;
14122
+ var _a, _b, _c;
14125
14123
  const options22 = passiveSupported ? { passive: false } : false;
14126
- (_a2 = PickerPanelRef.current) == null ? void 0 : _a2.addEventListener("touchstart", touchStart, options22);
14124
+ (_a = PickerPanelRef.current) == null ? void 0 : _a.addEventListener("touchstart", touchStart, options22);
14127
14125
  (_b = PickerPanelRef.current) == null ? void 0 : _b.addEventListener("touchmove", touchMove, options22);
14128
14126
  (_c = PickerPanelRef.current) == null ? void 0 : _c.addEventListener("touchend", touchEnd, options22);
14129
14127
  return () => {
14130
- var _a3, _b2, _c2;
14131
- (_a3 = PickerPanelRef.current) == null ? void 0 : _a3.removeEventListener("touchstart", touchStart);
14128
+ var _a2, _b2, _c2;
14129
+ (_a2 = PickerPanelRef.current) == null ? void 0 : _a2.removeEventListener("touchstart", touchStart);
14132
14130
  (_b2 = PickerPanelRef.current) == null ? void 0 : _b2.removeEventListener("touchmove", touchMove);
14133
14131
  (_c2 = PickerPanelRef.current) == null ? void 0 : _c2.removeEventListener("touchend", touchEnd);
14134
14132
  };
@@ -14232,8 +14230,8 @@ Please add \`${key}Action\` when creating your handler.`);
14232
14230
  defaultValue: [...defaultValue],
14233
14231
  finalValue: [...defaultValue],
14234
14232
  onChange: (val) => {
14235
- var _a2;
14236
- (_a2 = props.onConfirm) == null ? void 0 : _a2.call(props, setSelectedOptions(), val);
14233
+ var _a;
14234
+ (_a = props.onConfirm) == null ? void 0 : _a.call(props, setSelectedOptions(), val);
14237
14235
  }
14238
14236
  });
14239
14237
  const [innerVisible, setInnerVisible] = usePropsValue({
@@ -14241,8 +14239,8 @@ Please add \`${key}Action\` when creating your handler.`);
14241
14239
  defaultValue: false,
14242
14240
  finalValue: false,
14243
14241
  onChange: (val) => {
14244
- var _a2;
14245
- (_a2 = props.onClose) == null ? void 0 : _a2.call(props, setSelectedOptions(), innerValue);
14242
+ var _a;
14243
+ (_a = props.onClose) == null ? void 0 : _a.call(props, setSelectedOptions(), innerValue);
14246
14244
  }
14247
14245
  });
14248
14246
  const [innerValue, setInnerValue] = React.useState(selectedValue);
@@ -14344,14 +14342,14 @@ Please add \`${key}Action\` when creating your handler.`);
14344
14342
  return options22;
14345
14343
  };
14346
14344
  const chooseItem = (columnOptions, columnIndex2) => {
14347
- var _a2, _b;
14345
+ var _a, _b;
14348
14346
  const values = [];
14349
14347
  const start2 = columnIndex2;
14350
14348
  if (columnOptions && Object.keys(columnOptions).length) {
14351
14349
  if (values[columnIndex2] !== columnOptions.value) {
14352
14350
  if (columnsType() === "cascade") {
14353
14351
  values[columnIndex2] = columnOptions.value || "";
14354
- while ((_a2 = columnOptions == null ? void 0 : columnOptions.children) == null ? void 0 : _a2[0]) {
14352
+ while ((_a = columnOptions == null ? void 0 : columnOptions.children) == null ? void 0 : _a[0]) {
14355
14353
  values[columnIndex2 + 1] = columnOptions.children[0].value;
14356
14354
  columnIndex2++;
14357
14355
  columnOptions = columnOptions.children[0];
@@ -14427,9 +14425,9 @@ Please add \`${key}Action\` when creating your handler.`);
14427
14425
  visible: innerVisible,
14428
14426
  position: "bottom",
14429
14427
  onOverlayClick: () => {
14430
- var _a2;
14428
+ var _a;
14431
14429
  if (closeOnOverlayClick) {
14432
- (_a2 = props.onCancel) == null ? void 0 : _a2.call(props);
14430
+ (_a = props.onCancel) == null ? void 0 : _a.call(props);
14433
14431
  setInnerVisible(false);
14434
14432
  }
14435
14433
  },
@@ -14620,7 +14618,7 @@ Please add \`${key}Action\` when creating your handler.`);
14620
14618
  }
14621
14619
  };
14622
14620
  const handlePickerChange = (selectedOptions, selectedValue, index) => {
14623
- var _a2;
14621
+ var _a;
14624
14622
  const rangeType = type2.toLocaleLowerCase();
14625
14623
  if (["date", "datetime", "datehour", "month-day", "year-month"].includes(
14626
14624
  rangeType
@@ -14659,7 +14657,7 @@ Please add \`${key}Action\` when creating your handler.`);
14659
14657
  } else if (rangeType === "datehour") {
14660
14658
  date2 = new Date(year, month, day, Number(formatDate[3]));
14661
14659
  }
14662
- const isEqual2 = ((_a2 = new Date(selectedDate)) == null ? void 0 : _a2.getTime()) === (date2 == null ? void 0 : date2.getTime());
14660
+ const isEqual2 = ((_a = new Date(selectedDate)) == null ? void 0 : _a.getTime()) === (date2 == null ? void 0 : date2.getTime());
14663
14661
  date2 && isDate(date2) && !isEqual2 && setSelectedDate(formatValue(date2));
14664
14662
  }
14665
14663
  props.onChange && props.onChange(selectedOptions, selectedValue, index);
@@ -14676,7 +14674,7 @@ Please add \`${key}Action\` when creating your handler.`);
14676
14674
  return { text: padMin + fatter, value: padMin };
14677
14675
  };
14678
14676
  const generateColumn = (min, max, val, type22, columnIndex) => {
14679
- var _a2;
14677
+ var _a;
14680
14678
  let cmin = min;
14681
14679
  const arr = [];
14682
14680
  let index = 0;
@@ -14691,7 +14689,7 @@ Please add \`${key}Action\` when creating your handler.`);
14691
14689
  index++;
14692
14690
  }
14693
14691
  }
14694
- pickerValue[columnIndex] = (_a2 = arr[index]) == null ? void 0 : _a2.value;
14692
+ pickerValue[columnIndex] = (_a = arr[index]) == null ? void 0 : _a.value;
14695
14693
  setPickerValue([...pickerValue]);
14696
14694
  if (props.filter && props.filter(type22, arr)) {
14697
14695
  return props.filter(type22, arr);
@@ -15812,21 +15810,13 @@ Please add \`${key}Action\` when creating your handler.`);
15812
15810
  const SECRET = "NUT_FORM_INTERNAL";
15813
15811
  class FormStore {
15814
15812
  constructor() {
15815
- // 初始化数据
15816
- __publicField(this, "initialValues", {});
15817
- __publicField(this, "updateList", []);
15818
- // 存放表单中所有的数据 eg. {password: "ddd",username: "123"}
15819
- __publicField(this, "store", {});
15820
- // 所有的组件实例
15821
- __publicField(this, "fieldEntities", []);
15822
- // 校验成功或失败的回调,onFinish、onFinishFailed
15823
- __publicField(this, "callbacks", {});
15824
- __publicField(this, "errors", {});
15825
- /**
15826
- * 注册组件实例
15827
- * @param field
15828
- */
15829
- __publicField(this, "registerField", (field) => {
15813
+ this.initialValues = {};
15814
+ this.updateList = [];
15815
+ this.store = {};
15816
+ this.fieldEntities = [];
15817
+ this.callbacks = {};
15818
+ this.errors = {};
15819
+ this.registerField = (field) => {
15830
15820
  this.fieldEntities.push(field);
15831
15821
  return () => {
15832
15822
  this.fieldEntities = this.fieldEntities.filter((item) => item !== field);
@@ -15834,19 +15824,12 @@ Please add \`${key}Action\` when creating your handler.`);
15834
15824
  delete this.store[field.props.name];
15835
15825
  }
15836
15826
  };
15837
- });
15838
- /**
15839
- * 获取 formItem 的值
15840
- * @param name
15841
- */
15842
- __publicField(this, "getFieldValue", (name) => {
15843
- var _a2;
15844
- return (_a2 = this.store) == null ? void 0 : _a2[name];
15845
- });
15846
- /**
15847
- * 获取全部字段
15848
- */
15849
- __publicField(this, "getFieldsValue", (nameList) => {
15827
+ };
15828
+ this.getFieldValue = (name) => {
15829
+ var _a;
15830
+ return (_a = this.store) == null ? void 0 : _a[name];
15831
+ };
15832
+ this.getFieldsValue = (nameList) => {
15850
15833
  if (typeof nameList === "boolean") {
15851
15834
  return JSON.parse(JSON.stringify(this.store));
15852
15835
  }
@@ -15855,23 +15838,14 @@ Please add \`${key}Action\` when creating your handler.`);
15855
15838
  fieldsValue[field] = this.getFieldValue(field);
15856
15839
  });
15857
15840
  return fieldsValue;
15858
- });
15859
- /**
15860
- * 设置 form 的初始值,之后在 reset 的时候使用
15861
- * @param values
15862
- * @param init
15863
- */
15864
- __publicField(this, "setInitialValues", (values, init) => {
15841
+ };
15842
+ this.setInitialValues = (values, init) => {
15865
15843
  if (init) {
15866
15844
  this.initialValues = values;
15867
15845
  this.store = values;
15868
15846
  }
15869
- });
15870
- /**
15871
- * 存储组件数据
15872
- * @param newStore { [name]: newValue }
15873
- */
15874
- __publicField(this, "setFieldsValue", (newStore) => {
15847
+ };
15848
+ this.setFieldsValue = (newStore) => {
15875
15849
  this.store = {
15876
15850
  ...this.store,
15877
15851
  ...newStore
@@ -15893,15 +15867,15 @@ Please add \`${key}Action\` when creating your handler.`);
15893
15867
  item.entity.onStoreChange("update");
15894
15868
  }
15895
15869
  });
15896
- });
15897
- __publicField(this, "setCallback", (callback) => {
15870
+ };
15871
+ this.setCallback = (callback) => {
15898
15872
  this.callbacks = {
15899
15873
  ...this.callbacks,
15900
15874
  ...callback
15901
15875
  };
15902
- });
15903
- __publicField(this, "validateFields", async (nameList) => {
15904
- var _a2;
15876
+ };
15877
+ this.validateFields = async (nameList) => {
15878
+ var _a;
15905
15879
  let filterEntitys = [];
15906
15880
  const errs = [];
15907
15881
  this.errors.length = 0;
@@ -15927,7 +15901,7 @@ Please add \`${key}Action\` when creating your handler.`);
15927
15901
  }
15928
15902
  const validator = new Schema(descriptor);
15929
15903
  try {
15930
- await validator.validate({ [name]: (_a2 = this.store) == null ? void 0 : _a2[name] });
15904
+ await validator.validate({ [name]: (_a = this.store) == null ? void 0 : _a[name] });
15931
15905
  } catch ({ errors }) {
15932
15906
  if (errors) {
15933
15907
  errs.push(...errors);
@@ -15941,25 +15915,24 @@ Please add \`${key}Action\` when creating your handler.`);
15941
15915
  entity.onStoreChange("validate");
15942
15916
  }
15943
15917
  return errs;
15944
- });
15945
- __publicField(this, "submit", async () => {
15946
- var _a2, _b, _c, _d;
15918
+ };
15919
+ this.submit = async () => {
15920
+ var _a, _b, _c, _d;
15947
15921
  const errors = await this.validateFields();
15948
15922
  if (errors.length === 0) {
15949
- (_b = (_a2 = this.callbacks).onFinish) == null ? void 0 : _b.call(_a2, this.store);
15923
+ (_b = (_a = this.callbacks).onFinish) == null ? void 0 : _b.call(_a, this.store);
15950
15924
  } else if (errors.length > 0) {
15951
15925
  (_d = (_c = this.callbacks).onFinishFailed) == null ? void 0 : _d.call(_c, this.store, errors);
15952
15926
  }
15953
- });
15954
- __publicField(this, "resetFields", () => {
15927
+ };
15928
+ this.resetFields = () => {
15955
15929
  this.errors.length = 0;
15956
15930
  this.store = this.initialValues;
15957
15931
  this.fieldEntities.forEach((entity) => {
15958
15932
  entity.onStoreChange("reset");
15959
15933
  });
15960
- });
15961
- // 监听事件
15962
- __publicField(this, "registerUpdate", (field, shouldUpdate) => {
15934
+ };
15935
+ this.registerUpdate = (field, shouldUpdate) => {
15963
15936
  this.updateList.push({
15964
15937
  entity: field,
15965
15938
  condition: shouldUpdate
@@ -15967,11 +15940,11 @@ Please add \`${key}Action\` when creating your handler.`);
15967
15940
  return () => {
15968
15941
  this.updateList = this.updateList.filter((i) => i.entity !== field);
15969
15942
  };
15970
- });
15971
- __publicField(this, "dispatch", ({ name }) => {
15943
+ };
15944
+ this.dispatch = ({ name }) => {
15972
15945
  this.validateFields([name]);
15973
- });
15974
- __publicField(this, "getInternal", (key) => {
15946
+ };
15947
+ this.getInternal = (key) => {
15975
15948
  if (key === SECRET) {
15976
15949
  return {
15977
15950
  registerField: this.registerField,
@@ -15983,8 +15956,8 @@ Please add \`${key}Action\` when creating your handler.`);
15983
15956
  registerUpdate: this.registerUpdate
15984
15957
  };
15985
15958
  }
15986
- });
15987
- __publicField(this, "getForm", () => {
15959
+ };
15960
+ this.getForm = () => {
15988
15961
  return {
15989
15962
  getFieldValue: this.getFieldValue,
15990
15963
  getFieldsValue: this.getFieldsValue,
@@ -15995,7 +15968,7 @@ Please add \`${key}Action\` when creating your handler.`);
15995
15968
  errors: this.errors,
15996
15969
  getInternal: this.getInternal
15997
15970
  };
15998
- });
15971
+ };
15999
15972
  this.callbacks = {
16000
15973
  onFinish: () => {
16001
15974
  },
@@ -16115,19 +16088,15 @@ Please add \`${key}Action\` when creating your handler.`);
16115
16088
  shouldUpdate: false,
16116
16089
  noStyle: false
16117
16090
  };
16118
- class FormItem extends React.Component {
16091
+ const _FormItem = class _FormItem extends React.Component {
16119
16092
  constructor(props) {
16120
16093
  super(props);
16121
- __publicField(this, "cancelRegister");
16122
- __publicField(this, "componentRef");
16123
- __publicField(this, "eventOff");
16124
- // children添加value属性和onChange事件
16125
- __publicField(this, "getControlled", (children) => {
16126
- var _a2;
16094
+ this.getControlled = (children) => {
16095
+ var _a;
16127
16096
  const { setFieldsValue, getFieldValue } = this.context;
16128
16097
  const { dispatch } = this.context.getInternal(SECRET);
16129
16098
  const { name = "" } = this.props;
16130
- if ((_a2 = children == null ? void 0 : children.props) == null ? void 0 : _a2.defaultValue) {
16099
+ if ((_a = children == null ? void 0 : children.props) == null ? void 0 : _a.defaultValue) {
16131
16100
  console.warn("通过 initialValue 设置初始值");
16132
16101
  }
16133
16102
  const fieldValue = getFieldValue(name);
@@ -16149,7 +16118,7 @@ Please add \`${key}Action\` when creating your handler.`);
16149
16118
  const { validateTrigger } = this.props;
16150
16119
  let validateTriggers = [this.props.trigger || "onChange"];
16151
16120
  if (validateTrigger) {
16152
- validateTriggers = typeof validateTrigger === "string" ? [...validateTriggers, validateTrigger] : [...validateTriggers, ...validateTrigger];
16121
+ validateTriggers = typeof validateTrigger === "string" ? [validateTrigger] : [...validateTrigger];
16153
16122
  validateTriggers.forEach((trigger) => {
16154
16123
  const originTrigger = controlled[trigger];
16155
16124
  controlled[trigger] = (...args) => {
@@ -16179,21 +16148,21 @@ Please add \`${key}Action\` when creating your handler.`);
16179
16148
  };
16180
16149
  }
16181
16150
  return controlled;
16182
- });
16183
- __publicField(this, "refresh", () => {
16151
+ };
16152
+ this.refresh = () => {
16184
16153
  this.setState(({ resetCount }) => ({
16185
16154
  resetCount: resetCount + 1
16186
16155
  }));
16187
- });
16188
- __publicField(this, "onStoreChange", (type2) => {
16156
+ };
16157
+ this.onStoreChange = (type2) => {
16189
16158
  if (type2 === "reset") {
16190
16159
  this.context.errors[this.props.name] = [];
16191
16160
  this.refresh();
16192
16161
  } else {
16193
16162
  this.forceUpdate();
16194
16163
  }
16195
- });
16196
- __publicField(this, "renderLayout", (childNode) => {
16164
+ };
16165
+ this.renderLayout = (childNode) => {
16197
16166
  const {
16198
16167
  label,
16199
16168
  name,
@@ -16228,7 +16197,7 @@ Please add \`${key}Action\` when creating your handler.`);
16228
16197
  item[0].message
16229
16198
  ))
16230
16199
  );
16231
- });
16200
+ };
16232
16201
  this.componentRef = React.createRef();
16233
16202
  this.state = {
16234
16203
  resetCount: 1
@@ -16261,9 +16230,10 @@ Please add \`${key}Action\` when creating your handler.`);
16261
16230
  }
16262
16231
  return /* @__PURE__ */ React.createElement(React.Fragment, { key: this.state.resetCount }, this.props.noStyle ? returnChildNode : this.renderLayout(returnChildNode));
16263
16232
  }
16264
- }
16265
- __publicField(FormItem, "defaultProps", defaultProps$W);
16266
- __publicField(FormItem, "contextType", Context);
16233
+ };
16234
+ _FormItem.defaultProps = defaultProps$W;
16235
+ _FormItem.contextType = Context;
16236
+ let FormItem = _FormItem;
16267
16237
  const InnerForm = Form;
16268
16238
  InnerForm.Item = FormItem;
16269
16239
  InnerForm.useForm = useForm;
@@ -16352,12 +16322,12 @@ Please add \`${key}Action\` when creating your handler.`);
16352
16322
  setValue("");
16353
16323
  },
16354
16324
  focus: () => {
16355
- var _a2;
16356
- (_a2 = inputRef.current) == null ? void 0 : _a2.focus();
16325
+ var _a;
16326
+ (_a = inputRef.current) == null ? void 0 : _a.focus();
16357
16327
  },
16358
16328
  blur: () => {
16359
- var _a2;
16360
- (_a2 = inputRef.current) == null ? void 0 : _a2.blur();
16329
+ var _a;
16330
+ (_a = inputRef.current) == null ? void 0 : _a.blur();
16361
16331
  },
16362
16332
  get nativeElement() {
16363
16333
  return inputRef.current;
@@ -16447,14 +16417,14 @@ Please add \`${key}Action\` when creating your handler.`);
16447
16417
  handleInput(e2.currentTarget.value);
16448
16418
  },
16449
16419
  onCompositionStart: (e2) => {
16450
- var _a2;
16420
+ var _a;
16451
16421
  composingRef.current = true;
16452
- (_a2 = props.onCompositionStart) == null ? void 0 : _a2.call(props, e2);
16422
+ (_a = props.onCompositionStart) == null ? void 0 : _a.call(props, e2);
16453
16423
  },
16454
16424
  onCompositionEnd: (e2) => {
16455
- var _a2;
16425
+ var _a;
16456
16426
  composingRef.current = false;
16457
- (_a2 = props.onCompositionEnd) == null ? void 0 : _a2.call(props, e2);
16427
+ (_a = props.onCompositionEnd) == null ? void 0 : _a.call(props, e2);
16458
16428
  }
16459
16429
  }
16460
16430
  ),
@@ -16521,14 +16491,15 @@ Please add \`${key}Action\` when creating your handler.`);
16521
16491
  const [focused, setFocused] = React.useState(false);
16522
16492
  const inputRef = React.useRef(null);
16523
16493
  React.useEffect(() => {
16524
- var _a2, _b;
16494
+ var _a, _b;
16525
16495
  if (focused) {
16526
- (_b = (_a2 = inputRef.current) == null ? void 0 : _a2.select) == null ? void 0 : _b.call(_a2);
16496
+ (_b = (_a = inputRef.current) == null ? void 0 : _a.select) == null ? void 0 : _b.call(_a);
16527
16497
  }
16528
16498
  }, [focused]);
16529
16499
  const [shadowValue, setShadowValue] = usePropsValue({
16530
16500
  value: typeof value === "string" ? parseFloat(value) : value,
16531
16501
  defaultValue: typeof defaultValue === "string" ? parseFloat(defaultValue) : defaultValue,
16502
+ finalValue: 0,
16532
16503
  onChange: (value2) => {
16533
16504
  }
16534
16505
  });
@@ -17468,6 +17439,7 @@ Please add \`${key}Action\` when creating your handler.`);
17468
17439
  marks: {}
17469
17440
  };
17470
17441
  const Range = (props) => {
17442
+ const rtl = useRtl();
17471
17443
  const {
17472
17444
  className,
17473
17445
  range: range2,
@@ -17580,15 +17552,17 @@ Please add \`${key}Action\` when creating your handler.`);
17580
17552
  transition: dragStatus ? "none" : void 0
17581
17553
  };
17582
17554
  }
17555
+ const dir = rtl ? "right" : "left";
17583
17556
  return {
17584
17557
  width: calcMainAxis(),
17585
- left: calcOffset(),
17558
+ [dir]: calcOffset(),
17586
17559
  transition: dragStatus ? "none" : void 0
17587
17560
  };
17588
17561
  };
17589
17562
  const marksStyle = (mark) => {
17563
+ const dir = rtl ? "right" : "left";
17590
17564
  let style = {
17591
- left: `${(mark - min) / scope() * 100}%`
17565
+ [dir]: `${(mark - min) / scope() * 100}%`
17592
17566
  };
17593
17567
  if (vertical) {
17594
17568
  style = {
@@ -17680,6 +17654,7 @@ Please add \`${key}Action\` when creating your handler.`);
17680
17654
  let delta = touch.deltaX.current;
17681
17655
  let total = rect.width;
17682
17656
  let diff = delta / total * scope();
17657
+ diff = rtl ? -diff : diff;
17683
17658
  if (vertical) {
17684
17659
  delta = touch.deltaY.current;
17685
17660
  total = rect.height;
@@ -17837,8 +17812,8 @@ Please add \`${key}Action\` when creating your handler.`);
17837
17812
  setScore(value2);
17838
17813
  };
17839
17814
  const getScoreByPosition = (x) => {
17840
- var _a2;
17841
- if ((_a2 = rateRects.current) == null ? void 0 : _a2.length) {
17815
+ var _a;
17816
+ if ((_a = rateRects.current) == null ? void 0 : _a.length) {
17842
17817
  for (let index = rateRects.current.length - 1; index >= 0; index--) {
17843
17818
  const item = rateRects.current[index];
17844
17819
  if (item && x > item.left) {
@@ -18518,22 +18493,14 @@ Please add \`${key}Action\` when creating your handler.`);
18518
18493
  TextArea.displayName = "NutTextArea";
18519
18494
  class UploadOptions {
18520
18495
  constructor() {
18521
- __publicField(this, "url", "");
18522
- __publicField(this, "name", "file");
18523
- __publicField(this, "fileType", "image");
18524
- __publicField(this, "formData");
18525
- __publicField(this, "sourceFile");
18526
- __publicField(this, "method", "post");
18527
- __publicField(this, "xhrState", 200);
18528
- __publicField(this, "timeout", 30 * 1e3);
18529
- __publicField(this, "headers", {});
18530
- __publicField(this, "withCredentials", false);
18531
- __publicField(this, "onStart");
18532
- __publicField(this, "taroFilePath");
18533
- __publicField(this, "onProgress");
18534
- __publicField(this, "onSuccess");
18535
- __publicField(this, "onFailure");
18536
- __publicField(this, "beforeXhrUpload");
18496
+ this.url = "";
18497
+ this.name = "file";
18498
+ this.fileType = "image";
18499
+ this.method = "post";
18500
+ this.xhrState = 200;
18501
+ this.timeout = 30 * 1e3;
18502
+ this.headers = {};
18503
+ this.withCredentials = false;
18537
18504
  }
18538
18505
  }
18539
18506
  const UPLOADING = "uploading";
@@ -18541,11 +18508,10 @@ Please add \`${key}Action\` when creating your handler.`);
18541
18508
  const ERROR = "error";
18542
18509
  class Upload {
18543
18510
  constructor(options2) {
18544
- __publicField(this, "options");
18545
18511
  this.options = options2;
18546
18512
  }
18547
18513
  upload() {
18548
- var _a2;
18514
+ var _a;
18549
18515
  const { options: options2 } = this;
18550
18516
  const xhr = new XMLHttpRequest();
18551
18517
  xhr.timeout = options2.timeout;
@@ -18553,16 +18519,16 @@ Please add \`${key}Action\` when creating your handler.`);
18553
18519
  xhr.upload.addEventListener(
18554
18520
  "progress",
18555
18521
  (e2) => {
18556
- var _a3;
18557
- (_a3 = options2.onProgress) == null ? void 0 : _a3.call(options2, e2, options2);
18522
+ var _a2;
18523
+ (_a2 = options2.onProgress) == null ? void 0 : _a2.call(options2, e2, options2);
18558
18524
  },
18559
18525
  false
18560
18526
  );
18561
18527
  xhr.onreadystatechange = () => {
18562
- var _a3, _b;
18528
+ var _a2, _b;
18563
18529
  if (xhr.readyState === 4) {
18564
18530
  if (xhr.status === options2.xhrState) {
18565
- (_a3 = options2.onSuccess) == null ? void 0 : _a3.call(options2, xhr.responseText, options2);
18531
+ (_a2 = options2.onSuccess) == null ? void 0 : _a2.call(options2, xhr.responseText, options2);
18566
18532
  } else {
18567
18533
  (_b = options2.onFailure) == null ? void 0 : _b.call(options2, xhr.responseText, options2);
18568
18534
  }
@@ -18573,7 +18539,7 @@ Please add \`${key}Action\` when creating your handler.`);
18573
18539
  for (const [key, value] of Object.entries(options2.headers)) {
18574
18540
  xhr.setRequestHeader(key, value);
18575
18541
  }
18576
- (_a2 = options2.onStart) == null ? void 0 : _a2.call(options2, options2);
18542
+ (_a = options2.onStart) == null ? void 0 : _a.call(options2, options2);
18577
18543
  if (options2.beforeXhrUpload) {
18578
18544
  options2.beforeXhrUpload(xhr, options2);
18579
18545
  } else {
@@ -18618,6 +18584,7 @@ Please add \`${key}Action\` when creating your handler.`);
18618
18584
  delay: 0
18619
18585
  };
18620
18586
  const Progress = (props) => {
18587
+ const rtl = useRtl();
18621
18588
  const {
18622
18589
  className,
18623
18590
  style,
@@ -18711,7 +18678,7 @@ Please add \`${key}Action\` when creating your handler.`);
18711
18678
  "div",
18712
18679
  {
18713
18680
  className: `${classPrefix2}-text`,
18714
- style: { left: `${displayPercent}%` }
18681
+ style: rtl ? { right: `${displayPercent}%` } : { left: `${displayPercent}%` }
18715
18682
  },
18716
18683
  children || /* @__PURE__ */ React.createElement(
18717
18684
  "div",
@@ -18745,7 +18712,7 @@ Please add \`${key}Action\` when creating your handler.`);
18745
18712
  return item.loadingIcon || /* @__PURE__ */ React.createElement(t$2, { className: "nut-icon-loading", color: "#fff" });
18746
18713
  };
18747
18714
  return /* @__PURE__ */ React.createElement(React.Fragment, null, fileList.length !== 0 && fileList.map((item, index) => {
18748
- var _a2;
18715
+ var _a;
18749
18716
  return /* @__PURE__ */ React.createElement(
18750
18717
  "div",
18751
18718
  {
@@ -18760,7 +18727,7 @@ Please add \`${key}Action\` when creating your handler.`);
18760
18727
  onClick: () => onDeleteItem(item, index)
18761
18728
  }
18762
18729
  ),
18763
- previewType === "picture" && !children && /* @__PURE__ */ React.createElement("div", { className: "nut-uploader-preview-img" }, item.status === "ready" ? /* @__PURE__ */ React.createElement("div", { className: "nut-uploader-preview-progress" }, /* @__PURE__ */ React.createElement("div", { className: "nut-uploader-preview-progress-msg" }, item.message)) : item.status !== "success" && /* @__PURE__ */ React.createElement("div", { className: "nut-uploader-preview-progress" }, renderIcon(item), /* @__PURE__ */ React.createElement("div", { className: "nut-uploader-preview-progress-msg" }, item.message)), ((_a2 = item.type) == null ? void 0 : _a2.includes("image")) ? /* @__PURE__ */ React.createElement(React.Fragment, null, item.url && /* @__PURE__ */ React.createElement(
18730
+ previewType === "picture" && !children && /* @__PURE__ */ React.createElement("div", { className: "nut-uploader-preview-img" }, item.status === "ready" ? /* @__PURE__ */ React.createElement("div", { className: "nut-uploader-preview-progress" }, /* @__PURE__ */ React.createElement("div", { className: "nut-uploader-preview-progress-msg" }, item.message)) : item.status !== "success" && /* @__PURE__ */ React.createElement("div", { className: "nut-uploader-preview-progress" }, renderIcon(item), /* @__PURE__ */ React.createElement("div", { className: "nut-uploader-preview-progress-msg" }, item.message)), ((_a = item.type) == null ? void 0 : _a.includes("image")) ? /* @__PURE__ */ React.createElement(React.Fragment, null, item.url && /* @__PURE__ */ React.createElement(
18764
18731
  "img",
18765
18732
  {
18766
18733
  className: "nut-uploader-preview-img-c",
@@ -18814,18 +18781,11 @@ Please add \`${key}Action\` when creating your handler.`);
18814
18781
  };
18815
18782
  class FileItem {
18816
18783
  constructor() {
18817
- __publicField(this, "status", "ready");
18818
- __publicField(this, "message", "准备中..");
18819
- __publicField(this, "uid", (/* @__PURE__ */ new Date()).getTime().toString());
18820
- __publicField(this, "name");
18821
- __publicField(this, "url");
18822
- __publicField(this, "type");
18823
- __publicField(this, "path");
18824
- __publicField(this, "percentage", 0);
18825
- __publicField(this, "formData", {});
18826
- __publicField(this, "responseText");
18827
- __publicField(this, "loadingIcon");
18828
- __publicField(this, "failIcon");
18784
+ this.status = "ready";
18785
+ this.message = "准备中..";
18786
+ this.uid = (/* @__PURE__ */ new Date()).getTime().toString();
18787
+ this.percentage = 0;
18788
+ this.formData = {};
18829
18789
  }
18830
18790
  }
18831
18791
  const defaultProps$G = {
@@ -18933,11 +18893,11 @@ Please add \`${key}Action\` when creating your handler.`);
18933
18893
  el.value = "";
18934
18894
  };
18935
18895
  const executeUpload = (fileItem, index) => {
18936
- var _a2, _b;
18896
+ var _a, _b;
18937
18897
  const uploadOption = new UploadOptions();
18938
18898
  uploadOption.url = url;
18939
18899
  for (const [key, value2] of Object.entries(data)) {
18940
- (_a2 = fileItem.formData) == null ? void 0 : _a2.append(key, value2);
18900
+ (_a = fileItem.formData) == null ? void 0 : _a.append(key, value2);
18941
18901
  }
18942
18902
  uploadOption.formData = fileItem.formData;
18943
18903
  uploadOption.timeout = timeout * 1;
@@ -19024,7 +18984,7 @@ Please add \`${key}Action\` when creating your handler.`);
19024
18984
  };
19025
18985
  const readFile = (files) => {
19026
18986
  files.forEach((file, index) => {
19027
- var _a2;
18987
+ var _a;
19028
18988
  const formData = new FormData();
19029
18989
  formData.append(name, file);
19030
18990
  const fileItem = new FileItem();
@@ -19035,7 +18995,7 @@ Please add \`${key}Action\` when creating your handler.`);
19035
18995
  fileItem.uid = file.lastModified + fileItem.uid;
19036
18996
  fileItem.message = autoUpload ? locale.uploader.readyUpload : locale.uploader.waitingUpload;
19037
18997
  executeUpload(fileItem, index);
19038
- if (preview && ((_a2 = file.type) == null ? void 0 : _a2.includes("image"))) {
18998
+ if (preview && ((_a = file.type) == null ? void 0 : _a.includes("image"))) {
19039
18999
  const reader = new FileReader();
19040
19000
  reader.onload = (event) => {
19041
19001
  fileItem.url = event.target.result;
@@ -19273,8 +19233,8 @@ Please add \`${key}Action\` when creating your handler.`);
19273
19233
  }
19274
19234
  async function concurrentUnmount(container) {
19275
19235
  return Promise.resolve().then(() => {
19276
- var _a2;
19277
- (_a2 = container[MARK]) == null ? void 0 : _a2.unmount();
19236
+ var _a;
19237
+ (_a = container[MARK]) == null ? void 0 : _a.unmount();
19278
19238
  delete container[MARK];
19279
19239
  });
19280
19240
  }
@@ -19796,16 +19756,16 @@ Please add \`${key}Action\` when creating your handler.`);
19796
19756
  const distance = React.useRef(0);
19797
19757
  const classes = classNames(classPrefix$d, className);
19798
19758
  React.useEffect(() => {
19799
- var _a2;
19759
+ var _a;
19800
19760
  if (target && document.getElementById(target)) {
19801
19761
  scrollEl.current = document.getElementById(target);
19802
19762
  } else {
19803
19763
  scrollEl.current = window;
19804
19764
  }
19805
- (_a2 = scrollEl.current) == null ? void 0 : _a2.addEventListener("scroll", handleScroll, capture);
19765
+ (_a = scrollEl.current) == null ? void 0 : _a.addEventListener("scroll", handleScroll, capture);
19806
19766
  return () => {
19807
- var _a3;
19808
- (_a3 = scrollEl.current) == null ? void 0 : _a3.removeEventListener("scroll", handleScroll, capture);
19767
+ var _a2;
19768
+ (_a2 = scrollEl.current) == null ? void 0 : _a2.removeEventListener("scroll", handleScroll, capture);
19809
19769
  };
19810
19770
  }, [hasMore, isInfiniting, onLoadMore]);
19811
19771
  React.useEffect(() => {
@@ -20357,10 +20317,9 @@ Please add \`${key}Action\` when creating your handler.`);
20357
20317
  NoticeBar.defaultProps = defaultProps$z;
20358
20318
  NoticeBar.displayName = "NutNoticeBar";
20359
20319
  const classPrefix$c = "nut-notify";
20360
- let Notification$1 = (_a = class extends React__namespace.PureComponent {
20320
+ let Notification$1 = class Notification extends React__namespace.PureComponent {
20361
20321
  constructor(props) {
20362
20322
  super(props);
20363
- __publicField(this, "closeTimer");
20364
20323
  this.close = this.close.bind(this);
20365
20324
  this.startCloseTimer = this.startCloseTimer.bind(this);
20366
20325
  this.clearCloseTimer = this.clearCloseTimer.bind(this);
@@ -20433,7 +20392,7 @@ Please add \`${key}Action\` when creating your handler.`);
20433
20392
  )
20434
20393
  ));
20435
20394
  }
20436
- }, __publicField(_a, "newInstance"), _a);
20395
+ };
20437
20396
  Notification$1.newInstance = (properties, callback) => {
20438
20397
  const element = document.createElement("div");
20439
20398
  const id = properties.id ? properties.id : `${(/* @__PURE__ */ new Date()).getTime()}`;
@@ -20599,8 +20558,8 @@ Please add \`${key}Action\` when creating your handler.`);
20599
20558
  }
20600
20559
  useClickAway(
20601
20560
  () => {
20602
- var _a2;
20603
- (_a2 = props.onClick) == null ? void 0 : _a2.call(props);
20561
+ var _a;
20562
+ (_a = props.onClick) == null ? void 0 : _a.call(props);
20604
20563
  onClose == null ? void 0 : onClose();
20605
20564
  },
20606
20565
  targetSet,
@@ -20636,11 +20595,11 @@ Please add \`${key}Action\` when creating your handler.`);
20636
20595
  return `${prefixCls2} ${prefixCls2}-${direction} ${prefixCls2}-${location}`;
20637
20596
  };
20638
20597
  const getRootPosition = () => {
20639
- var _a2, _b;
20598
+ var _a, _b;
20640
20599
  const styles = {};
20641
20600
  if (!rootPosition)
20642
20601
  return {};
20643
- const contentWidth = (_a2 = popoverContentRef.current) == null ? void 0 : _a2.clientWidth;
20602
+ const contentWidth = (_a = popoverContentRef.current) == null ? void 0 : _a.clientWidth;
20644
20603
  const contentHeight = (_b = popoverContentRef.current) == null ? void 0 : _b.clientHeight;
20645
20604
  const { width, height, left, top, right } = rootPosition;
20646
20605
  const direction = location.split("-")[0];
@@ -20713,12 +20672,12 @@ Please add \`${key}Action\` when creating your handler.`);
20713
20672
  return styles;
20714
20673
  };
20715
20674
  const handleSelect = (item, index) => {
20716
- var _a2;
20675
+ var _a;
20717
20676
  if (!item.disabled) {
20718
20677
  onSelect == null ? void 0 : onSelect(item, index);
20719
20678
  }
20720
20679
  if (closeOnActionClick) {
20721
- (_a2 = props.onClick) == null ? void 0 : _a2.call(props);
20680
+ (_a = props.onClick) == null ? void 0 : _a.call(props);
20722
20681
  onClose == null ? void 0 : onClose();
20723
20682
  }
20724
20683
  };
@@ -20728,8 +20687,8 @@ Please add \`${key}Action\` when creating your handler.`);
20728
20687
  className: "nut-popover-wrapper",
20729
20688
  ref: popoverRef,
20730
20689
  onClick: () => {
20731
- var _a2;
20732
- (_a2 = props.onClick) == null ? void 0 : _a2.call(props);
20690
+ var _a;
20691
+ (_a = props.onClick) == null ? void 0 : _a.call(props);
20733
20692
  if (!visible) {
20734
20693
  onOpen == null ? void 0 : onOpen();
20735
20694
  } else {
@@ -20779,8 +20738,8 @@ Please add \`${key}Action\` when creating your handler.`);
20779
20738
  {
20780
20739
  className: "nut-popover-menu-item-action-icon",
20781
20740
  onClick: (e2) => {
20782
- var _a2, _b;
20783
- return (_b = (_a2 = item.action) == null ? void 0 : _a2.onClick) == null ? void 0 : _b.call(_a2, e2);
20741
+ var _a, _b;
20742
+ return (_b = (_a = item.action) == null ? void 0 : _a.onClick) == null ? void 0 : _b.call(_a, e2);
20784
20743
  }
20785
20744
  },
20786
20745
  item.action.icon
@@ -20857,8 +20816,8 @@ Please add \`${key}Action\` when creating your handler.`);
20857
20816
  const elementRef = React.useRef(null);
20858
20817
  const pullingRef = React.useRef(false);
20859
20818
  React.useEffect(() => {
20860
- var _a2;
20861
- (_a2 = elementRef.current) == null ? void 0 : _a2.addEventListener("touchmove", () => {
20819
+ var _a;
20820
+ (_a = elementRef.current) == null ? void 0 : _a.addEventListener("touchmove", () => {
20862
20821
  });
20863
20822
  }, []);
20864
20823
  async function doRefresh() {
@@ -20948,16 +20907,16 @@ Please add \`${key}Action\` when creating your handler.`);
20948
20907
  return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("i", { className: `${classPrefix2}-head-content-icons` }, (status2 === "pulling" || status2 === "complete") && /* @__PURE__ */ React.createElement(t$2, null), (status2 === "canRelease" || status2 === "refreshing") && /* @__PURE__ */ React.createElement(t$1, null)));
20949
20908
  };
20950
20909
  const renderStatusIcon = () => {
20951
- var _a2;
20910
+ var _a;
20952
20911
  if (props.renderIcon) {
20953
- return (_a2 = props.renderIcon) == null ? void 0 : _a2.call(props, status);
20912
+ return (_a = props.renderIcon) == null ? void 0 : _a.call(props, status);
20954
20913
  }
20955
20914
  return renderIcons(status);
20956
20915
  };
20957
20916
  const renderStatusText = () => {
20958
- var _a2;
20917
+ var _a;
20959
20918
  if (props.renderText) {
20960
- return (_a2 = props.renderText) == null ? void 0 : _a2.call(props, status);
20919
+ return (_a = props.renderText) == null ? void 0 : _a.call(props, status);
20961
20920
  }
20962
20921
  if (status === "pulling")
20963
20922
  return props.pullingText;
@@ -21027,7 +20986,7 @@ Please add \`${key}Action\` when creating your handler.`);
21027
20986
  };
21028
20987
  const classPrefix$9 = `nut-avatar`;
21029
20988
  const Avatar = (props) => {
21030
- var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
20989
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
21031
20990
  const {
21032
20991
  children,
21033
20992
  size,
@@ -21054,7 +21013,7 @@ Please add \`${key}Action\` when creating your handler.`);
21054
21013
  const parent = React.useContext(AvatarContext);
21055
21014
  const sizeValue = ["large", "normal", "small"];
21056
21015
  const classes = classNames({
21057
- [`nut-avatar-${((_a2 = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _a2.size) || size || "normal"}`]: true,
21016
+ [`nut-avatar-${((_a = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _a.size) || size || "normal"}`]: true,
21058
21017
  [`nut-avatar-${((_b = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _b.shape) || shape}`]: true
21059
21018
  });
21060
21019
  const cls = classNames(classPrefix$9, classes, className);
@@ -21072,20 +21031,20 @@ Please add \`${key}Action\` when creating your handler.`);
21072
21031
  color: `${(_g = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _g.maxColor}`
21073
21032
  };
21074
21033
  React.useEffect(() => {
21075
- var _a3;
21076
- const avatarChildren = (_a3 = parent == null ? void 0 : parent.avatarGroupRef) == null ? void 0 : _a3.current.children;
21034
+ var _a2;
21035
+ const avatarChildren = (_a2 = parent == null ? void 0 : parent.avatarGroupRef) == null ? void 0 : _a2.current.children;
21077
21036
  if (avatarChildren) {
21078
21037
  avatarLength(avatarChildren);
21079
21038
  }
21080
21039
  }, []);
21081
21040
  const avatarLength = (children2) => {
21082
- var _a3, _b2, _c2;
21041
+ var _a2, _b2, _c2;
21083
21042
  for (let i = 0; i < children2.length; i++) {
21084
21043
  if (children2[i] && children2[i].classList && children2[i].classList[0] === "nut-avatar") {
21085
21044
  children2[i].setAttribute("data-index", i + 1);
21086
21045
  }
21087
21046
  }
21088
- const index = Number((_b2 = (_a3 = avatarRef == null ? void 0 : avatarRef.current) == null ? void 0 : _a3.dataset) == null ? void 0 : _b2.index);
21047
+ const index = Number((_b2 = (_a2 = avatarRef == null ? void 0 : avatarRef.current) == null ? void 0 : _a2.dataset) == null ? void 0 : _b2.index);
21089
21048
  const maxCount = (_c2 = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _c2.max;
21090
21049
  setMaxSum(children2.length);
21091
21050
  setAvatarIndex(index);
@@ -21224,20 +21183,20 @@ Please add \`${key}Action\` when creating your handler.`);
21224
21183
  const leftWidth = actionWidth.left;
21225
21184
  const rightWidth = actionWidth.right;
21226
21185
  const onTouchStart = (event) => {
21227
- var _a2;
21186
+ var _a;
21228
21187
  if (!props.disabled) {
21229
21188
  startOffset.current = state.offset;
21230
21189
  touch.start(event);
21231
- (_a2 = props.onTouchStart) == null ? void 0 : _a2.call(props, event);
21190
+ (_a = props.onTouchStart) == null ? void 0 : _a.call(props, event);
21232
21191
  }
21233
21192
  };
21234
21193
  const onTouchMove = (event) => {
21235
- var _a2;
21194
+ var _a;
21236
21195
  if (props.disabled) {
21237
21196
  return;
21238
21197
  }
21239
21198
  touch.move(event);
21240
- (_a2 = props.onTouchMove) == null ? void 0 : _a2.call(props, event);
21199
+ (_a = props.onTouchMove) == null ? void 0 : _a.call(props, event);
21241
21200
  if (touch.isHorizontal()) {
21242
21201
  lockClick.current = true;
21243
21202
  const newState = { ...state, dragging: true };
@@ -21254,14 +21213,14 @@ Please add \`${key}Action\` when creating your handler.`);
21254
21213
  }
21255
21214
  };
21256
21215
  const onTouchEnd = (event) => {
21257
- var _a2;
21216
+ var _a;
21258
21217
  if (state.dragging) {
21259
21218
  setState((v) => ({ ...v, dragging: false }));
21260
21219
  toggle(state.offset > 0 ? "left" : "right");
21261
21220
  setTimeout(() => {
21262
21221
  lockClick.current = false;
21263
21222
  }, 0);
21264
- (_a2 = props.onTouchEnd) == null ? void 0 : _a2.call(props, event);
21223
+ (_a = props.onTouchEnd) == null ? void 0 : _a.call(props, event);
21265
21224
  }
21266
21225
  };
21267
21226
  const toggle = (side) => {
@@ -21276,18 +21235,18 @@ Please add \`${key}Action\` when creating your handler.`);
21276
21235
  }
21277
21236
  };
21278
21237
  const open = (side) => {
21279
- var _a2;
21238
+ var _a;
21280
21239
  opened.current = true;
21281
21240
  const offset = side === "left" ? leftWidth : -rightWidth;
21282
21241
  const name = props.name;
21283
- (_a2 = props.onOpen) == null ? void 0 : _a2.call(props, { name, position: side });
21242
+ (_a = props.onOpen) == null ? void 0 : _a.call(props, { name, position: side });
21284
21243
  setState((v) => ({ ...v, offset: Number(offset) || 0 }));
21285
21244
  };
21286
21245
  const close = (position) => {
21287
- var _a2;
21246
+ var _a;
21288
21247
  if (opened.current) {
21289
21248
  opened.current = false;
21290
- (_a2 = props.onClose) == null ? void 0 : _a2.call(props, {
21249
+ (_a = props.onClose) == null ? void 0 : _a.call(props, {
21291
21250
  name: props.name,
21292
21251
  position: position || "left"
21293
21252
  });
@@ -21381,7 +21340,6 @@ Please add \`${key}Action\` when creating your handler.`);
21381
21340
  class Notification extends React__namespace.PureComponent {
21382
21341
  constructor(props) {
21383
21342
  super(props);
21384
- __publicField(this, "closeTimer");
21385
21343
  this.close = this.close.bind(this);
21386
21344
  this.startCloseTimer = this.startCloseTimer.bind(this);
21387
21345
  this.clearCloseTimer = this.clearCloseTimer.bind(this);
@@ -21495,7 +21453,6 @@ Please add \`${key}Action\` when creating your handler.`);
21495
21453
  ));
21496
21454
  }
21497
21455
  }
21498
- __publicField(Notification, "newInstance");
21499
21456
  Notification.newInstance = (properties, callback) => {
21500
21457
  const element = document.createElement("div");
21501
21458
  const id = properties.id ? properties.id : `${(/* @__PURE__ */ new Date()).getTime()}`;
@@ -21707,7 +21664,7 @@ Please add \`${key}Action\` when creating your handler.`);
21707
21664
  CountUp.defaultProps = defaultProps$r;
21708
21665
  CountUp.displayName = "NutCountUp";
21709
21666
  const defaultProps$q = {};
21710
- class AnimatingNumbers extends React.Component {
21667
+ const _AnimatingNumbers = class _AnimatingNumbers extends React.Component {
21711
21668
  constructor(props) {
21712
21669
  super(props);
21713
21670
  this.state = {};
@@ -21715,10 +21672,11 @@ Please add \`${key}Action\` when creating your handler.`);
21715
21672
  render() {
21716
21673
  return /* @__PURE__ */ React.createElement("div", { className: "nut-animatingnumbers" });
21717
21674
  }
21718
- }
21719
- __publicField(AnimatingNumbers, "defaultProps", defaultProps$q);
21720
- __publicField(AnimatingNumbers, "displayName", "NutAnimatingNumbers");
21721
- __publicField(AnimatingNumbers, "CountUp", CountUp);
21675
+ };
21676
+ _AnimatingNumbers.defaultProps = defaultProps$q;
21677
+ _AnimatingNumbers.displayName = "NutAnimatingNumbers";
21678
+ _AnimatingNumbers.CountUp = CountUp;
21679
+ let AnimatingNumbers = _AnimatingNumbers;
21722
21680
  AnimatingNumbers.CountUp = CountUp;
21723
21681
  const defaultProps$p = {
21724
21682
  ...ComponentDefaults,
@@ -21981,7 +21939,7 @@ Please add \`${key}Action\` when creating your handler.`);
21981
21939
  };
21982
21940
  const classPrefix$6 = `nut-circleprogress`;
21983
21941
  const CircleProgress = (props) => {
21984
- var _a2;
21942
+ var _a;
21985
21943
  const {
21986
21944
  children,
21987
21945
  percent,
@@ -22040,7 +21998,7 @@ Please add \`${key}Action\` when creating your handler.`);
22040
21998
  });
22041
21999
  return stopArr;
22042
22000
  };
22043
- return /* @__PURE__ */ React.createElement("div", { className: classes, style: styles, ...restProps }, /* @__PURE__ */ React.createElement("svg", { viewBox: "0 0 100 100" }, /* @__PURE__ */ React.createElement("defs", null, /* @__PURE__ */ React.createElement("linearGradient", { id: refRandomId, x1: "100%", y1: "0%", x2: "0%", y2: "0%" }, (_a2 = stop2()) == null ? void 0 : _a2.map((item, index) => {
22001
+ return /* @__PURE__ */ React.createElement("div", { className: classes, style: styles, ...restProps }, /* @__PURE__ */ React.createElement("svg", { viewBox: "0 0 100 100" }, /* @__PURE__ */ React.createElement("defs", null, /* @__PURE__ */ React.createElement("linearGradient", { id: refRandomId, x1: "100%", y1: "0%", x2: "0%", y2: "0%" }, (_a = stop2()) == null ? void 0 : _a.map((item, index) => {
22044
22002
  return /* @__PURE__ */ React.createElement("stop", { key: index, offset: item.key, stopColor: item.value });
22045
22003
  }))), /* @__PURE__ */ React.createElement(
22046
22004
  "path",
@@ -22126,8 +22084,8 @@ Please add \`${key}Action\` when creating your handler.`);
22126
22084
  }
22127
22085
  };
22128
22086
  const getOffsetHeight = () => {
22129
- var _a2;
22130
- const height = (_a2 = contentRef.current) == null ? void 0 : _a2.offsetHeight;
22087
+ var _a;
22088
+ const height = (_a = contentRef.current) == null ? void 0 : _a.offsetHeight;
22131
22089
  return height ? `${height}px` : "";
22132
22090
  };
22133
22091
  const toggle = () => {
@@ -22508,7 +22466,7 @@ Please add \`${key}Action\` when creating your handler.`);
22508
22466
  };
22509
22467
  const classPrefix$5 = `nut-ellipsis`;
22510
22468
  const Ellipsis = (props) => {
22511
- var _a2, _b;
22469
+ var _a, _b;
22512
22470
  const {
22513
22471
  children,
22514
22472
  content,
@@ -22648,7 +22606,7 @@ Please add \`${key}Action\` when creating your handler.`);
22648
22606
  const handleClick2 = () => {
22649
22607
  onClick && onClick();
22650
22608
  };
22651
- return /* @__PURE__ */ React.createElement("div", { className: classes, onClick: handleClick2, ref: root2, ...rest }, /* @__PURE__ */ React.createElement("div", null, !exceeded ? content : null, exceeded && !expanded ? /* @__PURE__ */ React.createElement(React.Fragment, null, (_a2 = ellipsis.current) == null ? void 0 : _a2.leading, expandText ? /* @__PURE__ */ React.createElement(
22609
+ return /* @__PURE__ */ React.createElement("div", { className: classes, onClick: handleClick2, ref: root2, ...rest }, /* @__PURE__ */ React.createElement("div", null, !exceeded ? content : null, exceeded && !expanded ? /* @__PURE__ */ React.createElement(React.Fragment, null, (_a = ellipsis.current) == null ? void 0 : _a.leading, expandText ? /* @__PURE__ */ React.createElement(
22652
22610
  "span",
22653
22611
  {
22654
22612
  className: "nut-ellipsis-text",
@@ -22936,7 +22894,7 @@ Please add \`${key}Action\` when creating your handler.`);
22936
22894
  isEmit = false,
22937
22895
  movingStatus = false
22938
22896
  }) => {
22939
- var _a2;
22897
+ var _a;
22940
22898
  if (swiperItemCount <= 1)
22941
22899
  return;
22942
22900
  const targetActive = getActive(pace);
@@ -22953,7 +22911,7 @@ Please add \`${key}Action\` when creating your handler.`);
22953
22911
  setChildOffset(childOffset);
22954
22912
  }
22955
22913
  if (isEmit && active !== targetActive) {
22956
- (_a2 = props.onChange) == null ? void 0 : _a2.call(props, (targetActive + swiperItemCount) % swiperItemCount);
22914
+ (_a = props.onChange) == null ? void 0 : _a.call(props, (targetActive + swiperItemCount) % swiperItemCount);
22957
22915
  }
22958
22916
  active = targetActive;
22959
22917
  setActive(targetActive);
@@ -23114,13 +23072,13 @@ Please add \`${key}Action\` when creating your handler.`);
23114
23072
  { name: "touchend", e: onTouchEnd }
23115
23073
  ];
23116
23074
  events.forEach((item) => {
23117
- var _a2;
23118
- (_a2 = container.current) == null ? void 0 : _a2.addEventListener(item.name, item.e, false);
23075
+ var _a;
23076
+ (_a = container.current) == null ? void 0 : _a.addEventListener(item.name, item.e, false);
23119
23077
  });
23120
23078
  return () => {
23121
23079
  events.forEach((item) => {
23122
- var _a2;
23123
- (_a2 = container.current) == null ? void 0 : _a2.removeEventListener(item.name, item.e, false);
23080
+ var _a;
23081
+ (_a = container.current) == null ? void 0 : _a.removeEventListener(item.name, item.e, false);
23124
23082
  });
23125
23083
  };
23126
23084
  });
@@ -23236,8 +23194,8 @@ Please add \`${key}Action\` when creating your handler.`);
23236
23194
  defaultValue,
23237
23195
  finalValue: defaultValue,
23238
23196
  onChange: (val) => {
23239
- var _a2;
23240
- (_a2 = props.onChange) == null ? void 0 : _a2.call(props, val);
23197
+ var _a;
23198
+ (_a = props.onChange) == null ? void 0 : _a.call(props, val);
23241
23199
  }
23242
23200
  });
23243
23201
  const [showPop, setShowPop] = React.useState(visible);
@@ -23348,9 +23306,9 @@ Please add \`${key}Action\` when creating your handler.`);
23348
23306
  );
23349
23307
  };
23350
23308
  const slideChangeEnd = (page) => {
23351
- var _a2;
23309
+ var _a;
23352
23310
  setActive(page + 1);
23353
- (_a2 = props.onChange) == null ? void 0 : _a2.call(props, page + 1);
23311
+ (_a = props.onChange) == null ? void 0 : _a.call(props, page + 1);
23354
23312
  };
23355
23313
  const onCloseInner = () => {
23356
23314
  setShowPop(false);
@@ -23649,8 +23607,8 @@ Please add \`${key}Action\` when creating your handler.`);
23649
23607
  return index === +parent.propSteps.value ? "process" : "wait";
23650
23608
  };
23651
23609
  const handleClickStep = () => {
23652
- var _a2, _b;
23653
- ((_a2 = parent.propSteps) == null ? void 0 : _a2.onStepClick) && ((_b = parent.propSteps) == null ? void 0 : _b.onStepClick(value));
23610
+ var _a, _b;
23611
+ ((_a = parent.propSteps) == null ? void 0 : _a.onStepClick) && ((_b = parent.propSteps) == null ? void 0 : _b.onStepClick(value));
23654
23612
  };
23655
23613
  const classPrefix2 = `nut-step`;
23656
23614
  const classes = classNames(
@@ -24367,8 +24325,8 @@ Please add \`${key}Action\` when creating your handler.`);
24367
24325
  setListTotalSize(totalSize);
24368
24326
  }, [list, itemHeight, horizontal]);
24369
24327
  const getElement = React.useCallback(() => {
24370
- var _a2;
24371
- return ((_a2 = scrollRef.current) == null ? void 0 : _a2.parentElement) || document.body;
24328
+ var _a;
24329
+ return ((_a = scrollRef.current) == null ? void 0 : _a.parentElement) || document.body;
24372
24330
  }, []);
24373
24331
  React.useEffect(() => {
24374
24332
  if (containerHeight)
@@ -24545,8 +24503,8 @@ Please add \`${key}Action\` when creating your handler.`);
24545
24503
  barrageCWidth.current = barrageBody.current.offsetWidth;
24546
24504
  }
24547
24505
  setTimeout(() => {
24548
- var _a2;
24549
- (_a2 = barrageBody.current) == null ? void 0 : _a2.style.setProperty(
24506
+ var _a;
24507
+ (_a = barrageBody.current) == null ? void 0 : _a.style.setProperty(
24550
24508
  "--move-distance",
24551
24509
  `-${barrageCWidth.current}px`
24552
24510
  );
@@ -24795,8 +24753,8 @@ Please add \`${key}Action\` when creating your handler.`);
24795
24753
  ];
24796
24754
  }
24797
24755
  newActiveTime = newActiveTime.filter((item) => {
24798
- var _a2;
24799
- return ((_a2 = item[optionKey.childrenKey]) == null ? void 0 : _a2.length) > 0;
24756
+ var _a;
24757
+ return ((_a = item[optionKey.childrenKey]) == null ? void 0 : _a.length) > 0;
24800
24758
  });
24801
24759
  setActiveTime(newActiveTime);
24802
24760
  onTimeChange && onTimeChange(selectTime, newActiveTime);