@nutui/nutui-react-taro 3.0.11 → 3.0.12

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 (342) hide show
  1. package/CHANGELOG.md +20 -7
  2. package/dist/cjs/packages/actionsheet/style/style.harmony.css +90 -0
  3. package/dist/cjs/packages/address/style/address.scss +114 -0
  4. package/dist/cjs/packages/address/style/style.css +103 -0
  5. package/dist/cjs/packages/address/style/style.harmony.css +151 -0
  6. package/dist/cjs/packages/address/style-jmapp/address.scss +114 -0
  7. package/dist/cjs/packages/address/style-jmapp/style.css +103 -0
  8. package/dist/cjs/packages/address/style-jrkf/address.scss +114 -0
  9. package/dist/cjs/packages/address/style-jrkf/style.css +103 -0
  10. package/dist/cjs/packages/animate/style/style.harmony.css +236 -0
  11. package/dist/cjs/packages/animatingnumbers/style/style.harmony.css +45 -0
  12. package/dist/cjs/packages/audio/style/style.harmony.css +75 -0
  13. package/dist/cjs/packages/avatar/style/style.harmony.css +64 -0
  14. package/dist/cjs/packages/avatarcropper/style/style.harmony.css +135 -0
  15. package/dist/cjs/packages/avatargroup/style/style.harmony.css +24 -0
  16. package/dist/cjs/packages/backtop/style/style.harmony.css +21 -0
  17. package/dist/cjs/packages/badge/style/style.harmony.css +112 -0
  18. package/dist/cjs/packages/barrage/style/style.harmony.css +84 -0
  19. package/dist/cjs/packages/button/style/style.harmony.css +446 -0
  20. package/dist/cjs/packages/calendar/style/style.harmony.css +216 -0
  21. package/dist/cjs/packages/calendarcard/style/style.harmony.css +186 -0
  22. package/dist/cjs/packages/calendaritem/style/style.harmony.css +4 -0
  23. package/dist/cjs/packages/card/style/style.harmony.css +82 -0
  24. package/dist/cjs/packages/cascader/style/style.harmony.css +70 -0
  25. package/dist/cjs/packages/cell/style/style.harmony.css +91 -0
  26. package/dist/cjs/packages/cellgroup/style/style.harmony.css +31 -0
  27. package/dist/cjs/packages/checkbox/style/style.harmony.css +171 -0
  28. package/dist/cjs/packages/checkboxgroup/style/style.harmony.css +69 -0
  29. package/dist/cjs/packages/circleprogress/style/style.harmony.css +31 -0
  30. package/dist/cjs/packages/col/style/style.harmony.css +360 -0
  31. package/dist/cjs/packages/collapse/style/style.harmony.css +4 -0
  32. package/dist/cjs/packages/collapseitem/style/style.harmony.css +119 -0
  33. package/dist/cjs/packages/configprovider/style/style.harmony.css +4 -0
  34. package/dist/cjs/packages/configprovider/types.d.ts +1 -1
  35. package/dist/cjs/packages/countdown/style/style.harmony.css +113 -0
  36. package/dist/cjs/packages/datepicker/style/style.harmony.css +4 -0
  37. package/dist/cjs/packages/datepickerview/style/style.harmony.css +8 -0
  38. package/dist/cjs/packages/dialog/style/style.harmony.css +167 -0
  39. package/dist/cjs/packages/divider/style/style.harmony.css +72 -0
  40. package/dist/cjs/packages/drag/style/style.harmony.css +19 -0
  41. package/dist/cjs/packages/elevator/style/css.js +0 -2
  42. package/dist/cjs/packages/elevator/style/elevator.scss +116 -95
  43. package/dist/cjs/packages/elevator/style/index.js +0 -2
  44. package/dist/cjs/packages/elevator/style/style.css +98 -83
  45. package/dist/cjs/packages/elevator/style/style.harmony.css +127 -0
  46. package/dist/cjs/packages/elevator/style-jmapp/css.js +0 -2
  47. package/dist/cjs/packages/elevator/style-jmapp/elevator.scss +116 -95
  48. package/dist/cjs/packages/elevator/style-jmapp/index.js +0 -2
  49. package/dist/cjs/packages/elevator/style-jmapp/style.css +98 -83
  50. package/dist/cjs/packages/elevator/style-jrkf/css.js +0 -2
  51. package/dist/cjs/packages/elevator/style-jrkf/elevator.scss +116 -95
  52. package/dist/cjs/packages/elevator/style-jrkf/index.js +0 -2
  53. package/dist/cjs/packages/elevator/style-jrkf/style.css +98 -83
  54. package/dist/cjs/packages/ellipsis/style/style.harmony.css +24 -0
  55. package/dist/cjs/packages/empty/style/style.harmony.css +59 -0
  56. package/dist/cjs/packages/fixednav/style/style.harmony.css +180 -0
  57. package/dist/cjs/packages/form/style/style.harmony.css +4 -0
  58. package/dist/cjs/packages/formitem/style/style.harmony.css +185 -0
  59. package/dist/cjs/packages/grid/style/style.harmony.css +21 -0
  60. package/dist/cjs/packages/griditem/style/style.harmony.css +111 -0
  61. package/dist/cjs/packages/hoverbutton/style/style.harmony.css +25 -0
  62. package/dist/cjs/packages/hoverbuttonitem/style/style.harmony.css +60 -0
  63. package/dist/cjs/packages/image/style/style.harmony.css +58 -0
  64. package/dist/cjs/packages/imagepreview/style/style.harmony.css +102 -0
  65. package/dist/cjs/packages/indicator/style/style.harmony.css +151 -0
  66. package/dist/cjs/packages/infiniteloading/style/style.harmony.css +63 -0
  67. package/dist/cjs/packages/input/style/style.harmony.css +62 -0
  68. package/dist/cjs/packages/inputnumber/style/style.harmony.css +61 -0
  69. package/dist/cjs/packages/layout/style/style.harmony.css +4 -0
  70. package/dist/cjs/packages/loading/style/style.harmony.css +41 -0
  71. package/dist/cjs/packages/lottie/style/style.harmony.css +4 -0
  72. package/dist/cjs/packages/menu/style/style.harmony.css +56 -0
  73. package/dist/cjs/packages/menuitem/style/style.harmony.css +122 -0
  74. package/dist/cjs/packages/navbar/style/style.harmony.css +106 -0
  75. package/dist/cjs/packages/noticebar/style/style.harmony.css +194 -0
  76. package/dist/cjs/packages/notify/style/style.harmony.css +95 -0
  77. package/dist/cjs/packages/numberkeyboard/style/style.harmony.css +129 -0
  78. package/dist/cjs/packages/overlay/style/style.harmony.css +63 -0
  79. package/dist/cjs/packages/pagination/style/style.harmony.css +139 -0
  80. package/dist/cjs/packages/picker/style/style.harmony.css +37 -0
  81. package/dist/cjs/packages/pickerview/style/style.harmony.css +86 -0
  82. package/dist/cjs/packages/popover/style/style.harmony.css +298 -0
  83. package/dist/cjs/packages/popup/style/style.harmony.css +375 -0
  84. package/dist/cjs/packages/price/style/style.harmony.css +96 -0
  85. package/dist/cjs/packages/progress/progress.js +69 -33
  86. package/dist/cjs/packages/progress/style/progress.scss +5 -21
  87. package/dist/cjs/packages/progress/style/style.css +5 -19
  88. package/dist/cjs/packages/progress/style/style.harmony.css +63 -0
  89. package/dist/cjs/packages/progress/style-jmapp/progress.scss +5 -21
  90. package/dist/cjs/packages/progress/style-jmapp/style.css +4 -18
  91. package/dist/cjs/packages/progress/style-jrkf/progress.scss +5 -21
  92. package/dist/cjs/packages/progress/style-jrkf/style.css +4 -18
  93. package/dist/cjs/packages/pulltorefresh/style/style.harmony.css +43 -0
  94. package/dist/cjs/packages/radio/style/style.harmony.css +90 -0
  95. package/dist/cjs/packages/radiogroup/style/style.harmony.css +55 -0
  96. package/dist/cjs/packages/range/range.js +163 -175
  97. package/dist/cjs/packages/range/style/range.scss +6 -2
  98. package/dist/cjs/packages/range/style/style.css +3 -1
  99. package/dist/cjs/packages/range/style/style.harmony.css +273 -0
  100. package/dist/cjs/packages/range/style-jmapp/range.scss +6 -2
  101. package/dist/cjs/packages/range/style-jmapp/style.css +3 -1
  102. package/dist/cjs/packages/range/style-jrkf/range.scss +6 -2
  103. package/dist/cjs/packages/range/style-jrkf/style.css +3 -1
  104. package/dist/cjs/packages/range/utils.d.ts +3 -0
  105. package/dist/cjs/packages/rate/style/style.harmony.css +168 -0
  106. package/dist/cjs/packages/resultpage/style/style.harmony.css +50 -0
  107. package/dist/cjs/packages/row/style/style.harmony.css +54 -0
  108. package/dist/cjs/packages/safearea/style/style.harmony.css +14 -0
  109. package/dist/cjs/packages/searchbar/searchbar.js +181 -77
  110. package/dist/cjs/packages/searchbar/style/searchbar.scss +99 -25
  111. package/dist/cjs/packages/searchbar/style/style.css +102 -38
  112. package/dist/cjs/packages/searchbar/style/style.harmony.css +328 -0
  113. package/dist/cjs/packages/searchbar/style-jmapp/searchbar.scss +99 -25
  114. package/dist/cjs/packages/searchbar/style-jmapp/style.css +85 -21
  115. package/dist/cjs/packages/searchbar/style-jrkf/searchbar.scss +99 -25
  116. package/dist/cjs/packages/searchbar/style-jrkf/style.css +85 -21
  117. package/dist/cjs/packages/segmented/style/style.harmony.css +42 -0
  118. package/dist/cjs/packages/shortpassword/style/style.harmony.css +132 -0
  119. package/dist/cjs/packages/sidebar/style/style.harmony.css +63 -0
  120. package/dist/cjs/packages/sidebaritem/style/style.harmony.css +19 -0
  121. package/dist/cjs/packages/signature/style/style.harmony.css +22 -0
  122. package/dist/cjs/packages/skeleton/style/style.harmony.css +69 -0
  123. package/dist/cjs/packages/space/style/style.harmony.css +83 -0
  124. package/dist/cjs/packages/step/step.d.ts +2 -2
  125. package/dist/cjs/packages/step/step.js +80 -45
  126. package/dist/cjs/packages/step/style/step.scss +104 -195
  127. package/dist/cjs/packages/step/style/style.css +85 -159
  128. package/dist/cjs/packages/step/style/style.harmony.css +145 -0
  129. package/dist/cjs/packages/step/style-jmapp/step.scss +104 -195
  130. package/dist/cjs/packages/step/style-jmapp/style.css +88 -162
  131. package/dist/cjs/packages/step/style-jrkf/step.scss +104 -195
  132. package/dist/cjs/packages/step/style-jrkf/style.css +88 -162
  133. package/dist/cjs/packages/steps/steps.js +23 -8
  134. package/dist/cjs/packages/steps/style/steps.scss +328 -4
  135. package/dist/cjs/packages/steps/style/style.css +219 -2
  136. package/dist/cjs/packages/steps/style/style.harmony.css +266 -0
  137. package/dist/cjs/packages/steps/style-jmapp/steps.scss +328 -4
  138. package/dist/cjs/packages/steps/style-jmapp/style.css +219 -2
  139. package/dist/cjs/packages/steps/style-jrkf/steps.scss +328 -4
  140. package/dist/cjs/packages/steps/style-jrkf/style.css +219 -2
  141. package/dist/cjs/packages/sticky/style/style.harmony.css +7 -0
  142. package/dist/cjs/packages/swipe/style/style.harmony.css +33 -0
  143. package/dist/cjs/packages/swiper/style/style.harmony.css +68 -0
  144. package/dist/cjs/packages/swiperitem/style/style.harmony.css +7 -0
  145. package/dist/cjs/packages/switch/style/style.harmony.css +96 -0
  146. package/dist/cjs/packages/tabbar/style/style.harmony.css +56 -0
  147. package/dist/cjs/packages/tabbaritem/style/style.harmony.css +65 -0
  148. package/dist/cjs/packages/table/style/style.harmony.css +230 -0
  149. package/dist/cjs/packages/tabpane/style/style.harmony.css +18 -0
  150. package/dist/cjs/packages/tabs/style/style.harmony.css +325 -0
  151. package/dist/cjs/packages/tag/style/style.harmony.css +73 -0
  152. package/dist/cjs/packages/textarea/style/style.harmony.css +79 -0
  153. package/dist/cjs/packages/timedetail/style/style.harmony.css +34 -0
  154. package/dist/cjs/packages/timeselect/style/style.harmony.css +35 -0
  155. package/dist/cjs/packages/toast/style/style.harmony.css +138 -0
  156. package/dist/cjs/packages/tour/style/style.harmony.css +82 -0
  157. package/dist/cjs/packages/trendarrow/style/style.harmony.css +42 -0
  158. package/dist/cjs/packages/uploader/style/style.harmony.css +241 -0
  159. package/dist/cjs/packages/uploader/uploader.js +21 -27
  160. package/dist/cjs/packages/video/style/style.harmony.css +22 -0
  161. package/dist/cjs/packages/virtuallist/style/style.harmony.css +74 -0
  162. package/dist/cjs/packages/watermark/style/style.harmony.css +17 -0
  163. package/dist/cjs/types/spec/progress/base.d.ts +6 -0
  164. package/dist/cjs/types/spec/progress/taro.d.ts +4 -0
  165. package/dist/cjs/types/spec/searchbar/base.d.ts +3 -0
  166. package/dist/cjs/types/spec/steps/base.d.ts +11 -2
  167. package/dist/es/packages/actionsheet/style/style.harmony.css +90 -0
  168. package/dist/es/packages/address/style/address.scss +114 -0
  169. package/dist/es/packages/address/style/style.css +103 -0
  170. package/dist/es/packages/address/style/style.harmony.css +151 -0
  171. package/dist/es/packages/address/style-jmapp/address.scss +114 -0
  172. package/dist/es/packages/address/style-jmapp/style.css +103 -0
  173. package/dist/es/packages/address/style-jrkf/address.scss +114 -0
  174. package/dist/es/packages/address/style-jrkf/style.css +103 -0
  175. package/dist/es/packages/animate/style/style.harmony.css +236 -0
  176. package/dist/es/packages/animatingnumbers/style/style.harmony.css +45 -0
  177. package/dist/es/packages/audio/style/style.harmony.css +75 -0
  178. package/dist/es/packages/avatar/style/style.harmony.css +64 -0
  179. package/dist/es/packages/avatarcropper/style/style.harmony.css +135 -0
  180. package/dist/es/packages/avatargroup/style/style.harmony.css +24 -0
  181. package/dist/es/packages/backtop/style/style.harmony.css +21 -0
  182. package/dist/es/packages/badge/style/style.harmony.css +112 -0
  183. package/dist/es/packages/barrage/style/style.harmony.css +84 -0
  184. package/dist/es/packages/button/style/style.harmony.css +446 -0
  185. package/dist/es/packages/calendar/style/style.harmony.css +216 -0
  186. package/dist/es/packages/calendarcard/style/style.harmony.css +186 -0
  187. package/dist/es/packages/calendaritem/style/style.harmony.css +4 -0
  188. package/dist/es/packages/card/style/style.harmony.css +82 -0
  189. package/dist/es/packages/cascader/style/style.harmony.css +70 -0
  190. package/dist/es/packages/cell/style/style.harmony.css +91 -0
  191. package/dist/es/packages/cellgroup/style/style.harmony.css +31 -0
  192. package/dist/es/packages/checkbox/style/style.harmony.css +171 -0
  193. package/dist/es/packages/checkboxgroup/style/style.harmony.css +69 -0
  194. package/dist/es/packages/circleprogress/style/style.harmony.css +31 -0
  195. package/dist/es/packages/col/style/style.harmony.css +360 -0
  196. package/dist/es/packages/collapse/style/style.harmony.css +4 -0
  197. package/dist/es/packages/collapseitem/style/style.harmony.css +119 -0
  198. package/dist/es/packages/configprovider/style/style.harmony.css +4 -0
  199. package/dist/es/packages/configprovider/types.d.ts +1 -1
  200. package/dist/es/packages/countdown/style/style.harmony.css +113 -0
  201. package/dist/es/packages/datepicker/style/style.harmony.css +4 -0
  202. package/dist/es/packages/datepickerview/style/style.harmony.css +8 -0
  203. package/dist/es/packages/dialog/style/style.harmony.css +167 -0
  204. package/dist/es/packages/divider/style/style.harmony.css +72 -0
  205. package/dist/es/packages/drag/style/style.harmony.css +19 -0
  206. package/dist/es/packages/elevator/style/css.js +0 -2
  207. package/dist/es/packages/elevator/style/elevator.scss +116 -95
  208. package/dist/es/packages/elevator/style/index.js +0 -2
  209. package/dist/es/packages/elevator/style/style.css +98 -83
  210. package/dist/es/packages/elevator/style/style.harmony.css +127 -0
  211. package/dist/es/packages/elevator/style-jmapp/css.js +0 -2
  212. package/dist/es/packages/elevator/style-jmapp/elevator.scss +116 -95
  213. package/dist/es/packages/elevator/style-jmapp/index.js +0 -2
  214. package/dist/es/packages/elevator/style-jmapp/style.css +98 -83
  215. package/dist/es/packages/elevator/style-jrkf/css.js +0 -2
  216. package/dist/es/packages/elevator/style-jrkf/elevator.scss +116 -95
  217. package/dist/es/packages/elevator/style-jrkf/index.js +0 -2
  218. package/dist/es/packages/elevator/style-jrkf/style.css +98 -83
  219. package/dist/es/packages/ellipsis/style/style.harmony.css +24 -0
  220. package/dist/es/packages/empty/style/style.harmony.css +59 -0
  221. package/dist/es/packages/fixednav/style/style.harmony.css +180 -0
  222. package/dist/es/packages/form/style/style.harmony.css +4 -0
  223. package/dist/es/packages/formitem/style/style.harmony.css +185 -0
  224. package/dist/es/packages/grid/style/style.harmony.css +21 -0
  225. package/dist/es/packages/griditem/style/style.harmony.css +111 -0
  226. package/dist/es/packages/hoverbutton/style/style.harmony.css +25 -0
  227. package/dist/es/packages/hoverbuttonitem/style/style.harmony.css +60 -0
  228. package/dist/es/packages/image/style/style.harmony.css +58 -0
  229. package/dist/es/packages/imagepreview/style/style.harmony.css +102 -0
  230. package/dist/es/packages/indicator/style/style.harmony.css +151 -0
  231. package/dist/es/packages/infiniteloading/style/style.harmony.css +63 -0
  232. package/dist/es/packages/input/style/style.harmony.css +62 -0
  233. package/dist/es/packages/inputnumber/style/style.harmony.css +61 -0
  234. package/dist/es/packages/layout/style/style.harmony.css +4 -0
  235. package/dist/es/packages/loading/style/style.harmony.css +41 -0
  236. package/dist/es/packages/lottie/style/style.harmony.css +4 -0
  237. package/dist/es/packages/menu/style/style.harmony.css +56 -0
  238. package/dist/es/packages/menuitem/style/style.harmony.css +122 -0
  239. package/dist/es/packages/navbar/style/style.harmony.css +106 -0
  240. package/dist/es/packages/noticebar/style/style.harmony.css +194 -0
  241. package/dist/es/packages/notify/style/style.harmony.css +95 -0
  242. package/dist/es/packages/numberkeyboard/style/style.harmony.css +129 -0
  243. package/dist/es/packages/overlay/style/style.harmony.css +63 -0
  244. package/dist/es/packages/pagination/style/style.harmony.css +139 -0
  245. package/dist/es/packages/picker/style/style.harmony.css +37 -0
  246. package/dist/es/packages/pickerview/style/style.harmony.css +86 -0
  247. package/dist/es/packages/popover/style/style.harmony.css +298 -0
  248. package/dist/es/packages/popup/style/style.harmony.css +375 -0
  249. package/dist/es/packages/price/style/style.harmony.css +96 -0
  250. package/dist/es/packages/progress/progress.js +70 -34
  251. package/dist/es/packages/progress/style/progress.scss +5 -21
  252. package/dist/es/packages/progress/style/style.css +5 -19
  253. package/dist/es/packages/progress/style/style.harmony.css +63 -0
  254. package/dist/es/packages/progress/style-jmapp/progress.scss +5 -21
  255. package/dist/es/packages/progress/style-jmapp/style.css +4 -18
  256. package/dist/es/packages/progress/style-jrkf/progress.scss +5 -21
  257. package/dist/es/packages/progress/style-jrkf/style.css +4 -18
  258. package/dist/es/packages/pulltorefresh/style/style.harmony.css +43 -0
  259. package/dist/es/packages/radio/style/style.harmony.css +90 -0
  260. package/dist/es/packages/radiogroup/style/style.harmony.css +55 -0
  261. package/dist/es/packages/range/range.js +163 -175
  262. package/dist/es/packages/range/style/range.scss +6 -2
  263. package/dist/es/packages/range/style/style.css +3 -1
  264. package/dist/es/packages/range/style/style.harmony.css +273 -0
  265. package/dist/es/packages/range/style-jmapp/range.scss +6 -2
  266. package/dist/es/packages/range/style-jmapp/style.css +3 -1
  267. package/dist/es/packages/range/style-jrkf/range.scss +6 -2
  268. package/dist/es/packages/range/style-jrkf/style.css +3 -1
  269. package/dist/es/packages/range/utils.d.ts +3 -0
  270. package/dist/es/packages/rate/style/style.harmony.css +168 -0
  271. package/dist/es/packages/resultpage/style/style.harmony.css +50 -0
  272. package/dist/es/packages/row/style/style.harmony.css +54 -0
  273. package/dist/es/packages/safearea/style/style.harmony.css +14 -0
  274. package/dist/es/packages/searchbar/searchbar.js +183 -79
  275. package/dist/es/packages/searchbar/style/searchbar.scss +99 -25
  276. package/dist/es/packages/searchbar/style/style.css +102 -38
  277. package/dist/es/packages/searchbar/style/style.harmony.css +328 -0
  278. package/dist/es/packages/searchbar/style-jmapp/searchbar.scss +99 -25
  279. package/dist/es/packages/searchbar/style-jmapp/style.css +85 -21
  280. package/dist/es/packages/searchbar/style-jrkf/searchbar.scss +99 -25
  281. package/dist/es/packages/searchbar/style-jrkf/style.css +85 -21
  282. package/dist/es/packages/segmented/style/style.harmony.css +42 -0
  283. package/dist/es/packages/shortpassword/style/style.harmony.css +132 -0
  284. package/dist/es/packages/sidebar/style/style.harmony.css +63 -0
  285. package/dist/es/packages/sidebaritem/style/style.harmony.css +19 -0
  286. package/dist/es/packages/signature/style/style.harmony.css +22 -0
  287. package/dist/es/packages/skeleton/style/style.harmony.css +69 -0
  288. package/dist/es/packages/space/style/style.harmony.css +83 -0
  289. package/dist/es/packages/step/step.d.ts +2 -2
  290. package/dist/es/packages/step/step.js +81 -46
  291. package/dist/es/packages/step/style/step.scss +104 -195
  292. package/dist/es/packages/step/style/style.css +85 -159
  293. package/dist/es/packages/step/style/style.harmony.css +145 -0
  294. package/dist/es/packages/step/style-jmapp/step.scss +104 -195
  295. package/dist/es/packages/step/style-jmapp/style.css +88 -162
  296. package/dist/es/packages/step/style-jrkf/step.scss +104 -195
  297. package/dist/es/packages/step/style-jrkf/style.css +88 -162
  298. package/dist/es/packages/steps/steps.js +23 -8
  299. package/dist/es/packages/steps/style/steps.scss +328 -4
  300. package/dist/es/packages/steps/style/style.css +219 -2
  301. package/dist/es/packages/steps/style/style.harmony.css +266 -0
  302. package/dist/es/packages/steps/style-jmapp/steps.scss +328 -4
  303. package/dist/es/packages/steps/style-jmapp/style.css +219 -2
  304. package/dist/es/packages/steps/style-jrkf/steps.scss +328 -4
  305. package/dist/es/packages/steps/style-jrkf/style.css +219 -2
  306. package/dist/es/packages/sticky/style/style.harmony.css +7 -0
  307. package/dist/es/packages/swipe/style/style.harmony.css +33 -0
  308. package/dist/es/packages/swiper/style/style.harmony.css +68 -0
  309. package/dist/es/packages/swiperitem/style/style.harmony.css +7 -0
  310. package/dist/es/packages/switch/style/style.harmony.css +96 -0
  311. package/dist/es/packages/tabbar/style/style.harmony.css +56 -0
  312. package/dist/es/packages/tabbaritem/style/style.harmony.css +65 -0
  313. package/dist/es/packages/table/style/style.harmony.css +230 -0
  314. package/dist/es/packages/tabpane/style/style.harmony.css +18 -0
  315. package/dist/es/packages/tabs/style/style.harmony.css +325 -0
  316. package/dist/es/packages/tag/style/style.harmony.css +73 -0
  317. package/dist/es/packages/textarea/style/style.harmony.css +79 -0
  318. package/dist/es/packages/timedetail/style/style.harmony.css +34 -0
  319. package/dist/es/packages/timeselect/style/style.harmony.css +35 -0
  320. package/dist/es/packages/toast/style/style.harmony.css +138 -0
  321. package/dist/es/packages/tour/style/style.harmony.css +82 -0
  322. package/dist/es/packages/trendarrow/style/style.harmony.css +42 -0
  323. package/dist/es/packages/uploader/style/style.harmony.css +241 -0
  324. package/dist/es/packages/uploader/uploader.js +21 -27
  325. package/dist/es/packages/video/style/style.harmony.css +22 -0
  326. package/dist/es/packages/virtuallist/style/style.harmony.css +74 -0
  327. package/dist/es/packages/watermark/style/style.harmony.css +17 -0
  328. package/dist/es/types/spec/progress/base.d.ts +24 -0
  329. package/dist/es/types/spec/progress/taro.d.ts +4 -0
  330. package/dist/es/types/spec/searchbar/base.d.ts +10 -1
  331. package/dist/es/types/spec/steps/base.d.ts +26 -5
  332. package/dist/nutui.react.umd.js +530 -391
  333. package/dist/style-jmapp.css +1 -1
  334. package/dist/style-jmapp.scss +41 -41
  335. package/dist/style-jrkf.css +1 -1
  336. package/dist/style-jrkf.scss +29 -29
  337. package/dist/style.css +1 -1
  338. package/dist/style.scss +42 -42
  339. package/dist/styles/variables-jmapp.scss +133 -79
  340. package/dist/styles/variables-jrkf.scss +134 -80
  341. package/dist/styles/variables.scss +148 -89
  342. package/package.json +1 -1
