@nutui/nutui-react-taro 2.0.0-alpha.5 → 2.0.0-alpha.7

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 (323) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/esm/ActionSheet.js +15 -16
  3. package/dist/esm/Address.js +19 -20
  4. package/dist/esm/Animate.js +7 -8
  5. package/dist/esm/AnimatingNumbers.js +8 -9
  6. package/dist/esm/Audio.js +17 -19
  7. package/dist/esm/Avatar.js +11 -13
  8. package/dist/esm/AvatarGroup.js +8 -9
  9. package/dist/esm/BackTop.js +9 -10
  10. package/dist/esm/Badge.js +7 -8
  11. package/dist/esm/Barrage.js +9 -10
  12. package/dist/esm/Button.js +8 -9
  13. package/dist/esm/Calendar.js +18 -20
  14. package/dist/esm/CalendarItem.js +11 -13
  15. package/dist/esm/Card.js +12 -13
  16. package/dist/esm/Cascader.js +16 -19
  17. package/dist/esm/Cell.js +7 -8
  18. package/dist/esm/CellGroup.js +7 -8
  19. package/dist/esm/Checkbox.js +9 -10
  20. package/dist/esm/CheckboxGroup.js +9 -10
  21. package/dist/esm/CircleProgress.js +8 -9
  22. package/dist/esm/Col.js +8 -9
  23. package/dist/esm/Collapse.js +8 -9
  24. package/dist/esm/CollapseItem.js +7 -8
  25. package/dist/esm/ConfigProvider.js +9 -8
  26. package/dist/esm/CountDown.js +8 -10
  27. package/dist/esm/DatePicker.js +21 -23
  28. package/dist/esm/Dialog.js +13 -15
  29. package/dist/esm/Divider.js +7 -8
  30. package/dist/esm/Drag.js +7 -8
  31. package/dist/esm/Elevator.js +9 -10
  32. package/dist/esm/Ellipsis.js +9 -10
  33. package/dist/esm/Empty.js +7 -9
  34. package/dist/esm/FixedNav.js +11 -13
  35. package/dist/esm/Form.js +10 -11
  36. package/dist/esm/FormItem.js +8 -9
  37. package/dist/esm/Grid.js +8 -10
  38. package/dist/esm/GridItem.js +7 -9
  39. package/dist/esm/Image.js +7 -9
  40. package/dist/esm/ImagePreview.js +19 -20
  41. package/dist/esm/Indicator.js +6 -7
  42. package/dist/esm/Infiniteloading.js +12 -14
  43. package/dist/esm/Input.js +11 -13
  44. package/dist/esm/InputNumber.js +9 -10
  45. package/dist/esm/Layout.js +5 -6
  46. package/dist/esm/Menu.js +8 -9
  47. package/dist/esm/MenuItem.js +13 -14
  48. package/dist/esm/NavBar.js +7 -8
  49. package/dist/esm/NoticeBar.js +11 -12
  50. package/dist/esm/Notify.js +9 -10
  51. package/dist/esm/NumberKeyboard.js +16 -18
  52. package/dist/esm/Overlay.js +8 -9
  53. package/dist/esm/Pagination.js +9 -11
  54. package/dist/esm/Picker.js +20 -22
  55. package/dist/esm/Popover.js +10 -11
  56. package/dist/esm/Popup.js +12 -13
  57. package/dist/esm/Price.js +7 -8
  58. package/dist/esm/Progress.js +7 -8
  59. package/dist/esm/PullToRefresh.js +11 -13
  60. package/dist/esm/Radio.js +9 -10
  61. package/dist/esm/RadioGroup.js +9 -10
  62. package/dist/esm/Range.js +13 -15
  63. package/dist/esm/Rate.js +9 -10
  64. package/dist/esm/Row.js +8 -9
  65. package/dist/esm/SearchBar.js +11 -13
  66. package/dist/esm/ShortPassword.js +16 -18
  67. package/dist/esm/SideNavBar.js +14 -15
  68. package/dist/esm/SideNavBarItem.js +5 -6
  69. package/dist/esm/Signature.js +13 -15
  70. package/dist/esm/Skeleton.js +14 -16
  71. package/dist/esm/Step.js +10 -11
  72. package/dist/esm/Steps.js +9 -10
  73. package/dist/esm/Sticky.js +11 -12
  74. package/dist/esm/SubSideNavBar.js +6 -7
  75. package/dist/esm/Swipe.js +11 -12
  76. package/dist/esm/Swiper.js +10 -11
  77. package/dist/esm/SwiperItem.js +9 -10
  78. package/dist/esm/Switch.js +7 -8
  79. package/dist/esm/TabPane.js +6 -7
  80. package/dist/esm/Tabbar.js +10 -11
  81. package/dist/esm/TabbarItem.js +8 -9
  82. package/dist/esm/Table.js +9 -13
  83. package/dist/esm/Tabs.js +11 -12
  84. package/dist/esm/Tag.js +8 -9
  85. package/dist/esm/TextArea.js +11 -10
  86. package/dist/esm/TimeDetail.js +8 -10
  87. package/dist/esm/TimePannel.js +8 -10
  88. package/dist/esm/TimeSelect.js +18 -20
  89. package/dist/esm/Toast.js +9 -10
  90. package/dist/esm/TrendArrow.js +8 -9
  91. package/dist/esm/Uploader.js +14 -16
  92. package/dist/esm/UserContext-735db09f.js +5 -0
  93. package/dist/esm/UserContext-ab42ba7f.js +5 -0
  94. package/dist/esm/UserContext-fde5badc.js +5 -0
  95. package/dist/esm/Video.js +8 -9
  96. package/dist/esm/VirtualList.js +8 -10
  97. package/dist/esm/WaterMark.js +10 -12
  98. package/dist/esm/actionsheet.taro-d2217152.js +61 -0
  99. package/dist/esm/address.taro-1c534feb.js +470 -0
  100. package/dist/esm/animate.taro-c8b29242.js +44 -0
  101. package/dist/esm/animatingnumbers.taro-c2a52dbd.js +103 -0
  102. package/dist/esm/audio.taro-ec96ef80.js +185 -0
  103. package/dist/esm/avatar.taro-01536aff.js +100 -0
  104. package/dist/esm/avatargroup-ad5ffb46.js +34 -0
  105. package/dist/esm/backtop.taro-7de36464.js +48 -0
  106. package/dist/esm/badge.taro-872605bf.js +48 -0
  107. package/dist/esm/barrage.taro-c8cb9864.js +91 -0
  108. package/dist/esm/bem-cdccae08.js +5 -0
  109. package/dist/esm/button.taro-01eae688.js +72 -0
  110. package/dist/esm/calendar.taro-10a6cb11.js +70 -0
  111. package/dist/esm/calendaritem.taro-3e5f114e.js +732 -0
  112. package/dist/esm/can-use-dom-0e539bd3.js +4 -0
  113. package/dist/esm/card.taro-a46fdf25.js +51 -0
  114. package/dist/esm/cascader.taro-0a2694ed.js +463 -0
  115. package/dist/esm/cell.taro-4e31d1fa.js +48 -0
  116. package/dist/esm/cellgroup.taro-a790d91b.js +28 -0
  117. package/dist/esm/checkbox.taro-016074da.js +177 -0
  118. package/dist/esm/circleprogress.taro-7149e09d.js +104 -0
  119. package/dist/esm/col.taro-d6a46a7d.js +41 -0
  120. package/dist/esm/collapse.taro-3d997680.js +70 -0
  121. package/dist/esm/collapseitem-f4571575.js +76 -0
  122. package/dist/esm/configprovider.taro-25758d9f.js +462 -0
  123. package/dist/esm/context-d0fccf11.js +5 -0
  124. package/dist/esm/countdown.taro-22200811.js +210 -0
  125. package/dist/esm/datepicker.taro-3f718964.js +260 -0
  126. package/dist/esm/dialog.taro-290eb9a6.js +128 -0
  127. package/dist/esm/divider.taro-0cb5f894.js +31 -0
  128. package/dist/esm/drag.taro-48e1ff38.js +111 -0
  129. package/dist/esm/elevator.taro-bc162e4f.js +201 -0
  130. package/dist/esm/ellipsis.taro-f9688dd7.js +242 -0
  131. package/dist/esm/empty.taro-ca792f57.js +59 -0
  132. package/dist/esm/fixednav.taro-28e5f776.js +61 -0
  133. package/dist/esm/form.taro-b06754e8.js +182 -0
  134. package/dist/esm/formitem.taro-b326809d.js +108 -0
  135. package/dist/esm/get-scroll-parent-8da04f2e.js +24 -0
  136. package/dist/esm/grid.taro-fbbd8618.js +52 -0
  137. package/dist/esm/griditem.taro-b0c37077.js +85 -0
  138. package/dist/esm/image.taro-767aa000.js +65 -0
  139. package/dist/esm/imagepreview.taro-8832dc01.js +163 -0
  140. package/dist/esm/index-e3184f19.js +9 -0
  141. package/dist/esm/indicator.taro-f2bd212f.js +30 -0
  142. package/dist/esm/infiniteloading.taro-f8f23ac6.js +143 -0
  143. package/dist/esm/input.taro-27d686c9.js +164 -0
  144. package/dist/esm/inputnumber.taro-877dc947.js +197 -0
  145. package/dist/esm/layout.taro-9659a928.js +11 -0
  146. package/dist/esm/menu.taro-cd0fef41.js +122 -0
  147. package/dist/esm/menuitem.taro-6076bffa.js +142 -0
  148. package/dist/esm/navbar.taro-5e1a0835.js +61 -0
  149. package/dist/esm/noticebar.taro-b3bfd4fe.js +408 -0
  150. package/dist/esm/notify.taro-6b6eb6bf.js +82 -0
  151. package/dist/esm/numberkeyboard.taro-0a0e866a.js +183 -0
  152. package/dist/esm/nutui-react.es.js +211 -116
  153. package/dist/esm/offsetContext-f32a9246.js +5 -0
  154. package/dist/esm/overlay.taro-75012bd3.js +77 -0
  155. package/dist/esm/pagination.taro-63607c3b.js +94 -0
  156. package/dist/esm/picker.taro-a5603921.js +468 -0
  157. package/dist/esm/popover.taro-ad483372.js +162 -0
  158. package/dist/esm/popup.taro-e756f3fc.js +150 -0
  159. package/dist/esm/price.taro-c4f45310.js +80 -0
  160. package/dist/esm/progress.taro-ff63be75.js +49 -0
  161. package/dist/esm/pulltorefresh.taro-c611fd92.js +179 -0
  162. package/dist/esm/radio.taro-3a54f4c8.js +152 -0
  163. package/dist/esm/range.taro-52cda918.js +325 -0
  164. package/dist/esm/rate.taro-78c66969.js +77 -0
  165. package/dist/esm/row.taro-8b7febd4.js +48 -0
  166. package/dist/esm/searchbar.taro-37ade36e.js +159 -0
  167. package/dist/esm/shortpassword.taro-f7292032.js +146 -0
  168. package/dist/esm/sidenavbar.taro-9f210df4.js +51 -0
  169. package/dist/esm/sidenavbaritem.taro-32a45ce6.js +12 -0
  170. package/dist/esm/signature.taro-c57469aa.js +146 -0
  171. package/dist/esm/skeleton.taro-9ff9baf4.js +71 -0
  172. package/dist/esm/step.taro-3bc01c0c.js +66 -0
  173. package/dist/esm/steps.taro-77e301ab.js +30 -0
  174. package/dist/esm/sticky.taro-3c03eb0a.js +134 -0
  175. package/dist/esm/subsidenavbar.taro-abe07673.js +64 -0
  176. package/dist/esm/supports-passive-aaaf0eff.js +17 -0
  177. package/dist/esm/swipe.taro-de80fcd8.js +180 -0
  178. package/dist/esm/swiper.taro-74cf9306.js +430 -0
  179. package/dist/esm/swiperitem-80df464a.js +29 -0
  180. package/dist/esm/switch.taro-f0da73a3.js +44 -0
  181. package/dist/esm/tabbar.taro-18eee41f.js +55 -0
  182. package/dist/esm/tabbaritem.taro-89646ca1.js +47 -0
  183. package/dist/esm/table.taro-15a55c5d.js +100 -0
  184. package/dist/esm/tabpane.taro-f8d92ece.js +21 -0
  185. package/dist/esm/tabs.taro-b75f20ff.js +139 -0
  186. package/dist/esm/tag.taro-1b4134a5.js +92 -0
  187. package/dist/esm/textarea.taro-c110565e.js +102 -0
  188. package/dist/esm/timedetail.taro-8d2acbbf.js +41 -0
  189. package/dist/esm/timepannel.taro-ee4c5dfa.js +22 -0
  190. package/dist/esm/timeselect.taro-069deedd.js +133 -0
  191. package/dist/esm/toast.taro-92c10e1d.js +114 -0
  192. package/dist/esm/trendarrow.taro-0cf43935.js +72 -0
  193. package/dist/esm/typings-11d83a22.js +7 -0
  194. package/dist/esm/uploader.taro-92977813.js +519 -0
  195. package/dist/esm/use-client-rect-f317804e.js +10 -0
  196. package/dist/esm/use-props-value-7ac1b1b5.js +16 -0
  197. package/dist/esm/use-touch-ff43512c.js +69 -0
  198. package/dist/esm/video-5d106e33.js +73 -0
  199. package/dist/esm/virtuallist.taro-99f03769.js +195 -0
  200. package/dist/esm/watermark.taro-cef29c03.js +109 -0
  201. package/dist/locales/base.js +1 -1
  202. package/dist/locales/en-US.js +1 -1
  203. package/dist/locales/id-ID.js +1 -1
  204. package/dist/locales/zh-CN.js +1 -1
  205. package/dist/locales/zh-TW.js +1 -1
  206. package/dist/locales/zh-UG.js +1 -1
  207. package/dist/nutui.react.mjs +507 -447
  208. package/dist/nutui.react.umd.js +506 -446
  209. package/dist/packages/cascader/cascader.scss +0 -26
  210. package/dist/packages/picker/picker.scss +66 -137
  211. package/dist/packages/table/table.scss +0 -56
  212. package/dist/packages/textarea/textarea.scss +5 -12
  213. package/dist/style.css +1 -1
  214. package/dist/style.mjs +1 -1
  215. package/dist/styles/variables-jmapp.scss +1 -4
  216. package/dist/styles/variables.scss +2 -6
  217. package/dist/types/index.d.ts +42 -46
  218. package/package.json +1 -1
  219. package/dist/esm/UserContext-0aac9a82.js +0 -5
  220. package/dist/esm/UserContext-e402e1a6.js +0 -5
  221. package/dist/esm/UserContext-e8176108.js +0 -5
  222. package/dist/esm/actionsheet.taro-12cf5a3e.js +0 -53
  223. package/dist/esm/address.taro-cab0ea22.js +0 -475
  224. package/dist/esm/animate.taro-485331bb.js +0 -41
  225. package/dist/esm/animatingnumbers.taro-f6eaffef.js +0 -104
  226. package/dist/esm/audio.taro-ff280f5e.js +0 -162
  227. package/dist/esm/avatar.taro-6e8f1f5c.js +0 -107
  228. package/dist/esm/avatargroup-f4375806.js +0 -31
  229. package/dist/esm/backtop.taro-8ec80d02.js +0 -52
  230. package/dist/esm/badge.taro-e2169fbe.js +0 -45
  231. package/dist/esm/barrage.taro-aa08da6c.js +0 -94
  232. package/dist/esm/bem-350c1702.js +0 -5
  233. package/dist/esm/button.taro-b50bc217.js +0 -65
  234. package/dist/esm/calendar.taro-2fc9b899.js +0 -65
  235. package/dist/esm/calendaritem.taro-2d4a8c34.js +0 -791
  236. package/dist/esm/can-use-dom-3eeb5af4.js +0 -6
  237. package/dist/esm/card.taro-0e849e94.js +0 -33
  238. package/dist/esm/cascader.taro-467910b2.js +0 -447
  239. package/dist/esm/cell.taro-ea725a95.js +0 -43
  240. package/dist/esm/cellgroup.taro-e05ea802.js +0 -25
  241. package/dist/esm/checkbox.taro-9d02f86c.js +0 -175
  242. package/dist/esm/circleprogress.taro-d4943109.js +0 -103
  243. package/dist/esm/col.taro-4477c9f7.js +0 -43
  244. package/dist/esm/collapse.taro-89bcadf2.js +0 -79
  245. package/dist/esm/collapseitem-0e228cec.js +0 -68
  246. package/dist/esm/configprovider.taro-ce34d482.js +0 -174
  247. package/dist/esm/context-c96afdcc.js +0 -5
  248. package/dist/esm/countdown.taro-3118ba23.js +0 -225
  249. package/dist/esm/datepicker.taro-2e3e955b.js +0 -275
  250. package/dist/esm/dialog.taro-eab19eab.js +0 -107
  251. package/dist/esm/divider.taro-3993d7d5.js +0 -33
  252. package/dist/esm/drag.taro-347dfb84.js +0 -111
  253. package/dist/esm/elevator.taro-1a4e3356.js +0 -193
  254. package/dist/esm/ellipsis.taro-e1ac99a1.js +0 -244
  255. package/dist/esm/empty.taro-26363c66.js +0 -56
  256. package/dist/esm/fixednav.taro-ddb21e87.js +0 -54
  257. package/dist/esm/form.taro-423b0f0a.js +0 -179
  258. package/dist/esm/formitem.taro-b550d29c.js +0 -89
  259. package/dist/esm/get-scroll-parent-b4a07e65.js +0 -25
  260. package/dist/esm/grid.taro-883a9c35.js +0 -49
  261. package/dist/esm/griditem.taro-16c7055b.js +0 -80
  262. package/dist/esm/image.taro-3025e659.js +0 -64
  263. package/dist/esm/imagepreview.taro-d511342c.js +0 -167
  264. package/dist/esm/index-5bcb0ff8.js +0 -7
  265. package/dist/esm/indicator.taro-bfb21d45.js +0 -30
  266. package/dist/esm/infiniteloading.taro-721bca1f.js +0 -141
  267. package/dist/esm/input.taro-06c1e4d5.js +0 -167
  268. package/dist/esm/inputnumber.taro-1f893d42.js +0 -199
  269. package/dist/esm/layout.taro-e4bf83cb.js +0 -11
  270. package/dist/esm/menu.taro-e5c68cb8.js +0 -111
  271. package/dist/esm/menuitem.taro-37c18382.js +0 -129
  272. package/dist/esm/navbar.taro-92bab9c4.js +0 -57
  273. package/dist/esm/noticebar.taro-cbe93c9e.js +0 -427
  274. package/dist/esm/notify.taro-f1079218.js +0 -75
  275. package/dist/esm/numberkeyboard.taro-d9b1721b.js +0 -159
  276. package/dist/esm/offsetContext-c2a746fa.js +0 -5
  277. package/dist/esm/overlay.taro-067b7202.js +0 -73
  278. package/dist/esm/pagination.taro-94f9be5e.js +0 -91
  279. package/dist/esm/picker.taro-e16b4312.js +0 -423
  280. package/dist/esm/popover.taro-84a55ff9.js +0 -153
  281. package/dist/esm/popup.taro-89cc342a.js +0 -139
  282. package/dist/esm/price.taro-959d82f2.js +0 -83
  283. package/dist/esm/progress.taro-1a7ac8a4.js +0 -40
  284. package/dist/esm/pulltorefresh.taro-016d0079.js +0 -181
  285. package/dist/esm/radio.taro-36438449.js +0 -177
  286. package/dist/esm/range.taro-8953e8c3.js +0 -332
  287. package/dist/esm/rate.taro-895bb41c.js +0 -77
  288. package/dist/esm/row.taro-e929ec5c.js +0 -48
  289. package/dist/esm/searchbar.taro-4467040f.js +0 -152
  290. package/dist/esm/shortpassword.taro-433b86a4.js +0 -119
  291. package/dist/esm/sidenavbar.taro-f8ffb7dc.js +0 -33
  292. package/dist/esm/sidenavbaritem.taro-6cb0821e.js +0 -12
  293. package/dist/esm/signature.taro-a4d9b5c9.js +0 -143
  294. package/dist/esm/skeleton.taro-8ec11af9.js +0 -62
  295. package/dist/esm/step.taro-7ea33a76.js +0 -58
  296. package/dist/esm/steps.taro-86753d36.js +0 -30
  297. package/dist/esm/sticky.taro-a142a5f2.js +0 -136
  298. package/dist/esm/subsidenavbar.taro-85c03291.js +0 -63
  299. package/dist/esm/supports-passive-c85ef996.js +0 -18
  300. package/dist/esm/swipe.taro-0b8cc872.js +0 -175
  301. package/dist/esm/swiper.taro-c0e9a56b.js +0 -451
  302. package/dist/esm/swiperitem-abab7606.js +0 -29
  303. package/dist/esm/switch.taro-e82809f6.js +0 -38
  304. package/dist/esm/tabbar.taro-48413fb8.js +0 -51
  305. package/dist/esm/tabbaritem.taro-5afa3562.js +0 -37
  306. package/dist/esm/table.taro-327b4248.js +0 -95
  307. package/dist/esm/tabpane.taro-406cc0d3.js +0 -21
  308. package/dist/esm/tabs.taro-d47ccfc5.js +0 -120
  309. package/dist/esm/tag.taro-846ee805.js +0 -92
  310. package/dist/esm/textarea.taro-add72cf3.js +0 -94
  311. package/dist/esm/timedetail.taro-82a2900b.js +0 -44
  312. package/dist/esm/timepannel.taro-0573bb65.js +0 -22
  313. package/dist/esm/timeselect.taro-29124a34.js +0 -133
  314. package/dist/esm/toast.taro-c509a870.js +0 -108
  315. package/dist/esm/trendarrow.taro-dd83ec94.js +0 -70
  316. package/dist/esm/typings-d8491423.js +0 -6
  317. package/dist/esm/uploader.taro-c70d00de.js +0 -494
  318. package/dist/esm/use-client-rect-1f8ed1fe.js +0 -18
  319. package/dist/esm/use-props-value-ae7ee726.js +0 -15
  320. package/dist/esm/use-touch-db24bb5c.js +0 -69
  321. package/dist/esm/video-1c6405b4.js +0 -67
  322. package/dist/esm/virtuallist.taro-ba8e1f21.js +0 -214
  323. package/dist/esm/watermark.taro-168cdac5.js +0 -114
