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

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 +14 -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-a8d2148e.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-56e46dd3.js +137 -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 +505 -447
  208. package/dist/nutui.react.umd.js +504 -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.6 Fri May 12 2023 15:11:28 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,16 @@ 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
+ setValue(current);
6838
+ }, [children]);
6829
6839
  const classes = classNames(
6830
6840
  classPrefix$a,
6831
6841
  `${classPrefix$a}--${direction}`,
@@ -6938,7 +6948,7 @@ var __publicField = (obj, key, value) => {
6938
6948
  }) }) })
6939
6949
  ] });
6940
6950
  };
6941
- Tabs.defaultProps = defaultProps$16;
6951
+ Tabs.defaultProps = defaultProps$17;
6942
6952
  Tabs.displayName = "NutTabs";
6943
6953
  Tabs.TabPane = TabPane;
6944
6954
  var classnameExports = {};
@@ -7073,7 +7083,7 @@ var __publicField = (obj, key, value) => {
7073
7083
  const useConfig = () => {
7074
7084
  return React.useContext(ConfigContext) ?? getDefaultConfig();
7075
7085
  };
7076
- const defaultProps$15 = {
7086
+ const defaultProps$16 = {
7077
7087
  type: "custom",
7078
7088
  existAddress: [],
7079
7089
  defaultIcon: null,
@@ -7095,7 +7105,7 @@ var __publicField = (obj, key, value) => {
7095
7105
  onClose,
7096
7106
  onSwitchModule,
7097
7107
  ...rest
7098
- } = { ...defaultProps$15, ...props };
7108
+ } = { ...defaultProps$16, ...props };
7099
7109
  const b2 = cn("address");
7100
7110
  const selectedExist = (item) => {
7101
7111
  const copyExistAdd = existAddress;
@@ -7137,7 +7147,7 @@ var __publicField = (obj, key, value) => {
7137
7147
  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
7148
  ] });
7139
7149
  };
7140
- const defaultProps$14 = {
7150
+ const defaultProps$15 = {
7141
7151
  modelValue: [],
7142
7152
  type: "custom",
7143
7153
  province: [],
@@ -7162,7 +7172,7 @@ var __publicField = (obj, key, value) => {
7162
7172
  onClose,
7163
7173
  ...rest
7164
7174
  } = {
7165
- ...defaultProps$14,
7175
+ ...defaultProps$15,
7166
7176
  ...props
7167
7177
  };
7168
7178
  const b2 = cn("address");
@@ -7326,28 +7336,28 @@ var __publicField = (obj, key, value) => {
7326
7336
  nextAreaList(item);
7327
7337
  };
7328
7338
  React.useEffect(() => {
7329
- const { province: province2 } = { ...defaultProps$14, ...props };
7339
+ const { province: province2 } = { ...defaultProps$15, ...props };
7330
7340
  setRegionList({
7331
7341
  ...regionList,
7332
7342
  province: isCustom2() ? transformData(province2) : province2
7333
7343
  });
7334
7344
  }, [province]);
7335
7345
  React.useEffect(() => {
7336
- const { city: city2 } = { ...defaultProps$14, ...props };
7346
+ const { city: city2 } = { ...defaultProps$15, ...props };
7337
7347
  setRegionList({
7338
7348
  ...regionList,
7339
7349
  city: isCustom2() ? transformData(city2) : city2
7340
7350
  });
7341
7351
  }, [city]);
7342
7352
  React.useEffect(() => {
7343
- const { country: country2 } = { ...defaultProps$14, ...props };
7353
+ const { country: country2 } = { ...defaultProps$15, ...props };
7344
7354
  setRegionList({
7345
7355
  ...regionList,
7346
7356
  country: isCustom2() ? transformData(country2) : country2
7347
7357
  });
7348
7358
  }, [country]);
7349
7359
  React.useEffect(() => {
7350
- const { town: town2 } = { ...defaultProps$14, ...props };
7360
+ const { town: town2 } = { ...defaultProps$15, ...props };
7351
7361
  setRegionList({
7352
7362
  ...regionList,
7353
7363
  town: isCustom2() ? transformData(town2) : town2
@@ -7420,7 +7430,7 @@ var __publicField = (obj, key, value) => {
7420
7430
  ) })
7421
7431
  ] });
7422
7432
  };
7423
- const defaultProps$13 = {
7433
+ const defaultProps$14 = {
7424
7434
  ...ComponentDefaults,
7425
7435
  modelValue: false,
7426
7436
  modelSelect: [],
@@ -7471,7 +7481,7 @@ var __publicField = (obj, key, value) => {
7471
7481
  className,
7472
7482
  ...rest
7473
7483
  } = {
7474
- ...defaultProps$13,
7484
+ ...defaultProps$14,
7475
7485
  ...props
7476
7486
  };
7477
7487
  const b2 = cn("address");
@@ -7629,7 +7639,7 @@ var __publicField = (obj, key, value) => {
7629
7639
  }
7630
7640
  ) });
7631
7641
  };
7632
- Address.defaultProps = defaultProps$13;
7642
+ Address.defaultProps = defaultProps$14;
7633
7643
  Address.displayName = "NutAddress";
