@nutui/nutui-react-taro 1.5.2-beta.0 → 1.5.2-beta.1

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 (436) hide show
  1. package/dist/esm/ActionSheet/style/index.js +2 -0
  2. package/dist/esm/ActionSheet.js +16 -0
  3. package/dist/esm/Address/style/index.js +4 -0
  4. package/dist/esm/Address.js +23 -0
  5. package/dist/esm/Animate/style/index.js +2 -0
  6. package/dist/esm/Animate.js +9 -0
  7. package/dist/esm/AnimatingNumbers/style/index.js +3 -0
  8. package/dist/esm/AnimatingNumbers.js +9 -0
  9. package/dist/esm/Audio/style/index.js +4 -0
  10. package/dist/esm/Audio.js +21 -0
  11. package/dist/esm/Avatar/style/index.js +2 -0
  12. package/dist/esm/Avatar.js +13 -0
  13. package/dist/esm/AvatarContext-c96afdcc.js +5 -0
  14. package/dist/esm/AvatarGroup/style/index.js +2 -0
  15. package/dist/esm/AvatarGroup.js +13 -0
  16. package/dist/esm/BackTop/style/index.js +2 -0
  17. package/dist/esm/BackTop.js +11 -0
  18. package/dist/esm/Badge/style/index.js +2 -0
  19. package/dist/esm/Badge.js +11 -0
  20. package/dist/esm/Barrage/style/index.js +2 -0
  21. package/dist/esm/Barrage.js +10 -0
  22. package/dist/esm/Button/style/index.js +2 -0
  23. package/dist/esm/Button.js +10 -0
  24. package/dist/esm/Calendar/style/index.js +2 -0
  25. package/dist/esm/Calendar.js +21 -0
  26. package/dist/esm/CalendarItem/style/index.js +2 -0
  27. package/dist/esm/CalendarItem.js +14 -0
  28. package/dist/esm/Card/style/index.js +4 -0
  29. package/dist/esm/Card.js +13 -0
  30. package/dist/esm/Cascader/style/index.js +3 -0
  31. package/dist/esm/Cascader.js +18 -0
  32. package/dist/esm/Cell/style/index.js +2 -0
  33. package/dist/esm/Cell.js +11 -0
  34. package/dist/esm/CellGroup/style/index.js +2 -0
  35. package/dist/esm/CellGroup.js +8 -0
  36. package/dist/esm/Checkbox/style/index.js +3 -0
  37. package/dist/esm/Checkbox.js +10 -0
  38. package/dist/esm/CheckboxGroup/style/index.js +2 -0
  39. package/dist/esm/CheckboxGroup.js +10 -0
  40. package/dist/esm/CircleProgress/style/index.js +2 -0
  41. package/dist/esm/CircleProgress.js +10 -0
  42. package/dist/esm/Col/style/index.js +2 -0
  43. package/dist/esm/Col.js +8 -0
  44. package/dist/esm/Collapse/style/index.js +2 -0
  45. package/dist/esm/Collapse.js +9 -0
  46. package/dist/esm/CollapseItem/style/index.js +2 -0
  47. package/dist/esm/CollapseItem.js +10 -0
  48. package/dist/esm/ConfigProvider/style/index.js +2 -0
  49. package/dist/esm/ConfigProvider.js +8 -0
  50. package/dist/esm/CountDown/style/index.js +2 -0
  51. package/dist/esm/CountDown.js +11 -0
  52. package/dist/esm/DatePicker/style/index.js +2 -0
  53. package/dist/esm/DatePicker.js +26 -0
  54. package/dist/esm/Dialog/style/index.js +3 -0
  55. package/dist/esm/Dialog.js +17 -0
  56. package/dist/esm/Divider/style/index.js +2 -0
  57. package/dist/esm/Divider.js +9 -0
  58. package/dist/esm/Drag/style/index.js +2 -0
  59. package/dist/esm/Drag.js +9 -0
  60. package/dist/esm/Elevator/style/index.js +2 -0
  61. package/dist/esm/Elevator.js +10 -0
  62. package/dist/esm/Ellipsis/style/index.js +2 -0
  63. package/dist/esm/Ellipsis.js +11 -0
  64. package/dist/esm/Empty/style/index.js +2 -0
  65. package/dist/esm/Empty.js +11 -0
  66. package/dist/esm/FixedNav/style/index.js +3 -0
  67. package/dist/esm/FixedNav.js +16 -0
  68. package/dist/esm/Form/style/index.js +2 -0
  69. package/dist/esm/Form.js +14 -0
  70. package/dist/esm/FormItem/style/index.js +2 -0
  71. package/dist/esm/FormItem.js +12 -0
  72. package/dist/esm/Grid/style/index.js +2 -0
  73. package/dist/esm/Grid.js +13 -0
  74. package/dist/esm/GridItem/style/index.js +2 -0
  75. package/dist/esm/GridItem.js +15 -0
  76. package/dist/esm/Icon/style/index.js +4 -0
  77. package/dist/esm/Icon.js +8 -0
  78. package/dist/esm/Image/style/index.js +2 -0
  79. package/dist/esm/Image.js +12 -0
  80. package/dist/esm/ImagePreview/style/index.js +4 -0
  81. package/dist/esm/ImagePreview.js +20 -0
  82. package/dist/esm/Indicator/style/index.js +2 -0
  83. package/dist/esm/Indicator.js +9 -0
  84. package/dist/esm/Infiniteloading/style/index.js +2 -0
  85. package/dist/esm/Infiniteloading.js +16 -0
  86. package/dist/esm/Input/style/index.js +2 -0
  87. package/dist/esm/Input.js +13 -0
  88. package/dist/esm/InputNumber/style/index.js +2 -0
  89. package/dist/esm/InputNumber.js +11 -0
  90. package/dist/esm/Layout/style/index.js +2 -0
  91. package/dist/esm/Layout.js +6 -0
  92. package/dist/esm/Menu/style/index.js +3 -0
  93. package/dist/esm/Menu.js +11 -0
  94. package/dist/esm/MenuItem/style/index.js +3 -0
  95. package/dist/esm/MenuItem.js +17 -0
  96. package/dist/esm/NavBar/style/index.js +2 -0
  97. package/dist/esm/NavBar.js +11 -0
  98. package/dist/esm/NoticeBar/style/index.js +2 -0
  99. package/dist/esm/NoticeBar.js +12 -0
  100. package/dist/esm/Notify/style/index.js +2 -0
  101. package/dist/esm/Notify.js +10 -0
  102. package/dist/esm/NumberKeyboard/style/index.js +2 -0
  103. package/dist/esm/NumberKeyboard.js +19 -0
  104. package/dist/esm/Overlay/style/index.js +2 -0
  105. package/dist/esm/Overlay.js +10 -0
  106. package/dist/esm/Pagination/style/index.js +2 -0
  107. package/dist/esm/Pagination.js +11 -0
  108. package/dist/esm/Picker/style/index.js +2 -0
  109. package/dist/esm/Picker.js +24 -0
  110. package/dist/esm/Popover/style/index.js +3 -0
  111. package/dist/esm/Popover.js +14 -0
  112. package/dist/esm/Popup/style/index.js +3 -0
  113. package/dist/esm/Popup.js +15 -0
  114. package/dist/esm/Price/style/index.js +2 -0
  115. package/dist/esm/Price.js +8 -0
  116. package/dist/esm/Progress/style/index.js +2 -0
  117. package/dist/esm/Progress.js +11 -0
  118. package/dist/esm/PullToRefresh/style/index.js +2 -0
  119. package/dist/esm/PullToRefresh.js +14 -0
  120. package/dist/esm/Radio/style/index.js +3 -0
  121. package/dist/esm/Radio.js +10 -0
  122. package/dist/esm/RadioGroup/style/index.js +2 -0
  123. package/dist/esm/RadioGroup.js +10 -0
  124. package/dist/esm/Range/style/index.js +2 -0
  125. package/dist/esm/Range.js +16 -0
  126. package/dist/esm/Rate/style/index.js +2 -0
  127. package/dist/esm/Rate.js +11 -0
  128. package/dist/esm/Row/style/index.js +2 -0
  129. package/dist/esm/Row.js +8 -0
  130. package/dist/esm/SearchBar/style/index.js +2 -0
  131. package/dist/esm/SearchBar.js +14 -0
  132. package/dist/esm/ShortPassword/style/index.js +3 -0
  133. package/dist/esm/ShortPassword.js +19 -0
  134. package/dist/esm/SideNavBar/style/index.js +2 -0
  135. package/dist/esm/SideNavBar.js +20 -0
  136. package/dist/esm/SideNavBarItem/style/index.js +2 -0
  137. package/dist/esm/SideNavBarItem.js +6 -0
  138. package/dist/esm/Signature/style/index.js +2 -0
  139. package/dist/esm/Signature.js +15 -0
  140. package/dist/esm/Skeleton/style/index.js +2 -0
  141. package/dist/esm/Skeleton.js +14 -0
  142. package/dist/esm/Step/style/index.js +2 -0
  143. package/dist/esm/Step.js +12 -0
  144. package/dist/esm/Steps/style/index.js +2 -0
  145. package/dist/esm/Steps.js +10 -0
  146. package/dist/esm/Sticky/style/index.js +2 -0
  147. package/dist/esm/Sticky.js +13 -0
  148. package/dist/esm/SubSideNavBar/style/index.js +2 -0
  149. package/dist/esm/SubSideNavBar.js +7 -0
  150. package/dist/esm/Swipe/style/index.js +2 -0
  151. package/dist/esm/Swipe.js +12 -0
  152. package/dist/esm/Swiper/style/index.js +2 -0
  153. package/dist/esm/Swiper.js +11 -0
  154. package/dist/esm/SwiperItem/style/index.js +2 -0
  155. package/dist/esm/SwiperItem.js +10 -0
  156. package/dist/esm/Switch/style/index.js +2 -0
  157. package/dist/esm/Switch.js +8 -0
  158. package/dist/esm/TabPane/style/index.js +2 -0
  159. package/dist/esm/TabPane.js +9 -0
  160. package/dist/esm/Tabbar/style/index.js +2 -0
  161. package/dist/esm/Tabbar.js +8 -0
  162. package/dist/esm/TabbarItem/style/index.js +2 -0
  163. package/dist/esm/TabbarItem.js +11 -0
  164. package/dist/esm/Table/style/index.js +2 -0
  165. package/dist/esm/Table.js +14 -0
  166. package/dist/esm/Tabs/style/index.js +4 -0
  167. package/dist/esm/Tabs.js +12 -0
  168. package/dist/esm/Tag/style/index.js +2 -0
  169. package/dist/esm/Tag.js +11 -0
  170. package/dist/esm/TextArea/style/index.js +2 -0
  171. package/dist/esm/TextArea.js +11 -0
  172. package/dist/esm/TimeDetail/style/index.js +2 -0
  173. package/dist/esm/TimeDetail.js +11 -0
  174. package/dist/esm/TimePannel/style/index.js +2 -0
  175. package/dist/esm/TimePannel.js +11 -0
  176. package/dist/esm/TimeSelect/style/index.js +4 -0
  177. package/dist/esm/TimeSelect.js +21 -0
  178. package/dist/esm/Toast/style/index.js +2 -0
  179. package/dist/esm/Toast.js +10 -0
  180. package/dist/esm/TrendArrow/style/index.js +2 -0
  181. package/dist/esm/TrendArrow.js +9 -0
  182. package/dist/esm/Uploader/style/index.js +4 -0
  183. package/dist/esm/Uploader.js +19 -0
  184. package/dist/esm/UserContext-0aac9a82.js +5 -0
  185. package/dist/esm/UserContext-e402e1a6.js +5 -0
  186. package/dist/esm/UserContext-e8176108.js +5 -0
  187. package/dist/esm/Video/style/index.js +2 -0
  188. package/dist/esm/Video.js +9 -0
  189. package/dist/esm/VirtualList/style/index.js +2 -0
  190. package/dist/esm/VirtualList.js +11 -0
  191. package/dist/esm/WaterMark/style/index.js +2 -0
  192. package/dist/esm/WaterMark.js +13 -0
  193. package/dist/esm/actionsheet.taro-e6a51446.js +53 -0
  194. package/dist/esm/address.taro-3a9b6396.js +461 -0
  195. package/dist/esm/animate.taro-fb7986d6.js +40 -0
  196. package/dist/esm/animatingnumbers.taro-03e5d61d.js +104 -0
  197. package/dist/esm/audio.taro-87ec8bf2.js +161 -0
  198. package/dist/esm/avatar.taro-3676f38f.js +103 -0
  199. package/dist/esm/avatargroup-f3574510.js +34 -0
  200. package/dist/esm/backtop.taro-66394a36.js +48 -0
  201. package/dist/esm/badge.taro-a4e59c11.js +52 -0
  202. package/dist/esm/barrage.taro-0495a1b2.js +94 -0
  203. package/dist/esm/bem-350c1702.js +5 -0
  204. package/dist/esm/button.taro-9244d065.js +100 -0
  205. package/dist/esm/calendar.taro-670842ea.js +65 -0
  206. package/dist/esm/calendaritem.taro-2a603571.js +787 -0
  207. package/dist/esm/can-use-dom-3eeb5af4.js +6 -0
  208. package/dist/esm/card.taro-e4c76dad.js +33 -0
  209. package/dist/esm/cascader.taro-eb1fb011.js +438 -0
  210. package/dist/esm/cell.taro-a10a74d3.js +64 -0
  211. package/dist/esm/cellgroup.taro-abe501bc.js +25 -0
  212. package/dist/esm/checkbox.taro-6120e3e3.js +171 -0
  213. package/dist/esm/circleprogress.taro-79854448.js +109 -0
  214. package/dist/esm/col.taro-53eed3cc.js +41 -0
  215. package/dist/esm/collapse.taro-1a9e4ba2.js +83 -0
  216. package/dist/esm/collapseitem-4d0bc55d.js +83 -0
  217. package/dist/esm/configprovider-67d19d3a.js +19 -0
  218. package/dist/esm/configprovider.taro-8d71eb49.js +42 -0
  219. package/dist/esm/countdown.taro-5b17c607.js +226 -0
  220. package/dist/esm/datepicker.taro-6e9b4b8f.js +275 -0
  221. package/dist/esm/dialog.taro-a3267d29.js +118 -0
  222. package/dist/esm/divider.taro-26d1d8b4.js +35 -0
  223. package/dist/esm/drag.taro-79bb8744.js +110 -0
  224. package/dist/esm/elevator.taro-6019669e.js +178 -0
  225. package/dist/esm/ellipsis.taro-f15f26da.js +241 -0
  226. package/dist/esm/empty.taro-04ae4389.js +62 -0
  227. package/dist/esm/fixednav.taro-1f05acaf.js +53 -0
  228. package/dist/esm/form.taro-0c8e7a39.js +179 -0
  229. package/dist/esm/formitem.taro-190a3326.js +89 -0
  230. package/dist/esm/get-scroll-parent-b4a07e65.js +25 -0
  231. package/dist/esm/grid.taro-3503b82c.js +61 -0
  232. package/dist/esm/grid.taro.context-c2bbfb4f.js +8 -0
  233. package/dist/esm/griditem.taro-cdb3f119.js +98 -0
  234. package/dist/esm/icon-296a1bec.js +63 -0
  235. package/dist/esm/icon.taro-296a1bec.js +63 -0
  236. package/dist/esm/image.taro-142cf512.js +64 -0
  237. package/dist/esm/imagepreview.taro-c50bb0a3.js +167 -0
  238. package/dist/esm/index-5bcb0ff8.js +7 -0
  239. package/dist/esm/indicator.taro-cba8b010.js +37 -0
  240. package/dist/esm/infiniteloading.taro-183bccbf.js +144 -0
  241. package/dist/esm/input.taro-97af6c96.js +240 -0
  242. package/dist/esm/inputnumber.taro-91f65d17.js +130 -0
  243. package/dist/esm/layout.taro-9046d093.js +11 -0
  244. package/dist/esm/menu.taro-7e4038a1.js +99 -0
  245. package/dist/esm/menuitem.taro-96cc4f15.js +130 -0
  246. package/dist/esm/navbar.taro-777c4705.js +79 -0
  247. package/dist/esm/noticebar.taro-4a23cdee.js +448 -0
  248. package/dist/esm/notify.taro-e17c6f82.js +75 -0
  249. package/dist/esm/numberkeyboard.taro-1bc24744.js +159 -0
  250. package/dist/esm/nutui-react.es.js +119 -0
  251. package/dist/esm/offsetContext-c2a746fa.js +5 -0
  252. package/dist/esm/overlay.taro-21e87fb1.js +69 -0
  253. package/dist/esm/pagination.taro-715a173b.js +124 -0
  254. package/dist/esm/picker.taro-9ad1b7c5.js +473 -0
  255. package/dist/esm/popover.taro-ad5e76ea.js +156 -0
  256. package/dist/esm/popup.taro-01676bff.js +137 -0
  257. package/dist/esm/price.taro-776ed16e.js +83 -0
  258. package/dist/esm/progress.taro-f0ce38e9.js +90 -0
  259. package/dist/esm/pulltorefresh.taro-a294f656.js +181 -0
  260. package/dist/esm/radio.taro-a6eff96c.js +168 -0
  261. package/dist/esm/range.taro-d8fc7656.js +332 -0
  262. package/dist/esm/rate.taro-6cdf03bd.js +75 -0
  263. package/dist/esm/row.taro-f64d4a13.js +46 -0
  264. package/dist/esm/searchbar.taro-0c25927b.js +152 -0
  265. package/dist/esm/shortpassword.taro-9ee034f7.js +111 -0
  266. package/dist/esm/sidenavbar.taro-c307b35e.js +35 -0
  267. package/dist/esm/sidenavbaritem.taro-5a7965d0.js +12 -0
  268. package/dist/esm/signature.taro-ec4e713b.js +143 -0
  269. package/dist/esm/skeleton.taro-76faf63f.js +62 -0
  270. package/dist/esm/step.taro-b7903e8c.js +59 -0
  271. package/dist/esm/steps.taro-c82d2252.js +30 -0
  272. package/dist/esm/sticky.taro-218bda37.js +138 -0
  273. package/dist/esm/subsidenavbar.taro-69cb9752.js +63 -0
  274. package/dist/esm/supports-passive-c85ef996.js +18 -0
  275. package/dist/esm/swipe.taro-ea35f07f.js +177 -0
  276. package/dist/esm/swiper.taro-7a94e211.js +451 -0
  277. package/dist/esm/swiperitem-c9e3d0d5.js +29 -0
  278. package/dist/esm/switch.taro-34ca8228.js +50 -0
  279. package/dist/esm/tabbar.taro-9acfc2fa.js +59 -0
  280. package/dist/esm/tabbaritem.taro-bf517487.js +58 -0
  281. package/dist/esm/table.taro-91fc0c01.js +93 -0
  282. package/dist/esm/tabpane.taro-4ca340ef.js +23 -0
  283. package/dist/esm/tabs.taro-6a7524a4.js +140 -0
  284. package/dist/esm/tag.taro-23ba0834.js +92 -0
  285. package/dist/esm/textarea.taro-442e7350.js +94 -0
  286. package/dist/esm/timedetail.taro-5b2f2269.js +44 -0
  287. package/dist/esm/timepannel.taro-d6e40180.js +22 -0
  288. package/dist/esm/timeselect.taro-a07036f4.js +133 -0
  289. package/dist/esm/toast.taro-d6c14811.js +109 -0
  290. package/dist/esm/trendarrow.taro-b8c5ccd9.js +73 -0
  291. package/dist/esm/typings-b9828dba.js +9 -0
  292. package/dist/esm/uploader.taro-587e6bf3.js +492 -0
  293. package/dist/esm/useClientRect-1f8ed1fe.js +18 -0
  294. package/dist/esm/useTouch-db24bb5c.js +69 -0
  295. package/dist/esm/video-f1be8a91.js +67 -0
  296. package/dist/esm/virtuallist.taro-f0b0270d.js +214 -0
  297. package/dist/esm/watermark.taro-9ce2ae37.js +114 -0
  298. package/dist/esm/zh-CN-c779e6c1.js +131 -0
  299. package/dist/locales/base.d.ts +129 -0
  300. package/dist/locales/base.js +5 -0
  301. package/dist/locales/en-US.d.ts +3 -0
  302. package/dist/locales/en-US.js +135 -0
  303. package/dist/locales/id-ID.d.ts +3 -0
  304. package/dist/locales/id-ID.js +135 -0
  305. package/dist/locales/zh-CN.d.ts +3 -0
  306. package/dist/locales/zh-CN.js +137 -0
  307. package/dist/locales/zh-TW.d.ts +3 -0
  308. package/dist/locales/zh-TW.js +135 -0
  309. package/dist/locales/zh-UG.d.ts +3 -0
  310. package/dist/locales/zh-UG.js +135 -0
  311. package/dist/nutui.react.mjs +1 -1
  312. package/dist/nutui.react.umd.js +1 -1
  313. package/dist/packages/actionsheet/actionsheet.scss +103 -0
  314. package/dist/packages/address/address.scss +243 -0
  315. package/dist/packages/animate/animate.scss +284 -0
  316. package/dist/packages/animatingnumbers/animatingnumbers.scss +0 -0
  317. package/dist/packages/animatingnumbers/countup.scss +45 -0
  318. package/dist/packages/audio/audio.scss +93 -0
  319. package/dist/packages/avatar/avatar.scss +58 -0
  320. package/dist/packages/avatargroup/avatargroup.scss +14 -0
  321. package/dist/packages/backtop/backtop.scss +29 -0
  322. package/dist/packages/badge/badge.scss +53 -0
  323. package/dist/packages/barrage/barrage.scss +60 -0
  324. package/dist/packages/button/button.scss +245 -0
  325. package/dist/packages/calendar/calendar.scss +265 -0
  326. package/dist/packages/calendaritem/calendaritem.scss +0 -0
  327. package/dist/packages/card/card.scss +83 -0
  328. package/dist/packages/cascader/cascader.scss +108 -0
  329. package/dist/packages/cell/cell.scss +107 -0
  330. package/dist/packages/cellgroup/cellgroup.scss +46 -0
  331. package/dist/packages/checkbox/checkbox.scss +49 -0
  332. package/dist/packages/checkboxgroup/checkboxgroup.scss +33 -0
  333. package/dist/packages/circleprogress/circleprogress.scss +33 -0
  334. package/dist/packages/col/col.scss +24 -0
  335. package/dist/packages/collapse/collapse.scss +0 -0
  336. package/dist/packages/collapseitem/collapseitem.scss +161 -0
  337. package/dist/packages/configprovider/configprovider.scss +0 -0
  338. package/dist/packages/countdown/countdown.scss +3 -0
  339. package/dist/packages/datepicker/datepicker.scss +0 -0
  340. package/dist/packages/dialog/dialog.scss +135 -0
  341. package/dist/packages/divider/divider.scss +73 -0
  342. package/dist/packages/drag/drag.scss +10 -0
  343. package/dist/packages/elevator/elevator.scss +124 -0
  344. package/dist/packages/ellipsis/ellipsis.scss +17 -0
  345. package/dist/packages/empty/empty.scss +42 -0
  346. package/dist/packages/fixednav/fixednav.scss +141 -0
  347. package/dist/packages/form/form.scss +31 -0
  348. package/dist/packages/formitem/formitem.scss +100 -0
  349. package/dist/packages/grid/grid.scss +10 -0
  350. package/dist/packages/griditem/griditem.scss +108 -0
  351. package/dist/packages/icon/icon.scss +132 -0
  352. package/dist/packages/image/image.scss +53 -0
  353. package/dist/packages/imagepreview/imagepreview.scss +51 -0
  354. package/dist/packages/indicator/indicator.scss +70 -0
  355. package/dist/packages/infiniteloading/infiniteloading.scss +69 -0
  356. package/dist/packages/input/input.scss +203 -0
  357. package/dist/packages/inputnumber/inputnumber.scss +79 -0
  358. package/dist/packages/layout/layout.scss +2 -0
  359. package/dist/packages/menu/menu.scss +75 -0
  360. package/dist/packages/menuitem/menuitem.scss +120 -0
  361. package/dist/packages/navbar/navbar.scss +185 -0
  362. package/dist/packages/noticebar/noticebar.scss +156 -0
  363. package/dist/packages/notify/notify.scss +93 -0
  364. package/dist/packages/numberkeyboard/numberkeyboard.scss +147 -0
  365. package/dist/packages/overlay/overlay.scss +75 -0
  366. package/dist/packages/pagination/pagination.scss +81 -0
  367. package/dist/packages/picker/picker.scss +225 -0
  368. package/dist/packages/popover/popover.scss +288 -0
  369. package/dist/packages/popup/popup.scss +201 -0
  370. package/dist/packages/price/price.scss +37 -0
  371. package/dist/packages/progress/progress.scss +114 -0
  372. package/dist/packages/pulltorefresh/pulltorefresh.scss +26 -0
  373. package/dist/packages/radio/radio.scss +84 -0
  374. package/dist/packages/radiogroup/radiogroup.scss +86 -0
  375. package/dist/packages/range/range.scss +224 -0
  376. package/dist/packages/rate/rate.scss +36 -0
  377. package/dist/packages/row/row.scss +83 -0
  378. package/dist/packages/searchbar/searchbar.scss +146 -0
  379. package/dist/packages/shortpassword/shortpassword.scss +203 -0
  380. package/dist/packages/sidenavbar/sidenavbar.scss +100 -0
  381. package/dist/packages/sidenavbaritem/sidenavbaritem.scss +25 -0
  382. package/dist/packages/signature/signature.scss +39 -0
  383. package/dist/packages/skeleton/skeleton.scss +70 -0
  384. package/dist/packages/step/step.scss +274 -0
  385. package/dist/packages/steps/steps.scss +7 -0
  386. package/dist/packages/sticky/sticky.scss +3 -0
  387. package/dist/packages/subsidenavbar/subsidenavbar.scss +35 -0
  388. package/dist/packages/swipe/swipe.scss +33 -0
  389. package/dist/packages/swiper/swiper.scss +45 -0
  390. package/dist/packages/swiperitem/swiperitem.scss +3 -0
  391. package/dist/packages/switch/switch.scss +87 -0
  392. package/dist/packages/tabbar/tabbar.scss +46 -0
  393. package/dist/packages/tabbaritem/tabbaritem.scss +97 -0
  394. package/dist/packages/table/table.scss +152 -0
  395. package/dist/packages/tabpane/tabpane.scss +23 -0
  396. package/dist/packages/tabs/tabs.scss +284 -0
  397. package/dist/packages/tag/tag.scss +67 -0
  398. package/dist/packages/textarea/textarea.scss +60 -0
  399. package/dist/packages/timedetail/timedetail.scss +45 -0
  400. package/dist/packages/timepannel/timepannel.scss +17 -0
  401. package/dist/packages/timeselect/timeselect.scss +73 -0
  402. package/dist/packages/toast/toast.scss +98 -0
  403. package/dist/packages/trendarrow/trendarrow.scss +17 -0
  404. package/dist/packages/uploader/uploader.scss +237 -0
  405. package/dist/packages/video/video.scss +18 -0
  406. package/dist/packages/virtuallist/virtuallist.scss +87 -0
  407. package/dist/packages/watermark/watermark.scss +13 -0
  408. package/dist/style.css +1 -0
  409. package/dist/style.mjs +9 -0
  410. package/dist/styles/animation/drop.scss +24 -0
  411. package/dist/styles/animation/ease.scss +23 -0
  412. package/dist/styles/animation/fade.scss +20 -0
  413. package/dist/styles/animation/icon.scss +245 -0
  414. package/dist/styles/animation/index.scss +7 -0
  415. package/dist/styles/animation/rotate.scss +10 -0
  416. package/dist/styles/animation/zoom.scss +26 -0
  417. package/dist/styles/font/config.json +175 -0
  418. package/dist/styles/font/demo.css +539 -0
  419. package/dist/styles/font/demo_index.html +3063 -0
  420. package/dist/styles/font/iconfont.css +515 -0
  421. package/dist/styles/font/iconfont.eot +0 -0
  422. package/dist/styles/font/iconfont.js +68 -0
  423. package/dist/styles/font/iconfont.json +884 -0
  424. package/dist/styles/font/iconfont.svg +356 -0
  425. package/dist/styles/font/iconfont.ttf +0 -0
  426. package/dist/styles/font/iconfont.woff +0 -0
  427. package/dist/styles/font/iconfont.woff2 +0 -0
  428. package/dist/styles/mixins/index.scss +2 -0
  429. package/dist/styles/mixins/make-animation.scss +24 -0
  430. package/dist/styles/mixins/text-ellipsis.scss +20 -0
  431. package/dist/styles/theme-dark.scss +26 -0
  432. package/dist/styles/theme-default.scss +40 -0
  433. package/dist/styles/themes/default.scss +97 -0
  434. package/dist/styles/variables.scss +2610 -0
  435. package/dist/types/index.d.ts +2194 -0
  436. package/package.json +1 -1