@@ -8,7 +8,7 @@ var __publicField = (obj, key, value) => {
8
8
  return value;
9
9
  };
10
10
  /*!
11
- * @nutui/nutui-react-taro v2.0.0-alpha.5 Wed May 10 2023 15:25:20 GMT+0800 (China Standard Time)
11
+ * @nutui/nutui-react-taro v2.0.0-alpha.7 Fri May 12 2023 15:36:41 GMT+0800 (China Standard Time)
12
12
  * (c) 2023 @jdf2e.
13
13
  * Released under the MIT License.
14
14
  */
@@ -2763,7 +2763,7 @@ var __publicField = (obj, key, value) => {
2763
2763
  style: {}
2764
2764
  };
2765
2765
  const prefixCls = "nut-button";
2766
- const defaultProps$1t = {
2766
+ const defaultProps$1u = {
2767
2767
  ...ComponentDefaults,
2768
2768
  color: "",
2769
2769
  type: "default",
@@ -2795,7 +2795,7 @@ var __publicField = (obj, key, value) => {
2795
2795
  style,
2796
2796
  ...rest
2797
2797
  } = {
2798
- ...defaultProps$1t,
2798
+ ...defaultProps$1u,
2799
2799
  ...props
2800
2800
  };
2801
2801
  const getStyle = React.useCallback(() => {
@@ -2854,7 +2854,7 @@ var __publicField = (obj, key, value) => {
2854
2854
  }
2855
2855
  );
2856
2856
  Button.displayName = "NutButton";
2857
- const defaultProps$1s = {
2857
+ const defaultProps$1t = {
2858
2858
  ...ComponentDefaults,
2859
2859
  title: null,
2860
2860
  description: null,
@@ -2878,7 +2878,7 @@ var __publicField = (obj, key, value) => {
2878
2878
  style,
2879
2879
  ...rest
2880
2880
  } = {
2881
- ...defaultProps$1s,
2881
+ ...defaultProps$1t,
2882
2882
  ...props
2883
2883
  };
2884
2884
  const handleClick = (event) => {
@@ -2917,9 +2917,9 @@ var __publicField = (obj, key, value) => {
2917
2917
  }
2918
2918
  );
2919
2919
  };
2920
- Cell.defaultProps = defaultProps$1s;
2920
+ Cell.defaultProps = defaultProps$1t;
2921
2921
  Cell.displayName = "NutCell";
2922
- const defaultProps$1r = {
2922
+ const defaultProps$1s = {
2923
2923
  ...ComponentDefaults,
2924
2924
  title: "",
2925
2925
  description: "",
@@ -2928,7 +2928,7 @@ var __publicField = (obj, key, value) => {
2928
2928
  const classPrefix$e = "nut-cell-group";
2929
2929
  const CellGroup = (props) => {
2930
2930
  const { children, className, style, title, description, divider, ...rest } = {
2931
- ...defaultProps$1r,
2931
+ ...defaultProps$1s,
2932
2932
  ...props
2933
2933
  };
2934
2934
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classNames(classPrefix$e, className), ...rest, children: [
@@ -2943,7 +2943,7 @@ var __publicField = (obj, key, value) => {
2943
2943
  )
2944
2944
  ] });
2945
2945
  };
2946
- CellGroup.defaultProps = defaultProps$1r;
2946
+ CellGroup.defaultProps = defaultProps$1s;
2947
2947
  CellGroup.displayName = "NutCellGroup";
2948
2948
  var INFINITY = 1 / 0;
2949
2949
  var symbolTag = "[object Symbol]";
@@ -3358,7 +3358,7 @@ var __publicField = (obj, key, value) => {
3358
3358
  errorCanvasTips: "当前环境不支持Canvas"
3359
3359
  }
3360
3360
  };
3361
- const defaultProps$1q = {
3361
+ const defaultProps$1r = {
3362
3362
  locale: zhCN
3363
3363
  };
3364
3364
  const defaultConfigRef$1 = {
@@ -3381,7 +3381,7 @@ var __publicField = (obj, key, value) => {
3381
3381
  return cssVars;
3382
3382
  }
3383
3383
  const ConfigProvider = (props) => {
3384
- const { children, ...config2 } = { ...defaultProps$1q, ...props };
3384
+ const { children, ...config2 } = { ...defaultProps$1r, ...props };
3385
3385
  const parentConfig = useConfig$1();
3386
3386
  const theme = config2.theme || {};
3387
3387
  const style = React.useMemo(
@@ -3399,9 +3399,9 @@ var __publicField = (obj, key, value) => {
3399
3399
  }
3400
3400
  );
3401
3401
  };
3402
- ConfigProvider.defaultProps = defaultProps$1q;
3402
+ ConfigProvider.defaultProps = defaultProps$1r;
3403
3403
  ConfigProvider.displayName = "NutConfigProvider";
3404
- const defaultProps$1p = {
3404
+ const defaultProps$1q = {
3405
3405
  fit: "fill",
3406
3406
  position: "center",
3407
3407
  alt: "",
@@ -3432,7 +3432,7 @@ var __publicField = (obj, key, value) => {
3432
3432
  onClick,
3433
3433
  onLoad,
3434
3434
  onError
3435
- } = { ...defaultProps$1p, ...props };
3435
+ } = { ...defaultProps$1q, ...props };
3436
3436
  const [loading, setLoading] = React.useState(true);
3437
3437
  const [isError, setIsError] = React.useState(false);
3438
3438
  React.useEffect(() => {
@@ -3493,7 +3493,7 @@ var __publicField = (obj, key, value) => {
3493
3493
  }
3494
3494
  );
3495
3495
  };
3496
- Image$1.defaultProps = defaultProps$1p;
3496
+ Image$1.defaultProps = defaultProps$1q;
3497
3497
  Image$1.displayName = "NutImage";
3498
3498
  const defaultOverlayProps = {
3499
3499
  ...ComponentDefaults,
@@ -3588,7 +3588,7 @@ var __publicField = (obj, key, value) => {
3588
3588
  Overlay.defaultProps = defaultOverlayProps;
3589
3589
  Overlay.displayName = "NutOverlay";
3590
3590
  const DataContext$2 = React.createContext({});
3591
- const defaultProps$1o = {
3591
+ const defaultProps$1p = {
3592
3592
  ...ComponentDefaults,
3593
3593
  span: "24",
3594
3594
  offset: "0",
@@ -3596,7 +3596,7 @@ var __publicField = (obj, key, value) => {
3596
3596
  };
3597
3597
  const Col = (props) => {
3598
3598
  const { className, style, span, offset, children, onClick } = {
3599
- ...defaultProps$1o,
3599
+ ...defaultProps$1p,
3600
3600
  ...props
3601
3601
  };
3602
3602
  const [colName, setColName] = React.useState("");
@@ -3628,9 +3628,9 @@ var __publicField = (obj, key, value) => {
3628
3628
  }
3629
3629
  );
3630
3630
  };
3631
- Col.defaultProps = defaultProps$1o;
3631
+ Col.defaultProps = defaultProps$1p;
3632
3632
  Col.displayName = "NutCol";
3633
- const defaultProps$1n = {
3633
+ const defaultProps$1o = {
3634
3634
  ...ComponentDefaults,
3635
3635
  contentPosition: "center",
3636
3636
  direction: "horizontal"
@@ -3638,7 +3638,7 @@ var __publicField = (obj, key, value) => {
3638
3638
  const classPrefix$d = `nut-divider`;
3639
3639
  const Divider = (props) => {
3640
3640
  const { children, contentPosition, style, className, direction, ...rest } = {
3641
- ...defaultProps$1n,
3641
+ ...defaultProps$1o,
3642
3642
  ...props
3643
3643
  };
3644
3644
  const classes = direction === "horizontal" ? classNames({
@@ -3653,7 +3653,7 @@ var __publicField = (obj, key, value) => {
3653
3653
  });
3654
3654
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classes} ${className || ""}`, style, ...rest, children });
3655
3655
  };
3656
- Divider.defaultProps = defaultProps$1n;
3656
+ Divider.defaultProps = defaultProps$1o;
3657
3657
  Divider.displayName = "NutDivider";
3658
3658
  const gridContext = {
3659
3659
  onClick: (item, index) => {
@@ -3663,7 +3663,7 @@ var __publicField = (obj, key, value) => {
3663
3663
  const pxCheck = (value) => {
3664
3664
  return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
3665
3665
  };
3666
- const defaultProps$1m = {
3666
+ const defaultProps$1n = {
3667
3667
  text: "",
3668
3668
  columns: 4,
3669
3669
  gap: 0,
@@ -3689,7 +3689,7 @@ var __publicField = (obj, key, value) => {
3689
3689
  onClick,
3690
3690
  ...rest
3691
3691
  } = {
3692
- ...defaultProps$1m,
3692
+ ...defaultProps$1n,
3693
3693
  ...props
3694
3694
  };
3695
3695
  const classPrefix2 = "nut-grid-item";
@@ -3750,9 +3750,9 @@ var __publicField = (obj, key, value) => {
3750
3750
  }
3751
3751
  );
3752
3752
  };
3753
- GridItem.defaultProps = defaultProps$1m;
3753
+ GridItem.defaultProps = defaultProps$1n;
3754
3754
  GridItem.displayName = "NutGridItem";
3755
- const defaultProps$1l = {
3755
+ const defaultProps$1m = {
3756
3756
  columns: 4,
3757
3757
  gap: 0,
3758
3758
  center: true,
@@ -3773,7 +3773,7 @@ var __publicField = (obj, key, value) => {
3773
3773
  className,
3774
3774
  onClick,
3775
3775
  ...rest
3776
- } = { ...defaultProps$1l, ...props };
3776
+ } = { ...defaultProps$1m, ...props };
3777
3777
  const childrenDom = React.Children.toArray(children);
3778
3778
  const classPrefix2 = "nut-grid";
3779
3779
  const rootClass = () => {
@@ -3803,18 +3803,18 @@ var __publicField = (obj, key, value) => {
3803
3803
  });
3804
3804
  }) }) });
3805
3805
  };
3806
- Grid.defaultProps = defaultProps$1l;
3806
+ Grid.defaultProps = defaultProps$1m;
3807
3807
  Grid.displayName = "NutGrid";
3808
3808
  Grid.Item = GridItem;
3809
- const defaultProps$1k = {};
3809
+ const defaultProps$1l = {};
3810
3810
  const Layout = (props) => {
3811
- ({ ...defaultProps$1k, ...props });
3811
+ ({ ...defaultProps$1l, ...props });
3812
3812
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-layout", children: "Layout" });
3813
3813
  };
3814
- Layout.defaultProps = defaultProps$1k;
3814
+ Layout.defaultProps = defaultProps$1l;
3815
3815
  Layout.displayName = "NutLayout";
3816
3816
  const classPrefix$c = "nut-row";
3817
- const defaultProps$1j = {
3817
+ const defaultProps$1k = {
3818
3818
  ...ComponentDefaults,
3819
3819
  type: "",
3820
3820
  justify: "start",
@@ -3834,7 +3834,7 @@ var __publicField = (obj, key, value) => {
3834
3834
  gutter,
3835
3835
  onClick
3836
3836
  } = {
3837
- ...defaultProps$1j,
3837
+ ...defaultProps$1k,
3838
3838
  ...props
3839
3839
  };
3840
3840
  const getClass = (prefix2, type2) => {
@@ -3866,7 +3866,7 @@ var __publicField = (obj, key, value) => {
3866
3866
  children
3867
3867
  ) });
3868
3868
  };
3869
- Row.defaultProps = defaultProps$1j;
3869
+ Row.defaultProps = defaultProps$1k;
3870
3870
  Row.displayName = "NutRow";
3871
3871
  function useWatch(dep, callback, config2 = { immediate: false }) {
3872
3872
  const { immediate } = config2;
@@ -3919,7 +3919,7 @@ var __publicField = (obj, key, value) => {
3919
3919
  }
3920
3920
  return root2;
3921
3921
  }
3922
- const defaultProps$1i = {
3922
+ const defaultProps$1j = {
3923
3923
  ...ComponentDefaults,
3924
3924
  position: "top",
3925
3925
  zIndex: 2e3
@@ -3936,7 +3936,7 @@ var __publicField = (obj, key, value) => {
3936
3936
  className,
3937
3937
  onChange,
3938
3938
  ...rest
3939
- } = { ...defaultProps$1i, ...props };
3939
+ } = { ...defaultProps$1j, ...props };
3940
3940
  const stickyRef = React.useRef(null);
3941
3941
  const rootRef = React.useRef(null);
3942
3942
  const [rootRect, setRootRect] = React.useState({});
@@ -4042,9 +4042,9 @@ var __publicField = (obj, key, value) => {
4042
4042
  }
4043
4043
  );
4044
4044
  };
4045
- Sticky.defaultProps = defaultProps$1i;
4045
+ Sticky.defaultProps = defaultProps$1j;
4046
4046
  Sticky.displayName = "NutSticky";
4047
- const defaultProps$1h = {
4047
+ const defaultProps$1i = {
4048
4048
  ...ComponentDefaults,
4049
4049
  threshold: 200,
4050
4050
  zIndex: 10,
@@ -4052,7 +4052,7 @@ var __publicField = (obj, key, value) => {
4052
4052
  };
4053
4053
  const BackTop = (props) => {
4054
4054
  const { children, threshold, zIndex, className, duration, style, onClick } = {
4055
- ...defaultProps$1h,
4055
+ ...defaultProps$1i,
4056
4056
  ...props
4057
4057
  };
4058
4058
  const classPrefix2 = "nut-backtop";
@@ -4090,10 +4090,10 @@ var __publicField = (obj, key, value) => {
4090
4090
  }
4091
4091
  );
4092
4092
  };
4093
- BackTop.defaultProps = defaultProps$1h;
4093
+ BackTop.defaultProps = defaultProps$1i;
4094
4094
  BackTop.displayName = "NutBackTop";
4095
4095
  const elevatorContext = React.createContext({});
4096
- const defaultProps$1g = {
4096
+ const defaultProps$1h = {
4097
4097
  ...ComponentDefaults,
4098
4098
  height: "200px",
4099
4099
  floorKey: "title",
@@ -4118,7 +4118,7 @@ var __publicField = (obj, key, value) => {
4118
4118
  children,
4119
4119
  ...rest
4120
4120
  } = {
4121
- ...defaultProps$1g,
4121
+ ...defaultProps$1h,
4122
4122
  ...props
4123
4123
  };
4124
4124
  const classPrefix2 = "nut-elevator";
@@ -4337,10 +4337,10 @@ var __publicField = (obj, key, value) => {
4337
4337
  sticky && scrollY > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__list__fixed`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `${classPrefix2}__list__fixed__title`, children: list[currentIndex][floorKey] }) }) : null
4338
4338
  ] });
4339
4339
  };
4340
- Elevator.defaultProps = defaultProps$1g;
4340
+ Elevator.defaultProps = defaultProps$1h;
4341
4341
  Elevator.displayName = "NutElevator";
4342
4342
  Elevator.Context = elevatorContext;
4343
- const defaultProps$1f = {
4343
+ const defaultProps$1g = {
4344
4344
  ...ComponentDefaults,
4345
4345
  activeText: "",
4346
4346
  inactiveText: "",
@@ -4368,7 +4368,7 @@ var __publicField = (obj, key, value) => {
4368
4368
  content,
4369
4369
  ...rest
4370
4370
  } = {
4371
- ...defaultProps$1f,
4371
+ ...defaultProps$1g,
4372
4372
  ...props
4373
4373
  };
4374
4374
  const classPrefix2 = "nut-fixednav";
@@ -4427,9 +4427,9 @@ var __publicField = (obj, key, value) => {
4427
4427
  }
4428
4428
  );
4429
4429
  };
4430
- FixedNav.defaultProps = defaultProps$1f;
4430
+ FixedNav.defaultProps = defaultProps$1g;
4431
4431
  FixedNav.displayName = "NutFixedNav";
4432
- const defaultProps$1e = {
4432
+ const defaultProps$1f = {
4433
4433
  ...ComponentDefaults,
4434
4434
  left: "",
4435
4435
  right: "",
@@ -4452,7 +4452,7 @@ var __publicField = (obj, key, value) => {
4452
4452
  zIndex,
4453
4453
  onClickBack
4454
4454
  } = {
4455
- ...defaultProps$1e,
4455
+ ...defaultProps$1f,
4456
4456
  ...props
4457
4457
  };
4458
4458
  const classPrefix2 = "nut-navbar";
@@ -4496,7 +4496,7 @@ var __publicField = (obj, key, value) => {
4496
4496
  const cls = classNames(classPrefix2, classes, className);
4497
4497
  return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: fixed && placeholder ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}--placeholder`, children: renderWrapper() }) : renderWrapper() });
4498
4498
  };
4499
- NavBar.defaultProps = defaultProps$1e;
4499
+ NavBar.defaultProps = defaultProps$1f;
4500
4500
  NavBar.displayName = "NutNavBar";
4501
4501
  function _extends$3() {
4502
4502
  _extends$3 = Object.assign ? Object.assign.bind() : function(target) {
@@ -6239,7 +6239,7 @@ var __publicField = (obj, key, value) => {
6239
6239
  onExited: propTypesExports.func
6240
6240
  }) : {};
6241
6241
  const CSSTransition$1 = CSSTransition;
6242
- const defaultProps$1d = {
6242
+ const defaultProps$1e = {
6243
6243
  ...ComponentDefaults,
6244
6244
  position: "center",
6245
6245
  transition: "",
@@ -6426,10 +6426,10 @@ var __publicField = (obj, key, value) => {
6426
6426
  }, [position, transition]);
6427
6427
  return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: renderToContainer(portal, renderNode()) });
6428
6428
  };
6429
- Popup.defaultProps = defaultProps$1d;
6429
+ Popup.defaultProps = defaultProps$1e;
6430
6430
  Popup.displayName = "NutPopup";
6431
6431
  const OffsetContext = React.createContext(20);
6432
- const defaultProps$1c = {
6432
+ const defaultProps$1d = {
6433
6433
  showhead: false,
6434
6434
  position: "left",
6435
6435
  width: "80%"
@@ -6446,7 +6446,7 @@ var __publicField = (obj, key, value) => {
6446
6446
  onClose,
6447
6447
  ...rest
6448
6448
  } = {
6449
- ...defaultProps$1c,
6449
+ ...defaultProps$1d,
6450
6450
  ...props
6451
6451
  };
6452
6452
  const offset = props.offset ? Number(props.offset) : 20;
@@ -6497,7 +6497,7 @@ var __publicField = (obj, key, value) => {
6497
6497
  }
6498
6498
  );
6499
6499
  };
6500
- SideNavBar.defaultProps = defaultProps$1c;
6500
+ SideNavBar.defaultProps = defaultProps$1d;
6501
6501
  SideNavBar.displayName = "NutSideNavBar";
6502
6502
  const SideNavBarItem = (props) => {
6503
6503
  const { title, key, children, onClick, ...rest } = props;
@@ -6515,12 +6515,12 @@ var __publicField = (obj, key, value) => {
6515
6515
  }
6516
6516
  );
6517
6517
  };
6518
- const defaultProps$1b = {
6518
+ const defaultProps$1c = {
6519
6519
  open: true
6520
6520
  };
6521
6521
  const SubSideNavBar = (props) => {
6522
6522
  const { title, key, children, onClick, open, ...rest } = {
6523
- ...defaultProps$1b,
6523
+ ...defaultProps$1c,
6524
6524
  ...props
6525
6525
  };
6526
6526
  const [subShow, setSubShow] = React.useState(open);
@@ -6594,7 +6594,7 @@ var __publicField = (obj, key, value) => {
6594
6594
  }
6595
6595
  return [uncontrolled, handleUncontrolledChange];
6596
6596
  }
6597
- const defaultProps$1a = {
6597
+ const defaultProps$1b = {
6598
6598
  ...ComponentDefaults,
6599
6599
  value: "",
6600
6600
  dot: false,
@@ -6605,7 +6605,7 @@ var __publicField = (obj, key, value) => {
6605
6605
  };
6606
6606
  const Badge = (props) => {
6607
6607
  const { className, style, value, max, children, dot, top, right, color } = {
6608
- ...defaultProps$1a,
6608
+ ...defaultProps$1b,
6609
6609
  ...props
6610
6610
  };
6611
6611
  const classPrefix2 = "nut-badge";
@@ -6636,9 +6636,9 @@ var __publicField = (obj, key, value) => {
6636
6636
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: contentClasses, style: getStyle(), children: content() })
6637
6637
  ] });
6638
6638
  };
6639
- Badge.defaultProps = defaultProps$1a;
6639
+ Badge.defaultProps = defaultProps$1b;
6640
6640
  Badge.displayName = "NutBadge";
6641
- const defaultProps$19 = {
6641
+ const defaultProps$1a = {
6642
6642
  ...ComponentDefaults,
6643
6643
  title: "",
6644
6644
  icon: null,
@@ -6660,7 +6660,7 @@ var __publicField = (obj, key, value) => {
6660
6660
  handleClick,
6661
6661
  ...rest
6662
6662
  } = {
6663
- ...defaultProps$19,
6663
+ ...defaultProps$1a,
6664
6664
  ...props
6665
6665
  };
6666
6666
  const classPrefix2 = "nut-tabbar-item";
@@ -6687,7 +6687,7 @@ var __publicField = (obj, key, value) => {
6687
6687
  }
6688
6688
  );
6689
6689
  };
6690
- const defaultProps$18 = {
6690
+ const defaultProps$19 = {
6691
6691
  ...ComponentDefaults,
6692
6692
  defaultValue: 0,
6693
6693
  fixed: false,
@@ -6710,7 +6710,7 @@ var __publicField = (obj, key, value) => {
6710
6710
  style,
6711
6711
  onSwitch
6712
6712
  } = {
6713
- ...defaultProps$18,
6713
+ ...defaultProps$19,
6714
6714
  ...props
6715
6715
  };
6716
6716
  const classPrefix2 = "nut-tabbar";
@@ -6747,17 +6747,17 @@ var __publicField = (obj, key, value) => {
6747
6747
  }
6748
6748
  );
6749
6749
  };
6750
- Tabbar.defaultProps = defaultProps$18;
6750
+ Tabbar.defaultProps = defaultProps$19;
6751
6751
  Tabbar.displayName = "NutTabbar";
6752
6752
  Tabbar.Item = TabbarItem;
6753
- const defaultProps$17 = {
6753
+ const defaultProps$18 = {
6754
6754
  title: "",
6755
6755
  value: "",
6756
6756
  disabled: false
6757
6757
  };
6758
6758
  const TabPane = (props) => {
6759
6759
  const { children, autoHeightClassName, className, disabled } = {
6760
- ...defaultProps$17,
6760
+ ...defaultProps$18,
6761
6761
  ...props
6762
6762
  };
6763
6763
  const classPrefix2 = "nut-tabpane";
@@ -6771,7 +6771,7 @@ var __publicField = (obj, key, value) => {
6771
6771
  );
6772
6772
  return children ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: classes, children: !disabled && children }) : null;
6773
6773
  };
6774
- const defaultProps$16 = {
6774
+ const defaultProps$17 = {
6775
6775
  ...ComponentDefaults,
6776
6776
  tabStyle: {},
6777
6777
  activeColor: "",
@@ -6797,7 +6797,7 @@ var __publicField = (obj, key, value) => {
6797
6797
  autoHeight,
6798
6798
  ...rest
6799
6799
  } = {
6800
- ...defaultProps$16,
6800
+ ...defaultProps$17,
6801
6801
  ...props
6802
6802
  };
6803
6803
  const [value, setValue] = usePropsValue({
@@ -6826,6 +6826,18 @@ var __publicField = (obj, key, value) => {
6826
6826
  return titles2;
6827
6827
  };
6828
6828
  const titles = React.useRef(getTitles());
6829
+ React.useEffect(() => {
6830
+ titles.current = getTitles();
6831
+ let current = "";
6832
+ titles.current.forEach((title2) => {
6833
+ if (title2.value === value) {
6834
+ current = value;
6835
+ }
6836
+ });
6837
+ if (current !== "") {
6838
+ setValue(current);
6839
+ }
6840
+ }, [children]);
6829
6841
  const classes = classNames(
6830
6842
  classPrefix$a,
6831
6843
  `${classPrefix$a}--${direction}`,
@@ -6938,7 +6950,7 @@ var __publicField = (obj, key, value) => {
6938
6950
  }) }) })
6939
6951
  ] });
6940
6952
  };
6941
- Tabs.defaultProps = defaultProps$16;
6953
+ Tabs.defaultProps = defaultProps$17;
6942
6954
  Tabs.displayName = "NutTabs";
6943
6955
  Tabs.TabPane = TabPane;
6944
6956
  var classnameExports = {};
@@ -7073,7 +7085,7 @@ var __publicField = (obj, key, value) => {
7073
7085
  const useConfig = () => {
7074
7086
  return React.useContext(ConfigContext) ?? getDefaultConfig();
7075
7087
  };
7076
- const defaultProps$15 = {
7088
+ const defaultProps$16 = {
7077
7089
  type: "custom",
7078
7090
  existAddress: [],
7079
7091
  defaultIcon: null,
@@ -7095,7 +7107,7 @@ var __publicField = (obj, key, value) => {
7095
7107
  onClose,
7096
7108
  onSwitchModule,
7097
7109
  ...rest
7098
- } = { ...defaultProps$15, ...props };
7110
+ } = { ...defaultProps$16, ...props };
7099
7111
  const b2 = cn("address");
7100
7112
  const selectedExist = (item) => {
7101
7113
  const copyExistAdd = existAddress;
@@ -7137,7 +7149,7 @@ var __publicField = (obj, key, value) => {
7137
7149
  isShowCustomAddress && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: b2("choose-other"), onClick: onSwitch, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: b2("choose-other-btn"), children: customAndExistTitle || locale.address.chooseAnotherAddress }) })
7138
7150
  ] });
7139
7151
  };
7140
- const defaultProps$14 = {
7152
+ const defaultProps$15 = {
7141
7153
  modelValue: [],
7142
7154
  type: "custom",
7143
7155
  province: [],
@@ -7162,7 +7174,7 @@ var __publicField = (obj, key, value) => {
7162
7174
  onClose,
7163
7175
  ...rest
7164
7176
  } = {
7165
- ...defaultProps$14,
7177
+ ...defaultProps$15,
7166
7178
  ...props
7167
7179
  };
7168
7180
  const b2 = cn("address");
@@ -7326,28 +7338,28 @@ var __publicField = (obj, key, value) => {
7326
7338
  nextAreaList(item);
7327
7339
  };
7328
7340
  React.useEffect(() => {
7329
- const { province: province2 } = { ...defaultProps$14, ...props };
7341
+ const { province: province2 } = { ...defaultProps$15, ...props };
7330
7342
  setRegionList({
7331
7343
  ...regionList,
7332
7344
  province: isCustom2() ? transformData(province2) : province2
7333
7345
  });
7334
7346
  }, [province]);
7335
7347
  React.useEffect(() => {
7336
- const { city: city2 } = { ...defaultProps$14, ...props };
7348
+ const { city: city2 } = { ...defaultProps$15, ...props };
7337
7349
  setRegionList({
7338
7350
  ...regionList,
7339
7351
  city: isCustom2() ? transformData(city2) : city2
7340
7352
  });
7341
7353
  }, [city]);
7342
7354
  React.useEffect(() => {
7343
- const { country: country2 } = { ...defaultProps$14, ...props };
7355
+ const { country: country2 } = { ...defaultProps$15, ...props };
7344
7356
  setRegionList({
7345
7357
  ...regionList,
7346
7358
  country: isCustom2() ? transformData(country2) : country2
7347
7359
  });
7348
7360
  }, [country]);
7349
7361
  React.useEffect(() => {
7350
- const { town: town2 } = { ...defaultProps$14, ...props };
7362
+ const { town: town2 } = { ...defaultProps$15, ...props };
7351
7363
  setRegionList({
7352
7364
  ...regionList,
7353
7365
  town: isCustom2() ? transformData(town2) : town2
@@ -7420,7 +7432,7 @@ var __publicField = (obj, key, value) => {
7420
7432
  ) })
7421
7433
  ] });
7422
7434
  };
7423
- const defaultProps$13 = {
7435
+ const defaultProps$14 = {
7424
7436
  ...ComponentDefaults,
7425
7437
  modelValue: false,
7426
7438
  modelSelect: [],
@@ -7471,7 +7483,7 @@ var __publicField = (obj, key, value) => {
7471
7483
  className,
7472
7484
  ...rest
7473
7485
  } = {
7474
- ...defaultProps$13,
7486
+ ...defaultProps$14,
7475
7487
  ...props
7476
7488
  };
7477
7489
  const b2 = cn("address");
@@ -7629,7 +7641,7 @@ var __publicField = (obj, key, value) => {
7629
7641
  }
7630
7642
  ) });
7631
7643
  };
7632
- Address.defaultProps = defaultProps$13;
7644
+ Address.defaultProps = defaultProps$14;
7633
7645
  Address.displayName = "NutAddress";
7634
7646
  const Utils = {
7635
7647
  /**
@@ -7762,7 +7774,7 @@ var __publicField = (obj, key, value) => {
7762
7774
  }
7763
7775
  }
7764
7776
  const requestAniFrame$1 = requestAniFrame();
7765
- const defaultProps$12 = {
7777
+ const defaultProps$13 = {
7766
7778
  type: "one",
7767
7779
  isAutoBackFill: false,
7768
7780
  poppable: true,
@@ -7814,7 +7826,7 @@ var __publicField = (obj, key, value) => {
7814
7826
  onUpdate,
7815
7827
  onSelected,
7816
7828
  onYearMonthChange
7817
- } = { ...defaultProps$12, ...props };
7829
+ } = { ...defaultProps$13, ...props };
7818
7830
  const weeks = locale.calendaritem.weekdays;
7819
7831
  const [yearMonthTitle, setYearMonthTitle] = React.useState("");
7820
7832
  const [monthsData, setMonthsData] = React.useState([]);
@@ -8419,9 +8431,9 @@ var __publicField = (obj, key, value) => {
8419
8431
  poppable && !isAutoBackFill ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-calendar-footer", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "calendar-confirm-btn", onClick: confirm, children: confirmText || locale.confirm }) }) : ""
8420
8432
  ] }) });
8421
8433
  });
8422
- CalendarItem.defaultProps = defaultProps$12;
8434
+ CalendarItem.defaultProps = defaultProps$13;
8423
8435
  CalendarItem.displayName = "NutCalendarItem";
8424
- const defaultProps$11 = {
8436
+ const defaultProps$12 = {
8425
8437
  type: "one",
8426
8438
  isAutoBackFill: false,
8427
8439
  poppable: true,
@@ -8477,7 +8489,7 @@ var __publicField = (obj, key, value) => {
8477
8489
  onChoose,
8478
8490
  onSelected,
8479
8491
  onYearMonthChange
8480
- } = { ...defaultProps$11, ...props };
8492
+ } = { ...defaultProps$12, ...props };
8481
8493
  const calendarRef = React.useRef(null);
8482
8494
  const close = () => {
8483
8495
  onClose && onClose();
@@ -8547,9 +8559,9 @@ var __publicField = (obj, key, value) => {
8547
8559
  }
8548
8560
  ) : renderItem() });
8549
8561
  });
8550
- Calendar.defaultProps = defaultProps$11;
8562
+ Calendar.defaultProps = defaultProps$12;
8551
8563
  Calendar.displayName = "NutCalendar";
8552
- const defaultProps$10 = {
8564
+ const defaultProps$11 = {
8553
8565
  data: {
8554
8566
  text: "",
8555
8567
  value: "",
@@ -8560,32 +8572,37 @@ var __publicField = (obj, key, value) => {
8560
8572
  },
8561
8573
  activeColor: "",
8562
8574
  checked: false,
8563
- checkedIcon: "checklist",
8575
+ activeIcon: "checklist",
8564
8576
  chooseItem: () => {
8565
8577
  }
8566
8578
  };
8567
8579
  const InternalCascaderItem = (props, ref) => {
8568
- const { data, checked, checkedIcon, chooseItem, activeColor } = {
8569
- ...defaultProps$10,
8580
+ const { data, checked, activeIcon, chooseItem, activeColor } = {
8581
+ ...defaultProps$11,
8570
8582
  ...props
8571
8583
  };
8572
- const b2 = cn("cascader-item");
8584
+ const classPrefix2 = "nut-cascader-item";
8573
8585
  const classes = classNames(
8574
8586
  {
8575
8587
  active: checked,
8576
8588
  disabled: data.disabled
8577
8589
  },
8578
- b2("")
8590
+ classPrefix2
8579
8591
  );
8580
8592
  const classesTitle = classNames({
8581
- [`${b2("")}__title`]: true
8593
+ [`${classPrefix2}__title`]: true
8582
8594
  });
8583
8595
  const renderIcon = () => {
8584
8596
  if (checked) {
8585
- if (React.isValidElement(checkedIcon)) {
8586
- return checkedIcon;
8597
+ if (React.isValidElement(activeIcon)) {
8598
+ return activeIcon;
8587
8599
  }
8588
- return /* @__PURE__ */ jsxRuntimeExports.jsx(a$q, { className: `${checked ? b2("icon-check") : ""}` });
8600
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
8601
+ a$q,
8602
+ {
8603
+ className: `${checked ? `${classPrefix2}__icon-check` : ""}`
8604
+ }
8605
+ );
8589
8606
  }
8590
8607
  return null;
8591
8608
  };
@@ -8605,7 +8622,7 @@ var __publicField = (obj, key, value) => {
8605
8622
  );
8606
8623
  };
8607
8624
  const CascaderItem = React.forwardRef(InternalCascaderItem);
8608
- CascaderItem.defaultProps = defaultProps$10;
8625
+ CascaderItem.defaultProps = defaultProps$11;
8609
8626
  CascaderItem.displayName = "NutCascaderItem";
8610
8627
  const formatTree = (tree, parent, config2) => tree.map((node) => {
8611
8628
  const {
@@ -8743,26 +8760,22 @@ var __publicField = (obj, key, value) => {
8743
8760
  }
8744
8761
  }
8745
8762
  const Tree$1 = Tree;
8746
- const defaultProps$$ = {
8747
- className: "",
8748
- style: {},
8763
+ const defaultProps$10 = {
8764
+ ...ComponentDefaults,
8749
8765
  activeColor: "",
8750
- checkedIcon: "checklist",
8751
- tabsColor: "",
8752
- poppable: true,
8766
+ activeIcon: "checklist",
8767
+ popup: true,
8753
8768
  visible: false,
8754
8769
  options: [],
8755
8770
  value: [],
8756
8771
  title: "",
8757
- textKey: "text",
8758
- valueKey: "value",
8759
- childrenKey: "children",
8760
- convertConfig: {},
8772
+ optionKey: { textKey: "text", valueKey: "value", childrenKey: "children" },
8773
+ format: {},
8761
8774
  closeable: false,
8762
8775
  closeIconPosition: "top-right",
8763
8776
  closeIcon: "close",
8764
8777
  lazy: false,
8765
- lazyLoad: () => {
8778
+ onLoad: () => {
8766
8779
  },
8767
8780
  onClose: () => {
8768
8781
  },
@@ -8776,28 +8789,25 @@ var __publicField = (obj, key, value) => {
8776
8789
  const {
8777
8790
  className,
8778
8791
  style,
8779
- tabsColor,
8780
- poppable,
8792
+ popup,
8781
8793
  visible,
8782
8794
  options,
8783
8795
  value,
8784
8796
  title,
8785
- textKey,
8786
- valueKey,
8787
- childrenKey,
8788
- convertConfig: convertConfig2,
8797
+ optionKey: optionKey2,
8798
+ format: format2,
8789
8799
  closeable,
8790
8800
  closeIconPosition,
8791
8801
  closeIcon,
8792
8802
  lazy,
8793
- lazyLoad,
8803
+ onLoad,
8794
8804
  onClose,
8795
8805
  onChange,
8796
8806
  onPathChange
8797
- } = { ...defaultProps$$, ...props };
8807
+ } = { ...defaultProps$10, ...props };
8798
8808
  const [tabvalue, setTabvalue] = React.useState("c1");
8799
8809
  const [optionsData, setOptionsData] = React.useState([]);
8800
- const isLazy = () => state.configs.lazy && Boolean(state.configs.lazyLoad);
8810
+ const isLazy = () => state.configs.lazy && Boolean(state.configs.onLoad);
8801
8811
  const [state] = React.useState({
8802
8812
  optionsData: [],
8803
8813
  panes: [
@@ -8815,44 +8825,38 @@ var __publicField = (obj, key, value) => {
8815
8825
  currentProcessNode: [],
8816
8826
  configs: {
8817
8827
  lazy,
8818
- lazyLoad,
8819
- valueKey,
8820
- textKey,
8821
- childrenKey,
8822
- convertConfig: convertConfig2
8828
+ onLoad,
8829
+ optionKey: optionKey2,
8830
+ format: format2
8823
8831
  },
8824
8832
  lazyLoadMap: /* @__PURE__ */ new Map()
8825
8833
  });
8826
- const b2 = cn("cascader");
8827
- const classes = classNames(b2(""));
8834
+ const classPrefix2 = classNames(`nut-cascader`);
8828
8835
  const classesPane = classNames({
8829
- [`${b2("")}-pane`]: true
8836
+ [`${classPrefix2}-pane`]: true
8830
8837
  });
8831
8838
  React.useEffect(() => {
8832
8839
  initData();
8833
- }, []);
8840
+ }, [options]);
8834
8841
  React.useEffect(() => {
8835
8842
  if (value !== state.innerValue) {
8836
8843
  state.innerValue = value;
8837
8844
  }
8838
8845
  }, [value]);
8839
- React.useEffect(() => {
8840
- initData();
8841
- }, [options]);
8842
8846
  const initData = async () => {
8843
8847
  state.lazyLoadMap.clear();
8844
- if (convertConfig2 && Object.keys(convertConfig2).length > 0) {
8848
+ if (format2 && Object.keys(format2).length > 0) {
8845
8849
  state.optionsData = convertListToOptions(
8846
8850
  options,
8847
- convertConfig2
8851
+ format2
8848
8852
  );
8849
8853
  } else {
8850
8854
  state.optionsData = options;
8851
8855
  }
8852
8856
  state.tree = new Tree$1(state.optionsData, {
8853
- value: state.configs.valueKey,
8854
- text: state.configs.textKey,
8855
- children: state.configs.childrenKey
8857
+ value: state.configs.optionKey.valueKey,
8858
+ text: state.configs.optionKey.textKey,
8859
+ children: state.configs.optionKey.childrenKey
8856
8860
  });
8857
8861
  if (isLazy() && !state.tree.nodes.length) {
8858
8862
  await invokeLazyLoad({
@@ -8918,7 +8922,7 @@ var __publicField = (obj, key, value) => {
8918
8922
  if (!node) {
8919
8923
  return;
8920
8924
  }
8921
- if (!state.configs.lazyLoad) {
8925
+ if (!state.configs.onLoad) {
8922
8926
  node.leaf = true;
8923
8927
  return;
8924
8928
  }
@@ -8931,7 +8935,7 @@ var __publicField = (obj, key, value) => {
8931
8935
  if (!lazyLoadPromise) {
8932
8936
  lazyLoadPromise = new Promise((resolve) => {
8933
8937
  var _a, _b;
8934
- (_b = (_a = state.configs).lazyLoad) == null ? void 0 : _b.call(_a, node, resolve);
8938
+ (_b = (_a = state.configs).onLoad) == null ? void 0 : _b.call(_a, node, resolve);
8935
8939
  });
8936
8940
  state.lazyLoadMap.set(node, lazyLoadPromise);
8937
8941
  }
@@ -8978,8 +8982,8 @@ var __publicField = (obj, key, value) => {
8978
8982
  selectedNode: null,
8979
8983
  paneKey: `c${state.tabsCursor + 1}`
8980
8984
  });
8981
- setTabvalue(`c${state.tabsCursor + 1}`);
8982
8985
  setOptionsData(state.panes);
8986
+ setTabvalue(`c${state.tabsCursor + 1}`);
8983
8987
  if (!type) {
8984
8988
  const pathNodes = state.panes.map((item) => item.selectedNode);
8985
8989
  const optionParams = pathNodes.map((item) => item == null ? void 0 : item.value);
@@ -8999,8 +9003,8 @@ var __publicField = (obj, key, value) => {
8999
9003
  setOptionsData(state.panes);
9000
9004
  };
9001
9005
  const renderItem = () => {
9002
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `${classes} ${className}`, style, children: [
9003
- poppable && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: b2("title"), children: title }),
9006
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `${classPrefix2} ${className}`, style, children: [
9007
+ popup && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-cascader__title", children: title }),
9004
9008
  /* @__PURE__ */ jsxRuntimeExports.jsx(
9005
9009
  Tabs,
9006
9010
  {
@@ -9015,27 +9019,21 @@ var __publicField = (obj, key, value) => {
9015
9019
  setTabvalue(pane.paneKey);
9016
9020
  state.tabsCursor = index;
9017
9021
  },
9018
- className: `nut-tabs__titles-item ${tabvalue === pane.paneKey ? "active" : ""}`,
9022
+ className: `nut-tabs__titles-item ${tabvalue === pane.paneKey ? "nut-tabs__titles-item--active" : ""}`,
9019
9023
  children: [
9020
9024
  /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "nut-tabs__titles-item__text", children: [
9021
9025
  !state.initLoading && state.panes.length && ((_a = pane == null ? void 0 : pane.selectedNode) == null ? void 0 : _a.text),
9022
9026
  !state.initLoading && state.panes.length && !((_b = pane == null ? void 0 : pane.selectedNode) == null ? void 0 : _b.text) && "请选择",
9023
9027
  !(!state.initLoading && state.panes.length) && "Loading..."
9024
9028
  ] }),
9025
- /* @__PURE__ */ jsxRuntimeExports.jsx(
9026
- "span",
9027
- {
9028
- className: "nut-tabs__titles-item__line",
9029
- style: { background: tabsColor }
9030
- }
9031
- )
9029
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "nut-tabs__titles-item__line" })
9032
9030
  ]
9033
9031
  },
9034
9032
  pane.paneKey
9035
9033
  );
9036
9034
  });
9037
9035
  },
9038
- children: !state.initLoading && state.panes.length ? optionsData.map((pane) => /* @__PURE__ */ jsxRuntimeExports.jsx(TabPane, { value: pane.paneKey, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: classesPane, children: pane.nodes && pane.nodes.map((node, index) => {
9036
+ children: !state.initLoading && state.panes.length ? optionsData.map((pane) => /* @__PURE__ */ jsxRuntimeExports.jsx(Tabs.TabPane, { value: pane.paneKey, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: classesPane, children: pane.nodes && pane.nodes.map((node, index) => {
9039
9037
  var _a;
9040
9038
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
9041
9039
  CascaderItem,
@@ -9047,18 +9045,18 @@ var __publicField = (obj, key, value) => {
9047
9045
  },
9048
9046
  index
9049
9047
  );
9050
- }) }) }, pane.paneKey)) : /* @__PURE__ */ jsxRuntimeExports.jsx(TabPane, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: classesPane }) })
9048
+ }) }) }, pane.paneKey)) : /* @__PURE__ */ jsxRuntimeExports.jsx(Tabs.TabPane, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: classesPane }) })
9051
9049
  }
9052
9050
  )
9053
9051
  ] });
9054
9052
  };
9055
- return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: poppable ? /* @__PURE__ */ jsxRuntimeExports.jsx(
9053
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: popup ? /* @__PURE__ */ jsxRuntimeExports.jsx(
9056
9054
  Popup,
9057
9055
  {
9058
- className: "cascadar-popup",
9059
9056
  visible,
9060
9057
  position: "bottom",
9061
9058
  round: true,
9059
+ closeIcon,
9062
9060
  closeable,
9063
9061
  closeIconPosition,
9064
9062
  onClickOverlay: closePopup,
@@ -9068,11 +9066,11 @@ var __publicField = (obj, key, value) => {
9068
9066
  ) : renderItem() });
9069
9067
  };
9070
9068
  const Cascader = React.forwardRef(InternalCascader);
9071
- Cascader.defaultProps = defaultProps$$;
9069
+ Cascader.defaultProps = defaultProps$10;
9072
9070
  Cascader.displayName = "NutCascader";
9073
9071
  const CheckboxGroupContext = React.createContext(null);
9074
9072
  const Context = CheckboxGroupContext;
9075
- const defaultProps$_ = {
9073
+ const defaultProps$$ = {
9076
9074
  max: void 0,
9077
9075
  labelPosition: "right",
9078
9076
  direction: "vertical",
@@ -9083,7 +9081,7 @@ var __publicField = (obj, key, value) => {
9083
9081
  const classPrefix$9 = "nut-checkboxgroup";
9084
9082
  const CheckboxGroup = React.forwardRef(
9085
9083
  (props, ref) => {
9086
- const { children } = { ...defaultProps$_, ...props };
9084
+ const { children } = { ...defaultProps$$, ...props };
9087
9085
  const {
9088
9086
  className,
9089
9087
  disabled,
@@ -9173,9 +9171,9 @@ var __publicField = (obj, key, value) => {
9173
9171
  );
9174
9172
  }
9175
9173
  );
9176
- CheckboxGroup.defaultProps = defaultProps$_;
9174
+ CheckboxGroup.defaultProps = defaultProps$$;
9177
9175
  CheckboxGroup.displayName = "NutCheckboxGroup";
9178
- const defaultProps$Z = {
9176
+ const defaultProps$_ = {
9179
9177
  ...ComponentDefaults,
9180
9178
  disabled: false,
9181
9179
  labelPosition: "right",
@@ -9188,7 +9186,7 @@ var __publicField = (obj, key, value) => {
9188
9186
  const classPrefix$8 = "nut-checkbox";
9189
9187
  const Checkbox = (props) => {
9190
9188
  const { children } = {
9191
- ...defaultProps$Z,
9189
+ ...defaultProps$_,
9192
9190
  ...props
9193
9191
  };
9194
9192
  const {
@@ -9293,7 +9291,7 @@ var __publicField = (obj, key, value) => {
9293
9291
  }
9294
9292
  );
9295
9293
  };
9296
- Checkbox.defaultProps = defaultProps$Z;
9294
+ Checkbox.defaultProps = defaultProps$_;
9297
9295
  Checkbox.displayName = "NutCheckBox";
9298
9296
  Checkbox.Group = CheckboxGroup;
9299
9297
  const MIN_DISTANCE = 10;
@@ -9374,13 +9372,13 @@ var __publicField = (obj, key, value) => {
9374
9372
  console.log(e);
9375
9373
  }
9376
9374
  }
9377
- const InternalPickerSlot = (props, ref) => {
9375
+ const InternalPickerPanel = (props, ref) => {
9378
9376
  const {
9379
9377
  keyIndex = 0,
9380
9378
  defaultValue,
9381
- listData = [],
9379
+ options = [],
9382
9380
  threeDimensional = true,
9383
- swipeDuration = 1e3,
9381
+ duration = 1e3,
9384
9382
  itemShow = false,
9385
9383
  chooseItem
9386
9384
  } = props;
@@ -9395,9 +9393,9 @@ var __publicField = (obj, key, value) => {
9395
9393
  const rotation = 20;
9396
9394
  const moving = React.useRef(false);
9397
9395
  let timer;
9398
- const listbox = React.useRef(null);
9396
+ const listRef = React.useRef(null);
9399
9397
  const rollerRef = React.useRef(null);
9400
- const pickerSlotRef = React.useRef(null);
9398
+ const PickerPanelRef = React.useRef(null);
9401
9399
  const [startTime, setStartTime] = React.useState(0);
9402
9400
  const [startY, setStartY] = React.useState(0);
9403
9401
  const transformY = React.useRef(0);
@@ -9423,8 +9421,8 @@ var __publicField = (obj, key, value) => {
9423
9421
  if (updateMove > 0) {
9424
9422
  updateMove = 0;
9425
9423
  }
9426
- if (updateMove < -(listData.length - 1) * lineSpacing.current) {
9427
- updateMove = -(listData.length - 1) * lineSpacing.current;
9424
+ if (updateMove < -(options.length - 1) * lineSpacing.current) {
9425
+ updateMove = -(options.length - 1) * lineSpacing.current;
9428
9426
  }
9429
9427
  const endMove = Math.round(updateMove / lineSpacing.current) * lineSpacing.current;
9430
9428
  const deg = `${(Math.abs(Math.round(endMove / lineSpacing.current)) + 1) * rotation}deg`;
@@ -9433,7 +9431,7 @@ var __publicField = (obj, key, value) => {
9433
9431
  } else {
9434
9432
  let deg = 0;
9435
9433
  const currentDeg = (-updateMove / lineSpacing.current + 1) * rotation;
9436
- const maxDeg = (listData.length + 1) * rotation;
9434
+ const maxDeg = (options.length + 1) * rotation;
9437
9435
  const minDeg = 0;
9438
9436
  deg = Math.min(Math.max(currentDeg, minDeg), maxDeg);
9439
9437
  if (minDeg < deg && deg < maxDeg) {
@@ -9443,7 +9441,7 @@ var __publicField = (obj, key, value) => {
9443
9441
  }
9444
9442
  };
9445
9443
  const setChooseValue = (move) => {
9446
- chooseItem && chooseItem(listData == null ? void 0 : listData[Math.round(-move / lineSpacing.current)], keyIndex);
9444
+ chooseItem && chooseItem(options == null ? void 0 : options[Math.round(-move / lineSpacing.current)], keyIndex);
9447
9445
  };
9448
9446
  const touchStart = (event) => {
9449
9447
  touch.start(event);
@@ -9467,7 +9465,7 @@ var __publicField = (obj, key, value) => {
9467
9465
  const moveTime = Date.now() - startTime;
9468
9466
  if (moveTime <= INERTIA_TIME && Math.abs(move) > INERTIA_DISTANCE) {
9469
9467
  const distance = momentum(move, moveTime);
9470
- setMove(distance, "end", +swipeDuration);
9468
+ setMove(distance, "end", +duration);
9471
9469
  } else {
9472
9470
  setMove(move, "end");
9473
9471
  }
@@ -9475,9 +9473,9 @@ var __publicField = (obj, key, value) => {
9475
9473
  touch.reset();
9476
9474
  }, 0);
9477
9475
  };
9478
- const momentum = (distance, duration) => {
9476
+ const momentum = (distance, duration2) => {
9479
9477
  let nDistance = distance;
9480
- const speed = Math.abs(nDistance / duration);
9478
+ const speed = Math.abs(nDistance / duration2);
9481
9479
  nDistance = speed / 3e-3 * (nDistance < 0 ? -1 : 1);
9482
9480
  return nDistance;
9483
9481
  };
@@ -9485,7 +9483,7 @@ var __publicField = (obj, key, value) => {
9485
9483
  const value = val || defaultValue;
9486
9484
  let index = -1;
9487
9485
  if (value) {
9488
- listData.some((item, idx) => {
9486
+ options.some((item, idx) => {
9489
9487
  if (item.value === value) {
9490
9488
  index = idx;
9491
9489
  return true;
@@ -9493,7 +9491,7 @@ var __publicField = (obj, key, value) => {
9493
9491
  return false;
9494
9492
  });
9495
9493
  } else {
9496
- listData.forEach((item, i) => {
9494
+ options.forEach((item, i) => {
9497
9495
  if (item.value === defaultValue) {
9498
9496
  index = i;
9499
9497
  }
@@ -9518,7 +9516,7 @@ var __publicField = (obj, key, value) => {
9518
9516
  }
9519
9517
  };
9520
9518
  const getReference = async () => {
9521
- const refe = await getRectByTaro(listbox == null ? void 0 : listbox.current);
9519
+ const refe = await getRectByTaro(listRef == null ? void 0 : listRef.current);
9522
9520
  lineSpacing.current = refe.height ? refe.height : 36;
9523
9521
  modifyStatus(true);
9524
9522
  };
@@ -9541,7 +9539,7 @@ var __publicField = (obj, key, value) => {
9541
9539
  return () => {
9542
9540
  clearTimeout(timer);
9543
9541
  };
9544
- }, [listData]);
9542
+ }, [options]);
9545
9543
  React.useEffect(() => {
9546
9544
  if (itemShow) {
9547
9545
  setTimeout(() => {
@@ -9557,7 +9555,7 @@ var __publicField = (obj, key, value) => {
9557
9555
  "div",
9558
9556
  {
9559
9557
  className: "nut-picker-list",
9560
- ref: pickerSlotRef,
9558
+ ref: PickerPanelRef,
9561
9559
  onTouchStart: touchStart,
9562
9560
  onTouchMove: touchMove,
9563
9561
  onTouchEnd: touchEnd,
@@ -9570,7 +9568,7 @@ var __publicField = (obj, key, value) => {
9570
9568
  style: threeDimensional ? touchRollerStyle() : touchTileStyle(),
9571
9569
  onTransitionEnd: stopMomentum,
9572
9570
  children: [
9573
- threeDimensional && listData.map((item, index) => {
9571
+ threeDimensional && options.map((item, index) => {
9574
9572
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
9575
9573
  "div",
9576
9574
  {
@@ -9585,7 +9583,7 @@ var __publicField = (obj, key, value) => {
9585
9583
  item.value ? item.value : index
9586
9584
  );
9587
9585
  }),
9588
- !threeDimensional && listData.map((item, index) => {
9586
+ !threeDimensional && options.map((item, index) => {
9589
9587
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
9590
9588
  "div",
9591
9589
  {
@@ -9603,13 +9601,13 @@ var __publicField = (obj, key, value) => {
9603
9601
  }
9604
9602
  ),
9605
9603
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-picker-mask" }),
9606
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-picker-indicator", ref: listbox })
9604
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-picker-indicator", ref: listRef })
9607
9605
  ]
9608
9606
  }
9609
9607
  );
9610
9608
  };
9611
- const PickerSlot = React.forwardRef(InternalPickerSlot);
9612
- const PickerSlot$1 = PickerSlot;
9609
+ const PickerPanel = React.forwardRef(InternalPickerPanel);
9610
+ const PickerPanel$1 = PickerPanel;
9613
9611
  function useRefs() {
9614
9612
  const refs = React.useRef([]);
9615
9613
  const setRefs = React.useCallback(
@@ -9624,181 +9622,247 @@ var __publicField = (obj, key, value) => {
9624
9622
  }, []);
9625
9623
  return [refs.current, setRefs, reset];
9626
9624
  }
9625
+ const defaultProps$Z = {
9626
+ ...ComponentDefaults,
9627
+ visible: false,
9628
+ title: "",
9629
+ options: [],
9630
+ value: [],
9631
+ defaultValue: [],
9632
+ threeDimensional: true,
9633
+ duration: 1e3
9634
+ };
9627
9635
  const InternalPicker = (props, ref) => {
9628
9636
  const { locale } = useConfig$1();
9629
9637
  const {
9630
9638
  visible,
9631
9639
  title,
9632
- listData = [],
9633
- defaultValueData,
9634
- onConfirm,
9635
- onClose,
9636
- onCloseUpdate,
9637
- onChange,
9640
+ options = [],
9641
+ defaultValue = [],
9638
9642
  className,
9639
9643
  style,
9640
9644
  threeDimensional,
9641
- swipeDuration,
9645
+ duration,
9646
+ onConfirm,
9647
+ onClose,
9648
+ afterClose,
9649
+ onChange,
9642
9650
  ...rest
9643
- } = props;
9644
- const [chooseValueData, setchooseValueData] = React.useState([]);
9645
- const [columnIndex, setcolumnIndex] = React.useState(0);
9651
+ } = { ...defaultProps$Z, ...props };
9652
+ const classPrefix2 = "nut-picker";
9653
+ const classes = classNames(classPrefix2, className);
9654
+ const [selectedValue, setSelectedValue] = usePropsValue({
9655
+ value: props.value,
9656
+ defaultValue: [...defaultValue],
9657
+ finalValue: [...defaultValue],
9658
+ onChange: (val) => {
9659
+ var _a;
9660
+ (_a = props.onConfirm) == null ? void 0 : _a.call(props, setSelectedOptions(), val);
9661
+ }
9662
+ });
9663
+ const [currentValue2, setCurrentValue] = React.useState([]);
9664
+ const [columnIndex, setColumnIndex] = React.useState(0);
9646
9665
  const pickerRef = React.useRef(null);
9647
9666
  const [refs, setRefs] = useRefs();
9648
9667
  const [columnsList, setColumnsList] = React.useState([]);
9649
- const b2 = cn("picker");
9650
9668
  const isConfirmEvent = React.useRef(false);
9651
- React.useEffect(() => {
9652
- if (defaultValueData && defaultValueData.length !== 0 && defaultValueData.toString() !== chooseValueData.toString()) {
9653
- const data = [...defaultValueData];
9654
- setchooseValueData(data);
9655
- setColumnsList(normalListData());
9669
+ const formatCascade = (columns, values) => {
9670
+ const formatted = [];
9671
+ let columnOptions = {
9672
+ text: "",
9673
+ value: "",
9674
+ children: columns
9675
+ };
9676
+ let columnIndex2 = 0;
9677
+ while (columnOptions && columnOptions.children) {
9678
+ const options2 = columnOptions.children;
9679
+ const value = values[columnIndex2];
9680
+ let index = options2.findIndex(
9681
+ (columnItem) => columnItem.value === value
9682
+ );
9683
+ if (index === -1)
9684
+ index = 0;
9685
+ columnOptions = columnOptions.children[index];
9686
+ columnIndex2++;
9687
+ formatted.push(options2);
9656
9688
  }
9657
- }, [defaultValueData]);
9658
- React.useEffect(() => {
9659
- onChange && onChange(columnIndex, chooseValueData, selectedOptions());
9660
- if (isConfirmEvent.current) {
9661
- isConfirmEvent.current = false;
9662
- onConfirm && onConfirm(chooseValueData, selectedOptions());
9689
+ return formatted;
9690
+ };
9691
+ const columnsType = () => {
9692
+ const firstColumn = options[0];
9693
+ if (firstColumn) {
9694
+ if (Array.isArray(firstColumn)) {
9695
+ return "multiple";
9696
+ }
9697
+ if ("children" in firstColumn) {
9698
+ return "cascade";
9699
+ }
9663
9700
  }
9664
- }, [chooseValueData]);
9665
- React.useEffect(() => {
9666
- init();
9667
- }, [listData]);
9668
- const closeActionSheet = () => {
9669
- onClose && onClose(chooseValueData, selectedOptions());
9670
- onCloseUpdate && onCloseUpdate(chooseValueData, selectedOptions(), pickerRef);
9701
+ return "single";
9671
9702
  };
9672
- const confirm = () => {
9673
- let movings = false;
9674
- refs.forEach((_ref) => {
9675
- if (_ref.moving)
9676
- movings = true;
9677
- _ref.stopMomentum();
9703
+ const normalListData = () => {
9704
+ const type = columnsType();
9705
+ switch (type) {
9706
+ case "multiple":
9707
+ return options;
9708
+ case "cascade":
9709
+ return formatCascade(options, selectedValue);
9710
+ default:
9711
+ return [options];
9712
+ }
9713
+ };
9714
+ const init = () => {
9715
+ const normalData = normalListData();
9716
+ setColumnsList(normalData);
9717
+ const data = [];
9718
+ normalData.length > 0 && normalData.map((item) => {
9719
+ item[0] && data.push(item[0].value);
9720
+ return item;
9678
9721
  });
9679
- if (movings) {
9680
- isConfirmEvent.current = true;
9681
- } else {
9682
- onConfirm && onConfirm(chooseValueData, selectedOptions());
9722
+ if (!defaultValue.length && selectedValue.length === 0) {
9723
+ setSelectedValue([...data]);
9683
9724
  }
9684
- onClose && onClose(chooseValueData, selectedOptions());
9685
- setTimeout(() => {
9686
- isConfirmEvent.current = false;
9687
- }, 0);
9688
9725
  };
9689
- const selectedOptions = () => {
9690
- const optins = [];
9691
- columnsList.map((column, index) => {
9692
- let currOptions = [];
9693
- currOptions = column.filter(
9694
- (item) => item.value === chooseValueData[index]
9726
+ React.useEffect(() => {
9727
+ if (!visible) {
9728
+ return;
9729
+ }
9730
+ init();
9731
+ }, [options, visible]);
9732
+ const setSelectedOptions = () => {
9733
+ const options2 = [];
9734
+ let currOptions = [];
9735
+ columnsList.forEach((columnOptions, index) => {
9736
+ currOptions = columnOptions.filter(
9737
+ (item) => item.value === selectedValue[index]
9695
9738
  );
9696
9739
  if (currOptions[0]) {
9697
- optins.push(currOptions[0]);
9740
+ options2.push(currOptions[0]);
9698
9741
  } else {
9699
- column[0] && optins.push(column[0]);
9742
+ columnOptions[0] && options2.push(columnOptions[0]);
9700
9743
  }
9701
- return column;
9702
9744
  });
9703
- return optins;
9745
+ return options2;
9746
+ };
9747
+ const defaultValuesConvert = () => {
9748
+ const defaultIndexs = [];
9749
+ if (selectedValue.length > 0) {
9750
+ selectedValue.forEach((value, index) => {
9751
+ var _a;
9752
+ for (let i = 0; i < ((_a = columnsList == null ? void 0 : columnsList[index]) == null ? void 0 : _a.length); i++) {
9753
+ if (columnsList[index][i].value === value) {
9754
+ defaultIndexs.push(i);
9755
+ break;
9756
+ }
9757
+ }
9758
+ });
9759
+ } else if (columnsList && columnsList.length > 0) {
9760
+ columnsList.forEach((item) => {
9761
+ defaultIndexs.push(0);
9762
+ item.length > 0 && selectedValue.push(item[0].value);
9763
+ });
9764
+ }
9765
+ return defaultIndexs;
9704
9766
  };
9705
- const chooseItem = (option, columnIndex2) => {
9706
- if (option && Object.keys(option).length) {
9707
- if (chooseValueData[columnIndex2] !== option.value) {
9767
+ React.useEffect(() => {
9768
+ if (!visible) {
9769
+ return;
9770
+ }
9771
+ Taro.getEnv() !== "WEB" && setCurrentValue(defaultValuesConvert());
9772
+ onChange && onChange(setSelectedOptions(), selectedValue, columnIndex);
9773
+ if (isConfirmEvent.current) {
9774
+ isConfirmEvent.current = false;
9775
+ onConfirm && onConfirm(setSelectedOptions(), selectedValue);
9776
+ }
9777
+ }, [selectedValue, columnsList, visible]);
9778
+ const chooseItem = (columnOptions, columnIndex2) => {
9779
+ var _a, _b;
9780
+ if (columnOptions && Object.keys(columnOptions).length) {
9781
+ if (selectedValue[columnIndex2] !== columnOptions.value) {
9708
9782
  if (columnsType() === "cascade") {
9709
- chooseValueData[columnIndex2] = option.value ? option.value : "";
9710
- setchooseValueData([...chooseValueData]);
9711
- let index = columnIndex2;
9712
- let cursor = option;
9713
- while (cursor && cursor.children && cursor.children[0]) {
9714
- chooseValueData[index + 1] = cursor.children[0].value;
9715
- setchooseValueData([...chooseValueData]);
9716
- index++;
9717
- const cc = cursor.children[0];
9718
- cursor = cc;
9783
+ selectedValue[columnIndex2] = columnOptions.value || "";
9784
+ setSelectedValue([...selectedValue]);
9785
+ while ((_a = columnOptions == null ? void 0 : columnOptions.children) == null ? void 0 : _a[0]) {
9786
+ selectedValue[columnIndex2 + 1] = columnOptions.children[0].value;
9787
+ setSelectedValue([...selectedValue]);
9788
+ columnIndex2++;
9789
+ columnOptions = columnOptions.children[0];
9719
9790
  }
9720
- if (cursor && cursor.children) {
9721
- chooseValueData[index + 1] = "";
9722
- setchooseValueData([...chooseValueData]);
9791
+ if ((_b = columnOptions == null ? void 0 : columnOptions.children) == null ? void 0 : _b.length) {
9792
+ selectedValue[columnIndex2 + 1] = "";
9793
+ setSelectedValue([...selectedValue]);
9723
9794
  }
9724
9795
  setColumnsList(normalListData());
9725
9796
  } else {
9726
- setchooseValueData((data) => {
9797
+ setSelectedValue((data) => {
9727
9798
  const cdata = [...data];
9728
9799
  cdata[columnIndex2] = Object.prototype.hasOwnProperty.call(
9729
- option,
9800
+ columnOptions,
9730
9801
  "value"
9731
- ) ? option.value : "";
9802
+ ) ? columnOptions.value : "";
9732
9803
  return cdata;
9733
9804
  });
9734
9805
  }
9735
- setcolumnIndex(columnIndex2);
9806
+ setColumnIndex(columnIndex2);
9736
9807
  }
9737
9808
  }
9738
9809
  };
9739
- const normalListData = () => {
9740
- const type = columnsType();
9741
- switch (type) {
9742
- case "multiple":
9743
- return listData;
9744
- case "cascade":
9745
- return formatCascade(listData, chooseValueData);
9746
- default:
9747
- return [listData];
9810
+ const confirm = () => {
9811
+ let movings = false;
9812
+ refs.forEach((ref2) => {
9813
+ if (ref2.moving)
9814
+ movings = true;
9815
+ ref2.stopMomentum();
9816
+ });
9817
+ if (movings) {
9818
+ isConfirmEvent.current = true;
9819
+ } else {
9820
+ onConfirm && onConfirm(setSelectedOptions(), selectedValue);
9821
+ closePicker();
9748
9822
  }
9823
+ setTimeout(() => {
9824
+ isConfirmEvent.current = false;
9825
+ }, 0);
9749
9826
  };
9750
- const columnsType = () => {
9751
- const firstColumn = listData[0];
9752
- if (firstColumn) {
9753
- if (Array.isArray(firstColumn)) {
9754
- return "multiple";
9755
- }
9756
- if ("children" in firstColumn) {
9757
- return "cascade";
9758
- }
9759
- }
9760
- return "single";
9827
+ const closePicker = () => {
9828
+ onClose && onClose(setSelectedOptions(), selectedValue);
9829
+ afterClose && afterClose(setSelectedOptions(), selectedValue, pickerRef);
9761
9830
  };
9762
- const formatCascade = (columns, defaultValues) => {
9763
- const formatted = [];
9764
- let cursor = {
9765
- text: "",
9766
- value: "",
9767
- children: columns
9768
- };
9769
- let columnIndex2 = 0;
9770
- while (cursor && cursor.children) {
9771
- const options = cursor.children;
9772
- const value = defaultValues[columnIndex2];
9773
- let index = options.findIndex(
9774
- (columnItem) => columnItem.value === value
9775
- );
9776
- if (index === -1)
9777
- index = 0;
9778
- cursor = cursor.children[index];
9779
- columnIndex2++;
9780
- formatted.push(options);
9781
- }
9782
- return formatted;
9831
+ const renderTitleBar = () => {
9832
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `${classPrefix2}__control`, children: [
9833
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
9834
+ "span",
9835
+ {
9836
+ className: `${classPrefix2}__cancel-btn`,
9837
+ onClick: () => closePicker(),
9838
+ children: locale.cancel
9839
+ }
9840
+ ),
9841
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__title`, children: title || "" }),
9842
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `${classPrefix2}__confirm-btn`, onClick: confirm, children: locale.confirm })
9843
+ ] });
9783
9844
  };
