@arco-design/mobile-react 2.31.6 → 2.32.0

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 (859) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/LICENSE +21 -0
  3. package/README.en-US.md +2 -2
  4. package/README.md +2 -2
  5. package/cjs/_helpers/index.d.ts +1 -0
  6. package/cjs/_helpers/index.js +9 -0
  7. package/cjs/_helpers/react-dom.js +18 -10
  8. package/dist/index.js +91 -66
  9. package/dist/index.min.js +4 -4
  10. package/esm/_helpers/index.d.ts +1 -0
  11. package/esm/_helpers/index.js +1 -0
  12. package/esm/_helpers/react-dom.js +15 -11
  13. package/esnext/_helpers/hooks.d.ts +290 -0
  14. package/esnext/_helpers/hooks.js +660 -0
  15. package/esnext/_helpers/index.d.ts +93 -0
  16. package/esnext/_helpers/index.js +110 -0
  17. package/esnext/_helpers/react-dom.d.ts +13 -0
  18. package/esnext/_helpers/react-dom.js +51 -0
  19. package/esnext/_helpers/render.d.ts +17 -0
  20. package/esnext/_helpers/render.js +38 -0
  21. package/esnext/_helpers/type.d.ts +30 -0
  22. package/esnext/_helpers/type.js +1 -0
  23. package/esnext/action-sheet/index.d.ts +106 -0
  24. package/esnext/action-sheet/index.js +53 -0
  25. package/esnext/action-sheet/methods.d.ts +10 -0
  26. package/esnext/action-sheet/methods.js +4 -0
  27. package/esnext/action-sheet/style/css/index.css +741 -0
  28. package/esnext/action-sheet/style/css/index.d.ts +3 -0
  29. package/esnext/action-sheet/style/css/index.js +3 -0
  30. package/esnext/action-sheet/style/index.d.ts +3 -0
  31. package/esnext/action-sheet/style/index.js +3 -0
  32. package/esnext/action-sheet/style/index.less +119 -0
  33. package/esnext/avatar/group.d.ts +9 -0
  34. package/esnext/avatar/group.js +35 -0
  35. package/esnext/avatar/index.d.ts +17 -0
  36. package/esnext/avatar/index.js +87 -0
  37. package/esnext/avatar/style/css/index.css +792 -0
  38. package/esnext/avatar/style/css/index.d.ts +3 -0
  39. package/esnext/avatar/style/css/index.js +3 -0
  40. package/esnext/avatar/style/index.d.ts +3 -0
  41. package/esnext/avatar/style/index.js +3 -0
  42. package/esnext/avatar/style/index.less +201 -0
  43. package/esnext/avatar/type.d.ts +126 -0
  44. package/esnext/avatar/type.js +1 -0
  45. package/esnext/badge/index.d.ts +80 -0
  46. package/esnext/badge/index.js +29 -0
  47. package/esnext/badge/style/css/index.css +640 -0
  48. package/esnext/badge/style/css/index.d.ts +2 -0
  49. package/esnext/badge/style/css/index.js +2 -0
  50. package/esnext/badge/style/index.d.ts +2 -0
  51. package/esnext/badge/style/index.js +2 -0
  52. package/esnext/badge/style/index.less +109 -0
  53. package/esnext/button/hooks.d.ts +8 -0
  54. package/esnext/button/hooks.js +45 -0
  55. package/esnext/button/index.d.ts +141 -0
  56. package/esnext/button/index.js +61 -0
  57. package/esnext/button/style/css/index.css +816 -0
  58. package/esnext/button/style/css/index.d.ts +3 -0
  59. package/esnext/button/style/css/index.js +3 -0
  60. package/esnext/button/style/index.d.ts +3 -0
  61. package/esnext/button/style/index.js +3 -0
  62. package/esnext/button/style/index.less +242 -0
  63. package/esnext/carousel/index.d.ts +383 -0
  64. package/esnext/carousel/index.js +840 -0
  65. package/esnext/carousel/style/css/index.css +748 -0
  66. package/esnext/carousel/style/css/index.d.ts +2 -0
  67. package/esnext/carousel/style/css/index.js +2 -0
  68. package/esnext/carousel/style/index.d.ts +2 -0
  69. package/esnext/carousel/style/index.js +2 -0
  70. package/esnext/carousel/style/index.less +263 -0
  71. package/esnext/cell/arrow.d.ts +2 -0
  72. package/esnext/cell/arrow.js +5 -0
  73. package/esnext/cell/cell.d.ts +3 -0
  74. package/esnext/cell/cell.js +24 -0
  75. package/esnext/cell/group.d.ts +7 -0
  76. package/esnext/cell/group.js +26 -0
  77. package/esnext/cell/index.d.ts +14 -0
  78. package/esnext/cell/index.js +16 -0
  79. package/esnext/cell/style/css/index.css +1008 -0
  80. package/esnext/cell/style/css/index.d.ts +2 -0
  81. package/esnext/cell/style/css/index.js +2 -0
  82. package/esnext/cell/style/index.d.ts +2 -0
  83. package/esnext/cell/style/index.js +2 -0
  84. package/esnext/cell/style/index.less +214 -0
  85. package/esnext/cell/type.d.ts +125 -0
  86. package/esnext/cell/type.js +1 -0
  87. package/esnext/checkbox/checkbox.d.ts +3 -0
  88. package/esnext/checkbox/checkbox.js +106 -0
  89. package/esnext/checkbox/group.d.ts +4 -0
  90. package/esnext/checkbox/group.js +54 -0
  91. package/esnext/checkbox/hooks/index.d.ts +1 -0
  92. package/esnext/checkbox/hooks/index.js +1 -0
  93. package/esnext/checkbox/hooks/useMergeProps.d.ts +3 -0
  94. package/esnext/checkbox/hooks/useMergeProps.js +20 -0
  95. package/esnext/checkbox/index.d.ts +19 -0
  96. package/esnext/checkbox/index.js +22 -0
  97. package/esnext/checkbox/style/css/index.css +613 -0
  98. package/esnext/checkbox/style/css/index.d.ts +2 -0
  99. package/esnext/checkbox/style/css/index.js +2 -0
  100. package/esnext/checkbox/style/index.d.ts +2 -0
  101. package/esnext/checkbox/style/index.js +2 -0
  102. package/esnext/checkbox/style/index.less +119 -0
  103. package/esnext/checkbox/type.d.ts +162 -0
  104. package/esnext/checkbox/type.js +27 -0
  105. package/esnext/circle-progress/index.d.ts +141 -0
  106. package/esnext/circle-progress/index.js +75 -0
  107. package/esnext/circle-progress/style/css/index.css +582 -0
  108. package/esnext/circle-progress/style/css/index.d.ts +2 -0
  109. package/esnext/circle-progress/style/css/index.js +2 -0
  110. package/esnext/circle-progress/style/index.d.ts +2 -0
  111. package/esnext/circle-progress/style/index.js +2 -0
  112. package/esnext/circle-progress/style/index.less +101 -0
  113. package/esnext/collapse/collapse.d.ts +3 -0
  114. package/esnext/collapse/collapse.js +111 -0
  115. package/esnext/collapse/group.d.ts +21 -0
  116. package/esnext/collapse/group.js +80 -0
  117. package/esnext/collapse/index.d.ts +23 -0
  118. package/esnext/collapse/index.js +14 -0
  119. package/esnext/collapse/style/css/index.css +662 -0
  120. package/esnext/collapse/style/css/index.d.ts +2 -0
  121. package/esnext/collapse/style/css/index.js +2 -0
  122. package/esnext/collapse/style/index.d.ts +2 -0
  123. package/esnext/collapse/style/index.js +2 -0
  124. package/esnext/collapse/style/index.less +106 -0
  125. package/esnext/collapse/type.d.ts +139 -0
  126. package/esnext/collapse/type.js +1 -0
  127. package/esnext/collapse/utils.d.ts +8 -0
  128. package/esnext/collapse/utils.js +16 -0
  129. package/esnext/context-provider/index.d.ts +74 -0
  130. package/esnext/context-provider/index.js +99 -0
  131. package/esnext/context-provider/style/css/index.css +0 -0
  132. package/esnext/context-provider/style/css/index.d.ts +2 -0
  133. package/esnext/context-provider/style/css/index.js +2 -0
  134. package/esnext/context-provider/style/index.d.ts +2 -0
  135. package/esnext/context-provider/style/index.js +2 -0
  136. package/esnext/context-provider/style/index.less +1 -0
  137. package/esnext/count-down/hooks.d.ts +10 -0
  138. package/esnext/count-down/hooks.js +107 -0
  139. package/esnext/count-down/index.d.ts +13 -0
  140. package/esnext/count-down/index.js +37 -0
  141. package/esnext/count-down/singleton.d.ts +15 -0
  142. package/esnext/count-down/singleton.js +52 -0
  143. package/esnext/count-down/style/css/index.css +534 -0
  144. package/esnext/count-down/style/css/index.d.ts +2 -0
  145. package/esnext/count-down/style/css/index.js +2 -0
  146. package/esnext/count-down/style/index.d.ts +2 -0
  147. package/esnext/count-down/style/index.js +2 -0
  148. package/esnext/count-down/style/index.less +37 -0
  149. package/esnext/count-down/type.d.ts +112 -0
  150. package/esnext/count-down/type.js +1 -0
  151. package/esnext/count-down/util.d.ts +8 -0
  152. package/esnext/count-down/util.js +106 -0
  153. package/esnext/date-picker/helper.d.ts +5 -0
  154. package/esnext/date-picker/helper.js +38 -0
  155. package/esnext/date-picker/index.d.ts +24 -0
  156. package/esnext/date-picker/index.js +217 -0
  157. package/esnext/date-picker/style/css/index.css +526 -0
  158. package/esnext/date-picker/style/css/index.d.ts +3 -0
  159. package/esnext/date-picker/style/css/index.js +3 -0
  160. package/esnext/date-picker/style/index.d.ts +3 -0
  161. package/esnext/date-picker/style/index.js +3 -0
  162. package/esnext/date-picker/style/index.less +30 -0
  163. package/esnext/date-picker/type.d.ts +114 -0
  164. package/esnext/date-picker/type.js +1 -0
  165. package/esnext/dialog/index.d.ts +213 -0
  166. package/esnext/dialog/index.js +87 -0
  167. package/esnext/dialog/methods.d.ts +20 -0
  168. package/esnext/dialog/methods.js +42 -0
  169. package/esnext/dialog/style/css/index.css +1111 -0
  170. package/esnext/dialog/style/css/index.d.ts +3 -0
  171. package/esnext/dialog/style/css/index.js +3 -0
  172. package/esnext/dialog/style/index.d.ts +3 -0
  173. package/esnext/dialog/style/index.js +3 -0
  174. package/esnext/dialog/style/index.less +376 -0
  175. package/esnext/divider/index.d.ts +49 -0
  176. package/esnext/divider/index.js +32 -0
  177. package/esnext/divider/style/css/index.css +609 -0
  178. package/esnext/divider/style/css/index.d.ts +2 -0
  179. package/esnext/divider/style/css/index.js +2 -0
  180. package/esnext/divider/style/index.d.ts +2 -0
  181. package/esnext/divider/style/index.js +2 -0
  182. package/esnext/divider/style/index.less +101 -0
  183. package/esnext/dropdown/dropdown.d.ts +3 -0
  184. package/esnext/dropdown/dropdown.js +196 -0
  185. package/esnext/dropdown/index.d.ts +14 -0
  186. package/esnext/dropdown/index.js +16 -0
  187. package/esnext/dropdown/options.d.ts +4 -0
  188. package/esnext/dropdown/options.js +61 -0
  189. package/esnext/dropdown/style/css/index.css +653 -0
  190. package/esnext/dropdown/style/css/index.d.ts +2 -0
  191. package/esnext/dropdown/style/css/index.js +2 -0
  192. package/esnext/dropdown/style/index.d.ts +2 -0
  193. package/esnext/dropdown/style/index.js +2 -0
  194. package/esnext/dropdown/style/index.less +177 -0
  195. package/esnext/dropdown/type.d.ts +269 -0
  196. package/esnext/dropdown/type.js +1 -0
  197. package/esnext/dropdown-menu/dropdown-menu.d.ts +4 -0
  198. package/esnext/dropdown-menu/dropdown-menu.js +161 -0
  199. package/esnext/dropdown-menu/helper.d.ts +34 -0
  200. package/esnext/dropdown-menu/helper.js +88 -0
  201. package/esnext/dropdown-menu/index.d.ts +12 -0
  202. package/esnext/dropdown-menu/index.js +13 -0
  203. package/esnext/dropdown-menu/style/css/index.css +705 -0
  204. package/esnext/dropdown-menu/style/css/index.d.ts +3 -0
  205. package/esnext/dropdown-menu/style/css/index.js +3 -0
  206. package/esnext/dropdown-menu/style/index.d.ts +3 -0
  207. package/esnext/dropdown-menu/style/index.js +3 -0
  208. package/esnext/dropdown-menu/style/index.less +122 -0
  209. package/esnext/dropdown-menu/type.d.ts +168 -0
  210. package/esnext/dropdown-menu/type.js +1 -0
  211. package/esnext/ellipsis/components/js-ellipsis.d.ts +6 -0
  212. package/esnext/ellipsis/components/js-ellipsis.js +178 -0
  213. package/esnext/ellipsis/components/native-ellipsis.d.ts +5 -0
  214. package/esnext/ellipsis/components/native-ellipsis.js +15 -0
  215. package/esnext/ellipsis/index.d.ts +13 -0
  216. package/esnext/ellipsis/index.js +31 -0
  217. package/esnext/ellipsis/style/css/index.css +556 -0
  218. package/esnext/ellipsis/style/css/index.d.ts +2 -0
  219. package/esnext/ellipsis/style/css/index.js +2 -0
  220. package/esnext/ellipsis/style/index.d.ts +2 -0
  221. package/esnext/ellipsis/style/index.js +2 -0
  222. package/esnext/ellipsis/style/index.less +63 -0
  223. package/esnext/ellipsis/type.d.ts +107 -0
  224. package/esnext/ellipsis/type.js +1 -0
  225. package/esnext/ellipsis/utils/dom.d.ts +2 -0
  226. package/esnext/ellipsis/utils/dom.js +35 -0
  227. package/esnext/ellipsis/utils/is.d.ts +3 -0
  228. package/esnext/ellipsis/utils/is.js +3 -0
  229. package/esnext/form/form-item-context.d.ts +3 -0
  230. package/esnext/form/form-item-context.js +6 -0
  231. package/esnext/form/form-item.d.ts +4 -0
  232. package/esnext/form/form-item.js +218 -0
  233. package/esnext/form/index.d.ts +16 -0
  234. package/esnext/form/index.js +50 -0
  235. package/esnext/form/linked-container.d.ts +8 -0
  236. package/esnext/form/linked-container.js +29 -0
  237. package/esnext/form/style/css/index.css +670 -0
  238. package/esnext/form/style/css/index.d.ts +2 -0
  239. package/esnext/form/style/css/index.js +2 -0
  240. package/esnext/form/style/index.d.ts +2 -0
  241. package/esnext/form/style/index.js +2 -0
  242. package/esnext/form/style/index.less +172 -0
  243. package/esnext/form/type.d.ts +373 -0
  244. package/esnext/form/type.js +26 -0
  245. package/esnext/form/useForm.d.ts +18 -0
  246. package/esnext/form/useForm.js +203 -0
  247. package/esnext/form/utils.d.ts +7 -0
  248. package/esnext/form/utils.js +21 -0
  249. package/esnext/grid/index.d.ts +112 -0
  250. package/esnext/grid/index.js +79 -0
  251. package/esnext/grid/style/css/index.css +661 -0
  252. package/esnext/grid/style/css/index.d.ts +2 -0
  253. package/esnext/grid/style/css/index.js +2 -0
  254. package/esnext/grid/style/index.d.ts +2 -0
  255. package/esnext/grid/style/index.js +2 -0
  256. package/esnext/grid/style/index.less +157 -0
  257. package/esnext/icon/IconAdd/index.d.ts +7 -0
  258. package/esnext/icon/IconAdd/index.js +7 -0
  259. package/esnext/icon/IconArrowBack/index.d.ts +7 -0
  260. package/esnext/icon/IconArrowBack/index.js +7 -0
  261. package/esnext/icon/IconArrowDown/index.d.ts +7 -0
  262. package/esnext/icon/IconArrowDown/index.js +7 -0
  263. package/esnext/icon/IconArrowIn/index.d.ts +7 -0
  264. package/esnext/icon/IconArrowIn/index.js +7 -0
  265. package/esnext/icon/IconArrowUp/index.d.ts +7 -0
  266. package/esnext/icon/IconArrowUp/index.js +7 -0
  267. package/esnext/icon/IconCheck/index.d.ts +7 -0
  268. package/esnext/icon/IconCheck/index.js +7 -0
  269. package/esnext/icon/IconCheckBold/index.d.ts +7 -0
  270. package/esnext/icon/IconCheckBold/index.js +8 -0
  271. package/esnext/icon/IconCircleChecked/index.d.ts +7 -0
  272. package/esnext/icon/IconCircleChecked/index.js +7 -0
  273. package/esnext/icon/IconCircleDisabled/index.d.ts +7 -0
  274. package/esnext/icon/IconCircleDisabled/index.js +7 -0
  275. package/esnext/icon/IconCircleUnchecked/index.d.ts +7 -0
  276. package/esnext/icon/IconCircleUnchecked/index.js +7 -0
  277. package/esnext/icon/IconClear/index.d.ts +7 -0
  278. package/esnext/icon/IconClear/index.js +7 -0
  279. package/esnext/icon/IconClose/index.d.ts +7 -0
  280. package/esnext/icon/IconClose/index.js +7 -0
  281. package/esnext/icon/IconCloseBold/index.d.ts +7 -0
  282. package/esnext/icon/IconCloseBold/index.js +8 -0
  283. package/esnext/icon/IconDelete/index.d.ts +7 -0
  284. package/esnext/icon/IconDelete/index.js +7 -0
  285. package/esnext/icon/IconDownload/index.d.ts +7 -0
  286. package/esnext/icon/IconDownload/index.js +7 -0
  287. package/esnext/icon/IconEdit/index.d.ts +7 -0
  288. package/esnext/icon/IconEdit/index.js +7 -0
  289. package/esnext/icon/IconErrorCircle/index.d.ts +7 -0
  290. package/esnext/icon/IconErrorCircle/index.js +8 -0
  291. package/esnext/icon/IconEyeInvisible/index.d.ts +7 -0
  292. package/esnext/icon/IconEyeInvisible/index.js +7 -0
  293. package/esnext/icon/IconEyeVisible/index.d.ts +7 -0
  294. package/esnext/icon/IconEyeVisible/index.js +7 -0
  295. package/esnext/icon/IconEyelashInvisible/index.d.ts +7 -0
  296. package/esnext/icon/IconEyelashInvisible/index.js +7 -0
  297. package/esnext/icon/IconFile/index.d.ts +7 -0
  298. package/esnext/icon/IconFile/index.js +7 -0
  299. package/esnext/icon/IconGift/index.d.ts +7 -0
  300. package/esnext/icon/IconGift/index.js +8 -0
  301. package/esnext/icon/IconHeart/index.d.ts +7 -0
  302. package/esnext/icon/IconHeart/index.js +8 -0
  303. package/esnext/icon/IconHome/index.d.ts +7 -0
  304. package/esnext/icon/IconHome/index.js +7 -0
  305. package/esnext/icon/IconKeyboard/index.d.ts +7 -0
  306. package/esnext/icon/IconKeyboard/index.js +8 -0
  307. package/esnext/icon/IconKeyboardDelete/index.d.ts +7 -0
  308. package/esnext/icon/IconKeyboardDelete/index.js +8 -0
  309. package/esnext/icon/IconLikeCircle/index.d.ts +7 -0
  310. package/esnext/icon/IconLikeCircle/index.js +7 -0
  311. package/esnext/icon/IconMinus/index.d.ts +7 -0
  312. package/esnext/icon/IconMinus/index.js +8 -0
  313. package/esnext/icon/IconMore/index.d.ts +7 -0
  314. package/esnext/icon/IconMore/index.js +7 -0
  315. package/esnext/icon/IconNotice/index.d.ts +7 -0
  316. package/esnext/icon/IconNotice/index.js +8 -0
  317. package/esnext/icon/IconNoticeOff/index.d.ts +7 -0
  318. package/esnext/icon/IconNoticeOff/index.js +8 -0
  319. package/esnext/icon/IconPicture/index.d.ts +7 -0
  320. package/esnext/icon/IconPicture/index.js +7 -0
  321. package/esnext/icon/IconPlay/index.d.ts +7 -0
  322. package/esnext/icon/IconPlay/index.js +8 -0
  323. package/esnext/icon/IconQuestionCircle/index.d.ts +7 -0
  324. package/esnext/icon/IconQuestionCircle/index.js +7 -0
  325. package/esnext/icon/IconRefresh/index.d.ts +7 -0
  326. package/esnext/icon/IconRefresh/index.js +7 -0
  327. package/esnext/icon/IconSad/index.d.ts +7 -0
  328. package/esnext/icon/IconSad/index.js +7 -0
  329. package/esnext/icon/IconScan/index.d.ts +7 -0
  330. package/esnext/icon/IconScan/index.js +7 -0
  331. package/esnext/icon/IconSearch/index.d.ts +7 -0
  332. package/esnext/icon/IconSearch/index.js +7 -0
  333. package/esnext/icon/IconSetting/index.d.ts +7 -0
  334. package/esnext/icon/IconSetting/index.js +8 -0
  335. package/esnext/icon/IconShop/index.d.ts +7 -0
  336. package/esnext/icon/IconShop/index.js +8 -0
  337. package/esnext/icon/IconShopping/index.d.ts +7 -0
  338. package/esnext/icon/IconShopping/index.js +8 -0
  339. package/esnext/icon/IconSmileFill/index.d.ts +7 -0
  340. package/esnext/icon/IconSmileFill/index.js +7 -0
  341. package/esnext/icon/IconSound/index.d.ts +7 -0
  342. package/esnext/icon/IconSound/index.js +8 -0
  343. package/esnext/icon/IconSquareChecked/index.d.ts +7 -0
  344. package/esnext/icon/IconSquareChecked/index.js +7 -0
  345. package/esnext/icon/IconSquareDisabled/index.d.ts +7 -0
  346. package/esnext/icon/IconSquareDisabled/index.js +7 -0
  347. package/esnext/icon/IconSquareUnchecked/index.d.ts +7 -0
  348. package/esnext/icon/IconSquareUnchecked/index.js +7 -0
  349. package/esnext/icon/IconStar/index.d.ts +7 -0
  350. package/esnext/icon/IconStar/index.js +7 -0
  351. package/esnext/icon/IconStarFill/index.d.ts +7 -0
  352. package/esnext/icon/IconStarFill/index.js +8 -0
  353. package/esnext/icon/IconStarHalf/index.d.ts +7 -0
  354. package/esnext/icon/IconStarHalf/index.js +7 -0
  355. package/esnext/icon/IconSubway/index.d.ts +7 -0
  356. package/esnext/icon/IconSubway/index.js +8 -0
  357. package/esnext/icon/IconSuccessCircle/index.d.ts +7 -0
  358. package/esnext/icon/IconSuccessCircle/index.js +8 -0
  359. package/esnext/icon/IconTriDown/index.d.ts +7 -0
  360. package/esnext/icon/IconTriDown/index.js +8 -0
  361. package/esnext/icon/IconTriUp/index.d.ts +7 -0
  362. package/esnext/icon/IconTriUp/index.js +8 -0
  363. package/esnext/icon/IconUpload/index.d.ts +7 -0
  364. package/esnext/icon/IconUpload/index.js +7 -0
  365. package/esnext/icon/IconUser/index.d.ts +7 -0
  366. package/esnext/icon/IconUser/index.js +7 -0
  367. package/esnext/icon/IconUserFill/index.d.ts +7 -0
  368. package/esnext/icon/IconUserFill/index.js +7 -0
  369. package/esnext/icon/IconWarnCircle/index.d.ts +7 -0
  370. package/esnext/icon/IconWarnCircle/index.js +8 -0
  371. package/esnext/icon/IconWarnCircleFill/index.d.ts +7 -0
  372. package/esnext/icon/IconWarnCircleFill/index.js +8 -0
  373. package/esnext/icon/index.d.ts +59 -0
  374. package/esnext/icon/index.js +59 -0
  375. package/esnext/icon/type.d.ts +10 -0
  376. package/esnext/icon/type.js +1 -0
  377. package/esnext/image/index.d.ts +186 -0
  378. package/esnext/image/index.js +223 -0
  379. package/esnext/image/style/css/index.css +734 -0
  380. package/esnext/image/style/css/index.d.ts +3 -0
  381. package/esnext/image/style/css/index.js +3 -0
  382. package/esnext/image/style/index.d.ts +3 -0
  383. package/esnext/image/style/index.js +3 -0
  384. package/esnext/image/style/index.less +198 -0
  385. package/esnext/image-picker/add-icon.d.ts +2 -0
  386. package/esnext/image-picker/add-icon.js +5 -0
  387. package/esnext/image-picker/index.d.ts +16 -0
  388. package/esnext/image-picker/index.js +77 -0
  389. package/esnext/image-picker/style/css/index.css +688 -0
  390. package/esnext/image-picker/style/css/index.d.ts +4 -0
  391. package/esnext/image-picker/style/css/index.js +4 -0
  392. package/esnext/image-picker/style/index.d.ts +4 -0
  393. package/esnext/image-picker/style/index.js +4 -0
  394. package/esnext/image-picker/style/index.less +170 -0
  395. package/esnext/image-picker/type.d.ts +115 -0
  396. package/esnext/image-picker/type.js +1 -0
  397. package/esnext/image-preview/index.d.ts +296 -0
  398. package/esnext/image-preview/index.js +794 -0
  399. package/esnext/image-preview/methods.d.ts +13 -0
  400. package/esnext/image-preview/methods.js +46 -0
  401. package/esnext/image-preview/style/css/index.css +664 -0
  402. package/esnext/image-preview/style/css/index.d.ts +5 -0
  403. package/esnext/image-preview/style/css/index.js +5 -0
  404. package/esnext/image-preview/style/index.d.ts +5 -0
  405. package/esnext/image-preview/style/index.js +5 -0
  406. package/esnext/image-preview/style/index.less +140 -0
  407. package/esnext/index-bar/context.d.ts +3 -0
  408. package/esnext/index-bar/context.js +6 -0
  409. package/esnext/index-bar/group.d.ts +3 -0
  410. package/esnext/index-bar/group.js +33 -0
  411. package/esnext/index-bar/index.d.ts +15 -0
  412. package/esnext/index-bar/index.js +151 -0
  413. package/esnext/index-bar/side-bar.d.ts +3 -0
  414. package/esnext/index-bar/side-bar.js +44 -0
  415. package/esnext/index-bar/style/css/index.css +767 -0
  416. package/esnext/index-bar/style/css/index.d.ts +3 -0
  417. package/esnext/index-bar/style/css/index.js +3 -0
  418. package/esnext/index-bar/style/index.d.ts +3 -0
  419. package/esnext/index-bar/style/index.js +3 -0
  420. package/esnext/index-bar/style/index.less +189 -0
  421. package/esnext/index-bar/type.d.ts +195 -0
  422. package/esnext/index-bar/type.js +1 -0
  423. package/esnext/index-bar/utils.d.ts +6 -0
  424. package/esnext/index-bar/utils.js +44 -0
  425. package/esnext/index.d.ts +59 -0
  426. package/esnext/index.js +59 -0
  427. package/esnext/input/hooks.d.ts +14 -0
  428. package/esnext/input/hooks.js +174 -0
  429. package/esnext/input/index.d.ts +60 -0
  430. package/esnext/input/index.js +28 -0
  431. package/esnext/input/props.d.ts +182 -0
  432. package/esnext/input/props.js +1 -0
  433. package/esnext/input/style/css/index.css +759 -0
  434. package/esnext/input/style/css/index.d.ts +2 -0
  435. package/esnext/input/style/css/index.js +2 -0
  436. package/esnext/input/style/index.d.ts +2 -0
  437. package/esnext/input/style/index.js +2 -0
  438. package/esnext/input/style/index.less +195 -0
  439. package/esnext/keyboard/index.d.ts +13 -0
  440. package/esnext/keyboard/index.js +159 -0
  441. package/esnext/keyboard/style/css/index.css +633 -0
  442. package/esnext/keyboard/style/css/index.d.ts +3 -0
  443. package/esnext/keyboard/style/css/index.js +3 -0
  444. package/esnext/keyboard/style/index.d.ts +3 -0
  445. package/esnext/keyboard/style/index.js +3 -0
  446. package/esnext/keyboard/style/index.less +131 -0
  447. package/esnext/keyboard/type.d.ts +102 -0
  448. package/esnext/keyboard/type.js +1 -0
  449. package/esnext/load-more/index.d.ts +158 -0
  450. package/esnext/load-more/index.js +150 -0
  451. package/esnext/load-more/style/css/index.css +534 -0
  452. package/esnext/load-more/style/css/index.d.ts +2 -0
  453. package/esnext/load-more/style/css/index.js +2 -0
  454. package/esnext/load-more/style/index.d.ts +2 -0
  455. package/esnext/load-more/style/index.js +2 -0
  456. package/esnext/load-more/style/index.less +37 -0
  457. package/esnext/loading/index.d.ts +76 -0
  458. package/esnext/loading/index.js +123 -0
  459. package/esnext/loading/style/css/index.css +648 -0
  460. package/esnext/loading/style/css/index.d.ts +2 -0
  461. package/esnext/loading/style/css/index.js +2 -0
  462. package/esnext/loading/style/index.d.ts +2 -0
  463. package/esnext/loading/style/index.js +2 -0
  464. package/esnext/loading/style/index.less +147 -0
  465. package/esnext/masking/index.d.ts +225 -0
  466. package/esnext/masking/index.js +114 -0
  467. package/esnext/masking/methods.d.ts +23 -0
  468. package/esnext/masking/methods.js +56 -0
  469. package/esnext/masking/style/css/index.css +552 -0
  470. package/esnext/masking/style/css/index.d.ts +3 -0
  471. package/esnext/masking/style/css/index.js +3 -0
  472. package/esnext/masking/style/index.d.ts +3 -0
  473. package/esnext/masking/style/index.js +3 -0
  474. package/esnext/masking/style/index.less +55 -0
  475. package/esnext/nav-bar/back-icon.d.ts +5 -0
  476. package/esnext/nav-bar/back-icon.js +9 -0
  477. package/esnext/nav-bar/index.d.ts +135 -0
  478. package/esnext/nav-bar/index.js +96 -0
  479. package/esnext/nav-bar/style/css/index.css +706 -0
  480. package/esnext/nav-bar/style/css/index.d.ts +2 -0
  481. package/esnext/nav-bar/style/css/index.js +2 -0
  482. package/esnext/nav-bar/style/index.d.ts +2 -0
  483. package/esnext/nav-bar/style/index.js +2 -0
  484. package/esnext/nav-bar/style/index.less +150 -0
  485. package/esnext/notice-bar/index.d.ts +107 -0
  486. package/esnext/notice-bar/index.js +126 -0
  487. package/esnext/notice-bar/style/css/index.css +685 -0
  488. package/esnext/notice-bar/style/css/index.d.ts +2 -0
  489. package/esnext/notice-bar/style/css/index.js +2 -0
  490. package/esnext/notice-bar/style/index.d.ts +2 -0
  491. package/esnext/notice-bar/style/index.js +2 -0
  492. package/esnext/notice-bar/style/index.less +160 -0
  493. package/esnext/notify/index.d.ts +97 -0
  494. package/esnext/notify/index.js +123 -0
  495. package/esnext/notify/methods.d.ts +14 -0
  496. package/esnext/notify/methods.js +63 -0
  497. package/esnext/notify/style/css/index.css +591 -0
  498. package/esnext/notify/style/css/index.d.ts +2 -0
  499. package/esnext/notify/style/css/index.js +2 -0
  500. package/esnext/notify/style/index.d.ts +2 -0
  501. package/esnext/notify/style/index.js +2 -0
  502. package/esnext/notify/style/index.less +90 -0
  503. package/esnext/notify/type.d.ts +70 -0
  504. package/esnext/notify/type.js +1 -0
  505. package/esnext/pagination/arrow.d.ts +2 -0
  506. package/esnext/pagination/arrow.js +5 -0
  507. package/esnext/pagination/index.d.ts +124 -0
  508. package/esnext/pagination/index.js +104 -0
  509. package/esnext/pagination/style/css/index.css +708 -0
  510. package/esnext/pagination/style/css/index.d.ts +2 -0
  511. package/esnext/pagination/style/css/index.js +2 -0
  512. package/esnext/pagination/style/index.d.ts +2 -0
  513. package/esnext/pagination/style/index.js +2 -0
  514. package/esnext/pagination/style/index.less +176 -0
  515. package/esnext/picker/index.d.ts +50 -0
  516. package/esnext/picker/index.js +93 -0
  517. package/esnext/picker/style/css/index.css +592 -0
  518. package/esnext/picker/style/css/index.d.ts +4 -0
  519. package/esnext/picker/style/css/index.js +4 -0
  520. package/esnext/picker/style/index.d.ts +4 -0
  521. package/esnext/picker/style/index.js +4 -0
  522. package/esnext/picker/style/index.less +95 -0
  523. package/esnext/picker/type.d.ts +131 -0
  524. package/esnext/picker/type.js +1 -0
  525. package/esnext/picker-view/components/cascader.d.ts +25 -0
  526. package/esnext/picker-view/components/cascader.js +54 -0
  527. package/esnext/picker-view/components/multi-picker.d.ts +11 -0
  528. package/esnext/picker-view/components/multi-picker.js +32 -0
  529. package/esnext/picker-view/components/picker-cell.d.ts +28 -0
  530. package/esnext/picker-view/components/picker-cell.js +284 -0
  531. package/esnext/picker-view/index.d.ts +62 -0
  532. package/esnext/picker-view/index.js +135 -0
  533. package/esnext/picker-view/style/css/index.css +750 -0
  534. package/esnext/picker-view/style/css/index.d.ts +2 -0
  535. package/esnext/picker-view/style/css/index.js +2 -0
  536. package/esnext/picker-view/style/index.d.ts +2 -0
  537. package/esnext/picker-view/style/index.js +2 -0
  538. package/esnext/picker-view/style/index.less +125 -0
  539. package/esnext/picker-view/type.d.ts +89 -0
  540. package/esnext/picker-view/type.js +1 -0
  541. package/esnext/popover/hooks/index.d.ts +2 -0
  542. package/esnext/popover/hooks/index.js +2 -0
  543. package/esnext/popover/hooks/useEvent.d.ts +8 -0
  544. package/esnext/popover/hooks/useEvent.js +148 -0
  545. package/esnext/popover/hooks/usePosition.d.ts +18 -0
  546. package/esnext/popover/hooks/usePosition.js +419 -0
  547. package/esnext/popover/index.d.ts +14 -0
  548. package/esnext/popover/index.js +20 -0
  549. package/esnext/popover/menu.d.ts +3 -0
  550. package/esnext/popover/menu.js +80 -0
  551. package/esnext/popover/popover-inner.d.ts +3 -0
  552. package/esnext/popover/popover-inner.js +79 -0
  553. package/esnext/popover/popover.d.ts +3 -0
  554. package/esnext/popover/popover.js +132 -0
  555. package/esnext/popover/style/css/index.css +993 -0
  556. package/esnext/popover/style/css/index.d.ts +3 -0
  557. package/esnext/popover/style/css/index.js +3 -0
  558. package/esnext/popover/style/css/menu.css +673 -0
  559. package/esnext/popover/style/index.d.ts +3 -0
  560. package/esnext/popover/style/index.js +3 -0
  561. package/esnext/popover/style/index.less +353 -0
  562. package/esnext/popover/style/menu.less +163 -0
  563. package/esnext/popover/type.d.ts +447 -0
  564. package/esnext/popover/type.js +1 -0
  565. package/esnext/popup/index.d.ts +86 -0
  566. package/esnext/popup/index.js +39 -0
  567. package/esnext/popup/methods.d.ts +10 -0
  568. package/esnext/popup/methods.js +4 -0
  569. package/esnext/popup/style/css/index.css +638 -0
  570. package/esnext/popup/style/css/index.d.ts +3 -0
  571. package/esnext/popup/style/css/index.js +3 -0
  572. package/esnext/popup/style/index.d.ts +3 -0
  573. package/esnext/popup/style/index.js +3 -0
  574. package/esnext/popup/style/index.less +114 -0
  575. package/esnext/popup-swiper/index.d.ts +93 -0
  576. package/esnext/popup-swiper/index.js +192 -0
  577. package/esnext/popup-swiper/methods.d.ts +10 -0
  578. package/esnext/popup-swiper/methods.js +4 -0
  579. package/esnext/popup-swiper/style/css/index.css +531 -0
  580. package/esnext/popup-swiper/style/css/index.d.ts +3 -0
  581. package/esnext/popup-swiper/style/css/index.js +3 -0
  582. package/esnext/popup-swiper/style/index.d.ts +3 -0
  583. package/esnext/popup-swiper/style/index.js +3 -0
  584. package/esnext/popup-swiper/style/index.less +35 -0
  585. package/esnext/portal/index.d.ts +23 -0
  586. package/esnext/portal/index.js +18 -0
  587. package/esnext/portal/style/css/index.css +0 -0
  588. package/esnext/portal/style/css/index.d.ts +2 -0
  589. package/esnext/portal/style/css/index.js +2 -0
  590. package/esnext/portal/style/index.d.ts +2 -0
  591. package/esnext/portal/style/index.js +2 -0
  592. package/esnext/portal/style/index.less +1 -0
  593. package/esnext/progress/index.d.ts +126 -0
  594. package/esnext/progress/index.js +66 -0
  595. package/esnext/progress/style/css/index.css +692 -0
  596. package/esnext/progress/style/css/index.d.ts +2 -0
  597. package/esnext/progress/style/css/index.js +2 -0
  598. package/esnext/progress/style/index.d.ts +2 -0
  599. package/esnext/progress/style/index.js +2 -0
  600. package/esnext/progress/style/index.less +205 -0
  601. package/esnext/pull-refresh/android-pull-refresh.d.ts +3 -0
  602. package/esnext/pull-refresh/android-pull-refresh.js +168 -0
  603. package/esnext/pull-refresh/hooks.d.ts +30 -0
  604. package/esnext/pull-refresh/hooks.js +73 -0
  605. package/esnext/pull-refresh/index.d.ts +28 -0
  606. package/esnext/pull-refresh/index.js +21 -0
  607. package/esnext/pull-refresh/ios-pull-refresh.d.ts +3 -0
  608. package/esnext/pull-refresh/ios-pull-refresh.js +137 -0
  609. package/esnext/pull-refresh/model.d.ts +111 -0
  610. package/esnext/pull-refresh/model.js +8 -0
  611. package/esnext/pull-refresh/style/css/index.css +650 -0
  612. package/esnext/pull-refresh/style/css/index.d.ts +3 -0
  613. package/esnext/pull-refresh/style/css/index.js +3 -0
  614. package/esnext/pull-refresh/style/index.d.ts +3 -0
  615. package/esnext/pull-refresh/style/index.js +3 -0
  616. package/esnext/pull-refresh/style/index.less +131 -0
  617. package/esnext/radio/group.d.ts +5 -0
  618. package/esnext/radio/group.js +50 -0
  619. package/esnext/radio/index.d.ts +19 -0
  620. package/esnext/radio/index.js +22 -0
  621. package/esnext/radio/radio.d.ts +5 -0
  622. package/esnext/radio/radio.js +13 -0
  623. package/esnext/radio/style/css/index.css +604 -0
  624. package/esnext/radio/style/css/index.d.ts +2 -0
  625. package/esnext/radio/style/css/index.js +2 -0
  626. package/esnext/radio/style/index.d.ts +2 -0
  627. package/esnext/radio/style/index.js +2 -0
  628. package/esnext/radio/style/index.less +114 -0
  629. package/esnext/radio/type.d.ts +31 -0
  630. package/esnext/radio/type.js +1 -0
  631. package/esnext/rate/index.d.ts +109 -0
  632. package/esnext/rate/index.js +87 -0
  633. package/esnext/rate/style/css/index.css +595 -0
  634. package/esnext/rate/style/css/index.d.ts +2 -0
  635. package/esnext/rate/style/css/index.js +2 -0
  636. package/esnext/rate/style/index.d.ts +2 -0
  637. package/esnext/rate/style/index.js +2 -0
  638. package/esnext/rate/style/index.less +106 -0
  639. package/esnext/search-bar/association.d.ts +3 -0
  640. package/esnext/search-bar/association.js +51 -0
  641. package/esnext/search-bar/cancel-button.d.ts +10 -0
  642. package/esnext/search-bar/cancel-button.js +18 -0
  643. package/esnext/search-bar/highlight.d.ts +12 -0
  644. package/esnext/search-bar/highlight.js +46 -0
  645. package/esnext/search-bar/index.d.ts +13 -0
  646. package/esnext/search-bar/index.js +109 -0
  647. package/esnext/search-bar/style/css/index.css +765 -0
  648. package/esnext/search-bar/style/css/index.d.ts +2 -0
  649. package/esnext/search-bar/style/css/index.js +2 -0
  650. package/esnext/search-bar/style/index.d.ts +2 -0
  651. package/esnext/search-bar/style/index.js +2 -0
  652. package/esnext/search-bar/style/index.less +198 -0
  653. package/esnext/search-bar/type.d.ts +163 -0
  654. package/esnext/search-bar/type.js +1 -0
  655. package/esnext/show-monitor/index.d.ts +115 -0
  656. package/esnext/show-monitor/index.js +416 -0
  657. package/esnext/show-monitor/style/css/index.css +0 -0
  658. package/esnext/show-monitor/style/css/index.d.ts +2 -0
  659. package/esnext/show-monitor/style/css/index.js +2 -0
  660. package/esnext/show-monitor/style/index.d.ts +2 -0
  661. package/esnext/show-monitor/style/index.js +2 -0
  662. package/esnext/show-monitor/style/index.less +1 -0
  663. package/esnext/skeleton/elements.d.ts +7 -0
  664. package/esnext/skeleton/elements.js +117 -0
  665. package/esnext/skeleton/index.d.ts +19 -0
  666. package/esnext/skeleton/index.js +50 -0
  667. package/esnext/skeleton/skeleton-context.d.ts +3 -0
  668. package/esnext/skeleton/skeleton-context.js +5 -0
  669. package/esnext/skeleton/style/css/index.css +712 -0
  670. package/esnext/skeleton/style/css/index.d.ts +3 -0
  671. package/esnext/skeleton/style/css/index.js +3 -0
  672. package/esnext/skeleton/style/index.d.ts +3 -0
  673. package/esnext/skeleton/style/index.js +3 -0
  674. package/esnext/skeleton/style/index.less +182 -0
  675. package/esnext/skeleton/type.d.ts +105 -0
  676. package/esnext/skeleton/type.js +1 -0
  677. package/esnext/slider/hooks/index.d.ts +12 -0
  678. package/esnext/slider/hooks/index.js +33 -0
  679. package/esnext/slider/hooks/useSliderEvents.d.ts +17 -0
  680. package/esnext/slider/hooks/useSliderEvents.js +128 -0
  681. package/esnext/slider/hooks/useSliderIcon.d.ts +7 -0
  682. package/esnext/slider/hooks/useSliderIcon.js +41 -0
  683. package/esnext/slider/hooks/useSliderInit.d.ts +14 -0
  684. package/esnext/slider/hooks/useSliderInit.js +146 -0
  685. package/esnext/slider/hooks/useSliderStyle.d.ts +13 -0
  686. package/esnext/slider/hooks/useSliderStyle.js +39 -0
  687. package/esnext/slider/index.d.ts +163 -0
  688. package/esnext/slider/index.js +120 -0
  689. package/esnext/slider/marks.d.ts +11 -0
  690. package/esnext/slider/marks.js +17 -0
  691. package/esnext/slider/popover.d.ts +6 -0
  692. package/esnext/slider/popover.js +13 -0
  693. package/esnext/slider/style/css/index.css +863 -0
  694. package/esnext/slider/style/css/index.d.ts +3 -0
  695. package/esnext/slider/style/css/index.js +3 -0
  696. package/esnext/slider/style/index.d.ts +3 -0
  697. package/esnext/slider/style/index.js +3 -0
  698. package/esnext/slider/style/index.less +366 -0
  699. package/esnext/slider/thumb.d.ts +9 -0
  700. package/esnext/slider/thumb.js +21 -0
  701. package/esnext/stepper/hooks/useButtonClick.d.ts +11 -0
  702. package/esnext/stepper/hooks/useButtonClick.js +46 -0
  703. package/esnext/stepper/hooks/useInputEvent.d.ts +10 -0
  704. package/esnext/stepper/hooks/useInputEvent.js +41 -0
  705. package/esnext/stepper/hooks/useValue.d.ts +7 -0
  706. package/esnext/stepper/hooks/useValue.js +33 -0
  707. package/esnext/stepper/index.d.ts +16 -0
  708. package/esnext/stepper/index.js +81 -0
  709. package/esnext/stepper/style/css/index.css +636 -0
  710. package/esnext/stepper/style/css/index.d.ts +2 -0
  711. package/esnext/stepper/style/css/index.js +2 -0
  712. package/esnext/stepper/style/index.d.ts +2 -0
  713. package/esnext/stepper/style/index.js +2 -0
  714. package/esnext/stepper/style/index.less +161 -0
  715. package/esnext/stepper/type.d.ts +159 -0
  716. package/esnext/stepper/type.js +1 -0
  717. package/esnext/steps/index.d.ts +19 -0
  718. package/esnext/steps/index.js +50 -0
  719. package/esnext/steps/step.d.ts +4 -0
  720. package/esnext/steps/step.js +43 -0
  721. package/esnext/steps/style/css/index.css +877 -0
  722. package/esnext/steps/style/css/index.d.ts +2 -0
  723. package/esnext/steps/style/css/index.js +2 -0
  724. package/esnext/steps/style/index.d.ts +2 -0
  725. package/esnext/steps/style/index.js +2 -0
  726. package/esnext/steps/style/index.less +407 -0
  727. package/esnext/steps/type.d.ts +110 -0
  728. package/esnext/steps/type.js +1 -0
  729. package/esnext/sticky/index.d.ts +141 -0
  730. package/esnext/sticky/index.js +165 -0
  731. package/esnext/sticky/style/css/index.css +526 -0
  732. package/esnext/sticky/style/css/index.d.ts +2 -0
  733. package/esnext/sticky/style/css/index.js +2 -0
  734. package/esnext/sticky/style/index.d.ts +2 -0
  735. package/esnext/sticky/style/index.js +2 -0
  736. package/esnext/sticky/style/index.less +30 -0
  737. package/esnext/style.d.ts +60 -0
  738. package/esnext/style.js +60 -0
  739. package/esnext/swipe-action/index.d.ts +13 -0
  740. package/esnext/swipe-action/index.js +220 -0
  741. package/esnext/swipe-action/item.d.ts +11 -0
  742. package/esnext/swipe-action/item.js +20 -0
  743. package/esnext/swipe-action/style/css/index.css +620 -0
  744. package/esnext/swipe-action/style/css/index.d.ts +2 -0
  745. package/esnext/swipe-action/style/css/index.js +2 -0
  746. package/esnext/swipe-action/style/index.d.ts +2 -0
  747. package/esnext/swipe-action/style/index.js +2 -0
  748. package/esnext/swipe-action/style/index.less +132 -0
  749. package/esnext/swipe-action/type.d.ts +123 -0
  750. package/esnext/swipe-action/type.js +1 -0
  751. package/esnext/swipe-load/index.d.ts +13 -0
  752. package/esnext/swipe-load/index.js +255 -0
  753. package/esnext/swipe-load/style/css/index.css +561 -0
  754. package/esnext/swipe-load/style/css/index.d.ts +2 -0
  755. package/esnext/swipe-load/style/css/index.js +2 -0
  756. package/esnext/swipe-load/style/index.d.ts +2 -0
  757. package/esnext/swipe-load/style/index.js +2 -0
  758. package/esnext/swipe-load/style/index.less +66 -0
  759. package/esnext/swipe-load/type.d.ts +152 -0
  760. package/esnext/swipe-load/type.js +1 -0
  761. package/esnext/switch/index.d.ts +105 -0
  762. package/esnext/switch/index.js +83 -0
  763. package/esnext/switch/style/css/index.css +765 -0
  764. package/esnext/switch/style/css/index.d.ts +2 -0
  765. package/esnext/switch/style/css/index.js +2 -0
  766. package/esnext/switch/style/index.d.ts +2 -0
  767. package/esnext/switch/style/index.js +2 -0
  768. package/esnext/switch/style/index.less +217 -0
  769. package/esnext/tab-bar/index.d.ts +14 -0
  770. package/esnext/tab-bar/index.js +16 -0
  771. package/esnext/tab-bar/item.d.ts +3 -0
  772. package/esnext/tab-bar/item.js +31 -0
  773. package/esnext/tab-bar/style/css/index.css +617 -0
  774. package/esnext/tab-bar/style/css/index.d.ts +2 -0
  775. package/esnext/tab-bar/style/css/index.js +2 -0
  776. package/esnext/tab-bar/style/index.d.ts +2 -0
  777. package/esnext/tab-bar/style/index.js +2 -0
  778. package/esnext/tab-bar/style/index.less +96 -0
  779. package/esnext/tab-bar/tab-bar.d.ts +11 -0
  780. package/esnext/tab-bar/tab-bar.js +40 -0
  781. package/esnext/tab-bar/type.d.ts +95 -0
  782. package/esnext/tab-bar/type.js +1 -0
  783. package/esnext/tabs/index.d.ts +13 -0
  784. package/esnext/tabs/index.js +340 -0
  785. package/esnext/tabs/style/css/index.css +1162 -0
  786. package/esnext/tabs/style/css/index.d.ts +2 -0
  787. package/esnext/tabs/style/css/index.js +2 -0
  788. package/esnext/tabs/style/index.d.ts +2 -0
  789. package/esnext/tabs/style/index.js +2 -0
  790. package/esnext/tabs/style/index.less +559 -0
  791. package/esnext/tabs/tab-cell-underline.d.ts +4 -0
  792. package/esnext/tabs/tab-cell-underline.js +237 -0
  793. package/esnext/tabs/tab-cell.d.ts +4 -0
  794. package/esnext/tabs/tab-cell.js +258 -0
  795. package/esnext/tabs/tab-pane.d.ts +4 -0
  796. package/esnext/tabs/tab-pane.js +241 -0
  797. package/esnext/tabs/type.d.ts +629 -0
  798. package/esnext/tabs/type.js +1 -0
  799. package/esnext/tag/index.d.ts +14 -0
  800. package/esnext/tag/index.js +20 -0
  801. package/esnext/tag/list.d.ts +3 -0
  802. package/esnext/tag/list.js +47 -0
  803. package/esnext/tag/style/css/index.css +738 -0
  804. package/esnext/tag/style/css/index.d.ts +2 -0
  805. package/esnext/tag/style/css/index.js +2 -0
  806. package/esnext/tag/style/index.d.ts +2 -0
  807. package/esnext/tag/style/index.js +2 -0
  808. package/esnext/tag/style/index.less +188 -0
  809. package/esnext/tag/tag.d.ts +3 -0
  810. package/esnext/tag/tag.js +32 -0
  811. package/esnext/tag/type.d.ts +159 -0
  812. package/esnext/tag/type.js +1 -0
  813. package/esnext/textarea/index.d.ts +96 -0
  814. package/esnext/textarea/index.js +88 -0
  815. package/esnext/textarea/style/css/index.css +572 -0
  816. package/esnext/textarea/style/css/index.d.ts +3 -0
  817. package/esnext/textarea/style/css/index.js +3 -0
  818. package/esnext/textarea/style/index.d.ts +3 -0
  819. package/esnext/textarea/style/index.js +3 -0
  820. package/esnext/textarea/style/index.less +84 -0
  821. package/esnext/toast/index.d.ts +257 -0
  822. package/esnext/toast/index.js +142 -0
  823. package/esnext/toast/methods.d.ts +16 -0
  824. package/esnext/toast/methods.js +61 -0
  825. package/esnext/toast/style/css/index.css +658 -0
  826. package/esnext/toast/style/css/index.d.ts +4 -0
  827. package/esnext/toast/style/css/index.js +4 -0
  828. package/esnext/toast/style/index.d.ts +4 -0
  829. package/esnext/toast/style/index.js +4 -0
  830. package/esnext/toast/style/index.less +130 -0
  831. package/esnext/transition/index.d.ts +49 -0
  832. package/esnext/transition/index.js +15 -0
  833. package/esnext/transition/style/css/index.css +549 -0
  834. package/esnext/transition/style/css/index.d.ts +2 -0
  835. package/esnext/transition/style/css/index.js +2 -0
  836. package/esnext/transition/style/index.d.ts +2 -0
  837. package/esnext/transition/style/index.js +2 -0
  838. package/esnext/transition/style/index.less +53 -0
  839. package/esnext/uploader/index.d.ts +16 -0
  840. package/esnext/uploader/index.js +75 -0
  841. package/esnext/uploader/style/css/index.css +666 -0
  842. package/esnext/uploader/style/css/index.d.ts +4 -0
  843. package/esnext/uploader/style/css/index.js +4 -0
  844. package/esnext/uploader/style/index.d.ts +4 -0
  845. package/esnext/uploader/style/index.js +4 -0
  846. package/esnext/uploader/style/index.less +161 -0
  847. package/esnext/uploader/type.d.ts +108 -0
  848. package/esnext/uploader/type.js +1 -0
  849. package/esnext/uploader/upload/index.d.ts +2 -0
  850. package/esnext/uploader/upload/index.js +2 -0
  851. package/esnext/uploader/upload/type.d.ts +107 -0
  852. package/esnext/uploader/upload/type.js +1 -0
  853. package/esnext/uploader/upload/upload.d.ts +20 -0
  854. package/esnext/uploader/upload/upload.js +123 -0
  855. package/esnext-tsconfig.json +23 -0
  856. package/package.json +3 -3
  857. package/umd/_helpers/index.d.ts +1 -0
  858. package/umd/_helpers/index.js +10 -4
  859. package/umd/_helpers/react-dom.js +21 -14