7634
7644
  const Utils = {
7635
7645
  /**
@@ -7762,7 +7772,7 @@ var __publicField = (obj, key, value) => {
7762
7772
  }
7763
7773
  }
7764
7774
  const requestAniFrame$1 = requestAniFrame();
7765
- const defaultProps$12 = {
7775
+ const defaultProps$13 = {
7766
7776
  type: "one",
7767
7777
  isAutoBackFill: false,
7768
7778
  poppable: true,
@@ -7814,7 +7824,7 @@ var __publicField = (obj, key, value) => {
7814
7824
  onUpdate,
7815
7825
  onSelected,
7816
7826
  onYearMonthChange
7817
- } = { ...defaultProps$12, ...props };
7827
+ } = { ...defaultProps$13, ...props };
7818
7828
  const weeks = locale.calendaritem.weekdays;
7819
7829
  const [yearMonthTitle, setYearMonthTitle] = React.useState("");
7820
7830
  const [monthsData, setMonthsData] = React.useState([]);
@@ -8419,9 +8429,9 @@ var __publicField = (obj, key, value) => {
8419
8429
  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
8430
  ] }) });
8421
8431
  });
8422
- CalendarItem.defaultProps = defaultProps$12;
8432
+ CalendarItem.defaultProps = defaultProps$13;
8423
8433
  CalendarItem.displayName = "NutCalendarItem";
8424
- const defaultProps$11 = {
8434
+ const defaultProps$12 = {
8425
8435
  type: "one",
8426
8436
  isAutoBackFill: false,
8427
8437
  poppable: true,
@@ -8477,7 +8487,7 @@ var __publicField = (obj, key, value) => {
8477
8487
  onChoose,
8478
8488
  onSelected,
8479
8489
  onYearMonthChange
8480
- } = { ...defaultProps$11, ...props };
8490
+ } = { ...defaultProps$12, ...props };
8481
8491
  const calendarRef = React.useRef(null);
8482
8492
  const close = () => {
8483
8493
  onClose && onClose();
@@ -8547,9 +8557,9 @@ var __publicField = (obj, key, value) => {
8547
8557
  }
8548
8558
  ) : renderItem() });
8549
8559
  });
8550
- Calendar.defaultProps = defaultProps$11;
8560
+ Calendar.defaultProps = defaultProps$12;
8551
8561
  Calendar.displayName = "NutCalendar";
8552
- const defaultProps$10 = {
8562
+ const defaultProps$11 = {
8553
8563
  data: {
8554
8564
  text: "",
8555
8565
  value: "",
@@ -8560,32 +8570,37 @@ var __publicField = (obj, key, value) => {
8560
8570
  },
8561
8571
  activeColor: "",
8562
8572
  checked: false,
8563
- checkedIcon: "checklist",
8573
+ activeIcon: "checklist",
8564
8574
  chooseItem: () => {
8565
8575
  }
8566
8576
  };
8567
8577
  const InternalCascaderItem = (props, ref) => {
8568
- const { data, checked, checkedIcon, chooseItem, activeColor } = {
8569
- ...defaultProps$10,
8578
+ const { data, checked, activeIcon, chooseItem, activeColor } = {
8579
+ ...defaultProps$11,
8570
8580
  ...props
8571
8581
  };
8572
- const b2 = cn("cascader-item");
8582
+ const classPrefix2 = "nut-cascader-item";
8573
8583
  const classes = classNames(
8574
8584
  {
8575
8585
  active: checked,
8576
8586
  disabled: data.disabled
8577
8587
  },
8578
- b2("")
8588
+ classPrefix2
8579
8589
  );
8580
8590
  const classesTitle = classNames({
8581
- [`${b2("")}__title`]: true
8591
+ [`${classPrefix2}__title`]: true
8582
8592
  });
8583
8593
  const renderIcon = () => {
8584
8594
  if (checked) {
8585
- if (React.isValidElement(checkedIcon)) {
8586
- return checkedIcon;
8595
+ if (React.isValidElement(activeIcon)) {
8596
+ return activeIcon;
8587
8597
  }
8588
- return /* @__PURE__ */ jsxRuntimeExports.jsx(a$q, { className: `${checked ? b2("icon-check") : ""}` });
8598
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
8599
+ a$q,
8600
+ {
8601
+ className: `${checked ? `${classPrefix2}__icon-check` : ""}`
8602
+ }
8603
+ );
8589
8604
  }
8590
8605
  return null;
8591
8606
  };
@@ -8605,7 +8620,7 @@ var __publicField = (obj, key, value) => {
8605
8620
  );
8606
8621
  };
8607
8622
  const CascaderItem = React.forwardRef(InternalCascaderItem);
8608
- CascaderItem.defaultProps = defaultProps$10;
8623
+ CascaderItem.defaultProps = defaultProps$11;
8609
8624
  CascaderItem.displayName = "NutCascaderItem";