9784
- const init = () => {
9785
- const data = [];
9786
- const normalData = normalListData();
9787
- setColumnsList(normalData);
9788
- normalData.length > 0 && normalData.map((item) => {
9789
- item[0] && data.push(item[0].value);
9790
- return item;
9791
- });
9792
- if (!defaultValueData && chooseValueData.length === 0) {
9793
- setchooseValueData([...data]);
9794
- }
9845
+ const [pickingStatus, setPickingStatus] = React.useState(false);
9846
+ const pickerStart = () => {
9847
+ setPickingStatus(true);
9795
9848
  };
9796
- const renderToolbar = () => {
9797
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: b2("control"), children: [
9798
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: b2("cancel-btn"), onClick: () => closeActionSheet(), children: locale.cancel }),
9799
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: b2("title"), children: title || "" }),
9800
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: b2("confirm-btn"), onClick: confirm, children: locale.confirm })
9801
- ] });
9849
+ const pickerEnd = () => {
9850
+ setPickingStatus(false);
9851
+ };
9852
+ const pickerChange = (data) => {
9853
+ const prevDefaultValue = currentValue2;
9854
+ let changeIndex = 0;
9855
+ const list = data.detail.value;
9856
+ for (let i = 0, len = list.length; i < len; i++) {
9857
+ if (prevDefaultValue[i] !== list[i]) {
9858
+ changeIndex = i;
9859
+ break;
9860
+ }
9861
+ }
9862
+ chooseItem(
9863
+ columnsList[changeIndex][data.detail.value[changeIndex]],
9864
+ changeIndex
9865
+ );
9802
9866
  };
