@nutui/nutui-react-taro 2.0.0-alpha.0 → 2.0.0-alpha.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (363) hide show
  1. package/CHANGELOG.md +137 -638
  2. package/dist/esm/ActionSheet.js +15 -16
  3. package/dist/esm/Address.js +19 -22
  4. package/dist/esm/Animate.js +7 -9
  5. package/dist/esm/AnimatingNumbers.js +8 -9
  6. package/dist/esm/Audio.js +18 -20
  7. package/dist/esm/Avatar.js +11 -12
  8. package/dist/esm/AvatarGroup.js +8 -13
  9. package/dist/esm/BackTop.js +9 -10
  10. package/dist/esm/Badge.js +7 -10
  11. package/dist/esm/Barrage.js +9 -10
  12. package/dist/esm/Button.js +8 -9
  13. package/dist/esm/Calendar.js +18 -21
  14. package/dist/esm/CalendarItem.js +11 -14
  15. package/dist/esm/Card.js +12 -13
  16. package/dist/esm/Cascader.js +16 -18
  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 -10
  22. package/dist/esm/Col.js +8 -8
  23. package/dist/esm/Collapse.js +8 -9
  24. package/dist/esm/CollapseItem.js +7 -8
  25. package/dist/esm/ConfigProvider.js +9 -9
  26. package/dist/esm/CountDown.js +8 -11
  27. package/dist/esm/DatePicker.js +20 -24
  28. package/dist/esm/Dialog.js +13 -15
  29. package/dist/esm/Divider.js +7 -7
  30. package/dist/esm/Drag.js +7 -9
  31. package/dist/esm/Elevator.js +9 -10
  32. package/dist/esm/Ellipsis.js +9 -11
  33. package/dist/esm/Empty.js +7 -11
  34. package/dist/esm/FixedNav.js +11 -14
  35. package/dist/esm/Form.js +10 -11
  36. package/dist/esm/FormItem.js +8 -9
  37. package/dist/esm/Grid.js +8 -11
  38. package/dist/esm/GridItem.js +7 -10
  39. package/dist/esm/Image.js +7 -10
  40. package/dist/esm/ImagePreview.js +18 -20
  41. package/dist/esm/Indicator.js +6 -7
  42. package/dist/esm/Infiniteloading.js +12 -15
  43. package/dist/esm/Input.js +11 -11
  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 -15
  48. package/dist/esm/NavBar.js +7 -11
  49. package/dist/esm/NoticeBar.js +9 -12
  50. package/dist/esm/Notify.js +8 -10
  51. package/dist/esm/NumberKeyboard.js +14 -19
  52. package/dist/esm/Overlay.js +8 -9
  53. package/dist/esm/Pagination.js +9 -12
  54. package/dist/esm/Picker.js +19 -23
  55. package/dist/esm/Popover.js +10 -11
  56. package/dist/esm/Popup.js +12 -15
  57. package/dist/esm/Price.js +6 -8
  58. package/dist/esm/Progress.js +7 -11
  59. package/dist/esm/PullToRefresh.js +9 -14
  60. package/dist/esm/Radio.js +9 -10
  61. package/dist/esm/RadioGroup.js +9 -10
  62. package/dist/esm/Range/style/index.js +1 -1
  63. package/dist/esm/Range.js +11 -16
  64. package/dist/esm/Rate.js +9 -10
  65. package/dist/esm/Row.js +8 -8
  66. package/dist/esm/SearchBar.js +11 -14
  67. package/dist/esm/ShortPassword.js +16 -19
  68. package/dist/esm/SideNavBar.js +14 -20
  69. package/dist/esm/SideNavBarItem.js +5 -6
  70. package/dist/esm/Signature.js +13 -16
  71. package/dist/esm/Skeleton.js +14 -13
  72. package/dist/esm/Step.js +8 -11
  73. package/dist/esm/Steps/style/index.js +1 -1
  74. package/dist/esm/Steps.js +8 -10
  75. package/dist/esm/Sticky.js +10 -12
  76. package/dist/esm/SubSideNavBar.js +6 -7
  77. package/dist/esm/Swipe.js +11 -12
  78. package/dist/esm/Swiper.js +8 -11
  79. package/dist/esm/SwiperItem.js +5 -10
  80. package/dist/esm/Switch.js +7 -8
  81. package/dist/esm/TabPane.js +6 -9
  82. package/dist/esm/Tabbar/style/index.js +1 -1
  83. package/dist/esm/Tabbar.js +10 -8
  84. package/dist/esm/TabbarItem.js +8 -10
  85. package/dist/esm/Table.js +9 -14
  86. package/dist/esm/Tabs.js +11 -12
  87. package/dist/esm/Tag.js +8 -9
  88. package/dist/esm/TextArea.js +11 -11
  89. package/dist/esm/TimeDetail.js +8 -11
  90. package/dist/esm/TimePannel.js +8 -11
  91. package/dist/esm/TimeSelect.js +18 -21
  92. package/dist/esm/Toast.js +9 -10
  93. package/dist/esm/TrendArrow.js +8 -9
  94. package/dist/esm/Uploader.js +14 -19
  95. package/dist/esm/UserContext-ab42ba7f.js +5 -0
  96. package/dist/esm/Video.js +8 -9
  97. package/dist/esm/VirtualList.js +8 -11
  98. package/dist/esm/WaterMark.js +10 -13
  99. package/dist/esm/actionsheet.taro-d2217152.js +61 -0
  100. package/dist/esm/address.taro-1a8ab3f1.js +470 -0
  101. package/dist/esm/animate.taro-c8b29242.js +44 -0
  102. package/dist/esm/animatingnumbers.taro-c2a52dbd.js +103 -0
  103. package/dist/esm/audio.taro-bbd39f93.js +185 -0
  104. package/dist/esm/avatar.taro-01536aff.js +100 -0
  105. package/dist/esm/avatargroup-ad5ffb46.js +34 -0
  106. package/dist/esm/backtop.taro-7de36464.js +48 -0
  107. package/dist/esm/badge.taro-872605bf.js +48 -0
  108. package/dist/esm/barrage.taro-c8cb9864.js +91 -0
  109. package/dist/esm/bem-cdccae08.js +5 -0
  110. package/dist/esm/button.taro-01eae688.js +72 -0
  111. package/dist/esm/calendar.taro-10a6cb11.js +70 -0
  112. package/dist/esm/calendaritem.taro-3e5f114e.js +732 -0
  113. package/dist/esm/can-use-dom-0e539bd3.js +4 -0
  114. package/dist/esm/card.taro-2080f4d2.js +51 -0
  115. package/dist/esm/cascader.taro-fb7a0230.js +471 -0
  116. package/dist/esm/cell.taro-4e31d1fa.js +48 -0
  117. package/dist/esm/cellgroup.taro-a790d91b.js +28 -0
  118. package/dist/esm/checkbox.taro-016074da.js +177 -0
  119. package/dist/esm/circleprogress.taro-7149e09d.js +104 -0
  120. package/dist/esm/col.taro-d6a46a7d.js +41 -0
  121. package/dist/esm/collapse.taro-3d997680.js +70 -0
  122. package/dist/esm/collapseitem-f4571575.js +76 -0
  123. package/dist/esm/configprovider.taro-25758d9f.js +462 -0
  124. package/dist/esm/context-ab42ba7f.js +5 -0
  125. package/dist/esm/context-d0fccf11.js +5 -0
  126. package/dist/esm/countdown.taro-22200811.js +210 -0
  127. package/dist/esm/datepicker.taro-65dbeceb.js +260 -0
  128. package/dist/esm/dialog.taro-290eb9a6.js +128 -0
  129. package/dist/esm/divider.taro-0cb5f894.js +31 -0
  130. package/dist/esm/drag.taro-48e1ff38.js +111 -0
  131. package/dist/esm/elevator.taro-df8fde9d.js +206 -0
  132. package/dist/esm/ellipsis.taro-f9688dd7.js +242 -0
  133. package/dist/esm/empty.taro-ca792f57.js +59 -0
  134. package/dist/esm/fixednav.taro-28e5f776.js +61 -0
  135. package/dist/esm/form.taro-b06754e8.js +182 -0
  136. package/dist/esm/formitem.taro-b326809d.js +108 -0
  137. package/dist/esm/grid.taro-fbbd8618.js +52 -0
  138. package/dist/esm/griditem.taro-b0c37077.js +85 -0
  139. package/dist/esm/image.taro-767aa000.js +65 -0
  140. package/dist/esm/imagepreview.taro-daa5a84f.js +180 -0
  141. package/dist/esm/index-e3184f19.js +9 -0
  142. package/dist/esm/indicator.taro-edbc71df.js +30 -0
  143. package/dist/esm/infiniteloading.taro-f8f23ac6.js +143 -0
  144. package/dist/esm/input.taro-27d686c9.js +164 -0
  145. package/dist/esm/inputnumber.taro-6657d2c1.js +197 -0
  146. package/dist/esm/layout.taro-9659a928.js +11 -0
  147. package/dist/esm/menu.taro-cd0fef41.js +122 -0
  148. package/dist/esm/menuitem.taro-6076bffa.js +142 -0
  149. package/dist/esm/navbar.taro-5e1a0835.js +61 -0
  150. package/dist/esm/noticebar.taro-2f02b2ad.js +369 -0
  151. package/dist/esm/notify.taro-5768403d.js +75 -0
  152. package/dist/esm/numberkeyboard.taro-ad8afaf9.js +136 -0
  153. package/dist/esm/nutui-react.es.js +206 -118
  154. package/dist/esm/offsetContext-f32a9246.js +5 -0
  155. package/dist/esm/overlay.taro-75012bd3.js +77 -0
  156. package/dist/esm/pagination.taro-63607c3b.js +94 -0
  157. package/dist/esm/picker.taro-0570ec32.js +481 -0
  158. package/dist/esm/popover.taro-ad483372.js +162 -0
  159. package/dist/esm/popup.taro-e756f3fc.js +150 -0
  160. package/dist/esm/price.taro-479f1b82.js +80 -0
  161. package/dist/esm/progress.taro-437b9f6a.js +66 -0
  162. package/dist/esm/pulltorefresh.taro-6afe4805.js +138 -0
  163. package/dist/esm/radio.taro-5d6ca4ad.js +153 -0
  164. package/dist/esm/range.taro-615e193a.js +259 -0
  165. package/dist/esm/rate.taro-78c66969.js +77 -0
  166. package/dist/esm/row.taro-8b7febd4.js +48 -0
  167. package/dist/esm/searchbar.taro-37ade36e.js +159 -0
  168. package/dist/esm/shortpassword.taro-f7292032.js +146 -0
  169. package/dist/esm/sidenavbar.taro-9f210df4.js +51 -0
  170. package/dist/esm/sidenavbaritem.taro-32a45ce6.js +12 -0
  171. package/dist/esm/signature.taro-c57469aa.js +146 -0
  172. package/dist/esm/skeleton.taro-9ff9baf4.js +71 -0
  173. package/dist/esm/step.taro-2f55e4f2.js +63 -0
  174. package/dist/esm/steps.taro-196c1f59.js +31 -0
  175. package/dist/esm/sticky.taro-f8ae8d5e.js +154 -0
  176. package/dist/esm/subsidenavbar.taro-abe07673.js +64 -0
  177. package/dist/esm/swipe.taro-de80fcd8.js +180 -0
  178. package/dist/esm/swiper.taro-4aeb8526.js +86 -0
  179. package/dist/esm/swiperitem.taro-ef7342e8.js +14 -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-66164782.js +146 -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-7e38fc37.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 +16980 -22641
  208. package/dist/nutui.react.umd.js +17061 -22738
  209. package/dist/packages/audio/audio.scss +2 -15
  210. package/dist/packages/badge/badge.scss +8 -18
  211. package/dist/packages/calendar/calendar.scss +0 -30
  212. package/dist/packages/cascader/cascader.scss +0 -26
  213. package/dist/packages/cellgroup/cellgroup.scss +20 -16
  214. package/dist/packages/checkbox/checkbox.scss +8 -11
  215. package/dist/packages/circleprogress/circleprogress.scss +0 -9
  216. package/dist/packages/dialog/dialog.scss +36 -65
  217. package/dist/packages/elevator/elevator.scss +2 -28
  218. package/dist/packages/empty/empty.scss +0 -9
  219. package/dist/packages/imagepreview/imagepreview.scss +52 -16
  220. package/dist/packages/input/input.scss +13 -180
  221. package/dist/packages/menu/menu.scss +44 -55
  222. package/dist/packages/menuitem/menuitem.scss +16 -26
  223. package/dist/packages/navbar/navbar.scss +16 -115
  224. package/dist/packages/noticebar/noticebar.scss +18 -19
  225. package/dist/packages/notify/notify.scss +1 -1
  226. package/dist/packages/numberkeyboard/numberkeyboard.scss +29 -77
  227. package/dist/packages/overlay/overlay.scss +11 -4
  228. package/dist/packages/picker/picker.scss +66 -137
  229. package/dist/packages/popup/popup.scss +0 -16
  230. package/dist/packages/price/price.scss +8 -0
  231. package/dist/packages/progress/progress.scss +19 -58
  232. package/dist/packages/pulltorefresh/pulltorefresh.scss +0 -8
  233. package/dist/packages/radio/radio.scss +13 -32
  234. package/dist/packages/radiogroup/radiogroup.scss +17 -51
  235. package/dist/packages/range/range.scss +24 -49
  236. package/dist/packages/row/row.scss +13 -31
  237. package/dist/packages/sidenavbar/sidenavbar.scss +0 -19
  238. package/dist/packages/step/step.scss +9 -62
  239. package/dist/packages/steps/steps.scss +2 -0
  240. package/dist/packages/swiper/swiper.scss +3 -18
  241. package/dist/packages/switch/switch.scss +13 -31
  242. package/dist/packages/tabbar/tabbar.scss +16 -22
  243. package/dist/packages/tabbaritem/tabbaritem.scss +9 -70
  244. package/dist/packages/table/table.scss +0 -56
  245. package/dist/packages/tabs/tabs.scss +196 -225
  246. package/dist/packages/textarea/textarea.scss +5 -12
  247. package/dist/packages/uploader/uploader.scss +2 -28
  248. package/dist/style.css +1 -1
  249. package/dist/style.mjs +1 -1
  250. package/dist/styles/themes/default.scss +17 -18
  251. package/dist/styles/variables-jmapp.scss +120 -240
  252. package/dist/styles/variables.scss +139 -252
  253. package/dist/types/index.d.ts +572 -722
  254. package/package.json +2 -2
  255. package/dist/esm/AvatarContext-c96afdcc.js +0 -5
  256. package/dist/esm/Icon.js +0 -64
  257. package/dist/esm/UserContext-0aac9a82.js +0 -5
  258. package/dist/esm/UserContext-e402e1a6.js +0 -5
  259. package/dist/esm/UserContext-e8176108.js +0 -5
  260. package/dist/esm/actionsheet.taro-b76a342e.js +0 -53
  261. package/dist/esm/address.taro-1812caeb.js +0 -461
  262. package/dist/esm/animate.taro-fb7986d6.js +0 -40
  263. package/dist/esm/animatingnumbers.taro-03e5d61d.js +0 -104
  264. package/dist/esm/audio.taro-f672a68c.js +0 -162
  265. package/dist/esm/avatar.taro-de157a1f.js +0 -105
  266. package/dist/esm/avatargroup-b476ac68.js +0 -34
  267. package/dist/esm/backtop.taro-ba271b8f.js +0 -52
  268. package/dist/esm/badge.taro-ae154f41.js +0 -50
  269. package/dist/esm/barrage.taro-80df08d3.js +0 -94
  270. package/dist/esm/bem-350c1702.js +0 -5
  271. package/dist/esm/button.taro-a1c9512f.js +0 -65
  272. package/dist/esm/calendar.taro-b6b147ca.js +0 -65
  273. package/dist/esm/calendaritem.taro-ae167e59.js +0 -787
  274. package/dist/esm/can-use-dom-3eeb5af4.js +0 -6
  275. package/dist/esm/card.taro-5e9b34c8.js +0 -33
  276. package/dist/esm/cascader.taro-9c0a1a38.js +0 -447
  277. package/dist/esm/cell.taro-26870740.js +0 -43
  278. package/dist/esm/cellgroup.taro-6e901b54.js +0 -24
  279. package/dist/esm/checkbox.taro-785c528b.js +0 -168
  280. package/dist/esm/circleprogress.taro-79854448.js +0 -109
  281. package/dist/esm/col.taro-53eed3cc.js +0 -41
  282. package/dist/esm/collapse.taro-35a8a0d6.js +0 -79
  283. package/dist/esm/collapseitem-690eb91c.js +0 -68
  284. package/dist/esm/configprovider-9960f0fb.js +0 -19
  285. package/dist/esm/configprovider.taro-c8c54556.js +0 -45
  286. package/dist/esm/countdown.taro-0e6bf7a2.js +0 -225
  287. package/dist/esm/datepicker.taro-439e2080.js +0 -275
  288. package/dist/esm/dialog.taro-00ac41fd.js +0 -118
  289. package/dist/esm/divider.taro-6c1657ce.js +0 -31
  290. package/dist/esm/drag.taro-79bb8744.js +0 -110
  291. package/dist/esm/elevator.taro-81a11ecc.js +0 -178
  292. package/dist/esm/ellipsis.taro-b6cda065.js +0 -241
  293. package/dist/esm/empty.taro-fde835ca.js +0 -62
  294. package/dist/esm/fixednav.taro-39fbd47a.js +0 -54
  295. package/dist/esm/form.taro-0d83f1e8.js +0 -179
  296. package/dist/esm/formitem.taro-0de07d1e.js +0 -89
  297. package/dist/esm/get-scroll-parent-b4a07e65.js +0 -25
  298. package/dist/esm/grid.taro-3797169c.js +0 -49
  299. package/dist/esm/griditem.taro-04f59ae1.js +0 -80
  300. package/dist/esm/image.taro-edb572bb.js +0 -64
  301. package/dist/esm/imagepreview.taro-867ee24a.js +0 -167
  302. package/dist/esm/index-5bcb0ff8.js +0 -7
  303. package/dist/esm/indicator.taro-c10334e8.js +0 -30
  304. package/dist/esm/infiniteloading.taro-73c9b8ca.js +0 -141
  305. package/dist/esm/input.taro-10ed5500.js +0 -237
  306. package/dist/esm/inputnumber.taro-108c4784.js +0 -199
  307. package/dist/esm/layout.taro-9046d093.js +0 -11
  308. package/dist/esm/menu.taro-54951911.js +0 -98
  309. package/dist/esm/menuitem.taro-86a6bb6c.js +0 -128
  310. package/dist/esm/navbar.taro-69f47d51.js +0 -77
  311. package/dist/esm/noticebar.taro-49e7441f.js +0 -427
  312. package/dist/esm/notify.taro-e17c6f82.js +0 -75
  313. package/dist/esm/numberkeyboard.taro-81b36e5e.js +0 -159
  314. package/dist/esm/offsetContext-c2a746fa.js +0 -5
  315. package/dist/esm/overlay.taro-ad0d4775.js +0 -75
  316. package/dist/esm/pagination.taro-60b22b27.js +0 -91
  317. package/dist/esm/picker.taro-5c9030a7.js +0 -423
  318. package/dist/esm/popover.taro-2a57eae4.js +0 -153
  319. package/dist/esm/popup.taro-124b9bab.js +0 -142
  320. package/dist/esm/price.taro-776ed16e.js +0 -83
  321. package/dist/esm/progress.taro-24392ef3.js +0 -88
  322. package/dist/esm/pulltorefresh.taro-d5fcfcb0.js +0 -181
  323. package/dist/esm/radio.taro-51e10152.js +0 -177
  324. package/dist/esm/range.taro-7a2b6ca1.js +0 -332
  325. package/dist/esm/rate.taro-57341aa9.js +0 -77
  326. package/dist/esm/row.taro-f64d4a13.js +0 -46
  327. package/dist/esm/searchbar.taro-eef468bb.js +0 -152
  328. package/dist/esm/shortpassword.taro-9a2c98ad.js +0 -119
  329. package/dist/esm/sidenavbar.taro-0265812f.js +0 -35
  330. package/dist/esm/sidenavbaritem.taro-bb80dbf4.js +0 -12
  331. package/dist/esm/signature.taro-f01b2b05.js +0 -143
  332. package/dist/esm/skeleton.taro-64e858a2.js +0 -62
  333. package/dist/esm/step.taro-2ec1f283.js +0 -58
  334. package/dist/esm/steps.taro-c82d2252.js +0 -30
  335. package/dist/esm/sticky.taro-b5bde7b1.js +0 -136
  336. package/dist/esm/subsidenavbar.taro-3cce8442.js +0 -63
  337. package/dist/esm/supports-passive-c85ef996.js +0 -18
  338. package/dist/esm/swipe.taro-350c9a94.js +0 -177
  339. package/dist/esm/swiper.taro-7a94e211.js +0 -451
  340. package/dist/esm/swiperitem-c9e3d0d5.js +0 -29
  341. package/dist/esm/switch.taro-34ca8228.js +0 -50
  342. package/dist/esm/tabbar.taro-9acfc2fa.js +0 -59
  343. package/dist/esm/tabbaritem.taro-42ba353f.js +0 -55
  344. package/dist/esm/table.taro-3946697c.js +0 -95
  345. package/dist/esm/tabpane.taro-4ca340ef.js +0 -23
  346. package/dist/esm/tabs.taro-be8cacb5.js +0 -140
  347. package/dist/esm/tag.taro-0c2567de.js +0 -92
  348. package/dist/esm/textarea.taro-a0f79515.js +0 -94
  349. package/dist/esm/timedetail.taro-fce4e614.js +0 -44
  350. package/dist/esm/timepannel.taro-fd3d008d.js +0 -22
  351. package/dist/esm/timeselect.taro-5b047850.js +0 -133
  352. package/dist/esm/toast.taro-e4f44812.js +0 -108
  353. package/dist/esm/trendarrow.taro-7cf90def.js +0 -70
  354. package/dist/esm/typings-d8491423.js +0 -6
  355. package/dist/esm/uploader.taro-0cca7e97.js +0 -496
  356. package/dist/esm/use-client-rect-1f8ed1fe.js +0 -18
  357. package/dist/esm/use-props-value-ae7ee726.js +0 -15
  358. package/dist/esm/use-touch-db24bb5c.js +0 -69
  359. package/dist/esm/video-7ed508cc.js +0 -67
  360. package/dist/esm/virtuallist.taro-35b9bd9a.js +0 -214
  361. package/dist/esm/watermark.taro-c780d360.js +0 -114
  362. package/dist/esm/zh-CN-b4f493ba.js +0 -131
  363. package/dist/packages/icon/icon.scss +0 -0
