@nutui/nutui-react-taro 2.3.8 → 2.3.10

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 (261) hide show
  1. package/CHANGELOG.md +37 -4
  2. package/dist/esm/ActionSheet/style/style.css +1 -1
  3. package/dist/esm/ActionSheet.js +2 -2
  4. package/dist/esm/Address/style/style.css +1 -1
  5. package/dist/esm/Address.js +5 -5
  6. package/dist/esm/Animate/style/style.css +1 -1
  7. package/dist/esm/Audio/style/style.css +1 -1
  8. package/dist/esm/Audio.js +2 -2
  9. package/dist/esm/Avatar/style/style.css +1 -1
  10. package/dist/esm/AvatarCropper/style/style.css +1 -1
  11. package/dist/esm/AvatarGroup/style/style.css +1 -1
  12. package/dist/esm/Badge/style/style.css +1 -1
  13. package/dist/esm/Barrage/style/style.css +1 -1
  14. package/dist/esm/Barrage.js +4 -2
  15. package/dist/esm/Button/style/style.css +1 -1
  16. package/dist/esm/Calendar/style/style.css +1 -1
  17. package/dist/esm/Calendar.js +4 -4
  18. package/dist/esm/CalendarCard/style/style.css +1 -1
  19. package/dist/esm/CalendarCard.js +2 -2
  20. package/dist/esm/CalendarItem.js +2 -2
  21. package/dist/esm/Card/style/style.css +1 -1
  22. package/dist/esm/Cascader/style/style.css +1 -1
  23. package/dist/esm/Cascader.js +3 -3
  24. package/dist/esm/Cell/style/style.css +1 -1
  25. package/dist/esm/CellGroup/style/style.css +1 -1
  26. package/dist/esm/Checkbox/style/style.css +1 -1
  27. package/dist/esm/CheckboxGroup/style/style.css +1 -1
  28. package/dist/esm/CircleProgress/style/style.css +1 -1
  29. package/dist/esm/Col/style/style.css +1 -1
  30. package/dist/esm/Collapse/style/style.css +1 -1
  31. package/dist/esm/CollapseItem/style/style.css +1 -1
  32. package/dist/esm/ConfigProvider.js +2 -2
  33. package/dist/esm/CountDown.js +2 -2
  34. package/dist/esm/DatePicker/style/style.css +1 -1
  35. package/dist/esm/DatePicker.js +4 -4
  36. package/dist/esm/Dialog/style/style.css +1 -1
  37. package/dist/esm/Dialog.js +2 -2
  38. package/dist/esm/Divider/style/style.css +1 -1
  39. package/dist/esm/Elevator/style/style.css +1 -1
  40. package/dist/esm/Empty/style/style.css +1 -1
  41. package/dist/esm/Empty.js +2 -2
  42. package/dist/esm/FixedNav/style/style.css +1 -1
  43. package/dist/esm/FixedNav.js +2 -2
  44. package/dist/esm/Form/style/style.css +1 -1
  45. package/dist/esm/Form.js +1 -1
  46. package/dist/esm/FormItem/style/style.css +1 -1
  47. package/dist/esm/FormItem.js +1 -1
  48. package/dist/esm/Grid/style/style.css +1 -1
  49. package/dist/esm/Grid.js +3 -3
  50. package/dist/esm/GridItem/style/style.css +1 -1
  51. package/dist/esm/GridItem.js +2 -2
  52. package/dist/esm/Image/style/style.css +1 -1
  53. package/dist/esm/ImagePreview/style/style.css +1 -1
  54. package/dist/esm/ImagePreview.js +2 -2
  55. package/dist/esm/Indicator/style/style.css +1 -1
  56. package/dist/esm/InfiniteLoading/style/style.css +1 -1
  57. package/dist/esm/InfiniteLoading.js +2 -2
  58. package/dist/esm/Input.js +2 -2
  59. package/dist/esm/Menu/style/style.css +1 -1
  60. package/dist/esm/MenuItem/style/style.css +1 -1
  61. package/dist/esm/NavBar/style/style.css +1 -1
  62. package/dist/esm/NoticeBar/style/style.css +1 -1
  63. package/dist/esm/Notify/style/style.css +1 -1
  64. package/dist/esm/NumberKeyboard/style/style.css +1 -1
  65. package/dist/esm/NumberKeyboard.js +3 -3
  66. package/dist/esm/Overlay/style/style.css +1 -1
  67. package/dist/esm/Pagination/style/style.css +1 -1
  68. package/dist/esm/Pagination.js +2 -2
  69. package/dist/esm/Picker/style/style.css +1 -1
  70. package/dist/esm/Picker.js +3 -3
  71. package/dist/esm/Popover/style/style.css +1 -1
  72. package/dist/esm/Popover.js +2 -2
  73. package/dist/esm/Popup/style/style.css +1 -1
  74. package/dist/esm/Popup.js +1 -1
  75. package/dist/esm/Price/style/style.css +1 -1
  76. package/dist/esm/Progress/style/style.css +1 -1
  77. package/dist/esm/PullToRefresh/style/style.css +1 -1
  78. package/dist/esm/PullToRefresh.js +2 -2
  79. package/dist/esm/Radio/style/style.css +1 -1
  80. package/dist/esm/Range/style/style.css +1 -1
  81. package/dist/esm/Rate/style/style.css +1 -1
  82. package/dist/esm/SearchBar/style/style.css +1 -1
  83. package/dist/esm/SearchBar.js +2 -2
  84. package/dist/esm/ShortPassword/style/style.css +1 -1
  85. package/dist/esm/ShortPassword.js +3 -3
  86. package/dist/esm/SideNavBar/style/style.css +1 -1
  87. package/dist/esm/SideNavBar.js +2 -2
  88. package/dist/esm/Skeleton/style/style.css +1 -1
  89. package/dist/esm/Space/style/style.css +1 -1
  90. package/dist/esm/Step/style/style.css +1 -1
  91. package/dist/esm/Steps/style/style.css +1 -1
  92. package/dist/esm/Sticky.js +1 -1
  93. package/dist/esm/Swipe/style/style.css +1 -1
  94. package/dist/esm/Swiper/style/style.css +1 -1
  95. package/dist/esm/Switch/style/style.css +1 -1
  96. package/dist/esm/Tabbar/style/style.css +1 -1
  97. package/dist/esm/TabbarItem/style/style.css +1 -1
  98. package/dist/esm/Table/style/style.css +1 -1
  99. package/dist/esm/Table.js +2 -2
  100. package/dist/esm/Tabs/style/style.css +1 -1
  101. package/dist/esm/Tabs.js +1 -1
  102. package/dist/esm/Tag/style/style.css +1 -1
  103. package/dist/esm/TextArea/style/style.css +1 -1
  104. package/dist/esm/TextArea.js +2 -2
  105. package/dist/esm/TimeDetail/style/style.css +1 -1
  106. package/dist/esm/TimeSelect/style/style.css +1 -1
  107. package/dist/esm/TimeSelect.js +3 -3
  108. package/dist/esm/Toast/style/style.css +1 -1
  109. package/dist/esm/Tour/style/style.css +1 -1
  110. package/dist/esm/Tour.js +3 -3
  111. package/dist/esm/TrendArrow/style/style.css +1 -1
  112. package/dist/esm/Uploader/style/style.css +1 -1
  113. package/dist/esm/Uploader.js +2 -2
  114. package/dist/esm/VirtualList/style/style.css +1 -1
  115. package/dist/esm/WaterMark.js +2 -2
  116. package/dist/esm/{actionsheet.taro-gfhQciJ4.js → actionsheet.taro-6NiOrNyd.js} +1 -1
  117. package/dist/esm/{address.taro-LCSSqsR-.js → address.taro-zQuxQEce.js} +3 -3
  118. package/dist/esm/{audio.taro-UpVxFvGk.js → audio.taro-dJgj5qIu.js} +1 -1
  119. package/dist/esm/barrage.taro-6nbq7wtt.js +118 -0
  120. package/dist/esm/{calendar.taro-Kf91Qo5t.js → calendar.taro-iNNHje7V.js} +3 -3
  121. package/dist/esm/{calendarcard.taro-tY-cyh-F.js → calendarcard.taro-9s7naGmU.js} +1 -1
  122. package/dist/esm/{calendaritem.taro-G5BaVw8e.js → calendaritem.taro-o6Z8OOGY.js} +1 -1
  123. package/dist/esm/{cascader.taro-x_X9F_pH.js → cascader.taro-M2nZWxiB.js} +2 -2
  124. package/dist/esm/{configprovider.taro-_wngOo0k.js → configprovider.taro-q5J2gQbi.js} +6 -4
  125. package/dist/esm/{countdown.taro-rJngrZUZ.js → countdown.taro-XZlfWBrA.js} +1 -1
  126. package/dist/esm/{datepicker.taro-S111IvJO.js → datepicker.taro-DrXkqJkN.js} +2 -2
  127. package/dist/esm/{dialog.taro-z588FBZJ.js → dialog.taro-dmQGDu3o.js} +1 -1
  128. package/dist/esm/{empty.taro-98NzV-31.js → empty.taro-gwvOr1xf.js} +1 -1
  129. package/dist/esm/{fixednav.taro-7OfzwFBE.js → fixednav.taro-QVBXysDj.js} +1 -1
  130. package/dist/esm/{formitem.taro-atY4A0pS.js → formitem.taro-PPkTQGfW.js} +39 -10
  131. package/dist/esm/{grid.taro-Hc4q01A_.js → grid.taro-3X-_AhXw.js} +1 -1
  132. package/dist/esm/{griditem.taro-RdNA-Wqv.js → griditem.taro-TJDJVeQy.js} +1 -1
  133. package/dist/esm/{imagepreview.taro-qDST6Lh4.js → imagepreview.taro--fVrJUOE.js} +1 -1
  134. package/dist/esm/{infiniteloading.taro-sl41Ddeh.js → infiniteloading.taro-BO0_y46K.js} +2 -1
  135. package/dist/esm/{input.taro-8gs046AH.js → input.taro-YoPsV-op.js} +20 -17
  136. package/dist/esm/{numberkeyboard.taro-CyW0s9bI.js → numberkeyboard.taro-bF6VCXry.js} +2 -2
  137. package/dist/esm/nutui-react.es.js +37 -37
  138. package/dist/esm/{pagination.taro-RYmB2As4.js → pagination.taro-C4_Ey5KC.js} +1 -1
  139. package/dist/esm/{picker.taro-RAYmFSC0.js → picker.taro-csU3SZPF.js} +2 -2
  140. package/dist/esm/{popover.taro-MUrnn7xY.js → popover.taro-qldQwLPC.js} +1 -1
  141. package/dist/esm/{popup.taro-2FdJu1kg.js → popup.taro-ObEUml4r.js} +1 -1
  142. package/dist/esm/{pulltorefresh.taro-VbzsD_HC.js → pulltorefresh.taro-2jER8Mat.js} +1 -1
  143. package/dist/esm/{searchbar.taro-Hmwspp92.js → searchbar.taro-hVzdT6nI.js} +1 -1
  144. package/dist/esm/{shortpassword.taro-uFeVULsY.js → shortpassword.taro-ECs_E1Xn.js} +20 -7
  145. package/dist/esm/{sidenavbar.taro-J5SEKQIh.js → sidenavbar.taro-8qoGZg5n.js} +1 -1
  146. package/dist/esm/{sticky.taro-MmKUU2Wv.js → sticky.taro-p-evMNR-.js} +1 -1
  147. package/dist/esm/{table.taro-d172EUh9.js → table.taro-0zRh2hq6.js} +1 -1
  148. package/dist/esm/{tabs.taro-w8ra49Qb.js → tabs.taro-Yj7vgtSg.js} +1 -1
  149. package/dist/esm/{textarea.taro-VYqlTewy.js → textarea.taro-9zQLTCwU.js} +2 -2
  150. package/dist/esm/{timeselect.taro-7FWR9oaJ.js → timeselect.taro-j8LgSCe5.js} +2 -2
  151. package/dist/esm/{tour.taro-HLsDVf9g.js → tour.taro-CGEjzzN_.js} +1 -1
  152. package/dist/esm/types/src/packages/configprovider/configprovider.d.ts +2 -0
  153. package/dist/esm/types/src/packages/configprovider/configprovider.taro.d.ts +2 -0
  154. package/dist/esm/types/src/packages/configprovider/index.d.ts +1 -1
  155. package/dist/esm/types/src/packages/configprovider/index.taro.d.ts +1 -1
  156. package/dist/esm/types/src/packages/formitem/formitem.d.ts +6 -2
  157. package/dist/esm/types/src/packages/formitem/formitem.taro.d.ts +6 -2
  158. package/dist/esm/types/src/packages/popover/popover.taro.d.ts +7 -0
  159. package/dist/esm/types/src/packages/shortpassword/shortpassword.d.ts +3 -2
  160. package/dist/esm/types/src/packages/shortpassword/shortpassword.taro.d.ts +3 -2
  161. package/dist/esm/types/src/packages/shortpassword/types.d.ts +4 -0
  162. package/dist/esm/{uploader.taro-a-U18v5C.js → uploader.taro-bRF02TR9.js} +1 -1
  163. package/dist/esm/{watermark.taro-WDFdgWlJ.js → watermark.taro-nvSmcwu-.js} +1 -1
  164. package/dist/locales/base.js +1 -1
  165. package/dist/locales/en-US.js +1 -1
  166. package/dist/locales/id-ID.js +1 -1
  167. package/dist/locales/tr-TR.js +1 -1
  168. package/dist/locales/zh-CN.js +1 -1
  169. package/dist/locales/zh-TW.js +1 -1
  170. package/dist/locales/zh-UG.js +1 -1
  171. package/dist/nutui.react.es.js +172 -103
  172. package/dist/nutui.react.umd.js +172 -103
  173. package/dist/packages/address/address.scss +12 -0
  174. package/dist/packages/animate/animate.scss +49 -0
  175. package/dist/packages/audio/audio.scss +14 -0
  176. package/dist/packages/avatar/avatar.scss +25 -0
  177. package/dist/packages/avatarcropper/avatarcropper.scss +52 -0
  178. package/dist/packages/avatargroup/avatargroup.scss +11 -0
  179. package/dist/packages/badge/badge.scss +8 -0
  180. package/dist/packages/barrage/barrage.scss +18 -1
  181. package/dist/packages/button/button.scss +18 -0
  182. package/dist/packages/calendar/calendar.scss +24 -0
  183. package/dist/packages/calendarcard/calendarcard.scss +41 -0
  184. package/dist/packages/card/card.scss +21 -0
  185. package/dist/packages/cascader/cascader.scss +8 -0
  186. package/dist/packages/cellgroup/cellgroup.scss +14 -0
  187. package/dist/packages/checkbox/checkbox.scss +38 -0
  188. package/dist/packages/checkboxgroup/checkboxgroup.scss +24 -8
  189. package/dist/packages/circleprogress/circleprogress.scss +8 -0
  190. package/dist/packages/col/col.scss +25 -0
  191. package/dist/packages/collapseitem/collapseitem.scss +15 -0
  192. package/dist/packages/dialog/dialog.scss +29 -0
  193. package/dist/packages/divider/divider.scss +22 -0
  194. package/dist/packages/elevator/elevator.scss +20 -0
  195. package/dist/packages/ellipsis/ellipsis.scss +1 -0
  196. package/dist/packages/empty/empty.scss +11 -0
  197. package/dist/packages/fixednav/fixednav.scss +75 -0
  198. package/dist/packages/form/form.scss +31 -0
  199. package/dist/packages/formitem/formitem.scss +15 -0
  200. package/dist/packages/grid/grid.scss +8 -0
  201. package/dist/packages/griditem/griditem.scss +37 -0
  202. package/dist/packages/image/image.scss +13 -0
  203. package/dist/packages/imagepreview/imagepreview.scss +26 -0
  204. package/dist/packages/indicator/indicator.scss +15 -0
  205. package/dist/packages/infiniteloading/infiniteloading.scss +13 -0
  206. package/dist/packages/loading/loading.scss +6 -0
  207. package/dist/packages/menu/menu.scss +9 -0
  208. package/dist/packages/menuitem/menuitem.scss +12 -0
  209. package/dist/packages/navbar/navbar.scss +61 -0
  210. package/dist/packages/noticebar/noticebar.scss +22 -0
  211. package/dist/packages/notify/notify.scss +10 -0
  212. package/dist/packages/numberkeyboard/numberkeyboard.scss +27 -0
  213. package/dist/packages/overlay/overlay.scss +6 -0
  214. package/dist/packages/pagination/pagination.scss +24 -0
  215. package/dist/packages/popover/popover.scss +105 -0
  216. package/dist/packages/popup/popup.scss +77 -0
  217. package/dist/packages/price/price.scss +19 -0
  218. package/dist/packages/progress/progress.scss +7 -0
  219. package/dist/packages/pulltorefresh/pulltorefresh.scss +10 -0
  220. package/dist/packages/radio/radio.scss +21 -0
  221. package/dist/packages/range/range.scss +65 -0
  222. package/dist/packages/rate/rate.scss +30 -0
  223. package/dist/packages/safearea/safearea.scss +2 -0
  224. package/dist/packages/searchbar/searchbar.scss +65 -0
  225. package/dist/packages/shortpassword/shortpassword.scss +25 -0
  226. package/dist/packages/sidenavbar/sidenavbar.scss +15 -0
  227. package/dist/packages/skeleton/skeleton.scss +22 -1
  228. package/dist/packages/space/space.scss +30 -0
  229. package/dist/packages/step/step.scss +45 -0
  230. package/dist/packages/swipe/swipe.scss +15 -0
  231. package/dist/packages/swiper/swiper.scss +14 -0
  232. package/dist/packages/switch/switch.scss +13 -0
  233. package/dist/packages/tabbar/tabbar.scss +13 -0
  234. package/dist/packages/tabbaritem/tabbaritem.scss +2 -0
  235. package/dist/packages/table/table.scss +57 -0
  236. package/dist/packages/tabs/tabs.scss +85 -14
  237. package/dist/packages/tag/tag.scss +8 -0
  238. package/dist/packages/textarea/textarea.scss +17 -0
  239. package/dist/packages/timedetail/timedetail.scss +5 -0
  240. package/dist/packages/timeselect/timeselect.scss +5 -0
  241. package/dist/packages/toast/toast.scss +15 -0
  242. package/dist/packages/tour/tour.scss +23 -0
  243. package/dist/packages/trendarrow/trendarrow.scss +13 -0
  244. package/dist/packages/uploader/uploader.scss +36 -0
  245. package/dist/packages/video/video.scss +3 -0
  246. package/dist/packages/virtuallist/virtuallist.scss +11 -0
  247. package/dist/style.css +1 -1
  248. package/dist/style.mjs +1 -1
  249. package/dist/types/packages/backtop/backtop.taro.d.ts +1 -1
  250. package/dist/types/packages/configprovider/configprovider.d.ts +2 -0
  251. package/dist/types/packages/configprovider/configprovider.taro.d.ts +2 -0
  252. package/dist/types/packages/configprovider/index.d.ts +1 -1
  253. package/dist/types/packages/configprovider/index.taro.d.ts +1 -1
  254. package/dist/types/packages/formitem/formitem.d.ts +6 -2
  255. package/dist/types/packages/formitem/formitem.taro.d.ts +14 -2
  256. package/dist/types/packages/popover/popover.taro.d.ts +7 -0
  257. package/dist/types/packages/shortpassword/shortpassword.d.ts +3 -2
  258. package/dist/types/packages/shortpassword/shortpassword.taro.d.ts +3 -2
  259. package/dist/types/packages/shortpassword/types.d.ts +4 -0
  260. package/package.json +1 -1
  261. package/dist/esm/barrage.taro-HsivAhbE.js +0 -91