@@ -12641,25 +12641,23 @@
12641
12641
  return JSON.stringify(newValue) === JSON.stringify(oldValue);
12642
12642
  };
12643
12643
  var handleOverlap = function(value2) {
12644
- if (value2[0] > value2[1]) {
12645
- return value2.slice(0).reverse();
12646
- }
12647
- return value2;
12644
+ return value2[0] > value2[1] ? value2.slice(0).reverse() : value2;
12648
12645
  };
12649
12646
  var Range = function(props) {
12650
12647
  var rtl = useRtl();
12651
- var _$_object_spread = _object_spread({}, defaultProps$R, props), className = _$_object_spread.className, style = _$_object_spread.style, range2 = _$_object_spread.range, disabled = _$_object_spread.disabled, button = _$_object_spread.button, vertical = _$_object_spread.vertical, marks = _$_object_spread.marks, minDescription = _$_object_spread.minDescription, maxDescription = _$_object_spread.maxDescription, currentDescription = _$_object_spread.currentDescription, min = _$_object_spread.min, max = _$_object_spread.max, step = _$_object_spread.step, value2 = _$_object_spread.value, defaultValue = _$_object_spread.defaultValue, onChange = _$_object_spread.onChange, onStart = _$_object_spread.onStart, onEnd = _$_object_spread.onEnd;
12648
+ var _mergeProps = mergeProps(defaultProps$R, props), className = _mergeProps.className, style = _mergeProps.style, range2 = _mergeProps.range, disabled = _mergeProps.disabled, button = _mergeProps.button, vertical = _mergeProps.vertical, marks = _mergeProps.marks, minDescription = _mergeProps.minDescription, maxDescription = _mergeProps.maxDescription, currentDescription = _mergeProps.currentDescription, min = _mergeProps.min, max = _mergeProps.max, step = _mergeProps.step, value2 = _mergeProps.value, defaultValue = _mergeProps.defaultValue, onChange = _mergeProps.onChange, onStart = _mergeProps.onStart, onEnd = _mergeProps.onEnd;
12652
12649
  var rtlClassPrefix = React.useMemo(function() {
12653
12650
  return "rtl-".concat(vertical ? verticalClassPrefix : classPrefix$f);
12654
12651
  }, [
12655
12652
  vertical
12656
12653
  ]);
12657
- var _useState = _sliced_to_array(React.useState(0), 2), buttonIndex = _useState[0], setButtonIndex = _useState[1];
12658
- var _useState1 = _sliced_to_array(React.useState("start"), 2), dragStatus = _useState1[0], setDragStatus = _useState1[1];
12654
+ var buttonRef = React.useRef(0);
12655
+ var dragStatusRef = React.useRef("start");
12659
12656
  var touch = useTouch();
12660
12657
  var root2 = React.useRef(null);
12661
- var _useState2 = _sliced_to_array(React.useState([]), 2), marksList = _useState2[0], setMarksList = _useState2[1];
12662
- var _useState3 = _sliced_to_array(React.useState(0), 2), startValue = _useState3[0], setStartValue = _useState3[1];
12658
+ var rootRect = React.useRef(null);
12659
+ var _useState = _sliced_to_array(React.useState([]), 2), marksList = _useState[0], setMarksList = _useState[1];
12660
+ var _useState1 = _sliced_to_array(React.useState(0), 2), startValue = _useState1[0], setStartValue = _useState1[1];
12663
12661
  var scope = React.useMemo(function() {
12664
12662
  if (max < min || max === min) {
12665
12663
  console.log("max 的值需要大于 min的值");
@@ -12677,10 +12675,8 @@
12677
12675
  defaultValue,
12678
12676
  finalValue: 0,
12679
12677
  onChange: handleChange
12680
- }), 2), current = _usePropsValue[0], setCurrent = _usePropsValue[1];
12681
- var _useState4 = _sliced_to_array(React.useState(function() {
12682
- return value2 || defaultValue || 0;
12683
- }), 2), exactValue = _useState4[0], setExactValue = _useState4[1];
12678
+ }), 2), innerValue = _usePropsValue[0], setInnerValue = _usePropsValue[1];
12679
+ var exactValueRef = React.useRef(value2 || defaultValue || 0);
12684
12680
  var marksRef = React.useRef({});
