@nutui/nutui-react 2.3.12-beta.0 → 2.4.0-beta.0

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 (326) hide show
  1. package/CHANGELOG.md +48 -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/style/style.css +1 -1
  6. package/dist/esm/AnimatingNumbers.js +47 -120
  7. package/dist/esm/Audio.js +88 -159
  8. package/dist/esm/Avatar.js +44 -91
  9. package/dist/esm/AvatarCropper.js +149 -268
  10. package/dist/esm/AvatarGroup.js +13 -44
  11. package/dist/esm/BackTop.js +34 -75
  12. package/dist/esm/Badge/style/style.css +1 -1
  13. package/dist/esm/Barrage.js +49 -83
  14. package/dist/esm/Calendar.js +27 -119
  15. package/dist/esm/CalendarCard.js +180 -291
  16. package/dist/esm/CalendarItem.js +253 -314
  17. package/dist/esm/Card.js +38 -72
  18. package/dist/esm/Cell.js +27 -62
  19. package/dist/esm/CellGroup.js +16 -45
  20. package/dist/esm/Checkbox/style/style.css +1 -1
  21. package/dist/esm/CheckboxGroup/style/style.css +1 -1
  22. package/dist/esm/CheckboxGroup.js +52 -85
  23. package/dist/esm/CircleProgress.js +42 -93
  24. package/dist/esm/Col.js +17 -48
  25. package/dist/esm/Collapse/style/style.css +1 -1
  26. package/dist/esm/Collapse.js +18 -49
  27. package/dist/esm/CollapseItem/style/style.css +1 -1
  28. package/dist/esm/ConfigProvider.js +3 -2
  29. package/dist/esm/CountDown.js +63 -102
  30. package/dist/esm/DatePicker.js +88 -128
  31. package/dist/esm/Dialog/style/style.css +1 -1
  32. package/dist/esm/Dialog.js +124 -197
  33. package/dist/esm/Divider.js +16 -36
  34. package/dist/esm/Drag.js +32 -76
  35. package/dist/esm/Elevator.js +93 -133
  36. package/dist/esm/Ellipsis.js +71 -92
  37. package/dist/esm/Empty.js +31 -70
  38. package/dist/esm/FixedNav.js +32 -81
  39. package/dist/esm/Form.js +28 -61
  40. package/dist/esm/Grid.js +27 -51
  41. package/dist/esm/Image.js +47 -102
  42. package/dist/esm/ImagePreview.js +82 -135
  43. package/dist/esm/InfiniteLoading.js +77 -159
  44. package/dist/esm/Input.js +57 -125
  45. package/dist/esm/InputNumber/style/style.css +1 -1
  46. package/dist/esm/InputNumber.js +67 -97
  47. package/dist/esm/Layout.js +4 -28
  48. package/dist/esm/Loading.js +13 -40
  49. package/dist/esm/Menu.js +51 -105
  50. package/dist/esm/NavBar.js +46 -85
  51. package/dist/esm/NoticeBar/style/style.css +1 -1
  52. package/dist/esm/NoticeBar.js +158 -227
  53. package/dist/esm/Notify.js +87 -178
  54. package/dist/esm/NumberKeyboard.js +84 -150
  55. package/dist/esm/Pagination.js +58 -97
  56. package/dist/esm/Picker.js +215 -276
  57. package/dist/esm/Popover/style/style.css +1 -1
  58. package/dist/esm/Popover.js +112 -159
  59. package/dist/esm/Price.js +23 -60
  60. package/dist/esm/Progress.js +47 -77
  61. package/dist/esm/PullToRefresh.js +94 -201
  62. package/dist/esm/RadioGroup.js +23 -53
  63. package/dist/esm/Range.js +113 -177
  64. package/dist/esm/Rate.js +48 -95
  65. package/dist/esm/Row.js +19 -43
  66. package/dist/esm/SearchBar.js +52 -119
  67. package/dist/esm/ShortPassword.js +58 -106
  68. package/dist/esm/SideNavBar.js +34 -59
  69. package/dist/esm/SideNavBarItem.js +7 -36
  70. package/dist/esm/Signature.js +49 -84
  71. package/dist/esm/Skeleton.js +31 -68
  72. package/dist/esm/Space.js +7 -34
  73. package/dist/esm/Step.js +35 -64
  74. package/dist/esm/Steps.js +16 -40
  75. package/dist/esm/Sticky.js +64 -108
  76. package/dist/esm/SubSideNavBar.js +42 -71
  77. package/dist/esm/Swipe/style/style.css +1 -1
  78. package/dist/esm/Swipe.js +79 -143
  79. package/dist/esm/Swiper.js +137 -184
  80. package/dist/esm/SwiperItem.js +13 -38
  81. package/dist/esm/Switch.js +20 -53
  82. package/dist/esm/TabPane.js +6 -30
  83. package/dist/esm/Tabbar/style/style.css +1 -1
  84. package/dist/esm/Tabbar.js +29 -59
  85. package/dist/esm/TabbarItem/style/style.css +1 -1
  86. package/dist/esm/Table.js +99 -147
  87. package/dist/esm/Tag.js +30 -74
  88. package/dist/esm/TextArea.js +37 -82
  89. package/dist/esm/TimeDetail.js +20 -58
  90. package/dist/esm/TimeSelect.js +57 -95
  91. package/dist/esm/Toast.js +110 -197
  92. package/dist/esm/Tour/style/style.css +1 -1
  93. package/dist/esm/Tour.js +88 -132
  94. package/dist/esm/TrendArrow.js +32 -74
  95. package/dist/esm/Uploader.js +226 -346
  96. package/dist/esm/UserContext.js +1 -1
  97. package/dist/esm/Video.js +34 -67
  98. package/dist/esm/VirtualList.js +127 -160
  99. package/dist/esm/WaterMark.js +24 -68
  100. package/dist/esm/badge2.js +26 -53
  101. package/dist/esm/button2.js +30 -63
  102. package/dist/esm/can-use-dom.js +1 -1
  103. package/dist/esm/cascader2.js +307 -536
  104. package/dist/esm/checkbox2.js +70 -96
  105. package/dist/esm/collapseitem2.js +48 -86
  106. package/dist/esm/configprovider2.js +43 -1003
  107. package/dist/esm/context.js +1 -1
  108. package/dist/esm/context2.js +1 -1
  109. package/dist/esm/context3.js +1 -1
  110. package/dist/esm/context4.js +1 -1
  111. package/dist/esm/context5.js +8 -8
  112. package/dist/esm/date.js +88 -66
  113. package/dist/esm/formitem2.js +236 -1510
  114. package/dist/esm/get-scroll-parent.js +8 -10
  115. package/dist/esm/griditem2.js +34 -52
  116. package/dist/esm/index.js +5 -12
  117. package/dist/esm/indicator2.js +13 -42
  118. package/dist/esm/menuitem2.js +81 -124
  119. package/dist/esm/overlay2.js +39 -78
  120. package/dist/esm/pad-zero.js +3 -4
  121. package/dist/esm/popup2.js +79 -124
  122. package/dist/esm/px-check.js +2 -2
  123. package/dist/esm/radio2.js +48 -79
  124. package/dist/esm/raf.js +5 -3
  125. package/dist/esm/render.js +17 -54
  126. package/dist/esm/safearea2.js +3 -5
  127. package/dist/esm/supports-passive.js +3 -3
  128. package/dist/esm/tabbaritem2.js +42 -58
  129. package/dist/esm/tabs2.js +82 -120
  130. package/dist/esm/tslib.es6.js +47 -0
  131. package/dist/esm/types/src/packages/button/demos/h5/demo1.d.ts +3 -0
  132. package/dist/esm/types/src/packages/button/demos/h5/demo2.d.ts +3 -0
  133. package/dist/esm/types/src/packages/button/demos/h5/demo3.d.ts +3 -0
  134. package/dist/esm/types/src/packages/button/demos/h5/demo4.d.ts +3 -0
  135. package/dist/esm/types/src/packages/button/demos/h5/demo5.d.ts +3 -0
  136. package/dist/esm/types/src/packages/button/demos/h5/demo6.d.ts +3 -0
  137. package/dist/esm/types/src/packages/button/demos/h5/demo7.d.ts +3 -0
  138. package/dist/esm/types/src/packages/button/demos/h5/demo8.d.ts +3 -0
  139. package/dist/esm/types/src/packages/button/demos/h5/demo9.d.ts +3 -0
  140. package/dist/esm/types/src/packages/button/demos/taro/demo1.d.ts +3 -0
  141. package/dist/esm/types/src/packages/button/demos/taro/demo10.d.ts +3 -0
  142. package/dist/esm/types/src/packages/button/demos/taro/demo2.d.ts +3 -0
  143. package/dist/esm/types/src/packages/button/demos/taro/demo3.d.ts +3 -0
  144. package/dist/esm/types/src/packages/button/demos/taro/demo4.d.ts +3 -0
  145. package/dist/esm/types/src/packages/button/demos/taro/demo5.d.ts +3 -0
  146. package/dist/esm/types/src/packages/button/demos/taro/demo6.d.ts +3 -0
  147. package/dist/esm/types/src/packages/button/demos/taro/demo7.d.ts +3 -0
  148. package/dist/esm/types/src/packages/button/demos/taro/demo8.d.ts +3 -0
  149. package/dist/esm/types/src/packages/button/demos/taro/demo9.d.ts +3 -0
  150. package/dist/esm/types/src/packages/cell/demo.d.ts +0 -1
  151. package/dist/esm/types/src/packages/cell/demo.taro.d.ts +0 -1
  152. package/dist/esm/types/src/packages/cell/demos/h5/demo1.d.ts +3 -0
  153. package/dist/esm/types/src/packages/cell/demos/h5/demo2.d.ts +3 -0
  154. package/dist/esm/types/src/packages/cell/demos/h5/demo3.d.ts +3 -0
  155. package/dist/esm/types/src/packages/cell/demos/h5/demo4.d.ts +3 -0
  156. package/dist/esm/types/src/packages/cell/demos/h5/demo5.d.ts +3 -0
  157. package/dist/esm/types/src/packages/cell/demos/h5/demo6.d.ts +3 -0
  158. package/dist/esm/types/src/packages/cell/demos/h5/demo7.d.ts +3 -0
  159. package/dist/esm/types/src/packages/cell/demos/taro/demo1.d.ts +3 -0
  160. package/dist/esm/types/src/packages/cell/demos/taro/demo2.d.ts +3 -0
  161. package/dist/esm/types/src/packages/cell/demos/taro/demo3.d.ts +3 -0
  162. package/dist/esm/types/src/packages/cell/demos/taro/demo4.d.ts +3 -0
  163. package/dist/esm/types/src/packages/cell/demos/taro/demo5.d.ts +3 -0
  164. package/dist/esm/types/src/packages/cell/demos/taro/demo6.d.ts +3 -0
  165. package/dist/esm/types/src/packages/cell/demos/taro/demo7.d.ts +3 -0
  166. package/dist/esm/types/src/packages/checkboxgroup/checkboxgroup.d.ts +1 -0
  167. package/dist/esm/types/src/packages/checkboxgroup/checkboxgroup.taro.d.ts +1 -0
  168. package/dist/esm/types/src/packages/checkboxgroup/context.d.ts +1 -0
  169. package/dist/esm/types/src/packages/configprovider/configprovider.d.ts +1 -0
  170. package/dist/esm/types/src/packages/configprovider/configprovider.taro.d.ts +1 -0
  171. package/dist/esm/types/src/packages/configprovider/index.d.ts +2 -2
  172. package/dist/esm/types/src/packages/configprovider/index.taro.d.ts +2 -2
  173. package/dist/esm/types/src/packages/configprovider/types.d.ts +1 -1
  174. package/dist/esm/types/src/packages/dialog/config.d.ts +3 -3
  175. package/dist/esm/types/src/packages/dialog/index.d.ts +1 -1
  176. package/dist/esm/types/src/packages/inputnumber/inputnumber.taro.d.ts +2 -0
  177. package/dist/esm/types/src/packages/noticebar/index.d.ts +1 -0
  178. package/dist/esm/types/src/packages/noticebar/noticebar.d.ts +2 -0
  179. package/dist/esm/types/src/packages/noticebar/noticebar.taro.d.ts +2 -0
  180. package/dist/esm/types/src/packages/noticebar/types.d.ts +1 -0
  181. package/dist/esm/types/src/packages/popover/index.d.ts +2 -1
  182. package/dist/esm/types/src/packages/popover/index.taro.d.ts +2 -1
  183. package/dist/esm/types/src/packages/popover/popover.d.ts +2 -12
  184. package/dist/esm/types/src/packages/popover/popover.taro.d.ts +2 -12
  185. package/dist/esm/types/src/packages/popover/types.d.ts +14 -0
  186. package/dist/esm/types/src/packages/table/useTableSticky.d.ts +1 -1
  187. package/dist/esm/types/src/packages/toast/toast.taro.d.ts +7 -3
  188. package/dist/esm/types/src/packages/tour/tour.d.ts +1 -1
  189. package/dist/esm/types/src/packages/tour/tour.taro.d.ts +1 -1
  190. package/dist/esm/typings.js +1 -1
  191. package/dist/esm/use-click-away.js +9 -13
  192. package/dist/esm/use-client-rect.js +4 -4
  193. package/dist/esm/use-props-value.js +10 -15
  194. package/dist/esm/use-refs.js +5 -7
  195. package/dist/esm/use-touch.js +16 -20
  196. package/dist/locales/base.js +1 -1
  197. package/dist/locales/en-US.js +1 -1
  198. package/dist/locales/id-ID.js +1 -1
  199. package/dist/locales/tr-TR.js +1 -1
  200. package/dist/locales/zh-CN.js +1 -1
  201. package/dist/locales/zh-TW.js +1 -1
  202. package/dist/locales/zh-UG.js +1 -1
  203. package/dist/nutui.react.es.js +297 -310
  204. package/dist/nutui.react.umd.js +294 -307
  205. package/dist/packages/animatingnumbers/countup.scss +1 -0
  206. package/dist/packages/badge/badge.scss +2 -0
  207. package/dist/packages/checkbox/checkbox.scss +19 -0
  208. package/dist/packages/checkboxgroup/checkboxgroup.scss +25 -0
  209. package/dist/packages/collapseitem/collapseitem.scss +1 -6
  210. package/dist/packages/dialog/dialog.scss +8 -1
  211. package/dist/packages/noticebar/noticebar.scss +19 -1
  212. package/dist/packages/popover/popover.scss +21 -0
  213. package/dist/packages/swipe/swipe.scss +2 -0
  214. package/dist/style.css +1 -1
  215. package/dist/style.mjs +1 -1
  216. package/dist/styles/variables-jmapp.scss +17 -0
  217. package/dist/styles/variables.scss +19 -12
  218. package/dist/types/index.d.ts +98 -98
  219. package/dist/types/packages/actionsheet/actionsheet.d.ts +1 -1
  220. package/dist/types/packages/actionsheet/actionsheet.taro.d.ts +1 -1
  221. package/dist/types/packages/address/address.d.ts +1 -1
  222. package/dist/types/packages/address/address.taro.d.ts +1 -1
  223. package/dist/types/packages/address/customRender.d.ts +1 -1
  224. package/dist/types/packages/address/customRender.taro.d.ts +1 -1
  225. package/dist/types/packages/avatar/avatar.d.ts +1 -1
  226. package/dist/types/packages/avatar/avatar.taro.d.ts +1 -1
  227. package/dist/types/packages/badge/badge.d.ts +1 -1
  228. package/dist/types/packages/button/demos/h5/demo1.d.ts +3 -0
  229. package/dist/types/packages/button/demos/h5/demo2.d.ts +3 -0
  230. package/dist/types/packages/button/demos/h5/demo3.d.ts +3 -0
  231. package/dist/types/packages/button/demos/h5/demo4.d.ts +3 -0
  232. package/dist/types/packages/button/demos/h5/demo5.d.ts +3 -0
  233. package/dist/types/packages/button/demos/h5/demo6.d.ts +3 -0
  234. package/dist/types/packages/button/demos/h5/demo7.d.ts +3 -0
  235. package/dist/types/packages/button/demos/h5/demo8.d.ts +3 -0
  236. package/dist/types/packages/button/demos/h5/demo9.d.ts +3 -0
  237. package/dist/types/packages/button/demos/taro/demo1.d.ts +3 -0
  238. package/dist/types/packages/button/demos/taro/demo10.d.ts +3 -0
  239. package/dist/types/packages/button/demos/taro/demo2.d.ts +3 -0
  240. package/dist/types/packages/button/demos/taro/demo3.d.ts +3 -0
  241. package/dist/types/packages/button/demos/taro/demo4.d.ts +3 -0
  242. package/dist/types/packages/button/demos/taro/demo5.d.ts +3 -0
  243. package/dist/types/packages/button/demos/taro/demo6.d.ts +3 -0
  244. package/dist/types/packages/button/demos/taro/demo7.d.ts +3 -0
  245. package/dist/types/packages/button/demos/taro/demo8.d.ts +3 -0
  246. package/dist/types/packages/button/demos/taro/demo9.d.ts +3 -0
  247. package/dist/types/packages/calendaritem/calendaritem.d.ts +1 -1
  248. package/dist/types/packages/calendaritem/calendaritem.taro.d.ts +1 -1
  249. package/dist/types/packages/cascader/cascader.d.ts +1 -1
  250. package/dist/types/packages/cascader/cascader.taro.d.ts +1 -1
  251. package/dist/types/packages/cell/cell.d.ts +1 -1
  252. package/dist/types/packages/cell/cell.taro.d.ts +1 -1
  253. package/dist/types/packages/cell/demos/h5/demo1.d.ts +3 -0
  254. package/dist/types/packages/cell/demos/h5/demo2.d.ts +3 -0
  255. package/dist/types/packages/cell/demos/h5/demo3.d.ts +3 -0
  256. package/dist/types/packages/cell/demos/h5/demo4.d.ts +3 -0
  257. package/dist/types/packages/cell/demos/h5/demo5.d.ts +3 -0
  258. package/dist/types/packages/cell/demos/h5/demo6.d.ts +3 -0
  259. package/dist/types/packages/cell/demos/h5/demo7.d.ts +3 -0
  260. package/dist/types/packages/cell/demos/taro/demo1.d.ts +3 -0
  261. package/dist/types/packages/cell/demos/taro/demo2.d.ts +3 -0
  262. package/dist/types/packages/cell/demos/taro/demo3.d.ts +3 -0
  263. package/dist/types/packages/cell/demos/taro/demo4.d.ts +3 -0
  264. package/dist/types/packages/cell/demos/taro/demo5.d.ts +3 -0
  265. package/dist/types/packages/cell/demos/taro/demo6.d.ts +3 -0
  266. package/dist/types/packages/cell/demos/taro/demo7.d.ts +3 -0
  267. package/dist/types/packages/checkbox/checkbox.d.ts +2 -2
  268. package/dist/types/packages/checkbox/checkbox.taro.d.ts +2 -2
  269. package/dist/types/packages/checkboxgroup/checkboxgroup.d.ts +3 -2
  270. package/dist/types/packages/checkboxgroup/checkboxgroup.taro.d.ts +3 -2
  271. package/dist/types/packages/checkboxgroup/context.d.ts +1 -0
  272. package/dist/types/packages/configprovider/configprovider.d.ts +1 -0
  273. package/dist/types/packages/configprovider/configprovider.taro.d.ts +1 -0
  274. package/dist/types/packages/configprovider/index.d.ts +2 -2
  275. package/dist/types/packages/configprovider/index.taro.d.ts +2 -2
  276. package/dist/types/packages/configprovider/types.d.ts +1 -1
  277. package/dist/types/packages/datepicker/datepicker.d.ts +1 -1
  278. package/dist/types/packages/datepicker/datepicker.taro.d.ts +1 -1
  279. package/dist/types/packages/dialog/config.d.ts +3 -3
  280. package/dist/types/packages/dialog/dialogwrap.d.ts +1 -1
  281. package/dist/types/packages/dialog/index.d.ts +1 -1
  282. package/dist/types/packages/empty/empty.d.ts +16 -4
  283. package/dist/types/packages/fixednav/fixednav.d.ts +1 -1
  284. package/dist/types/packages/fixednav/fixednav.taro.d.ts +1 -1
  285. package/dist/types/packages/form/form.d.ts +1 -1
  286. package/dist/types/packages/form/form.taro.d.ts +1 -1
  287. package/dist/types/packages/form/index.d.ts +1 -1
  288. package/dist/types/packages/form/index.taro.d.ts +1 -1
  289. package/dist/types/packages/inputnumber/inputnumber.taro.d.ts +2 -0
  290. package/dist/types/packages/menu/menu.d.ts +1 -1
  291. package/dist/types/packages/menu/menu.taro.d.ts +1 -1
  292. package/dist/types/packages/noticebar/index.d.ts +1 -0
  293. package/dist/types/packages/noticebar/noticebar.d.ts +6 -0
  294. package/dist/types/packages/noticebar/noticebar.taro.d.ts +2 -0
  295. package/dist/types/packages/noticebar/types.d.ts +1 -0
  296. package/dist/types/packages/numberkeyboard/numberkeyboard.d.ts +1 -1
  297. package/dist/types/packages/numberkeyboard/numberkeyboard.taro.d.ts +1 -1
  298. package/dist/types/packages/nutui.react.d.ts +98 -98
  299. package/dist/types/packages/nutui.react.taro.d.ts +98 -98
  300. package/dist/types/packages/nutui.taro.react.build.d.ts +98 -98
  301. package/dist/types/packages/picker/picker.d.ts +1 -1
  302. package/dist/types/packages/picker/picker.taro.d.ts +1 -1
  303. package/dist/types/packages/popover/index.d.ts +2 -1
  304. package/dist/types/packages/popover/index.taro.d.ts +2 -1
  305. package/dist/types/packages/popover/popover.d.ts +3 -13
  306. package/dist/types/packages/popover/popover.taro.d.ts +3 -13
  307. package/dist/types/packages/popover/types.d.ts +14 -0
  308. package/dist/types/packages/popup/popup.d.ts +1 -1
  309. package/dist/types/packages/popup/popup.taro.d.ts +1 -1
  310. package/dist/types/packages/radio/radio.d.ts +2 -2
  311. package/dist/types/packages/radio/radio.taro.d.ts +2 -2
  312. package/dist/types/packages/rate/rate.d.ts +1 -1
  313. package/dist/types/packages/shortpassword/shortpassword.d.ts +1 -1
  314. package/dist/types/packages/shortpassword/shortpassword.taro.d.ts +1 -1
  315. package/dist/types/packages/swiper/index.d.ts +1 -1
  316. package/dist/types/packages/swiper/index.taro.d.ts +1 -1
  317. package/dist/types/packages/table/useTableSticky.d.ts +1 -1
  318. package/dist/types/packages/tabs/tabs.d.ts +1 -1
  319. package/dist/types/packages/tabs/tabs.taro.d.ts +1 -1
  320. package/dist/types/packages/timedetail/timedetail.d.ts +1 -1
  321. package/dist/types/packages/timedetail/timedetail.taro.d.ts +1 -1
  322. package/dist/types/packages/toast/toast.d.ts +2 -2
  323. package/dist/types/packages/toast/toast.taro.d.ts +7 -3
  324. package/dist/types/packages/tour/tour.d.ts +1 -1
  325. package/dist/types/packages/tour/tour.taro.d.ts +1 -1
  326. 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.4.0-beta.0 Fri Mar 08 2024 14:11:47 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,8 @@ const defaultProps$1b = {
11115
11116
  color: ""
11116
11117
  };