@@ -0,0 +1,111 @@
1
+ import React__default, { useRef, useState, useEffect } from 'react';
2
+ import { c as cn } from './bem-350c1702.js';
3
+ import { P as Popup } from './popup.taro-01676bff.js';
4
+ import { I as Icon } from './icon.taro-296a1bec.js';
5
+ import { u as useConfig } from './configprovider.taro-8d71eb49.js';
6
+ import { C as ComponentDefaults } from './typings-b9828dba.js';
7
+
8
+ const defaultProps = {
9
+ ...ComponentDefaults,
10
+ title: '',
11
+ desc: '',
12
+ tips: '',
13
+ visible: false,
14
+ modelValue: '',
15
+ errorMsg: '',
16
+ noButton: true,
17
+ closeOnClickOverlay: true,
18
+ length: 6,
19
+ className: '',
20
+ autoFocus: false,
21
+ onChange: (value) => { },
22
+ onOk: (value) => { },
23
+ onCancel: () => { },
24
+ onClose: () => { },
25
+ onTips: () => { },
26
+ onComplete: (value) => { },
27
+ };
28
+ const ShortPassword = (props) => {
29
+ const { locale } = useConfig();
30
+ const { title, desc, tips, visible, modelValue, errorMsg, noButton, closeOnClickOverlay, length, style, className, onChange, onOk, onTips, onCancel, onClose, onComplete, iconClassPrefix, iconFontClassName, autoFocus, ...reset } = props;
31
+ const b = cn('shortpassword');
32
+ const textInput = useRef(null);
33
+ const range = (val) => {
34
+ return Math.min(Math.max(4, val), 6);
35
+ };
36
+ const [innerVisible, setInnerVisible] = useState(visible);
37
+ const [comLen, setComLen] = useState(range(Number(length)));
38
+ const [inputValue, setInputValue] = useState('');
39
+ useEffect(() => {
40
+ setInnerVisible(visible);
41
+ }, [visible]);
42
+ useEffect(() => {
43
+ if (typeof modelValue !== 'undefined') {
44
+ setInputValue(modelValue);
45
+ }
46
+ }, [modelValue]);
47
+ const changeValue = (e) => {
48
+ let inputValue = e.target.value;
49
+ if (String(inputValue).length > comLen) {
50
+ inputValue = inputValue.slice(0, comLen);
51
+ }
52
+ setInputValue(inputValue);
53
+ if (String(inputValue).length === comLen) {
54
+ onComplete && onComplete(inputValue);
55
+ }
56
+ onChange && onChange(inputValue);
57
+ };
58
+ const systemStyle = () => {
59
+ const u = navigator.userAgent;
60
+ const isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; // g
61
+ const isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); // ios终端
62
+ let style = {};
63
+ if (isIOS) {
64
+ style = {
65
+ paddingRight: '1200px',
66
+ };
67
+ }
68
+ if (isAndroid) {
69
+ style = {
70
+ opacity: 0,
71
+ zIndex: 10,
72
+ };
73
+ }
74
+ return style;
75
+ };
76
+ const focus = () => {
77
+ if (textInput.current) {
78
+ textInput.current.focus();
79
+ }
80
+ };
81
+ const sure = () => {
82
+ onOk && onOk(inputValue);
83
+ };
84
+ return (React__default.createElement("div", null,
85
+ React__default.createElement(Popup, { style: {
86
+ padding: '32px 24px 28px 24px',
87
+ borderRadius: '12px',
88
+ textAlign: 'center',
89
+ }, visible: innerVisible, closeable: true, "close-on-click-overlay": closeOnClickOverlay, onClickOverlay: onClose, onClickCloseIcon: onClose },
90
+ React__default.createElement("div", { className: `${b()} ${className}`, style: { ...style }, ...reset },
91
+ React__default.createElement("div", { className: b('title') }, title || locale.shortpassword.title),
92
+ React__default.createElement("div", { className: b('subtitle') }, desc || locale.shortpassword.desc),
93
+ React__default.createElement("div", { className: b('input') },
94
+ React__default.createElement("input", { ref: textInput, className: b('input-real'), type: "number", style: systemStyle(), maxLength: 6, value: inputValue, autoFocus: autoFocus, onChange: (e) => changeValue(e) }),
95
+ React__default.createElement("div", { className: b('input-site') }),
96
+ React__default.createElement("div", { className: b('input-fake'), onClick: () => focus() }, [...new Array(comLen).keys()].map((item, index) => {
97
+ 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));
98
+ }))),
99
+ React__default.createElement("div", { className: b('message') },
100
+ React__default.createElement("div", { className: b('message__error') }, errorMsg),
101
+ tips || locale.shortpassword.tips ? (React__default.createElement("div", { className: b('message__forget') },
102
+ React__default.createElement(Icon, { classPrefix: iconClassPrefix, fontClassName: iconFontClassName, className: "icon", size: "11px", name: "tips" }),
103
+ React__default.createElement("div", { onClick: onTips }, tips || locale.shortpassword.tips))) : null),
104
+ !noButton ? (React__default.createElement("div", { className: b('footer') },
105
+ React__default.createElement("div", { className: b('footer__cancel'), onClick: onCancel }, locale.cancel),
106
+ React__default.createElement("div", { className: b('footer__sure'), onClick: () => sure() }, locale.confirm))) : null))));
107
+ };
108
+ ShortPassword.defaultProps = defaultProps;
109
+ ShortPassword.displayName = 'NutShortPassword';
110
+
111
+ export { ShortPassword as S };
@@ -0,0 +1,35 @@
1
+ import React__default, { useState } from 'react';
2
+ import { u as useConfig } from './configprovider.taro-8d71eb49.js';
3
+ import { P as Popup } from './popup.taro-01676bff.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 };
@@ -0,0 +1,12 @@
1
+ import React__default from 'react';
2
+
3
+ const SideNavBarItem = (props) => {
4
+ const { title, ikey, children, onClick, ...rest } = props;
5
+ const clickFn = (e) => {
6
+ e.stopPropagation();
7
+ onClick && onClick({ title, ikey });
8
+ };
9
+ return (React__default.createElement("div", { className: "nut-subsidenavbar__item border-bt", onClick: clickFn, ...rest }, title));
10
+ };
11
+
12
+ export { SideNavBarItem as S };
@@ -0,0 +1,143 @@
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-9244d065.js';
4
+ import { c as cn } from './bem-350c1702.js';
5
+ import { u as useConfig } from './configprovider.taro-8d71eb49.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 };
@@ -0,0 +1,62 @@
1
+ import React__default from 'react';
2
+ import classNames from 'classnames';
3
+ import { A as Avatar } from './avatar.taro-3676f38f.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 };
@@ -0,0 +1,59 @@
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 { I as Icon } from './icon.taro-296a1bec.js';
6
+ import { C as ComponentDefaults } from './typings-b9828dba.js';
7
+
8
+ const defaultProps = {
9
+ ...ComponentDefaults,
10
+ title: '',
11
+ content: '',
12
+ activeIndex: 0,
13
+ icon: '',
14
+ iconColor: '',
15
+ size: '12px',
16
+ };
17
+ const Step = (props) => {
18
+ const { children, title, content, activeIndex, icon, iconColor, size, className, renderContent, iconClassPrefix, iconFontClassName, ...restProps } = {
19
+ ...defaultProps,
20
+ ...props,
21
+ };
22
+ const parent = useContext(DataContext);
23
+ const dot = parent.propSteps.progressDot;
24
+ const getCurrentStatus = () => {
25
+ const index = activeIndex;
26
+ if (index < +parent.propSteps.current)
27
+ return 'finish';
28
+ return index === +parent.propSteps.current ? 'process' : 'wait';
29
+ };
30
+ const handleClickStep = () => {
31
+ parent.propSteps?.onClickStep && parent.propSteps?.onClickStep(activeIndex);
32
+ parent.propSteps?.clickStep && parent.propSteps?.clickStep(activeIndex);
33
+ };
34
+ const b = cn('step');
35
+ const classes = classNames({
36
+ [`${b('')}-${getCurrentStatus()}`]: true,
37
+ }, className, b(''));
38
+ const renderIconClass = () => {
39
+ if (!dot && icon) {
40
+ return 'nut-step-icon is-icon';
41
+ }
42
+ if (!dot && !icon) {
43
+ return 'nut-step-icon is-text';
44
+ }
45
+ return 'nut-step-icon';
46
+ };
47
+ return (React__default.createElement("div", { className: classes, ...restProps, onClick: handleClickStep },
48
+ React__default.createElement("div", { className: "nut-step-head" },
49
+ React__default.createElement("div", { className: "nut-step-line" }),
50
+ React__default.createElement("div", { className: renderIconClass() }, icon ? (React__default.createElement(Icon, { classPrefix: iconClassPrefix, fontClassName: iconFontClassName, className: "nut-step-icon-inner", color: iconColor, name: icon, size: size })) : (!dot && React__default.createElement("span", { className: "nut-step-inner" }, activeIndex)))),
51
+ React__default.createElement("div", { className: "nut-step-main" },
52
+ React__default.createElement("span", { className: "nut-step-title" }, title),
53
+ content && React__default.createElement("span", { className: "nut-step-content" }, content),
54
+ renderContent && (React__default.createElement("span", { className: "nut-step-content" }, renderContent())))));
55
+ };
56
+ Step.defaultProps = defaultProps;
57
+ Step.displayName = 'NutStep';
58
+
59
+ export { Step as S };
@@ -0,0 +1,30 @@
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 };
@@ -0,0 +1,138 @@
1
+ import React__default, { useRef, useEffect, useState, useMemo, useCallback } from 'react';
2
+ import classNames from 'classnames';
3
+ import { getEnv, usePageScroll, getSystemInfoSync } from '@tarojs/taro';
4
+ import { g as getRectByTaro } from './useClientRect-1f8ed1fe.js';
5
+ import { g as getScrollParent } from './get-scroll-parent-b4a07e65.js';
6
+ import { c as cn } from './bem-350c1702.js';
7
+
8
+ function useWatch(dep, callback, config = { immediate: false }) {
9
+ const { immediate } = config;
10
+ const prev = useRef();
11
+ const inited = useRef(false);
12
+ const stop = useRef(false);
13
+ useEffect(() => {
14
+ const execute = () => callback(prev.current);
15
+ if (!stop.current) {
16
+ if (!inited.current) {
17
+ inited.current = true;
18
+ if (immediate) {
19
+ execute();
20
+ }
21
+ }
22
+ else {
23
+ execute();
24
+ }
25
+ prev.current = dep;
26
+ }
27
+ }, [dep]);
28
+ return () => {
29
+ stop.current = true;
30
+ };
31
+ }
32
+
33
+ const defaultProps = {
34
+ position: 'top',
35
+ top: 0,
36
+ bottom: 0,
37
+ zIndex: 2000,
38
+ };
39
+ const b = cn('sticky');
40
+ const Sticky = (props) => {
41
+ const { position = 'top', top = 0, bottom = 0, zIndex = 2000, children, container, className, onChange, ...rest } = props;
42
+ const stickyRef = useRef(null);
43
+ const rootRef = useRef(null);
44
+ const offset = position === 'top' ? top : bottom;
45
+ const [rootRect, setRootRect] = useState({});
46
+ const [fixed, setFixed] = useState(false);
47
+ const [transform, setTransform] = useState(0); // 相对容器偏移距离
48
+ useWatch(fixed, () => {
49
+ onChange && onChange(fixed);
50
+ });
51
+ const rootStyle = useMemo(() => {
52
+ if (!fixed) {
53
+ return {
54
+ height: '',
55
+ width: '',
56
+ };
57
+ }
58
+ const style = {};
59
+ if (rootRect.height) {
60
+ style.height = rootRect.height;
61
+ }
62
+ if (rootRect.width) {
63
+ style.width = rootRect.width;
64
+ }
65
+ return style;
66
+ }, [fixed, rootRect.height, rootRect.width]);
67
+ const stickyStyle = useMemo(() => {
68
+ if (!fixed) {
69
+ return {
70
+ height: '',
71
+ width: '',
72
+ [position]: '',
73
+ };
74
+ }
75
+ let style = {};
76
+ if (rootRect.height)
77
+ style.height = rootRect.height;
78
+ if (rootRect.width)
79
+ style.width = rootRect.width;
80
+ style.transform = `translate3d(0, ${transform}px, 0)`;
81
+ style[position] = offset;
82
+ style.zIndex = zIndex;
83
+ return style;
84
+ }, [fixed, rootRect.height, rootRect.width, transform, position]);
85
+ const handleScroll = async (scrollTop) => {
86
+ const curRootRect = await getRectByTaro(rootRef.current);
87
+ const stickyRect = await getRectByTaro(stickyRef.current);
88
+ if (curRootRect && stickyRect) {
89
+ setRootRect(curRootRect);
90
+ if (position === 'top') {
91
+ if (container) {
92
+ const containerRect = await getRectByTaro(container.current);
93
+ const difference = containerRect.bottom - top - curRootRect.height;
94
+ const curTransform = difference < 0 ? difference : 0;
95
+ setTransform(curTransform);
96
+ const curFixed = top > curRootRect.top && containerRect.bottom > 0;
97
+ setFixed(curFixed);
98
+ }
99
+ else {
100
+ setFixed(top > curRootRect.top);
101
+ }
102
+ }
103
+ else {
104
+ const windowHeight = getSystemInfoSync().windowHeight;
105
+ setFixed(windowHeight - offset < curRootRect.bottom);
106
+ }
107
+ }
108
+ else {
109
+ console.log('getRectByTaro获取失败', { stickyRect, curRootRect });
110
+ }
111
+ };
112
+ const getElement = useCallback(() => {
113
+ return getScrollParent(rootRef.current);
114
+ }, []);
115
+ useEffect(() => {
116
+ if (getEnv() === 'WEB' && getElement() !== window) {
117
+ window.addEventListener('touchmove', handleScroll, true);
118
+ window.addEventListener('scroll', handleScroll, true);
119
+ return () => {
120
+ window.removeEventListener('touchmove', handleScroll);
121
+ window.removeEventListener('scroll', handleScroll);
122
+ };
123
+ }
124
+ }, []);
125
+ usePageScroll((res) => {
126
+ if (getEnv() === 'WEAPP') {
127
+ handleScroll(res.scrollTop);
128
+ }
129
+ });
130
+ return (React__default.createElement("div", { ref: rootRef, style: rootStyle, className: classNames(b(), className), ...rest },
131
+ React__default.createElement("div", {
132
+ // 应符合 bem 规范
133
+ className: classNames('nut-sticky-box', { 'nut-sticky-fixed': fixed }), ref: stickyRef, style: stickyStyle }, children)));
134
+ };
135
+ Sticky.defaultProps = defaultProps;
136
+ Sticky.displayName = 'NutSticky';
137
+
138
+ export { Sticky as S };
@@ -0,0 +1,63 @@
1
+ import React__default, { useState, useContext, useRef, useCallback, useEffect } from 'react';
2
+ import { O as OffsetContext } from './offsetContext-c2a746fa.js';
3
+
4
+ const defaultProps = {
5
+ open: true,
6
+ };
7
+ const SubSideNavBar = (props) => {
8
+ const { title, ikey, children, onClick, open, ...rest } = {
9
+ ...defaultProps,
10
+ ...props,
11
+ };
12
+ const [subShow, setSubShow] = useState(open);
13
+ const offset = useContext(OffsetContext);
14
+ const listRef = useRef(null);
15
+ const setListLevel = useCallback((nodeList, level = 1) => {
16
+ const titleClass = nodeList[0].className;
17
+ if (titleClass.includes('nut-subsidenavbar__title')) {
18
+ const left = offset * (level + 1);
19
+ nodeList[0].style.paddingLeft = `${left}px`;
20
+ }
21
+ const childNodes = nodeList[1] &&
22
+ nodeList[1].children &&
23
+ Array.from(nodeList[1].children).filter((item) => item.nodeType !== 3 && item.nodeType !== 8);
24
+ childNodes.forEach((item) => {
25
+ const itemClass = item.className;
26
+ if (itemClass.includes('nut-subsidenavbar__item')) {
27
+ const left = offset * (level + 2);
28
+ item.style.paddingLeft = `${left}px`;
29
+ }
30
+ if (itemClass.includes('nut-subsidenavbar__list')) {
31
+ let level = item.getAttribute('level')
32
+ ? Number(item.getAttribute('level'))
33
+ : 1;
34
+ level += 1;
35
+ item.setAttribute('level', level.toString());
36
+ item.children && setListLevel(item.children, level);
37
+ }
38
+ });
39
+ }, [offset]);
40
+ const clickFn = (e) => {
41
+ e.stopPropagation();
42
+ setSubShow(!subShow);
43
+ const isShow = !subShow;
44
+ onClick && onClick({ title, ikey, isShow });
45
+ };
46
+ useEffect(() => {
47
+ const childNodes = listRef.current?.children;
48
+ listRef.current?.setAttribute('level', '1');
49
+ childNodes && setListLevel(childNodes);
50
+ }, [setListLevel]);
51
+ const divClass = subShow
52
+ ? 'nut-subsidenavbar__list nutShow'
53
+ : 'nut-subsidenavbar__list nutHide';
54
+ const iconClass = subShow ? 'arrow-icon arrow-down' : 'arrow-icon arrow-up';
55
+ return (React__default.createElement("div", { className: divClass, ref: listRef, onClick: clickFn, ...rest },
56
+ React__default.createElement("div", { className: "nut-subsidenavbar__title border-bt" },
57
+ title,
58
+ " ",
59
+ React__default.createElement("i", { className: iconClass })),
60
+ React__default.createElement("div", { className: "nut-subsidenavbar__content" }, children)));
61
+ };
62
+
63
+ export { SubSideNavBar as S };
@@ -0,0 +1,18 @@
1
+ import { c as canUseDom } from './can-use-dom-3eeb5af4.js';
2
+
3
+ let passiveSupported = false;
4
+ if (canUseDom) {
5
+ try {
6
+ const opts = Object.defineProperty({}, 'passive', {
7
+ get() {
8
+ passiveSupported = true;
9
+ },
10
+ });
11
+ window.addEventListener('test-passive-supported', null, opts);
12
+ }
13
+ catch (e) {
14
+ console.log(e);
15
+ }
16
+ }
17
+
18
+ export { passiveSupported as p };