@@ -8,7 +8,7 @@ var __publicField = (obj, key, value) => {
8
8
  return value;
9
9
  };
10
10
  /*!
11
- * @nutui/nutui-react-taro v2.3.8 Fri Jan 26 2024 15:12:04 GMT+0800 (China Standard Time)
11
+ * @nutui/nutui-react-taro v2.3.10 Tue Feb 06 2024 16:10:56 GMT+0800 (China Standard Time)
12
12
  * (c) 2023 @jdf2e.
13
13
  * Released under the MIT License.
14
14
  */
@@ -1456,7 +1456,8 @@ var __publicField = (obj, key, value) => {
1456
1456
  const classPrefix$p = "nut-configprovider";
1457
1457
  const defaultConfigRef$1 = {
1458
1458
  current: {
1459
- locale: zhCN
1459
+ locale: zhCN,
1460
+ direction: "ltr"
1460
1461
  }
1461
1462
  };
1462
1463
  const getDefaultConfig$1 = () => {
@@ -1474,7 +1475,7 @@ var __publicField = (obj, key, value) => {
1474
1475
  return cssVars;
1475
1476
  }
1476
1477
  const ConfigProvider = (props) => {
1477
- const { style, className, children, ...config2 } = props;
1478
+ const { style, className, children, direction, ...config2 } = props;
1478
1479
  const mergedConfig = useMemo(
1479
1480
  () => {
1480
1481
  return {
@@ -1494,10 +1495,11 @@ var __publicField = (obj, key, value) => {
1494
1495
  return /* @__PURE__ */ React.createElement(ConfigContext$1.Provider, { value: mergedConfig }, /* @__PURE__ */ React.createElement(
1495
1496
  "div",
1496
1497
  {
1497
- className: classNames(classPrefix$p, className),
1498
+ className: classNames(classPrefix$p, className, `nut-${direction}`),
1498
1499
  style: {
1499
1500
  ...cssVarStyle,
1500
- ...style
1501
+ ...style,
1502
+ direction
1501
1503
  }
1502
1504
  },
1503
1505
  children
@@ -4048,7 +4050,7 @@ var __publicField = (obj, key, value) => {
4048
4050
  }
4049
4051
  }, []);
4050
4052
  Taro.usePageScroll((res) => {
4051
- if (Taro.getEnv() === "WEAPP") {
4053
+ if (Taro.getEnv() !== "WEB") {
4052
4054
  handleScroll(res.scrollTop);
4053
4055
  }
4054
4056
  });
@@ -4721,7 +4723,8 @@ var __publicField = (obj, key, value) => {
4721
4723
  CSSTransition$1,
4722
4724
  {
4723
4725
  classNames: transitionName,
4724
- unmountOnExit: true,
4726
+ mountOnEnter: true,
4727
+ unmountOnExit: destroyOnClose,
4725
4728
  timeout: duration,
4726
4729
  in: innerVisible,
4727
4730
  onEntered: onHandleOpened,
@@ -5355,7 +5358,7 @@ var __publicField = (obj, key, value) => {
5355
5358
  onClick: (e2) => {
5356
5359
  tabChange(item);
5357
5360
  },
5358
- className: classNames(`${classPrefix$k}-titles-item taro`, {
5361
+ className: classNames(`${classPrefix$k}-titles-item`, {
5359
5362
  [`nut-tabs-titles-item-active`]: !item.disabled && String(item.value) === String(value),
5360
5363
  [`nut-tabs-titles-item-disabled`]: item.disabled,
5361
5364
  [`nut-tabs-titles-item-${align}`]: align
@@ -9765,6 +9768,7 @@ var __publicField = (obj, key, value) => {
9765
9768
  constructor() {
9766
9769
  // 初始化数据
9767
9770
  __publicField(this, "initialValues", {});
9771
+ __publicField(this, "updateList", []);
9768
9772
  // 存放表单中所有的数据 eg. {password: "ddd",username: "123"}
9769
9773
  __publicField(this, "store", {});
9770
9774
  // 所有的组件实例
@@ -9834,6 +9838,15 @@ var __publicField = (obj, key, value) => {
9834
9838
  }
9835
9839
  });
9836
9840
  });
9841
+ this.updateList.forEach((item) => {
9842
+ let shouldUpdate = item.condition;
9843
+ if (typeof item.condition === "function") {
9844
+ shouldUpdate = item.condition();
9845
+ }
9846
+ if (shouldUpdate) {
9847
+ item.entity.onStoreChange("update");
9848
+ }
9849
+ });
9837
9850
  });
9838
9851
  __publicField(this, "setCallback", (callback) => {
9839
9852
  this.callbacks = {
@@ -9902,6 +9915,16 @@ var __publicField = (obj, key, value) => {
9902
9915
  entity.onStoreChange("reset");
9903
9916
  });
9904
9917
  });
9918
+ // 监听事件
9919
+ __publicField(this, "registerUpdate", (field, shouldUpdate) => {
9920
+ this.updateList.push({
9921
+ entity: field,
9922
+ condition: shouldUpdate
9923
+ });
9924
+ return () => {
9925
+ this.updateList = this.updateList.filter((i2) => i2.entity !== field);
9926
+ };
9927
+ });
9905
9928
  __publicField(this, "dispatch", ({ name }) => {
9906
9929
  this.validateFields([name]);
9907
9930
  });
@@ -9913,7 +9936,8 @@ var __publicField = (obj, key, value) => {
9913
9936
  setInitialValues: this.setInitialValues,
9914
9937
  dispatch: this.dispatch,
9915
9938
  store: this.store,
9916
- fieldEntities: this.fieldEntities
9939
+ fieldEntities: this.fieldEntities,
9940
+ registerUpdate: this.registerUpdate
9917
9941
  };
9918
9942
  }
9919
9943
  });
@@ -10044,13 +10068,16 @@ var __publicField = (obj, key, value) => {
10044
10068
  label: "",
10045
10069
  rules: [{ required: false, message: "" }],
10046
10070
  errorMessageAlign: "left",
10047
- validateTrigger: "onChange"
10071
+ validateTrigger: "onChange",
10072
+ shouldUpdate: false,
10073
+ noStyle: false
10048
10074
  };
10049
10075
  class FormItem extends React.Component {
10050
10076
  constructor(props) {
10051
10077
  super(props);
10052
10078
  __publicField(this, "cancelRegister");
10053
10079
  __publicField(this, "componentRef");
10080
+ __publicField(this, "eventOff");
10054
10081
  // children添加value属性和onChange事件
10055
10082
  __publicField(this, "getControlled", (children) => {
10056
10083
  var _a;
@@ -10124,7 +10151,6 @@ var __publicField = (obj, key, value) => {
10124
10151
  }
10125
10152
  });
10126
10153
  __publicField(this, "renderLayout", (childNode) => {
10127
- var _a;
10128
10154
  const {
10129
10155
  label,
10130
10156
  name,
@@ -10150,16 +10176,13 @@ var __publicField = (obj, key, value) => {
10150
10176
  onClick: (e2) => this.props.onClick && this.props.onClick(e2, this.componentRef)
10151
10177
  },
10152
10178
  label ? /* @__PURE__ */ React.createElement("div", { className: "nut-cell-title nut-form-item-label" }, renderLabel) : null,
10153
- /* @__PURE__ */ React.createElement("div", { className: "nut-cell-value nut-form-item-body" }, /* @__PURE__ */ React.createElement("div", { className: "nut-form-item-body-slots" }, childNode), /* @__PURE__ */ React.createElement(
10179
+ /* @__PURE__ */ React.createElement("div", { className: "nut-cell-value nut-form-item-body" }, /* @__PURE__ */ React.createElement("div", { className: "nut-form-item-body-slots" }, childNode), item && item.length > 0 && /* @__PURE__ */ React.createElement(
10154
10180
  "div",
10155
10181
  {
10156
10182
  className: "nut-form-item-body-tips",
10157
- style: {
10158
- textAlign: errorMessageAlign,
10159
- display: (item == null ? void 0 : item.length) ? "initial" : "none"
10160
- }
10183
+ style: { textAlign: errorMessageAlign }
10161
10184
  },
10162
- (_a = item == null ? void 0 : item[0]) == null ? void 0 : _a.message
10185
+ item[0].message
10163
10186
  ))
10164
10187
  );
10165
10188
  });
@@ -10169,22 +10192,31 @@ var __publicField = (obj, key, value) => {
10169
10192
  };
10170
10193
  }
10171
10194
  componentDidMount() {
10172
- const { registerField } = this.context.getInternal(SECRET);
10195
+ const { registerField, registerUpdate } = this.context.getInternal(SECRET);
10173
10196
  this.cancelRegister = registerField(this);
10197
+ this.eventOff = registerUpdate(this, this.props.shouldUpdate);
10174
10198
  }
10175
10199
  componentWillUnmount() {
10176
10200
  if (this.cancelRegister) {
10177
10201
  this.cancelRegister();
10178
10202
  }
10203
+ if (this.eventOff) {
10204
+ this.eventOff();
10205
+ }
10179
10206
  }
10180
10207
  render() {
10181
10208
  const { children } = this.props;
10182
10209
  const child = Array.isArray(children) ? children[0] : children;
10183
- const returnChildNode = React.cloneElement(
10184
- child,
10185
- this.getControlled(child)
10186
- );
10187
- return /* @__PURE__ */ React.createElement(React.Fragment, { key: this.state.resetCount }, this.renderLayout(returnChildNode));
10210
+ let returnChildNode;
10211
+ if (!this.props.shouldUpdate) {
10212
+ returnChildNode = React.cloneElement(
10213
+ child,
10214
+ this.getControlled(child)
10215
+ );
10216
+ } else {
10217
+ returnChildNode = child(this.context);
10218
+ }
10219
+ return /* @__PURE__ */ React.createElement(React.Fragment, { key: this.state.resetCount }, this.props.noStyle ? returnChildNode : this.renderLayout(returnChildNode));
10188
10220
  }
10189
10221
  }
10190
10222
  __publicField(FormItem, "defaultProps", defaultProps$Y);
@@ -10316,19 +10348,28 @@ var __publicField = (obj, key, value) => {
10316
10348
  forceUpdate();
10317
10349
  };
10318
10350
  const handleFocus = (event) => {
10319
- const val = event.target.value;
10320
- onFocus && onFocus(val);
10351
+ if (Taro.getEnv() === "WEB") {
10352
+ const val = event.target.value;
10353
+ onFocus && onFocus(val);
10354
+ } else {
10355
+ onFocus == null ? void 0 : onFocus(value);
10356
+ }
10321
10357
  setActive(true);
10322
10358
  };
10323
10359
  const handleInput = (value2) => {
10324
10360
  updateValue(value2, "onChange");
10325
10361
  };
10326
10362
  const handleBlur = (event) => {
10327
- const val = event.target.value;
10328
- updateValue(val, "onBlur");
10329
- setTimeout(() => {
10363
+ if (Taro.getEnv() === "WEB") {
10364
+ const val = event.target.value;
10365
+ updateValue(val, "onBlur");
10366
+ setTimeout(() => {
10367
+ setActive(false);
10368
+ }, 50);
10369
+ } else {
10370
+ updateValue(value, "onBlur");
10330
10371
  setActive(false);
10331
- }, 50);
10372
+ }
10332
10373
  };
10333
10374
  const inputType = (type22) => {
10334
10375
  if (Taro.getEnv() === Taro.ENV_TYPE.WEB) {
@@ -10368,12 +10409,8 @@ var __publicField = (obj, key, value) => {
10368
10409
  value,
10369
10410
  focus: autoFocus,
10370
10411
  confirmType,
10371
- onBlur: (e2) => {
10372
- handleBlur(e2);
10373
- },
10374
- onFocus: (e2) => {
10375
- handleFocus(e2);
10376
- },
10412
+ onBlur: handleBlur,
10413
+ onFocus: handleFocus,
10377
10414
  onInput: (e2) => {
10378
10415
  handleInput(e2.currentTarget.value);
10379
10416
  }
@@ -10389,10 +10426,8 @@ var __publicField = (obj, key, value) => {
10389
10426
  onClick: (e2) => {
10390
10427
  e2.stopPropagation();
10391
10428
  if (!disabled) {
10392
- setTimeout(() => {
10393
- setValue("");
10394
- onClear && onClear("");
10395
- }, 50);
10429
+ setValue("");
10430
+ onClear == null ? void 0 : onClear("");
10396
10431
  }
10397
10432
  }
10398
10433
  },
@@ -12033,13 +12068,13 @@ var __publicField = (obj, key, value) => {
12033
12068
  // 1~6
12034
12069
  autoFocus: false
12035
12070
  };
12036
- const ShortPassword = (props) => {
12071
+ const InternalShortPassword = (props, ref) => {
12037
12072
  const { locale } = useConfig$1();
12038
12073
  const {
12039
12074
  title,
12040
12075
  description,
12041
12076
  tips,
12042
- visible,
12077
+ visible: deleteVisible,
12043
12078
  value,
12044
12079
  error,
12045
12080
  hideFooter,
@@ -12070,6 +12105,20 @@ var __publicField = (obj, key, value) => {
12070
12105
  const format2 = (val) => {
12071
12106
  return val.slice(0, comLen);
12072
12107
  };
12108
+ const [visible, setVisible] = usePropsValue({
12109
+ value: props.visible,
12110
+ defaultValue: false,
12111
+ finalValue: false
12112
+ });
12113
+ const actions = {
12114
+ open: () => {
12115
+ setVisible(true);
12116
+ },
12117
+ close: () => {
12118
+ setVisible(false);
12119
+ }
12120
+ };
12121
+ React.useImperativeHandle(ref, () => actions);
12073
12122
  const [inputValue, setInputValue] = usePropsValue({ value, onChange });
12074
12123
  React.useEffect(() => {
12075
12124
  if (visible && autoFocus) {
@@ -12105,8 +12154,7 @@ var __publicField = (obj, key, value) => {
12105
12154
  }))), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-message` }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-message-error` }, error), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-message-forget`, onClick: onTips }, tips || /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(z, { size: 11, style: { marginRight: "3px" } }), locale.shortpassword.tips))), !hideFooter && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-footer` }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-footer-cancel`, onClick: onCancel }, locale.cancel), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-footer-sure`, onClick: sure }, locale.confirm)))
12106
12155
  );
12107
12156
  };
12108
- ShortPassword.defaultProps = defaultProps$N;
12109
- ShortPassword.displayName = "NutShortPassword";
12157
+ const ShortPassword = React.forwardRef(InternalShortPassword);
12110
12158
  const defaultProps$M = {
12111
12159
  ...ComponentDefaults,
12112
12160
  canvasId: "spcanvas",
@@ -12358,7 +12406,7 @@ var __publicField = (obj, key, value) => {
12358
12406
  const classPrefix2 = "nut-textarea";
12359
12407
  const compositionRef = React.useRef(false);
12360
12408
  const format2 = (value2) => {
12361
- if (maxLength !== void 0 && value2.length > maxLength) {
12409
+ if (maxLength !== -1 && value2.length > maxLength) {
12362
12410
  return value2.substring(0, maxLength);
12363
12411
  }
12364
12412
  return value2;
@@ -13754,6 +13802,7 @@ var __publicField = (obj, key, value) => {
13754
13802
  if (distance.current < refreshMaxH.current) {
13755
13803
  distance.current = 0;
13756
13804
  setTopDisScoll(0);
13805
+ isTouching.current = false;
13757
13806
  } else {
13758
13807
  await (onRefresh == null ? void 0 : onRefresh());
13759
13808
  refreshDone();
@@ -17632,7 +17681,8 @@ var __publicField = (obj, key, value) => {
17632
17681
  };
17633
17682
  const defaultConfigRef = {
17634
17683
  current: {
17635
- locale: zhCN
17684
+ locale: zhCN,
17685
+ direction: "ltr"
17636
17686
  }
17637
17687
  };
17638
17688
  const getDefaultConfig = () => {
@@ -18088,79 +18138,98 @@ var __publicField = (obj, key, value) => {
18088
18138
  ...defaultProps$6,
18089
18139
  ...props
18090
18140
  };
18091
- const [styleList, setStyleList] = React.useState([]);
18092
- const [baItemList, setBaItemList] = React.useState(list);
18093
- const barrageListSet = React.useRef(list);
18094
18141
  const barrageBody = React.useRef(null);
18095
18142
  const barrageContainer = React.useRef(null);
18096
- const timeId = React.useRef((/* @__PURE__ */ new Date()).getTime());
18143
+ const barrageCWidth = React.useRef(0);
18097
18144
  const timer = React.useRef(0);
18098
- const classes = classNames(
18099
- classPrefix$1,
18100
- {
18101
- [`${classPrefix$1}-body${timeId.current}`]: true
18102
- },
18103
- className
18104
- );
18145
+ const index = React.useRef(0);
18146
+ const times = React.useRef([]);
18147
+ const historyIndex = React.useRef(-1);
18148
+ const classes = classNames(classPrefix$1, className);
18105
18149
  React.useImperativeHandle(ref, () => ({
18106
18150
  add: (word) => {
18107
- barrageListSet.current = [...barrageListSet.current, word];
18108
- run();
18151
+ const _index = index.current % list.length;
18152
+ if (!loop && index.current === list.length) {
18153
+ list.splice(list.length, 0, word);
18154
+ } else {
18155
+ list.splice(_index, 0, word);
18156
+ }
18109
18157
  }
18110
18158
  }));
18159
+ const getNodeWidth = async (node, type2 = "width") => {
18160
+ if (node) {
18161
+ const refe = await getRectByTaro(node);
18162
+ return Math.ceil(type2 === "height" ? refe.height : refe.width);
18163
+ }
18164
+ return 0;
18165
+ };
18111
18166
  React.useEffect(() => {
18112
- barrageListSet.current = [...list];
18113
- run();
18167
+ const init = async () => {
18168
+ if (barrageBody.current) {
18169
+ barrageCWidth.current = await getNodeWidth(barrageBody.current);
18170
+ }
18171
+ };
18172
+ init();
18173
+ setTimeout(() => {
18174
+ var _a;
18175
+ (_a = barrageBody.current) == null ? void 0 : _a.style.setProperty(
18176
+ "--move-distance",
18177
+ `-${barrageCWidth.current}px`
18178
+ );
18179
+ index.current = 0;
18180
+ run();
18181
+ }, 300);
18114
18182
  return () => {
18115
18183
  clearInterval(timer.current);
18116
18184
  };
18117
18185
  }, [list]);
18118
18186
  const run = () => {
18119
- setBaItemList(barrageListSet.current);
18120
- barrageListSet.current.forEach((item, index) => {
18121
- getNode(index);
18122
- });
18123
- };
18124
- const getNode = (index) => {
18125
- const query = Taro.createSelectorQuery();
18126
- setTimeout(() => {
18127
- let width = 100;
18128
- query.select(`.${classPrefix$1}-body${timeId.current}`).boundingClientRect((rec) => {
18129
- width = rec.width || 300;
18130
- });
18131
- query.select(`.${classPrefix$1}-item${index}`).boundingClientRect((recs) => {
18132
- const height = recs.height;
18133
- const nodeTop = `${index % rows * (height + gapY) + 20}px`;
18134
- styleInfo(index, nodeTop, width);
18135
- }).exec();
18136
- }, 500);
18187
+ clearInterval(timer.current);
18188
+ let intervalCache = interval;
18189
+ const _index = (loop ? index.current % list.length : index.current) % rows;
18190
+ const result = times.current[_index] - rows * interval;
18191
+ if (result > 0) {
18192
+ intervalCache += result;
18193
+ }
18194
+ timer.current = window.setTimeout(() => {
18195
+ play();
18196
+ }, intervalCache);
18137
18197
  };
18138
- const styleInfo = (index, nodeTop, width) => {
18139
- const timeIndex = index - rows > 0 ? index - rows : 0;
18140
- const list2 = styleList;
18141
- const time = list2[timeIndex] ? Number(list2[timeIndex]["--time"]) : 0;
18142
- const obj = {
18143
- top: nodeTop,
18144
- "--time": `${interval * index + time}`,
18145
- animationDuration: `${duration}ms`,
18146
- animationIterationCount: `${loop ? "infinite" : 1}`,
18147
- animationDelay: `${interval * index + time}ms`,
18148
- "--move-distance": `-${width}px`
18149
- };
18150
- list2.push(obj);
18151
- setStyleList([...list2]);
18198
+ const play = async () => {
18199
+ if (!loop && index.current >= list.length) {
18200
+ return;
18201
+ }
18202
+ const _index = loop ? index.current % list.length : index.current;
18203
+ const el = document.createElement(`View`);
18204
+ let currentIndex = _index % rows;
18205
+ if (currentIndex <= historyIndex.current || historyIndex.current === 3 && currentIndex !== 0 || Math.abs(currentIndex - historyIndex.current) !== 1) {
18206
+ currentIndex = historyIndex.current + 1 >= rows ? 0 : historyIndex.current + 1;
18207
+ }
18208
+ historyIndex.current = currentIndex;
18209
+ el.innerHTML = list[_index];
18210
+ el.classList.add("barrage-item");
18211
+ barrageContainer.current.appendChild(el);
18212
+ try {
18213
+ const width = await getNodeWidth(el);
18214
+ const height = await getNodeWidth(el, "height");
18215
+ el.classList.add("move");
18216
+ const elScrollDuration = width / barrageCWidth.current * duration;
18217
+ times.current[currentIndex] = Math.ceil(elScrollDuration);
18218
+ el.style.animationDuration = `${(duration + elScrollDuration).toFixed(
18219
+ 2
18220
+ )}ms`;
18221
+ el.style.top = `${currentIndex * (height + gapY) + 20}px`;
18222
+ el.style.width = `${width}px`;
18223
+ } catch (error) {
18224
+ console.log("异常自动流转到下一个");
18225
+ }
18226
+ el.addEventListener("animationend", () => {
18227
+ barrageContainer.current.removeChild(el);
18228
+ });
18229
+ index.current++;
18230
+ run();
18152
18231
  };
18153
- return /* @__PURE__ */ React.createElement("div", { className: classes, ref: barrageBody, ...restProps }, /* @__PURE__ */ React.createElement("div", { ref: barrageContainer, className: "bContainer" }, baItemList.map((item, index) => {
18154
- return /* @__PURE__ */ React.createElement(
18155
- "div",
18156
- {
18157
- className: `barrage-item ${classPrefix$1}-item${index} move`,
18158
- style: styleList[index],
18159
- key: index
18160
- },
18161
- item.length > 8 ? `${item.substr(0, 8)}...` : item
18162
- );
18163
- })));
18232
+ return /* @__PURE__ */ React.createElement(components.View, { className: classes, ref: barrageBody, ...restProps }, /* @__PURE__ */ React.createElement(components.View, { ref: barrageContainer, className: "bContainer" }));
18164
18233
  };
18165
18234
  const Barrage = React.forwardRef(
18166
18235
  InternalBarrage
@@ -49,3 +49,15 @@
49
49
  }
50
50
  }
51
51
  }
52
+
53
+ [dir='rtl'] .nut-address,
54
+ .nut-rtl .nut-address {
55
+ &-exist {
56
+ &-item {
57
+ &-info {
58
+ margin-left: 0;
59
+ margin-right: 9px;
60
+ }
61
+ }
62
+ }
63
+ }
@@ -13,6 +13,7 @@
13
13
  .nut-animate-slide-right {
14
14
  animation-name: slide-right;
15
15
  }
16
+
16
17
  @keyframes slide-right {
17
18
  0% {
18
19
  opacity: 0;
@@ -29,6 +30,7 @@
29
30
  .nut-animate-slide-left {
30
31
  animation-name: slide-left;
31
32
  }
33
+
32
34
  @keyframes slide-left {
33
35
  0% {
34
36
  opacity: 0;
@@ -45,6 +47,7 @@
45
47
  .nut-animate-slide-top {
46
48
  animation-name: slide-top;
47
49
  }
50
+
48
51
  @keyframes slide-top {
49
52
  0% {
50
53
  opacity: 0;
@@ -61,6 +64,7 @@
61
64
  .nut-animate-slide-bottom {
62
65
  animation-name: slide-bottom;
63
66
  }
67
+
64
68
  @keyframes slide-bottom {
65
69
  0% {
66
70
  opacity: 0;
@@ -77,6 +81,7 @@
77
81
  .nut-animate-shake {
78
82
  animation-name: shake;
79
83
  }
84
+
80
85
  @keyframes shake {
81
86
  0%,
82
87
  100% {
@@ -124,10 +129,12 @@
124
129
  .nut-animate-ripple {
125
130
  animation-name: ripple;
126
131
  }
132
+
127
133
  @keyframes ripple {
128
134
  0% {
129
135
  transform: scale(1);
130
136
  }
137
+
131
138
  50% {
132
139
  transform: scale(1.1);
133
140
  }
@@ -140,13 +147,16 @@
140
147
  animation-timing-function: ease-in-out;
141
148
  animation-direction: alternate;
142
149
  }
150
+
143
151
  @keyframes breath {
144
152
  0% {
145
153
  transform: scale(1);
146
154
  }
155
+
147
156
  50% {
148
157
  transform: scale(1.1);
149
158
  }
159
+
150
160
  100% {
151
161
  transform: scale(1);
152
162
  }
@@ -155,6 +165,7 @@
155
165
  // 水波
156
166
  .nut-animate-twinkle {
157
167
  position: relative;
168
+
158
169
  &::after,
159
170
  &::before {
160
171
  width: 60 * 1px;
@@ -176,13 +187,16 @@
176
187
  animation-delay: 0.4s;
177
188
  }
178
189
  }
190
+
179
191
  @keyframes twinkle {
180
192
  0% {
181
193
  transform: scale(0);
182
194
  }
195
+
183
196
  20% {
184
197
  opacity: 1;
185
198
  }
199
+
186
200
  50%,
187
201
  100% {
188
202
  transform: scale(1.4);
@@ -212,10 +226,12 @@
212
226
  filter: blur(3 * 1px);
213
227
  }
214
228
  }
229
+
215
230
  @keyframes flicker {
216
231
  0% {
217
232
  transform: translateX(-100 * 1px) skewX(-20deg);
218
233
  }
234
+
219
235
  40%,
220
236
  100% {
221
237
  transform: translateX(150 * 1px) skewX(-20deg);
@@ -227,23 +243,28 @@
227
243
  transform-origin: center center;
228
244
  animation: jump 0.7s linear;
229
245
  }
246
+
230
247
  @keyframes jump {
231
248
  0% {
232
249
  animation-timing-function: ease-in;
233
250
  transform: rotate(0deg) translateY(0);
234
251
  }
252
+
235
253
  25% {
236
254
  animation-timing-function: ease-out;
237
255
  transform: rotate(10deg) translateY(20 * 1px);
238
256
  }
257
+
239
258
  50% {
240
259
  animation-timing-function: ease-in;
241
260
  transform: rotate(0deg) translateY(-10 * 1px);
242
261
  }
262
+
243
263
  75% {
244
264
  animation-timing-function: ease-out;
245
265
  transform: rotate(-10deg) translateY(20 * 1px);
246
266
  }
267
+
247
268
  100% {
248
269
  animation-timing-function: ease-in;
249
270
  transform: rotate(0deg) translateY(0);
@@ -255,6 +276,7 @@
255
276
  position: relative;
256
277
  animation-name: float-pop;
257
278
  }
279
+
258
280
  @keyframes float-pop {
259
281
  0% {
260
282
  top: 0px;
@@ -282,3 +304,30 @@
282
304
  animation-iteration-count: infinite;
283
305
  }
284
306
  }
307
+
308
+ [dir='rtl'] .nut-animate,
309
+ .nut-rtl .nut-animate {
310
+ .nut-animate-twinkle {
311
+ &::after,
312
+ &::before {
313
+ border-radius: calc(60 / 2) * 1px;
314
+ right: auto;
315
+ left: 50%;
316
+ margin-right: 0;
317
+ margin-left: calc(-60 / 2) * 1px;
318
+ }
319
+ }
320
+
321
+ .nut-animate-flicker {
322
+ &::after {
323
+ left: auto;
324
+ right: 0;
325
+ background-image: linear-gradient(
326
+ -106deg,
327
+ rgba(232, 224, 255, 0) 24%,
328
+ #e8e0ff 91%
329
+ );
330
+ transform: skewX(20deg);
331
+ }
332
+ }
333
+ }