@nutui/nutui-react-taro 2.3.11 → 2.4.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 (372) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/dist/esm/ActionSheet.js +1 -13
  3. package/dist/esm/Address.js +1 -21
  4. package/dist/esm/Animate.js +1 -4
  5. package/dist/esm/AnimatingNumbers/style/style.css +1 -1
  6. package/dist/esm/AnimatingNumbers.js +8 -22
  7. package/dist/esm/Audio.js +1 -15
  8. package/dist/esm/Avatar.js +1 -10
  9. package/dist/esm/AvatarCropper.js +1 -10
  10. package/dist/esm/AvatarGroup.js +1 -4
  11. package/dist/esm/BackTop.js +1 -6
  12. package/dist/esm/Badge/style/style.css +1 -1
  13. package/dist/esm/Badge.js +1 -4
  14. package/dist/esm/Barrage.js +1 -7
  15. package/dist/esm/Button.js +1 -6
  16. package/dist/esm/Calendar.js +1 -20
  17. package/dist/esm/CalendarCard.js +1 -8
  18. package/dist/esm/CalendarItem.js +1 -12
  19. package/dist/esm/Card.js +1 -7
  20. package/dist/esm/Cascader.js +1 -18
  21. package/dist/esm/Cell.js +1 -5
  22. package/dist/esm/CellGroup.js +1 -4
  23. package/dist/esm/Checkbox/style/style.css +1 -1
  24. package/dist/esm/Checkbox.js +1 -7
  25. package/dist/esm/CheckboxGroup/style/style.css +1 -1
  26. package/dist/esm/CheckboxGroup.js +1 -7
  27. package/dist/esm/CircleProgress.js +1 -6
  28. package/dist/esm/Col.js +1 -5
  29. package/dist/esm/Collapse/style/style.css +1 -1
  30. package/dist/esm/Collapse.js +1 -8
  31. package/dist/esm/CollapseItem/style/style.css +1 -1
  32. package/dist/esm/CollapseItem.js +1 -5
  33. package/dist/esm/ConfigProvider.js +4 -6
  34. package/dist/esm/CountDown.js +1 -7
  35. package/dist/esm/DatePicker.js +1 -21
  36. package/dist/esm/Dialog/style/style.css +1 -1
  37. package/dist/esm/Dialog.js +1 -16
  38. package/dist/esm/Divider.js +1 -4
  39. package/dist/esm/Drag.js +1 -4
  40. package/dist/esm/Elevator.js +1 -6
  41. package/dist/esm/Ellipsis.js +1 -7
  42. package/dist/esm/Empty.js +1 -9
  43. package/dist/esm/FixedNav.js +1 -13
  44. package/dist/esm/Form.js +7 -18
  45. package/dist/esm/FormItem.js +1 -6
  46. package/dist/esm/Grid.js +1 -7
  47. package/dist/esm/GridItem.js +1 -6
  48. package/dist/esm/Image.js +1 -7
  49. package/dist/esm/ImagePreview.js +1 -20
  50. package/dist/esm/Indicator.js +1 -3
  51. package/dist/esm/InfiniteLoading.js +1 -8
  52. package/dist/esm/Input.js +1 -11
  53. package/dist/esm/InputNumber/style/style.css +1 -1
  54. package/dist/esm/InputNumber.js +1 -7
  55. package/dist/esm/Layout.js +1 -2
  56. package/dist/esm/Loading.js +1 -5
  57. package/dist/esm/Menu.js +1 -15
  58. package/dist/esm/MenuItem.js +1 -14
  59. package/dist/esm/NavBar.js +1 -7
  60. package/dist/esm/NoticeBar/style/style.css +1 -1
  61. package/dist/esm/NoticeBar.js +1 -7
  62. package/dist/esm/Notify.js +1 -9
  63. package/dist/esm/NumberKeyboard.js +1 -15
  64. package/dist/esm/Overlay.js +1 -9
  65. package/dist/esm/Pagination.js +1 -8
  66. package/dist/esm/Picker.js +1 -19
  67. package/dist/esm/Popover/style/style.css +1 -1
  68. package/dist/esm/Popover.js +1 -14
  69. package/dist/esm/Popup.js +1 -12
  70. package/dist/esm/Price.js +1 -3
  71. package/dist/esm/Progress.js +1 -4
  72. package/dist/esm/PullToRefresh.js +1 -10
  73. package/dist/esm/Radio.js +1 -7
  74. package/dist/esm/RadioGroup.js +1 -7
  75. package/dist/esm/Range.js +1 -10
  76. package/dist/esm/Rate.js +1 -11
  77. package/dist/esm/Row.js +1 -5
  78. package/dist/esm/SafeArea.js +1 -3
  79. package/dist/esm/SearchBar.js +1 -7
  80. package/dist/esm/ShortPassword.js +1 -17
  81. package/dist/esm/SideNavBar.js +1 -14
  82. package/dist/esm/SideNavBarItem.js +1 -2
  83. package/dist/esm/Signature.js +1 -4
  84. package/dist/esm/Skeleton.js +1 -11
  85. package/dist/esm/Space.js +1 -3
  86. package/dist/esm/Step.js +1 -6
  87. package/dist/esm/Steps.js +1 -5
  88. package/dist/esm/Sticky.js +1 -7
  89. package/dist/esm/SubSideNavBar.js +1 -3
  90. package/dist/esm/Swipe/style/style.css +1 -1
  91. package/dist/esm/Swipe.js +1 -8
  92. package/dist/esm/Swiper.js +9 -11
  93. package/dist/esm/SwiperItem.js +1 -2
  94. package/dist/esm/Switch.js +1 -5
  95. package/dist/esm/TabPane.js +1 -3
  96. package/dist/esm/Tabbar/style/style.css +1 -1
  97. package/dist/esm/Tabbar.js +1 -8
  98. package/dist/esm/TabbarItem/style/style.css +1 -1
  99. package/dist/esm/TabbarItem.js +1 -5
  100. package/dist/esm/Table.js +1 -9
  101. package/dist/esm/Tabs.js +1 -11
  102. package/dist/esm/Tag.js +1 -5
  103. package/dist/esm/TextArea.js +1 -10
  104. package/dist/esm/TimeDetail.js +1 -4
  105. package/dist/esm/TimeSelect.js +1 -16
  106. package/dist/esm/Toast.js +1 -15
  107. package/dist/esm/Tour/style/style.css +1 -1
  108. package/dist/esm/Tour.js +1 -16
  109. package/dist/esm/TrendArrow.js +1 -4
  110. package/dist/esm/Uploader.js +1 -14
  111. package/dist/esm/Video.js +1 -4
  112. package/dist/esm/VirtualList.js +1 -6
  113. package/dist/esm/WaterMark.js +1 -7
  114. package/dist/esm/{actionsheet.taro-kKhb0Vwt.js → actionsheet.taro-C5BqWoML.js} +9 -17
  115. package/dist/esm/{address.taro-zQuxQEce.js → address.taro-CgkCHDYZ.js} +19 -44
  116. package/dist/esm/{animate.taro-m67VyUHP.js → animate.taro-Dg9jxZEu.js} +6 -14
  117. package/dist/esm/{audio.taro-dJgj5qIu.js → audio.taro-DXxWGngO.js} +14 -30
  118. package/dist/esm/avatar.taro-a6CX3kxV.js +86 -0
  119. package/dist/esm/{avatarcropper.taro-GIZxzMJ_.js → avatarcropper.taro-BFvFmK4t.js} +47 -90
  120. package/dist/esm/{avatargroup.taro-h6dpv6UX.js → avatargroup.taro-bpT5kPbf.js} +3 -11
  121. package/dist/esm/{backtop.taro-Cfld7ina.js → backtop.taro-B-zl6AEC.js} +4 -15
  122. package/dist/esm/{badge.taro-993L861f.js → badge.taro-D7Yn5zJi.js} +8 -16
  123. package/dist/esm/{barrage.taro-6nbq7wtt.js → barrage.taro-BNOcZsJ1.js} +18 -28
  124. package/dist/esm/{button.taro-3IIFy1M2.js → button.taro-OKGsDVW7.js} +8 -23
  125. package/dist/esm/{calendar.taro-iNNHje7V.js → calendar.taro-DbHJEx4G.js} +12 -39
  126. package/dist/esm/{calendarcard.taro-9s7naGmU.js → calendarcard.taro-BHGCq5zX.js} +10 -14
  127. package/dist/esm/{calendaritem.taro-o6Z8OOGY.js → calendaritem.taro-B8tN2DYa.js} +11 -36
  128. package/dist/esm/{card.taro-p4PTy-IU.js → card.taro-uLorQW97.js} +7 -22
  129. package/dist/esm/{cascader.taro-M2nZWxiB.js → cascader.taro-BMp2mI0W.js} +47 -83
  130. package/dist/esm/{cell.taro-jD6MoFTj.js → cell.taro-CCnLF6RC.js} +9 -23
  131. package/dist/esm/{cellgroup.taro-08A3XAze.js → cellgroup.taro-Dz69kT6e.js} +5 -12
  132. package/dist/esm/{checkbox.taro-xMxWdpyI.js → checkbox.taro-CUpF7Afr.js} +40 -32
  133. package/dist/esm/{circleprogress.taro-myZgamBw.js → circleprogress.taro-CKSrzt8Q.js} +8 -22
  134. package/dist/esm/{col.taro-5FMpttLE.js → col.taro-C8DUuJYh.js} +5 -13
  135. package/dist/esm/{collapse.taro-sZibDygv.js → collapse.taro-BM0BsN30.js} +5 -14
  136. package/dist/esm/{collapseitem.taro-AaQ_msgd.js → collapseitem.taro-D_m4VEdG.js} +7 -16
  137. package/dist/esm/configprovider.taro-CyU_tvNJ.js +202 -0
  138. package/dist/esm/{countdown.taro-XZlfWBrA.js → countdown.taro-D-H9erkV.js} +9 -19
  139. package/dist/esm/{datepicker.taro-DrXkqJkN.js → datepicker.taro-DqR52Ivo.js} +14 -26
  140. package/dist/esm/{dialog.taro-dmQGDu3o.js → dialog.taro-Dk0QQMn_.js} +31 -23
  141. package/dist/esm/{divider.taro-H5fKry4P.js → divider.taro-DRcO_m9e.js} +5 -11
  142. package/dist/esm/{drag.taro-BwcleRuB.js → drag.taro-CcHIO07Y.js} +10 -18
  143. package/dist/esm/{elevator.taro-2nbUM3vH.js → elevator.taro-uhrF7ChY.js} +5 -17
  144. package/dist/esm/{ellipsis.taro-VApVqS_j.js → ellipsis.taro-B_mTyNyk.js} +25 -34
  145. package/dist/esm/{empty.taro-gwvOr1xf.js → empty.taro-Brkv6B2Z.js} +8 -18
  146. package/dist/esm/{fixednav.taro-QVBXysDj.js → fixednav.taro-WTBxWxOo.js} +10 -21
  147. package/dist/esm/formitem.taro-Brz5dj_8.js +330 -0
  148. package/dist/esm/{get-rect-by-taro-piSHvCGp.js → get-rect-by-taro-CSN0TGnD.js} +3 -2
  149. package/dist/esm/{grid.taro-3X-_AhXw.js → grid.taro-BA76RrgT.js} +5 -4
  150. package/dist/esm/{griditem.taro-TJDJVeQy.js → griditem.taro-JLddv9zD.js} +6 -11
  151. package/dist/esm/{image.taro-FfeikBlO.js → image.taro-BLz2WCva.js} +5 -6
  152. package/dist/esm/{imagepreview.taro--fVrJUOE.js → imagepreview.taro-Bb1TkBCV.js} +13 -31
  153. package/dist/esm/{indicator.taro-ZH6MICsS.js → indicator.taro-CpHZtD9p.js} +3 -5
  154. package/dist/esm/{infiniteloading.taro-BO0_y46K.js → infiniteloading.taro-Ccq4bEzk.js} +14 -21
  155. package/dist/esm/{input.taro-xCoGdppk.js → input.taro-BVC8gEuk.js} +14 -31
  156. package/dist/esm/{inputnumber.taro-WPpS0Xl9.js → inputnumber.taro-CQiAPZgS.js} +17 -28
  157. package/dist/esm/{layout.taro-lnN-wB0Y.js → layout.taro-BE2868d6.js} +1 -1
  158. package/dist/esm/{loading.taro-aHN6xLIT.js → loading.taro-CRF1z5wQ.js} +5 -8
  159. package/dist/esm/{menu.taro-ODwHYGFM.js → menu.taro-BAiJPGR7.js} +12 -25
  160. package/dist/esm/{menuitem.taro-9nyTDLpt.js → menuitem.taro-oLv6ZYC5.js} +15 -36
  161. package/dist/esm/{navbar.taro-AuKPDCaW.js → navbar.taro-B8u3DOE4.js} +14 -29
  162. package/dist/esm/{noticebar.taro-bHnEzTvL.js → noticebar.taro-CRPbZenq.js} +40 -51
  163. package/dist/esm/{notify.taro-mA9KS8qh.js → notify.taro-jP7y9zMU.js} +6 -15
  164. package/dist/esm/{numberkeyboard.taro-bF6VCXry.js → numberkeyboard.taro-B9rMgy7D.js} +9 -16
  165. package/dist/esm/nutui-react.es.js +93 -118
  166. package/dist/esm/{overlay.taro-HsGeVyPh.js → overlay.taro-BaBu-3-F.js} +10 -22
  167. package/dist/esm/{pagination.taro-C4_Ey5KC.js → pagination.taro-DAK6ddag.js} +7 -19
  168. package/dist/esm/{picker.taro-csU3SZPF.js → picker.taro-Cmng9GW9.js} +34 -43
  169. package/dist/esm/{popover.taro-qldQwLPC.js → popover.taro-BsOaXoWp.js} +29 -45
  170. package/dist/esm/{popup.taro-ObEUml4r.js → popup.taro-Iy_WQZ-m.js} +8 -32
  171. package/dist/esm/{price.taro-Z1zR8YWV.js → price.taro-UVRHPHRD.js} +5 -16
  172. package/dist/esm/{progress.taro-pStvlrbA.js → progress.taro-BOHykt7X.js} +8 -14
  173. package/dist/esm/{pulltorefresh.taro-2jER8Mat.js → pulltorefresh.taro-BJdQj5sL.js} +31 -47
  174. package/dist/esm/{radio.taro-EKJXMjnX.js → radio.taro-CjJgX9o2.js} +20 -33
  175. package/dist/esm/{range.taro-mDYY3SXA.js → range.taro-BxMDs5Cy.js} +20 -22
  176. package/dist/esm/{rate.taro-_5Mjd_EO.js → rate.taro-BABLqt4h.js} +7 -20
  177. package/dist/esm/{row.taro-IxNlKKQM.js → row.taro-D8chDydP.js} +4 -14
  178. package/dist/esm/{searchbar.taro-hVzdT6nI.js → searchbar.taro-PfVx6o-6.js} +9 -26
  179. package/dist/esm/{shortpassword.taro-JBWXzk6I.js → shortpassword.taro-BXsxku33.js} +9 -19
  180. package/dist/esm/{sidenavbar.taro-8qoGZg5n.js → sidenavbar.taro-eK5vaZPR.js} +7 -13
  181. package/dist/esm/sidenavbaritem.taro-L7HbsCLn.js +14 -0
  182. package/dist/esm/{signature.taro-y3qxnKMv.js → signature.taro-KPm_xs66.js} +11 -19
  183. package/dist/esm/{skeleton.taro--AtiA7MK.js → skeleton.taro-BwIDIf2p.js} +6 -17
  184. package/dist/esm/{space.taro-q3R_yq79.js → space.taro-CZ999etm.js} +1 -4
  185. package/dist/esm/{step.taro-_DEZqFGb.js → step.taro-DLr2GzYk.js} +8 -16
  186. package/dist/esm/steps.taro-C8Yg1Sns.js +28 -0
  187. package/dist/esm/{sticky.taro-p-evMNR-.js → sticky.taro-DRBk3gkQ.js} +12 -15
  188. package/dist/esm/{subsidenavbar.taro-Zy52MDDG.js → subsidenavbar.taro-ByxYpgfP.js} +7 -9
  189. package/dist/esm/{swipe.taro-p2ONOq1o.js → swipe.taro-wm7YWwaj.js} +29 -31
  190. package/dist/esm/{swiperitem.taro-BC1CE0T-.js → swiperitem.taro-8JXI24f0.js} +3 -1
  191. package/dist/esm/{switch.taro-L0BAbMeu.js → switch.taro-D1HgJoJz.js} +6 -13
  192. package/dist/esm/{tabbar.taro-QE0rjSKE.js → tabbar.taro-LAPQoOva.js} +7 -18
  193. package/dist/esm/tabbaritem.taro-C4AZbQMG.js +58 -0
  194. package/dist/esm/{table.taro-0zRh2hq6.js → table.taro-ClLmfqz3.js} +14 -24
  195. package/dist/esm/{tabpane.taro-5k7wWimS.js → tabpane.taro-BAe86j3t.js} +1 -4
  196. package/dist/esm/{tabs.taro-Yj7vgtSg.js → tabs.taro-DRmZR3Xu.js} +19 -35
  197. package/dist/esm/{tag.taro-5KC_wObY.js → tag.taro-BsmY5QfN.js} +7 -22
  198. package/dist/esm/{textarea.taro-9zQLTCwU.js → textarea.taro-BJIFCpKb.js} +11 -20
  199. package/dist/esm/{timedetail.taro-TF9Wcblh.js → timedetail.taro-x6Zey1xi.js} +11 -21
  200. package/dist/esm/{timeselect.taro-j8LgSCe5.js → timeselect.taro-BXq4APSJ.js} +20 -33
  201. package/dist/esm/{toast.taro-xnEQSCDJ.js → toast.taro-BVXqvjNJ.js} +9 -27
  202. package/dist/esm/{tour.taro-CGEjzzN_.js → tour.taro-wfXuUebD.js} +7 -24
  203. package/dist/esm/{trendarrow.taro-hsM6-XsQ.js → trendarrow.taro-BHUetKSS.js} +6 -18
  204. package/dist/esm/tslib.es6-BZ8i9Q6l.js +47 -0
  205. package/dist/esm/types/src/packages/button/demos/h5/demo1.d.ts +3 -0
  206. package/dist/esm/types/src/packages/button/demos/h5/demo2.d.ts +3 -0
  207. package/dist/esm/types/src/packages/button/demos/h5/demo3.d.ts +3 -0
  208. package/dist/esm/types/src/packages/button/demos/h5/demo4.d.ts +3 -0
  209. package/dist/esm/types/src/packages/button/demos/h5/demo5.d.ts +3 -0
  210. package/dist/esm/types/src/packages/button/demos/h5/demo6.d.ts +3 -0
  211. package/dist/esm/types/src/packages/button/demos/h5/demo7.d.ts +3 -0
  212. package/dist/esm/types/src/packages/button/demos/h5/demo8.d.ts +3 -0
  213. package/dist/esm/types/src/packages/button/demos/h5/demo9.d.ts +3 -0
  214. package/dist/esm/types/src/packages/button/demos/taro/demo1.d.ts +3 -0
  215. package/dist/esm/types/src/packages/button/demos/taro/demo10.d.ts +3 -0
  216. package/dist/esm/types/src/packages/button/demos/taro/demo2.d.ts +3 -0
  217. package/dist/esm/types/src/packages/button/demos/taro/demo3.d.ts +3 -0
  218. package/dist/esm/types/src/packages/button/demos/taro/demo4.d.ts +3 -0
  219. package/dist/esm/types/src/packages/button/demos/taro/demo5.d.ts +3 -0
  220. package/dist/esm/types/src/packages/button/demos/taro/demo6.d.ts +3 -0
  221. package/dist/esm/types/src/packages/button/demos/taro/demo7.d.ts +3 -0
  222. package/dist/esm/types/src/packages/button/demos/taro/demo8.d.ts +3 -0
  223. package/dist/esm/types/src/packages/button/demos/taro/demo9.d.ts +3 -0
  224. package/dist/esm/types/src/packages/cell/demo.d.ts +0 -1
  225. package/dist/esm/types/src/packages/cell/demo.taro.d.ts +0 -1
  226. package/dist/esm/types/src/packages/cell/demos/h5/demo1.d.ts +3 -0
  227. package/dist/esm/types/src/packages/cell/demos/h5/demo2.d.ts +3 -0
  228. package/dist/esm/types/src/packages/cell/demos/h5/demo3.d.ts +3 -0
  229. package/dist/esm/types/src/packages/cell/demos/h5/demo4.d.ts +3 -0
  230. package/dist/esm/types/src/packages/cell/demos/h5/demo5.d.ts +3 -0
  231. package/dist/esm/types/src/packages/cell/demos/h5/demo6.d.ts +3 -0
  232. package/dist/esm/types/src/packages/cell/demos/h5/demo7.d.ts +3 -0
  233. package/dist/esm/types/src/packages/cell/demos/taro/demo1.d.ts +3 -0
  234. package/dist/esm/types/src/packages/cell/demos/taro/demo2.d.ts +3 -0
  235. package/dist/esm/types/src/packages/cell/demos/taro/demo3.d.ts +3 -0
  236. package/dist/esm/types/src/packages/cell/demos/taro/demo4.d.ts +3 -0
  237. package/dist/esm/types/src/packages/cell/demos/taro/demo5.d.ts +3 -0
  238. package/dist/esm/types/src/packages/cell/demos/taro/demo6.d.ts +3 -0
  239. package/dist/esm/types/src/packages/cell/demos/taro/demo7.d.ts +3 -0
  240. package/dist/esm/types/src/packages/checkboxgroup/checkboxgroup.d.ts +1 -0
  241. package/dist/esm/types/src/packages/checkboxgroup/checkboxgroup.taro.d.ts +1 -0
  242. package/dist/esm/types/src/packages/checkboxgroup/context.d.ts +1 -0
  243. package/dist/esm/types/src/packages/configprovider/configprovider.d.ts +1 -0
  244. package/dist/esm/types/src/packages/configprovider/configprovider.taro.d.ts +1 -0
  245. package/dist/esm/types/src/packages/configprovider/index.d.ts +2 -2
  246. package/dist/esm/types/src/packages/configprovider/index.taro.d.ts +2 -2
  247. package/dist/esm/types/src/packages/configprovider/types.d.ts +1 -1
  248. package/dist/esm/types/src/packages/dialog/config.d.ts +3 -3
  249. package/dist/esm/types/src/packages/dialog/index.d.ts +1 -1
  250. package/dist/esm/types/src/packages/inputnumber/inputnumber.taro.d.ts +2 -0
  251. package/dist/esm/types/src/packages/noticebar/index.d.ts +1 -0
  252. package/dist/esm/types/src/packages/noticebar/noticebar.d.ts +2 -0
  253. package/dist/esm/types/src/packages/noticebar/noticebar.taro.d.ts +2 -0
  254. package/dist/esm/types/src/packages/noticebar/types.d.ts +1 -0
  255. package/dist/esm/types/src/packages/popover/index.d.ts +2 -1
  256. package/dist/esm/types/src/packages/popover/index.taro.d.ts +2 -1
  257. package/dist/esm/types/src/packages/popover/popover.d.ts +2 -12
  258. package/dist/esm/types/src/packages/popover/popover.taro.d.ts +2 -12
  259. package/dist/esm/types/src/packages/popover/types.d.ts +14 -0
  260. package/dist/esm/types/src/packages/table/useTableSticky.d.ts +1 -1
  261. package/dist/esm/types/src/packages/toast/toast.taro.d.ts +7 -3
  262. package/dist/esm/types/src/packages/tour/tour.d.ts +1 -1
  263. package/dist/esm/types/src/packages/tour/tour.taro.d.ts +1 -1
  264. package/dist/esm/{uploader.taro-bRF02TR9.js → uploader.taro-DdJ-sOK4.js} +49 -101
  265. package/dist/esm/{use-custom-event-XvsODK8c.js → use-custom-event-DuP4onEm.js} +5 -5
  266. package/dist/esm/{use-props-value-vKr0R0AX.js → use-props-value-SH9krhkx.js} +2 -2
  267. package/dist/esm/{video.taro-csvHwS2v.js → video.taro-CEMVfhCS.js} +3 -5
  268. package/dist/esm/{virtuallist.taro-AeTVtFFa.js → virtuallist.taro-Cl08vfdg.js} +10 -19
  269. package/dist/esm/{watermark.taro-nvSmcwu-.js → watermark.taro-BxM8VfXb.js} +5 -30
  270. package/dist/locales/base.js +1 -1
  271. package/dist/locales/en-US.js +1 -1
  272. package/dist/locales/id-ID.js +1 -1
  273. package/dist/locales/tr-TR.js +1 -1
  274. package/dist/locales/zh-CN.js +1 -1
  275. package/dist/locales/zh-TW.js +1 -1
  276. package/dist/locales/zh-UG.js +1 -1
  277. package/dist/nutui.react.es.js +403 -382
  278. package/dist/nutui.react.umd.js +404 -383
  279. package/dist/packages/animatingnumbers/countup.scss +1 -0
  280. package/dist/packages/badge/badge.scss +2 -0
  281. package/dist/packages/checkbox/checkbox.scss +19 -0
  282. package/dist/packages/checkboxgroup/checkboxgroup.scss +25 -0
  283. package/dist/packages/collapseitem/collapseitem.scss +1 -6
  284. package/dist/packages/dialog/dialog.scss +8 -1
  285. package/dist/packages/noticebar/noticebar.scss +19 -1
  286. package/dist/packages/popover/popover.scss +21 -0
  287. package/dist/packages/swipe/swipe.scss +2 -0
  288. package/dist/style.css +1 -1
  289. package/dist/style.mjs +1 -1
  290. package/dist/styles/variables-jmapp.scss +17 -0
  291. package/dist/styles/variables.scss +19 -12
  292. package/dist/types/packages/badge/badge.taro.d.ts +1 -1
  293. package/dist/types/packages/button/demos/h5/demo1.d.ts +3 -0
  294. package/dist/types/packages/button/demos/h5/demo2.d.ts +3 -0
  295. package/dist/types/packages/button/demos/h5/demo3.d.ts +3 -0
  296. package/dist/types/packages/button/demos/h5/demo4.d.ts +3 -0
  297. package/dist/types/packages/button/demos/h5/demo5.d.ts +3 -0
  298. package/dist/types/packages/button/demos/h5/demo6.d.ts +3 -0
  299. package/dist/types/packages/button/demos/h5/demo7.d.ts +3 -0
  300. package/dist/types/packages/button/demos/h5/demo8.d.ts +3 -0
  301. package/dist/types/packages/button/demos/h5/demo9.d.ts +3 -0
  302. package/dist/types/packages/button/demos/taro/demo1.d.ts +3 -0
  303. package/dist/types/packages/button/demos/taro/demo10.d.ts +3 -0
  304. package/dist/types/packages/button/demos/taro/demo2.d.ts +3 -0
  305. package/dist/types/packages/button/demos/taro/demo3.d.ts +3 -0
  306. package/dist/types/packages/button/demos/taro/demo4.d.ts +3 -0
  307. package/dist/types/packages/button/demos/taro/demo5.d.ts +3 -0
  308. package/dist/types/packages/button/demos/taro/demo6.d.ts +3 -0
  309. package/dist/types/packages/button/demos/taro/demo7.d.ts +3 -0
  310. package/dist/types/packages/button/demos/taro/demo8.d.ts +3 -0
  311. package/dist/types/packages/button/demos/taro/demo9.d.ts +3 -0
  312. package/dist/types/packages/cell/demos/h5/demo1.d.ts +3 -0
  313. package/dist/types/packages/cell/demos/h5/demo2.d.ts +3 -0
  314. package/dist/types/packages/cell/demos/h5/demo3.d.ts +3 -0
  315. package/dist/types/packages/cell/demos/h5/demo4.d.ts +3 -0
  316. package/dist/types/packages/cell/demos/h5/demo5.d.ts +3 -0
  317. package/dist/types/packages/cell/demos/h5/demo6.d.ts +3 -0
  318. package/dist/types/packages/cell/demos/h5/demo7.d.ts +3 -0
  319. package/dist/types/packages/cell/demos/taro/demo1.d.ts +3 -0
  320. package/dist/types/packages/cell/demos/taro/demo2.d.ts +3 -0
  321. package/dist/types/packages/cell/demos/taro/demo3.d.ts +3 -0
  322. package/dist/types/packages/cell/demos/taro/demo4.d.ts +3 -0
  323. package/dist/types/packages/cell/demos/taro/demo5.d.ts +3 -0
  324. package/dist/types/packages/cell/demos/taro/demo6.d.ts +3 -0
  325. package/dist/types/packages/cell/demos/taro/demo7.d.ts +3 -0
  326. package/dist/types/packages/checkboxgroup/checkboxgroup.d.ts +1 -0
  327. package/dist/types/packages/checkboxgroup/checkboxgroup.taro.d.ts +1 -0
  328. package/dist/types/packages/checkboxgroup/context.d.ts +1 -0
  329. package/dist/types/packages/configprovider/configprovider.d.ts +1 -0
  330. package/dist/types/packages/configprovider/configprovider.taro.d.ts +1 -0
  331. package/dist/types/packages/configprovider/index.d.ts +2 -2
  332. package/dist/types/packages/configprovider/index.taro.d.ts +2 -2
  333. package/dist/types/packages/configprovider/types.d.ts +1 -1
  334. package/dist/types/packages/dialog/config.d.ts +3 -3
  335. package/dist/types/packages/dialog/index.d.ts +1 -1
  336. package/dist/types/packages/empty/empty.taro.d.ts +15 -3
  337. package/dist/types/packages/inputnumber/inputnumber.taro.d.ts +6 -0
  338. package/dist/types/packages/noticebar/index.d.ts +1 -0
  339. package/dist/types/packages/noticebar/noticebar.d.ts +2 -0
  340. package/dist/types/packages/noticebar/noticebar.taro.d.ts +6 -0
  341. package/dist/types/packages/noticebar/types.d.ts +1 -0
  342. package/dist/types/packages/popover/index.d.ts +2 -1
  343. package/dist/types/packages/popover/index.taro.d.ts +2 -1
  344. package/dist/types/packages/popover/popover.d.ts +2 -12
  345. package/dist/types/packages/popover/popover.taro.d.ts +2 -12
  346. package/dist/types/packages/popover/types.d.ts +14 -0
  347. package/dist/types/packages/table/useTableSticky.d.ts +1 -1
  348. package/dist/types/packages/toast/toast.taro.d.ts +8 -4
  349. package/dist/types/packages/tour/tour.d.ts +1 -1
  350. package/dist/types/packages/tour/tour.taro.d.ts +1 -1
  351. package/package.json +5 -1
  352. package/dist/esm/avatar.taro-7ltbzIdY.js +0 -109
  353. package/dist/esm/configprovider.taro-q5J2gQbi.js +0 -486
  354. package/dist/esm/formitem.taro-viaUkMmm.js +0 -1435
  355. package/dist/esm/index-oitVOJp9.js +0 -661
  356. package/dist/esm/sidenavbaritem.taro-AxJNRAdi.js +0 -13
  357. package/dist/esm/steps.taro-PH0qWPla.js +0 -32
  358. package/dist/esm/tabbaritem.taro-t9C07OYX.js +0 -73
  359. /package/dist/esm/{UserContext-9BL0cq8w.js → UserContext-BlM0373q.js} +0 -0
  360. /package/dist/esm/{context-6mGEMLsx.js → context-4T-L2x0_.js} +0 -0
  361. /package/dist/esm/{context-9BL0cq8w.js → context-BlM0373q.js} +0 -0
  362. /package/dist/esm/{date-nxKOxj5-.js → date-D0pth0qC.js} +0 -0
  363. /package/dist/esm/{get-scroll-parent-uywvoQMl.js → get-scroll-parent-DB1VRg11.js} +0 -0
  364. /package/dist/esm/{index-YvHA__3D.js → index-DeNfBlua.js} +0 -0
  365. /package/dist/esm/{pad-zero-iY-0-oys.js → pad-zero-B2OUQfh7.js} +0 -0
  366. /package/dist/esm/{px-check-JiWLYN2v.js → px-check-D1Xbd9pj.js} +0 -0
  367. /package/dist/esm/{raf-UzmDvMUW.js → raf-zwv-SBjP.js} +0 -0
  368. /package/dist/esm/{safearea.taro-afu_mY7g.js → safearea.taro-BMQHr7tu.js} +0 -0
  369. /package/dist/esm/{typings-buMpDfSR.js → typings-DV9RBfhj.js} +0 -0
  370. /package/dist/esm/{use-force-update-0oEVD8Nr.js → use-force-update-CudFjCsy.js} +0 -0
  371. /package/dist/esm/{use-refs-IdrY0ww3.js → use-refs-BeEmziIR.js} +0 -0
  372. /package/dist/esm/{use-touch-BUFdkOSA.js → use-touch-OfEaR5qi.js} +0 -0