8610
8625
  const formatTree = (tree, parent, config2) => tree.map((node) => {
8611
8626
  const {
@@ -8743,26 +8758,22 @@ var __publicField = (obj, key, value) => {
8743
8758
  }
8744
8759
  }
8745
8760
  const Tree$1 = Tree;
8746
- const defaultProps$$ = {
8747
- className: "",
8748
- style: {},
8761
+ const defaultProps$10 = {
8762
+ ...ComponentDefaults,
8749
8763
  activeColor: "",
8750
- checkedIcon: "checklist",
8751
- tabsColor: "",
8752
- poppable: true,
8764
+ activeIcon: "checklist",
8765
+ popup: true,
8753
8766
  visible: false,
8754
8767
  options: [],
8755
8768
  value: [],
8756
8769
  title: "",
8757
- textKey: "text",
8758
- valueKey: "value",
8759
- childrenKey: "children",
8760
- convertConfig: {},
8770
+ optionKey: { textKey: "text", valueKey: "value", childrenKey: "children" },
8771
+ format: {},
8761
8772
  closeable: false,
8762
8773
  closeIconPosition: "top-right",
8763
8774
  closeIcon: "close",
8764
8775
  lazy: false,
8765
- lazyLoad: () => {
8776
+ onLoad: () => {
8766
8777
  },
8767
8778
  onClose: () => {
8768
8779
  },
@@ -8776,28 +8787,25 @@ var __publicField = (obj, key, value) => {
8776
8787
  const {
8777
8788
  className,
8778
8789
  style,
8779
- tabsColor,
8780
- poppable,
8790
+ popup,
8781
8791
  visible,
8782
8792
  options,
8783
8793
  value,
8784
8794
  title,
8785
- textKey,
8786
- valueKey,
8787
- childrenKey,
8788
- convertConfig: convertConfig2,
8795
+ optionKey: optionKey2,
8796
+ format: format2,
8789
8797
  closeable,
8790
8798
  closeIconPosition,
8791
8799
  closeIcon,
8792
8800
  lazy,
8793
- lazyLoad,
8801
+ onLoad,
8794
8802
  onClose,
8795
8803
  onChange,
8796
8804
  onPathChange
8797
- } = { ...defaultProps$$, ...props };
8805
+ } = { ...defaultProps$10, ...props };
8798
8806
  const [tabvalue, setTabvalue] = React.useState("c1");
8799
8807
  const [optionsData, setOptionsData] = React.useState([]);
8800
- const isLazy = () => state.configs.lazy && Boolean(state.configs.lazyLoad);
8808
+ const isLazy = () => state.configs.lazy && Boolean(state.configs.onLoad);
8801
8809
  const [state] = React.useState({
8802
8810
  optionsData: [],
8803
8811
  panes: [
@@ -8815,44 +8823,38 @@ var __publicField = (obj, key, value) => {
8815
8823
  currentProcessNode: [],
8816
8824
  configs: {
8817
8825
  lazy,
8818
- lazyLoad,
8819
- valueKey,
8820
- textKey,
8821
- childrenKey,
8822
- convertConfig: convertConfig2
8826
+ onLoad,
8827
+ optionKey: optionKey2,
8828
+ format: format2
8823
8829
  },
8824
8830
  lazyLoadMap: /* @__PURE__ */ new Map()
8825
8831
  });
8826
- const b2 = cn("cascader");
8827
- const classes = classNames(b2(""));
8832
+ const classPrefix2 = classNames(`nut-cascader`);
8828
8833
  const classesPane = classNames({
8829
- [`${b2("")}-pane`]: true
8834
+ [`${classPrefix2}-pane`]: true
8830
8835
  });
8831
8836
  React.useEffect(() => {
8832
8837
  initData();
8833
- }, []);
8838
+ }, [options]);
8834
8839
  React.useEffect(() => {
8835
8840
  if (value !== state.innerValue) {
8836
8841
  state.innerValue = value;
8837
8842
  }
8838
8843
  }, [value]);
8839
- React.useEffect(() => {
8840
- initData();
8841
- }, [options]);
8842
8844
  const initData = async () => {
8843
8845
  state.lazyLoadMap.clear();
8844
- if (convertConfig2 && Object.keys(convertConfig2).length > 0) {
8846
+ if (format2 && Object.keys(format2).length > 0) {
8845
8847
  state.optionsData = convertListToOptions(
8846
8848
  options,
8847
- convertConfig2
8849
+ format2
8848
8850
  );
8849
8851
  } else {
8850
8852
  state.optionsData = options;
8851
8853
  }
8852
8854
  state.tree = new Tree$1(state.optionsData, {
8853
- value: state.configs.valueKey,
8854
- text: state.configs.textKey,
8855
- children: state.configs.childrenKey
8855
+ value: state.configs.optionKey.valueKey,
8856
+ text: state.configs.optionKey.textKey,
8857
+ children: state.configs.optionKey.childrenKey
8856
8858
  });
8857
8859
  if (isLazy() && !state.tree.nodes.length) {
8858
8860
  await invokeLazyLoad({
@@ -8918,7 +8920,7 @@ var __publicField = (obj, key, value) => {
8918
8920
  if (!node) {
8919
8921
  return;
8920
8922
  }
8921
- if (!state.configs.lazyLoad) {
8923
+ if (!state.configs.onLoad) {
8922
8924
  node.leaf = true;
8923
8925
  return;
8924
8926
  }
@@ -8931,7 +8933,7 @@ var __publicField = (obj, key, value) => {
8931
8933
  if (!lazyLoadPromise) {
8932
8934
  lazyLoadPromise = new Promise((resolve) => {
8933
8935
  var _a, _b;
8934
- (_b = (_a = state.configs).lazyLoad) == null ? void 0 : _b.call(_a, node, resolve);
8936
+ (_b = (_a = state.configs).onLoad) == null ? void 0 : _b.call(_a, node, resolve);
8935
8937
  });
8936
8938
  state.lazyLoadMap.set(node, lazyLoadPromise);
8937
8939
  }
@@ -8978,8 +8980,8 @@ var __publicField = (obj, key, value) => {
8978
8980
  selectedNode: null,
8979
8981
  paneKey: `c${state.tabsCursor + 1}`
8980
8982
  });
8981
- setTabvalue(`c${state.tabsCursor + 1}`);
8982
8983
  setOptionsData(state.panes);
8984
+ setTabvalue(`c${state.tabsCursor + 1}`);
8983
8985
  if (!type) {
8984
8986
  const pathNodes = state.panes.map((item) => item.selectedNode);
8985
8987
  const optionParams = pathNodes.map((item) => item == null ? void 0 : item.value);
@@ -8999,8 +9001,8 @@ var __publicField = (obj, key, value) => {
8999
9001
  setOptionsData(state.panes);
9000
9002
  };
9001
9003
  const renderItem = () => {
9002
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `${classes} ${className}`, style, children: [
9003
- poppable && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: b2("title"), children: title }),
9004
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `${classPrefix2} ${className}`, style, children: [
9005
+ popup && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-cascader__title", children: title }),
9004
9006
  /* @__PURE__ */ jsxRuntimeExports.jsx(
9005
9007
  Tabs,
9006
9008
  {
@@ -9015,27 +9017,21 @@ var __publicField = (obj, key, value) => {
9015
9017
  setTabvalue(pane.paneKey);
9016
9018
  state.tabsCursor = index;
9017
9019
  },
9018
- className: `nut-tabs__titles-item ${tabvalue === pane.paneKey ? "active" : ""}`,
9020
+ className: `nut-tabs__titles-item ${tabvalue === pane.paneKey ? "nut-tabs__titles-item--active" : ""}`,
9019
9021
  children: [
9020
9022
  /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "nut-tabs__titles-item__text", children: [
9021
9023
  !state.initLoading && state.panes.length && ((_a = pane == null ? void 0 : pane.selectedNode) == null ? void 0 : _a.text),
9022
9024
  !state.initLoading && state.panes.length && !((_b = pane == null ? void 0 : pane.selectedNode) == null ? void 0 : _b.text) && "请选择",
9023
9025
  !(!state.initLoading && state.panes.length) && "Loading..."
9024
9026
  ] }),
9025
- /* @__PURE__ */ jsxRuntimeExports.jsx(
9026
- "span",
9027
- {
9028
- className: "nut-tabs__titles-item__line",
9029
- style: { background: tabsColor }
9030
- }
9031
- )
9027
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "nut-tabs__titles-item__line" })
9032
9028
  ]
9033
9029
  },
9034
9030
  pane.paneKey
9035
9031
  );
9036
9032
  });
9037
9033
  },
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) => {
9034
+ 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
9035
  var _a;
9040
9036
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
9041
9037
  CascaderItem,
@@ -9047,18 +9043,18 @@ var __publicField = (obj, key, value) => {
9047
9043
  },
9048
9044
  index
9049
9045
  );
9050
- }) }) }, pane.paneKey)) : /* @__PURE__ */ jsxRuntimeExports.jsx(TabPane, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: classesPane }) })
9046
+ }) }) }, pane.paneKey)) : /* @__PURE__ */ jsxRuntimeExports.jsx(Tabs.TabPane, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: classesPane }) })
9051
9047
  }
9052
9048
  )
9053
9049
  ] });
9054
9050
  };
9055
- return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: poppable ? /* @__PURE__ */ jsxRuntimeExports.jsx(
9051
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: popup ? /* @__PURE__ */ jsxRuntimeExports.jsx(
9056
9052
  Popup,
9057
9053
  {
9058
- className: "cascadar-popup",
9059
9054
  visible,
9060
9055
  position: "bottom",
9061
9056
  round: true,
9057
+ closeIcon,
9062
9058
  closeable,
9063
9059
  closeIconPosition,
9064
9060
  onClickOverlay: closePopup,
@@ -9068,11 +9064,11 @@ var __publicField = (obj, key, value) => {
9068
9064
  ) : renderItem() });
9069
9065
  };
9070
9066
  const Cascader = React.forwardRef(InternalCascader);
9071
- Cascader.defaultProps = defaultProps$$;
9067
+ Cascader.defaultProps = defaultProps$10;
9072
9068
  Cascader.displayName = "NutCascader";
9073
9069
  const CheckboxGroupContext = React.createContext(null);
9074
9070
  const Context = CheckboxGroupContext;