12685
12681
  React.useEffect(function() {
12686
12682
  if (marks) {
@@ -12720,11 +12716,11 @@
12720
12716
  var verticalClassPrefix2 = "nut-range-vertical-mark";
12721
12717
  var lowerBound = min;
12722
12718
  var upperBound = max;
12723
- if (range2 && Array.isArray(current)) {
12724
- lowerBound = current[0];
12725
- upperBound = current[1];
12719
+ if (range2 && Array.isArray(innerValue)) {
12720
+ lowerBound = innerValue[0];
12721
+ upperBound = innerValue[1];
12726
12722
  } else {
12727
- upperBound = current;
12723
+ upperBound = innerValue;
12728
12724
  }
12729
12725
  var isActive = mark <= upperBound && mark >= lowerBound;
12730
12726
  var _$classNames = [
@@ -12743,7 +12739,7 @@
12743
12739
  min,
12744
12740
  max,
12745
12741
  range2,
12746
- current,
12742
+ innerValue,
12747
12743
  vertical,
12748
12744
  rtl,
12749
12745
  rtlClassPrefix
@@ -12753,41 +12749,40 @@
12753
12749
  }, [
12754
12750
  range2
12755
12751
  ]);
12756
- var calcMainAxis = React.useCallback(function() {
12757
- var modelVal = current;
12752
+ var calcMainAxis = React.useMemo(function() {
12753
+ var modelVal = innerValue;
12758
12754
  return isRange(modelVal) ? "".concat((modelVal[1] - modelVal[0]) * 100 / scope, "%") : "".concat((modelVal - min) * 100 / scope, "%");
12759
12755
  }, [
12760
- current,
12756
+ innerValue,
12761
12757
  isRange,
12762
12758
  min,
12763
12759
  scope
12764
12760
  ]);
12765
- var calcOffset = React.useCallback(function() {
12766
- var modelVal = current;
12761
+ var calcOffset = React.useMemo(function() {
12762
+ var modelVal = innerValue;
12767
12763
  return isRange(modelVal) ? "".concat((modelVal[0] - min) * 100 / scope, "%") : "0%";
12768
12764
  }, [
12769
- current,
12765
+ innerValue,
12770
12766
  isRange,
12771
12767
  min,
12772
12768
  scope
12773
12769
  ]);
12774
- var barStyle = React.useCallback(function() {
12770
+ var barStyle = React.useMemo(function() {
12775
12771
  if (vertical) {
12776
12772
  return {
12777
- height: calcMainAxis(),
12778
- top: calcOffset(),
12779
- transition: dragStatus ? "none" : void 0
12773
+ height: calcMainAxis,
12774
+ top: calcOffset,
12775
+ transition: dragStatusRef.current ? "none" : void 0
12780
12776
  };
12781
12777
  }
12782
12778
  var dir = rtl ? "right" : "left";
12783
12779
  var _obj2;
12784
12780
  return _obj2 = {
12785
- width: calcMainAxis()
12786
- }, _define_property(_obj2, dir, calcOffset()), _define_property(_obj2, "transition", dragStatus ? "none" : void 0), _obj2;
12781
+ width: calcMainAxis
12782
+ }, _define_property(_obj2, dir, calcOffset), _define_property(_obj2, "transition", dragStatusRef.current ? "none" : void 0), _obj2;
12787
12783
  }, [
12788
12784
  calcMainAxis,
12789
12785
  calcOffset,
12790
- dragStatus,
12791
12786
  rtl,
12792
12787
  vertical
12793
12788
  ]);
@@ -12807,12 +12802,12 @@
12807
12802
  vertical
12808
12803
  ]);
12809
12804
  var tickClass = React.useCallback(function(mark) {
12810
- if (range2 && Array.isArray(current)) {
12811
- return mark <= current[1] && mark >= current[0];
12805
+ if (range2 && Array.isArray(innerValue)) {
12806
+ return mark <= innerValue[1] && mark >= innerValue[0];
12812
12807
  }
12813
- return mark <= current;
12808
+ return mark <= innerValue;
12814
12809
  }, [
12815
- current,
12810
+ innerValue,
12816
12811
  range2
12817
12812
  ]);
12818
12813
  var format2 = React.useCallback(function(value3) {
@@ -12829,49 +12824,50 @@
12829
12824
  } else {
12830
12825
  value3 = format2(value3);
12831
12826
  }
12832
- if (!isSameValue(value3, current)) {
12833
- setCurrent(value3);
12827
+ if (!isSameValue(value3, innerValue)) {
12828
+ setInnerValue(value3);
12834
12829
  }
12835
12830
  end && onEnd && onEnd(value3);
12836
12831
  }, [
12837
- current,
12832
+ innerValue,
12838
12833
  format2,
12839
12834
  isRange,
12840
12835
  onEnd,
12841
- setCurrent
12836
+ setInnerValue
12842
12837
  ]);
12843
- var click = React.useCallback(/* @__PURE__ */ function() {
12838
+ var handleClick = React.useCallback(/* @__PURE__ */ function() {
12844
12839
  var _ref = _async_to_generator(function(event) {
12845
- var _event_detail, rect, x, delta, total, _event_detail1, y, value3, _current, left2, right2, middle;
12840
+ var _event_detail, rect, _event_detail_x, x, delta, total, _event_detail1, _event_detail_y, y, value3, _innerValue, left2, right2, middle;
12846
12841
  return __generator(this, function(_state) {
12847
12842
  switch (_state.label) {
12848
12843
  case 0:
12849
- if (disabled || !root2.current) {
12850
- return [
12851
- 2
12852
- ];
12853
- }
12854
- setDragStatus("");
12844
+ if (disabled || !root2.current) return [
12845
+ 2
12846
+ ];
12847
+ if (isHm) return [
12848
+ 2
12849
+ ];
12850
+ dragStatusRef.current = "";
12855
12851
  return [
12856
12852
  4,
12857
12853
  getRectInMultiPlatform(root2.current)
12858
12854
  ];
12859
12855
  case 1:
12860
12856
  rect = _state.sent();
12861
- x = typeof ((_event_detail = event.detail) === null || _event_detail === void 0 ? void 0 : _event_detail.x) !== "undefined" ? event.detail.x : event.clientX;
12862
- if (isHm) x = parseFloat(pxTransform(event.windowX));
12857
+ x = (_event_detail_x = (_event_detail = event.detail) === null || _event_detail === void 0 ? void 0 : _event_detail.x) !== null && _event_detail_x !== void 0 ? _event_detail_x : event.clientX;
12858
+ if (isHm) x = parseFloat(pxTransform(event.windowX || x));
12863
12859
  delta = x - rect.left;
12864
12860
  total = rect.width;
12865
12861
  if (vertical) {
12866
- y = typeof ((_event_detail1 = event.detail) === null || _event_detail1 === void 0 ? void 0 : _event_detail1.y) !== "undefined" ? event.detail.y : event.clientY;
12867
- if (isHm) y = parseFloat(pxTransform(event.windowY));
12862
+ y = (_event_detail_y = (_event_detail1 = event.detail) === null || _event_detail1 === void 0 ? void 0 : _event_detail1.y) !== null && _event_detail_y !== void 0 ? _event_detail_y : event.clientY;
12863
+ if (isHm) y = parseFloat(pxTransform(event.windowY || y));
12868
12864
  delta = y - rect.top;
12869
12865
  total = rect.height;
12870
12866
  }
12871
12867
  value3 = min + delta / total * scope;
12872
- setExactValue(current);
12873
- if (isRange(current)) {
12874
- _current = _sliced_to_array(current, 2), left2 = _current[0], right2 = _current[1];
12868
+ exactValueRef.current = innerValue;
12869
+ if (isRange(innerValue)) {
12870
+ _innerValue = _sliced_to_array(innerValue, 2), left2 = _innerValue[0], right2 = _innerValue[1];
12875
12871
  middle = (left2 + right2) / 2;
12876
12872
  if (value3 <= middle) {
12877
12873
  updateValue([
@@ -12897,7 +12893,7 @@
12897
12893
  return _ref.apply(this, arguments);
12898
12894
  };
12899
12895
  }(), [
12900
- current,
12896
+ innerValue,
12901
12897
  disabled,
12902
12898
  isRange,
12903
12899
  min,
@@ -12905,20 +12901,52 @@
12905
12901
  updateValue,
12906
12902
  vertical
12907
12903
  ]);
12904
+ Taro.useReady(function() {
12905
+ var getRootRect = /* @__PURE__ */ function() {
12906
+ var _ref = _async_to_generator(function() {
12907
+ var rect;
12908
+ return __generator(this, function(_state) {
12909
+ switch (_state.label) {
12910
+ case 0:
12911
+ if (!root2.current) return [
12912
+ 3,
12913
+ 2
12914
+ ];
12915
+ return [
12916
+ 4,
12917
+ getRectInMultiPlatform(root2.current)
12918
+ ];
12919
+ case 1:
12920
+ rect = _state.sent();
12921
+ rootRect.current = rect;
12922
+ _state.label = 2;
12923
+ case 2:
12924
+ return [
12925
+ 2
12926
+ ];
12927
+ }
12928
+ });
12929
+ });
12930
+ return function getRootRect2() {
12931
+ return _ref.apply(this, arguments);
12932
+ };
12933
+ }();
12934
+ Taro.nextTick(function() {
12935
+ getRootRect();
12936
+ });
12937
+ });
12908
12938
  var onTouchStart = React.useCallback(function(event) {
12909
- if (disabled) {
12910
- return;
12911
- }
12939
+ if (disabled) return;
12912
12940
  touch.start(event);
12913
- setExactValue(current);
12914
- if (isRange(current)) {
12915
- setStartValue(current.map(format2));
12941
+ exactValueRef.current = innerValue;
12942
+ if (isRange(innerValue)) {
12943
+ setStartValue(innerValue.map(format2));
12916
12944
  } else {
12917
- setStartValue(format2(current));
12945
+ setStartValue(format2(innerValue));
12918
12946
  }
12919
- setDragStatus("start");
12947
+ dragStatusRef.current = "start";
12920
12948
  }, [
12921
- current,
12949
+ innerValue,
12922
12950
  disabled,
12923
12951
  format2,
12924
12952
  isRange,
@@ -12926,60 +12954,59 @@
12926
12954
  ]);
12927
12955
  var onTouchMove = React.useCallback(/* @__PURE__ */ function() {
12928
12956
  var _ref = _async_to_generator(function(event) {
12929
- var rect, delta, total, diff, newValue;
12957
+ var handleMove;
12930
12958
  return __generator(this, function(_state) {
12931
- switch (_state.label) {
12932
- case 0:
12933
- if (disabled || !root2.current) {
12934
- return [
12959
+ if (disabled || !root2.current) return [
12960
+ 2
12961
+ ];
12962
+ if (dragStatusRef.current === "start") {
12963
+ onStart && onStart();
12964
+ dragStatusRef.current = "draging";
12965
+ }
12966
+ touch.move(event);
12967
+ handleMove = /* @__PURE__ */ function() {
12968
+ var _ref2 = _async_to_generator(function() {
12969
+ var delta, total, diff, newValue;
12970
+ return __generator(this, function(_state2) {
12971
+ if (!rootRect.current) return [
12935
12972
  2
12936
12973
  ];
12937
- }
12938
- if (dragStatus === "start") {
12939
- onStart && onStart();
12940
- }
12941
- touch.move(event);
12942
- setDragStatus("draging");
12943
- return [
12944
- 4,
12945
- getRectInMultiPlatform(root2.current)
12946
- ];
12947
- case 1:
12948
- rect = _state.sent();
12949
- if (!rect) return [
12950
- 2
12951
- ];
12952
- delta = isHm ? parseFloat(pxTransform(touch.deltaX.current)) : touch.deltaX.current;
12953
- total = rect.width;
12954
- diff = delta / total * scope;
12955
- diff = rtl ? -diff : diff;
12956
- if (vertical) {
12957
- delta = isHm ? parseFloat(pxTransform(touch.deltaY.current)) : touch.deltaY.current;
12958
- total = rect.height;
12974
+ delta = isHm ? parseFloat(pxTransform(touch.deltaX.current)) : touch.deltaX.current;
12975
+ total = rootRect.current.width;
12959
12976
  diff = delta / total * scope;
12960
- }
12961
- if (isRange(startValue)) {
12962
- newValue = exactValue.slice();
12963
- newValue[buttonIndex] = startValue[buttonIndex] + diff;
12964
- } else {
12977
+ diff = rtl ? -diff : diff;
12978
+ if (vertical) {
12979
+ delta = isHm ? parseFloat(pxTransform(touch.deltaY.current)) : touch.deltaY.current;
12980
+ total = rootRect.current.height;
12981
+ diff = delta / total * scope;
12982
+ }
12965
12983
  newValue = startValue + diff;
12966
- }
12967
- setExactValue(newValue);
12968
- updateValue(newValue);
12969
- return [
12970
- 2
12971
- ];
12972
- }
12984
+ if (isRange(startValue)) {
12985
+ newValue = exactValueRef.current.slice();
12986
+ newValue[buttonRef.current] = startValue[buttonRef.current] + diff;
12987
+ }
12988
+ exactValueRef.current = newValue;
12989
+ updateValue(newValue);
12990
+ return [
12991
+ 2
12992
+ ];
12993
+ });
12994
+ });
12995
+ return function handleMove2() {
12996
+ return _ref2.apply(this, arguments);
12997
+ };
12998
+ }();
12999
+ requestAnimationFrame(handleMove);
13000
+ return [
13001
+ 2
13002
+ ];
12973
13003
  });
12974
13004
  });
12975
13005
  return function(event) {
12976
13006
  return _ref.apply(this, arguments);
12977
13007
  };
12978
13008
  }(), [
12979
- buttonIndex,
12980
13009
  disabled,
12981
- dragStatus,
12982
- exactValue,
12983
13010
  isRange,
12984
13011
  onStart,
12985
13012
  rtl,
@@ -12990,38 +13017,23 @@
12990
13017
  vertical
12991
13018
  ]);
12992
13019
  var onTouchEnd = React.useCallback(function() {
12993
- if (disabled) {
12994
- return;
12995
- }
12996
- if (dragStatus === "draging") {
12997
- updateValue(current, true);
13020
+ if (disabled) return;
13021
+ if (dragStatusRef.current === "draging") {
13022
+ updateValue(innerValue, true);
12998
13023
  }
12999
- setDragStatus("");
13024
+ dragStatusRef.current = "";
13000
13025
  }, [
13001
- current,
13026
+ innerValue,
13002
13027
  disabled,
13003
- dragStatus,
13004
13028
  updateValue
13005
13029
  ]);
13006
13030
  var curValue = React.useCallback(function(idx) {
13007
- var modelVal = current;
13031
+ var modelVal = innerValue;
13008
13032
  var value3 = typeof idx === "number" ? modelVal[idx] : modelVal;
13009
13033
  return value3;
13010
13034
  }, [
13011
- current
13035
+ innerValue
13012
13036
  ]);
13013
- var buttonTransform = React.useMemo(function() {
13014
- var borderRadis = {
13015
- borderRadius: pxTransform(13)
13016
- };
13017
- var transform2 = {
13018
- transform: "translate(-50%, -50%)"
13019
- };
13020
- if (isHm) {
13021
- return _object_spread({}, borderRadis, transform2);
13022
- }
13023
- return _object_spread({}, transform2);
13024
- }, []);
13025
13037
  var buttonNumberTransform = React.useMemo(function() {
13026
13038
  return vertical ? "translate(100%, -50%)" : "translate(-50%, -100%)";
13027
13039
  }, [
@@ -13029,21 +13041,20 @@
13029
13041
  ]);
13030
13042
  var renderButton = React.useCallback(function(index2) {
13031
13043
  var _obj2, _obj12;
13032
- return /* @__PURE__ */ React.createElement(components.View, null, button || /* @__PURE__ */ React.createElement(components.View, {
13044
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, button || /* @__PURE__ */ React.createElement(components.View, {
13033
13045
  className: classNames("".concat(classPrefix$f, "-button"), (_obj2 = {}, _define_property(_obj2, "".concat(verticalClassPrefix, "-button"), vertical), _define_property(_obj2, "".concat(rtlClassPrefix, "-button"), rtl), _obj2)),
13034
- // @ts-ignore
13035
- style: buttonTransform
13046
+ style: {
13047
+ transform: "translate(-50%, -50%)"
13048
+ }
13036
13049
  }, currentDescription !== null && /* @__PURE__ */ React.createElement(components.Text, {
13037
13050
  className: classNames("".concat(classPrefix$f, "-button-number"), (_obj12 = {}, _define_property(_obj12, "".concat(verticalClassPrefix, "-button-number"), vertical), _define_property(_obj12, "".concat(rtlClassPrefix, "-button-number"), rtl), _obj12)),
13038
13051
  style: {
13039
- // @ts-ignore
13040
13052
  transform: buttonNumberTransform
13041
13053
  }
13042
13054
  }, currentDescription ? currentDescription(curValue(index2)) : curValue(index2))));
13043
13055
  }, [
13044
13056
  button,
13045
13057
  buttonNumberTransform,
13046
- buttonTransform,
13047
13058
  curValue,
13048
13059
  currentDescription,
13049
13060
  rtl,
@@ -13079,41 +13090,22 @@
13079
13090
  tickClass,
13080
13091
  vertical
13081
13092
  ]);
13082
- var wrapperTransform = React.useMemo(function() {
13083
- [
13084
- {
13085
- translateX: pxTransform(vertical ? -12 : -13)
13086
- },
13087
- {
13088
- translateY: pxTransform(-12)
13089
- }
13090
- ];
13091
- var wrapperTransform2 = "translate(-50%, -50%)";
13092
- return wrapperTransform2;
13093
- }, [
13094
- vertical
13095
- ]);
13096
- var rangeWrapperTransform = React.useMemo(function() {
13097
- return "translate(-50%, -50%)";
13098
- }, []);
13099
13093
  var renderRangeButton = React.useCallback(function() {
13100
13094
  return [
13101
13095
  0,
13102
13096
  1
13103
- ].map(function(item, index2) {
13104
- var isLeft = index2 === 0;
13105
- var suffix = isLeft ? "left" : "right";
13097
+ ].map(function(_, index2) {
13098
+ var suffix = index2 === 0 ? "left" : "right";
13106
13099
  var _obj2;
13107
13100
  var cls = classNames("".concat(classPrefix$f, "-button-wrapper-").concat(suffix), (_obj2 = {}, _define_property(_obj2, "".concat(verticalClassPrefix, "-button-wrapper-").concat(suffix), vertical), _define_property(_obj2, "".concat(rtlClassPrefix, "-button-wrapper-").concat(suffix), rtl), _obj2));
13108
13101
  return /* @__PURE__ */ React.createElement(components.View, {
13109
13102
  key: index2,
13110
13103
  className: cls,
13111
13104
  style: {
13112
- // @ts-ignore
13113
- transform: rangeWrapperTransform
13105
+ transform: "translate(-50%, -50%)"
13114
13106
  },
13115
13107
  onTouchStart: function(e) {
13116
- setButtonIndex(index2);
13108
+ buttonRef.current = index2;
13117
13109
  onTouchStart(e);
13118
13110
  },
13119
13111
  onTouchMove,
@@ -13129,7 +13121,6 @@
13129
13121
  onTouchMove,
13130
13122
  onTouchStart,
13131
13123
  renderButton,
13132
- rangeWrapperTransform,
13133
13124
  vertical,
13134
13125
  rtl,
13135
13126
  rtlClassPrefix
@@ -13139,8 +13130,7 @@
13139
13130
  catchMove: true,
13140
13131
  className: classNames("".concat(classPrefix$f, "-button-wrapper"), _define_property({}, "".concat(verticalClassPrefix, "-button-wrapper"), vertical)),
13141
13132
  style: {
13142
- // @ts-ignore
13143
- transform: wrapperTransform
13133
+ transform: "translate(-50%, -50%)"
13144
13134
  },
13145
13135
  onTouchStart,
13146
13136
  onTouchMove,
@@ -13155,18 +13145,18 @@
13155
13145
  onTouchMove,
13156
13146
  onTouchStart,
13157
13147
  renderButton,
13158
- wrapperTransform,
13159
13148
  vertical
13160
13149
  ]);
13161
13150
  var renderButtonWrapper = React.useCallback(function() {
13162
- if (range2) {
13163
- return renderRangeButton();
13164
- }
13165
- return renderSingleButton();
13151
+ return /* @__PURE__ */ React.createElement(components.View, {
13152
+ className: "".concat(classPrefix$f, "-bar ").concat(isHm ? "" : "".concat(classPrefix$f, "-bar-animate"), "}"),
13153
+ style: barStyle
13154
+ }, range2 ? renderRangeButton() : renderSingleButton());
13166
13155
  }, [
13167
13156
  renderRangeButton,
13168
13157
  renderSingleButton,
13169
- range2
13158
+ range2,
13159
+ barStyle
13170
13160
  ]);
13171
13161
  return /* @__PURE__ */ React.createElement(components.View, {
13172
13162
  className: containerClasses,
@@ -13176,13 +13166,8 @@
13176
13166
  }, minDescription || min), /* @__PURE__ */ React.createElement(components.View, {
13177
13167
  ref: root2,
13178
13168
  className: classes,
13179
- onClick: function(e) {
13180
- return click(e);
13181
- }
13182
- }, renderMarks(), /* @__PURE__ */ React.createElement(components.View, {
13183
- className: "".concat(classPrefix$f, "-bar"),
13184
- style: barStyle()
13185
- }, renderButtonWrapper())), maxDescription !== null && /* @__PURE__ */ React.createElement(components.Text, {
13169
+ onClick: handleClick
13170
+ }, renderMarks(), renderButtonWrapper()), maxDescription !== null && /* @__PURE__ */ React.createElement(components.Text, {
13186
13171
  className: "".concat(classPrefix$f, "-max")
13187
13172
  }, maxDescription || max));
13188
13173
  };
@@ -13355,128 +13340,229 @@
13355
13340
  left: "",
13356
13341
  right: "",
13357
13342
  rightIn: "",
13358
- leftIn: /* @__PURE__ */ React.createElement(IconSVG$9, {
13359
- size: "16"
13360
- })
13343
+ leftIn: /* @__PURE__ */ React.createElement(IconSVG$9, null),
13344
+ tag: false
13361
13345
  });
13362
13346
  var SearchBar = function(props) {
13363
13347
  var classPrefix2 = "nut-searchbar";
13364
13348
  var locale = useConfig().locale;
13365
- var searchRef = React.useRef(null);
13366
- var _$_object_spread = _object_spread({}, defaultProps$P, props), outerValue = _$_object_spread.value, style = _$_object_spread.style, placeholder = _$_object_spread.placeholder, shape = _$_object_spread.shape, className = _$_object_spread.className, disabled = _$_object_spread.disabled, maxLength = _$_object_spread.maxLength, clearable = _$_object_spread.clearable, readOnly = _$_object_spread.readOnly, autoFocus = _$_object_spread.autoFocus, backable = _$_object_spread.backable, right2 = _$_object_spread.right, left2 = _$_object_spread.left, leftIn = _$_object_spread.leftIn, rightIn = _$_object_spread.rightIn, onChange = _$_object_spread.onChange, onFocus = _$_object_spread.onFocus, onBlur = _$_object_spread.onBlur, onClear = _$_object_spread.onClear, onSearch = _$_object_spread.onSearch, onInputClick = _$_object_spread.onInputClick;
13367
- var _useState = _sliced_to_array(React.useState(function() {
13368
- return outerValue;
13369
- }), 2), value2 = _useState[0], setValue = _useState[1];
13370
- var forceFocus = function() {
13371
- var searchSelf = searchRef.current;
13372
- searchSelf && searchSelf.focus();
13373
- };
13374
- var onInput = function(event) {
13349
+ var searchInputRef = React.useRef(null);
13350
+ var _$_object_spread = _object_spread({}, defaultProps$P, props), outerValue = _$_object_spread.value, defaultValue = _$_object_spread.defaultValue, style = _$_object_spread.style, placeholder = _$_object_spread.placeholder, shape = _$_object_spread.shape, className = _$_object_spread.className, disabled = _$_object_spread.disabled, maxLength = _$_object_spread.maxLength, clearable = _$_object_spread.clearable, readOnly = _$_object_spread.readOnly, autoFocus = _$_object_spread.autoFocus, backable = _$_object_spread.backable, right2 = _$_object_spread.right, left2 = _$_object_spread.left, leftIn = _$_object_spread.leftIn, rightIn = _$_object_spread.rightIn, tag = _$_object_spread.tag, onChange = _$_object_spread.onChange, onFocus = _$_object_spread.onFocus, onBlur = _$_object_spread.onBlur, onClear = _$_object_spread.onClear, onSearch = _$_object_spread.onSearch, onInputClick = _$_object_spread.onInputClick, onItemClick = _$_object_spread.onItemClick;
13351
+ var _usePropsValue = _sliced_to_array(usePropsValue({
13352
+ value: outerValue,
13353
+ defaultValue,
13354
+ finalValue: ""
13355
+ }), 2), value2 = _usePropsValue[0], setValue = _usePropsValue[1];
13356
+ var _useState = _sliced_to_array(React.useState(tag), 2), innerTag = _useState[0], setInnerTag = _useState[1];
13357
+ var forceFocus = React.useCallback(function() {
13358
+ var _searchInputRef_current;
13359
+ (_searchInputRef_current = searchInputRef.current) === null || _searchInputRef_current === void 0 ? void 0 : _searchInputRef_current.focus();
13360
+ }, []);
13361
+ var handleInput = React.useCallback(function(event) {
13375
13362
  var _event_detail;
13376
- var eventValue = event === null || event === void 0 ? void 0 : (_event_detail = event.detail) === null || _event_detail === void 0 ? void 0 : _event_detail.value;
13363
+ var eventValue = (_event_detail = event.detail) === null || _event_detail === void 0 ? void 0 : _event_detail.value;
13377
13364
  if (value2 === eventValue) return;
13378
- onChange && (onChange === null || onChange === void 0 ? void 0 : onChange(eventValue, event));
13365
+ onChange && onChange(eventValue, event);
13379
13366
  setValue(eventValue);
13380
13367
  eventValue === "" && forceFocus();
13381
- };
13382
- var focus = function(event) {
13383
- var _event_detail;
13384
- onFocus && onFocus(event === null || event === void 0 ? void 0 : (_event_detail = event.detail) === null || _event_detail === void 0 ? void 0 : _event_detail.value, event);
13385
- };
13386
- var blur = function(event) {
13368
+ }, [
13369
+ onChange,
13370
+ setValue,
13371
+ forceFocus,
13372
+ value2
13373
+ ]);
13374
+ var handleFocus = React.useCallback(function(event) {
13387
13375
  var _event_detail;
13388
- var searchSelf = searchRef.current;
13389
- searchSelf && searchSelf.blur();
13390
- onBlur && onBlur(event === null || event === void 0 ? void 0 : (_event_detail = event.detail) === null || _event_detail === void 0 ? void 0 : _event_detail.value, event);
13391
- };
13376
+ onFocus && onFocus((_event_detail = event.detail) === null || _event_detail === void 0 ? void 0 : _event_detail.value, event);
13377
+ if (tag) setInnerTag(false);
13378
+ }, [
13379
+ onFocus
13380
+ ]);
13381
+ var _useState1 = _sliced_to_array(React.useState(null), 2), blurTimer = _useState1[0], setBlurTimer = _useState1[1];
13382
+ var handleBlur = React.useCallback(function(event) {
13383
+ var _searchInputRef_current, _event_detail;
13384
+ (_searchInputRef_current = searchInputRef.current) === null || _searchInputRef_current === void 0 ? void 0 : _searchInputRef_current.blur();
13385
+ onBlur && onBlur((_event_detail = event.detail) === null || _event_detail === void 0 ? void 0 : _event_detail.value, event);
13386
+ if (tag) {
13387
+ var timer = setTimeout(function() {
13388
+ if (Taro.getEnv() === "WEB") {
13389
+ var _event_target;
13390
+ setInnerTag(((_event_target = event.target) === null || _event_target === void 0 ? void 0 : _event_target.value) ? tag : false);
13391
+ } else {
13392
+ setInnerTag(tag);
13393
+ }
13394
+ }, 200);
13395
+ setBlurTimer(timer);
13396
+ }
13397
+ }, [
13398
+ onBlur,
13399
+ tag,
13400
+ value2
13401
+ ]);
13392
13402
  React.useEffect(function() {
13393
- setValue(outerValue || "");
13403
+ return function() {
13404
+ if (blurTimer) clearTimeout(blurTimer);
13405
+ };
13406
+ }, [
13407
+ blurTimer
13408
+ ]);
13409
+ var clearaVal = React.useCallback(function(event) {
13410
+ if (disabled || readOnly) return;
13411
+ setValue("");
13412
+ forceFocus();
13413
+ onChange && onChange("");
13414
+ onClear && onClear(event);
13415
+ }, [
13416
+ disabled,
13417
+ readOnly,
13418
+ onChange,
13419
+ onClear,
13420
+ setValue
13421
+ ]);
13422
+ var cls = React.useMemo(function() {
13423
+ var _obj;
13424
+ return classNames(classPrefix2, (_obj = {}, _define_property(_obj, "".concat(classPrefix2, "-disabled"), disabled), _define_property(_obj, "".concat(classPrefix2, "-focus"), left2 || backable), _obj), className);
13394
13425
  }, [
13395
- outerValue
13426
+ disabled,
13427
+ backable,
13428
+ left2,
13429
+ className
13396
13430
  ]);
13397
13431
  React.useEffect(function() {
13398
- if (Taro.getEnv() === "WEB") {
13399
- autoFocus && forceFocus();
13432
+ if (autoFocus) {
13433
+ forceFocus();
13434
+ }
13435
+ if (tag && !innerTag) {
13436
+ forceFocus();
13400
13437
  }
13401
13438
  }, [
13402
- autoFocus
13439
+ autoFocus,
13440
+ forceFocus,
13441
+ innerTag
13403
13442
  ]);
13404
13443
  var renderField = function() {
13405
- return /* @__PURE__ */ React.createElement(components.Input, {
13406
- className: "".concat(classPrefix2, "-input ").concat(clearable ? "".concat(classPrefix2, "-input-clear") : ""),
13407
- ref: searchRef,
13408
- style,
13409
- value: (value2 || "").toString(),
13444
+ var inputCls = classNames("".concat(classPrefix2, "-input"));
13445
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, Taro.getEnv() === "WEB" ? /* @__PURE__ */ React.createElement(components.Input, {
13446
+ className: inputCls,
13447
+ ref: searchInputRef,
13448
+ style: _object_spread({}, style, {
13449
+ color: "".concat(innerTag ? "transparent" : "#333")
13450
+ }),
13451
+ value: value2,
13410
13452
  placeholder: placeholder || locale.placeholder,
13411
13453
  disabled: disabled || readOnly,
13412
13454
  maxlength: maxLength,
13413
13455
  autoFocus,
13414
- onInput,
13415
- onFocus: focus,
13416
- onBlur: blur,
13417
- onClick: clickInput,
13456
+ onInput: handleInput,
13457
+ onFocus: handleFocus,
13458
+ onBlur: handleBlur,
13459
+ onClick: onInputClick,
13418
13460
  onConfirm
13419
- });
13420
- };
13421
- var clickInput = function(e) {
13422
- onInputClick && onInputClick(e);
13461
+ }) : /* @__PURE__ */ React.createElement(components.Input, {
13462
+ className: inputCls,
13463
+ ref: searchInputRef,
13464
+ style: _object_spread({}, style, {
13465
+ color: "".concat(innerTag ? "transparent" : "#333")
13466
+ }),
13467
+ value: value2,
13468
+ placeholder: placeholder || locale.placeholder,
13469
+ disabled: disabled || readOnly,
13470
+ maxlength: maxLength,
13471
+ focus: autoFocus,
13472
+ onInput: handleInput,
13473
+ onFocus: handleFocus,
13474
+ onBlur: handleBlur,
13475
+ onClick: onInputClick,
13476
+ onConfirm
13477
+ }));
13423
13478
  };
13424
- var renderLeftIn = function() {
13479
+ var renderValueByTags = React.useCallback(function() {
13480
+ if (!innerTag) return null;
13481
+ if (!value2) {
13482
+ setTimeout(function() {
13483
+ forceFocus();
13484
+ }, 0);
13485
+ return null;
13486
+ }
13487
+ var list = value2.split(",");
13488
+ if (!list) return null;
13489
+ return /* @__PURE__ */ React.createElement(components.View, {
13490
+ className: "nut-searchbar-values"
13491
+ }, list.map(function(item, index2) {
13492
+ return /* @__PURE__ */ React.createElement(components.View, {
13493
+ key: "def-".concat(index2),
13494
+ className: "nut-searchbar-value",
13495
+ onClick: function(e) {
13496
+ return onItemClick === null || onItemClick === void 0 ? void 0 : onItemClick(item, e);
13497
+ }
13498
+ }, item, /* @__PURE__ */ React.createElement(IconSVG$p, null));
13499
+ }));
13500
+ }, [
13501
+ value2,
13502
+ onItemClick,
13503
+ innerTag
13504
+ ]);
13505
+ var renderLeftIn = React.useCallback(function() {
13425
13506
  if (!leftIn) return null;
13426
13507
  return /* @__PURE__ */ React.createElement(components.View, {
13427
13508
  className: "".concat(classPrefix2, "-leftin ").concat(classPrefix2, "-icon")
13428
13509
  }, leftIn);
13429
- };
13430
- var renderLeft = function() {
13510
+ }, [
13511
+ leftIn
13512
+ ]);
13513
+ var renderLeft = React.useCallback(function() {
13431
13514
  if (!backable && !left2) return null;
13432
13515
  return /* @__PURE__ */ React.createElement(components.View, {
13433
13516
  className: "".concat(classPrefix2, "-left")
13434
- }, backable ? /* @__PURE__ */ React.createElement(IconSVG$y, {
13435
- size: "16"
13436
- }) : left2);
13437
- };
13438
- var renderRightIn = function() {
13517
+ }, backable ? /* @__PURE__ */ React.createElement(IconSVG$y, null) : left2);
13518
+ }, [
13519
+ backable,
13520
+ left2
13521
+ ]);
13522
+ var renderRightIn = React.useCallback(function() {
13439
13523
  if (!rightIn) return null;
13440
- return /* @__PURE__ */ React.createElement(components.View, {
13524
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.isValidElement(rightIn) ? /* @__PURE__ */ React.createElement(components.View, {
13441
13525
  className: "".concat(classPrefix2, "-rightin ").concat(classPrefix2, "-icon")
13442
- }, rightIn);
13443
- };
13444
- var renderRight = function() {
13526
+ }, rightIn) : /* @__PURE__ */ React.createElement(components.View, {
13527
+ className: "".concat(classPrefix2, "-rightin")
13528
+ }, rightIn));
13529
+ }, [
13530
+ rightIn
13531
+ ]);
13532
+ var renderRight = React.useCallback(function() {
13445
13533
  if (!right2) return null;
13446
13534
  return /* @__PURE__ */ React.createElement(components.View, {
13447
13535
  className: "".concat(classPrefix2, "-right")
13448
13536
  }, right2);
13449
- };
13450
- var handleClear = function() {
13537
+ }, [
13538
+ right2
13539
+ ]);
13540
+ var renderClear = React.useCallback(function() {
13451
13541
  return /* @__PURE__ */ React.createElement(components.View, {
13452
- className: "".concat(classPrefix2, "-clear ").concat(classPrefix2, "-icon"),
13453
- onClick: function(e) {
13454
- return clearaVal(e);
13455
- }
13456
- }, /* @__PURE__ */ React.createElement(IconSVG$f, {
13457
- size: 16
13458
- }));
13459
- };
13460
- var clearaVal = function(event) {
13461
- if (disabled || readOnly) {
13462
- return;
13463
- }
13464
- setValue("");
13465
- forceFocus();
13466
- onChange && (onChange === null || onChange === void 0 ? void 0 : onChange(""));
13467
- onClear && onClear(event);
13468
- };
13542
+ className: "".concat(classPrefix2, "-clear ").concat(classPrefix2, "-icon"),
13543
+ style: {
13544
+ visibility: "".concat(!innerTag && value2 && clearable ? "visible" : "hidden")
13545
+ },
13546
+ onClick: clearaVal,
13547
+ "aria-label": "清除"
13548
+ }, /* @__PURE__ */ React.createElement(IconSVG$f, null));
13549
+ }, [
13550
+ value2,
13551
+ clearable,
13552
+ clearaVal,
13553
+ innerTag
13554
+ ]);
13469
13555
  var onConfirm = function() {
13470
13556
  onSearch && onSearch(value2);
13471
13557
  };
13472
13558
  return /* @__PURE__ */ React.createElement(components.View, {
13473
- className: "".concat(classPrefix2, " ").concat(disabled ? "".concat(classPrefix2, "-disabled") : "", " ").concat(className || ""),
13559
+ className: cls,
13474
13560
  style
13475
13561
  }, renderLeft(), /* @__PURE__ */ React.createElement(components.View, {
13476
- className: "".concat(classPrefix2, "-content ").concat(shape === "round" ? "".concat(classPrefix2, "-round") : "")
13562
+ className: classNames("".concat(classPrefix2, "-content"), _define_property({}, "".concat(classPrefix2, "-round"), shape === "round"))
13477
13563
  }, renderLeftIn(), /* @__PURE__ */ React.createElement(components.View, {
13478
13564
  className: "nut-searchbar-input-box"
13479
- }, renderField()), clearable && !value2 && renderRightIn(), clearable && value2 && handleClear()), renderRight());
13565
+ }, renderField()), renderValueByTags(), renderClear(), renderRightIn()), renderRight());
13480
13566
  };
13481
13567
  SearchBar.displayName = "NutSearchBar";
13482
13568
  var defaultProps$O = _object_spread_props(_object_spread({}, ComponentDefaults), {
@@ -14008,8 +14094,14 @@
14008
14094
  delay: 0
14009
14095
  });
14010
14096
  var Progress = function(props) {
14011
- var rtl = useRtl();
14012
- var _ref = _object_spread({}, defaultProps$K, props), className = _ref.className, style = _ref.style, percent = _ref.percent, background = _ref.background, color = _ref.color, strokeWidth = _ref.strokeWidth, showText = _ref.showText, animated = _ref.animated, children = _ref.children, lazy = _ref.lazy, delay = _ref.delay, rest = _object_without_properties(_ref, [
14097
+ useRtl();
14098
+ var _ref = _object_spread({}, defaultProps$K, props), className = _ref.className, style = _ref.style, percent = _ref.percent;
14099
+ _ref.background;
14100
+ _ref.color;
14101
+ var strokeWidth = _ref.strokeWidth;
14102
+ _ref.showText;
14103
+ _ref.animated;
14104
+ var children = _ref.children, lazy = _ref.lazy, delay = _ref.delay, showInfo = _ref.showInfo, borderRadius = _ref.borderRadius, fontSize = _ref.fontSize, activeColor = _ref.activeColor, backgroundColor = _ref.backgroundColor, active2 = _ref.active, activeMode = _ref.activeMode, duration = _ref.duration, ariaLabel = _ref.ariaLabel, onActiveEnd = _ref.onActiveEnd, rest = _object_without_properties(_ref, [
14013
14105
  "className",
14014
14106
  "style",
14015
14107
  "percent",
@@ -14020,24 +14112,50 @@
14020
14112
  "animated",
14021
14113
  "children",
14022
14114
  "lazy",
14023
- "delay"
14115
+ "delay",
14116
+ "showInfo",
14117
+ "borderRadius",
14118
+ "fontSize",
14119
+ "activeColor",
14120
+ "backgroundColor",
14121
+ "active",
14122
+ "activeMode",
14123
+ "duration",
14124
+ "ariaLabel",
14125
+ "onActiveEnd"
14024
14126
  ]);
14025
14127
  var classPrefix2 = "nut-progress";
14128
+ var _props_showText, _ref1;
14129
+ var effectiveShowText = (_ref1 = (_props_showText = props.showText) !== null && _props_showText !== void 0 ? _props_showText : showInfo) !== null && _ref1 !== void 0 ? _ref1 : defaultProps$K.showText;
14130
+ var _props_color, _ref2;
14131
+ var effectiveColor = (_ref2 = (_props_color = props.color) !== null && _props_color !== void 0 ? _props_color : activeColor) !== null && _ref2 !== void 0 ? _ref2 : defaultProps$K.color;
14132
+ var _props_background, _ref3;
14133
+ var effectiveBgColor = (_ref3 = (_props_background = props.background) !== null && _props_background !== void 0 ? _props_background : backgroundColor) !== null && _ref3 !== void 0 ? _ref3 : defaultProps$K.background;
14134
+ var _props_animated, _ref4;
14135
+ var effectiveAnimated = (_ref4 = (_props_animated = props.animated) !== null && _props_animated !== void 0 ? _props_animated : active2) !== null && _ref4 !== void 0 ? _ref4 : defaultProps$K.animated;
14026
14136
  var _obj;
14027
- var classesInner = classNames((_obj = {}, _define_property(_obj, "".concat(classPrefix2, "-inner"), true), _define_property(_obj, "".concat(classPrefix2, "-active"), animated), _obj));
14028
- var stylesOuter = {
14029
- width: "100%",
14030
- backgroundColor: background
14031
- };
14137
+ var classesInner = classNames((_obj = {}, _define_property(_obj, "".concat(classPrefix2, "-inner"), true), _define_property(_obj, "".concat(classPrefix2, "-active"), effectiveAnimated), _obj));
14032
14138
  var _useState = _sliced_to_array(React.useState(percent), 2), displayPercent = _useState[0], setDispalyPercent = _useState[1];
14033
- var stylesInner = {
14034
- width: "".concat(displayPercent, "%"),
14035
- background: color || "#FF0F23"
14139
+ var getStyles = function() {
14140
+ var baseStyles = {
14141
+ height: strokeWidth && pxTransform(Number(strokeWidth)),
14142
+ borderRadius: borderRadius && pxTransform(parseInt(borderRadius.toString()))
14143
+ };
14144
+ var transitionStyle = {
14145
+ transition: "width ".concat(duration || 300, "ms ease-in-out")
14146
+ };
14147
+ return {
14148
+ outer: _object_spread({
14149
+ width: "100%",
14150
+ backgroundColor: effectiveBgColor
14151
+ }, baseStyles),
14152
+ inner: _object_spread({
14153
+ width: "".concat(displayPercent, "%"),
14154
+ background: effectiveColor || "#FF0F23"
14155
+ }, baseStyles, transitionStyle)
14156
+ };
14036
14157
  };
14037
- if (strokeWidth) {
14038
- stylesOuter.height = pxTransform(Number(strokeWidth));
14039
- stylesInner.height = pxTransform(Number(strokeWidth));
14040
- }
14158
+ var _getStyles = getStyles(), stylesOuter = _getStyles.outer, stylesInner = _getStyles.inner;
14041
14159
  var handlePercent = function() {
14042
14160
  var timer = null;
14043
14161
  if (delay) {
@@ -14052,9 +14170,24 @@
14052
14170
  };
14053
14171
  };
14054
14172
  React.useEffect(function() {
14055
- setDispalyPercent(percent);
14173
+ var timer = null;
14174
+ if (activeMode === "backwards") {
14175
+ setDispalyPercent(0);
14176
+ timer = setTimeout(function() {
14177
+ setDispalyPercent(percent);
14178
+ }, duration || 300);
14179
+ } else {
14180
+ setDispalyPercent(percent);
14181
+ }
14182
+ return function() {
14183
+ if (timer) {
14184
+ clearTimeout(timer);
14185
+ }
14186
+ };
14056
14187
  }, [
14057
- percent
14188
+ percent,
14189
+ activeMode,
14190
+ duration
14058
14191
  ]);
14059
14192
  var _useState1 = _sliced_to_array(React.useState(false), 2), intersecting = _useState1[0], setIntersecting = _useState1[1];
14060
14193
  var progressRef = React.useRef(null);
@@ -14122,36 +14255,12 @@
14122
14255
  handleOtherObserver();
14123
14256
  }
14124
14257
  }, []);
14125
- var getTextStyle = function() {
14126
- return rtl ? {
14127
- right: "100%"
14128
- } : {
14129
- left: "100%"
14130
- };
14131
- };
14132
- var computeRight = function() {
14133
- if (children) {
14134
- return 0;
14135
- }
14136
- if (!harmony()) {
14137
- return Math.floor("".concat(percent, "%").length * 9 / 2);
14138
- }
14139
- return Math.floor(("".concat(percent, "%").length * 9 + 4) / 2);
14140
- };
14141
- var computeInnerStyle = function() {
14142
- var style2 = {
14143
- backgroundColor: color || "#ff0f23"
14144
- };
14145
- if (harmony()) {
14146
- style2.width = harmony() ? pxTransform("".concat(percent, "%").length * 9 + 4) : "".concat(percent, "%").length * 9 + 4;
14147
- }
14148
- return style2;
14149
- };
14150
14258
  return /* @__PURE__ */ React.createElement(components.View, _object_spread({
14151
14259
  ref: progressRef,
14152
14260
  id: selector,
14153
14261
  className: classNames(classPrefix2, className),
14154
- style
14262
+ style,
14263
+ "aria-label": ariaLabel
14155
14264
  }, rest), /* @__PURE__ */ React.createElement(components.View, {
14156
14265
  className: "".concat(classPrefix2, "-outer"),
14157
14266
  style: stylesOuter
@@ -14159,25 +14268,14 @@
14159
14268
  className: classesInner,
14160
14269
  style: _object_spread_props(_object_spread({}, stylesInner), {
14161
14270
  position: "relative"
14162
- })
14163
- }, showText && /* @__PURE__ */ React.createElement(components.View, {
14164
- style: _define_property({
14165
- position: "relative"
14166
- }, rtl ? "left" : "right", computeRight())
14167
- }, /* @__PURE__ */ React.createElement(components.View, {
14271
+ }),
14272
+ onTransitionEnd: onActiveEnd
14273
+ })), effectiveShowText && /* @__PURE__ */ React.createElement(components.View, {
14168
14274
  className: "".concat(classPrefix2, "-text"),
14169
- style: _object_spread_props(_object_spread({}, getTextStyle()), {
14170
- height: (
14171
- // eslint-disable-next-line no-nested-ternary
14172
- harmony() ? pxTransform(strokeWidth ? Number(strokeWidth) + 8 : 18) : strokeWidth ? Number(strokeWidth) + 8 : 18
14173
- ),
14174
- position: "absolute",
14175
- top: -(strokeWidth ? (Number(strokeWidth) + 8 - 9) / 2 + 5 : 9)
14176
- })
14177
- }, children || /* @__PURE__ */ React.createElement(components.View, {
14178
- className: "".concat(classPrefix2, "-text-inner"),
14179
- style: computeInnerStyle()
14180
- }, "".concat(percent, "%")))))));
14275
+ style: {
14276
+ fontSize: fontSize && parseInt(fontSize.toString())
14277
+ }
14278
+ }, children || "".concat(percent, "%")));
14181
14279
  };
14182
14280
  Progress.displayName = "NutProgress";
14183
14281
  var Preview = function(param) {
@@ -14401,7 +14499,8 @@
14401
14499
  if (disabled) {
14402
14500
  return;
14403
14501
  }
14404
- if (Taro.getEnv() === "WEB") {
14502
+ var env = Taro.getEnv();
14503
+ if (env === "WEB") {
14405
14504
  var el = document.getElementById("taroChooseImage");
14406
14505
  if (el) {
14407
14506
  el === null || el === void 0 ? void 0 : el.setAttribute("accept", accept);
@@ -14414,7 +14513,11 @@
14414
14513
  document.body.appendChild(obj);
14415
14514
  }
14416
14515
  }
14417
- if ((Taro.getEnv() === "WEAPP" || Taro.getEnv() === "JD") && Taro.chooseMedia) {
14516
+ if ([
14517
+ "WEAPP",
14518
+ "JD",
14519
+ "WEB"
14520
+ ].includes(env) && Taro.chooseMedia) {
14418
14521
  Taro.chooseMedia({
14419
14522
  count: multiple ? maxCount * 1 - fileList.length : 1,
14420
14523
  /** 文件类型 */
@@ -14657,32 +14760,22 @@
14657
14760
  }();
14658
14761
  var onChangeImage = /* @__PURE__ */ function() {
14659
14762
  var _ref2 = _async_to_generator(function(res) {
14660
- var tempFiles, _files, files, filesArr;
14763
+ var tempFiles, _files;
14661
14764
  return __generator(this, function(_state) {
14662
- switch (_state.label) {
14663
- case 0:
14664
- tempFiles = res.tempFiles;
14665
- _files = filterFiles(tempFiles);
14666
- files = [];
14667
- filesArr = new Array().slice.call(files);
14668
- if (!beforeUpload) return [
14669
- 3,
14670
- 2
14671
- ];
14672
- return [
14673
- 4,
14674
- beforeUpload(filesArr)
14675
- ];
14676
- case 1:
14677
- files = _state.sent();
14678
- _state.label = 2;
14679
- case 2:
14680
- files = filterFiles(filesArr);
14681
- readFile(_files);
14682
- return [
14683
- 2
14684
- ];
14765
+ tempFiles = res.tempFiles;
14766
+ _files = filterFiles(tempFiles);
14767
+ if (beforeUpload) {
14768
+ beforeUpload(new Array().slice.call(_files)).then(function(f) {
14769
+ var _files2 = filterFiles(new Array().slice.call(f));
14770
+ if (!_files2.length) res.tempFiles = [];
14771
+ readFile(_files2);
14772
+ });
14773
+ } else {
14774
+ readFile(_files);
14685
14775
  }
14776
+ return [
14777
+ 2
14778
+ ];
14686
14779
  });
14687
14780
  });
14688
14781
  return function onChangeImage2(res) {
@@ -39817,76 +39910,112 @@
39817
39910
  icon: null
39818
39911
  });
39819
39912
  var Step = function(props) {
39820
- var _ref = _object_spread({}, defaultProps$d, props);
39821
- _ref.children;
39822
- var title = _ref.title, description = _ref.description, value2 = _ref.value, icon = _ref.icon, className = _ref.className, restProps = _object_without_properties(_ref, [
39823
- "children",
39824
- "title",
39825
- "description",
39826
- "value",
39827
- "icon",
39828
- "className"
39829
- ]);
39913
+ var _$_object_spread = _object_spread({}, defaultProps$d, props), type2 = _$_object_spread.type, title = _$_object_spread.title, description = _$_object_spread.description, value2 = _$_object_spread.value, icon = _$_object_spread.icon, className = _$_object_spread.className, style = _$_object_spread.style;
39830
39914
  var parent2 = React.useContext(DataContext);
39831
- var dot = parent2.propSteps.dot;
39832
- var getCurrentStatus = function() {
39833
- var index2 = value2;
39834
- if (index2 < +parent2.propSteps.value) return "finish";
39835
- return index2 === +parent2.propSteps.value ? "process" : "wait";
39836
- };
39837
- var handleClickStep = function() {
39838
- var _parent_propSteps, _parent_propSteps1;
39839
- ((_parent_propSteps = parent2.propSteps) === null || _parent_propSteps === void 0 ? void 0 : _parent_propSteps.onStepClick) && ((_parent_propSteps1 = parent2.propSteps) === null || _parent_propSteps1 === void 0 ? void 0 : _parent_propSteps1.onStepClick(value2));
39840
- };
39915
+ var _parent_propSteps = parent2.propSteps, parentType = _parent_propSteps.type, parentValue = _parent_propSteps.value, status = _parent_propSteps.status, parentIcon = _parent_propSteps.icon, onStepClick = _parent_propSteps.onStepClick;
39916
+ var currentStatus = React.useMemo(function() {
39917
+ if ([
39918
+ "default",
39919
+ "business"
39920
+ ].includes(status)) {
39921
+ return status;
39922
+ }
39923
+ if (value2 < +parentValue) return "finish";
39924
+ return value2 === +parentValue ? "process" : "wait";
39925
+ }, [
39926
+ value2,
39927
+ parentValue,
39928
+ status
39929
+ ]);
39930
+ var handleClickStep = React.useCallback(function() {
39931
+ onStepClick === null || onStepClick === void 0 ? void 0 : onStepClick(value2);
39932
+ }, [
39933
+ onStepClick,
39934
+ value2
39935
+ ]);
39841
39936
  var classPrefix2 = "nut-step";
39842
- var classes = classNames(classPrefix2, _define_property({}, "".concat(classPrefix2, "-").concat(getCurrentStatus()), true), className);
39843
- var renderIconClass = function() {
39844
- if (icon) {
39845
- return "".concat(classPrefix2, "-icon is-icon");
39846
- }
39847
- if (!dot && !icon) {
39848
- return "".concat(classPrefix2, "-icon is-text");
39937
+ var classes = React.useMemo(function() {
39938
+ var _obj;
39939
+ return classNames(classPrefix2, (_obj = {}, _define_property(_obj, "".concat(classPrefix2, "-").concat(currentStatus), true), _define_property(_obj, "".concat(classPrefix2, "-").concat(type2 || parentType), true), _define_property(_obj, "".concat(classPrefix2, "-special"), description), _obj), className);
39940
+ }, [
39941
+ currentStatus,
39942
+ type2,
39943
+ className,
39944
+ description,
39945
+ classPrefix2
39946
+ ]);
39947
+ var renderHeadType = React.useMemo(function() {
39948
+ switch (type2 || parentType) {
39949
+ case "text":
39950
+ return /* @__PURE__ */ React.createElement(components.View, {
39951
+ className: "".concat(classPrefix2, "-head-text")
39952
+ }, value2);
39953
+ case "dot":
39954
+ return /* @__PURE__ */ React.createElement(components.View, {
39955
+ className: "".concat(classPrefix2, "-head-dot")
39956
+ });
39957
+ case "icon":
39958
+ return /* @__PURE__ */ React.createElement(components.View, {
39959
+ className: "".concat(classPrefix2, "-head-icon")
39960
+ }, icon || parentIcon);
39961
+ default:
39962
+ return null;
39849
39963
  }
39850
- return "".concat(classPrefix2, "-icon");
39851
- };
39852
- return /* @__PURE__ */ React.createElement("div", _object_spread_props(_object_spread({
39853
- className: classes
39854
- }, restProps), {
39964
+ }, [
39965
+ type2,
39966
+ value2,
39967
+ icon
39968
+ ]);
39969
+ var renderContent = React.useMemo(function() {
39970
+ if (!title && !description) return null;
39971
+ return /* @__PURE__ */ React.createElement("div", {
39972
+ className: "".concat(classPrefix2, "-main")
39973
+ }, title && /* @__PURE__ */ React.createElement(components.View, {
39974
+ className: "".concat(classPrefix2, "-title")
39975
+ }, title), description && /* @__PURE__ */ React.createElement(components.View, {
39976
+ className: "".concat(classPrefix2, "-description")
39977
+ }, description));
39978
+ }, [
39979
+ title,
39980
+ description
39981
+ ]);
39982
+ return /* @__PURE__ */ React.createElement("div", {
39983
+ className: classes,
39984
+ style,
39855
39985
  onClick: handleClickStep
39856
- }), /* @__PURE__ */ React.createElement(components.View, {
39857
- className: "nut-step-head"
39858
39986
  }, /* @__PURE__ */ React.createElement(components.View, {
39859
- className: "nut-step-line"
39860
- }), /* @__PURE__ */ React.createElement(components.View, {
39861
- className: renderIconClass()
39862
- }, icon || !dot && /* @__PURE__ */ React.createElement("span", {
39863
- className: "nut-step-inner"
39864
- }, value2))), (title || description) && /* @__PURE__ */ React.createElement(components.View, {
39865
- className: "nut-step-main"
39866
- }, /* @__PURE__ */ React.createElement("span", {
39867
- className: "nut-step-title"
39868
- }, title), description && /* @__PURE__ */ React.createElement("span", {
39869
- className: "nut-step-description"
39870
- }, description)));
39987
+ className: "".concat(classPrefix2, "-head")
39988
+ }, /* @__PURE__ */ React.createElement(components.View, {
39989
+ className: "".concat(classPrefix2, "-head-").concat(type2 || parentType, "-wrap")
39990
+ }, renderHeadType)), /* @__PURE__ */ React.createElement(components.View, {
39991
+ className: "".concat(classPrefix2, "-line")
39992
+ }, /* @__PURE__ */ React.createElement(components.View, {
39993
+ className: "".concat(classPrefix2, "-line-inner")
39994
+ })), renderContent);
39871
39995
  };
39872
39996
  Step.displayName = "NutStep";
39873
39997
  var defaultProps$c = _object_spread_props(_object_spread({}, ComponentDefaults), {
39874
- value: 0,
39875
39998
  direction: "horizontal",
39876
- dot: false
39999
+ layout: "single",
40000
+ type: "text",
40001
+ status: "default",
40002
+ value: 0,
40003
+ icon: null
39877
40004
  });
39878
40005
  var Steps = function(props) {
39879
40006
  var propSteps = _object_spread({}, defaultProps$c, props);
39880
- var children = propSteps.children;
40007
+ var direction = propSteps.direction;
39881
40008
  propSteps.value;
39882
- var direction = propSteps.direction, className = propSteps.className, dot = propSteps.dot;
40009
+ var layout = propSteps.layout, status = propSteps.status, type2 = propSteps.type, className = propSteps.className, children = propSteps.children;
39883
40010
  propSteps.onStepClick;
39884
40011
  var restProps = _object_without_properties(propSteps, [
39885
- "children",
39886
- "value",
39887
40012
  "direction",
40013
+ "value",
40014
+ "layout",
40015
+ "status",
40016
+ "type",
39888
40017
  "className",
39889
- "dot",
40018
+ "children",
39890
40019
  "onStepClick"
39891
40020
  ]);
39892
40021
  var parentSteps = {
@@ -39894,12 +40023,22 @@
39894
40023
  };
39895
40024
  var classPrefix2 = "nut-steps";
39896
40025
  var _obj;
39897
- var classes = classNames(classPrefix2, (_obj = {}, _define_property(_obj, "".concat(classPrefix2, "-").concat(direction), true), _define_property(_obj, "".concat(classPrefix2, "-dot"), !!dot), _obj), className);
40026
+ var classes = classNames(classPrefix2, (_obj = {}, _define_property(_obj, "".concat(classPrefix2, "-").concat(direction), true), _define_property(_obj, "".concat(classPrefix2, "-").concat(direction, "-count-").concat(React.Children.count(children)), true), _define_property(_obj, "".concat(classPrefix2, "-").concat(direction, "-").concat(layout), true), _define_property(_obj, "".concat(classPrefix2, "-").concat(direction, "-").concat(type2), true), _define_property(_obj, "".concat(classPrefix2, "-").concat(direction, "-").concat(status), true), _obj), className);
39898
40027
  return /* @__PURE__ */ React.createElement(DataContext.Provider, {
39899
40028
  value: parentSteps
39900
40029
  }, /* @__PURE__ */ React.createElement("div", _object_spread({
39901
40030
  className: classes
39902
- }, restProps), children));
40031
+ }, restProps), React.Children.map(children, function(child, index2) {
40032
+ if (/* @__PURE__ */ React.isValidElement(child)) {
40033
+ return /* @__PURE__ */ React.cloneElement(child, {
40034
+ // @ts-ignore
40035
+ className: classNames(child.props.className, {
40036
+ "nut-step-last": index2 === React.Children.count(children) - 1
40037
+ })
40038
+ });
40039
+ }
40040
+ return child;
40041
+ })));
39903
40042
  };
39904
40043
  Steps.displayName = "NutSteps";
39905
40044
  function useTableSticky(columns) {