@@ -1,152 +0,0 @@
1
- import React__default, { useRef, useState, useEffect } from 'react';
2
- import { getEnv } from '@tarojs/taro';
3
- import { Search, CircleClose } from '@nutui/icons-react-taro';
4
- import { c as cn } from './bem-350c1702.js';
5
- import { u as useConfig } from './configprovider.taro-c8c54556.js';
6
- import { C as ComponentDefaults } from './typings-d8491423.js';
7
-
8
- const defaultProps = {
9
- ...ComponentDefaults,
10
- placeholder: '',
11
- shape: 'square',
12
- disabled: false,
13
- maxLength: 9999,
14
- clearable: true,
15
- clearSize: '12px',
16
- align: 'left',
17
- readonly: true,
18
- autoFocus: false,
19
- label: '',
20
- leftinIcon: React__default.createElement(Search, { size: "12" }),
21
- };
22
- const SearchBar = (props) => {
23
- const searchbarBem = cn('searchbar');
24
- const { locale } = useConfig();
25
- const searchRef = useRef(null);
26
- const [value, setValue] = useState(() => props.value);
27
- const { placeholder, shape, className, disabled, maxLength, clearable, clearSize, align, readOnly, autoFocus, label, actionText, leftinIcon, rightinIcon, leftoutIcon, rightoutIcon, onChange, onFocus, onBlur, onClear, onCancel, onSearch, onClickInput, onClickLeftinIcon, onClickLeftoutIcon, onClickRightinIcon, onClickRightoutIcon, } = {
28
- ...defaultProps,
29
- ...props,
30
- };
31
- const alignClass = `${align}`;
32
- const forceFocus = () => {
33
- const searchSelf = searchRef.current;
34
- searchSelf && searchSelf.focus();
35
- };
36
- const change = (event) => {
37
- const { value } = event.target;
38
- onChange && onChange?.(value, event);
39
- setValue(value);
40
- value === '' && forceFocus();
41
- };
42
- const focus = (event) => {
43
- const { value } = event.target;
44
- onFocus && onFocus?.(value, event);
45
- };
46
- const blur = (event) => {
47
- const searchSelf = searchRef.current;
48
- searchSelf && searchSelf.blur();
49
- const { value } = event.target;
50
- onBlur && onBlur?.(value, event);
51
- };
52
- useEffect(() => {
53
- setValue(props.value);
54
- }, [props.value]);
55
- useEffect(() => {
56
- autoFocus && forceFocus();
57
- }, [autoFocus]);
58
- const renderField = () => {
59
- return (React__default.createElement("input", { className: `${searchbarBem('input')} ${searchbarBem(alignClass)} ${shape === 'round' ? searchbarBem('round') : ''} ${clearable ? searchbarBem('input-clear') : ''}`, ref: searchRef, style: { ...props.style }, value: value || '', placeholder: placeholder || locale.placeholder, disabled: disabled, readOnly: readOnly, maxLength: maxLength, onKeyPress: onKeypress, onChange: (e) => change(e), onFocus: (e) => focus(e), onBlur: (e) => blur(e), onClick: (e) => clickInput(e) }));
60
- };
61
- const clickInput = (e) => {
62
- onClickInput && onClickInput(e);
63
- };
64
- const renderLeftinIcon = () => {
65
- if (!leftinIcon)
66
- return null;
67
- return (React__default.createElement("div", { className: `${searchbarBem('leftin-icon')} ${searchbarBem('icon')}`, onClick: (e) => clickLeftIcon('in-left', e) }, leftinIcon));
68
- };
69
- const renderLeftoutIcon = () => {
70
- if (!leftoutIcon)
71
- return null;
72
- return (React__default.createElement("div", { className: `${searchbarBem('leftout-icon')}`, onClick: (e) => clickLeftIcon('out-left', e) }, leftoutIcon));
73
- };
74
- const clickLeftIcon = (flag, event) => {
75
- if (flag === 'in-left') {
76
- onClickLeftinIcon && onClickLeftinIcon(value, event);
77
- }
78
- else {
79
- onClickLeftoutIcon && onClickLeftoutIcon(value, event);
80
- }
81
- };
82
- const renderRightinIcon = () => {
83
- if (!rightinIcon)
84
- return null;
85
- return (React__default.createElement("div", { className: `${searchbarBem('rightin-icon')} ${searchbarBem('icon')}`, onClick: (e) => clickRightIcon('in-right', e) }, rightinIcon));
86
- };
87
- const renderRightoutIcon = () => {
88
- if (!rightoutIcon)
89
- return null;
90
- return (React__default.createElement("div", { className: `${searchbarBem('rightout-icon')}`, onClick: (e) => clickRightIcon('out-right', e) }, rightoutIcon));
91
- };
92
- const clickRightIcon = (flag, event) => {
93
- if (flag === 'in-left') {
94
- onClickRightinIcon && onClickRightinIcon(value, event);
95
- }
96
- else {
97
- onClickRightoutIcon && onClickRightoutIcon(value, event);
98
- }
99
- };
100
- const handleClear = () => {
101
- return (React__default.createElement("div", { className: `${searchbarBem('clear')} ${rightinIcon ? 'pos-right' : ''}`, onClick: (e) => clearaVal(e) },
102
- React__default.createElement(CircleClose, { size: clearSize, color: "#555" })));
103
- };
104
- const clearaVal = (event) => {
105
- if (disabled || readOnly) {
106
- return;
107
- }
108
- setValue('');
109
- onClear && onClear(event);
110
- forceFocus();
111
- };
112
- const renderRightLabel = () => {
113
- if (actionText) {
114
- return (React__default.createElement("div", { className: searchbarBem('action-text'), onClick: search }, actionText));
115
- }
116
- return null;
117
- };
118
- const onKeypress = (e) => {
119
- if (e.keyCode === 13) {
120
- if (typeof e.cancelable !== 'boolean' || e.cancelable) {
121
- e.preventDefault();
122
- }
123
- onSearch && onSearch(value);
124
- }
125
- };
126
- const search = () => {
127
- onSearch && onSearch(value);
128
- };
129
- const renderLabel = () => {
130
- if (label) {
131
- return React__default.createElement("div", { className: searchbarBem('label') }, label);
132
- }
133
- return null;
134
- };
135
- const envClass = () => {
136
- return getEnv() === 'WEB' ? 'nut-searchbar-taro' : '';
137
- };
138
- return (React__default.createElement("div", { className: `${searchbarBem()} ${envClass()} ${disabled ? searchbarBem('disabled') : ''} ${className || ''}`, style: { ...props.style, background: props.background } },
139
- renderLeftoutIcon(),
140
- renderLabel(),
141
- React__default.createElement("div", { className: `${searchbarBem('content')}`, style: { background: props.inputBackground } },
142
- renderLeftinIcon(),
143
- React__default.createElement("div", { className: "nut-searchbar__input-box" }, renderField()),
144
- renderRightinIcon(),
145
- clearable && value && handleClear()),
146
- renderRightoutIcon(),
147
- renderRightLabel()));
148
- };
149
- SearchBar.defaultProps = defaultProps;
150
- SearchBar.displayName = 'NutSearchBar';
151
-
152
- export { SearchBar as S };
@@ -1,119 +0,0 @@
1
- import React__default, { useRef, useState, useEffect } from 'react';
2
- import { Tips } from '@nutui/icons-react-taro';
3
- import { c as cn } from './bem-350c1702.js';
4
- import { P as Popup } from './popup.taro-124b9bab.js';
5
- import { u as useConfig } from './configprovider.taro-c8c54556.js';
6
- import { C as ComponentDefaults } from './typings-d8491423.js';
7
-
8
- const defaultProps = {
9
- ...ComponentDefaults,
10
- title: '',
11
- description: '',
12
- tips: '',
13
- tipsIcon: null,
14
- iconSize: 11,
15
- visible: false,
16
- modelValue: '',
17
- errorMsg: '',
18
- noButton: true,
19
- closeOnClickOverlay: true,
20
- length: 6,
21
- className: '',
22
- autoFocus: false,
23
- onChange: (value) => { },
24
- onOk: (value) => { },
25
- onCancel: () => { },
26
- onClose: () => { },
27
- onTips: () => { },
28
- onComplete: (value) => { },
29
- };
30
- const ShortPassword = (props) => {
31
- const { locale } = useConfig();
32
- const { title, description, tips, tipsIcon, iconSize, visible, modelValue, errorMsg, noButton, closeOnClickOverlay, length, style, className, onChange, onOk, onTips, onCancel, onClose, onComplete, autoFocus, ...reset } = props;
33
- const b = cn('shortpassword');
34
- const textInput = useRef(null);
35
- const range = (val) => {
36
- return Math.min(Math.max(4, val), 6);
37
- };
38
- const [innerVisible, setInnerVisible] = useState(visible);
39
- const [comLen, setComLen] = useState(range(Number(length)));
40
- const [inputValue, setInputValue] = useState('');
41
- useEffect(() => {
42
- setInnerVisible(visible);
43
- }, [visible]);
44
- useEffect(() => {
45
- if (typeof modelValue !== 'undefined') {
46
- setInputValue(modelValue);
47
- }
48
- }, [modelValue]);
49
- const changeValue = (e) => {
50
- let inputValue = e.target.value;
51
- if (String(inputValue).length > comLen) {
52
- inputValue = inputValue.slice(0, comLen);
53
- }
54
- setInputValue(inputValue);
55
- if (String(inputValue).length === comLen) {
56
- onComplete && onComplete(inputValue);
57
- }
58
- onChange && onChange(inputValue);
59
- };
60
- const systemStyle = () => {
61
- const u = navigator.userAgent;
62
- const isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; // g
63
- const isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); // ios终端
64
- let style = {};
65
- if (isIOS) {
66
- style = {
67
- paddingRight: '1200px',
68
- };
69
- }
70
- if (isAndroid) {
71
- style = {
72
- opacity: 0,
73
- zIndex: 10,
74
- };
75
- }
76
- return style;
77
- };
78
- const focus = () => {
79
- if (textInput.current) {
80
- textInput.current.focus();
81
- }
82
- };
83
- const sure = () => {
84
- onOk && onOk(inputValue);
85
- };
86
- const renderIcon = (size = '11px') => {
87
- return React__default.isValidElement(tipsIcon) ? (React__default.cloneElement(tipsIcon, {
88
- ...tipsIcon.props,
89
- size,
90
- })) : (React__default.createElement(Tips, { size: size }));
91
- };
92
- return (React__default.createElement("div", null,
93
- React__default.createElement(Popup, { style: {
94
- padding: '32px 24px 28px 24px',
95
- borderRadius: '12px',
96
- textAlign: 'center',
97
- }, visible: innerVisible, closeable: true, "close-on-click-overlay": closeOnClickOverlay, onClickOverlay: onClose, onClickCloseIcon: onClose },
98
- React__default.createElement("div", { className: `${b()} ${className}`, style: { ...style }, ...reset },
99
- React__default.createElement("div", { className: b('title') }, title || locale.shortpassword.title),
100
- React__default.createElement("div", { className: b('subtitle') }, description || locale.shortpassword.description),
101
- React__default.createElement("div", { className: b('input') },
102
- React__default.createElement("input", { ref: textInput, className: b('input-real'), type: "number", style: systemStyle(), maxLength: 6, value: inputValue, autoFocus: autoFocus, onChange: (e) => changeValue(e) }),
103
- React__default.createElement("div", { className: b('input-site') }),
104
- React__default.createElement("div", { className: b('input-fake'), onClick: () => focus() }, [...new Array(comLen).keys()].map((item, index) => {
105
- return (React__default.createElement("div", { className: b('input-fake__li'), key: index }, String(inputValue).length > index ? (React__default.createElement("div", { className: b('input-fake__li__icon') })) : null));
106
- }))),
107
- React__default.createElement("div", { className: b('message') },
108
- React__default.createElement("div", { className: b('message__error') }, errorMsg),
109
- tips || locale.shortpassword.tips ? (React__default.createElement("div", { className: b('message__forget') },
110
- renderIcon(iconSize),
111
- React__default.createElement("div", { className: b('message__forget-tips'), onClick: onTips }, tips || locale.shortpassword.tips))) : null),
112
- !noButton ? (React__default.createElement("div", { className: b('footer') },
113
- React__default.createElement("div", { className: b('footer__cancel'), onClick: onCancel }, locale.cancel),
114
- React__default.createElement("div", { className: b('footer__sure'), onClick: () => sure() }, locale.confirm))) : null))));
115
- };
116
- ShortPassword.defaultProps = defaultProps;
117
- ShortPassword.displayName = 'NutShortPassword';
118
-
119
- export { ShortPassword as S };
@@ -1,35 +0,0 @@
1
- import React__default, { useState } from 'react';
2
- import { u as useConfig } from './configprovider.taro-c8c54556.js';
3
- import { P as Popup } from './popup.taro-124b9bab.js';
4
- import { O as OffsetContext } from './offsetContext-c2a746fa.js';
5
-
6
- const defaultProps = {
7
- showhead: false,
8
- position: 'left',
9
- width: '80%',
10
- };
11
- const SideNavBar = (props) => {
12
- useConfig();
13
- const { title, visible, width, position, children, className, showhead, onClose, ...rest } = {
14
- ...defaultProps,
15
- ...props,
16
- };
17
- const offset = props.offset ? Number(props.offset) : 20;
18
- const [sidenavbarShow, setSidenavbarShow] = useState(true);
19
- const handleClick = () => {
20
- setSidenavbarShow(!sidenavbarShow);
21
- };
22
- return (React__default.createElement(Popup, { visible: visible, style: { width, height: '100%' }, position: position, onClose: onClose },
23
- React__default.createElement("div", { className: className ? `${className} nut-sidenavbar` : 'nut-sidenavbar', ...rest },
24
- React__default.createElement("div", { className: "nut-sidenavbar__content" },
25
- React__default.createElement("div", { className: `nut-sidenavbar__list ${sidenavbarShow ? 'nutShow' : 'nutHide'}`, onClick: handleClick },
26
- React__default.createElement("div", { className: "nut-sidenavbar__title border-bt ", style: { paddingLeft: `${offset}px` } },
27
- title,
28
- React__default.createElement("i", { className: `arrow-icon ${sidenavbarShow ? 'arrow-up' : 'arrow-down'}` })),
29
- React__default.createElement(OffsetContext.Provider, { value: offset },
30
- React__default.createElement("div", { className: "nut-sidenavbar__content" }, children)))))));
31
- };
32
- SideNavBar.defaultProps = defaultProps;
33
- SideNavBar.displayName = 'NutSideNavBar';
34
-
35
- export { SideNavBar as S };
@@ -1,12 +0,0 @@
1
- import React__default from 'react';
2
-
3
- const SideNavBarItem = (props) => {
4
- const { title, key, children, onClick, ...rest } = props;
5
- const clickFn = (e) => {
6
- e.stopPropagation();
7
- onClick && onClick({ title, key });
8
- };
9
- return (React__default.createElement("div", { className: "nut-subsidenavbar__item border-bt", onClick: clickFn, ...rest }, title));
10
- };
11
-
12
- export { SideNavBarItem as S };
@@ -1,143 +0,0 @@
1
- import React__default, { useRef, useState, useEffect } from 'react';
2
- import { getEnv, nextTick, createSelectorQuery, canvasToTempFilePath } from '@tarojs/taro';
3
- import { B as Button } from './button.taro-a1c9512f.js';
4
- import { c as cn } from './bem-350c1702.js';
5
- import { u as useConfig } from './configprovider.taro-c8c54556.js';
6
-
7
- /* eslint-disable react/no-unknown-property */
8
- const defaultProps = {
9
- canvasId: 'spcanvas',
10
- type: 'png',
11
- lineWidth: 2,
12
- strokeStyle: '#000',
13
- className: '',
14
- };
15
- const Signature = (props) => {
16
- const { locale } = useConfig();
17
- const { canvasId, type, lineWidth, strokeStyle, unSupportTpl, className, confirm, clear, onConfirm, onClear, ...rest } = {
18
- ...defaultProps,
19
- ...props,
20
- };
21
- const b = cn('signature');
22
- const canvasRef = useRef(null);
23
- const wrapRef = useRef(null);
24
- const [canvasHeight, setCanvasHeight] = useState(0);
25
- const [canvasWidth, setCanvasWidth] = useState(0);
26
- const ctx = useRef(null);
27
- const [disalbeScroll] = useState('true');
28
- const startEventHandler = (event) => {
29
- if (ctx.current) {
30
- ctx.current.beginPath();
31
- ctx.current.lineWidth = lineWidth;
32
- ctx.current.strokeStyle = strokeStyle;
33
- }
34
- };
35
- const moveEventHandler = (event) => {
36
- if (ctx.current) {
37
- const evt = event.changedTouches[0];
38
- let mouseX = evt.x || evt.clientX;
39
- let mouseY = evt.y || evt.clientY;
40
- if (getEnv() === 'WEB' && canvasRef.current) {
41
- const coverPos = canvasRef.current.getBoundingClientRect();
42
- mouseX = evt.clientX - coverPos.left;
43
- mouseY = evt.clientY - coverPos.top;
44
- }
45
- nextTick(() => {
46
- // ctx.current.lineCap = 'round'
47
- // ctx.current.lineJoin = 'round'
48
- ctx.current?.lineTo(mouseX, mouseY);
49
- ctx.current?.stroke();
50
- });
51
- }
52
- };
53
- const endEventHandler = (event) => { };
54
- const handleClearBtn = () => {
55
- if (ctx.current) {
56
- ctx.current.clearRect(0, 0, canvasWidth, canvasHeight);
57
- ctx.current.closePath();
58
- }
59
- clear && clear();
60
- onClear && onClear();
61
- };
62
- const handleConfirmBtn = () => {
63
- onSave();
64
- };
65
- const onSave = () => {
66
- createSelectorQuery()
67
- .select(`#${canvasId}`)
68
- .fields({
69
- node: true,
70
- size: true,
71
- })
72
- .exec((res) => {
73
- canvasToTempFilePath({
74
- canvas: res[0].node,
75
- fileType: props.type,
76
- canvasId: `${canvasId}`,
77
- success: (res) => {
78
- handleClearBtn();
79
- confirm && confirm(res.tempFilePath);
80
- onConfirm && onConfirm(res.tempFilePath);
81
- },
82
- fail: (res) => {
83
- console.log('保存失败');
84
- },
85
- });
86
- });
87
- };
88
- const canvasSetting = (canvasDom, width, height) => {
89
- const canvas = canvasDom;
90
- canvas.current = canvas;
91
- ctx.current = canvas.getContext('2d');
92
- setCanvasWidth(width);
93
- setCanvasHeight(height);
94
- canvas.width = width;
95
- canvas.height = height;
96
- if (ctx.current) {
97
- ctx.current.clearRect(0, 0, width, height);
98
- ctx.current.beginPath();
99
- ctx.current.lineWidth = lineWidth;
100
- ctx.current.strokeStyle = strokeStyle;
101
- }
102
- };
103
- const initCanvas = () => {
104
- nextTick(() => {
105
- setTimeout(() => {
106
- if (getEnv() === 'WEAPP' || getEnv() === 'JD') {
107
- createSelectorQuery()
108
- .select(`#${canvasId}`)
109
- .fields({
110
- node: true,
111
- size: true,
112
- }, (res) => {
113
- const { node, width, height } = res;
114
- canvasSetting(node, width, height);
115
- })
116
- .exec();
117
- }
118
- else {
119
- const canvasDom = document.getElementById(`${canvasId}`);
120
- let canvas = canvasDom;
121
- if (canvasDom?.tagName !== 'CANVAS') {
122
- canvas = canvasDom?.getElementsByTagName('canvas')[0];
123
- }
124
- canvasSetting(canvas, canvasDom?.offsetWidth, canvasDom?.offsetHeight);
125
- }
126
- }, 1000);
127
- });
128
- };
129
- useEffect(() => {
130
- initCanvas();
131
- }, []);
132
- return (React__default.createElement("div", { className: `${b()} ${className}`, ...rest },
133
- React__default.createElement("div", { className: `${b('inner')} spcanvas_WEAPP`, ref: wrapRef }, getEnv() === 'WEAPP' || getEnv() === 'JD' ? (React__default.createElement("canvas", { id: canvasId, ref: canvasRef,
134
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
135
- // @ts-ignore
136
- canvasId: canvasId, disalbeScroll: true, type: "2d", onTouchStart: startEventHandler, onTouchMove: moveEventHandler, onTouchEnd: endEventHandler })) : (React__default.createElement("canvas", { id: canvasId, ref: canvasRef, "canvas-id": canvasId, "disalbe-scroll": disalbeScroll, onTouchStart: startEventHandler, onTouchMove: moveEventHandler, onTouchEnd: endEventHandler, onTouchCancel: endEventHandler }))),
137
- React__default.createElement(Button, { className: `${b('btn')}`, type: "default", onClick: () => handleClearBtn() }, locale.signature.reSign),
138
- React__default.createElement(Button, { className: `${b('btn')}`, type: "primary", onClick: () => handleConfirmBtn() }, locale.confirm)));
139
- };
140
- Signature.defaultProps = defaultProps;
141
- Signature.displayName = 'NutSignature';
142
-
143
- export { Signature as S };
@@ -1,62 +0,0 @@
1
- import React__default from 'react';
2
- import classNames from 'classnames';
3
- import { A as Avatar } from './avatar.taro-de157a1f.js';
4
- import { c as cn } from './bem-350c1702.js';
5
-
6
- const defaultProps = {
7
- width: '100px',
8
- height: '100px',
9
- row: 1,
10
- animated: false,
11
- title: false,
12
- avatar: false,
13
- round: false,
14
- avatarSize: '50px',
15
- loading: false,
16
- avatarShape: 'round',
17
- };
18
- const Skeleton = (props) => {
19
- const { className, width, height, animated, row, title, avatar, avatarSize, round, loading, children, avatarShape, ...restProps } = {
20
- ...defaultProps,
21
- ...props,
22
- };
23
- const b = cn('skeleton');
24
- const classes = classNames(className, b());
25
- const blockClass = classNames({
26
- blockClass: true,
27
- 'blockClass--round': round,
28
- });
29
- const avatarClass = classNames({
30
- avatarClass: true,
31
- [`avatarClass--${avatarShape}`]: avatarShape,
32
- });
33
- const repeatLines = (num) => {
34
- return Array.from({ length: num }, (v, i) => i);
35
- };
36
- const getStyle = () => {
37
- if (avatarSize) {
38
- return {
39
- width: avatarSize,
40
- height: avatarSize,
41
- };
42
- }
43
- return {
44
- width: '50px',
45
- height: '50px',
46
- };
47
- };
48
- return (React__default.createElement(React__default.Fragment, null, loading ? (React__default.createElement("div", null, children)) : (React__default.createElement("div", { className: classes, ...restProps },
49
- animated && React__default.createElement("div", { className: "skeleton-animation" }),
50
- React__default.createElement("div", { className: "nut-skeleton-content" },
51
- avatar && (React__default.createElement(Avatar, { className: avatarClass, bgColor: "rgb(239, 239, 239)", shape: avatarShape, style: getStyle() })),
52
- row === 1 && (React__default.createElement("div", { className: blockClass, style: { width, height } })),
53
- React__default.createElement("div", { className: "skeleton-content-line" },
54
- title && React__default.createElement("div", { className: "skeleton-title" }),
55
- repeatLines(row).map((item, index) => {
56
- return (React__default.createElement("div", { className: blockClass, key: index, style: { width, height } }));
57
- })))))));
58
- };
59
- Skeleton.defaultProps = defaultProps;
60
- Skeleton.displayName = 'NutSkeleton';
61
-
62
- export { Skeleton as S };
@@ -1,58 +0,0 @@
1
- import React__default, { useContext } from 'react';
2
- import classNames from 'classnames';
3
- import { D as DataContext } from './UserContext-e402e1a6.js';
4
- import { c as cn } from './bem-350c1702.js';
5
- import { C as ComponentDefaults } from './typings-d8491423.js';
6
-
7
- const defaultProps = {
8
- ...ComponentDefaults,
9
- title: '',
10
- content: '',
11
- activeIndex: 0,
12
- icon: '',
13
- };
14
- const Step = (props) => {
15
- const { children, title, content, activeIndex, icon, className, renderContent, ...restProps } = {
16
- ...defaultProps,
17
- ...props,
18
- };
19
- const parent = useContext(DataContext);
20
- const dot = parent.propSteps.progressDot;
21
- const getCurrentStatus = () => {
22
- const index = activeIndex;
23
- if (index < +parent.propSteps.current)
24
- return 'finish';
25
- return index === +parent.propSteps.current ? 'process' : 'wait';
26
- };
27
- const handleClickStep = () => {
28
- parent.propSteps?.onClickStep && parent.propSteps?.onClickStep(activeIndex);
29
- parent.propSteps?.clickStep && parent.propSteps?.clickStep(activeIndex);
30
- };
31
- const b = cn('step');
32
- const classes = classNames({
33
- [`${b('')}-${getCurrentStatus()}`]: true,
34
- }, className, b(''));
35
- const renderIconClass = () => {
36
- if (!dot && icon) {
37
- return 'nut-step-icon is-icon';
38
- }
39
- if (!dot && !icon) {
40
- return 'nut-step-icon is-text';
41
- }
42
- return 'nut-step-icon';
43
- };
44
- return (React__default.createElement("div", { className: classes, ...restProps, onClick: handleClickStep },
45
- React__default.createElement("div", { className: "nut-step-head" },
46
- React__default.createElement("div", { className: "nut-step-line" }),
47
- React__default.createElement("div", { className: renderIconClass() }, React__default.isValidElement(icon)
48
- ? icon
49
- : !dot && React__default.createElement("span", { className: "nut-step-inner" }, activeIndex))),
50
- React__default.createElement("div", { className: "nut-step-main" },
51
- React__default.createElement("span", { className: "nut-step-title" }, title),
52
- content && React__default.createElement("span", { className: "nut-step-content" }, content),
53
- renderContent && (React__default.createElement("span", { className: "nut-step-content" }, renderContent())))));
54
- };
55
- Step.defaultProps = defaultProps;
56
- Step.displayName = 'NutStep';
57
-
58
- export { Step as S };
@@ -1,30 +0,0 @@
1
- import React__default from 'react';
2
- import classNames from 'classnames';
3
- import { D as DataContext } from './UserContext-e402e1a6.js';
4
- import { c as cn } from './bem-350c1702.js';
5
-
6
- const defaultProps = {
7
- current: 0,
8
- direction: 'horizontal',
9
- progressDot: false,
10
- };
11
- const Steps = (props) => {
12
- const propSteps = { ...defaultProps, ...props };
13
- const { children, current, direction, className, progressDot, clickStep, onClickStep, ...restProps } = propSteps;
14
- const parentSteps = {
15
- propSteps,
16
- };
17
- const b = cn('steps');
18
- const classes = classNames({
19
- [`${b('')}-${direction}`]: true,
20
- [`${b('')}-dot`]: !!props.progressDot,
21
- }, className, b(''));
22
- return (React__default.createElement(DataContext.Provider, { value: parentSteps }, React__default.createElement('div', {
23
- className: classes,
24
- ...restProps,
25
- }, children)));
26
- };
27
- Steps.defaultProps = defaultProps;
28
- Steps.displayName = 'NutSteps';
29
-
30
- export { Steps as S };