11117
11118
  const Badge = (props) => {
11118
- var _a2;
11119
+ var _a;
11120
+ const rtl = useRtl();
11119
11121
  const { className, style, value, max, children, dot, top, right, color } = {
11120
11122
  ...defaultProps$1b,
11121
11123
  ...props
@@ -11147,13 +11149,14 @@ const Badge = (props) => {
11147
11149
  `${classPrefix2}-content`,
11148
11150
  { [`${classPrefix2}-sup`]: isNumber() || isString() || dot },
11149
11151
  {
11150
- [`${classPrefix2}-one`]: typeof content() === "string" && ((_a2 = `${content()}`) == null ? void 0 : _a2.length) === 1
11152
+ [`${classPrefix2}-one`]: typeof content() === "string" && ((_a = `${content()}`) == null ? void 0 : _a.length) === 1
11151
11153
  }
11152
11154
  );
11153
11155
  const getStyle = () => {
11154
11156
  const style2 = {};
11155
11157
  style2.top = `${Number(top) || parseFloat(String(top)) || 0}px`;
11156
- style2.right = `${Number(right) || parseFloat(String(right)) || 0}px`;
11158
+ const dir = rtl ? "left" : "right";
11159
+ style2[dir] = `${Number(right) || parseFloat(String(right)) || 0}px`;
11157
11160
  style2.background = color;
11158
11161
  return style2;
11159
11162
  };
@@ -11584,22 +11587,19 @@ const convertListToOptions = (list, options2) => {
11584
11587
  };
11585
11588
  class Tree {
11586
11589
  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) => {
11590
+ this.isLeaf = (node, lazy) => {
11591
11591
  const { leaf, children } = node;
11592
11592
  const hasChildren = Array.isArray(children) && Boolean(children.length);
11593
11593
  return leaf || !hasChildren && !lazy;
11594
- });
11595
- __publicField(this, "hasChildren", (node, lazy) => {
11594
+ };
11595
+ this.hasChildren = (node, lazy) => {
11596
11596
  const isLeaf = this.isLeaf(node, lazy);
11597
11597
  if (isLeaf) {
11598
11598
  return false;
11599
11599
  }
11600
11600
  const { children } = node;
11601
11601
  return Array.isArray(children) && Boolean(children.length);
11602
- });
11602
+ };
11603
11603
  this.config = {
11604
11604
  value: "value",
11605
11605
  text: "text",
@@ -11793,10 +11793,10 @@ const InternalCascader = (props, ref) => {
11793
11793
  needToSync = [parent.value];
11794
11794
  state.initLoading = true;
11795
11795
  const last = await currentValue.slice(1).reduce(async (p, value2) => {
11796
- var _a2;
11796
+ var _a;
11797
11797
  const parent2 = await p;
11798
11798
  await invokeLazyLoad(parent2);
11799
- const node = (_a2 = parent2 == null ? void 0 : parent2.children) == null ? void 0 : _a2.find(
11799
+ const node = (_a = parent2 == null ? void 0 : parent2.children) == null ? void 0 : _a.find(
11800
11800
  (item) => item.value === value2
11801
11801
  );
11802
11802
  if (node) {
@@ -11832,8 +11832,8 @@ const InternalCascader = (props, ref) => {
11832
11832
  let lazyLoadPromise = state.lazyLoadMap.get(node);
11833
11833
  if (!lazyLoadPromise) {
11834
11834
  lazyLoadPromise = new Promise((resolve) => {
11835
- var _a2, _b;
11836
- (_b = (_a2 = state.configs).onLoad) == null ? void 0 : _b.call(_a2, node, resolve);
11835
+ var _a, _b;
11836
+ (_b = (_a = state.configs).onLoad) == null ? void 0 : _b.call(_a, node, resolve);
11837
11837
  });
11838
11838
  state.lazyLoadMap.set(node, lazyLoadPromise);
11839
11839
  }
@@ -11903,9 +11903,9 @@ const InternalCascader = (props, ref) => {
11903
11903
  setOptionsData(state.panes);
11904
11904
  };
11905
11905
  const renderItem = (pane, node, index) => {
11906
- var _a2;
11906
+ var _a;
11907
11907
  const classPrefix22 = "nut-cascader-item";
11908
- const checked = ((_a2 = pane.selectedNode) == null ? void 0 : _a2.value) === node.value;
11908
+ const checked = ((_a = pane.selectedNode) == null ? void 0 : _a.value) === node.value;
11909
11909
  const classes = classNames(
11910
11910
  {
11911
11911
  active: checked,
@@ -11951,7 +11951,7 @@ const InternalCascader = (props, ref) => {
11951
11951
  value: tabvalue,
11952
11952
  title: () => {
11953
11953
  return optionsData.map((pane, index) => {
11954
- var _a2, _b;
11954
+ var _a, _b;
11955
11955
  return /* @__PURE__ */ React__default.createElement(
11956
11956
  "div",
11957
11957
  {
@@ -11962,15 +11962,15 @@ const InternalCascader = (props, ref) => {
11962
11962
  className: `nut-tabs-titles-item ${tabvalue === pane.paneKey ? "nut-tabs-titles-item-active" : ""}`,
11963
11963
  key: pane.paneKey
11964
11964
  },
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..."),
11965
+ /* @__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
11966
  /* @__PURE__ */ React__default.createElement("span", { className: "nut-tabs-titles-item-line" })
11967
11967
  );
11968
11968
  });
11969
11969
  }
11970
11970
  },
11971
11971
  !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(
11972
+ var _a;
11973
+ 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
11974
  (node, index) => renderItem(pane, node, index)
11975
11975
  )));
11976
11976
  }) : /* @__PURE__ */ React__default.createElement(Tabs.TabPane, null, /* @__PURE__ */ React__default.createElement("div", { className: classesPane }))
@@ -13164,8 +13164,8 @@ const Calendar = React__default.forwardRef((props, ref) => {
13164
13164
  onDayClick && onDayClick(param);
13165
13165
  };
13166
13166
  const scrollToDate = (date4) => {
13167
- var _a2;
13168
- (_a2 = calendarRef.current) == null ? void 0 : _a2.scrollToDate(date4);
13167
+ var _a;
13168
+ (_a = calendarRef.current) == null ? void 0 : _a.scrollToDate(date4);
13169
13169
  };
13170
13170
  const yearMonthChange = (param) => {
13171
13171
  onPageChange && onPageChange(param);
@@ -13665,6 +13665,7 @@ const Context$1 = CheckboxGroupContext;
13665
13665
  const defaultProps$$ = {
13666
13666
  max: void 0,
13667
13667
  min: void 0,
13668
+ list: false,
13668
13669
  labelPosition: "right",
13669
13670
  direction: "vertical",
13670
13671
  onChange: (value) => {
@@ -13680,6 +13681,7 @@ const CheckboxGroup = React__default.forwardRef(
13680
13681
  children,
13681
13682
  className,
13682
13683
  disabled,
13684
+ list,
13683
13685
  onChange,
13684
13686
  value,
13685
13687
  defaultValue,
@@ -13743,6 +13745,7 @@ const CheckboxGroup = React__default.forwardRef(
13743
13745
  labelPosition: labelPosition || "right",
13744
13746
  disabled,
13745
13747
  max,
13748
+ list,
13746
13749
  onLimit,
13747
13750
  value: _value,
13748
13751
  check: (value2) => {
@@ -13769,7 +13772,8 @@ const CheckboxGroup = React__default.forwardRef(
13769
13772
  className: classNames(
13770
13773
  classPrefix$i,
13771
13774
  {
13772
- [`nut-checkboxgroup-${props.direction}`]: props.direction
13775
+ [`nut-checkboxgroup-${props.direction}`]: props.direction,
13776
+ [`nut-checkboxgroup-list`]: list
13773
13777
  },
13774
13778
  className
13775
13779
  ),
@@ -13912,7 +13916,13 @@ const Checkbox = (props) => {
13912
13916
  innerChecked && activeIcon ? /* @__PURE__ */ React__default.createElement("div", { className: classNames(`${classPrefix$h}-button-icon`) }, activeIcon) : null
13913
13917
  );
13914
13918
  };
13919
+ const renderListItem = () => {
13920
+ return /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$h}-list-item` }, renderLabel(), renderIcon());
13921
+ };
13915
13922
  const renderCheckboxItem = () => {
13923
+ if (ctx2 == null ? void 0 : ctx2.list) {
13924
+ return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, renderListItem());
13925
+ }
13916
13926
  if (shape === "button") {
13917
13927
  return renderButton();
13918
13928
  }
@@ -14103,14 +14113,14 @@ const InternalPickerPanel = (props, ref) => {
14103
14113
  moving: moving.current
14104
14114
  }));
14105
14115
  useEffect(() => {
14106
- var _a2, _b, _c;
14116
+ var _a, _b, _c;
14107
14117
  const options22 = passiveSupported ? { passive: false } : false;
14108
- (_a2 = PickerPanelRef.current) == null ? void 0 : _a2.addEventListener("touchstart", touchStart, options22);
14118
+ (_a = PickerPanelRef.current) == null ? void 0 : _a.addEventListener("touchstart", touchStart, options22);
14109
14119
  (_b = PickerPanelRef.current) == null ? void 0 : _b.addEventListener("touchmove", touchMove, options22);
14110
14120
  (_c = PickerPanelRef.current) == null ? void 0 : _c.addEventListener("touchend", touchEnd, options22);
14111
14121
  return () => {
14112
- var _a3, _b2, _c2;
14113
- (_a3 = PickerPanelRef.current) == null ? void 0 : _a3.removeEventListener("touchstart", touchStart);
14122
+ var _a2, _b2, _c2;
14123
+ (_a2 = PickerPanelRef.current) == null ? void 0 : _a2.removeEventListener("touchstart", touchStart);
14114
14124
  (_b2 = PickerPanelRef.current) == null ? void 0 : _b2.removeEventListener("touchmove", touchMove);
14115
14125
  (_c2 = PickerPanelRef.current) == null ? void 0 : _c2.removeEventListener("touchend", touchEnd);
14116
14126
  };
@@ -14214,8 +14224,8 @@ const InternalPicker = (props, ref) => {
14214
14224
  defaultValue: [...defaultValue],
14215
14225
  finalValue: [...defaultValue],
14216
14226
  onChange: (val) => {
14217
- var _a2;
14218
- (_a2 = props.onConfirm) == null ? void 0 : _a2.call(props, setSelectedOptions(), val);
14227
+ var _a;
14228
+ (_a = props.onConfirm) == null ? void 0 : _a.call(props, setSelectedOptions(), val);
14219
14229
  }
14220
14230
  });
14221
14231
  const [innerVisible, setInnerVisible] = usePropsValue({
@@ -14223,8 +14233,8 @@ const InternalPicker = (props, ref) => {
14223
14233
  defaultValue: false,
14224
14234
  finalValue: false,
14225
14235
  onChange: (val) => {
14226
- var _a2;
14227
- (_a2 = props.onClose) == null ? void 0 : _a2.call(props, setSelectedOptions(), innerValue);
14236
+ var _a;
14237
+ (_a = props.onClose) == null ? void 0 : _a.call(props, setSelectedOptions(), innerValue);
14228
14238
  }
14229
14239
  });
14230
14240
  const [innerValue, setInnerValue] = useState(selectedValue);
@@ -14326,14 +14336,14 @@ const InternalPicker = (props, ref) => {
14326
14336
  return options22;
14327
14337
  };
14328
14338
  const chooseItem = (columnOptions, columnIndex2) => {
14329
- var _a2, _b;
14339
+ var _a, _b;
14330
14340
  const values = [];
14331
14341
  const start2 = columnIndex2;
14332
14342
  if (columnOptions && Object.keys(columnOptions).length) {
14333
14343
  if (values[columnIndex2] !== columnOptions.value) {
14334
14344
  if (columnsType() === "cascade") {
14335
14345
  values[columnIndex2] = columnOptions.value || "";
14336
- while ((_a2 = columnOptions == null ? void 0 : columnOptions.children) == null ? void 0 : _a2[0]) {
14346
+ while ((_a = columnOptions == null ? void 0 : columnOptions.children) == null ? void 0 : _a[0]) {
14337
14347
  values[columnIndex2 + 1] = columnOptions.children[0].value;
14338
14348
  columnIndex2++;
14339
14349
  columnOptions = columnOptions.children[0];
@@ -14409,9 +14419,9 @@ const InternalPicker = (props, ref) => {
14409
14419
  visible: innerVisible,
14410
14420
  position: "bottom",
14411
14421
  onOverlayClick: () => {
14412
- var _a2;
14422
+ var _a;
14413
14423
  if (closeOnOverlayClick) {
14414
- (_a2 = props.onCancel) == null ? void 0 : _a2.call(props);
14424
+ (_a = props.onCancel) == null ? void 0 : _a.call(props);
14415
14425
  setInnerVisible(false);
14416
14426
  }
14417
14427
  },
@@ -14602,7 +14612,7 @@ const DatePicker = (props) => {
14602
14612
  }
14603
14613
  };
14604
14614
  const handlePickerChange = (selectedOptions, selectedValue, index) => {
14605
- var _a2;
14615
+ var _a;
14606
14616
  const rangeType = type4.toLocaleLowerCase();
14607
14617
  if (["date", "datetime", "datehour", "month-day", "year-month"].includes(
14608
14618
  rangeType
@@ -14641,7 +14651,7 @@ const DatePicker = (props) => {
14641
14651
  } else if (rangeType === "datehour") {
14642
14652
  date4 = new Date(year, month, day, Number(formatDate[3]));
14643
14653
  }
14644
- const isEqual2 = ((_a2 = new Date(selectedDate)) == null ? void 0 : _a2.getTime()) === (date4 == null ? void 0 : date4.getTime());
14654
+ const isEqual2 = ((_a = new Date(selectedDate)) == null ? void 0 : _a.getTime()) === (date4 == null ? void 0 : date4.getTime());
14645
14655
  date4 && isDate(date4) && !isEqual2 && setSelectedDate(formatValue(date4));
14646
14656
  }
14647
14657
  props.onChange && props.onChange(selectedOptions, selectedValue, index);
@@ -14658,7 +14668,7 @@ const DatePicker = (props) => {
14658
14668
  return { text: padMin + fatter, value: padMin };
14659
14669
  };
14660
14670
  const generateColumn = (min, max, val, type22, columnIndex) => {
14661
- var _a2;
14671
+ var _a;
14662
14672
  let cmin = min;
14663
14673
  const arr = [];
14664
14674
  let index = 0;
@@ -14669,11 +14679,11 @@ const DatePicker = (props) => {
14669
14679
  } else {
14670
14680
  cmin++;
14671
14681
  }
14672
- if (cmin <= val) {
14682
+ if (cmin <= Number(val)) {
14673
14683
  index++;
14674
14684
  }
14675
14685
  }
14676
- pickerValue[columnIndex] = (_a2 = arr[index]) == null ? void 0 : _a2.value;
14686
+ pickerValue[columnIndex] = (_a = arr[index]) == null ? void 0 : _a.value;
14677
14687
  setPickerValue([...pickerValue]);
14678
14688
  if (props.filter && props.filter(type22, arr)) {
14679
14689
  return props.filter(type22, arr);
@@ -15794,21 +15804,13 @@ Schema.validators = validators;
15794
15804
  const SECRET = "NUT_FORM_INTERNAL";
15795
15805
  class FormStore {
15796
15806
  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) => {
15807
+ this.initialValues = {};
15808
+ this.updateList = [];
15809
+ this.store = {};
15810
+ this.fieldEntities = [];
15811
+ this.callbacks = {};
15812
+ this.errors = {};
15813
+ this.registerField = (field) => {
15812
15814
  this.fieldEntities.push(field);
15813
15815
  return () => {
15814
15816
  this.fieldEntities = this.fieldEntities.filter((item) => item !== field);
@@ -15816,19 +15818,12 @@ class FormStore {
15816
15818
  delete this.store[field.props.name];
15817
15819
  }
15818
15820
  };
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) => {
15821
+ };
15822
+ this.getFieldValue = (name) => {
15823
+ var _a;
15824
+ return (_a = this.store) == null ? void 0 : _a[name];
15825
+ };
15826
+ this.getFieldsValue = (nameList) => {
15832
15827
  if (typeof nameList === "boolean") {
15833
15828
  return JSON.parse(JSON.stringify(this.store));
15834
15829
  }
@@ -15837,23 +15832,14 @@ class FormStore {
15837
15832
  fieldsValue[field] = this.getFieldValue(field);
15838
15833
  });
15839
15834
  return fieldsValue;
15840
- });
15841
- /**
15842
- * 设置 form 的初始值,之后在 reset 的时候使用
15843
- * @param values
15844
- * @param init
15845
- */
15846
- __publicField(this, "setInitialValues", (values, init) => {
15835
+ };
15836
+ this.setInitialValues = (values, init) => {
15847
15837
  if (init) {
15848
15838
  this.initialValues = values;
15849
15839
  this.store = values;
15850
15840
  }
15851
- });
15852
- /**
15853
- * 存储组件数据
15854
- * @param newStore { [name]: newValue }
15855
- */
15856
- __publicField(this, "setFieldsValue", (newStore) => {
15841
+ };
15842
+ this.setFieldsValue = (newStore) => {
15857
15843
  this.store = {
15858
15844
  ...this.store,
15859
15845
  ...newStore
@@ -15875,15 +15861,15 @@ class FormStore {
15875
15861
  item.entity.onStoreChange("update");
15876
15862
  }
15877
15863
  });
15878
- });
15879
- __publicField(this, "setCallback", (callback) => {
15864
+ };
15865
+ this.setCallback = (callback) => {
15880
15866
  this.callbacks = {
15881
15867
  ...this.callbacks,
15882
15868
  ...callback
15883
15869
  };
15884
- });
15885
- __publicField(this, "validateFields", async (nameList) => {
15886
- var _a2;
15870
+ };
15871
+ this.validateFields = async (nameList) => {
15872
+ var _a;
15887
15873
  let filterEntitys = [];
15888
15874
  const errs = [];
15889
15875
  this.errors.length = 0;
@@ -15909,7 +15895,7 @@ class FormStore {
15909
15895
  }
15910
15896
  const validator = new Schema(descriptor);
15911
15897
  try {
15912
- await validator.validate({ [name]: (_a2 = this.store) == null ? void 0 : _a2[name] });
15898
+ await validator.validate({ [name]: (_a = this.store) == null ? void 0 : _a[name] });
15913
15899
  } catch ({ errors }) {
15914
15900
  if (errors) {
15915
15901
  errs.push(...errors);
@@ -15923,25 +15909,24 @@ class FormStore {
15923
15909
  entity.onStoreChange("validate");
15924
15910
  }
15925
15911
  return errs;
15926
- });
15927
- __publicField(this, "submit", async () => {
15928
- var _a2, _b, _c, _d;
15912
+ };
15913
+ this.submit = async () => {
15914
+ var _a, _b, _c, _d;
15929
15915
  const errors = await this.validateFields();
15930
15916
  if (errors.length === 0) {
15931
- (_b = (_a2 = this.callbacks).onFinish) == null ? void 0 : _b.call(_a2, this.store);
15917
+ (_b = (_a = this.callbacks).onFinish) == null ? void 0 : _b.call(_a, this.store);
15932
15918
  } else if (errors.length > 0) {
15933
15919
  (_d = (_c = this.callbacks).onFinishFailed) == null ? void 0 : _d.call(_c, this.store, errors);
15934
15920
  }
15935
- });
15936
- __publicField(this, "resetFields", () => {
15921
+ };
15922
+ this.resetFields = () => {
15937
15923
  this.errors.length = 0;
15938
15924
  this.store = this.initialValues;
15939
15925
  this.fieldEntities.forEach((entity) => {
15940
15926
  entity.onStoreChange("reset");
15941
15927
  });
15942
- });
15943
- // 监听事件
15944
- __publicField(this, "registerUpdate", (field, shouldUpdate) => {
15928
+ };
15929
+ this.registerUpdate = (field, shouldUpdate) => {
15945
15930
  this.updateList.push({
15946
15931
  entity: field,
15947
15932
  condition: shouldUpdate
@@ -15949,11 +15934,11 @@ class FormStore {
15949
15934
  return () => {
15950
15935
  this.updateList = this.updateList.filter((i) => i.entity !== field);
15951
15936
  };
15952
- });
15953
- __publicField(this, "dispatch", ({ name }) => {
15937
+ };
15938
+ this.dispatch = ({ name }) => {
15954
15939
  this.validateFields([name]);
15955
- });
15956
- __publicField(this, "getInternal", (key) => {
15940
+ };
15941
+ this.getInternal = (key) => {
15957
15942
  if (key === SECRET) {
15958
15943
  return {
15959
15944
  registerField: this.registerField,
@@ -15965,8 +15950,8 @@ class FormStore {
15965
15950
  registerUpdate: this.registerUpdate
15966
15951
  };
15967
15952
  }
15968
- });
15969
- __publicField(this, "getForm", () => {
15953
+ };
15954
+ this.getForm = () => {
15970
15955
  return {
15971
15956
  getFieldValue: this.getFieldValue,
15972
15957
  getFieldsValue: this.getFieldsValue,
@@ -15977,7 +15962,7 @@ class FormStore {
15977
15962
  errors: this.errors,
15978
15963
  getInternal: this.getInternal
15979
15964
  };
15980
- });
15965
+ };
15981
15966
  this.callbacks = {
15982
15967
  onFinish: () => {
15983
15968
  },
@@ -16097,19 +16082,15 @@ const defaultProps$W = {
16097
16082
  shouldUpdate: false,
16098
16083
  noStyle: false
16099
16084
  };
16100
- class FormItem extends React__default.Component {
16085
+ const _FormItem = class _FormItem extends React__default.Component {
16101
16086
  constructor(props) {
16102
16087
  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;
16088
+ this.getControlled = (children) => {
16089
+ var _a;
16109
16090
  const { setFieldsValue, getFieldValue } = this.context;
16110
16091
  const { dispatch } = this.context.getInternal(SECRET);
16111
16092
  const { name = "" } = this.props;
16112
- if ((_a2 = children == null ? void 0 : children.props) == null ? void 0 : _a2.defaultValue) {
16093
+ if ((_a = children == null ? void 0 : children.props) == null ? void 0 : _a.defaultValue) {
16113
16094
  console.warn("通过 initialValue 设置初始值");
16114
16095
  }
16115
16096
  const fieldValue = getFieldValue(name);
@@ -16131,7 +16112,7 @@ class FormItem extends React__default.Component {
16131
16112
  const { validateTrigger } = this.props;
16132
16113
  let validateTriggers = [this.props.trigger || "onChange"];
16133
16114
  if (validateTrigger) {
16134
- validateTriggers = typeof validateTrigger === "string" ? [...validateTriggers, validateTrigger] : [...validateTriggers, ...validateTrigger];
16115
+ validateTriggers = typeof validateTrigger === "string" ? [validateTrigger] : [...validateTrigger];
16135
16116
  validateTriggers.forEach((trigger) => {
16136
16117
  const originTrigger = controlled[trigger];
16137
16118
  controlled[trigger] = (...args) => {
@@ -16161,21 +16142,21 @@ class FormItem extends React__default.Component {
16161
16142
  };
16162
16143
  }
16163
16144
  return controlled;
16164
- });
16165
- __publicField(this, "refresh", () => {
16145
+ };
16146
+ this.refresh = () => {
16166
16147
  this.setState(({ resetCount }) => ({
16167
16148
  resetCount: resetCount + 1
16168
16149
  }));
16169
- });
16170
- __publicField(this, "onStoreChange", (type4) => {
16150
+ };
16151
+ this.onStoreChange = (type4) => {
16171
16152
  if (type4 === "reset") {
16172
16153
  this.context.errors[this.props.name] = [];
16173
16154
  this.refresh();
16174
16155
  } else {
16175
16156
  this.forceUpdate();
16176
16157
  }
16177
- });
16178
- __publicField(this, "renderLayout", (childNode) => {
16158
+ };
16159
+ this.renderLayout = (childNode) => {
16179
16160
  const {
16180
16161
  label,
16181
16162
  name,
@@ -16210,7 +16191,7 @@ class FormItem extends React__default.Component {
16210
16191
  item[0].message
16211
16192
  ))
16212
16193
  );
16213
- });
16194
+ };
16214
16195
  this.componentRef = React__default.createRef();
16215
16196
  this.state = {
16216
16197
  resetCount: 1
@@ -16243,9 +16224,10 @@ class FormItem extends React__default.Component {
16243
16224
  }
16244
16225
  return /* @__PURE__ */ React__default.createElement(React__default.Fragment, { key: this.state.resetCount }, this.props.noStyle ? returnChildNode : this.renderLayout(returnChildNode));
16245
16226
  }
16246
- }
16247
- __publicField(FormItem, "defaultProps", defaultProps$W);
16248
- __publicField(FormItem, "contextType", Context);
16227
+ };
16228
+ _FormItem.defaultProps = defaultProps$W;
16229
+ _FormItem.contextType = Context;
16230
+ let FormItem = _FormItem;
16249
16231
  const InnerForm = Form;
16250
16232
  InnerForm.Item = FormItem;
16251
16233
  InnerForm.useForm = useForm;
@@ -16334,12 +16316,12 @@ const Input = forwardRef(
16334
16316
  setValue("");
16335
16317
  },
16336
16318
  focus: () => {
16337
- var _a2;
16338
- (_a2 = inputRef.current) == null ? void 0 : _a2.focus();
16319
+ var _a;
16320
+ (_a = inputRef.current) == null ? void 0 : _a.focus();
16339
16321
  },
16340
16322
  blur: () => {
16341
- var _a2;
16342
- (_a2 = inputRef.current) == null ? void 0 : _a2.blur();
16323
+ var _a;
16324
+ (_a = inputRef.current) == null ? void 0 : _a.blur();
16343
16325
  },
16344
16326
  get nativeElement() {
16345
16327
  return inputRef.current;
@@ -16429,14 +16411,14 @@ const Input = forwardRef(
16429
16411
  handleInput(e2.currentTarget.value);
16430
16412
  },
16431
16413
  onCompositionStart: (e2) => {
16432
- var _a2;
16414
+ var _a;
16433
16415
  composingRef.current = true;
16434
- (_a2 = props.onCompositionStart) == null ? void 0 : _a2.call(props, e2);
16416
+ (_a = props.onCompositionStart) == null ? void 0 : _a.call(props, e2);
16435
16417
  },
16436
16418
  onCompositionEnd: (e2) => {
16437
- var _a2;
16419
+ var _a;
16438
16420
  composingRef.current = false;
16439
- (_a2 = props.onCompositionEnd) == null ? void 0 : _a2.call(props, e2);
16421
+ (_a = props.onCompositionEnd) == null ? void 0 : _a.call(props, e2);
16440
16422
  }
16441
16423
  }
16442
16424
  ),
@@ -16503,14 +16485,15 @@ const InputNumber = (props) => {
16503
16485
  const [focused, setFocused] = useState(false);
16504
16486
  const inputRef = useRef(null);
16505
16487
  useEffect(() => {
16506
- var _a2, _b;
16488
+ var _a, _b;
16507
16489
  if (focused) {
16508
- (_b = (_a2 = inputRef.current) == null ? void 0 : _a2.select) == null ? void 0 : _b.call(_a2);
16490
+ (_b = (_a = inputRef.current) == null ? void 0 : _a.select) == null ? void 0 : _b.call(_a);
16509
16491
  }
16510
16492
  }, [focused]);
16511
16493
  const [shadowValue, setShadowValue] = usePropsValue({
16512
16494
  value: typeof value === "string" ? parseFloat(value) : value,
16513
16495
  defaultValue: typeof defaultValue === "string" ? parseFloat(defaultValue) : defaultValue,
16496
+ finalValue: 0,
16514
16497
  onChange: (value2) => {
16515
16498
  }
16516
16499
  });
@@ -16564,7 +16547,7 @@ const InputNumber = (props) => {
16564
16547
  );
16565
16548
  const nextValue = bound2(shouldOverBoundary, Number(min), Number(max));
16566
16549
  setShadowValue(nextValue);
16567
- if (negative ? shouldOverBoundary < min : shouldOverBoundary > max) {
16550
+ if (negative ? shouldOverBoundary < Number(min) : shouldOverBoundary > Number(max)) {
16568
16551
  onOverlimit == null ? void 0 : onOverlimit(e2);
16569
16552
  } else {
16570
16553
  onChange == null ? void 0 : onChange(nextValue, e2);
@@ -17450,6 +17433,7 @@ const defaultProps$O = {
17450
17433
  marks: {}
17451
17434
  };
17452
17435
  const Range = (props) => {
17436
+ const rtl = useRtl();
17453
17437
  const {
17454
17438
  className,
17455
17439
  range: range3,
@@ -17562,15 +17546,17 @@ const Range = (props) => {
17562
17546
  transition: dragStatus ? "none" : void 0
17563
17547
  };
17564
17548
  }
17549
+ const dir = rtl ? "right" : "left";
17565
17550
  return {
17566
17551
  width: calcMainAxis(),
17567
- left: calcOffset(),
17552
+ [dir]: calcOffset(),
17568
17553
  transition: dragStatus ? "none" : void 0
17569
17554
  };
17570
17555
  };
17571
17556
  const marksStyle = (mark) => {
17557
+ const dir = rtl ? "right" : "left";
17572
17558
  let style = {
17573
- left: `${(mark - min) / scope() * 100}%`
17559
+ [dir]: `${(mark - min) / scope() * 100}%`
17574
17560
  };
17575
17561
  if (vertical) {
17576
17562
  style = {
@@ -17662,6 +17648,7 @@ const Range = (props) => {
17662
17648
  let delta = touch.deltaX.current;
17663
17649
  let total = rect.width;
17664
17650
  let diff = delta / total * scope();
17651
+ diff = rtl ? -diff : diff;
17665
17652
  if (vertical) {
17666
17653
  delta = touch.deltaY.current;
17667
17654
  total = rect.height;
@@ -17819,8 +17806,8 @@ const Rate = (props) => {
17819
17806
  setScore(value2);
17820
17807
  };
17821
17808
  const getScoreByPosition = (x) => {
17822
- var _a2;
17823
- if ((_a2 = rateRects.current) == null ? void 0 : _a2.length) {
17809
+ var _a;
17810
+ if ((_a = rateRects.current) == null ? void 0 : _a.length) {
17824
17811
  for (let index = rateRects.current.length - 1; index >= 0; index--) {
17825
17812
  const item = rateRects.current[index];
17826
17813
  if (item && x > item.left) {
@@ -18500,22 +18487,14 @@ TextArea.defaultProps = defaultProps$I;
18500
18487
  TextArea.displayName = "NutTextArea";
18501
18488
  class UploadOptions {
18502
18489
  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");
18490
+ this.url = "";
18491
+ this.name = "file";
18492
+ this.fileType = "image";
18493
+ this.method = "post";
18494
+ this.xhrState = 200;
18495
+ this.timeout = 30 * 1e3;
18496
+ this.headers = {};
18497
+ this.withCredentials = false;
18519
18498
  }
18520
18499
  }
18521
18500
  const UPLOADING = "uploading";
@@ -18523,11 +18502,10 @@ const SUCCESS = "success";
18523
18502
  const ERROR = "error";
18524
18503
  class Upload {
18525
18504
  constructor(options2) {
18526
- __publicField(this, "options");
18527
18505
  this.options = options2;
18528
18506
  }
18529
18507
  upload() {
18530
- var _a2;
18508
+ var _a;
18531
18509
  const { options: options2 } = this;
18532
18510
  const xhr = new XMLHttpRequest();
18533
18511
  xhr.timeout = options2.timeout;
@@ -18535,16 +18513,16 @@ class Upload {
18535
18513
  xhr.upload.addEventListener(
18536
18514
  "progress",
18537
18515
  (e2) => {
18538
- var _a3;
18539
- (_a3 = options2.onProgress) == null ? void 0 : _a3.call(options2, e2, options2);
18516
+ var _a2;
18517
+ (_a2 = options2.onProgress) == null ? void 0 : _a2.call(options2, e2, options2);
18540
18518
  },
18541
18519
  false
18542
18520
  );
18543
18521
  xhr.onreadystatechange = () => {
18544
- var _a3, _b;
18522
+ var _a2, _b;
18545
18523
  if (xhr.readyState === 4) {
18546
18524
  if (xhr.status === options2.xhrState) {
18547
- (_a3 = options2.onSuccess) == null ? void 0 : _a3.call(options2, xhr.responseText, options2);
18525
+ (_a2 = options2.onSuccess) == null ? void 0 : _a2.call(options2, xhr.responseText, options2);
18548
18526
  } else {
18549
18527
  (_b = options2.onFailure) == null ? void 0 : _b.call(options2, xhr.responseText, options2);
18550
18528
  }
@@ -18555,7 +18533,7 @@ class Upload {
18555
18533
  for (const [key, value] of Object.entries(options2.headers)) {
18556
18534
  xhr.setRequestHeader(key, value);
18557
18535
  }
18558
- (_a2 = options2.onStart) == null ? void 0 : _a2.call(options2, options2);
18536
+ (_a = options2.onStart) == null ? void 0 : _a.call(options2, options2);
18559
18537
  if (options2.beforeXhrUpload) {
18560
18538
  options2.beforeXhrUpload(xhr, options2);
18561
18539
  } else {
@@ -18600,6 +18578,7 @@ const defaultProps$H = {
18600
18578
  delay: 0
18601
18579
  };
18602
18580
  const Progress = (props) => {
18581
+ const rtl = useRtl();
18603
18582
  const {
18604
18583
  className,
18605
18584
  style,
@@ -18693,7 +18672,7 @@ const Progress = (props) => {
18693
18672
  "div",
18694
18673
  {
18695
18674
  className: `${classPrefix2}-text`,
18696
- style: { left: `${displayPercent}%` }
18675
+ style: rtl ? { right: `${displayPercent}%` } : { left: `${displayPercent}%` }
18697
18676
  },
18698
18677
  children || /* @__PURE__ */ React__default.createElement(
18699
18678
  "div",
@@ -18727,7 +18706,7 @@ const Preview = ({
18727
18706
  return item.loadingIcon || /* @__PURE__ */ React__default.createElement(t$2, { className: "nut-icon-loading", color: "#fff" });
18728
18707
  };
18729
18708
  return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, fileList.length !== 0 && fileList.map((item, index) => {
18730
- var _a2;
18709
+ var _a;
18731
18710
  return /* @__PURE__ */ React__default.createElement(
18732
18711
  "div",
18733
18712
  {
@@ -18742,7 +18721,7 @@ const Preview = ({
18742
18721
  onClick: () => onDeleteItem(item, index)
18743
18722
  }
18744
18723
  ),
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(
18724
+ 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
18725
  "img",
18747
18726
  {
18748
18727
  className: "nut-uploader-preview-img-c",
@@ -18796,18 +18775,11 @@ const Preview = ({
18796
18775
  };
18797
18776
  class FileItem {
18798
18777
  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");
18778
+ this.status = "ready";
18779
+ this.message = "准备中..";
18780
+ this.uid = (/* @__PURE__ */ new Date()).getTime().toString();
18781
+ this.percentage = 0;
18782
+ this.formData = {};
18811
18783
  }
18812
18784
  }
18813
18785
  const defaultProps$G = {
@@ -18915,11 +18887,11 @@ const InternalUploader = (props, ref) => {
18915
18887
  el.value = "";
18916
18888
  };
18917
18889
  const executeUpload = (fileItem, index) => {
18918
- var _a2, _b;
18890
+ var _a, _b;
18919
18891
  const uploadOption = new UploadOptions();
18920
18892
  uploadOption.url = url2;
18921
18893
  for (const [key, value2] of Object.entries(data)) {
18922
- (_a2 = fileItem.formData) == null ? void 0 : _a2.append(key, value2);
18894
+ (_a = fileItem.formData) == null ? void 0 : _a.append(key, value2);
18923
18895
  }
18924
18896
  uploadOption.formData = fileItem.formData;
18925
18897
  uploadOption.timeout = timeout2 * 1;
@@ -19006,7 +18978,7 @@ const InternalUploader = (props, ref) => {
19006
18978
  };
19007
18979
  const readFile = (files) => {
19008
18980
  files.forEach((file, index) => {
19009
- var _a2;
18981
+ var _a;
19010
18982
  const formData = new FormData();
19011
18983
  formData.append(name, file);
19012
18984
  const fileItem = new FileItem();
@@ -19017,7 +18989,7 @@ const InternalUploader = (props, ref) => {
19017
18989
  fileItem.uid = file.lastModified + fileItem.uid;
19018
18990
  fileItem.message = autoUpload ? locale.uploader.readyUpload : locale.uploader.waitingUpload;
19019
18991
  executeUpload(fileItem, index);
19020
- if (preview && ((_a2 = file.type) == null ? void 0 : _a2.includes("image"))) {
18992
+ if (preview && ((_a = file.type) == null ? void 0 : _a.includes("image"))) {
19021
18993
  const reader = new FileReader();
19022
18994
  reader.onload = (event) => {
19023
18995
  fileItem.url = event.target.result;
@@ -19090,7 +19062,7 @@ const InternalUploader = (props, ref) => {
19090
19062
  const handleItemClick = (file, index) => {
19091
19063
  onFileItemClick == null ? void 0 : onFileItemClick(file, index);
19092
19064
  };
19093
- return /* @__PURE__ */ React__default.createElement("div", { className: classes, ...restProps }, (children || previewType === "list") && /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader-slot" }, children || /* @__PURE__ */ React__default.createElement(Button, { size: "small", type: "primary" }, "上传文件"), maxCount > fileList.length && /* @__PURE__ */ React__default.createElement(
19065
+ return /* @__PURE__ */ React__default.createElement("div", { className: classes, ...restProps }, (children || previewType === "list") && /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader-slot" }, children || /* @__PURE__ */ React__default.createElement(Button, { size: "small", type: "primary" }, "上传文件"), Number(maxCount) > fileList.length && /* @__PURE__ */ React__default.createElement(
19094
19066
  "input",
19095
19067
  {
19096
19068
  className: "nut-uploader-input",
@@ -19115,7 +19087,7 @@ const InternalUploader = (props, ref) => {
19115
19087
  children
19116
19088
  }
19117
19089
  }
19118
- ), maxCount > fileList.length && previewType === "picture" && !children && /* @__PURE__ */ React__default.createElement(
19090
+ ), Number(maxCount) > fileList.length && previewType === "picture" && !children && /* @__PURE__ */ React__default.createElement(
19119
19091
  "div",
19120
19092
  {
19121
19093
  className: classNames("nut-uploader-upload", previewType, {
@@ -19255,8 +19227,8 @@ function legacyUnmount(container) {
19255
19227
  }
19256
19228
  async function concurrentUnmount(container) {
19257
19229
  return Promise.resolve().then(() => {
19258
- var _a2;
19259
- (_a2 = container[MARK]) == null ? void 0 : _a2.unmount();
19230
+ var _a;
19231
+ (_a = container[MARK]) == null ? void 0 : _a.unmount();
19260
19232
  delete container[MARK];
19261
19233
  });
19262
19234
  }
@@ -19300,7 +19272,7 @@ const confirm = (config2, renderFunc) => {
19300
19272
  const ret = _onConfirm == null ? void 0 : _onConfirm();
19301
19273
  if (ret && ret.then) {
19302
19274
  renderFunction(dialogConfig);
19303
- ret.then(
19275
+ return ret.then(
19304
19276
  () => {
19305
19277
  onCancel(true);
19306
19278
  },
@@ -19501,6 +19473,7 @@ const BaseDialog = (props, ref) => {
19501
19473
  ...restProps
19502
19474
  } = props;
19503
19475
  const classPrefix2 = "nut-dialog";
19476
+ const [loading, setLoading] = useState(false);
19504
19477
  const renderFooter = () => {
19505
19478
  if (footer === null)
19506
19479
  return "";
@@ -19513,10 +19486,16 @@ const BaseDialog = (props, ref) => {
19513
19486
  onClose == null ? void 0 : onClose();
19514
19487
  onCancel == null ? void 0 : onCancel();
19515
19488
  };
19516
- const handleOk = (e2) => {
19489
+ const handleOk = async (e2) => {
19517
19490
  e2.stopPropagation();
19518
- onClose == null ? void 0 : onClose();
19519
- onConfirm == null ? void 0 : onConfirm(e2);
19491
+ setLoading(true);
19492
+ try {
19493
+ await (onConfirm == null ? void 0 : onConfirm(e2));
19494
+ setLoading(false);
19495
+ onClose == null ? void 0 : onClose();
19496
+ } catch {
19497
+ setLoading(false);
19498
+ }
19520
19499
  };
19521
19500
  return footer || /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, !hideCancelButton && /* @__PURE__ */ React__default.createElement(
19522
19501
  Button,
@@ -19534,7 +19513,8 @@ const BaseDialog = (props, ref) => {
19534
19513
  disabled: disableConfirmButton
19535
19514
  }),
19536
19515
  disabled: disableConfirmButton,
19537
- onClick: (e2) => handleOk(e2)
19516
+ onClick: (e2) => handleOk(e2),
19517
+ loading
19538
19518
  },
19539
19519
  confirmText || locale.confirm
19540
19520
  ));
@@ -19778,16 +19758,16 @@ const InfiniteLoading = (props) => {
19778
19758
  const distance = useRef(0);
19779
19759
  const classes = classNames(classPrefix$d, className);
19780
19760
  useEffect(() => {
19781
- var _a2;
19761
+ var _a;
19782
19762
  if (target && document.getElementById(target)) {
19783
19763
  scrollEl.current = document.getElementById(target);
19784
19764
  } else {
19785
19765
  scrollEl.current = window;
19786
19766
  }
19787
- (_a2 = scrollEl.current) == null ? void 0 : _a2.addEventListener("scroll", handleScroll, capture);
19767
+ (_a = scrollEl.current) == null ? void 0 : _a.addEventListener("scroll", handleScroll, capture);
19788
19768
  return () => {
19789
- var _a3;
19790
- (_a3 = scrollEl.current) == null ? void 0 : _a3.removeEventListener("scroll", handleScroll, capture);
19769
+ var _a2;
19770
+ (_a2 = scrollEl.current) == null ? void 0 : _a2.removeEventListener("scroll", handleScroll, capture);
19791
19771
  };
19792
19772
  }, [hasMore, isInfiniting, onLoadMore]);
19793
19773
  useEffect(() => {
@@ -19939,6 +19919,7 @@ Loading.defaultProps = defaultProps$A;
19939
19919
  Loading.displayName = "NutLoading";
19940
19920
  const defaultProps$z = {
19941
19921
  ...ComponentDefaults,
19922
+ align: "left",
19942
19923
  direction: "horizontal",
19943
19924
  list: [],
19944
19925
  duration: 1e3,
@@ -19953,10 +19934,12 @@ const defaultProps$z = {
19953
19934
  speed: 50
19954
19935
  };
19955
19936
  const NoticeBar = (props) => {
19937
+ const rtl = useRtl();
19956
19938
  const {
19957
19939
  children,
19958
19940
  className,
19959
19941
  style,
19942
+ align,
19960
19943
  direction,
19961
19944
  list,
19962
19945
  duration,
@@ -20061,7 +20044,7 @@ const NoticeBar = (props) => {
20061
20044
  }
20062
20045
  const wrapW = getRect(wrapRef.current).width;
20063
20046
  const offsetW = getRect(contentRef.current).width;
20064
- const canScroll = scrollable == null ? offsetW > wrapW : scrollable;
20047
+ const canScroll = align === "left" && scrollable == null ? offsetW > wrapW : scrollable;
20065
20048
  SetIsCanScroll(canScroll);
20066
20049
  if (canScroll) {
20067
20050
  SetWrapWidth(wrapW);
@@ -20111,7 +20094,7 @@ const NoticeBar = (props) => {
20111
20094
  onClose && onClose(event);
20112
20095
  };
20113
20096
  const isEllipsis = () => {
20114
- if (isCanScroll == null) {
20097
+ if (isCanScroll == null && align === "left") {
20115
20098
  return wrap;
20116
20099
  }
20117
20100
  return !isCanScroll && !wrap;
@@ -20119,7 +20102,7 @@ const NoticeBar = (props) => {
20119
20102
  const contentStyle = {
20120
20103
  animationDelay: `${firstRound ? delay : 0}s`,
20121
20104
  animationDuration: `${animationDuration}s`,
20122
- transform: `translateX(${firstRound ? 0 : `${wrapWidth}px`})`
20105
+ transform: `translateX(${firstRound ? 0 : `${rtl ? -wrapWidth : wrapWidth}px`})`
20123
20106
  };
20124
20107
  const barStyle = {
20125
20108
  height: isVertical ? `${height}px` : ""
@@ -20261,15 +20244,17 @@ const NoticeBar = (props) => {
20261
20244
  }
20262
20245
  };
20263
20246
  const noticebarClass = classNames({
20264
- "nut-noticebar-box": true,
20265
- [`nut-noticebar-box-wrapable`]: wrap
20247
+ [`${classPrefix2}-box`]: true,
20248
+ [`${classPrefix2}-box-wrapable`]: wrap,
20249
+ [`${classPrefix2}-box-${align}`]: true
20266
20250
  });
20251
+ const cls = classNames(classPrefix2, className);
20267
20252
  useEffect(() => {
20268
20253
  return () => {
20269
20254
  stopAutoPlay();
20270
20255
  };
20271
20256
  }, []);
20272
- return /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2} ${className || ""}`, style }, showNoticeBar && direction === "horizontal" ? /* @__PURE__ */ React__default.createElement("div", { className: noticebarClass, style: barStyle, onClick: handleClick2 }, leftIcon ? /* @__PURE__ */ React__default.createElement("div", { className: "nut-noticebar-box-left-icon" }, leftIcon) : null, /* @__PURE__ */ React__default.createElement("div", { ref: wrapRef, className: "nut-noticebar-box-wrap" }, /* @__PURE__ */ React__default.createElement(
20257
+ return /* @__PURE__ */ React__default.createElement("div", { className: cls, style }, showNoticeBar && direction === "horizontal" ? /* @__PURE__ */ React__default.createElement("div", { className: noticebarClass, style: barStyle, onClick: handleClick2 }, leftIcon ? /* @__PURE__ */ React__default.createElement("div", { className: "nut-noticebar-box-left-icon" }, leftIcon) : null, /* @__PURE__ */ React__default.createElement("div", { ref: wrapRef, className: "nut-noticebar-box-wrap" }, /* @__PURE__ */ React__default.createElement(
20273
20258
  "div",
20274
20259
  {
20275
20260
  ref: contentRef,
@@ -20339,10 +20324,9 @@ const NoticeBar = (props) => {
20339
20324
  NoticeBar.defaultProps = defaultProps$z;
20340
20325
  NoticeBar.displayName = "NutNoticeBar";
20341
20326
  const classPrefix$c = "nut-notify";
20342
- let Notification$1 = (_a = class extends React.PureComponent {
20327
+ let Notification$1 = class Notification extends React.PureComponent {
20343
20328
  constructor(props) {
20344
20329
  super(props);
20345
- __publicField(this, "closeTimer");
20346
20330
  this.close = this.close.bind(this);
20347
20331
  this.startCloseTimer = this.startCloseTimer.bind(this);
20348
20332
  this.clearCloseTimer = this.clearCloseTimer.bind(this);
@@ -20415,7 +20399,7 @@ let Notification$1 = (_a = class extends React.PureComponent {
20415
20399
  )
20416
20400
  ));
20417
20401
  }
20418
- }, __publicField(_a, "newInstance"), _a);
20402
+ };
20419
20403
  Notification$1.newInstance = (properties, callback) => {
20420
20404
  const element = document.createElement("div");
20421
20405
  const id = properties.id ? properties.id : `${(/* @__PURE__ */ new Date()).getTime()}`;
@@ -20504,6 +20488,7 @@ const Notify = {
20504
20488
  const defaultProps$y = {
20505
20489
  ...ComponentDefaults,
20506
20490
  list: [],
20491
+ theme: "light",
20507
20492
  location: "bottom",
20508
20493
  visible: false,
20509
20494
  offset: [0, 12],
@@ -20525,6 +20510,7 @@ const Popover = (props) => {
20525
20510
  const {
20526
20511
  children,
20527
20512
  list,
20513
+ theme,
20528
20514
  location,
20529
20515
  visible,
20530
20516
  offset,
@@ -20581,8 +20567,8 @@ const Popover = (props) => {
20581
20567
  }
20582
20568
  useClickAway(
20583
20569
  () => {
20584
- var _a2;
20585
- (_a2 = props.onClick) == null ? void 0 : _a2.call(props);
20570
+ var _a;
20571
+ (_a = props.onClick) == null ? void 0 : _a.call(props);
20586
20572
  onClose == null ? void 0 : onClose();
20587
20573
  },
20588
20574
  targetSet,
@@ -20608,7 +20594,8 @@ const Popover = (props) => {
20608
20594
  };
20609
20595
  const classes = classNames(
20610
20596
  {
20611
- [`${classPrefix$b}`]: true
20597
+ [`${classPrefix$b}`]: true,
20598
+ [`${classPrefix$b}-${theme}`]: theme === "dark"
20612
20599
  },
20613
20600
  className
20614
20601
  );
@@ -20618,11 +20605,11 @@ const Popover = (props) => {
20618
20605
  return `${prefixCls2} ${prefixCls2}-${direction} ${prefixCls2}-${location}`;
20619
20606
  };
20620
20607
  const getRootPosition = () => {
20621
- var _a2, _b;
20608
+ var _a, _b;
20622
20609
  const styles = {};
20623
20610
  if (!rootPosition)
20624
20611
  return {};
20625
- const contentWidth = (_a2 = popoverContentRef.current) == null ? void 0 : _a2.clientWidth;
20612
+ const contentWidth = (_a = popoverContentRef.current) == null ? void 0 : _a.clientWidth;
20626
20613
  const contentHeight = (_b = popoverContentRef.current) == null ? void 0 : _b.clientHeight;
20627
20614
  const { width, height, left, top, right } = rootPosition;
20628
20615
  const direction = location.split("-")[0];
@@ -20695,12 +20682,12 @@ const Popover = (props) => {
20695
20682
  return styles;
20696
20683
  };
20697
20684
  const handleSelect = (item, index) => {
20698
- var _a2;
20685
+ var _a;
20699
20686
  if (!item.disabled) {
20700
20687
  onSelect == null ? void 0 : onSelect(item, index);
20701
20688
  }
20702
20689
  if (closeOnActionClick) {
20703
- (_a2 = props.onClick) == null ? void 0 : _a2.call(props);
20690
+ (_a = props.onClick) == null ? void 0 : _a.call(props);
20704
20691
  onClose == null ? void 0 : onClose();
20705
20692
  }
20706
20693
  };
@@ -20710,8 +20697,8 @@ const Popover = (props) => {
20710
20697
  className: "nut-popover-wrapper",
20711
20698
  ref: popoverRef,
20712
20699
  onClick: () => {
20713
- var _a2;
20714
- (_a2 = props.onClick) == null ? void 0 : _a2.call(props);
20700
+ var _a;
20701
+ (_a = props.onClick) == null ? void 0 : _a.call(props);
20715
20702
  if (!visible) {
20716
20703
  onOpen == null ? void 0 : onOpen();
20717
20704
  } else {
@@ -20761,8 +20748,8 @@ const Popover = (props) => {
20761
20748
  {
20762
20749
  className: "nut-popover-menu-item-action-icon",
20763
20750
  onClick: (e2) => {
20764
- var _a2, _b;
20765
- return (_b = (_a2 = item.action) == null ? void 0 : _a2.onClick) == null ? void 0 : _b.call(_a2, e2);
20751
+ var _a, _b;
20752
+ return (_b = (_a = item.action) == null ? void 0 : _a.onClick) == null ? void 0 : _b.call(_a, e2);
20766
20753
  }
20767
20754
  },
20768
20755
  item.action.icon
@@ -20839,8 +20826,8 @@ const PullToRefresh = (p) => {
20839
20826
  const elementRef = useRef(null);
20840
20827
  const pullingRef = useRef(false);
20841
20828
  useEffect(() => {
20842
- var _a2;
20843
- (_a2 = elementRef.current) == null ? void 0 : _a2.addEventListener("touchmove", () => {
20829
+ var _a;
20830
+ (_a = elementRef.current) == null ? void 0 : _a.addEventListener("touchmove", () => {
20844
20831
  });
20845
20832
  }, []);
20846
20833
  async function doRefresh() {
@@ -20930,16 +20917,16 @@ const PullToRefresh = (p) => {
20930
20917
  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
20918
  };
20932
20919
  const renderStatusIcon = () => {
20933
- var _a2;
20920
+ var _a;
20934
20921
  if (props.renderIcon) {
20935
- return (_a2 = props.renderIcon) == null ? void 0 : _a2.call(props, status);
20922
+ return (_a = props.renderIcon) == null ? void 0 : _a.call(props, status);
20936
20923
  }
20937
20924
  return renderIcons(status);
20938
20925
  };
20939
20926
  const renderStatusText = () => {
20940
- var _a2;
20927
+ var _a;
20941
20928
  if (props.renderText) {
20942
- return (_a2 = props.renderText) == null ? void 0 : _a2.call(props, status);
20929
+ return (_a = props.renderText) == null ? void 0 : _a.call(props, status);
20943
20930
  }
20944
20931
  if (status === "pulling")
20945
20932
  return props.pullingText;
@@ -21009,7 +20996,7 @@ const defaultProps$v = {
21009
20996
  };
21010
20997
  const classPrefix$9 = `nut-avatar`;
21011
20998
  const Avatar = (props) => {
21012
- var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
20999
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
21013
21000
  const {
21014
21001
  children,
21015
21002
  size,
@@ -21036,7 +21023,7 @@ const Avatar = (props) => {
21036
21023
  const parent = useContext(AvatarContext);
21037
21024
  const sizeValue = ["large", "normal", "small"];
21038
21025
  const classes = classNames({
21039
- [`nut-avatar-${((_a2 = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _a2.size) || size || "normal"}`]: true,
21026
+ [`nut-avatar-${((_a = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _a.size) || size || "normal"}`]: true,
21040
21027
  [`nut-avatar-${((_b = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _b.shape) || shape}`]: true
21041
21028
  });
21042
21029
  const cls = classNames(classPrefix$9, classes, className);
@@ -21054,20 +21041,20 @@ const Avatar = (props) => {
21054
21041
  color: `${(_g = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _g.maxColor}`
21055
21042
  };
21056
21043
  useEffect(() => {
21057
- var _a3;
21058
- const avatarChildren = (_a3 = parent == null ? void 0 : parent.avatarGroupRef) == null ? void 0 : _a3.current.children;
21044
+ var _a2;
21045
+ const avatarChildren = (_a2 = parent == null ? void 0 : parent.avatarGroupRef) == null ? void 0 : _a2.current.children;
21059
21046
  if (avatarChildren) {
21060
21047
  avatarLength(avatarChildren);
21061
21048
  }
21062
21049
  }, []);
21063
21050
  const avatarLength = (children2) => {
21064
- var _a3, _b2, _c2;
21051
+ var _a2, _b2, _c2;
21065
21052
  for (let i = 0; i < children2.length; i++) {
21066
21053
  if (children2[i] && children2[i].classList && children2[i].classList[0] === "nut-avatar") {
21067
21054
  children2[i].setAttribute("data-index", i + 1);
21068
21055
  }
21069
21056
  }
21070
- const index = Number((_b2 = (_a3 = avatarRef == null ? void 0 : avatarRef.current) == null ? void 0 : _a3.dataset) == null ? void 0 : _b2.index);
21057
+ const index = Number((_b2 = (_a2 = avatarRef == null ? void 0 : avatarRef.current) == null ? void 0 : _a2.dataset) == null ? void 0 : _b2.index);
21071
21058
  const maxCount = (_c2 = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _c2.max;
21072
21059
  setMaxSum(children2.length);
21073
21060
  setAvatarIndex(index);
@@ -21206,20 +21193,20 @@ const Swipe = forwardRef((props, instanceRef) => {
21206
21193
  const leftWidth = actionWidth.left;
21207
21194
  const rightWidth = actionWidth.right;
21208
21195
  const onTouchStart = (event) => {
21209
- var _a2;
21196
+ var _a;
21210
21197
  if (!props.disabled) {
21211
21198
  startOffset.current = state.offset;
21212
21199
  touch.start(event);
21213
- (_a2 = props.onTouchStart) == null ? void 0 : _a2.call(props, event);
21200
+ (_a = props.onTouchStart) == null ? void 0 : _a.call(props, event);
21214
21201
  }
21215
21202
  };
21216
21203
  const onTouchMove = (event) => {
21217
- var _a2;
21204
+ var _a;
21218
21205
  if (props.disabled) {
21219
21206
  return;
21220
21207
  }
21221
21208
  touch.move(event);
21222
- (_a2 = props.onTouchMove) == null ? void 0 : _a2.call(props, event);
21209
+ (_a = props.onTouchMove) == null ? void 0 : _a.call(props, event);
21223
21210
  if (touch.isHorizontal()) {
21224
21211
  lockClick.current = true;
21225
21212
  const newState = { ...state, dragging: true };
@@ -21236,14 +21223,14 @@ const Swipe = forwardRef((props, instanceRef) => {
21236
21223
  }
21237
21224
  };
21238
21225
  const onTouchEnd = (event) => {
21239
- var _a2;
21226
+ var _a;
21240
21227
  if (state.dragging) {
21241
21228
  setState((v) => ({ ...v, dragging: false }));
21242
21229
  toggle(state.offset > 0 ? "left" : "right");
21243
21230
  setTimeout(() => {
21244
21231
  lockClick.current = false;
21245
21232
  }, 0);
21246
- (_a2 = props.onTouchEnd) == null ? void 0 : _a2.call(props, event);
21233
+ (_a = props.onTouchEnd) == null ? void 0 : _a.call(props, event);
21247
21234
  }
21248
21235
  };
21249
21236
  const toggle = (side) => {
@@ -21258,18 +21245,18 @@ const Swipe = forwardRef((props, instanceRef) => {
21258
21245
  }
21259
21246
  };
21260
21247
  const open = (side) => {
21261
- var _a2;
21248
+ var _a;
21262
21249
  opened.current = true;
21263
21250
  const offset = side === "left" ? leftWidth : -rightWidth;
21264
21251
  const name = props.name;
21265
- (_a2 = props.onOpen) == null ? void 0 : _a2.call(props, { name, position: side });
21252
+ (_a = props.onOpen) == null ? void 0 : _a.call(props, { name, position: side });
21266
21253
  setState((v) => ({ ...v, offset: Number(offset) || 0 }));
21267
21254
  };
21268
21255
  const close = (position) => {
21269
- var _a2;
21256
+ var _a;
21270
21257
  if (opened.current) {
21271
21258
  opened.current = false;
21272
- (_a2 = props.onClose) == null ? void 0 : _a2.call(props, {
21259
+ (_a = props.onClose) == null ? void 0 : _a.call(props, {
21273
21260
  name: props.name,
21274
21261
  position: position || "left"
21275
21262
  });
@@ -21360,10 +21347,9 @@ const Swipe = forwardRef((props, instanceRef) => {
21360
21347
  Swipe.defaultProps = defaultProps$t;
21361
21348
  Swipe.displayName = "NutSwipe";
21362
21349
  const classPrefix$8 = "nut-toast";
21363
- class Notification extends React.PureComponent {
21350
+ class Notification2 extends React.PureComponent {
21364
21351
  constructor(props) {
21365
21352
  super(props);
21366
- __publicField(this, "closeTimer");
21367
21353
  this.close = this.close.bind(this);
21368
21354
  this.startCloseTimer = this.startCloseTimer.bind(this);
21369
21355
  this.clearCloseTimer = this.clearCloseTimer.bind(this);
@@ -21477,8 +21463,7 @@ class Notification extends React.PureComponent {
21477
21463
  ));
21478
21464
  }
21479
21465
  }
21480
- __publicField(Notification, "newInstance");
21481
- Notification.newInstance = (properties, callback) => {
21466
+ Notification2.newInstance = (properties, callback) => {
21482
21467
  const element = document.createElement("div");
21483
21468
  const id = properties.id ? properties.id : `${(/* @__PURE__ */ new Date()).getTime()}`;
21484
21469
  element.id = id;
@@ -21498,7 +21483,7 @@ Notification.newInstance = (properties, callback) => {
21498
21483
  }
21499
21484
  });
21500
21485
  }
21501
- render(/* @__PURE__ */ React.createElement(Notification, { ...properties, ref }), element);
21486
+ render(/* @__PURE__ */ React.createElement(Notification2, { ...properties, ref }), element);
21502
21487
  };
21503
21488
  let messageInstance = null;
21504
21489
  let options = {
@@ -21524,7 +21509,7 @@ function getInstance(props, callback) {
21524
21509
  messageInstance.destroy();
21525
21510
  messageInstance = null;
21526
21511
  }
21527
- Notification.newInstance(props, (notification) => {
21512
+ Notification2.newInstance(props, (notification) => {
21528
21513
  return callback && callback(notification);
21529
21514
  });
21530
21515
  }
@@ -21689,7 +21674,7 @@ const CountUp = (props) => {
21689
21674
  CountUp.defaultProps = defaultProps$r;
21690
21675
  CountUp.displayName = "NutCountUp";
21691
21676
  const defaultProps$q = {};
21692
- class AnimatingNumbers extends Component {
21677
+ const _AnimatingNumbers = class _AnimatingNumbers extends Component {
21693
21678
  constructor(props) {
21694
21679
  super(props);
21695
21680
  this.state = {};
@@ -21697,10 +21682,11 @@ class AnimatingNumbers extends Component {
21697
21682
  render() {
21698
21683
  return /* @__PURE__ */ React__default.createElement("div", { className: "nut-animatingnumbers" });
21699
21684
  }
21700
- }
21701
- __publicField(AnimatingNumbers, "defaultProps", defaultProps$q);
21702
- __publicField(AnimatingNumbers, "displayName", "NutAnimatingNumbers");
21703
- __publicField(AnimatingNumbers, "CountUp", CountUp);
21685
+ };
21686
+ _AnimatingNumbers.defaultProps = defaultProps$q;
21687
+ _AnimatingNumbers.displayName = "NutAnimatingNumbers";
21688
+ _AnimatingNumbers.CountUp = CountUp;
21689
+ let AnimatingNumbers = _AnimatingNumbers;
21704
21690
  AnimatingNumbers.CountUp = CountUp;
21705
21691
  const defaultProps$p = {
21706
21692
  ...ComponentDefaults,
@@ -21963,7 +21949,7 @@ const defaultProps$o = {
21963
21949
  };
21964
21950
  const classPrefix$6 = `nut-circleprogress`;
21965
21951
  const CircleProgress = (props) => {
21966
- var _a2;
21952
+ var _a;
21967
21953
  const {
21968
21954
  children,
21969
21955
  percent,
@@ -22022,7 +22008,7 @@ const CircleProgress = (props) => {
22022
22008
  });
22023
22009
  return stopArr;
22024
22010
  };
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) => {
22011
+ 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
22012
  return /* @__PURE__ */ React__default.createElement("stop", { key: index, offset: item.key, stopColor: item.value });
22027
22013
  }))), /* @__PURE__ */ React__default.createElement(
22028
22014
  "path",
@@ -22108,8 +22094,8 @@ const CollapseItem = (props) => {
22108
22094
  }
22109
22095
  };
22110
22096
  const getOffsetHeight = () => {
22111
- var _a2;
22112
- const height = (_a2 = contentRef.current) == null ? void 0 : _a2.offsetHeight;
22097
+ var _a;
22098
+ const height = (_a = contentRef.current) == null ? void 0 : _a.offsetHeight;
22113
22099
  return height ? `${height}px` : "";
22114
22100
  };
22115
22101
  const toggle = () => {
@@ -22291,7 +22277,7 @@ const InternalCountDown = (props, ref) => {
22291
22277
  if (!timeStr)
22292
22278
  return Date.now();
22293
22279
  let t2 = timeStr;
22294
- t2 = t2 > 0 ? +t2 : t2.toString().replace(/-/g, "/");
22280
+ t2 = Number(t2) > 0 ? +t2 : t2.toString().replace(/-/g, "/");
22295
22281
  return new Date(t2).getTime();
22296
22282
  };
22297
22283
  const initTime = () => {
@@ -22490,7 +22476,7 @@ const defaultProps$k = {
22490
22476
  };
22491
22477
  const classPrefix$5 = `nut-ellipsis`;
22492
22478
  const Ellipsis = (props) => {
22493
- var _a2, _b;
22479
+ var _a, _b;
22494
22480
  const {
22495
22481
  children,
22496
22482
  content,
@@ -22630,7 +22616,7 @@ const Ellipsis = (props) => {
22630
22616
  const handleClick2 = () => {
22631
22617
  onClick && onClick();
22632
22618
  };
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(
22619
+ 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
22620
  "span",
22635
22621
  {
22636
22622
  className: "nut-ellipsis-text",
@@ -22847,7 +22833,7 @@ const Swiper = React__default.forwardRef((props, ref) => {
22847
22833
  swiperRef.current.autoplayTimer = null;
22848
22834
  };
22849
22835
  const startPlay = () => {
22850
- if (mergedProps.autoPlay <= 0 || swiperItemCount <= 1)
22836
+ if (Number(mergedProps.autoPlay) <= 0 || swiperItemCount <= 1)
22851
22837
  return;
22852
22838
  stopAutoPlay();
22853
22839
  swiperRef.current.autoplayTimer = setTimeout(() => {
@@ -22918,7 +22904,7 @@ const Swiper = React__default.forwardRef((props, ref) => {
22918
22904
  isEmit = false,
22919
22905
  movingStatus = false
22920
22906
  }) => {
22921
- var _a2;
22907
+ var _a;
22922
22908
  if (swiperItemCount <= 1)
22923
22909
  return;
22924
22910
  const targetActive = getActive(pace);
@@ -22935,7 +22921,7 @@ const Swiper = React__default.forwardRef((props, ref) => {
22935
22921
  setChildOffset(childOffset);
22936
22922
  }
22937
22923
  if (isEmit && active !== targetActive) {
22938
- (_a2 = props.onChange) == null ? void 0 : _a2.call(props, (targetActive + swiperItemCount) % swiperItemCount);
22924
+ (_a = props.onChange) == null ? void 0 : _a.call(props, (targetActive + swiperItemCount) % swiperItemCount);
22939
22925
  }
22940
22926
  active = targetActive;
22941
22927
  setActive(targetActive);
@@ -23096,13 +23082,13 @@ const Swiper = React__default.forwardRef((props, ref) => {
23096
23082
  { name: "touchend", e: onTouchEnd }
23097
23083
  ];
23098
23084
  events.forEach((item) => {
23099
- var _a2;
23100
- (_a2 = container.current) == null ? void 0 : _a2.addEventListener(item.name, item.e, false);
23085
+ var _a;
23086
+ (_a = container.current) == null ? void 0 : _a.addEventListener(item.name, item.e, false);
23101
23087
  });
23102
23088
  return () => {
23103
23089
  events.forEach((item) => {
23104
- var _a2;
23105
- (_a2 = container.current) == null ? void 0 : _a2.removeEventListener(item.name, item.e, false);
23090
+ var _a;
23091
+ (_a = container.current) == null ? void 0 : _a.removeEventListener(item.name, item.e, false);
23106
23092
  });
23107
23093
  };
23108
23094
  });
@@ -23218,8 +23204,8 @@ const ImagePreview = (props) => {
23218
23204
  defaultValue,
23219
23205
  finalValue: defaultValue,
23220
23206
  onChange: (val) => {
23221
- var _a2;
23222
- (_a2 = props.onChange) == null ? void 0 : _a2.call(props, val);
23207
+ var _a;
23208
+ (_a = props.onChange) == null ? void 0 : _a.call(props, val);
23223
23209
  }
23224
23210
  });
23225
23211
  const [showPop, setShowPop] = useState(visible);
@@ -23330,9 +23316,9 @@ const ImagePreview = (props) => {
23330
23316
  );
23331
23317
  };
23332
23318
  const slideChangeEnd = (page) => {
23333
- var _a2;
23319
+ var _a;
23334
23320
  setActive(page + 1);
23335
- (_a2 = props.onChange) == null ? void 0 : _a2.call(props, page + 1);
23321
+ (_a = props.onChange) == null ? void 0 : _a.call(props, page + 1);
23336
23322
  };
23337
23323
  const onCloseInner = () => {
23338
23324
  setShowPop(false);
@@ -23631,8 +23617,8 @@ const Step = (props) => {
23631
23617
  return index === +parent.propSteps.value ? "process" : "wait";
23632
23618
  };
23633
23619
  const handleClickStep = () => {
23634
- var _a2, _b;
23635
- ((_a2 = parent.propSteps) == null ? void 0 : _a2.onStepClick) && ((_b = parent.propSteps) == null ? void 0 : _b.onStepClick(value));
23620
+ var _a, _b;
23621
+ ((_a = parent.propSteps) == null ? void 0 : _a.onStepClick) && ((_b = parent.propSteps) == null ? void 0 : _b.onStepClick(value));
23636
23622
  };
23637
23623
  const classPrefix2 = `nut-step`;
23638
23624
  const classes = classNames(
@@ -23688,7 +23674,7 @@ const Steps = (props) => {
23688
23674
  };
23689
23675
  Steps.defaultProps = defaultProps$b;
23690
23676
  Steps.displayName = "NutSteps";
23691
- function useTableSticky(columns) {
23677
+ function useTableSticky(columns, rtl = false) {
23692
23678
  const [isSticky, setIsSticky] = useState(false);
23693
23679
  const [stickyColumnStyleMap, setStickyColumnStyleMap] = useState({});
23694
23680
  const [stickyColumnClassMap, setStickyColumnClassMap] = useState({});
@@ -23703,9 +23689,9 @@ function useTableSticky(columns) {
23703
23689
  let _stickyLeftWidth = 0;
23704
23690
  let _stickyRightWidth = 0;
23705
23691
  leftColumns.forEach((curr, index) => {
23706
- leftColumns[index - 1] || {};
23692
+ const dir = rtl ? "right" : "left";
23707
23693
  _columnStyleMap[curr.key] = {
23708
- left: _stickyLeftWidth || 0,
23694
+ [dir]: _stickyLeftWidth || 0,
23709
23695
  width: curr.width || "auto"
23710
23696
  };
23711
23697
  _columnClassMap[curr.key] = {
@@ -23721,9 +23707,9 @@ function useTableSticky(columns) {
23721
23707
  });
23722
23708
  for (let i = rightColumns.length - 1; i >= 0; i--) {
23723
23709
  const curr = rightColumns[i];
23724
- rightColumns[i + 1] || {};
23710
+ const dir = rtl ? "left" : "right";
23725
23711
  _columnStyleMap[curr.key] = {
23726
- right: _stickyRightWidth || 0,
23712
+ [dir]: _stickyRightWidth || 0,
23727
23713
  width: curr.width || "auto"
23728
23714
  };
23729
23715
  _columnClassMap[curr.key] = {
@@ -23770,6 +23756,7 @@ const defaultProps$a = {
23770
23756
  };
23771
23757
  const Table = (props) => {
23772
23758
  const { locale } = useConfig();
23759
+ const rtl = useRtl();
23773
23760
  defaultProps$a.noData = locale.noData;
23774
23761
  const {
23775
23762
  children,
@@ -23800,7 +23787,7 @@ const Table = (props) => {
23800
23787
  stickyRightWidth,
23801
23788
  getStickyClass,
23802
23789
  getStickyStyle
23803
- } = useTableSticky(columns);
23790
+ } = useTableSticky(columns, rtl);
23804
23791
  useEffect(() => {
23805
23792
  setValue(data);
23806
23793
  }, [data]);
@@ -24349,8 +24336,8 @@ const VirtualList = (props) => {
24349
24336
  setListTotalSize(totalSize);
24350
24337
  }, [list, itemHeight, horizontal]);
24351
24338
  const getElement = useCallback(() => {
24352
- var _a2;
24353
- return ((_a2 = scrollRef.current) == null ? void 0 : _a2.parentElement) || document.body;
24339
+ var _a;
24340
+ return ((_a = scrollRef.current) == null ? void 0 : _a.parentElement) || document.body;
24354
24341
  }, []);
24355
24342
  useEffect(() => {
24356
24343
  if (containerHeight)
@@ -24527,8 +24514,8 @@ const InternalBarrage = (props, ref) => {
24527
24514
  barrageCWidth.current = barrageBody.current.offsetWidth;
24528
24515
  }
24529
24516
  setTimeout(() => {
24530
- var _a2;
24531
- (_a2 = barrageBody.current) == null ? void 0 : _a2.style.setProperty(
24517
+ var _a;
24518
+ (_a = barrageBody.current) == null ? void 0 : _a.style.setProperty(
24532
24519
  "--move-distance",
24533
24520
  `-${barrageCWidth.current}px`
24534
24521
  );
@@ -24777,8 +24764,8 @@ const TimeSelect = (props) => {
24777
24764
  ];
24778
24765
  }
24779
24766
  newActiveTime = newActiveTime.filter((item) => {
24780
- var _a2;
24781
- return ((_a2 = item[optionKey.childrenKey]) == null ? void 0 : _a2.length) > 0;
24767
+ var _a;
24768
+ return ((_a = item[optionKey.childrenKey]) == null ? void 0 : _a.length) > 0;
24782
24769
  });
24783
24770
  setActiveTime(newActiveTime);
24784
24771
  onTimeChange && onTimeChange(selectTime, newActiveTime);