9803
9867
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
9804
9868
  Popup,
@@ -9806,36 +9870,50 @@ var __publicField = (obj, key, value) => {
9806
9870
  visible,
9807
9871
  position: "bottom",
9808
9872
  onClose: () => {
9809
- closeActionSheet();
9873
+ closePicker();
9810
9874
  },
9811
- children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
9812
- components.View,
9813
- {
9814
- className: `${b2()} ${className || ""}`,
9815
- style,
9816
- ...rest,
9817
- catchMove: true,
9818
- children: [
9819
- renderToolbar(),
9820
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: b2("panel"), ref: pickerRef, children: columnsList == null ? void 0 : columnsList.map((item, index) => {
9821
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
9822
- PickerSlot$1,
9823
- {
9824
- ref: setRefs(index),
9825
- defaultValue: chooseValueData == null ? void 0 : chooseValueData[index],
9826
- listData: item,
9827
- threeDimensional,
9828
- chooseItem: (value, index2) => chooseItem(value, index2),
9829
- swipeDuration,
9830
- keyIndex: index,
9831
- itemShow: visible
9832
- },
9833
- index
9834
- );
9835
- }) })
9836
- ]
9837
- }
9838
- )
9875
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs(components.View, { className: classes, style, ...rest, catchMove: true, children: [
9876
+ renderTitleBar(),
9877
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__panel`, ref: pickerRef, children: Taro.getEnv() === "WEB" ? columnsList == null ? void 0 : columnsList.map((item, index) => {
9878
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
9879
+ PickerPanel$1,
9880
+ {
9881
+ ref: setRefs(index),
9882
+ defaultValue: selectedValue == null ? void 0 : selectedValue[index],
9883
+ options: item,
9884
+ threeDimensional,
9885
+ chooseItem: (value, index2) => chooseItem(value, index2),
9886
+ duration,
9887
+ keyIndex: index,
9888
+ itemShow: visible
9889
+ },
9890
+ index
9891
+ );
9892
+ }) : /* @__PURE__ */ jsxRuntimeExports.jsx(
9893
+ components.PickerView,
9894
+ {
9895
+ ref: pickerRef,
9896
+ value: currentValue2,
9897
+ immediateChange: true,
9898
+ onPickStart: pickerStart,
9899
+ onChange: pickerChange,
9900
+ onPickEnd: pickerEnd,
9901
+ className: "nut-picker-view-panel",
9902
+ children: columnsList == null ? void 0 : columnsList.map((columnOptions, index) => {
9903
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(components.PickerViewColumn, { children: columnOptions.map((item, index2) => {
9904
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
9905
+ components.View,
9906
+ {
9907
+ className: "nut-picker-roller-item-title",
9908
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: item.text || item })
9909
+ },
9910
+ item.value || index2
9911
+ );
9912
+ }) }, `col${index}`);
9913
+ })
9914
+ }
9915
+ ) })
9916
+ ] })
9839
9917
  }
9840
9918
  );
9841
9919
  };
@@ -9880,7 +9958,7 @@ var __publicField = (obj, key, value) => {
9880
9958
  const [show, setShow] = React.useState(false);
9881
9959
  const [currentDate, setCurrentDate] = React.useState(modelValue);
9882
9960
  const [defaultValue, setDefaultValue] = React.useState([]);
9883
- const [listData, setListData] = React.useState([]);
9961
+ const [options, setListData] = React.useState([]);
9884
9962
  const pickerRef = React.useRef(null);
9885
9963
  const isDate = (val) => {
9886
9964
  return Object.prototype.toString.call(val) === "[object Date]" && !Number.isNaN(val.getTime());
@@ -9998,7 +10076,7 @@ var __publicField = (obj, key, value) => {
9998
10076
  }
9999
10077
  return result;
10000
10078
  };
10001
- const updateChooseValueCustmer = (index, selectedValue, cacheValueData) => {
10079
+ const updateChooseValueCustmer = (cacheValueData, selectedValue, index) => {
10002
10080
  if (["date", "datetime", "datehour", "month-day", "year-month"].includes(
10003
10081
  type.toLocaleLowerCase()
10004
10082
  )) {
@@ -10037,7 +10115,7 @@ var __publicField = (obj, key, value) => {
10037
10115
  const isEqual2 = (currentDate == null ? void 0 : currentDate.getTime()) === (date == null ? void 0 : date.getTime());
10038
10116
  date && isDate(date) && !isEqual2 && setCurrentDate(formatValue(date));
10039
10117
  }
10040
- props.onChange && props.onChange(index, selectedValue, cacheValueData);
10118
+ props.onChange && props.onChange(cacheValueData, selectedValue, index);
10041
10119
  };
10042
10120
  const padZero = (num, targetLength = 2) => {
10043
10121
  let str = `${num}`;
@@ -10134,16 +10212,16 @@ var __publicField = (obj, key, value) => {
10134
10212
  style,
10135
10213
  catchMove: true,
10136
10214
  ...rest,
10137
- children: listData.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(
10215
+ children: options.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(
10138
10216
  Picker$1,
10139
10217
  {
10140
10218
  title,
10141
10219
  visible: show,
10142
- listData,
10220
+ options,
10143
10221
  onClose: onCloseDatePicker,
10144
- defaultValueData: defaultValue,
10145
- onConfirm: (values, options) => onConfirmDatePicker && onConfirmDatePicker(values, options),
10146
- onChange: (index, value, list) => updateChooseValueCustmer(index, value, list),
10222
+ defaultValue,
10223
+ onConfirm: (options2, values) => onConfirmDatePicker && onConfirmDatePicker(options2, values),
10224
+ onChange: (list, value, index) => updateChooseValueCustmer(list, value, index),
10147
10225
  threeDimensional,
10148
10226
  ref: pickerRef
10149
10227
  }
@@ -12947,124 +13025,111 @@ var __publicField = (obj, key, value) => {
12947
13025
  Switch.defaultProps = defaultProps$I;
12948
13026
  Switch.displayName = "NutSwitch";
12949
13027
  const defaultProps$H = {
13028
+ ...ComponentDefaults,
12950
13029
  defaultValue: "",
12951
- textAlign: "left",
12952
- limitshow: false,
12953
- maxlength: "",
12954
- rows: "",
13030
+ showCount: false,
13031
+ maxLength: 140,
12955
13032
  placeholder: "",
12956
- readonly: false,
13033
+ readOnly: false,
12957
13034
  disabled: false,
12958
- autosize: false
13035
+ autoSize: false
12959
13036
  };
12960
13037
  const TextArea = (props) => {
12961
13038
  const { locale } = useConfig$1();
12962
13039
  const {
12963
13040
  className,
13041
+ value,
12964
13042
  defaultValue,
12965
- textAlign,
12966
- limitshow,
12967
- maxlength,
13043
+ showCount,
13044
+ maxLength,
12968
13045
  rows,
12969
13046
  placeholder,
12970
- readonly,
13047
+ readOnly,
12971
13048
  disabled,
12972
- autosize,
13049
+ autoSize,
12973
13050
  style,
12974
13051
  onChange,
12975
13052
  onBlur,
12976
- onFocus
13053
+ onFocus,
13054
+ ...rest
12977
13055
  } = { ...defaultProps$H, ...props };
12978
- const textareaBem = cn("textarea");
12979
- const [inputValue, SetInputValue] = React.useState("");
12980
- const compositingRef = React.useRef(false);
12981
- const [, updateState] = React.useState({});
12982
- const forceUpdate = React.useCallback(() => updateState({}), []);
12983
- React.useEffect(() => {
12984
- let initValue = defaultValue;
12985
- if (initValue && maxlength && [...initValue].length > Number(maxlength)) {
12986
- initValue = initValue.substring(0, Number(maxlength));
13056
+ const classPrefix2 = "nut-textarea";
13057
+ const compositionRef = React.useRef(false);
13058
+ const format = (value2) => {
13059
+ if (maxLength !== void 0 && value2.length > maxLength) {
13060
+ return value2.substring(0, maxLength);
12987
13061
  }
12988
- SetInputValue(initValue);
12989
- }, [defaultValue]);
12990
- const textChange = (event) => {
12991
- if (disabled)
12992
- return;
12993
- if (readonly)
12994
- return;
12995
- const text = event.detail ? event.detail : event.target;
12996
- if (maxlength && [...text.value].length > Number(maxlength) && !compositingRef.current) {
12997
- text.value = text.value.substring(0, Number(maxlength));
12998
- }
12999
- if (text.value === inputValue) {
13000
- forceUpdate();
13062
+ return value2;
13063
+ };
13064
+ const [inputValue, setInputValue] = usePropsValue({
13065
+ value,
13066
+ defaultValue,
13067
+ finalValue: format(defaultValue),
13068
+ onChange
13069
+ });
13070
+ const handleChange = (event) => {
13071
+ var _a;
13072
+ const text = (_a = event == null ? void 0 : event.detail) == null ? void 0 : _a.value;
13073
+ if (text) {
13074
+ const value2 = compositionRef.current ? text : format(text);
13075
+ setInputValue(value2);
13001
13076
  } else {
13002
- SetInputValue(text.value);
13077
+ setInputValue("");
13003
13078
  }
13004
- onChange && onChange(text.value, event);
13005
13079
  };
13006
- const textFocus = (event) => {
13080
+ const handleFocus = (event) => {
13007
13081
  if (disabled)
13008
13082
  return;
13009
- if (readonly)
13083
+ if (readOnly)
13010
13084
  return;
13011
13085
  onFocus && onFocus(event);
13012
13086
  };
13013
- const textBlur = (event) => {
13087
+ const handleBlur = (event) => {
13014
13088
  if (disabled)
13015
13089
  return;
13016
- if (readonly)
13090
+ if (readOnly)
13017
13091
  return;
13018
- const text = event.detail ? event.detail : event.target;
13019
- onChange && onChange(text.value, event);
13020
13092
  onBlur && onBlur(event);
13021
13093
  };
13022
- const startComposing = () => {
13023
- compositingRef.current = true;
13024
- };
13025
- const endComposing = () => {
13026
- compositingRef.current = false;
13027
- };
13028
13094
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
13029
13095
  "div",
13030
13096
  {
13031
- className: `${textareaBem()} ${disabled ? textareaBem("disabled") : ""} ${className || ""}`,
13097
+ className: classNames(classPrefix2, className, {
13098
+ [`${classPrefix2}__disabled`]: disabled
13099
+ }),
13032
13100
  children: [
13033
13101
  /* @__PURE__ */ jsxRuntimeExports.jsx(
13034
- "textarea",
13102
+ components.Textarea,
13035
13103
  {
13036
- className: textareaBem("textarea"),
13037
- style: {
13038
- textAlign,
13039
- resize: `${autosize ? "vertical" : "none"}`,
13040
- ...style
13104
+ nativeProps: {
13105
+ style,
13106
+ readOnly,
13107
+ rows,
13108
+ onCompositionStart: () => {
13109
+ compositionRef.current = true;
13110
+ },
13111
+ onCompositionEnd: () => {
13112
+ compositionRef.current = false;
13113
+ }
13041
13114
  },
13042
- readOnly: disabled || readonly,
13115
+ className: `${classPrefix2}__textarea`,
13116
+ style: Taro.getEnv() === "WEB" ? void 0 : style,
13117
+ disabled: Taro.getEnv() === "WEB" ? disabled : disabled || readOnly,
13043
13118
  value: inputValue,
13044
- onInput: (e) => {
13045
- textChange(e);
13046
- },
13047
- onChange: (e) => {
13048
- textChange(e);
13049
- },
13050
- onBlur: (e) => {
13051
- textBlur(e);
13052
- },
13053
- onFocus: (e) => {
13054
- textFocus(e);
13055
- },
13056
- onCompositionEnd: (e) => endComposing(),
13057
- onCompositionStart: (e) => startComposing(),
13058
- rows,
13059
- maxLength: maxlength < 0 ? 0 : maxlength,
13060
- placeholder: placeholder || locale.placeholder
13119
+ onInput: (e) => handleChange(e),
13120
+ onBlur: (e) => handleBlur(e),
13121
+ onFocus: (e) => handleFocus(e),
13122
+ autoHeight: autoSize,
13123
+ maxlength: maxLength,
13124
+ placeholder: placeholder || locale.placeholder,
13125
+ ...rest
13061
13126
  }
13062
13127
  ),
13063
- limitshow ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: textareaBem("limit"), children: [
13064
- [...inputValue].length,
13128
+ showCount && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `${classPrefix2}__limit`, children: [
13129
+ inputValue.length,
13065
13130
  "/",
13066
- maxlength < 0 ? 0 : maxlength
13067
- ] }) : null
13131
+ maxLength < 0 ? 0 : maxLength
13132
+ ] })
13068
13133
  ]
13069
13134
  }
13070
13135
  );
@@ -22639,13 +22704,11 @@ This message will only show in development mode. It won't appear in production.
22639
22704
  Steps.displayName = "NutSteps";
22640
22705
  const defaultProps$9 = {
22641
22706
  ...ComponentDefaults,
22642
- className: "",
22643
- style: {},
22644
22707
  columns: [],
22645
22708
  data: [],
22646
22709
  bordered: true,
22647
22710
  striped: false,
22648
- noData: "无数据",
22711
+ noData: "",
22649
22712
  sorterIcon: null,
22650
22713
  showHeader: true
22651
22714
  };
@@ -22663,8 +22726,8 @@ This message will only show in development mode. It won't appear in production.
22663
22726
  striped,
22664
22727
  noData,
22665
22728
  sorterIcon,
22666
- onSorter,
22667
22729
  showHeader,
22730
+ onSort,
22668
22731
  ...rest
22669
22732
  } = {
22670
22733
  ...defaultProps$9,
@@ -22676,12 +22739,13 @@ This message will only show in development mode. It won't appear in production.
22676
22739
  setCurData(data);
22677
22740
  }
22678
22741
  }, [data]);
22679
- const b2 = cn("table");
22680
- const classes = classNames({});
22681
- const cls = classNames(b2(), classes, className);
22742
+ const classPrefix2 = "nut-table";
22743
+ const headerClassPrefix = `${classPrefix2}__main__head__tr`;
22744
+ const bodyClassPrefix = `${classPrefix2}__main__body__tr`;
22745
+ const cls = classNames(classPrefix2, className);
22682
22746
  const handleSorterClick = (item) => {
22683
22747
  if (item.sorter) {
22684
- onSorter && onSorter(item, curData);
22748
+ onSort && onSort(item, curData);
22685
22749
  if (typeof item.sorter === "function") {
22686
22750
  setCurData(curData.sort(item.sorter));
22687
22751
  } else {
@@ -22691,8 +22755,8 @@ This message will only show in development mode. It won't appear in production.
22691
22755
  };
22692
22756
  const cellClasses = (item) => {
22693
22757
  return {
22694
- "nut-table__main__head__tr--border": props.bordered,
22695
- [`nut-table__main__head__tr--align${item.align ? item.align : ""}`]: true
22758
+ [`${headerClassPrefix}--border`]: props.bordered,
22759
+ [`${headerClassPrefix}--align${item.align ? item.align : ""}`]: true
22696
22760
  };
22697
22761
  };
22698
22762
  const getColumnItem = (value) => {
@@ -22703,10 +22767,7 @@ This message will only show in development mode. It won't appear in production.
22703
22767
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
22704
22768
  "span",
22705
22769
  {
22706
- className: classNames(
22707
- "nut-table__main__head__tr__th",
22708
- cellClasses(item)
22709
- ),
22770
+ className: classNames(`${headerClassPrefix}__th`, cellClasses(item)),
22710
22771
  onClick: () => handleSorterClick(item),
22711
22772
  children: [
22712
22773
  item.title,
@@ -22729,7 +22790,7 @@ This message will only show in development mode. It won't appear in production.
22729
22790
  "span",
22730
22791
  {
22731
22792
  className: classNames(
22732
- "nut-table__main__body__tr__td",
22793
+ `${bodyClassPrefix}__td`,
22733
22794
  cellClasses(getColumnItem(value))
22734
22795
  ),
22735
22796
  children: typeof item[value] === "function" || typeof render === "function" ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: render ? render(item) : item[value](item) }) : item[value]
@@ -22740,24 +22801,23 @@ This message will only show in development mode. It won't appear in production.
22740
22801
  };
22741
22802
  const renderBoyTrs = () => {
22742
22803
  return curData.map((item, index) => {
22743
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-table__main__body__tr", children: renderBodyTds(item) }, index);
22804
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: bodyClassPrefix, children: renderBodyTds(item) }, index);
22744
22805
  });
22745
22806
  };
22746
22807
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cls, style, ...rest, children: [
22747
22808
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
22748
22809
  "div",
22749
22810
  {
22750
- className: classNames("nut-table__main", {
22751
- "nut-table__main--striped": striped
22811
+ className: classNames(`${classPrefix2}__main`, {
22812
+ [`${classPrefix2}__main--striped`]: striped
22752
22813
  }),
22753
22814
  children: [
22754
- showHeader && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-table__main__head", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-table__main__head__tr", children: renderHeadCells() }) }),
22755
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-table__main__body", children: renderBoyTrs() })
22815
+ showHeader && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__main__head`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: headerClassPrefix, children: renderHeadCells() }) }),
22816
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__main__body`, children: renderBoyTrs() })
22756
22817
  ]
22757
22818
  }
22758
22819
  ),
22759
- summary && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-table__summary", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "nut-table__summary__text", children: summary }) }),
22760
- curData.length === 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-table__nodata", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-table__nodata", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-table__nodata__text", children: noData }) }) })
22820
+ (summary || curData.length === 0) && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__summary`, children: summary || noData })
22761
22821
  ] });
22762
22822
  };
22763
22823
  Table.defaultProps = defaultProps$9;