@@ -1,9 +1,10 @@
1
+ import { _ as __rest, a as __awaiter } from "./tslib.es6-BZ8i9Q6l.js";
1
2
  import React__default, { useRef, useEffect, useState, useMemo, useCallback } from "react";
2
3
  import classNames from "classnames";
3
4
  import { getEnv, usePageScroll, getSystemInfoSync } from "@tarojs/taro";
4
- import { C as ComponentDefaults } from "./typings-buMpDfSR.js";
5
- import { g as getRectByTaro } from "./get-rect-by-taro-piSHvCGp.js";
6
- import { g as getScrollParent } from "./get-scroll-parent-uywvoQMl.js";
5
+ import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
6
+ import { g as getRectByTaro } from "./get-rect-by-taro-CSN0TGnD.js";
7
+ import { g as getScrollParent } from "./get-scroll-parent-DB1VRg11.js";
7
8
  function useWatch(dep, callback, config = { immediate: false }) {
8
9
  const { immediate } = config;
9
10
  const prev = useRef();
@@ -27,14 +28,10 @@ function useWatch(dep, callback, config = { immediate: false }) {
27
28
  stop.current = true;
28
29
  };
29
30
  }
30
- const defaultProps = {
31
- ...ComponentDefaults,
32
- position: "top",
33
- zIndex: 900
34
- };
31
+ const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { position: "top", zIndex: 900 });
35
32
  const classPrefix = "nut-sticky";