9075
- const defaultProps$_ = {
9071
+ const defaultProps$$ = {
9076
9072
  max: void 0,
9077
9073
  labelPosition: "right",
9078
9074
  direction: "vertical",
@@ -9083,7 +9079,7 @@ var __publicField = (obj, key, value) => {
9083
9079
  const classPrefix$9 = "nut-checkboxgroup";
9084
9080
  const CheckboxGroup = React.forwardRef(
9085
9081
  (props, ref) => {
9086
- const { children } = { ...defaultProps$_, ...props };
9082
+ const { children } = { ...defaultProps$$, ...props };
9087
9083
  const {
9088
9084
  className,
9089
9085
  disabled,
@@ -9173,9 +9169,9 @@ var __publicField = (obj, key, value) => {
9173
9169
  );
9174
9170
  }
9175
9171
  );
9176
- CheckboxGroup.defaultProps = defaultProps$_;
9172
+ CheckboxGroup.defaultProps = defaultProps$$;
9177
9173
  CheckboxGroup.displayName = "NutCheckboxGroup";
9178
- const defaultProps$Z = {
9174
+ const defaultProps$_ = {
9179
9175
  ...ComponentDefaults,
9180
9176
  disabled: false,
9181
9177
  labelPosition: "right",
@@ -9188,7 +9184,7 @@ var __publicField = (obj, key, value) => {
9188
9184
  const classPrefix$8 = "nut-checkbox";
9189
9185
  const Checkbox = (props) => {
9190
9186
  const { children } = {
9191
- ...defaultProps$Z,
9187
+ ...defaultProps$_,
9192
9188
  ...props
9193
9189
  };
9194
9190
  const {
@@ -9293,7 +9289,7 @@ var __publicField = (obj, key, value) => {
9293
9289
  }
9294
9290
  );
9295
9291
  };
9296
- Checkbox.defaultProps = defaultProps$Z;
9292
+ Checkbox.defaultProps = defaultProps$_;
9297
9293
  Checkbox.displayName = "NutCheckBox";
9298
9294
  Checkbox.Group = CheckboxGroup;
9299
9295
  const MIN_DISTANCE = 10;
@@ -9374,13 +9370,13 @@ var __publicField = (obj, key, value) => {
9374
9370
  console.log(e);
9375
9371
  }
9376
9372
  }
9377
- const InternalPickerSlot = (props, ref) => {
9373
+ const InternalPickerPanel = (props, ref) => {
9378
9374
  const {
9379
9375
  keyIndex = 0,
9380
9376
  defaultValue,
9381
- listData = [],
9377
+ options = [],
9382
9378
  threeDimensional = true,
9383
- swipeDuration = 1e3,
9379
+ duration = 1e3,
9384
9380
  itemShow = false,
9385
9381
  chooseItem
9386
9382
  } = props;
@@ -9395,9 +9391,9 @@ var __publicField = (obj, key, value) => {
9395
9391
  const rotation = 20;
9396
9392
  const moving = React.useRef(false);
9397
9393
  let timer;
9398
- const listbox = React.useRef(null);
9394
+ const listRef = React.useRef(null);
9399
9395
  const rollerRef = React.useRef(null);
9400
- const pickerSlotRef = React.useRef(null);
9396
+ const PickerPanelRef = React.useRef(null);
9401
9397
  const [startTime, setStartTime] = React.useState(0);
9402
9398
  const [startY, setStartY] = React.useState(0);
9403
9399
  const transformY = React.useRef(0);
@@ -9423,8 +9419,8 @@ var __publicField = (obj, key, value) => {
9423
9419
  if (updateMove > 0) {
9424
9420
  updateMove = 0;
9425
9421
  }
9426
- if (updateMove < -(listData.length - 1) * lineSpacing.current) {
9427
- updateMove = -(listData.length - 1) * lineSpacing.current;
9422
+ if (updateMove < -(options.length - 1) * lineSpacing.current) {
9423
+ updateMove = -(options.length - 1) * lineSpacing.current;
9428
9424
  }
9429
9425
  const endMove = Math.round(updateMove / lineSpacing.current) * lineSpacing.current;
9430
9426
  const deg = `${(Math.abs(Math.round(endMove / lineSpacing.current)) + 1) * rotation}deg`;
@@ -9433,7 +9429,7 @@ var __publicField = (obj, key, value) => {
9433
9429
  } else {
9434
9430
  let deg = 0;
9435
9431
  const currentDeg = (-updateMove / lineSpacing.current + 1) * rotation;
9436
- const maxDeg = (listData.length + 1) * rotation;
9432
+ const maxDeg = (options.length + 1) * rotation;
9437
9433
  const minDeg = 0;
9438
9434
  deg = Math.min(Math.max(currentDeg, minDeg), maxDeg);
9439
9435
  if (minDeg < deg && deg < maxDeg) {
@@ -9443,7 +9439,7 @@ var __publicField = (obj, key, value) => {
9443
9439
  }
9444
9440
  };
9445
9441
  const setChooseValue = (move) => {
9446
- chooseItem && chooseItem(listData == null ? void 0 : listData[Math.round(-move / lineSpacing.current)], keyIndex);
9442
+ chooseItem && chooseItem(options == null ? void 0 : options[Math.round(-move / lineSpacing.current)], keyIndex);
9447
9443
  };
9448
9444
  const touchStart = (event) => {
9449
9445
  touch.start(event);
@@ -9467,7 +9463,7 @@ var __publicField = (obj, key, value) => {
9467
9463
  const moveTime = Date.now() - startTime;
9468
9464
  if (moveTime <= INERTIA_TIME && Math.abs(move) > INERTIA_DISTANCE) {
9469
9465
  const distance = momentum(move, moveTime);
9470
- setMove(distance, "end", +swipeDuration);
9466
+ setMove(distance, "end", +duration);
9471
9467
  } else {
9472
9468
  setMove(move, "end");
9473
9469
  }
@@ -9475,9 +9471,9 @@ var __publicField = (obj, key, value) => {
9475
9471
  touch.reset();
9476
9472
  }, 0);
9477
9473
  };
9478
- const momentum = (distance, duration) => {
9474
+ const momentum = (distance, duration2) => {
9479
9475
  let nDistance = distance;
9480
- const speed = Math.abs(nDistance / duration);
9476
+ const speed = Math.abs(nDistance / duration2);
9481
9477
  nDistance = speed / 3e-3 * (nDistance < 0 ? -1 : 1);
9482
9478
  return nDistance;
9483
9479
  };
@@ -9485,7 +9481,7 @@ var __publicField = (obj, key, value) => {
9485
9481
  const value = val || defaultValue;
9486
9482
  let index = -1;
9487
9483
  if (value) {
9488
- listData.some((item, idx) => {
9484
+ options.some((item, idx) => {
9489
9485
  if (item.value === value) {
9490
9486
  index = idx;
9491
9487
  return true;
@@ -9493,7 +9489,7 @@ var __publicField = (obj, key, value) => {
9493
9489
  return false;
9494
9490
  });
9495
9491
  } else {
9496
- listData.forEach((item, i) => {
9492
+ options.forEach((item, i) => {
9497
9493
  if (item.value === defaultValue) {
9498
9494
  index = i;
9499
9495
  }
@@ -9518,7 +9514,7 @@ var __publicField = (obj, key, value) => {
9518
9514
  }
9519
9515
  };
9520
9516
  const getReference = async () => {
9521
- const refe = await getRectByTaro(listbox == null ? void 0 : listbox.current);
9517
+ const refe = await getRectByTaro(listRef == null ? void 0 : listRef.current);
9522
9518
  lineSpacing.current = refe.height ? refe.height : 36;
9523
9519
  modifyStatus(true);
9524
9520
  };
@@ -9541,7 +9537,7 @@ var __publicField = (obj, key, value) => {
9541
9537
  return () => {
9542
9538
  clearTimeout(timer);
9543
9539
  };
9544
- }, [listData]);
9540
+ }, [options]);
9545
9541
  React.useEffect(() => {
9546
9542
  if (itemShow) {
9547
9543
  setTimeout(() => {
@@ -9557,7 +9553,7 @@ var __publicField = (obj, key, value) => {
9557
9553
  "div",
9558
9554
  {
9559
9555
  className: "nut-picker-list",
9560
- ref: pickerSlotRef,
9556
+ ref: PickerPanelRef,
9561
9557
  onTouchStart: touchStart,
9562
9558
  onTouchMove: touchMove,
9563
9559
  onTouchEnd: touchEnd,
@@ -9570,7 +9566,7 @@ var __publicField = (obj, key, value) => {
9570
9566
  style: threeDimensional ? touchRollerStyle() : touchTileStyle(),
9571
9567
  onTransitionEnd: stopMomentum,
9572
9568
  children: [
9573
- threeDimensional && listData.map((item, index) => {
9569
+ threeDimensional && options.map((item, index) => {
9574
9570
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
9575
9571
  "div",
9576
9572
  {
@@ -9585,7 +9581,7 @@ var __publicField = (obj, key, value) => {
9585
9581
  item.value ? item.value : index
9586
9582
  );
9587
9583
  }),
9588
- !threeDimensional && listData.map((item, index) => {
9584
+ !threeDimensional && options.map((item, index) => {
9589
9585
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
9590
9586
  "div",
9591
9587
  {
@@ -9603,13 +9599,13 @@ var __publicField = (obj, key, value) => {
9603
9599
  }
9604
9600
  ),
9605
9601
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-picker-mask" }),
9606
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-picker-indicator", ref: listbox })
9602
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-picker-indicator", ref: listRef })
9607
9603
  ]
9608
9604
  }
9609
9605
  );
9610
9606
  };
9611
- const PickerSlot = React.forwardRef(InternalPickerSlot);
9612
- const PickerSlot$1 = PickerSlot;
9607
+ const PickerPanel = React.forwardRef(InternalPickerPanel);
9608
+ const PickerPanel$1 = PickerPanel;
9613
9609
  function useRefs() {
9614
9610
  const refs = React.useRef([]);
9615
9611
  const setRefs = React.useCallback(
@@ -9624,181 +9620,247 @@ var __publicField = (obj, key, value) => {
9624
9620
  }, []);
9625
9621
  return [refs.current, setRefs, reset];
9626
9622
  }
9623
+ const defaultProps$Z = {
9624
+ ...ComponentDefaults,
9625
+ visible: false,
9626
+ title: "",
9627
+ options: [],
9628
+ value: [],
9629
+ defaultValue: [],
9630
+ threeDimensional: true,
9631
+ duration: 1e3
9632
+ };
9627
9633
  const InternalPicker = (props, ref) => {
9628
9634
  const { locale } = useConfig$1();
9629
9635
  const {
9630
9636
  visible,
9631
9637
  title,
9632
- listData = [],
9633
- defaultValueData,
9634
- onConfirm,
9635
- onClose,
9636
- onCloseUpdate,
9637
- onChange,
9638
+ options = [],
9639
+ defaultValue = [],
9638
9640
  className,
9639
9641
  style,
9640
9642
  threeDimensional,
9641
- swipeDuration,
9643
+ duration,
9644
+ onConfirm,
9645
+ onClose,
9646
+ afterClose,
9647
+ onChange,
9642
9648
  ...rest
9643
- } = props;
9644
- const [chooseValueData, setchooseValueData] = React.useState([]);
9645
- const [columnIndex, setcolumnIndex] = React.useState(0);
9649
+ } = { ...defaultProps$Z, ...props };
9650
+ const classPrefix2 = "nut-picker";
9651
+ const classes = classNames(classPrefix2, className);
9652
+ const [selectedValue, setSelectedValue] = usePropsValue({
9653
+ value: props.value,
9654
+ defaultValue: [...defaultValue],
9655
+ finalValue: [...defaultValue],
9656
+ onChange: (val) => {
9657
+ var _a;
9658
+ (_a = props.onConfirm) == null ? void 0 : _a.call(props, setSelectedOptions(), val);
9659
+ }
9660
+ });
9661
+ const [currentValue2, setCurrentValue] = React.useState([]);
9662
+ const [columnIndex, setColumnIndex] = React.useState(0);
9646
9663
  const pickerRef = React.useRef(null);
9647
9664
  const [refs, setRefs] = useRefs();
9648
9665
  const [columnsList, setColumnsList] = React.useState([]);
9649
- const b2 = cn("picker");
9650
9666
  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());
9667
+ const formatCascade = (columns, values) => {
9668
+ const formatted = [];
9669
+ let columnOptions = {
9670
+ text: "",
9671
+ value: "",
9672
+ children: columns
9673
+ };
9674
+ let columnIndex2 = 0;
9675
+ while (columnOptions && columnOptions.children) {
9676
+ const options2 = columnOptions.children;
9677
+ const value = values[columnIndex2];
9678
+ let index = options2.findIndex(
9679
+ (columnItem) => columnItem.value === value
9680
+ );
9681
+ if (index === -1)
9682
+ index = 0;
9683
+ columnOptions = columnOptions.children[index];
9684
+ columnIndex2++;
9685
+ formatted.push(options2);
9656
9686
  }
9657
- }, [defaultValueData]);
9658
- React.useEffect(() => {
9659
- onChange && onChange(columnIndex, chooseValueData, selectedOptions());
9660
- if (isConfirmEvent.current) {
9661
- isConfirmEvent.current = false;
9662
- onConfirm && onConfirm(chooseValueData, selectedOptions());
9687
+ return formatted;
9688
+ };
9689
+ const columnsType = () => {
9690
+ const firstColumn = options[0];
9691
+ if (firstColumn) {
9692
+ if (Array.isArray(firstColumn)) {
9693
+ return "multiple";
9694
+ }
9695
+ if ("children" in firstColumn) {
9696
+ return "cascade";
9697
+ }
9663
9698
  }
9664
- }, [chooseValueData]);
9665
- React.useEffect(() => {
9666
- init();
9667
- }, [listData]);
9668
- const closeActionSheet = () => {
9669
- onClose && onClose(chooseValueData, selectedOptions());
9670
- onCloseUpdate && onCloseUpdate(chooseValueData, selectedOptions(), pickerRef);
9699
+ return "single";
9671
9700
  };
9672
- const confirm = () => {
9673
- let movings = false;
9674
- refs.forEach((_ref) => {
9675
- if (_ref.moving)
9676
- movings = true;
9677
- _ref.stopMomentum();
9701
+ const normalListData = () => {
9702
+ const type = columnsType();
9703
+ switch (type) {
9704
+ case "multiple":
9705
+ return options;
9706
+ case "cascade":
9707
+ return formatCascade(options, selectedValue);
9708
+ default:
9709
+ return [options];
9710
+ }
9711
+ };
9712
+ const init = () => {
9713
+ const normalData = normalListData();
9714
+ setColumnsList(normalData);
9715
+ const data = [];
9716
+ normalData.length > 0 && normalData.map((item) => {
9717
+ item[0] && data.push(item[0].value);
9718
+ return item;
9678
9719
  });
9679
- if (movings) {
9680
- isConfirmEvent.current = true;
9681
- } else {
9682
- onConfirm && onConfirm(chooseValueData, selectedOptions());
9720
+ if (!defaultValue.length && selectedValue.length === 0) {
9721
+ setSelectedValue([...data]);
9683
9722
  }
9684
- onClose && onClose(chooseValueData, selectedOptions());
9685
- setTimeout(() => {
9686
- isConfirmEvent.current = false;
9687
- }, 0);
9688
9723
  };
9689
- const selectedOptions = () => {
9690
- const optins = [];
9691
- columnsList.map((column, index) => {
9692
- let currOptions = [];
9693
- currOptions = column.filter(
9694
- (item) => item.value === chooseValueData[index]
9724
+ React.useEffect(() => {
9725
+ if (!visible) {
9726
+ return;
9727
+ }
9728
+ init();
9729
+ }, [options, visible]);
9730
+ const setSelectedOptions = () => {
9731
+ const options2 = [];
9732
+ let currOptions = [];
9733
+ columnsList.forEach((columnOptions, index) => {
9734
+ currOptions = columnOptions.filter(
9735
+ (item) => item.value === selectedValue[index]
9695
9736
  );
9696
9737
  if (currOptions[0]) {
9697
- optins.push(currOptions[0]);
9738
+ options2.push(currOptions[0]);
9698
9739
  } else {
9699
- column[0] && optins.push(column[0]);
9740
+ columnOptions[0] && options2.push(columnOptions[0]);
9700
9741
  }
9701
- return column;
9702
9742
  });
9703
- return optins;
9743
+ return options2;
9744
+ };
9745
+ const defaultValuesConvert = () => {
9746
+ const defaultIndexs = [];
9747
+ if (selectedValue.length > 0) {
9748
+ selectedValue.forEach((value, index) => {
9749
+ var _a;
9750
+ for (let i = 0; i < ((_a = columnsList == null ? void 0 : columnsList[index]) == null ? void 0 : _a.length); i++) {
9751
+ if (columnsList[index][i].value === value) {
9752
+ defaultIndexs.push(i);
9753
+ break;
9754
+ }
9755
+ }
9756
+ });
9757
+ } else if (columnsList && columnsList.length > 0) {
9758
+ columnsList.forEach((item) => {
9759
+ defaultIndexs.push(0);
9760
+ item.length > 0 && selectedValue.push(item[0].value);
9761
+ });
9762
+ }
9763
+ return defaultIndexs;
9704
9764
  };
9705
- const chooseItem = (option, columnIndex2) => {
9706
- if (option && Object.keys(option).length) {
9707
- if (chooseValueData[columnIndex2] !== option.value) {
9765
+ React.useEffect(() => {
9766
+ if (!visible) {
9767
+ return;
9768
+ }
9769
+ Taro.getEnv() !== "WEB" && setCurrentValue(defaultValuesConvert());
9770
+ onChange && onChange(setSelectedOptions(), selectedValue, columnIndex);
9771
+ if (isConfirmEvent.current) {
9772
+ isConfirmEvent.current = false;
9773
+ onConfirm && onConfirm(setSelectedOptions(), selectedValue);
9774
+ }
9775
+ }, [selectedValue, columnsList, visible]);
9776
+ const chooseItem = (columnOptions, columnIndex2) => {
9777
+ var _a, _b;
9778
+ if (columnOptions && Object.keys(columnOptions).length) {
9779
+ if (selectedValue[columnIndex2] !== columnOptions.value) {
9708
9780
  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;
9781
+ selectedValue[columnIndex2] = columnOptions.value || "";
9782
+ setSelectedValue([...selectedValue]);
9783
+ while ((_a = columnOptions == null ? void 0 : columnOptions.children) == null ? void 0 : _a[0]) {
9784
+ selectedValue[columnIndex2 + 1] = columnOptions.children[0].value;
9785
+ setSelectedValue([...selectedValue]);
9786
+ columnIndex2++;
9787
+ columnOptions = columnOptions.children[0];
9719
9788
  }
9720
- if (cursor && cursor.children) {
9721
- chooseValueData[index + 1] = "";
9722
- setchooseValueData([...chooseValueData]);
9789
+ if ((_b = columnOptions == null ? void 0 : columnOptions.children) == null ? void 0 : _b.length) {
9790
+ selectedValue[columnIndex2 + 1] = "";
9791
+ setSelectedValue([...selectedValue]);
9723
9792
  }
9724
9793
  setColumnsList(normalListData());
9725
9794
  } else {
9726
- setchooseValueData((data) => {
9795
+ setSelectedValue((data) => {
9727
9796
  const cdata = [...data];
9728
9797
  cdata[columnIndex2] = Object.prototype.hasOwnProperty.call(
9729
- option,
9798
+ columnOptions,
9730
9799
  "value"
9731
- ) ? option.value : "";
9800
+ ) ? columnOptions.value : "";
9732
9801
  return cdata;
9733
9802
  });
9734
9803
  }
9735
- setcolumnIndex(columnIndex2);
9804
+ setColumnIndex(columnIndex2);
9736
9805
  }
9737
9806
  }
9738
9807
  };
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];
9808
+ const confirm = () => {
9809
+ let movings = false;
9810
+ refs.forEach((ref2) => {
9811
+ if (ref2.moving)
9812
+ movings = true;
9813
+ ref2.stopMomentum();
9814
+ });
9815
+ if (movings) {
9816
+ isConfirmEvent.current = true;
9817
+ } else {
9818
+ onConfirm && onConfirm(setSelectedOptions(), selectedValue);
9819
+ closePicker();
9748
9820
  }
9821
+ setTimeout(() => {
9822
+ isConfirmEvent.current = false;
9823
+ }, 0);
9749
9824
  };
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";
9825
+ const closePicker = () => {
9826
+ onClose && onClose(setSelectedOptions(), selectedValue);
9827
+ afterClose && afterClose(setSelectedOptions(), selectedValue, pickerRef);
9761
9828
  };
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;
9829
+ const renderTitleBar = () => {
9830
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `${classPrefix2}__control`, children: [
9831
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
9832
+ "span",
9833
+ {
9834
+ className: `${classPrefix2}__cancel-btn`,
9835
+ onClick: () => closePicker(),
9836
+ children: locale.cancel
9837
+ }
9838
+ ),
9839
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__title`, children: title || "" }),
9840
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `${classPrefix2}__confirm-btn`, onClick: confirm, children: locale.confirm })
9841
+ ] });
9783
9842
  };
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
- }
9843
+ const [pickingStatus, setPickingStatus] = React.useState(false);
9844
+ const pickerStart = () => {
9845
+ setPickingStatus(true);
9795
9846
  };
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
- ] });
9847
+ const pickerEnd = () => {
9848
+ setPickingStatus(false);
9849
+ };
9850
+ const pickerChange = (data) => {
9851
+ const prevDefaultValue = currentValue2;
9852
+ let changeIndex = 0;
9853
+ const list = data.detail.value;
9854
+ for (let i = 0, len = list.length; i < len; i++) {
9855
+ if (prevDefaultValue[i] !== list[i]) {
9856
+ changeIndex = i;
9857
+ break;
9858
+ }
9859
+ }
9860
+ chooseItem(
9861
+ columnsList[changeIndex][data.detail.value[changeIndex]],
9862
+ changeIndex
9863
+ );
9802
9864
  };
9803
9865
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
9804
9866
  Popup,
@@ -9806,36 +9868,50 @@ var __publicField = (obj, key, value) => {
9806
9868
  visible,
9807
9869
  position: "bottom",
9808
9870
  onClose: () => {
9809
- closeActionSheet();
9871
+ closePicker();
9810
9872
  },
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
- )
9873
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs(components.View, { className: classes, style, ...rest, catchMove: true, children: [
9874
+ renderTitleBar(),
9875
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__panel`, ref: pickerRef, children: Taro.getEnv() === "WEB" ? columnsList == null ? void 0 : columnsList.map((item, index) => {
9876
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
9877
+ PickerPanel$1,
9878
+ {
9879
+ ref: setRefs(index),
9880
+ defaultValue: selectedValue == null ? void 0 : selectedValue[index],
9881
+ options: item,
9882
+ threeDimensional,
9883
+ chooseItem: (value, index2) => chooseItem(value, index2),
9884
+ duration,
9885
+ keyIndex: index,
9886
+ itemShow: visible
9887
+ },
9888
+ index
9889
+ );
9890
+ }) : /* @__PURE__ */ jsxRuntimeExports.jsx(
9891
+ components.PickerView,
9892
+ {
9893
+ ref: pickerRef,
9894
+ value: currentValue2,
9895
+ immediateChange: true,
9896
+ onPickStart: pickerStart,
9897
+ onChange: pickerChange,
9898
+ onPickEnd: pickerEnd,
9899
+ className: "nut-picker-view-panel",
9900
+ children: columnsList == null ? void 0 : columnsList.map((columnOptions, index) => {
9901
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(components.PickerViewColumn, { children: columnOptions.map((item, index2) => {
9902
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
9903
+ components.View,
9904
+ {
9905
+ className: "nut-picker-roller-item-title",
9906
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: item.text || item })
9907
+ },
9908
+ item.value || index2
9909
+ );
9910
+ }) }, `col${index}`);
9911
+ })
9912
+ }
9913
+ ) })
9914
+ ] })
9839
9915
  }
9840
9916
  );
9841
9917
  };
@@ -9880,7 +9956,7 @@ var __publicField = (obj, key, value) => {
9880
9956
  const [show, setShow] = React.useState(false);
9881
9957
  const [currentDate, setCurrentDate] = React.useState(modelValue);
9882
9958
  const [defaultValue, setDefaultValue] = React.useState([]);
9883
- const [listData, setListData] = React.useState([]);
9959
+ const [options, setListData] = React.useState([]);
9884
9960
  const pickerRef = React.useRef(null);
9885
9961
  const isDate = (val) => {
9886
9962
  return Object.prototype.toString.call(val) === "[object Date]" && !Number.isNaN(val.getTime());
@@ -9998,7 +10074,7 @@ var __publicField = (obj, key, value) => {
9998
10074
  }
9999
10075
  return result;
10000
10076
  };
10001
- const updateChooseValueCustmer = (index, selectedValue, cacheValueData) => {
10077
+ const updateChooseValueCustmer = (cacheValueData, selectedValue, index) => {
10002
10078
  if (["date", "datetime", "datehour", "month-day", "year-month"].includes(
10003
10079
  type.toLocaleLowerCase()
10004
10080
  )) {
@@ -10037,7 +10113,7 @@ var __publicField = (obj, key, value) => {
10037
10113
  const isEqual2 = (currentDate == null ? void 0 : currentDate.getTime()) === (date == null ? void 0 : date.getTime());
10038
10114
  date && isDate(date) && !isEqual2 && setCurrentDate(formatValue(date));
10039
10115
  }
10040
- props.onChange && props.onChange(index, selectedValue, cacheValueData);
10116
+ props.onChange && props.onChange(cacheValueData, selectedValue, index);
10041
10117
  };
10042
10118
  const padZero = (num, targetLength = 2) => {
10043
10119
  let str = `${num}`;
@@ -10134,16 +10210,16 @@ var __publicField = (obj, key, value) => {
10134
10210
  style,
10135
10211
  catchMove: true,
10136
10212
  ...rest,
10137
- children: listData.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(
10213
+ children: options.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(
10138
10214
  Picker$1,
10139
10215
  {
10140
10216
  title,
10141
10217
  visible: show,
10142
- listData,
10218
+ options,
10143
10219
  onClose: onCloseDatePicker,
10144
- defaultValueData: defaultValue,
10145
- onConfirm: (values, options) => onConfirmDatePicker && onConfirmDatePicker(values, options),
10146
- onChange: (index, value, list) => updateChooseValueCustmer(index, value, list),
10220
+ defaultValue,
10221
+ onConfirm: (options2, values) => onConfirmDatePicker && onConfirmDatePicker(options2, values),
10222
+ onChange: (list, value, index) => updateChooseValueCustmer(list, value, index),
10147
10223
  threeDimensional,
10148
10224
  ref: pickerRef
10149
10225
  }
@@ -12947,124 +13023,111 @@ var __publicField = (obj, key, value) => {
12947
13023
  Switch.defaultProps = defaultProps$I;
12948
13024
  Switch.displayName = "NutSwitch";
12949
13025
  const defaultProps$H = {
13026
+ ...ComponentDefaults,
12950
13027
  defaultValue: "",
12951
- textAlign: "left",
12952
- limitshow: false,
12953
- maxlength: "",
12954
- rows: "",
13028
+ showCount: false,
13029
+ maxLength: 140,
12955
13030
  placeholder: "",
12956
- readonly: false,
13031
+ readOnly: false,
12957
13032
  disabled: false,
12958
- autosize: false
13033
+ autoSize: false
12959
13034
  };
12960
13035
  const TextArea = (props) => {
12961
13036
  const { locale } = useConfig$1();
12962
13037
  const {
12963
13038
  className,
13039
+ value,
12964
13040
  defaultValue,
12965
- textAlign,
12966
- limitshow,
12967
- maxlength,
13041
+ showCount,
13042
+ maxLength,
12968
13043
  rows,
12969
13044
  placeholder,
12970
- readonly,
13045
+ readOnly,
12971
13046
  disabled,
12972
- autosize,
13047
+ autoSize,
12973
13048
  style,
12974
13049
  onChange,
12975
13050
  onBlur,
12976
- onFocus
13051
+ onFocus,
13052
+ ...rest
12977
13053
  } = { ...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));
13054
+ const classPrefix2 = "nut-textarea";
13055
+ const compositionRef = React.useRef(false);
13056
+ const format = (value2) => {
13057
+ if (maxLength !== void 0 && value2.length > maxLength) {
13058
+ return value2.substring(0, maxLength);
12987
13059
  }
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();
13060
+ return value2;
13061
+ };
13062
+ const [inputValue, setInputValue] = usePropsValue({
13063
+ value,
13064
+ defaultValue,
13065
+ finalValue: format(defaultValue),
13066
+ onChange
13067
+ });
13068
+ const handleChange = (event) => {
13069
+ var _a;
13070
+ const text = (_a = event == null ? void 0 : event.detail) == null ? void 0 : _a.value;
13071
+ if (text) {
13072
+ const value2 = compositionRef.current ? text : format(text);
13073
+ setInputValue(value2);
13001
13074
  } else {
13002
- SetInputValue(text.value);
13075
+ setInputValue("");
13003
13076
  }
13004
- onChange && onChange(text.value, event);
13005
13077
  };
13006
- const textFocus = (event) => {
13078
+ const handleFocus = (event) => {
13007
13079
  if (disabled)
13008
13080
  return;
13009
- if (readonly)
13081
+ if (readOnly)
13010
13082
  return;
13011
13083
  onFocus && onFocus(event);
13012
13084
  };
13013
- const textBlur = (event) => {
13085
+ const handleBlur = (event) => {
13014
13086
  if (disabled)
13015
13087
  return;
13016
- if (readonly)
13088
+ if (readOnly)
13017
13089
  return;
13018
- const text = event.detail ? event.detail : event.target;
13019
- onChange && onChange(text.value, event);
13020
13090
  onBlur && onBlur(event);
13021
13091
  };
13022
- const startComposing = () => {
13023
- compositingRef.current = true;
13024
- };
13025
- const endComposing = () => {
13026
- compositingRef.current = false;
13027
- };
13028
13092
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
13029
13093
  "div",
13030
13094
  {
13031
- className: `${textareaBem()} ${disabled ? textareaBem("disabled") : ""} ${className || ""}`,
13095
+ className: classNames(classPrefix2, className, {
13096
+ [`${classPrefix2}__disabled`]: disabled
13097
+ }),
13032
13098
  children: [
13033
13099
  /* @__PURE__ */ jsxRuntimeExports.jsx(
13034
- "textarea",
13100
+ components.Textarea,
13035
13101
  {
13036
- className: textareaBem("textarea"),
13037
- style: {
13038
- textAlign,
13039
- resize: `${autosize ? "vertical" : "none"}`,
13040
- ...style
13102
+ nativeProps: {
13103
+ style,
13104
+ readOnly,
13105
+ rows,
13106
+ onCompositionStart: () => {
13107
+ compositionRef.current = true;
13108
+ },
13109
+ onCompositionEnd: () => {
13110
+ compositionRef.current = false;
13111
+ }
13041
13112
  },
13042
- readOnly: disabled || readonly,
13113
+ className: `${classPrefix2}__textarea`,
13114
+ style: Taro.getEnv() === "WEB" ? void 0 : style,
13115
+ disabled: Taro.getEnv() === "WEB" ? disabled : disabled || readOnly,
13043
13116
  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
13117
+ onInput: (e) => handleChange(e),
13118
+ onBlur: (e) => handleBlur(e),
13119
+ onFocus: (e) => handleFocus(e),
13120
+ autoHeight: autoSize,
13121
+ maxlength: maxLength,
13122
+ placeholder: placeholder || locale.placeholder,
13123
+ ...rest
13061
13124
  }
13062
13125
  ),
13063
- limitshow ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: textareaBem("limit"), children: [
13064
- [...inputValue].length,
13126
+ showCount && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `${classPrefix2}__limit`, children: [
13127
+ inputValue.length,
13065
13128
  "/",
13066
- maxlength < 0 ? 0 : maxlength
13067
- ] }) : null
13129
+ maxLength < 0 ? 0 : maxLength
13130
+ ] })
13068
13131
  ]
13069
13132
  }
13070
13133
  );
@@ -22639,13 +22702,11 @@ This message will only show in development mode. It won't appear in production.
22639
22702
  Steps.displayName = "NutSteps";
22640
22703
  const defaultProps$9 = {
22641
22704
  ...ComponentDefaults,
22642
- className: "",
22643
- style: {},
22644
22705
  columns: [],
22645
22706
  data: [],
22646
22707
  bordered: true,
22647
22708
  striped: false,
22648
- noData: "无数据",
22709
+ noData: "",
22649
22710
  sorterIcon: null,
22650
22711
  showHeader: true
22651
22712
  };
@@ -22663,8 +22724,8 @@ This message will only show in development mode. It won't appear in production.
22663
22724
  striped,
22664
22725
  noData,
22665
22726
  sorterIcon,
22666
- onSorter,
22667
22727
  showHeader,
22728
+ onSort,
22668
22729
  ...rest
22669
22730
  } = {
22670
22731
  ...defaultProps$9,
@@ -22676,12 +22737,13 @@ This message will only show in development mode. It won't appear in production.
22676
22737
  setCurData(data);
22677
22738
  }
22678
22739
  }, [data]);
22679
- const b2 = cn("table");
22680
- const classes = classNames({});
22681
- const cls = classNames(b2(), classes, className);
22740
+ const classPrefix2 = "nut-table";
22741
+ const headerClassPrefix = `${classPrefix2}__main__head__tr`;
22742
+ const bodyClassPrefix = `${classPrefix2}__main__body__tr`;
22743
+ const cls = classNames(classPrefix2, className);
22682
22744
  const handleSorterClick = (item) => {
22683
22745
  if (item.sorter) {
22684
- onSorter && onSorter(item, curData);
22746
+ onSort && onSort(item, curData);
22685
22747
  if (typeof item.sorter === "function") {
22686
22748
  setCurData(curData.sort(item.sorter));
22687
22749
  } else {
@@ -22691,8 +22753,8 @@ This message will only show in development mode. It won't appear in production.
22691
22753
  };
22692
22754
  const cellClasses = (item) => {
22693
22755
  return {
22694
- "nut-table__main__head__tr--border": props.bordered,
22695
- [`nut-table__main__head__tr--align${item.align ? item.align : ""}`]: true
22756
+ [`${headerClassPrefix}--border`]: props.bordered,
22757
+ [`${headerClassPrefix}--align${item.align ? item.align : ""}`]: true
22696
22758
  };
22697
22759
  };
22698
22760
  const getColumnItem = (value) => {
@@ -22703,10 +22765,7 @@ This message will only show in development mode. It won't appear in production.
22703
22765
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
22704
22766
  "span",
22705
22767
  {
22706
- className: classNames(
22707
- "nut-table__main__head__tr__th",
22708
- cellClasses(item)
22709
- ),
22768
+ className: classNames(`${headerClassPrefix}__th`, cellClasses(item)),
22710
22769
  onClick: () => handleSorterClick(item),
22711
22770
  children: [
22712
22771
  item.title,
@@ -22729,7 +22788,7 @@ This message will only show in development mode. It won't appear in production.
22729
22788
  "span",
22730
22789
  {
22731
22790
  className: classNames(
22732
- "nut-table__main__body__tr__td",
22791
+ `${bodyClassPrefix}__td`,
22733
22792
  cellClasses(getColumnItem(value))
22734
22793
  ),
22735
22794
  children: typeof item[value] === "function" || typeof render === "function" ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: render ? render(item) : item[value](item) }) : item[value]
@@ -22740,24 +22799,23 @@ This message will only show in development mode. It won't appear in production.
22740
22799
  };
22741
22800
  const renderBoyTrs = () => {
22742
22801
  return curData.map((item, index) => {
22743
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nut-table__main__body__tr", children: renderBodyTds(item) }, index);
22802
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: bodyClassPrefix, children: renderBodyTds(item) }, index);
22744
22803
  });
22745
22804
  };
22746
22805
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: cls, style, ...rest, children: [
22747
22806
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
22748
22807
  "div",
22749
22808
  {
22750
- className: classNames("nut-table__main", {
22751
- "nut-table__main--striped": striped
22809
+ className: classNames(`${classPrefix2}__main`, {
22810
+ [`${classPrefix2}__main--striped`]: striped
22752
22811
  }),
22753
22812
  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() })
22813
+ showHeader && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__main__head`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: headerClassPrefix, children: renderHeadCells() }) }),
22814
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__main__body`, children: renderBoyTrs() })
22756
22815
  ]
22757
22816
  }
22758
22817
  ),
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 }) }) })
22818
+ (summary || curData.length === 0) && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${classPrefix2}__summary`, children: summary || noData })
22761
22819
  ] });
22762
22820
  };
22763
22821
  Table.defaultProps = defaultProps$9;