@@ -0,0 +1,96 @@
1
+ @import '../../../style/mixin.less';
2
+
3
+ .@{prefix}-tab-bar {
4
+ display: flex;
5
+ width: 100%;
6
+ justify-content: flex-start;
7
+ align-items: stretch;
8
+ overflow: hidden;
9
+ .use-var(font-size, tab-bar-font-size);
10
+ .use-var(min-height, tab-bar-height);
11
+ &-fixed{
12
+ position: fixed;
13
+ bottom: 0;
14
+ }
15
+
16
+ &-item{
17
+ display: flex;
18
+ flex: 1 1;
19
+ justify-content: center;
20
+ align-items: center;
21
+ flex-direction: column;
22
+ .use-var(color,tab-bar-color);
23
+ &-title{
24
+ color: inherit;
25
+ .use-var(line-height, tab-bar-title-line-height);
26
+ .use-var(font-size,tab-bar-font-size);
27
+ .use-var(margin,tab-bar-title-margin);
28
+ }
29
+ &-children{
30
+ display: flex;
31
+ justify-content: center;
32
+ align-items: center;
33
+ }
34
+ &-only-title{
35
+ .use-var(line-height, tab-bar-only-title-line-height);
36
+ .use-var(font-size, tab-bar-only-title-font-size);
37
+ margin: 0;
38
+ }
39
+ &-active{
40
+ .use-var(color, tab-bar-active-color);
41
+ }
42
+ .@{prefix}-extra-wrap{
43
+ position: relative;
44
+ display: flex;
45
+ justify-content: center;
46
+ align-items: center;
47
+ .use-var(font-size, tab-bar-icon-size);
48
+ color: inherit;
49
+ }
50
+ .@{prefix}-tab-bar-item-icon{
51
+ display: flex;
52
+ .use-var(font-size, tab-bar-icon-size);
53
+ color: inherit;
54
+ .use-var(margin, tab-bar-item-icon-margin);
55
+ }
56
+ }
57
+ }
58
+
59
+
60
+
61
+ /***************************************************
62
+ * *
63
+ * Arco Theme Style *
64
+ * *
65
+ ***************************************************/
66
+ & when (@use-dark-mode = 1) {
67
+
68
+ .process-bg-color-with-config,
69
+ .process-custom-icon-bg-color-with-config {
70
+ @{arco-dark-mode-selector} & {
71
+ .use-var(color, dark-steps-process-with-config-item-icon-color);
72
+ .use-var(color, dark-steps-process-with-config-item-icon-color);
73
+ }
74
+ }
75
+ .wait-custom-icon-bg-color-with-config {
76
+ @{arco-dark-mode-selector} & {
77
+ .use-var(background, dark-steps-wait-icon-num-background);
78
+ .use-var(color, dark-sub-info-font-color);
79
+ .use-var(background, dark-steps-wait-icon-num-background);
80
+ .use-var(color, dark-sub-info-font-color);
81
+ }
82
+ }
83
+ .@{prefix}-tab-bar {
84
+ &-item {
85
+ @{arco-dark-mode-selector} & {
86
+ .use-var(color, dark-tab-bar-color);
87
+ }
88
+ &-active {
89
+ @{arco-dark-mode-selector} & {
90
+ .use-var(color, dark-tab-bar-active-color);
91
+ }
92
+ }
93
+ }
94
+ }
95
+ }
96
+ /********************* End *************************/
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { TabBarItemProps, TabBarItemRef, TabBarRef, TabBarProps } from './type';
3
+ export declare const TabBarContext: React.Context<TabBarContextParams>;
4
+ interface TabBarContextParams {
5
+ changeIndex: (index: number) => void;
6
+ active: boolean;
7
+ index: number;
8
+ activeCustomStyle?: React.CSSProperties;
9
+ }
10
+ export declare function componentGenerator<P extends TabBarItemProps = TabBarItemProps, R extends TabBarItemRef = TabBarItemRef>(Comp: React.ForwardRefExoticComponent<P & React.RefAttributes<R>>): React.ForwardRefExoticComponent<TabBarProps<P> & React.RefAttributes<TabBarRef>>;
11
+ export {};
@@ -0,0 +1,40 @@
1
+ import React, { Children, createContext, forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useState, } from 'react';
2
+ import { cls } from '@arco-design/mobile-utils';
3
+ import { ContextLayout } from '../context-provider';
4
+ import { useRefState } from '../_helpers';
5
+ export const TabBarContext = createContext({
6
+ changeIndex: () => { },
7
+ active: false,
8
+ index: 0,
9
+ activeCustomStyle: {},
10
+ });
11
+ export function componentGenerator(Comp) {
12
+ return forwardRef((props, ref) => {
13
+ const { defaultActiveIndex = 0, activeIndex: activeIndexProps, className, fixed = true, style, dataSource, children, onChange, activeCustomStyle, } = props;
14
+ const [innerIndex, setInnerIndex] = useState(defaultActiveIndex);
15
+ const [activeIndex, activeRefIndex, setActiveIndex] = useRefState(activeIndexProps === void 0 ? innerIndex : activeIndexProps);
16
+ useEffect(() => {
17
+ setActiveIndex(activeIndexProps === void 0 ? innerIndex : activeIndexProps);
18
+ }, [activeIndexProps, innerIndex]);
19
+ const domRef = useRef(null);
20
+ useImperativeHandle(ref, () => ({
21
+ dom: domRef.current,
22
+ changeIndex,
23
+ }));
24
+ const renderItem = useCallback((child, index) => (React.createElement(TabBarContext.Provider, { value: {
25
+ active: index === activeIndex,
26
+ changeIndex,
27
+ index,
28
+ activeCustomStyle,
29
+ }, key: index }, child)), [activeIndex]);
30
+ function changeIndex(index) {
31
+ setInnerIndex(index);
32
+ index !== activeRefIndex.current && onChange?.(index);
33
+ }
34
+ return (React.createElement(ContextLayout, null, ({ prefixCls }) => (React.createElement("div", { className: cls(`${prefixCls}-tab-bar`, className, {
35
+ [`${prefixCls}-tab-bar-fixed`]: fixed,
36
+ }), style: style, ref: domRef }, dataSource
37
+ ? dataSource.map((data, index) => renderItem(React.createElement(Comp, Object.assign({ key: index }, data)), index))
38
+ : Children.toArray(children).map((child, index) => renderItem(child, index))))));
39
+ });
40
+ }
@@ -0,0 +1,95 @@
1
+ import React, { ReactNode } from 'react';
2
+ import { SimpleBaseProps } from '../_helpers';
3
+ export interface TabBarProps<T extends TabBarItemProps = TabBarItemProps> {
4
+ /**
5
+ * 自定义类名
6
+ * @en Custom classname
7
+ * @default ""
8
+ */
9
+ className?: string;
10
+ /**
11
+ * 自定义样式
12
+ * @en Custom style
13
+ * @default {}
14
+ */
15
+ style?: React.CSSProperties;
16
+ /**
17
+ * 内部标签内容
18
+ * @en Inner Content
19
+ * @default null
20
+ */
21
+ children?: React.ReactNode;
22
+ /**
23
+ * 选中标签的索引值
24
+ * @en The index value of the selected label
25
+ */
26
+ activeIndex?: number;
27
+ /**
28
+ * 默认选中的索引值
29
+ * @en The index value of the default selected label
30
+ * @default 0
31
+ */
32
+ defaultActiveIndex?: number;
33
+ /**
34
+ * 切换标签时的回调函数
35
+ * @en Callback when switching tabs
36
+ */
37
+ onChange?: (index: number) => void;
38
+ /**
39
+ * 数据源,传了 dataSource 则 TabBar.TabBarItem 失效
40
+ * @en Data source, if it is passed, TabBar.TabBarItem will be invalid
41
+ */
42
+ dataSource?: T[];
43
+ /**
44
+ * 当前选中标签的样式
45
+ * @en The style of the currently selected label
46
+ */
47
+ activeCustomStyle?: React.CSSProperties;
48
+ /**
49
+ * 是否固定在底部
50
+ * @en Whether it is fixed at the bottom
51
+ * @default true
52
+ */
53
+ fixed?: boolean;
54
+ }
55
+ export interface TabBarItemProps extends SimpleBaseProps {
56
+ /**
57
+ * 标题
58
+ * @en Title
59
+ */
60
+ title?: ReactNode | ((active: boolean) => ReactNode);
61
+ /**
62
+ * 附加元素 (如徽标)
63
+ * @en Additional elements (such as badge)
64
+ */
65
+ extra?: ReactNode | ((active: boolean) => ReactNode);
66
+ /**
67
+ * 图标
68
+ * @en Icon
69
+ */
70
+ icon?: ReactNode | ((active: boolean) => ReactNode);
71
+ /**
72
+ * 自定义内容
73
+ * @en Custom content
74
+ */
75
+ child?: ReactNode | ((active: boolean) => ReactNode);
76
+ /**
77
+ * 点击事件
78
+ * @en Click event
79
+ */
80
+ onClick?: (e: React.MouseEvent) => void;
81
+ }
82
+ export interface TabBarRef {
83
+ /**
84
+ * 最外层元素 DOM
85
+ * @en The outermost element DOM
86
+ */
87
+ dom: HTMLDivElement | null;
88
+ }
89
+ export interface TabBarItemRef {
90
+ /**
91
+ * 最外层元素 DOM
92
+ * @en The outermost element DOM
93
+ */
94
+ dom: HTMLDivElement | null;
95
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { TabsProps, TabsRef } from './type';
3
+ export * from './type';
4
+ /**
5
+ * 用于让用户在不同的视图中进行切换。为优化移动端渲染性能,如有替换DOM、发请求更新数据等操作,请在`onAfterChange`而非`onChange`回调中进行。
6
+ * @en Used to let the user switch between different views. In order to optimize the rendering performance of the mobile terminal, if you need to replace the DOM, send a request to update data, etc., please do it in the `onAfterChange` instead of the `onChange` callback.
7
+ * @type 导航
8
+ * @type_en Navigation
9
+ * @name 选项卡
10
+ * @name_en Tabs
11
+ */
12
+ declare const Tabs: React.ForwardRefExoticComponent<TabsProps & React.RefAttributes<TabsRef>>;
13
+ export default Tabs;
@@ -0,0 +1,340 @@
1
+ import React, { useRef, forwardRef, useImperativeHandle, useState, useEffect, useCallback, useContext, } from 'react';
2
+ import { cls, nextTick, getOffset } from '@arco-design/mobile-utils';
3
+ import { ContextLayout, GlobalContext } from '../context-provider';
4
+ import TabCell from './tab-cell';
5
+ import TabPane from './tab-pane';
6
+ import { useRefState, useListenResize, useUpdateEffect, useSwiperInnerScroll, useSystem, } from '../_helpers';
7
+ export * from './type';
8
+ /**
9
+ * 用于让用户在不同的视图中进行切换。为优化移动端渲染性能,如有替换DOM、发请求更新数据等操作,请在`onAfterChange`而非`onChange`回调中进行。
10
+ * @en Used to let the user switch between different views. In order to optimize the rendering performance of the mobile terminal, if you need to replace the DOM, send a request to update data, etc., please do it in the `onAfterChange` instead of the `onChange` callback.
11
+ * @type 导航
12
+ * @type_en Navigation
13
+ * @name 选项卡
14
+ * @name_en Tabs
15
+ */
16
+ const Tabs = forwardRef((props, ref) => {
17
+ const { className, style, tabs = [], tabBarPosition = 'top', activeTab, defaultActiveTab = 0, children, onChange, onAfterChange, onTabClick, onTabBarOverflowChange, onTouchStart, onTouchMove, onTouchEnd, onTabBarScroll, onDistanceChange, onScroll, type = 'line', swipeable = true, disabled, tabBarArrange = 'center', tabBarScroll = true, tabBarFixed, tabBarExtra, tabBarScrollBezier, tabBarScrollDuration, tabBarScrollChance = 'jump', tabBarHasDivider, tabBarResetWhenScroll = 'touchmove', stopPropagation = true, getInnerScrollContainer, mode = 'swipe', getScrollContainer, scrollThrottle = 300, scrollOffset = 0, scrollWhenMounted, goLastWhenScrollBottom = true, scrollVertical = true, renderUnderline, renderTabBar, renderTabBarItem, renderTabBarInner, duration = 240, transitionDuration = 300, useCaterpillar = false, distanceToChangeTab = 10, percentToChangeTab = 0.3, speedToChangeTab = 200, disableClickTransition = true, lazyloadCount, hideContentStyle = null, renderHideContent, hideTabBarBeforeMounted, overflowThreshold = 5, tabBarGutter, tabBarPadding, underlineSize, underlineThick, underlineInnerStyle, caterpillarMaxScale, caterpillarProperty = 'scale', showUnderline = true, underlineAdaptive = false, stopTouchThreshold = 0, touchSideDisableThreshold = 0, onTouchStopped, tabBarStyle, tabPaneStyle, tabBarClass, tabPaneClass, tabPaneExtra, translateZ = true, fullScreen, autoHeight, tabBarStopPropagation = true, swipeEnergySaving = false, } = props;
18
+ const { useRtl } = useContext(GlobalContext);
19
+ const domRef = useRef(null);
20
+ const cellRef = useRef(null);
21
+ const paneRef = useRef(null);
22
+ const [innerIndex, setInnerIndex] = useState(defaultActiveTab);
23
+ const [jumpingDis, setJumpingDis] = useState(0);
24
+ const [wrapWidth, setWrapWidth] = useState(0);
25
+ const [wrapHeight, setWrapHeight] = useState(0);
26
+ const [cellTrans, setCellTrans] = useState(false);
27
+ const [paneTrans, setPaneTrans] = useState(false);
28
+ const [activeIndex, activeIndexRef, setActiveIndex] = useRefState(activeTab === void 0 ? innerIndex : activeTab);
29
+ const [distance, distanceRef, setDistance] = useRefState(0);
30
+ const posAdjustingRef = useRef(false);
31
+ const touchStartedRef = useRef(false);
32
+ const touchStartXRef = useRef(0);
33
+ const touchStartYRef = useRef(0);
34
+ const touchStartTimeRef = useRef(0);
35
+ const touchMovedRef = useRef(false);
36
+ const scrollingRef = useRef(null);
37
+ const touchStoppedRef = useRef(false);
38
+ const changeFromRef = useRef('');
39
+ const touchMoveBarScrollRef = useRef(false);
40
+ const system = useSystem();
41
+ const allPanes = getAllPanes();
42
+ const tabDirection = ['top', 'bottom'].indexOf(tabBarPosition) !== -1 ? 'vertical' : 'horizontal';
43
+ const canSwipe = mode === 'swipe' &&
44
+ !disabled &&
45
+ swipeable &&
46
+ tabDirection === 'vertical' &&
47
+ tabs.length > 1;
48
+ const horizontalUseRtl = tabDirection === 'vertical' && useRtl;
49
+ const rtlRatio = horizontalUseRtl ? -1 : 1;
50
+ useImperativeHandle(ref, () => ({
51
+ dom: domRef.current,
52
+ bar: cellRef.current,
53
+ pane: paneRef.current,
54
+ barOverflow: cellRef.current ? cellRef.current.hasOverflow : false,
55
+ updateLayout,
56
+ changeIndex: (newIndex, rightNow) => changeIndex(newIndex, 'manual', rightNow),
57
+ scrollToIndex: paneRef.current ? paneRef.current.scrollToIndex : () => { },
58
+ }));
59
+ useListenResize(updateLayout);
60
+ useSwiperInnerScroll(getInnerScrollContainer);
61
+ useEffect(() => {
62
+ if (distanceToChangeTab > 0 && distanceToChangeTab < 1) {
63
+ console.warn(`[Tabs Props Warning] The value of the prop \`distanceToChangeTab\` is too small(${distanceToChangeTab}). Do you meant to use the prop \`percentToChangeTab\`?`);
64
+ }
65
+ }, [distanceToChangeTab]);
66
+ useEffect(() => {
67
+ updateLayout();
68
+ if (mode === 'scroll') {
69
+ // 判断初始是否滚动时,如果指定了scrollWhenMounted则看它的值,否则看是否默认选中第一个
70
+ // @en When judging whether to scroll initially, if scrollWhenMounted is specified, see its value, otherwise, see if the first one is selected by default
71
+ const needScroll = scrollWhenMounted === void 0 ? activeIndex !== 0 : scrollWhenMounted;
72
+ if (needScroll) {
73
+ paneRef.current?.scrollToIndex(activeIndex, true);
74
+ }
75
+ }
76
+ }, []);
77
+ useEffect(() => {
78
+ paneRef.current && paneRef.current.setCurrentHeight();
79
+ }, [children, activeIndex, autoHeight]);
80
+ useEffect(() => {
81
+ // 受控时用受控值,否则用内部值
82
+ // @en When controlled, use the controlled value, otherwise use the internal value
83
+ setActiveIndex(activeTab === void 0 ? innerIndex : activeTab);
84
+ }, [activeTab, innerIndex]);
85
+ useUpdateEffect(() => {
86
+ // 利用受控手动更改index时,给cell line加上动画
87
+ // @en Animate the cell line when changeing the index
88
+ setCellTrans(true);
89
+ if (!changeFromRef.current) {
90
+ changeFromRef.current = 'manual';
91
+ }
92
+ }, [activeTab]);
93
+ useUpdateEffect(() => {
94
+ onDistanceChange && onDistanceChange(distance, wrapWidth, activeIndex);
95
+ }, [distance, wrapWidth, activeIndex]);
96
+ useUpdateEffect(() => {
97
+ if (changeFromRef.current !== 'scroll' && mode === 'scroll') {
98
+ paneRef.current?.scrollToIndex(activeIndex);
99
+ }
100
+ if (changeFromRef.current === 'click' && useCaterpillar) {
101
+ cellRef.current?.setCaterpillarAnimate();
102
+ }
103
+ const changeFrom = changeFromRef.current;
104
+ changeFromRef.current = '';
105
+ nextTick(() => {
106
+ setTimeout(() => {
107
+ onAfterChange && onAfterChange(tabs[activeIndex], activeIndex, changeFrom);
108
+ }, paneRef.current ? paneRef.current.getTransition() : 0);
109
+ });
110
+ }, [activeIndex]);
111
+ const handlePaneTouchStart = useCallback((e) => {
112
+ if (onTouchStart && onTouchStart(e, activeIndexRef.current)) {
113
+ return;
114
+ }
115
+ if (posAdjustingRef.current) {
116
+ return;
117
+ }
118
+ touchStartedRef.current = true;
119
+ touchMovedRef.current = false;
120
+ setCellTrans(false);
121
+ setPaneTrans(false);
122
+ const evt = e.touches[0];
123
+ touchStartXRef.current = evt.clientX || 0;
124
+ touchStartYRef.current = evt.clientY || 0;
125
+ scrollingRef.current = null;
126
+ posAdjustingRef.current = false;
127
+ touchStartTimeRef.current = new Date().getTime();
128
+ touchStoppedRef.current = false;
129
+ }, [onTouchStart]);
130
+ const handlePaneTouchMove = useCallback((e) => {
131
+ if (onTouchMove && onTouchMove(e, activeIndexRef.current)) {
132
+ return;
133
+ }
134
+ // 从屏幕边缘开始滑动时,屏蔽tabs滑动事件
135
+ if (touchStartXRef.current < touchSideDisableThreshold) {
136
+ return;
137
+ }
138
+ stopPropagation && e.stopPropagation();
139
+ if (!touchStartedRef.current || posAdjustingRef.current) {
140
+ e.cancelable && e.preventDefault();
141
+ return;
142
+ }
143
+ touchMovedRef.current = true;
144
+ const evt = e.changedTouches[0];
145
+ const touchMoveX = evt.clientX || 0;
146
+ const touchMoveY = evt.clientY || 0;
147
+ // bugfix: 兼容safari在右滑返回上一页时clientX为负值的情况,安卓有折叠屏,触点会有超出屏幕(clientX < 0)的情况,因此这里限定ios系统
148
+ // @en bugfix: bugfix: Compatible with the case in safari where clientX is negative when swiping right back to the previous page
149
+ const posDisX = system === 'ios' && touchMoveX < 0 ? 0 : touchMoveX - touchStartXRef.current;
150
+ const posDisY = touchMoveY - touchStartYRef.current;
151
+ const absDisX = Math.abs(posDisX);
152
+ const absDisY = Math.abs(posDisY);
153
+ const comparedDis = posDisX * rtlRatio;
154
+ if (scrollingRef.current === null) {
155
+ scrollingRef.current = absDisX < absDisY;
156
+ }
157
+ // 如果是在上下滚动页面则禁用滑动手势
158
+ // @en Disable swipe gestures if scrolling up and down
159
+ if (scrollingRef.current) {
160
+ if (tabBarResetWhenScroll === 'touchmove' && !touchMoveBarScrollRef.current) {
161
+ cellRef.current && cellRef.current.scrollToCenter();
162
+ touchMoveBarScrollRef.current = true;
163
+ }
164
+ setDistance(0);
165
+ return;
166
+ }
167
+ if ((activeIndexRef.current === 0 && comparedDis > 0) ||
168
+ (activeIndexRef.current === tabs.length - 1 && comparedDis < 0)) {
169
+ if (!touchStoppedRef.current && absDisX > stopTouchThreshold) {
170
+ touchStoppedRef.current = true;
171
+ onTouchStopped && onTouchStopped(comparedDis >= 0 ? -1 : 1);
172
+ }
173
+ setDistance(0);
174
+ return;
175
+ }
176
+ e.cancelable && e.preventDefault();
177
+ setDistance(posDisX);
178
+ }, [
179
+ onTouchMove,
180
+ onTouchStopped,
181
+ stopTouchThreshold,
182
+ tabs.length,
183
+ touchSideDisableThreshold,
184
+ tabBarResetWhenScroll,
185
+ stopPropagation,
186
+ ]);
187
+ useEffect(() => {
188
+ if (paneRef.current && paneRef.current.dom && canSwipe) {
189
+ paneRef.current.dom.addEventListener('touchstart', handlePaneTouchStart);
190
+ paneRef.current.dom.addEventListener('touchmove', handlePaneTouchMove);
191
+ }
192
+ return () => {
193
+ if (paneRef.current && paneRef.current.dom && canSwipe) {
194
+ paneRef.current.dom.removeEventListener('touchstart', handlePaneTouchStart);
195
+ paneRef.current.dom.removeEventListener('touchmove', handlePaneTouchMove);
196
+ }
197
+ };
198
+ }, [handlePaneTouchStart, handlePaneTouchMove, canSwipe]);
199
+ function handlePaneTouchEnd(e) {
200
+ if (onTouchEnd && onTouchEnd(e.nativeEvent, activeIndexRef.current)) {
201
+ return;
202
+ }
203
+ stopPropagation && e.stopPropagation();
204
+ touchMoveBarScrollRef.current = false;
205
+ if (scrollingRef.current && tabBarResetWhenScroll === 'touchend') {
206
+ cellRef.current && cellRef.current.scrollToCenter();
207
+ }
208
+ if (!touchStartedRef.current ||
209
+ posAdjustingRef.current ||
210
+ scrollingRef.current ||
211
+ !touchMovedRef.current) {
212
+ return;
213
+ }
214
+ touchStartedRef.current = false;
215
+ setCellTrans(true);
216
+ setPaneTrans(true);
217
+ const touchEndTime = new Date().getTime();
218
+ const dis = distanceRef.current;
219
+ const speed = (dis / (touchEndTime - touchStartTimeRef.current)) * 1000;
220
+ const maxSlice = wrapWidth * percentToChangeTab;
221
+ const index = activeIndexRef.current;
222
+ const needJump = (Math.abs(dis) > maxSlice && Math.abs(dis) > distanceToChangeTab) ||
223
+ Math.abs(speed) > speedToChangeTab;
224
+ let newIndex = index;
225
+ const comparedDis = dis * rtlRatio;
226
+ if (comparedDis > 0 && needJump) {
227
+ newIndex = index - 1;
228
+ }
229
+ else if (comparedDis < 0 && needJump) {
230
+ newIndex = index + 1;
231
+ }
232
+ nextTick(() => {
233
+ jumpTo(newIndex);
234
+ });
235
+ }
236
+ function jumpTo(newIndex) {
237
+ posAdjustingRef.current = true;
238
+ if (newIndex !== activeIndexRef.current) {
239
+ setJumpingDis(distanceRef.current);
240
+ }
241
+ changeIndex(newIndex, 'swipe');
242
+ touchStartTimeRef.current = 0;
243
+ setTimeout(() => {
244
+ posAdjustingRef.current = false;
245
+ setJumpingDis(0);
246
+ }, transitionDuration);
247
+ }
248
+ function updateLayout() {
249
+ const { width, height } = getOffset(domRef.current);
250
+ cellRef.current && cellRef.current.resetUnderlineStyle();
251
+ setWrapWidth(width || domRef.current?.offsetWidth || 0);
252
+ setWrapHeight(height || domRef.current?.offsetHeight || 0);
253
+ paneRef.current && paneRef.current.setCurrentHeight();
254
+ }
255
+ function getAllPanes() {
256
+ let panes = children ? [children] : [];
257
+ if (children && Object.prototype.toString.call(children) === '[object Array]') {
258
+ panes = children;
259
+ }
260
+ // panes不可超过tabs.length
261
+ return panes.slice(0, tabs.length);
262
+ }
263
+ function changeIndex(newIndex, changeFrom, rightNow) {
264
+ if (rightNow || (changeFrom === 'click' && disableClickTransition)) {
265
+ setPaneTrans(false);
266
+ }
267
+ else {
268
+ setPaneTrans(true);
269
+ }
270
+ changeFromRef.current = changeFrom || '';
271
+ setCellTrans(true);
272
+ setInnerIndex(newIndex);
273
+ if (newIndex !== activeIndexRef.current) {
274
+ onChange && onChange(tabs[newIndex], newIndex, changeFrom);
275
+ }
276
+ setDistance(0);
277
+ }
278
+ return (React.createElement(ContextLayout, null, ({ prefixCls }) => {
279
+ const prefix = `${prefixCls}-tabs`;
280
+ const commonProps = {
281
+ prefixCls,
282
+ activeIndex,
283
+ activeIndexRef,
284
+ tabDirection: tabDirection,
285
+ changeIndex,
286
+ duration,
287
+ transitionDuration,
288
+ wrapWidth,
289
+ wrapHeight,
290
+ distance,
291
+ mode,
292
+ translateZ,
293
+ fullScreen,
294
+ };
295
+ const cellProps = {
296
+ ref: cellRef,
297
+ tabs,
298
+ onTabClick,
299
+ type,
300
+ tabBarPosition,
301
+ tabBarArrange,
302
+ tabBarScroll,
303
+ renderUnderline,
304
+ useCaterpillar,
305
+ cellTrans,
306
+ jumpingDis,
307
+ tabBarExtra,
308
+ onTabBarOverflowChange,
309
+ tabBarGutter,
310
+ tabBarPadding,
311
+ tabBarFixed,
312
+ tabBarScrollBezier,
313
+ tabBarScrollDuration,
314
+ tabBarScrollChance,
315
+ tabBarHasDivider,
316
+ underlineSize,
317
+ underlineThick,
318
+ underlineInnerStyle,
319
+ caterpillarMaxScale,
320
+ caterpillarProperty,
321
+ onTabBarScroll,
322
+ hideTabBarBeforeMounted,
323
+ overflowThreshold,
324
+ showUnderline,
325
+ underlineAdaptive,
326
+ disabled,
327
+ renderTabBarItem,
328
+ renderTabBarInner,
329
+ tabBarStyle,
330
+ tabBarClass,
331
+ tabBarStopPropagation,
332
+ ...commonProps,
333
+ };
334
+ const CellComp = React.createElement(TabCell, Object.assign({}, cellProps));
335
+ return (React.createElement("div", { className: cls(`${prefix} ${prefix}-${tabBarPosition} ${prefix}-${tabDirection} all-border-box`, { 'full-screen': fullScreen }, className || ''), style: style, ref: domRef },
336
+ renderTabBar ? renderTabBar(CellComp, cellProps) : CellComp,
337
+ React.createElement(TabPane, Object.assign({ ref: paneRef, panes: allPanes, handlePaneTouchEnd: handlePaneTouchEnd, paneTrans: paneTrans, swipeable: canSwipe, lazyloadCount: lazyloadCount, hideContentStyle: hideContentStyle, renderHideContent: renderHideContent, tabPaneStyle: tabPaneStyle, getScrollContainer: getScrollContainer, scrollThrottle: scrollThrottle, scrollOffset: scrollOffset, goLastWhenScrollBottom: goLastWhenScrollBottom, scrollVertical: scrollVertical, tabPaneClass: tabPaneClass, tabPaneExtra: tabPaneExtra, autoHeight: autoHeight, onScroll: onScroll, swipeEnergySaving: swipeEnergySaving, rtlRatio: rtlRatio }, commonProps))));
338
+ }));
339
+ });
340
+ export default Tabs;