@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,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.12-beta.0 Thu Feb 29 2024 14:38:01 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";
@@ -1696,8 +1689,8 @@ lodash_isequal.exports;
1696
1689
  var reIsNative = RegExp(
1697
1690
  "^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
1698
1691
  );
1699
- 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;
1700
- 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);
1701
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");
1702
1695
  var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map2), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set2), weakMapCtorString = toSource(WeakMap2);
1703
1696
  var symbolProto2 = Symbol2 ? Symbol2.prototype : void 0, symbolValueOf = symbolProto2 ? symbolProto2.valueOf : void 0;
@@ -2029,7 +2022,7 @@ lodash_isequal.exports;
2029
2022
  object4 = object4.buffer;
2030
2023
  other = other.buffer;
2031
2024
  case arrayBufferTag:
2032
- 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))) {
2033
2026
  return false;
2034
2027
  }
2035
2028
  return true;
@@ -2386,11 +2379,23 @@ const zhCN = {
2386
2379
  errorCanvasTips: "当前环境不支持Canvas"
2387
2380
  }
2388
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();
2389
2395
  const classPrefix$p = "nut-configprovider";
2390
2396
  const defaultConfigRef = {
2391
2397
  current: {
2392
- locale: zhCN,
2393
- direction: "ltr"
2398
+ locale: zhCN
2394
2399
  }
2395
2400
  };
2396
2401
  const getDefaultConfig = () => {
@@ -2407,16 +2412,24 @@ function convertThemeVarsToCSSVars(themeVars) {
2407
2412
  });
2408
2413
  return cssVars;
2409
2414
  }