36
33
  const Sticky = (props) => {
37
- const { position, zIndex, threshold, style, children, container, className, onChange, ...rest } = { ...defaultProps, ...props };
34
+ const _a = Object.assign(Object.assign({}, defaultProps), props), { position, zIndex, threshold, style, children, container, className, onChange } = _a, rest = __rest(_a, ["position", "zIndex", "threshold", "style", "children", "container", "className", "onChange"]);
38
35
  const stickyRef = useRef(null);
39
36
  const rootRef = useRef(null);
40
37
  const [rootRect, setRootRect] = useState({});
@@ -77,14 +74,14 @@ const Sticky = (props) => {
77
74
  style2.zIndex = zIndex;
78
75
  return style2;
79
76
  }, [fixed, rootRect.height, rootRect.width, transform, position]);
80
- const handleScroll = async (scrollTop) => {
81
- const curRootRect = await getRectByTaro(rootRef.current);
82
- const stickyRect = await getRectByTaro(stickyRef.current);
77
+ const handleScroll = (scrollTop) => __awaiter(void 0, void 0, void 0, function* () {
78
+ const curRootRect = yield getRectByTaro(rootRef.current);
79
+ const stickyRect = yield getRectByTaro(stickyRef.current);
83
80
  if (curRootRect && stickyRect) {
84
81
  setRootRect(curRootRect);
85
82
  if (position === "top") {
86
83
  if (container) {
87
- const containerRect = await getRectByTaro(container.current);
84
+ const containerRect = yield getRectByTaro(container.current);
88
85
  const difference = containerRect.bottom - threshold - curRootRect.height;
89
86
  const curTransform = difference < 0 ? difference : 0;
90
87
  setTransform(curTransform);
@@ -100,7 +97,7 @@ const Sticky = (props) => {
100
97
  } else {
101
98
  console.warn("getRectByTaro获取失败", { stickyRect, curRootRect });
102
99
  }
103
- };
100
+ });
104
101
  const getElement = useCallback(() => {
105
102
  return getScrollParent(rootRef.current);
106
103
  }, []);
@@ -121,7 +118,7 @@ const Sticky = (props) => {
121
118
  });
122
119
  return React__default.createElement(
123
120
  "div",
124
- { ref: rootRef, style: rootStyle, className: classNames(classPrefix, className), ...rest },
121
+ Object.assign({ ref: rootRef, style: rootStyle, className: classNames(classPrefix, className) }, rest),
125
122
  React__default.createElement("div", { className: classNames("nut-sticky-box", {
126
123
  "nut-sticky-fixed": fixed
127
124
  }), ref: stickyRef, style: stickyStyle }, children)
@@ -1,14 +1,12 @@
1
+ import { _ as __rest } from "./tslib.es6-BZ8i9Q6l.js";
1
2
  import React__default, { useState, useContext, useRef, useCallback, useEffect } from "react";
2
- import { O as OffsetContext } from "./context-6mGEMLsx.js";
3
+ import { O as OffsetContext } from "./context-4T-L2x0_.js";
3
4
  const defaultProps = {
4
5
  open: true
5
6
  };
6
7
  const SubSideNavBar = (props) => {
7
8
  const classPrefix = "nut-subsidenavbar";
8
- const { title, value, children, onClick, open, ...rest } = {
9
- ...defaultProps,
10
- ...props
11
- };
9
+ const _a = Object.assign(Object.assign({}, defaultProps), props), { title, value, children, onClick, open } = _a, rest = __rest(_a, ["title", "value", "children", "onClick", "open"]);
12
10
  const [subShow, setSubShow] = useState(open);
13
11
  const offset = useContext(OffsetContext);
14
12
  const listRef = useRef(null);
@@ -40,16 +38,16 @@ const SubSideNavBar = (props) => {
40
38
  onClick && onClick({ title, value, isShow });
41
39
  };
42
40
  useEffect(() => {
43
- var _a, _b;
44
- const childNodes = (_a = listRef.current) == null ? void 0 : _a.children;
45
- (_b = listRef.current) == null ? void 0 : _b.setAttribute("level", "1");
41
+ var _a2, _b;
42
+ const childNodes = (_a2 = listRef.current) === null || _a2 === void 0 ? void 0 : _a2.children;
43
+ (_b = listRef.current) === null || _b === void 0 ? void 0 : _b.setAttribute("level", "1");
46
44
  childNodes && setListLevel(childNodes);
47
45
  }, [setListLevel]);
48
46
  const divClass = subShow ? `${classPrefix}-list sidenavbar-show` : `${classPrefix}-list sidenavbar-hide`;
49
47
  const iconClass = subShow ? "arrow-icon arrow-down" : "arrow-icon arrow-up";
50
48
  return React__default.createElement(
51
49
  "div",
52
- { className: divClass, ref: listRef, onClick: clickFn, ...rest },
50
+ Object.assign({ className: divClass, ref: listRef, onClick: clickFn }, rest),
53
51
  React__default.createElement(
54
52
  "div",
55
53
  { className: `${classPrefix}-title ${classPrefix}-border-bt` },
@@ -1,10 +1,11 @@
1
+ import { a as __awaiter } from "./tslib.es6-BZ8i9Q6l.js";
1
2
  import React__default, { forwardRef, useRef, useState, useImperativeHandle, useEffect } from "react";
2
3
  import classNames from "classnames";
3
4
  import { View } from "@tarojs/components";
4
5
  import { useReady, nextTick } from "@tarojs/taro";
5
- import { u as useTouch } from "./use-touch-BUFdkOSA.js";
6
- import { g as getRectByTaro } from "./get-rect-by-taro-piSHvCGp.js";
7
- import { C as ComponentDefaults } from "./typings-buMpDfSR.js";
6
+ import { u as useTouch } from "./use-touch-OfEaR5qi.js";
7
+ import { g as getRectByTaro } from "./get-rect-by-taro-CSN0TGnD.js";
8
+ import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
8
9
  function preventDefault(event, isStopPropagation) {
9
10
  if (typeof event.cancelable !== "boolean" || event.cancelable) {
10
11
  event.preventDefault();
@@ -13,27 +14,24 @@ function preventDefault(event, isStopPropagation) {
13
14
  event.stopPropagation();
14
15
  }
15
16
  }
16
- const defaultProps = {
17
- ...ComponentDefaults,
18
- name: ""
19
- };
17
+ const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { name: "" });
20
18
  const Swipe = forwardRef((props, instanceRef) => {
21
19
  const classPrefix = "nut-swipe";
22
20
  const touch = useTouch();
23
21
  useReady(() => {
24
- const getWidth = async () => {
22
+ const getWidth = () => __awaiter(void 0, void 0, void 0, function* () {
25
23
  if (leftWrapper.current) {
26
- const leftRect = await getRectByTaro(leftWrapper.current);
27
- setActionWidth((v) => ({ ...v, left: leftRect.width }));
24
+ const leftRect = yield getRectByTaro(leftWrapper.current);
25
+ setActionWidth((v) => Object.assign(Object.assign({}, v), { left: leftRect.width }));
28
26
  }
29
27
  if (rightWrapper.current) {
30
- const rightRect = await getRectByTaro(rightWrapper.current);
31
- setActionWidth((v) => ({ ...v, right: rightRect.width }));
28
+ const rightRect = yield getRectByTaro(rightWrapper.current);
29
+ setActionWidth((v) => Object.assign(Object.assign({}, v), { right: rightRect.width }));
32
30
  }
33
- };
31
+ });
34
32
  nextTick(() => getWidth());
35
33
  });
36
- const { children, className, style } = { ...defaultProps, ...props };
34
+ const { children, className, style } = Object.assign(Object.assign({}, defaultProps), props);
37
35
  const root = useRef();
38
36
  const opened = useRef(false);
39
37
  const lockClick = useRef(false);
@@ -52,33 +50,33 @@ const Swipe = forwardRef((props, instanceRef) => {
52
50
  };
53
51
  const leftWidth = actionWidth.left;
54
52
  const rightWidth = actionWidth.right;
55
- const onTouchStart = async (event) => {
53
+ const onTouchStart = (event) => __awaiter(void 0, void 0, void 0, function* () {
56
54
  var _a;
57
55
  if (leftWrapper.current) {
58
- const leftRect = await getRectByTaro(leftWrapper.current);
59
- setActionWidth((v) => ({ ...v, left: leftRect.width }));
56
+ const leftRect = yield getRectByTaro(leftWrapper.current);
57
+ setActionWidth((v) => Object.assign(Object.assign({}, v), { left: leftRect.width }));
60
58
  }
61
59
  if (rightWrapper.current) {
62
- const rightRect = await getRectByTaro(rightWrapper.current);
63
- setActionWidth((v) => ({ ...v, right: rightRect == null ? void 0 : rightRect.width }));
60
+ const rightRect = yield getRectByTaro(rightWrapper.current);
61
+ setActionWidth((v) => Object.assign(Object.assign({}, v), { right: rightRect === null || rightRect === void 0 ? void 0 : rightRect.width }));
64
62
  }
65
63
  if (!props.disabled) {
66
64
  startOffset.current = state.offset;
67
65
  touch.start(event);
68
- (_a = props.onTouchStart) == null ? void 0 : _a.call(props, event);
66
+ (_a = props.onTouchStart) === null || _a === void 0 ? void 0 : _a.call(props, event);
69
67
  }
70
- };
68
+ });
71
69
  const onTouchMove = (event) => {
72
70
  var _a;
73
71
  if (props.disabled) {
74
72
  return;
75
73
  }
76
74
  touch.move(event);
77
- (_a = props.onTouchMove) == null ? void 0 : _a.call(props, event);
75
+ (_a = props.onTouchMove) === null || _a === void 0 ? void 0 : _a.call(props, event);
78
76
  if (touch.isHorizontal()) {
79
77
  lockClick.current = true;
80
78
  props.onTouchMove && props.onTouchMove(event);
81
- const newState = { ...state, dragging: true };
79
+ const newState = Object.assign(Object.assign({}, state), { dragging: true });
82
80
  const isEdge = !opened || touch.deltaX.current * startOffset.current < 0;
83
81
  if (isEdge) {
84
82
  preventDefault(event, true);
@@ -90,12 +88,12 @@ const Swipe = forwardRef((props, instanceRef) => {
90
88
  const onTouchEnd = (event) => {
91
89
  var _a;
92
90
  if (state.dragging) {
93
- setState((v) => ({ ...v, dragging: false }));
91
+ setState((v) => Object.assign(Object.assign({}, v), { dragging: false }));
94
92
  toggle(state.offset > 0 ? "left" : "right");
95
93
  setTimeout(() => {
96
94
  lockClick.current = false;
97
95
  }, 0);
98
- (_a = props.onTouchEnd) == null ? void 0 : _a.call(props, event);
96
+ (_a = props.onTouchEnd) === null || _a === void 0 ? void 0 : _a.call(props, event);
99
97
  }
100
98
  };
101
99
  const toggle = (side) => {
@@ -114,19 +112,19 @@ const Swipe = forwardRef((props, instanceRef) => {
114
112
  opened.current = true;
115
113
  const offset = side === "left" ? leftWidth : -rightWidth;
116
114
  const name = props.name;
117
- (_a = props.onOpen) == null ? void 0 : _a.call(props, { name, position: side });
118
- setState((v) => ({ ...v, offset: Number(offset) || 0 }));
115
+ (_a = props.onOpen) === null || _a === void 0 ? void 0 : _a.call(props, { name, position: side });
116
+ setState((v) => Object.assign(Object.assign({}, v), { offset: Number(offset) || 0 }));
119
117
  };
120
118
  const close = (position) => {
121
119
  var _a;
122
120
  if (opened.current) {
123
121
  opened.current = false;
124
- (_a = props.onClose) == null ? void 0 : _a.call(props, {
122
+ (_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props, {
125
123
  name: props.name,
126
124
  position: position || "left"
127
125
  });
128
126
  }
129
- setState((v) => ({ ...v, offset: 0 }));
127
+ setState((v) => Object.assign(Object.assign({}, v), { offset: 0 }));
130
128
  };
131
129
  const rangeCalculation = (num, min, max) => {
132
130
  return Math.min(Math.max(Number(num), Number(min)), Number(max));
@@ -145,7 +143,7 @@ const Swipe = forwardRef((props, instanceRef) => {
145
143
  if (props.beforeClose) {
146
144
  props.beforeClose(position);
147
145
  } else {
148
- (_a = props.onActionClick) == null ? void 0 : _a.call(props, event, position);
146
+ (_a = props.onActionClick) === null || _a === void 0 ? void 0 : _a.call(props, event, position);
149
147
  }
150
148
  };
151
149
  useImperativeHandle(instanceRef, () => ({
@@ -157,7 +155,7 @@ const Swipe = forwardRef((props, instanceRef) => {
157
155
  const targets = [root];
158
156
  if (targets.some((targetItem) => {
159
157
  const targetElement = targetItem.current || targetItem;
160
- return !targetElement || (targetElement == null ? void 0 : targetElement.contains(event.target));
158
+ return !targetElement || (targetElement === null || targetElement === void 0 ? void 0 : targetElement.contains(event.target));
161
159
  })) {
162
160
  return;
163
161
  }
@@ -1,10 +1,12 @@
1
+ import { _ as __rest } from "./tslib.es6-BZ8i9Q6l.js";
1
2
  import React__default from "react";
2
3
  const defaultProps = {
3
4
  itemId: "",
4
5
  skipHiddenItemLayout: false
5
6
  };
6
7
  const SwiperItem = (props) => {
7
- const { children, ...rest } = props;
8
+ const { children } = props;
9
+ __rest(props, ["children"]);
8
10
  return React__default.createElement(React__default.Fragment, null, children);
9
11
  };
10
12
  SwiperItem.defaultProps = defaultProps;
@@ -1,17 +1,10 @@
1
+ import { _ as __rest } from "./tslib.es6-BZ8i9Q6l.js";
1
2
  import React__default from "react";
2
- import { C as ComponentDefaults } from "./typings-buMpDfSR.js";
3
- import { u as usePropsValue } from "./use-props-value-vKr0R0AX.js";
4
- const defaultProps = {
5
- ...ComponentDefaults,
6
- disabled: false,
7
- activeText: "",
8
- inactiveText: ""
9
- };
3
+ import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
4
+ import { u as usePropsValue } from "./use-props-value-SH9krhkx.js";
5
+ const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { disabled: false, activeText: "", inactiveText: "" });
10
6
  const Switch = (props) => {
11
- const { checked, defaultChecked, disabled, activeText, inactiveText, className, style, onChange, ...rest } = {
12
- ...defaultProps,
13
- ...props
14
- };
7
+ const _a = Object.assign(Object.assign({}, defaultProps), props), { checked, defaultChecked, disabled, activeText, inactiveText, className, style, onChange } = _a, rest = __rest(_a, ["checked", "defaultChecked", "disabled", "activeText", "inactiveText", "className", "style", "onChange"]);
15
8
  const classPrefix = "nut-switch";
16
9
  const [value, setValue] = usePropsValue({
17
10
  value: checked,
@@ -28,7 +21,7 @@ const Switch = (props) => {
28
21
  };
29
22
  return React__default.createElement(
30
23
  "div",
31
- { className: classes(), onClick: (e) => onClick(e), style, ...rest },
24
+ Object.assign({ className: classes(), onClick: (e) => onClick(e), style }, rest),
32
25
  React__default.createElement(
33
26
  "div",
34
27
  { className: `${classPrefix}-button` },
@@ -1,23 +1,12 @@
1
1
  import React__default from "react";
2
2
  import classNames from "classnames";
3
- import { C as ComponentDefaults } from "./typings-buMpDfSR.js";
4
- import { u as usePropsValue } from "./use-props-value-vKr0R0AX.js";
5
- import { a as TabbarContext, T as TabbarItem } from "./tabbaritem.taro-t9C07OYX.js";
6
- const defaultProps = {
7
- ...ComponentDefaults,
8
- defaultValue: 0,
9
- fixed: false,
10
- inactiveColor: "",
11
- activeColor: "",
12
- safeArea: false,
13
- onSwitch: (value) => {
14
- }
15
- };
3
+ import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
4
+ import { u as usePropsValue } from "./use-props-value-SH9krhkx.js";
5
+ import { a as TabbarContext, T as TabbarItem } from "./tabbaritem.taro-C4AZbQMG.js";
6
+ const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { defaultValue: 0, fixed: false, inactiveColor: "", activeColor: "", safeArea: false, onSwitch: (value) => {
7
+ } });
16
8
  const Tabbar = (props) => {
17
- const { children, defaultValue, value, fixed, activeColor, inactiveColor, safeArea, className, style, onSwitch } = {
18
- ...defaultProps,
19
- ...props
20
- };
9
+ const { children, defaultValue, value, fixed, activeColor, inactiveColor, safeArea, className, style, onSwitch } = Object.assign(Object.assign({}, defaultProps), props);
21
10
  const classPrefix = "nut-tabbar";
22
11
  const [selectIndex, setSelectIndex] = usePropsValue({
23
12
  value,
@@ -41,7 +30,7 @@ const Tabbar = (props) => {
41
30
  } }, React__default.Children.map(children, (child, index) => {
42
31
  if (!React__default.isValidElement(child))
43
32
  return null;
44
- return React__default.cloneElement(child, { ...child.props, index });
33
+ return React__default.cloneElement(child, Object.assign(Object.assign({}, child.props), { index }));
45
34
  }))
46
35
  ),
47
36
  (fixed || safeArea) && React__default.createElement("div", { className: `${classPrefix}-safe-area` })
@@ -0,0 +1,58 @@
1
+ import { _ as __rest } from "./tslib.es6-BZ8i9Q6l.js";
2
+ import React__default, { useContext } from "react";
3
+ import classNames from "classnames";
4
+ import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
5
+ import { B as Badge } from "./badge.taro-D7Yn5zJi.js";
6
+ const TabbarContext = React__default.createContext(null);
7
+ const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { title: "", icon: null, value: "", dot: false, max: 99, top: "0", right: "5" });
8
+ const TabbarItem = (props) => {
9
+ const ctx = useContext(TabbarContext);
10
+ const _a = Object.assign(Object.assign({}, defaultProps), props), {
11
+ className,
12
+ style,
13
+ title,
14
+ icon,
15
+ value,
16
+ dot,
17
+ max,
18
+ top,
19
+ right,
20
+ // @ts-ignore
21
+ index
22
+ } = _a, rest = __rest(_a, ["className", "style", "title", "icon", "value", "dot", "max", "top", "right", "index"]);
23
+ const active = index === (ctx === null || ctx === void 0 ? void 0 : ctx.selectIndex);
24
+ const classPrefix = "nut-tabbar-item";
25
+ const tabbarItemClass = classNames(classPrefix, {
26
+ [`${classPrefix}-active`]: active
27
+ }, className);
28
+ const boxPrefix = `${classPrefix}-icon-box`;
29
+ const titleClass = classNames(boxPrefix, `${boxPrefix}-nav`, {
30
+ [`${boxPrefix}-large`]: !icon
31
+ });
32
+ const badgeProps = {
33
+ value,
34
+ dot,
35
+ max,
36
+ top,
37
+ right,
38
+ color: ctx === null || ctx === void 0 ? void 0 : ctx.activeColor
39
+ };
40
+ return React__default.createElement("div", Object.assign({ className: tabbarItemClass, style: Object.assign({ color: active ? ctx === null || ctx === void 0 ? void 0 : ctx.activeColor : ctx === null || ctx === void 0 ? void 0 : ctx.inactiveColor }, style), onClick: () => ctx === null || ctx === void 0 ? void 0 : ctx.handleClick(index) }, rest), icon ? React__default.createElement(
41
+ React__default.Fragment,
42
+ null,
43
+ React__default.createElement(
44
+ Badge,
45
+ Object.assign({}, badgeProps),
46
+ React__default.createElement("div", { className: boxPrefix }, icon)
47
+ ),
48
+ React__default.createElement("div", { className: titleClass }, title)
49
+ ) : React__default.createElement(
50
+ Badge,
51
+ Object.assign({}, badgeProps),
52
+ React__default.createElement("div", { className: titleClass }, title)
53
+ ));
54
+ };
55
+ export {
56
+ TabbarItem as T,
57
+ TabbarContext as a
58
+ };
@@ -1,10 +1,11 @@
1
+ import { _ as __rest } from "./tslib.es6-BZ8i9Q6l.js";
1
2
  import React__default, { useState, useEffect, useCallback, useRef } from "react";
2
3
  import classNames from "classnames";
3
4
  import { ArrowDown } from "@nutui/icons-react-taro";
4
- import { u as useConfig } from "./configprovider.taro-q5J2gQbi.js";
5
- import { C as ComponentDefaults } from "./typings-buMpDfSR.js";
6
- import { u as usePropsValue } from "./use-props-value-vKr0R0AX.js";
7
- function useTableSticky(columns) {
5
+ import { u as useConfig, a as useRtl } from "./configprovider.taro-CyU_tvNJ.js";
6
+ import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
7
+ import { u as usePropsValue } from "./use-props-value-SH9krhkx.js";
8
+ function useTableSticky(columns, rtl = false) {
8
9
  const [isSticky, setIsSticky] = useState(false);
9
10
  const [stickyColumnStyleMap, setStickyColumnStyleMap] = useState({});
10
11
  const [stickyColumnClassMap, setStickyColumnClassMap] = useState({});
@@ -19,9 +20,9 @@ function useTableSticky(columns) {
19
20
  let _stickyLeftWidth = 0;
20
21
  let _stickyRightWidth = 0;
21
22
  leftColumns.forEach((curr, index) => {
22
- leftColumns[index - 1] || {};
23
+ const dir = rtl ? "right" : "left";
23
24
  _columnStyleMap[curr.key] = {
24
- left: _stickyLeftWidth || 0,
25
+ [dir]: _stickyLeftWidth || 0,
25
26
  width: curr.width || "auto"
26
27
  };
27
28
  _columnClassMap[curr.key] = {
@@ -37,9 +38,9 @@ function useTableSticky(columns) {
37
38
  });
38
39
  for (let i = rightColumns.length - 1; i >= 0; i--) {
39
40
  const curr = rightColumns[i];
40
- rightColumns[i + 1] || {};
41
+ const dir = rtl ? "left" : "right";
41
42
  _columnStyleMap[curr.key] = {
42
- right: _stickyRightWidth || 0,
43
+ [dir]: _stickyRightWidth || 0,
43
44
  width: curr.width || "auto"
44
45
  };
45
46
  _columnClassMap[curr.key] = {
@@ -68,29 +69,18 @@ function useTableSticky(columns) {
68
69
  getStickyStyle
69
70
  };
70
71
  }
71
- const defaultProps = {
72
- ...ComponentDefaults,
73
- columns: [],
74
- data: [],
75
- bordered: true,
76
- striped: false,
77
- noData: "",
78
- sorterIcon: null,
79
- showHeader: true
80
- };
72
+ const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { columns: [], data: [], bordered: true, striped: false, noData: "", sorterIcon: null, showHeader: true });
81
73
  const Table = (props) => {
82
74
  const { locale } = useConfig();
75
+ const rtl = useRtl();
83
76
  defaultProps.noData = locale.noData;
84
- const { children, className, style, columns, data, bordered, summary, striped, noData, sorterIcon, showHeader, onSort, ...rest } = {
85
- ...defaultProps,
86
- ...props
87
- };
77
+ const _a = Object.assign(Object.assign({}, defaultProps), props), { children, className, style, columns, data, bordered, summary, striped, noData, sorterIcon, showHeader, onSort } = _a, rest = __rest(_a, ["children", "className", "style", "columns", "data", "bordered", "summary", "striped", "noData", "sorterIcon", "showHeader", "onSort"]);
88
78
  const sortedMapping = useRef({});
89
79
  const [innerValue, setValue] = usePropsValue({
90
80
  defaultValue: data,
91
81
  finalValue: []
92
82
  });
93
- const { isSticky, stickyLeftWidth, stickyRightWidth, getStickyClass, getStickyStyle } = useTableSticky(columns);
83
+ const { isSticky, stickyLeftWidth, stickyRightWidth, getStickyClass, getStickyStyle } = useTableSticky(columns, rtl);
94
84
  useEffect(() => {
95
85
  setValue(data);
96
86
  }, [data]);
@@ -151,7 +141,7 @@ const Table = (props) => {
151
141
  };
152
142
  return React__default.createElement(
153
143
  "div",
154
- { className: cls, ...rest },
144
+ Object.assign({ className: cls }, rest),
155
145
  React__default.createElement(
156
146
  "div",
157
147
  { className: classNames(`${classPrefix}-wrapper ${isSticky ? `${classPrefix}-wrapper-sticky` : ""}`), style },
@@ -6,10 +6,7 @@ const defaultProps = {
6
6
  disabled: false
7
7
  };
8
8
  const TabPane = (props) => {
9
- const { children, autoHeightClassName, className, disabled } = {
10
- ...defaultProps,
11
- ...props
12
- };
9
+ const { children, autoHeightClassName, className, disabled } = Object.assign(Object.assign({}, defaultProps), props);
13
10
  const classPrefix = "nut-tabpane";
14
11
  const classes = classNames(classPrefix, {
15
12
  active: !disabled && props.active
@@ -1,13 +1,14 @@
1
+ import { _ as __rest } from "./tslib.es6-BZ8i9Q6l.js";
1
2
  import React__default, { useRef, useState, useEffect } from "react";
2
3
  import { View, ScrollView } from "@tarojs/components";
3
4
  import classNames from "classnames";
4
5
  import { JoySmile } from "@nutui/icons-react-taro";
5
6
  import { nextTick, createSelectorQuery } from "@tarojs/taro";
6
- import { C as ComponentDefaults } from "./typings-buMpDfSR.js";
7
- import { T as TabPane } from "./tabpane.taro-5k7wWimS.js";
8
- import { u as usePropsValue } from "./use-props-value-vKr0R0AX.js";
9
- import { u as useForceUpdate } from "./use-force-update-0oEVD8Nr.js";
10
- import { r as requestAniFrame } from "./raf-UzmDvMUW.js";
7
+ import { C as ComponentDefaults } from "./typings-DV9RBfhj.js";
8
+ import { T as TabPane } from "./tabpane.taro-BAe86j3t.js";
9
+ import { u as usePropsValue } from "./use-props-value-SH9krhkx.js";
10
+ import { u as useForceUpdate } from "./use-force-update-CudFjCsy.js";
11
+ import { r as requestAniFrame } from "./raf-zwv-SBjP.js";
11
12
  const idCounter = {};
12
13
  function uniqueId(prefix = "$nut$") {
13
14
  if (!idCounter[prefix]) {
@@ -23,21 +24,10 @@ function useUuid() {
23
24
  const idRef = useRef(uniqueId());
24
25
  return idRef.current;
25
26
  }
26
- const defaultProps = {
27
- ...ComponentDefaults,
28
- tabStyle: {},
29
- activeColor: "",
30
- direction: "horizontal",
31
- activeType: "line",
32
- duration: 300,
33
- autoHeight: false
34
- };
27
+ const defaultProps = Object.assign(Object.assign({}, ComponentDefaults), { tabStyle: {}, activeColor: "", direction: "horizontal", activeType: "line", duration: 300, autoHeight: false });
35
28
  const classPrefix = "nut-tabs";
36
29
  const Tabs = (props) => {
37
- const { activeColor, tabStyle, direction, activeType, duration, align, title, name, children, onClick, onChange, className, autoHeight, ...rest } = {
38
- ...defaultProps,
39
- ...props
40
- };
30
+ const _a = Object.assign(Object.assign({}, defaultProps), props), { activeColor, tabStyle, direction, activeType, duration, align, title, name, children, onClick, onChange, className, autoHeight } = _a, rest = __rest(_a, ["activeColor", "tabStyle", "direction", "activeType", "duration", "align", "title", "name", "children", "onClick", "onChange", "className", "autoHeight"]);
41
31
  const uuid = useUuid();
42
32
  const [value, setValue] = usePropsValue({
43
33
  value: props.value,
@@ -52,8 +42,8 @@ const Tabs = (props) => {
52
42
  const titles2 = [];
53
43
  React__default.Children.forEach(children, (child, idx) => {
54
44
  if (React__default.isValidElement(child)) {
55
- const props2 = child == null ? void 0 : child.props;
56
- if ((props2 == null ? void 0 : props2.title) || (props2 == null ? void 0 : props2.value)) {
45
+ const props2 = child === null || child === void 0 ? void 0 : child.props;
46
+ if ((props2 === null || props2 === void 0 ? void 0 : props2.title) || (props2 === null || props2 === void 0 ? void 0 : props2.value)) {
57
47
  titles2.push({
58
48
  title: props2.title,
59
49
  value: props2.value || idx,
@@ -124,7 +114,7 @@ const Tabs = (props) => {
124
114
  }
125
115
  animate();
126
116
  };
127
- const scrollIntoView = () => {
117
+ const scrollIntoView = (index) => {
128
118
  requestAniFrame(() => {
129
119
  Promise.all([
130
120
  getRect(`#nut-tabs-titles-${name || uuid} .nut-tabs-list`),
@@ -132,17 +122,17 @@ const Tabs = (props) => {
132
122
  ]).then(([navRect, titleRects]) => {
133
123
  navRectRef.current = navRect;
134
124
  titleRectRef.current = titleRects;
135
- const titleRect = titleRectRef.current[value];
125
+ const titleRect = titleRectRef.current[index];
136
126
  if (!titleRect)
137
127
  return;
138
128
  let to = 0;
139
129
  if (props.direction === "vertical") {
140
130
  const DEFAULT_PADDING = 11;
141
- const top = titleRects.slice(0, value).reduce((prev, curr) => prev + curr.height, DEFAULT_PADDING);
131
+ const top = titleRects.slice(0, index).reduce((prev, curr) => prev + curr.height, DEFAULT_PADDING);
142
132
  to = top - (navRectRef.current.height - titleRect.height) / 2;
143
133
  } else {
144
134
  const DEFAULT_PADDING = 20;
145
- const left = titleRects.slice(0, value).reduce((prev, curr) => prev + curr.width, DEFAULT_PADDING);
135
+ const left = titleRects.slice(0, index).reduce((prev, curr) => prev + curr.width, DEFAULT_PADDING);
146
136
  to = left - (navRectRef.current.width - titleRect.width) / 2;
147
137
  }
148
138
  nextTick(() => {
@@ -158,7 +148,7 @@ const Tabs = (props) => {
158
148
  transform: direction === "horizontal" ? `translate3d(-${index * 100}%, 0, 0)` : `translate3d( 0,-${index * 100}%, 0)`,
159
149
  transitionDuration: `${duration}ms`
160
150
  });
161
- scrollIntoView();
151
+ scrollIntoView(index);
162
152
  }, [value]);
163
153
  const tabChange = (item, index) => {
164
154
  onClick && onClick(item.value);
@@ -169,10 +159,10 @@ const Tabs = (props) => {
169
159
  };
170
160
  return React__default.createElement(
171
161
  View,
172
- { className: classes, ...rest },
162
+ Object.assign({ className: classes }, rest),
173
163
  React__default.createElement(
174
164
  ScrollView,
175
- { enableFlex: true, scrollX: direction === "horizontal", scrollY: direction === "vertical", scrollLeft, scrollTop, showScrollbar: false, scrollWithAnimation: scrollWithAnimation.current, id: `nut-tabs-titles-${name || uuid}`, className: classesTitle, style: { ...tabStyle } },
165
+ { enableFlex: true, scrollX: direction === "horizontal", scrollY: direction === "vertical", scrollLeft, scrollTop, showScrollbar: false, scrollWithAnimation: scrollWithAnimation.current, id: `nut-tabs-titles-${name || uuid}`, className: classesTitle, style: Object.assign({}, tabStyle) },
176
166
  React__default.createElement(View, { className: "nut-tabs-list", ref: navRef }, !!title && typeof title === "function" ? title() : titles.current.map((item, index) => {
177
167
  return React__default.createElement(
178
168
  View,
@@ -202,15 +192,9 @@ const Tabs = (props) => {
202
192
  if (!React__default.isValidElement(child)) {
203
193
  return null;
204
194
  }
205
- let childProps = {
206
- ...child.props,
207
- active: value === child.props.value
208
- };
195
+ let childProps = Object.assign(Object.assign({}, child.props), { active: value === child.props.value });
209
196
  if (String(value) !== String(child.props.value || idx) && autoHeight) {
210
- childProps = {
211
- ...childProps,
212
- autoHeightClassName: "inactive"
213
- };
197
+ childProps = Object.assign(Object.assign({}, childProps), { autoHeightClassName: "inactive" });
214
198
  }
215
199
  return React__default.cloneElement(child, childProps);
216
200
  }))