2415
+ const useRtl = () => {
2416
+ const { direction } = useConfig();
2417
+ if (direction) {
2418
+ return direction === "rtl";
2419
+ }
2420
+ return inBrowser && document.dir === "rtl";
2421
+ };
2410
2422
  const ConfigProvider = (props) => {
2411
2423
  const { style, className, children, direction, ...config2 } = props;
2412
2424
  const mergedConfig = useMemo(
2413
2425
  () => {
2414
2426
  return {
2415
2427
  ...getDefaultConfig(),
2416
- ...config2
2428
+ ...config2,
2429
+ direction
2417
2430
  };
2418
2431
  },
2419
- [config2],
2432
+ [config2, direction],
2420
2433
  (prev, next) => prev.some((prevTheme, index) => {
2421
2434
  const nextTheme = next[index];
2422
2435
  return !isequal(prevTheme, nextTheme);
@@ -5109,18 +5122,6 @@ const SafeArea = (props) => {
5109
5122
  }
5110
5123
  );
5111
5124
  };
5112
- function requestAniFrame() {
5113
- if (typeof window !== "undefined") {
5114
- const _window = window;
5115
- return _window.requestAnimationFrame || _window.webkitRequestAnimationFrame || function(callback) {
5116
- _window.setTimeout(callback, 1e3 / 60);
5117
- };
5118
- }
5119
- return (callback) => {
5120
- setTimeout(callback, 1e3 / 60);
5121
- };
5122
- }
5123
- const requestAniFrame$1 = requestAniFrame();
5124
5125
  const defaultProps$1i = {
5125
5126
  ...ComponentDefaults,
5126
5127
  target: "",
@@ -5195,13 +5196,13 @@ const BackTop = (props) => {
5195
5196
  window.cancelAnimationFrame = window.webkitCancelAnimationFrame;
5196
5197
  };
5197
5198
  function addEventListener() {
5198
- var _a2, _b;
5199
- (_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);
5200
5201
  (_b = scrollEl.current) == null ? void 0 : _b.addEventListener("resize", scrollListener, false);
5201
5202
  }
5202
5203
  function removeEventListener() {
5203
- var _a2, _b;
5204
- (_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);
5205
5206
  (_b = scrollEl.current) == null ? void 0 : _b.removeEventListener("resize", scrollListener, false);
5206
5207
  }
5207
5208
  const goTop = (e2) => {
@@ -11066,8 +11067,8 @@ const SubSideNavBar = (props) => {
11066
11067
  onClick && onClick({ title, value, isShow });
11067
11068
  };
11068
11069
  useEffect(() => {
11069
- var _a2, _b;
11070
- 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;
11071
11072
  (_b = listRef.current) == null ? void 0 : _b.setAttribute("level", "1");
11072
11073
  childNodes && setListLevel(childNodes);
11073
11074
  }, [setListLevel]);
@@ -11115,7 +11116,7 @@ const defaultProps$1b = {
11115
11116
  color: ""
11116
11117
  };
11117
11118
  const Badge = (props) => {
11118
- var _a2;
11119
+ var _a;
11119
11120
  const { className, style, value, max, children, dot, top, right, color } = {
11120
11121
  ...defaultProps$1b,
11121
11122
  ...props
@@ -11147,7 +11148,7 @@ const Badge = (props) => {
11147
11148
  `${classPrefix2}-content`,
11148
11149
  { [`${classPrefix2}-sup`]: isNumber() || isString() || dot },
11149
11150
  {
11150
- [`${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
11151
11152
  }
11152
11153
  );
11153
11154
  const getStyle = () => {
@@ -11584,22 +11585,19 @@ const convertListToOptions = (list, options2) => {
11584
11585
  };
11585
11586
  class Tree {
11586
11587
  constructor(nodes, config2) {
11587
- __publicField(this, "nodes");
11588
- __publicField(this, "config");
11589
- // eslint-disable-next-line class-methods-use-this
11590
- __publicField(this, "isLeaf", (node, lazy) => {
11588
+ this.isLeaf = (node, lazy) => {
11591
11589
  const { leaf, children } = node;
11592
11590
  const hasChildren = Array.isArray(children) && Boolean(children.length);
11593
11591
  return leaf || !hasChildren && !lazy;
11594
- });
11595
- __publicField(this, "hasChildren", (node, lazy) => {
11592
+ };
11593
+ this.hasChildren = (node, lazy) => {
11596
11594
  const isLeaf = this.isLeaf(node, lazy);
11597
11595
  if (isLeaf) {
11598
11596
  return false;
11599
11597
  }
11600
11598
  const { children } = node;
11601
11599
  return Array.isArray(children) && Boolean(children.length);
11602
- });
11600
+ };
11603
11601
  this.config = {
11604
11602
  value: "value",
11605
11603
  text: "text",
@@ -11793,10 +11791,10 @@ const InternalCascader = (props, ref) => {
11793
11791
  needToSync = [parent.value];
11794
11792
  state.initLoading = true;
11795
11793
  const last = await currentValue.slice(1).reduce(async (p, value2) => {
11796
- var _a2;
11794
+ var _a;
11797
11795
  const parent2 = await p;
11798
11796
  await invokeLazyLoad(parent2);
11799
- 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(
11800
11798
  (item) => item.value === value2
11801
11799
  );
11802
11800
  if (node) {
@@ -11832,8 +11830,8 @@ const InternalCascader = (props, ref) => {
11832
11830
  let lazyLoadPromise = state.lazyLoadMap.get(node);
11833
11831
  if (!lazyLoadPromise) {
11834
11832
  lazyLoadPromise = new Promise((resolve) => {
11835
- var _a2, _b;
11836
- (_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);
11837
11835
  });
11838
11836
  state.lazyLoadMap.set(node, lazyLoadPromise);
11839
11837
  }
@@ -11903,9 +11901,9 @@ const InternalCascader = (props, ref) => {
11903
11901
  setOptionsData(state.panes);
11904
11902
  };
11905
11903
  const renderItem = (pane, node, index) => {
11906
- var _a2;
11904
+ var _a;
11907
11905
  const classPrefix22 = "nut-cascader-item";
11908
- 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;
11909
11907
  const classes = classNames(
11910
11908
  {
11911
11909
  active: checked,
@@ -11951,7 +11949,7 @@ const InternalCascader = (props, ref) => {
11951
11949
  value: tabvalue,
11952
11950
  title: () => {
11953
11951
  return optionsData.map((pane, index) => {
11954
- var _a2, _b;
11952
+ var _a, _b;
11955
11953
  return /* @__PURE__ */ React__default.createElement(
11956
11954
  "div",
11957
11955
  {
@@ -11962,15 +11960,15 @@ const InternalCascader = (props, ref) => {
11962
11960
  className: `nut-tabs-titles-item ${tabvalue === pane.paneKey ? "nut-tabs-titles-item-active" : ""}`,
11963
11961
  key: pane.paneKey
11964
11962
  },
11965
- /* @__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..."),
11966
11964
  /* @__PURE__ */ React__default.createElement("span", { className: "nut-tabs-titles-item-line" })
11967
11965
  );
11968
11966
  });
11969
11967
  }
11970
11968
  },
11971
11969
  !state.initLoading && state.panes.length ? optionsData.map((pane) => {
11972
- var _a2;
11973
- 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(
11974
11972
  (node, index) => renderItem(pane, node, index)
11975
11973
  )));
11976
11974
  }) : /* @__PURE__ */ React__default.createElement(Tabs.TabPane, null, /* @__PURE__ */ React__default.createElement("div", { className: classesPane }))
@@ -13164,8 +13162,8 @@ const Calendar = React__default.forwardRef((props, ref) => {
13164
13162
  onDayClick && onDayClick(param);
13165
13163
  };
13166
13164
  const scrollToDate = (date4) => {
13167
- var _a2;
13168
- (_a2 = calendarRef.current) == null ? void 0 : _a2.scrollToDate(date4);
13165
+ var _a;
13166
+ (_a = calendarRef.current) == null ? void 0 : _a.scrollToDate(date4);
13169
13167
  };
13170
13168
  const yearMonthChange = (param) => {
13171
13169
  onPageChange && onPageChange(param);
@@ -14103,14 +14101,14 @@ const InternalPickerPanel = (props, ref) => {
14103
14101
  moving: moving.current
14104
14102
  }));
14105
14103
  useEffect(() => {
14106
- var _a2, _b, _c;
14104
+ var _a, _b, _c;
14107
14105
  const options22 = passiveSupported ? { passive: false } : false;
14108
- (_a2 = PickerPanelRef.current) == null ? void 0 : _a2.addEventListener("touchstart", touchStart, options22);
14106
+ (_a = PickerPanelRef.current) == null ? void 0 : _a.addEventListener("touchstart", touchStart, options22);
14109
14107
  (_b = PickerPanelRef.current) == null ? void 0 : _b.addEventListener("touchmove", touchMove, options22);
14110
14108
  (_c = PickerPanelRef.current) == null ? void 0 : _c.addEventListener("touchend", touchEnd, options22);
14111
14109
  return () => {
14112
- var _a3, _b2, _c2;
14113
- (_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);
14114
14112
  (_b2 = PickerPanelRef.current) == null ? void 0 : _b2.removeEventListener("touchmove", touchMove);
14115
14113
  (_c2 = PickerPanelRef.current) == null ? void 0 : _c2.removeEventListener("touchend", touchEnd);
14116
14114
  };
@@ -14214,8 +14212,8 @@ const InternalPicker = (props, ref) => {
14214
14212
  defaultValue: [...defaultValue],
14215
14213
  finalValue: [...defaultValue],
14216
14214
  onChange: (val) => {
14217
- var _a2;
14218
- (_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);
14219
14217
  }
14220
14218
  });
14221
14219
  const [innerVisible, setInnerVisible] = usePropsValue({
@@ -14223,8 +14221,8 @@ const InternalPicker = (props, ref) => {
14223
14221
  defaultValue: false,
14224
14222
  finalValue: false,
14225
14223
  onChange: (val) => {
14226
- var _a2;
14227
- (_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);
14228
14226
  }
14229
14227
  });
14230
14228
  const [innerValue, setInnerValue] = useState(selectedValue);
@@ -14326,14 +14324,14 @@ const InternalPicker = (props, ref) => {
14326
14324
  return options22;
14327
14325
  };
14328
14326
  const chooseItem = (columnOptions, columnIndex2) => {
14329
- var _a2, _b;
14327
+ var _a, _b;
14330
14328
  const values = [];
14331
14329
  const start2 = columnIndex2;
14332
14330
  if (columnOptions && Object.keys(columnOptions).length) {
14333
14331
  if (values[columnIndex2] !== columnOptions.value) {
14334
14332
  if (columnsType() === "cascade") {
14335
14333
  values[columnIndex2] = columnOptions.value || "";
14336
- 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]) {
14337
14335
  values[columnIndex2 + 1] = columnOptions.children[0].value;
14338
14336
  columnIndex2++;
14339
14337
  columnOptions = columnOptions.children[0];
@@ -14409,9 +14407,9 @@ const InternalPicker = (props, ref) => {
14409
14407
  visible: innerVisible,
14410
14408
  position: "bottom",
14411
14409
  onOverlayClick: () => {
14412
- var _a2;
14410
+ var _a;
14413
14411
  if (closeOnOverlayClick) {
14414
- (_a2 = props.onCancel) == null ? void 0 : _a2.call(props);
14412
+ (_a = props.onCancel) == null ? void 0 : _a.call(props);
14415
14413
  setInnerVisible(false);
14416
14414
  }
14417
14415
  },
@@ -14602,7 +14600,7 @@ const DatePicker = (props) => {
14602
14600
  }
14603
14601
  };
14604
14602
  const handlePickerChange = (selectedOptions, selectedValue, index) => {
14605
- var _a2;
14603
+ var _a;
14606
14604
  const rangeType = type4.toLocaleLowerCase();
14607
14605
  if (["date", "datetime", "datehour", "month-day", "year-month"].includes(
14608
14606
  rangeType
@@ -14641,7 +14639,7 @@ const DatePicker = (props) => {
14641
14639
  } else if (rangeType === "datehour") {
14642
14640
  date4 = new Date(year, month, day, Number(formatDate[3]));
14643
14641
  }
14644
- 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());
14645
14643
  date4 && isDate(date4) && !isEqual2 && setSelectedDate(formatValue(date4));
14646
14644
  }
14647
14645
  props.onChange && props.onChange(selectedOptions, selectedValue, index);
@@ -14658,7 +14656,7 @@ const DatePicker = (props) => {
14658
14656
  return { text: padMin + fatter, value: padMin };
14659
14657
  };
14660
14658
  const generateColumn = (min, max, val, type22, columnIndex) => {
14661
- var _a2;
14659
+ var _a;
14662
14660
  let cmin = min;
14663
14661
  const arr = [];
14664
14662
  let index = 0;
@@ -14673,7 +14671,7 @@ const DatePicker = (props) => {
14673
14671
  index++;
14674
14672
  }
14675
14673
  }
14676
- pickerValue[columnIndex] = (_a2 = arr[index]) == null ? void 0 : _a2.value;
14674
+ pickerValue[columnIndex] = (_a = arr[index]) == null ? void 0 : _a.value;
14677
14675
  setPickerValue([...pickerValue]);
14678
14676
  if (props.filter && props.filter(type22, arr)) {
14679
14677
  return props.filter(type22, arr);
@@ -15794,21 +15792,13 @@ Schema.validators = validators;
15794
15792
  const SECRET = "NUT_FORM_INTERNAL";
15795
15793
  class FormStore {
15796
15794
  constructor() {
15797
- // 初始化数据
15798
- __publicField(this, "initialValues", {});
15799
- __publicField(this, "updateList", []);
15800
- // 存放表单中所有的数据 eg. {password: "ddd",username: "123"}
15801
- __publicField(this, "store", {});
15802
- // 所有的组件实例
15803
- __publicField(this, "fieldEntities", []);
15804
- // 校验成功或失败的回调,onFinish、onFinishFailed
15805
- __publicField(this, "callbacks", {});
15806
- __publicField(this, "errors", {});
15807
- /**
15808
- * 注册组件实例
15809
- * @param field
15810
- */
15811
- __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) => {
15812
15802
  this.fieldEntities.push(field);
15813
15803
  return () => {
15814
15804
  this.fieldEntities = this.fieldEntities.filter((item) => item !== field);
@@ -15816,19 +15806,12 @@ class FormStore {
15816
15806
  delete this.store[field.props.name];
15817
15807
  }
15818
15808
  };
15819
- });
15820
- /**
15821
- * 获取 formItem 的值
15822
- * @param name
15823
- */
15824
- __publicField(this, "getFieldValue", (name) => {
15825
- var _a2;
15826
- return (_a2 = this.store) == null ? void 0 : _a2[name];
15827
- });
15828
- /**
15829
- * 获取全部字段
15830
- */
15831
- __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) => {
15832
15815
  if (typeof nameList === "boolean") {
15833
15816
  return JSON.parse(JSON.stringify(this.store));
15834
15817
  }
@@ -15837,23 +15820,14 @@ class FormStore {
15837
15820
  fieldsValue[field] = this.getFieldValue(field);
15838
15821
  });
15839
15822
  return fieldsValue;
15840
- });
15841
- /**
15842
- * 设置 form 的初始值,之后在 reset 的时候使用
15843
- * @param values
15844
- * @param init
15845
- */
15846
- __publicField(this, "setInitialValues", (values, init) => {
15823
+ };
15824
+ this.setInitialValues = (values, init) => {
15847
15825
  if (init) {
15848
15826
  this.initialValues = values;
15849
15827
  this.store = values;
15850
15828
  }
15851
- });
15852
- /**
15853
- * 存储组件数据
15854
- * @param newStore { [name]: newValue }
15855
- */
15856
- __publicField(this, "setFieldsValue", (newStore) => {
15829
+ };
15830
+ this.setFieldsValue = (newStore) => {
15857
15831
  this.store = {
15858
15832
  ...this.store,
15859
15833
  ...newStore
@@ -15875,15 +15849,15 @@ class FormStore {
15875
15849
  item.entity.onStoreChange("update");
15876
15850
  }
15877
15851
  });
15878
- });
15879
- __publicField(this, "setCallback", (callback) => {
15852
+ };
15853
+ this.setCallback = (callback) => {
15880
15854
  this.callbacks = {
15881
15855
  ...this.callbacks,
15882
15856
  ...callback
15883
15857
  };
15884
- });
15885
- __publicField(this, "validateFields", async (nameList) => {
15886
- var _a2;
15858
+ };
15859
+ this.validateFields = async (nameList) => {
15860
+ var _a;
15887
15861
  let filterEntitys = [];
15888
15862
  const errs = [];
15889
15863
  this.errors.length = 0;
@@ -15909,7 +15883,7 @@ class FormStore {
15909
15883
  }
15910
15884
  const validator = new Schema(descriptor);
15911
15885
  try {
15912
- 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] });
15913
15887
  } catch ({ errors }) {
15914
15888
  if (errors) {
15915
15889
  errs.push(...errors);
@@ -15923,25 +15897,24 @@ class FormStore {
15923
15897
  entity.onStoreChange("validate");
15924
15898
  }
15925
15899
  return errs;
15926
- });
15927
- __publicField(this, "submit", async () => {
15928
- var _a2, _b, _c, _d;
15900
+ };
15901
+ this.submit = async () => {
15902
+ var _a, _b, _c, _d;
15929
15903
  const errors = await this.validateFields();
15930
15904
  if (errors.length === 0) {
15931
- (_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);
15932
15906
  } else if (errors.length > 0) {
15933
15907
  (_d = (_c = this.callbacks).onFinishFailed) == null ? void 0 : _d.call(_c, this.store, errors);
15934
15908
  }
15935
- });
15936
- __publicField(this, "resetFields", () => {
15909
+ };
15910
+ this.resetFields = () => {
15937
15911
  this.errors.length = 0;
15938
15912
  this.store = this.initialValues;
15939
15913
  this.fieldEntities.forEach((entity) => {
15940
15914
  entity.onStoreChange("reset");
15941
15915
  });
15942
- });
15943
- // 监听事件
15944
- __publicField(this, "registerUpdate", (field, shouldUpdate) => {
15916
+ };
15917
+ this.registerUpdate = (field, shouldUpdate) => {
15945
15918
  this.updateList.push({
15946
15919
  entity: field,
15947
15920
  condition: shouldUpdate
@@ -15949,11 +15922,11 @@ class FormStore {
15949
15922
  return () => {
15950
15923
  this.updateList = this.updateList.filter((i) => i.entity !== field);
15951
15924
  };
15952
- });
15953
- __publicField(this, "dispatch", ({ name }) => {
15925
+ };
15926
+ this.dispatch = ({ name }) => {
15954
15927
  this.validateFields([name]);
15955
- });
15956
- __publicField(this, "getInternal", (key) => {
15928
+ };
15929
+ this.getInternal = (key) => {
15957
15930
  if (key === SECRET) {
15958
15931
  return {
15959
15932
  registerField: this.registerField,
@@ -15965,8 +15938,8 @@ class FormStore {
15965
15938
  registerUpdate: this.registerUpdate
15966
15939
  };
15967
15940
  }
15968
- });
15969
- __publicField(this, "getForm", () => {
15941
+ };
15942
+ this.getForm = () => {
15970
15943
  return {
15971
15944
  getFieldValue: this.getFieldValue,
15972
15945
  getFieldsValue: this.getFieldsValue,
@@ -15977,7 +15950,7 @@ class FormStore {
15977
15950
  errors: this.errors,
15978
15951
  getInternal: this.getInternal
15979
15952
  };
15980
- });
15953
+ };
15981
15954
  this.callbacks = {
15982
15955
  onFinish: () => {
15983
15956
  },
@@ -16097,19 +16070,15 @@ const defaultProps$W = {
16097
16070
  shouldUpdate: false,
16098
16071
  noStyle: false
16099
16072
  };
16100
- class FormItem extends React__default.Component {
16073
+ const _FormItem = class _FormItem extends React__default.Component {
16101
16074
  constructor(props) {
16102
16075
  super(props);
16103
- __publicField(this, "cancelRegister");
16104
- __publicField(this, "componentRef");
16105
- __publicField(this, "eventOff");
16106
- // children添加value属性和onChange事件
16107
- __publicField(this, "getControlled", (children) => {
16108
- var _a2;
16076
+ this.getControlled = (children) => {
16077
+ var _a;
16109
16078
  const { setFieldsValue, getFieldValue } = this.context;
16110
16079
  const { dispatch } = this.context.getInternal(SECRET);
16111
16080
  const { name = "" } = this.props;
16112
- 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) {
16113
16082
  console.warn("通过 initialValue 设置初始值");
16114
16083
  }
16115
16084
  const fieldValue = getFieldValue(name);
@@ -16131,7 +16100,7 @@ class FormItem extends React__default.Component {
16131
16100
  const { validateTrigger } = this.props;
16132
16101
  let validateTriggers = [this.props.trigger || "onChange"];
16133
16102
  if (validateTrigger) {
16134
- validateTriggers = typeof validateTrigger === "string" ? [...validateTriggers, validateTrigger] : [...validateTriggers, ...validateTrigger];
16103
+ validateTriggers = typeof validateTrigger === "string" ? [validateTrigger] : [...validateTrigger];
16135
16104
  validateTriggers.forEach((trigger) => {
16136
16105
  const originTrigger = controlled[trigger];
16137
16106
  controlled[trigger] = (...args) => {
@@ -16161,21 +16130,21 @@ class FormItem extends React__default.Component {
16161
16130
  };
16162
16131
  }
16163
16132
  return controlled;
16164
- });
16165
- __publicField(this, "refresh", () => {
16133
+ };
16134
+ this.refresh = () => {
16166
16135
  this.setState(({ resetCount }) => ({
16167
16136
  resetCount: resetCount + 1
16168
16137
  }));
16169
- });
16170
- __publicField(this, "onStoreChange", (type4) => {
16138
+ };
16139
+ this.onStoreChange = (type4) => {
16171
16140
  if (type4 === "reset") {
16172
16141
  this.context.errors[this.props.name] = [];
16173
16142
  this.refresh();
16174
16143
  } else {
16175
16144
  this.forceUpdate();
16176
16145
  }
16177
- });
16178
- __publicField(this, "renderLayout", (childNode) => {
16146
+ };
16147
+ this.renderLayout = (childNode) => {
16179
16148
  const {
16180
16149
  label,
16181
16150
  name,
@@ -16210,7 +16179,7 @@ class FormItem extends React__default.Component {
16210
16179
  item[0].message
16211
16180
  ))
16212
16181
  );
16213
- });
16182
+ };
16214
16183
  this.componentRef = React__default.createRef();
16215
16184
  this.state = {
16216
16185
  resetCount: 1
@@ -16243,9 +16212,10 @@ class FormItem extends React__default.Component {
16243
16212
  }
16244
16213
  return /* @__PURE__ */ React__default.createElement(React__default.Fragment, { key: this.state.resetCount }, this.props.noStyle ? returnChildNode : this.renderLayout(returnChildNode));
16245
16214
  }
16246
- }
16247
- __publicField(FormItem, "defaultProps", defaultProps$W);
16248
- __publicField(FormItem, "contextType", Context);
16215
+ };
16216
+ _FormItem.defaultProps = defaultProps$W;
16217
+ _FormItem.contextType = Context;
16218
+ let FormItem = _FormItem;
16249
16219
  const InnerForm = Form;
16250
16220
  InnerForm.Item = FormItem;
16251
16221
  InnerForm.useForm = useForm;
@@ -16334,12 +16304,12 @@ const Input = forwardRef(
16334
16304
  setValue("");
16335
16305
  },
16336
16306
  focus: () => {
16337
- var _a2;
16338
- (_a2 = inputRef.current) == null ? void 0 : _a2.focus();
16307
+ var _a;
16308
+ (_a = inputRef.current) == null ? void 0 : _a.focus();
16339
16309
  },
16340
16310
  blur: () => {
16341
- var _a2;
16342
- (_a2 = inputRef.current) == null ? void 0 : _a2.blur();
16311
+ var _a;
16312
+ (_a = inputRef.current) == null ? void 0 : _a.blur();
16343
16313
  },
16344
16314
  get nativeElement() {
16345
16315
  return inputRef.current;
@@ -16429,14 +16399,14 @@ const Input = forwardRef(
16429
16399
  handleInput(e2.currentTarget.value);
16430
16400
  },
16431
16401
  onCompositionStart: (e2) => {
16432
- var _a2;
16402
+ var _a;
16433
16403
  composingRef.current = true;
16434
- (_a2 = props.onCompositionStart) == null ? void 0 : _a2.call(props, e2);
16404
+ (_a = props.onCompositionStart) == null ? void 0 : _a.call(props, e2);
16435
16405
  },
16436
16406
  onCompositionEnd: (e2) => {
16437
- var _a2;
16407
+ var _a;
16438
16408
  composingRef.current = false;
16439
- (_a2 = props.onCompositionEnd) == null ? void 0 : _a2.call(props, e2);
16409
+ (_a = props.onCompositionEnd) == null ? void 0 : _a.call(props, e2);
16440
16410
  }
16441
16411
  }
16442
16412
  ),
@@ -16503,14 +16473,15 @@ const InputNumber = (props) => {
16503
16473
  const [focused, setFocused] = useState(false);
16504
16474
  const inputRef = useRef(null);
16505
16475
  useEffect(() => {
16506
- var _a2, _b;
16476
+ var _a, _b;
16507
16477
  if (focused) {
16508
- (_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);
16509
16479
  }
16510
16480
  }, [focused]);
16511
16481
  const [shadowValue, setShadowValue] = usePropsValue({
16512
16482
  value: typeof value === "string" ? parseFloat(value) : value,
16513
16483
  defaultValue: typeof defaultValue === "string" ? parseFloat(defaultValue) : defaultValue,
16484
+ finalValue: 0,
16514
16485
  onChange: (value2) => {
16515
16486
  }
16516
16487
  });
@@ -17450,6 +17421,7 @@ const defaultProps$O = {
17450
17421
  marks: {}
17451
17422
  };
17452
17423
  const Range = (props) => {
17424
+ const rtl = useRtl();
17453
17425
  const {
17454
17426
  className,
17455
17427
  range: range3,
@@ -17562,15 +17534,17 @@ const Range = (props) => {
17562
17534
  transition: dragStatus ? "none" : void 0
17563
17535
  };
17564
17536
  }
17537
+ const dir = rtl ? "right" : "left";
17565
17538
  return {
17566
17539
  width: calcMainAxis(),
17567
- left: calcOffset(),
17540
+ [dir]: calcOffset(),
17568
17541
  transition: dragStatus ? "none" : void 0
17569
17542
  };
17570
17543
  };
17571
17544
  const marksStyle = (mark) => {
17545
+ const dir = rtl ? "right" : "left";
17572
17546
  let style = {
17573
- left: `${(mark - min) / scope() * 100}%`
17547
+ [dir]: `${(mark - min) / scope() * 100}%`
17574
17548
  };
17575
17549
  if (vertical) {
17576
17550
  style = {
@@ -17662,6 +17636,7 @@ const Range = (props) => {
17662
17636
  let delta = touch.deltaX.current;
17663
17637
  let total = rect.width;
17664
17638
  let diff = delta / total * scope();
17639
+ diff = rtl ? -diff : diff;
17665
17640
  if (vertical) {
17666
17641
  delta = touch.deltaY.current;
17667
17642
  total = rect.height;
@@ -17819,8 +17794,8 @@ const Rate = (props) => {
17819
17794
  setScore(value2);
17820
17795
  };
17821
17796
  const getScoreByPosition = (x) => {
17822
- var _a2;
17823
- if ((_a2 = rateRects.current) == null ? void 0 : _a2.length) {
17797
+ var _a;
17798
+ if ((_a = rateRects.current) == null ? void 0 : _a.length) {
17824
17799
  for (let index = rateRects.current.length - 1; index >= 0; index--) {
17825
17800
  const item = rateRects.current[index];
17826
17801
  if (item && x > item.left) {
@@ -18500,22 +18475,14 @@ TextArea.defaultProps = defaultProps$I;
18500
18475
  TextArea.displayName = "NutTextArea";
18501
18476
  class UploadOptions {
18502
18477
  constructor() {
18503
- __publicField(this, "url", "");
18504
- __publicField(this, "name", "file");
18505
- __publicField(this, "fileType", "image");
18506
- __publicField(this, "formData");
18507
- __publicField(this, "sourceFile");
18508
- __publicField(this, "method", "post");
18509
- __publicField(this, "xhrState", 200);
18510
- __publicField(this, "timeout", 30 * 1e3);
18511
- __publicField(this, "headers", {});
18512
- __publicField(this, "withCredentials", false);
18513
- __publicField(this, "onStart");
18514
- __publicField(this, "taroFilePath");
18515
- __publicField(this, "onProgress");
18516
- __publicField(this, "onSuccess");
18517
- __publicField(this, "onFailure");
18518
- __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;
18519
18486
  }
18520
18487
  }
18521
18488
  const UPLOADING = "uploading";
@@ -18523,11 +18490,10 @@ const SUCCESS = "success";
18523
18490
  const ERROR = "error";
18524
18491
  class Upload {
18525
18492
  constructor(options2) {
18526
- __publicField(this, "options");
18527
18493
  this.options = options2;
18528
18494
  }
18529
18495
  upload() {
18530
- var _a2;
18496
+ var _a;
18531
18497
  const { options: options2 } = this;
18532
18498
  const xhr = new XMLHttpRequest();
18533
18499
  xhr.timeout = options2.timeout;
@@ -18535,16 +18501,16 @@ class Upload {
18535
18501
  xhr.upload.addEventListener(
18536
18502
  "progress",
18537
18503
  (e2) => {
18538
- var _a3;
18539
- (_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);
18540
18506
  },
18541
18507
  false
18542
18508
  );
18543
18509
  xhr.onreadystatechange = () => {
18544
- var _a3, _b;
18510
+ var _a2, _b;
18545
18511
  if (xhr.readyState === 4) {
18546
18512
  if (xhr.status === options2.xhrState) {
18547
- (_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);
18548
18514
  } else {
18549
18515
  (_b = options2.onFailure) == null ? void 0 : _b.call(options2, xhr.responseText, options2);
18550
18516
  }
@@ -18555,7 +18521,7 @@ class Upload {
18555
18521
  for (const [key, value] of Object.entries(options2.headers)) {
18556
18522
  xhr.setRequestHeader(key, value);
18557
18523
  }
18558
- (_a2 = options2.onStart) == null ? void 0 : _a2.call(options2, options2);
18524
+ (_a = options2.onStart) == null ? void 0 : _a.call(options2, options2);
18559
18525
  if (options2.beforeXhrUpload) {
18560
18526
  options2.beforeXhrUpload(xhr, options2);
18561
18527
  } else {
@@ -18600,6 +18566,7 @@ const defaultProps$H = {
18600
18566
  delay: 0
18601
18567
  };
18602
18568
  const Progress = (props) => {
18569
+ const rtl = useRtl();
18603
18570
  const {
18604
18571
  className,
18605
18572
  style,
@@ -18693,7 +18660,7 @@ const Progress = (props) => {
18693
18660
  "div",
18694
18661
  {
18695
18662
  className: `${classPrefix2}-text`,
18696
- style: { left: `${displayPercent}%` }
18663
+ style: rtl ? { right: `${displayPercent}%` } : { left: `${displayPercent}%` }
18697
18664
  },
18698
18665
  children || /* @__PURE__ */ React__default.createElement(
18699
18666
  "div",
@@ -18727,7 +18694,7 @@ const Preview = ({
18727
18694
  return item.loadingIcon || /* @__PURE__ */ React__default.createElement(t$2, { className: "nut-icon-loading", color: "#fff" });
18728
18695
  };
18729
18696
  return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, fileList.length !== 0 && fileList.map((item, index) => {
18730
- var _a2;
18697
+ var _a;
18731
18698
  return /* @__PURE__ */ React__default.createElement(
18732
18699
  "div",
18733
18700
  {
@@ -18742,7 +18709,7 @@ const Preview = ({
18742
18709
  onClick: () => onDeleteItem(item, index)
18743
18710
  }
18744
18711
  ),
18745
- 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(
18746
18713
  "img",
18747
18714
  {
18748
18715
  className: "nut-uploader-preview-img-c",
@@ -18796,18 +18763,11 @@ const Preview = ({
18796
18763
  };
18797
18764
  class FileItem {
18798
18765
  constructor() {
18799
- __publicField(this, "status", "ready");
18800
- __publicField(this, "message", "准备中..");
18801
- __publicField(this, "uid", (/* @__PURE__ */ new Date()).getTime().toString());
18802
- __publicField(this, "name");
18803
- __publicField(this, "url");
18804
- __publicField(this, "type");
18805
- __publicField(this, "path");
18806
- __publicField(this, "percentage", 0);
18807
- __publicField(this, "formData", {});
18808
- __publicField(this, "responseText");
18809
- __publicField(this, "loadingIcon");
18810
- __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 = {};
18811
18771
  }
18812
18772
  }
18813
18773
  const defaultProps$G = {
@@ -18915,11 +18875,11 @@ const InternalUploader = (props, ref) => {
18915
18875
  el.value = "";
18916
18876
  };
18917
18877
  const executeUpload = (fileItem, index) => {
18918
- var _a2, _b;
18878
+ var _a, _b;
18919
18879
  const uploadOption = new UploadOptions();
18920
18880
  uploadOption.url = url2;
18921
18881
  for (const [key, value2] of Object.entries(data)) {
18922
- (_a2 = fileItem.formData) == null ? void 0 : _a2.append(key, value2);
18882
+ (_a = fileItem.formData) == null ? void 0 : _a.append(key, value2);
18923
18883
  }
18924
18884
  uploadOption.formData = fileItem.formData;
18925
18885
  uploadOption.timeout = timeout2 * 1;
@@ -19006,7 +18966,7 @@ const InternalUploader = (props, ref) => {
19006
18966
  };
19007
18967
  const readFile = (files) => {
19008
18968
  files.forEach((file, index) => {
19009
- var _a2;
18969
+ var _a;
19010
18970
  const formData = new FormData();
19011
18971
  formData.append(name, file);
19012
18972
  const fileItem = new FileItem();
@@ -19017,7 +18977,7 @@ const InternalUploader = (props, ref) => {
19017
18977
  fileItem.uid = file.lastModified + fileItem.uid;
19018
18978
  fileItem.message = autoUpload ? locale.uploader.readyUpload : locale.uploader.waitingUpload;
19019
18979
  executeUpload(fileItem, index);
19020
- if (preview && ((_a2 = file.type) == null ? void 0 : _a2.includes("image"))) {
18980
+ if (preview && ((_a = file.type) == null ? void 0 : _a.includes("image"))) {
19021
18981
  const reader = new FileReader();
19022
18982
  reader.onload = (event) => {
19023
18983
  fileItem.url = event.target.result;
@@ -19255,8 +19215,8 @@ function legacyUnmount(container) {
19255
19215
  }
19256
19216
  async function concurrentUnmount(container) {
19257
19217
  return Promise.resolve().then(() => {
19258
- var _a2;
19259
- (_a2 = container[MARK]) == null ? void 0 : _a2.unmount();
19218
+ var _a;
19219
+ (_a = container[MARK]) == null ? void 0 : _a.unmount();
19260
19220
  delete container[MARK];
19261
19221
  });
19262
19222
  }
@@ -19778,16 +19738,16 @@ const InfiniteLoading = (props) => {
19778
19738
  const distance = useRef(0);
19779
19739
  const classes = classNames(classPrefix$d, className);
19780
19740
  useEffect(() => {
19781
- var _a2;
19741
+ var _a;
19782
19742
  if (target && document.getElementById(target)) {
19783
19743
  scrollEl.current = document.getElementById(target);
19784
19744
  } else {
19785
19745
  scrollEl.current = window;
19786
19746
  }
19787
- (_a2 = scrollEl.current) == null ? void 0 : _a2.addEventListener("scroll", handleScroll, capture);
19747
+ (_a = scrollEl.current) == null ? void 0 : _a.addEventListener("scroll", handleScroll, capture);
19788
19748
  return () => {
19789
- var _a3;
19790
- (_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);
19791
19751
  };
19792
19752
  }, [hasMore, isInfiniting, onLoadMore]);
19793
19753
  useEffect(() => {
@@ -20339,10 +20299,9 @@ const NoticeBar = (props) => {
20339
20299
  NoticeBar.defaultProps = defaultProps$z;
20340
20300
  NoticeBar.displayName = "NutNoticeBar";
20341
20301
  const classPrefix$c = "nut-notify";
20342
- let Notification$1 = (_a = class extends React.PureComponent {
20302
+ let Notification$1 = class Notification extends React.PureComponent {
20343
20303
  constructor(props) {
20344
20304
  super(props);
20345
- __publicField(this, "closeTimer");
20346
20305
  this.close = this.close.bind(this);
20347
20306
  this.startCloseTimer = this.startCloseTimer.bind(this);
20348
20307
  this.clearCloseTimer = this.clearCloseTimer.bind(this);
@@ -20415,7 +20374,7 @@ let Notification$1 = (_a = class extends React.PureComponent {
20415
20374
  )
20416
20375
  ));
20417
20376
  }
20418
- }, __publicField(_a, "newInstance"), _a);
20377
+ };
20419
20378
  Notification$1.newInstance = (properties, callback) => {
20420
20379
  const element = document.createElement("div");
20421
20380
  const id = properties.id ? properties.id : `${(/* @__PURE__ */ new Date()).getTime()}`;
@@ -20581,8 +20540,8 @@ const Popover = (props) => {
20581
20540
  }
20582
20541
  useClickAway(
20583
20542
  () => {
20584
- var _a2;
20585
- (_a2 = props.onClick) == null ? void 0 : _a2.call(props);
20543
+ var _a;
20544
+ (_a = props.onClick) == null ? void 0 : _a.call(props);
20586
20545
  onClose == null ? void 0 : onClose();
20587
20546
  },
20588
20547
  targetSet,
@@ -20618,11 +20577,11 @@ const Popover = (props) => {
20618
20577
  return `${prefixCls2} ${prefixCls2}-${direction} ${prefixCls2}-${location}`;
20619
20578
  };
20620
20579
  const getRootPosition = () => {
20621
- var _a2, _b;
20580
+ var _a, _b;
20622
20581
  const styles = {};
20623
20582
  if (!rootPosition)
20624
20583
  return {};
20625
- const contentWidth = (_a2 = popoverContentRef.current) == null ? void 0 : _a2.clientWidth;
20584
+ const contentWidth = (_a = popoverContentRef.current) == null ? void 0 : _a.clientWidth;
20626
20585
  const contentHeight = (_b = popoverContentRef.current) == null ? void 0 : _b.clientHeight;
20627
20586
  const { width, height, left, top, right } = rootPosition;
20628
20587
  const direction = location.split("-")[0];
@@ -20695,12 +20654,12 @@ const Popover = (props) => {
20695
20654
  return styles;
20696
20655
  };
20697
20656
  const handleSelect = (item, index) => {
20698
- var _a2;
20657
+ var _a;
20699
20658
  if (!item.disabled) {
20700
20659
  onSelect == null ? void 0 : onSelect(item, index);
20701
20660
  }
20702
20661
  if (closeOnActionClick) {
20703
- (_a2 = props.onClick) == null ? void 0 : _a2.call(props);
20662
+ (_a = props.onClick) == null ? void 0 : _a.call(props);
20704
20663
  onClose == null ? void 0 : onClose();
20705
20664
  }
20706
20665
  };
@@ -20710,8 +20669,8 @@ const Popover = (props) => {
20710
20669
  className: "nut-popover-wrapper",
20711
20670
  ref: popoverRef,
20712
20671
  onClick: () => {
20713
- var _a2;
20714
- (_a2 = props.onClick) == null ? void 0 : _a2.call(props);
20672
+ var _a;
20673
+ (_a = props.onClick) == null ? void 0 : _a.call(props);
20715
20674
  if (!visible) {
20716
20675
  onOpen == null ? void 0 : onOpen();
20717
20676
  } else {
@@ -20761,8 +20720,8 @@ const Popover = (props) => {
20761
20720
  {
20762
20721
  className: "nut-popover-menu-item-action-icon",
20763
20722
  onClick: (e2) => {
20764
- var _a2, _b;
20765
- 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);
20766
20725
  }
20767
20726
  },
20768
20727
  item.action.icon
@@ -20839,8 +20798,8 @@ const PullToRefresh = (p) => {
20839
20798
  const elementRef = useRef(null);
20840
20799
  const pullingRef = useRef(false);
20841
20800
  useEffect(() => {
20842
- var _a2;
20843
- (_a2 = elementRef.current) == null ? void 0 : _a2.addEventListener("touchmove", () => {
20801
+ var _a;
20802
+ (_a = elementRef.current) == null ? void 0 : _a.addEventListener("touchmove", () => {
20844
20803
  });
20845
20804
  }, []);
20846
20805
  async function doRefresh() {
@@ -20930,16 +20889,16 @@ const PullToRefresh = (p) => {
20930
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)));
20931
20890
  };
20932
20891
  const renderStatusIcon = () => {
20933
- var _a2;
20892
+ var _a;
20934
20893
  if (props.renderIcon) {
20935
- return (_a2 = props.renderIcon) == null ? void 0 : _a2.call(props, status);
20894
+ return (_a = props.renderIcon) == null ? void 0 : _a.call(props, status);
20936
20895
  }
20937
20896
  return renderIcons(status);
20938
20897
  };
20939
20898
  const renderStatusText = () => {
20940
- var _a2;
20899
+ var _a;
20941
20900
  if (props.renderText) {
20942
- return (_a2 = props.renderText) == null ? void 0 : _a2.call(props, status);
20901
+ return (_a = props.renderText) == null ? void 0 : _a.call(props, status);
20943
20902
  }
20944
20903
  if (status === "pulling")
20945
20904
  return props.pullingText;
@@ -21009,7 +20968,7 @@ const defaultProps$v = {
21009
20968
  };
21010
20969
  const classPrefix$9 = `nut-avatar`;
21011
20970
  const Avatar = (props) => {
21012
- 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;
21013
20972
  const {
21014
20973
  children,
21015
20974
  size,
@@ -21036,7 +20995,7 @@ const Avatar = (props) => {
21036
20995
  const parent = useContext(AvatarContext);
21037
20996
  const sizeValue = ["large", "normal", "small"];
21038
20997
  const classes = classNames({
21039
- [`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,
21040
20999
  [`nut-avatar-${((_b = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _b.shape) || shape}`]: true
21041
21000
  });
21042
21001
  const cls = classNames(classPrefix$9, classes, className);
@@ -21054,20 +21013,20 @@ const Avatar = (props) => {
21054
21013
  color: `${(_g = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _g.maxColor}`
21055
21014
  };
21056
21015
  useEffect(() => {
21057
- var _a3;
21058
- 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;
21059
21018
  if (avatarChildren) {
21060
21019
  avatarLength(avatarChildren);
21061
21020
  }
21062
21021
  }, []);
21063
21022
  const avatarLength = (children2) => {
21064
- var _a3, _b2, _c2;
21023
+ var _a2, _b2, _c2;
21065
21024
  for (let i = 0; i < children2.length; i++) {
21066
21025
  if (children2[i] && children2[i].classList && children2[i].classList[0] === "nut-avatar") {
21067
21026
  children2[i].setAttribute("data-index", i + 1);
21068
21027
  }
21069
21028
  }
21070
- 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);
21071
21030
  const maxCount = (_c2 = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _c2.max;
21072
21031
  setMaxSum(children2.length);
21073
21032
  setAvatarIndex(index);
@@ -21206,20 +21165,20 @@ const Swipe = forwardRef((props, instanceRef) => {
21206
21165
  const leftWidth = actionWidth.left;
21207
21166
  const rightWidth = actionWidth.right;
21208
21167
  const onTouchStart = (event) => {
21209
- var _a2;
21168
+ var _a;
21210
21169
  if (!props.disabled) {
21211
21170
  startOffset.current = state.offset;
21212
21171
  touch.start(event);
21213
- (_a2 = props.onTouchStart) == null ? void 0 : _a2.call(props, event);
21172
+ (_a = props.onTouchStart) == null ? void 0 : _a.call(props, event);
21214
21173
  }
21215
21174
  };
21216
21175
  const onTouchMove = (event) => {
21217
- var _a2;
21176
+ var _a;
21218
21177
  if (props.disabled) {
21219
21178
  return;
21220
21179
  }
21221
21180
  touch.move(event);
21222
- (_a2 = props.onTouchMove) == null ? void 0 : _a2.call(props, event);
21181
+ (_a = props.onTouchMove) == null ? void 0 : _a.call(props, event);
21223
21182
  if (touch.isHorizontal()) {
21224
21183
  lockClick.current = true;
21225
21184
  const newState = { ...state, dragging: true };
@@ -21236,14 +21195,14 @@ const Swipe = forwardRef((props, instanceRef) => {
21236
21195
  }
21237
21196
  };
21238
21197
  const onTouchEnd = (event) => {
21239
- var _a2;
21198
+ var _a;
21240
21199
  if (state.dragging) {
21241
21200
  setState((v) => ({ ...v, dragging: false }));
21242
21201
  toggle(state.offset > 0 ? "left" : "right");
21243
21202
  setTimeout(() => {
21244
21203
  lockClick.current = false;
21245
21204
  }, 0);
21246
- (_a2 = props.onTouchEnd) == null ? void 0 : _a2.call(props, event);
21205
+ (_a = props.onTouchEnd) == null ? void 0 : _a.call(props, event);
21247
21206
  }
21248
21207
  };
21249
21208
  const toggle = (side) => {
@@ -21258,18 +21217,18 @@ const Swipe = forwardRef((props, instanceRef) => {
21258
21217
  }
21259
21218
  };
21260
21219
  const open = (side) => {
21261
- var _a2;
21220
+ var _a;
21262
21221
  opened.current = true;
21263
21222
  const offset = side === "left" ? leftWidth : -rightWidth;
21264
21223
  const name = props.name;
21265
- (_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 });
21266
21225
  setState((v) => ({ ...v, offset: Number(offset) || 0 }));
21267
21226
  };
21268
21227
  const close = (position) => {
21269
- var _a2;
21228
+ var _a;
21270
21229
  if (opened.current) {
21271
21230
  opened.current = false;
21272
- (_a2 = props.onClose) == null ? void 0 : _a2.call(props, {
21231
+ (_a = props.onClose) == null ? void 0 : _a.call(props, {
21273
21232
  name: props.name,
21274
21233
  position: position || "left"
21275
21234
  });
@@ -21360,10 +21319,9 @@ const Swipe = forwardRef((props, instanceRef) => {
21360
21319
  Swipe.defaultProps = defaultProps$t;
21361
21320
  Swipe.displayName = "NutSwipe";
21362
21321
  const classPrefix$8 = "nut-toast";
21363
- class Notification extends React.PureComponent {
21322
+ class Notification2 extends React.PureComponent {
21364
21323
  constructor(props) {
21365
21324
  super(props);
21366
- __publicField(this, "closeTimer");
21367
21325
  this.close = this.close.bind(this);
21368
21326
  this.startCloseTimer = this.startCloseTimer.bind(this);
21369
21327
  this.clearCloseTimer = this.clearCloseTimer.bind(this);
@@ -21477,8 +21435,7 @@ class Notification extends React.PureComponent {
21477
21435
  ));
21478
21436
  }
21479
21437
  }
21480
- __publicField(Notification, "newInstance");
21481
- Notification.newInstance = (properties, callback) => {
21438
+ Notification2.newInstance = (properties, callback) => {
21482
21439
  const element = document.createElement("div");
21483
21440
  const id = properties.id ? properties.id : `${(/* @__PURE__ */ new Date()).getTime()}`;
21484
21441
  element.id = id;
@@ -21498,7 +21455,7 @@ Notification.newInstance = (properties, callback) => {
21498
21455
  }
21499
21456
  });
21500
21457
  }
21501
- render(/* @__PURE__ */ React.createElement(Notification, { ...properties, ref }), element);
21458
+ render(/* @__PURE__ */ React.createElement(Notification2, { ...properties, ref }), element);
21502
21459
  };
21503
21460
  let messageInstance = null;
21504
21461
  let options = {
@@ -21524,7 +21481,7 @@ function getInstance(props, callback) {
21524
21481
  messageInstance.destroy();
21525
21482
  messageInstance = null;
21526
21483
  }
21527
- Notification.newInstance(props, (notification) => {
21484
+ Notification2.newInstance(props, (notification) => {
21528
21485
  return callback && callback(notification);
21529
21486
  });
21530
21487
  }
@@ -21689,7 +21646,7 @@ const CountUp = (props) => {
21689
21646
  CountUp.defaultProps = defaultProps$r;
21690
21647
  CountUp.displayName = "NutCountUp";
21691
21648
  const defaultProps$q = {};
21692
- class AnimatingNumbers extends Component {
21649
+ const _AnimatingNumbers = class _AnimatingNumbers extends Component {
21693
21650
  constructor(props) {
21694
21651
  super(props);
21695
21652
  this.state = {};
@@ -21697,10 +21654,11 @@ class AnimatingNumbers extends Component {
21697
21654
  render() {
21698
21655
  return /* @__PURE__ */ React__default.createElement("div", { className: "nut-animatingnumbers" });
21699
21656
  }
21700
- }
21701
- __publicField(AnimatingNumbers, "defaultProps", defaultProps$q);
21702
- __publicField(AnimatingNumbers, "displayName", "NutAnimatingNumbers");
21703
- __publicField(AnimatingNumbers, "CountUp", CountUp);
21657
+ };
21658
+ _AnimatingNumbers.defaultProps = defaultProps$q;
21659
+ _AnimatingNumbers.displayName = "NutAnimatingNumbers";
21660
+ _AnimatingNumbers.CountUp = CountUp;
21661
+ let AnimatingNumbers = _AnimatingNumbers;
21704
21662
  AnimatingNumbers.CountUp = CountUp;
21705
21663
  const defaultProps$p = {
21706
21664
  ...ComponentDefaults,
@@ -21963,7 +21921,7 @@ const defaultProps$o = {
21963
21921
  };
21964
21922
  const classPrefix$6 = `nut-circleprogress`;
21965
21923
  const CircleProgress = (props) => {
21966
- var _a2;
21924
+ var _a;
21967
21925
  const {
21968
21926
  children,
21969
21927
  percent,
@@ -22022,7 +21980,7 @@ const CircleProgress = (props) => {
22022
21980
  });
22023
21981
  return stopArr;
22024
21982
  };
22025
- 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) => {
22026
21984
  return /* @__PURE__ */ React__default.createElement("stop", { key: index, offset: item.key, stopColor: item.value });
22027
21985
  }))), /* @__PURE__ */ React__default.createElement(
22028
21986
  "path",
@@ -22108,8 +22066,8 @@ const CollapseItem = (props) => {
22108
22066
  }
22109
22067
  };
22110
22068
  const getOffsetHeight = () => {
22111
- var _a2;
22112
- const height = (_a2 = contentRef.current) == null ? void 0 : _a2.offsetHeight;
22069
+ var _a;
22070
+ const height = (_a = contentRef.current) == null ? void 0 : _a.offsetHeight;
22113
22071
  return height ? `${height}px` : "";
22114
22072
  };
22115
22073
  const toggle = () => {
@@ -22490,7 +22448,7 @@ const defaultProps$k = {
22490
22448
  };
22491
22449
  const classPrefix$5 = `nut-ellipsis`;
22492
22450
  const Ellipsis = (props) => {
22493
- var _a2, _b;
22451
+ var _a, _b;
22494
22452
  const {
22495
22453
  children,
22496
22454
  content,
@@ -22630,7 +22588,7 @@ const Ellipsis = (props) => {
22630
22588
  const handleClick2 = () => {
22631
22589
  onClick && onClick();
22632
22590
  };
22633
- 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(
22634
22592
  "span",
22635
22593
  {
22636
22594
  className: "nut-ellipsis-text",
@@ -22918,7 +22876,7 @@ const Swiper = React__default.forwardRef((props, ref) => {
22918
22876
  isEmit = false,
22919
22877
  movingStatus = false
22920
22878
  }) => {
22921
- var _a2;
22879
+ var _a;
22922
22880
  if (swiperItemCount <= 1)
22923
22881
  return;
22924
22882
  const targetActive = getActive(pace);
@@ -22935,7 +22893,7 @@ const Swiper = React__default.forwardRef((props, ref) => {
22935
22893
  setChildOffset(childOffset);
22936
22894
  }
22937
22895
  if (isEmit && active !== targetActive) {
22938
- (_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);
22939
22897
  }
22940
22898
  active = targetActive;
22941
22899
  setActive(targetActive);
@@ -23096,13 +23054,13 @@ const Swiper = React__default.forwardRef((props, ref) => {
23096
23054
  { name: "touchend", e: onTouchEnd }
23097
23055
  ];
23098
23056
  events.forEach((item) => {
23099
- var _a2;
23100
- (_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);
23101
23059
  });
23102
23060
  return () => {
23103
23061
  events.forEach((item) => {
23104
- var _a2;
23105
- (_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);
23106
23064
  });
23107
23065
  };
23108
23066
  });
@@ -23218,8 +23176,8 @@ const ImagePreview = (props) => {
23218
23176
  defaultValue,
23219
23177
  finalValue: defaultValue,
23220
23178
  onChange: (val) => {
23221
- var _a2;
23222
- (_a2 = props.onChange) == null ? void 0 : _a2.call(props, val);
23179
+ var _a;
23180
+ (_a = props.onChange) == null ? void 0 : _a.call(props, val);
23223
23181
  }
23224
23182
  });
23225
23183
  const [showPop, setShowPop] = useState(visible);
@@ -23330,9 +23288,9 @@ const ImagePreview = (props) => {
23330
23288
  );
23331
23289
  };
23332
23290
  const slideChangeEnd = (page) => {
23333
- var _a2;
23291
+ var _a;
23334
23292
  setActive(page + 1);
23335
- (_a2 = props.onChange) == null ? void 0 : _a2.call(props, page + 1);
23293
+ (_a = props.onChange) == null ? void 0 : _a.call(props, page + 1);
23336
23294
  };
23337
23295
  const onCloseInner = () => {
23338
23296
  setShowPop(false);
@@ -23631,8 +23589,8 @@ const Step = (props) => {
23631
23589
  return index === +parent.propSteps.value ? "process" : "wait";
23632
23590
  };
23633
23591
  const handleClickStep = () => {
23634
- var _a2, _b;
23635
- ((_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));
23636
23594
  };
23637
23595
  const classPrefix2 = `nut-step`;
23638
23596
  const classes = classNames(
@@ -24349,8 +24307,8 @@ const VirtualList = (props) => {
24349
24307
  setListTotalSize(totalSize);
24350
24308
  }, [list, itemHeight, horizontal]);
24351
24309
  const getElement = useCallback(() => {
24352
- var _a2;
24353
- 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;
24354
24312
  }, []);
24355
24313
  useEffect(() => {
24356
24314
  if (containerHeight)
@@ -24527,8 +24485,8 @@ const InternalBarrage = (props, ref) => {
24527
24485
  barrageCWidth.current = barrageBody.current.offsetWidth;
24528
24486
  }
24529
24487
  setTimeout(() => {
24530
- var _a2;
24531
- (_a2 = barrageBody.current) == null ? void 0 : _a2.style.setProperty(
24488
+ var _a;
24489
+ (_a = barrageBody.current) == null ? void 0 : _a.style.setProperty(
24532
24490
  "--move-distance",
24533
24491
  `-${barrageCWidth.current}px`
24534
24492
  );
@@ -24777,8 +24735,8 @@ const TimeSelect = (props) => {
24777
24735
  ];
24778
24736
  }
24779
24737
  newActiveTime = newActiveTime.filter((item) => {
24780
- var _a2;
24781
- 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;
24782
24740
  });
24783
24741
  setActiveTime(newActiveTime);
24784
24742
  onTimeChange && onTimeChange(selectTime, newActiveTime);