@arco-design/mobile-react 2.31.6 → 2.33.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 (885) hide show
  1. package/CHANGELOG.md +29 -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/cjs/avatar/index.js +3 -1
  9. package/cjs/avatar/type.d.ts +6 -0
  10. package/cjs/carousel/index.js +18 -1
  11. package/cjs/steps/index.d.ts +1 -1
  12. package/cjs/steps/index.js +6 -1
  13. package/cjs/steps/style/css/index.css +42 -4
  14. package/cjs/steps/style/index.less +58 -6
  15. package/cjs/steps/type.d.ts +5 -0
  16. package/dist/index.js +146 -97
  17. package/dist/index.min.js +4 -4
  18. package/dist/style.css +27 -4
  19. package/dist/style.min.css +1 -1
  20. package/esm/_helpers/index.d.ts +1 -0
  21. package/esm/_helpers/index.js +1 -0
  22. package/esm/_helpers/react-dom.js +15 -11
  23. package/esm/avatar/index.js +3 -1
  24. package/esm/avatar/type.d.ts +6 -0
  25. package/esm/carousel/index.js +18 -1
  26. package/esm/steps/index.d.ts +1 -1
  27. package/esm/steps/index.js +7 -2
  28. package/esm/steps/style/css/index.css +42 -4
  29. package/esm/steps/style/index.less +58 -6
  30. package/esm/steps/type.d.ts +5 -0
  31. package/esnext/_helpers/hooks.d.ts +290 -0
  32. package/esnext/_helpers/hooks.js +660 -0
  33. package/esnext/_helpers/index.d.ts +93 -0
  34. package/esnext/_helpers/index.js +110 -0
  35. package/esnext/_helpers/react-dom.d.ts +13 -0
  36. package/esnext/_helpers/react-dom.js +51 -0
  37. package/esnext/_helpers/render.d.ts +17 -0
  38. package/esnext/_helpers/render.js +38 -0
  39. package/esnext/_helpers/type.d.ts +30 -0
  40. package/esnext/_helpers/type.js +1 -0
  41. package/esnext/action-sheet/index.d.ts +106 -0
  42. package/esnext/action-sheet/index.js +53 -0
  43. package/esnext/action-sheet/methods.d.ts +10 -0
  44. package/esnext/action-sheet/methods.js +4 -0
  45. package/esnext/action-sheet/style/css/index.css +741 -0
  46. package/esnext/action-sheet/style/css/index.d.ts +3 -0
  47. package/esnext/action-sheet/style/css/index.js +3 -0
  48. package/esnext/action-sheet/style/index.d.ts +3 -0
  49. package/esnext/action-sheet/style/index.js +3 -0
  50. package/esnext/action-sheet/style/index.less +119 -0
  51. package/esnext/avatar/group.d.ts +9 -0
  52. package/esnext/avatar/group.js +35 -0
  53. package/esnext/avatar/index.d.ts +17 -0
  54. package/esnext/avatar/index.js +87 -0
  55. package/esnext/avatar/style/css/index.css +792 -0
  56. package/esnext/avatar/style/css/index.d.ts +3 -0
  57. package/esnext/avatar/style/css/index.js +3 -0
  58. package/esnext/avatar/style/index.d.ts +3 -0
  59. package/esnext/avatar/style/index.js +3 -0
  60. package/esnext/avatar/style/index.less +201 -0
  61. package/esnext/avatar/type.d.ts +132 -0
  62. package/esnext/avatar/type.js +1 -0
  63. package/esnext/badge/index.d.ts +80 -0
  64. package/esnext/badge/index.js +29 -0
  65. package/esnext/badge/style/css/index.css +640 -0
  66. package/esnext/badge/style/css/index.d.ts +2 -0
  67. package/esnext/badge/style/css/index.js +2 -0
  68. package/esnext/badge/style/index.d.ts +2 -0
  69. package/esnext/badge/style/index.js +2 -0
  70. package/esnext/badge/style/index.less +109 -0
  71. package/esnext/button/hooks.d.ts +8 -0
  72. package/esnext/button/hooks.js +45 -0
  73. package/esnext/button/index.d.ts +141 -0
  74. package/esnext/button/index.js +61 -0
  75. package/esnext/button/style/css/index.css +816 -0
  76. package/esnext/button/style/css/index.d.ts +3 -0
  77. package/esnext/button/style/css/index.js +3 -0
  78. package/esnext/button/style/index.d.ts +3 -0
  79. package/esnext/button/style/index.js +3 -0
  80. package/esnext/button/style/index.less +242 -0
  81. package/esnext/carousel/index.d.ts +383 -0
  82. package/esnext/carousel/index.js +849 -0
  83. package/esnext/carousel/style/css/index.css +748 -0
  84. package/esnext/carousel/style/css/index.d.ts +2 -0
  85. package/esnext/carousel/style/css/index.js +2 -0
  86. package/esnext/carousel/style/index.d.ts +2 -0
  87. package/esnext/carousel/style/index.js +2 -0
  88. package/esnext/carousel/style/index.less +263 -0
  89. package/esnext/cell/arrow.d.ts +2 -0
  90. package/esnext/cell/arrow.js +5 -0
  91. package/esnext/cell/cell.d.ts +3 -0
  92. package/esnext/cell/cell.js +24 -0
  93. package/esnext/cell/group.d.ts +7 -0
  94. package/esnext/cell/group.js +26 -0
  95. package/esnext/cell/index.d.ts +14 -0
  96. package/esnext/cell/index.js +16 -0
  97. package/esnext/cell/style/css/index.css +1008 -0
  98. package/esnext/cell/style/css/index.d.ts +2 -0
  99. package/esnext/cell/style/css/index.js +2 -0
  100. package/esnext/cell/style/index.d.ts +2 -0
  101. package/esnext/cell/style/index.js +2 -0
  102. package/esnext/cell/style/index.less +214 -0
  103. package/esnext/cell/type.d.ts +125 -0
  104. package/esnext/cell/type.js +1 -0
  105. package/esnext/checkbox/checkbox.d.ts +3 -0
  106. package/esnext/checkbox/checkbox.js +106 -0
  107. package/esnext/checkbox/group.d.ts +4 -0
  108. package/esnext/checkbox/group.js +54 -0
  109. package/esnext/checkbox/hooks/index.d.ts +1 -0
  110. package/esnext/checkbox/hooks/index.js +1 -0
  111. package/esnext/checkbox/hooks/useMergeProps.d.ts +3 -0
  112. package/esnext/checkbox/hooks/useMergeProps.js +20 -0
  113. package/esnext/checkbox/index.d.ts +19 -0
  114. package/esnext/checkbox/index.js +22 -0
  115. package/esnext/checkbox/style/css/index.css +613 -0
  116. package/esnext/checkbox/style/css/index.d.ts +2 -0
  117. package/esnext/checkbox/style/css/index.js +2 -0
  118. package/esnext/checkbox/style/index.d.ts +2 -0
  119. package/esnext/checkbox/style/index.js +2 -0
  120. package/esnext/checkbox/style/index.less +119 -0
  121. package/esnext/checkbox/type.d.ts +162 -0
  122. package/esnext/checkbox/type.js +27 -0
  123. package/esnext/circle-progress/index.d.ts +141 -0
  124. package/esnext/circle-progress/index.js +75 -0
  125. package/esnext/circle-progress/style/css/index.css +582 -0
  126. package/esnext/circle-progress/style/css/index.d.ts +2 -0
  127. package/esnext/circle-progress/style/css/index.js +2 -0
  128. package/esnext/circle-progress/style/index.d.ts +2 -0
  129. package/esnext/circle-progress/style/index.js +2 -0
  130. package/esnext/circle-progress/style/index.less +101 -0
  131. package/esnext/collapse/collapse.d.ts +3 -0
  132. package/esnext/collapse/collapse.js +111 -0
  133. package/esnext/collapse/group.d.ts +21 -0
  134. package/esnext/collapse/group.js +80 -0
  135. package/esnext/collapse/index.d.ts +23 -0
  136. package/esnext/collapse/index.js +14 -0
  137. package/esnext/collapse/style/css/index.css +662 -0
  138. package/esnext/collapse/style/css/index.d.ts +2 -0
  139. package/esnext/collapse/style/css/index.js +2 -0
  140. package/esnext/collapse/style/index.d.ts +2 -0
  141. package/esnext/collapse/style/index.js +2 -0
  142. package/esnext/collapse/style/index.less +106 -0
  143. package/esnext/collapse/type.d.ts +139 -0
  144. package/esnext/collapse/type.js +1 -0
  145. package/esnext/collapse/utils.d.ts +8 -0
  146. package/esnext/collapse/utils.js +16 -0
  147. package/esnext/context-provider/index.d.ts +74 -0
  148. package/esnext/context-provider/index.js +99 -0
  149. package/esnext/context-provider/style/css/index.css +0 -0
  150. package/esnext/context-provider/style/css/index.d.ts +2 -0
  151. package/esnext/context-provider/style/css/index.js +2 -0
  152. package/esnext/context-provider/style/index.d.ts +2 -0
  153. package/esnext/context-provider/style/index.js +2 -0
  154. package/esnext/context-provider/style/index.less +1 -0
  155. package/esnext/count-down/hooks.d.ts +10 -0
  156. package/esnext/count-down/hooks.js +107 -0
  157. package/esnext/count-down/index.d.ts +13 -0
  158. package/esnext/count-down/index.js +37 -0
  159. package/esnext/count-down/singleton.d.ts +15 -0
  160. package/esnext/count-down/singleton.js +52 -0
  161. package/esnext/count-down/style/css/index.css +534 -0
  162. package/esnext/count-down/style/css/index.d.ts +2 -0
  163. package/esnext/count-down/style/css/index.js +2 -0
  164. package/esnext/count-down/style/index.d.ts +2 -0
  165. package/esnext/count-down/style/index.js +2 -0
  166. package/esnext/count-down/style/index.less +37 -0
  167. package/esnext/count-down/type.d.ts +112 -0
  168. package/esnext/count-down/type.js +1 -0
  169. package/esnext/count-down/util.d.ts +8 -0
  170. package/esnext/count-down/util.js +106 -0
  171. package/esnext/date-picker/helper.d.ts +5 -0
  172. package/esnext/date-picker/helper.js +38 -0
  173. package/esnext/date-picker/index.d.ts +24 -0
  174. package/esnext/date-picker/index.js +217 -0
  175. package/esnext/date-picker/style/css/index.css +526 -0
  176. package/esnext/date-picker/style/css/index.d.ts +3 -0
  177. package/esnext/date-picker/style/css/index.js +3 -0
  178. package/esnext/date-picker/style/index.d.ts +3 -0
  179. package/esnext/date-picker/style/index.js +3 -0
  180. package/esnext/date-picker/style/index.less +30 -0
  181. package/esnext/date-picker/type.d.ts +114 -0
  182. package/esnext/date-picker/type.js +1 -0
  183. package/esnext/dialog/index.d.ts +213 -0
  184. package/esnext/dialog/index.js +87 -0
  185. package/esnext/dialog/methods.d.ts +20 -0
  186. package/esnext/dialog/methods.js +42 -0
  187. package/esnext/dialog/style/css/index.css +1111 -0
  188. package/esnext/dialog/style/css/index.d.ts +3 -0
  189. package/esnext/dialog/style/css/index.js +3 -0
  190. package/esnext/dialog/style/index.d.ts +3 -0
  191. package/esnext/dialog/style/index.js +3 -0
  192. package/esnext/dialog/style/index.less +376 -0
  193. package/esnext/divider/index.d.ts +49 -0
  194. package/esnext/divider/index.js +32 -0
  195. package/esnext/divider/style/css/index.css +609 -0
  196. package/esnext/divider/style/css/index.d.ts +2 -0
  197. package/esnext/divider/style/css/index.js +2 -0
  198. package/esnext/divider/style/index.d.ts +2 -0
  199. package/esnext/divider/style/index.js +2 -0
  200. package/esnext/divider/style/index.less +101 -0
  201. package/esnext/dropdown/dropdown.d.ts +3 -0
  202. package/esnext/dropdown/dropdown.js +196 -0
  203. package/esnext/dropdown/index.d.ts +14 -0
  204. package/esnext/dropdown/index.js +16 -0
  205. package/esnext/dropdown/options.d.ts +4 -0
  206. package/esnext/dropdown/options.js +61 -0
  207. package/esnext/dropdown/style/css/index.css +653 -0
  208. package/esnext/dropdown/style/css/index.d.ts +2 -0
  209. package/esnext/dropdown/style/css/index.js +2 -0
  210. package/esnext/dropdown/style/index.d.ts +2 -0
  211. package/esnext/dropdown/style/index.js +2 -0
  212. package/esnext/dropdown/style/index.less +177 -0
  213. package/esnext/dropdown/type.d.ts +269 -0
  214. package/esnext/dropdown/type.js +1 -0
  215. package/esnext/dropdown-menu/dropdown-menu.d.ts +4 -0
  216. package/esnext/dropdown-menu/dropdown-menu.js +161 -0
  217. package/esnext/dropdown-menu/helper.d.ts +34 -0
  218. package/esnext/dropdown-menu/helper.js +88 -0
  219. package/esnext/dropdown-menu/index.d.ts +12 -0
  220. package/esnext/dropdown-menu/index.js +13 -0
  221. package/esnext/dropdown-menu/style/css/index.css +705 -0
  222. package/esnext/dropdown-menu/style/css/index.d.ts +3 -0
  223. package/esnext/dropdown-menu/style/css/index.js +3 -0
  224. package/esnext/dropdown-menu/style/index.d.ts +3 -0
  225. package/esnext/dropdown-menu/style/index.js +3 -0
  226. package/esnext/dropdown-menu/style/index.less +122 -0
  227. package/esnext/dropdown-menu/type.d.ts +168 -0
  228. package/esnext/dropdown-menu/type.js +1 -0
  229. package/esnext/ellipsis/components/js-ellipsis.d.ts +6 -0
  230. package/esnext/ellipsis/components/js-ellipsis.js +178 -0
  231. package/esnext/ellipsis/components/native-ellipsis.d.ts +5 -0
  232. package/esnext/ellipsis/components/native-ellipsis.js +15 -0
  233. package/esnext/ellipsis/index.d.ts +13 -0
  234. package/esnext/ellipsis/index.js +31 -0
  235. package/esnext/ellipsis/style/css/index.css +556 -0
  236. package/esnext/ellipsis/style/css/index.d.ts +2 -0
  237. package/esnext/ellipsis/style/css/index.js +2 -0
  238. package/esnext/ellipsis/style/index.d.ts +2 -0
  239. package/esnext/ellipsis/style/index.js +2 -0
  240. package/esnext/ellipsis/style/index.less +63 -0
  241. package/esnext/ellipsis/type.d.ts +107 -0
  242. package/esnext/ellipsis/type.js +1 -0
  243. package/esnext/ellipsis/utils/dom.d.ts +2 -0
  244. package/esnext/ellipsis/utils/dom.js +35 -0
  245. package/esnext/ellipsis/utils/is.d.ts +3 -0
  246. package/esnext/ellipsis/utils/is.js +3 -0
  247. package/esnext/form/form-item-context.d.ts +3 -0
  248. package/esnext/form/form-item-context.js +6 -0
  249. package/esnext/form/form-item.d.ts +4 -0
  250. package/esnext/form/form-item.js +218 -0
  251. package/esnext/form/index.d.ts +16 -0
  252. package/esnext/form/index.js +50 -0
  253. package/esnext/form/linked-container.d.ts +8 -0
  254. package/esnext/form/linked-container.js +29 -0
  255. package/esnext/form/style/css/index.css +670 -0
  256. package/esnext/form/style/css/index.d.ts +2 -0
  257. package/esnext/form/style/css/index.js +2 -0
  258. package/esnext/form/style/index.d.ts +2 -0
  259. package/esnext/form/style/index.js +2 -0
  260. package/esnext/form/style/index.less +172 -0
  261. package/esnext/form/type.d.ts +373 -0
  262. package/esnext/form/type.js +26 -0
  263. package/esnext/form/useForm.d.ts +18 -0
  264. package/esnext/form/useForm.js +203 -0
  265. package/esnext/form/utils.d.ts +7 -0
  266. package/esnext/form/utils.js +21 -0
  267. package/esnext/grid/index.d.ts +112 -0
  268. package/esnext/grid/index.js +79 -0
  269. package/esnext/grid/style/css/index.css +661 -0
  270. package/esnext/grid/style/css/index.d.ts +2 -0
  271. package/esnext/grid/style/css/index.js +2 -0
  272. package/esnext/grid/style/index.d.ts +2 -0
  273. package/esnext/grid/style/index.js +2 -0
  274. package/esnext/grid/style/index.less +157 -0
  275. package/esnext/icon/IconAdd/index.d.ts +7 -0
  276. package/esnext/icon/IconAdd/index.js +7 -0
  277. package/esnext/icon/IconArrowBack/index.d.ts +7 -0
  278. package/esnext/icon/IconArrowBack/index.js +7 -0
  279. package/esnext/icon/IconArrowDown/index.d.ts +7 -0
  280. package/esnext/icon/IconArrowDown/index.js +7 -0
  281. package/esnext/icon/IconArrowIn/index.d.ts +7 -0
  282. package/esnext/icon/IconArrowIn/index.js +7 -0
  283. package/esnext/icon/IconArrowUp/index.d.ts +7 -0
  284. package/esnext/icon/IconArrowUp/index.js +7 -0
  285. package/esnext/icon/IconCheck/index.d.ts +7 -0
  286. package/esnext/icon/IconCheck/index.js +7 -0
  287. package/esnext/icon/IconCheckBold/index.d.ts +7 -0
  288. package/esnext/icon/IconCheckBold/index.js +8 -0
  289. package/esnext/icon/IconCircleChecked/index.d.ts +7 -0
  290. package/esnext/icon/IconCircleChecked/index.js +7 -0
  291. package/esnext/icon/IconCircleDisabled/index.d.ts +7 -0
  292. package/esnext/icon/IconCircleDisabled/index.js +7 -0
  293. package/esnext/icon/IconCircleUnchecked/index.d.ts +7 -0
  294. package/esnext/icon/IconCircleUnchecked/index.js +7 -0
  295. package/esnext/icon/IconClear/index.d.ts +7 -0
  296. package/esnext/icon/IconClear/index.js +7 -0
  297. package/esnext/icon/IconClose/index.d.ts +7 -0
  298. package/esnext/icon/IconClose/index.js +7 -0
  299. package/esnext/icon/IconCloseBold/index.d.ts +7 -0
  300. package/esnext/icon/IconCloseBold/index.js +8 -0
  301. package/esnext/icon/IconDelete/index.d.ts +7 -0
  302. package/esnext/icon/IconDelete/index.js +7 -0
  303. package/esnext/icon/IconDownload/index.d.ts +7 -0
  304. package/esnext/icon/IconDownload/index.js +7 -0
  305. package/esnext/icon/IconEdit/index.d.ts +7 -0
  306. package/esnext/icon/IconEdit/index.js +7 -0
  307. package/esnext/icon/IconErrorCircle/index.d.ts +7 -0
  308. package/esnext/icon/IconErrorCircle/index.js +8 -0
  309. package/esnext/icon/IconEyeInvisible/index.d.ts +7 -0
  310. package/esnext/icon/IconEyeInvisible/index.js +7 -0
  311. package/esnext/icon/IconEyeVisible/index.d.ts +7 -0
  312. package/esnext/icon/IconEyeVisible/index.js +7 -0
  313. package/esnext/icon/IconEyelashInvisible/index.d.ts +7 -0
  314. package/esnext/icon/IconEyelashInvisible/index.js +7 -0
  315. package/esnext/icon/IconFile/index.d.ts +7 -0
  316. package/esnext/icon/IconFile/index.js +7 -0
  317. package/esnext/icon/IconGift/index.d.ts +7 -0
  318. package/esnext/icon/IconGift/index.js +8 -0
  319. package/esnext/icon/IconHeart/index.d.ts +7 -0
  320. package/esnext/icon/IconHeart/index.js +8 -0
  321. package/esnext/icon/IconHome/index.d.ts +7 -0
  322. package/esnext/icon/IconHome/index.js +7 -0
  323. package/esnext/icon/IconKeyboard/index.d.ts +7 -0
  324. package/esnext/icon/IconKeyboard/index.js +8 -0
  325. package/esnext/icon/IconKeyboardDelete/index.d.ts +7 -0
  326. package/esnext/icon/IconKeyboardDelete/index.js +8 -0
  327. package/esnext/icon/IconLikeCircle/index.d.ts +7 -0
  328. package/esnext/icon/IconLikeCircle/index.js +7 -0
  329. package/esnext/icon/IconMinus/index.d.ts +7 -0
  330. package/esnext/icon/IconMinus/index.js +8 -0
  331. package/esnext/icon/IconMore/index.d.ts +7 -0
  332. package/esnext/icon/IconMore/index.js +7 -0
  333. package/esnext/icon/IconNotice/index.d.ts +7 -0
  334. package/esnext/icon/IconNotice/index.js +8 -0
  335. package/esnext/icon/IconNoticeOff/index.d.ts +7 -0
  336. package/esnext/icon/IconNoticeOff/index.js +8 -0
  337. package/esnext/icon/IconPicture/index.d.ts +7 -0
  338. package/esnext/icon/IconPicture/index.js +7 -0
  339. package/esnext/icon/IconPlay/index.d.ts +7 -0
  340. package/esnext/icon/IconPlay/index.js +8 -0
  341. package/esnext/icon/IconQuestionCircle/index.d.ts +7 -0
  342. package/esnext/icon/IconQuestionCircle/index.js +7 -0
  343. package/esnext/icon/IconRefresh/index.d.ts +7 -0
  344. package/esnext/icon/IconRefresh/index.js +7 -0
  345. package/esnext/icon/IconSad/index.d.ts +7 -0
  346. package/esnext/icon/IconSad/index.js +7 -0
  347. package/esnext/icon/IconScan/index.d.ts +7 -0
  348. package/esnext/icon/IconScan/index.js +7 -0
  349. package/esnext/icon/IconSearch/index.d.ts +7 -0
  350. package/esnext/icon/IconSearch/index.js +7 -0
  351. package/esnext/icon/IconSetting/index.d.ts +7 -0
  352. package/esnext/icon/IconSetting/index.js +8 -0
  353. package/esnext/icon/IconShop/index.d.ts +7 -0
  354. package/esnext/icon/IconShop/index.js +8 -0
  355. package/esnext/icon/IconShopping/index.d.ts +7 -0
  356. package/esnext/icon/IconShopping/index.js +8 -0
  357. package/esnext/icon/IconSmileFill/index.d.ts +7 -0
  358. package/esnext/icon/IconSmileFill/index.js +7 -0
  359. package/esnext/icon/IconSound/index.d.ts +7 -0
  360. package/esnext/icon/IconSound/index.js +8 -0
  361. package/esnext/icon/IconSquareChecked/index.d.ts +7 -0
  362. package/esnext/icon/IconSquareChecked/index.js +7 -0
  363. package/esnext/icon/IconSquareDisabled/index.d.ts +7 -0
  364. package/esnext/icon/IconSquareDisabled/index.js +7 -0
  365. package/esnext/icon/IconSquareUnchecked/index.d.ts +7 -0
  366. package/esnext/icon/IconSquareUnchecked/index.js +7 -0
  367. package/esnext/icon/IconStar/index.d.ts +7 -0
  368. package/esnext/icon/IconStar/index.js +7 -0
  369. package/esnext/icon/IconStarFill/index.d.ts +7 -0
  370. package/esnext/icon/IconStarFill/index.js +8 -0
  371. package/esnext/icon/IconStarHalf/index.d.ts +7 -0
  372. package/esnext/icon/IconStarHalf/index.js +7 -0
  373. package/esnext/icon/IconSubway/index.d.ts +7 -0
  374. package/esnext/icon/IconSubway/index.js +8 -0
  375. package/esnext/icon/IconSuccessCircle/index.d.ts +7 -0
  376. package/esnext/icon/IconSuccessCircle/index.js +8 -0
  377. package/esnext/icon/IconTriDown/index.d.ts +7 -0
  378. package/esnext/icon/IconTriDown/index.js +8 -0
  379. package/esnext/icon/IconTriUp/index.d.ts +7 -0
  380. package/esnext/icon/IconTriUp/index.js +8 -0
  381. package/esnext/icon/IconUpload/index.d.ts +7 -0
  382. package/esnext/icon/IconUpload/index.js +7 -0
  383. package/esnext/icon/IconUser/index.d.ts +7 -0
  384. package/esnext/icon/IconUser/index.js +7 -0
  385. package/esnext/icon/IconUserFill/index.d.ts +7 -0
  386. package/esnext/icon/IconUserFill/index.js +7 -0
  387. package/esnext/icon/IconWarnCircle/index.d.ts +7 -0
  388. package/esnext/icon/IconWarnCircle/index.js +8 -0
  389. package/esnext/icon/IconWarnCircleFill/index.d.ts +7 -0
  390. package/esnext/icon/IconWarnCircleFill/index.js +8 -0
  391. package/esnext/icon/index.d.ts +59 -0
  392. package/esnext/icon/index.js +59 -0
  393. package/esnext/icon/type.d.ts +10 -0
  394. package/esnext/icon/type.js +1 -0
  395. package/esnext/image/index.d.ts +186 -0
  396. package/esnext/image/index.js +223 -0
  397. package/esnext/image/style/css/index.css +734 -0
  398. package/esnext/image/style/css/index.d.ts +3 -0
  399. package/esnext/image/style/css/index.js +3 -0
  400. package/esnext/image/style/index.d.ts +3 -0
  401. package/esnext/image/style/index.js +3 -0
  402. package/esnext/image/style/index.less +198 -0
  403. package/esnext/image-picker/add-icon.d.ts +2 -0
  404. package/esnext/image-picker/add-icon.js +5 -0
  405. package/esnext/image-picker/index.d.ts +16 -0
  406. package/esnext/image-picker/index.js +77 -0
  407. package/esnext/image-picker/style/css/index.css +688 -0
  408. package/esnext/image-picker/style/css/index.d.ts +4 -0
  409. package/esnext/image-picker/style/css/index.js +4 -0
  410. package/esnext/image-picker/style/index.d.ts +4 -0
  411. package/esnext/image-picker/style/index.js +4 -0
  412. package/esnext/image-picker/style/index.less +170 -0
  413. package/esnext/image-picker/type.d.ts +115 -0
  414. package/esnext/image-picker/type.js +1 -0
  415. package/esnext/image-preview/index.d.ts +296 -0
  416. package/esnext/image-preview/index.js +794 -0
  417. package/esnext/image-preview/methods.d.ts +13 -0
  418. package/esnext/image-preview/methods.js +46 -0
  419. package/esnext/image-preview/style/css/index.css +664 -0
  420. package/esnext/image-preview/style/css/index.d.ts +5 -0
  421. package/esnext/image-preview/style/css/index.js +5 -0
  422. package/esnext/image-preview/style/index.d.ts +5 -0
  423. package/esnext/image-preview/style/index.js +5 -0
  424. package/esnext/image-preview/style/index.less +140 -0
  425. package/esnext/index-bar/context.d.ts +3 -0
  426. package/esnext/index-bar/context.js +6 -0
  427. package/esnext/index-bar/group.d.ts +3 -0
  428. package/esnext/index-bar/group.js +33 -0
  429. package/esnext/index-bar/index.d.ts +15 -0
  430. package/esnext/index-bar/index.js +151 -0
  431. package/esnext/index-bar/side-bar.d.ts +3 -0
  432. package/esnext/index-bar/side-bar.js +44 -0
  433. package/esnext/index-bar/style/css/index.css +767 -0
  434. package/esnext/index-bar/style/css/index.d.ts +3 -0
  435. package/esnext/index-bar/style/css/index.js +3 -0
  436. package/esnext/index-bar/style/index.d.ts +3 -0
  437. package/esnext/index-bar/style/index.js +3 -0
  438. package/esnext/index-bar/style/index.less +189 -0
  439. package/esnext/index-bar/type.d.ts +195 -0
  440. package/esnext/index-bar/type.js +1 -0
  441. package/esnext/index-bar/utils.d.ts +6 -0
  442. package/esnext/index-bar/utils.js +44 -0
  443. package/esnext/index.d.ts +59 -0
  444. package/esnext/index.js +59 -0
  445. package/esnext/input/hooks.d.ts +14 -0
  446. package/esnext/input/hooks.js +174 -0
  447. package/esnext/input/index.d.ts +60 -0
  448. package/esnext/input/index.js +28 -0
  449. package/esnext/input/props.d.ts +182 -0
  450. package/esnext/input/props.js +1 -0
  451. package/esnext/input/style/css/index.css +759 -0
  452. package/esnext/input/style/css/index.d.ts +2 -0
  453. package/esnext/input/style/css/index.js +2 -0
  454. package/esnext/input/style/index.d.ts +2 -0
  455. package/esnext/input/style/index.js +2 -0
  456. package/esnext/input/style/index.less +195 -0
  457. package/esnext/keyboard/index.d.ts +13 -0
  458. package/esnext/keyboard/index.js +159 -0
  459. package/esnext/keyboard/style/css/index.css +633 -0
  460. package/esnext/keyboard/style/css/index.d.ts +3 -0
  461. package/esnext/keyboard/style/css/index.js +3 -0
  462. package/esnext/keyboard/style/index.d.ts +3 -0
  463. package/esnext/keyboard/style/index.js +3 -0
  464. package/esnext/keyboard/style/index.less +131 -0
  465. package/esnext/keyboard/type.d.ts +102 -0
  466. package/esnext/keyboard/type.js +1 -0
  467. package/esnext/load-more/index.d.ts +158 -0
  468. package/esnext/load-more/index.js +150 -0
  469. package/esnext/load-more/style/css/index.css +534 -0
  470. package/esnext/load-more/style/css/index.d.ts +2 -0
  471. package/esnext/load-more/style/css/index.js +2 -0
  472. package/esnext/load-more/style/index.d.ts +2 -0
  473. package/esnext/load-more/style/index.js +2 -0
  474. package/esnext/load-more/style/index.less +37 -0
  475. package/esnext/loading/index.d.ts +76 -0
  476. package/esnext/loading/index.js +123 -0
  477. package/esnext/loading/style/css/index.css +648 -0
  478. package/esnext/loading/style/css/index.d.ts +2 -0
  479. package/esnext/loading/style/css/index.js +2 -0
  480. package/esnext/loading/style/index.d.ts +2 -0
  481. package/esnext/loading/style/index.js +2 -0
  482. package/esnext/loading/style/index.less +147 -0
  483. package/esnext/masking/index.d.ts +225 -0
  484. package/esnext/masking/index.js +114 -0
  485. package/esnext/masking/methods.d.ts +23 -0
  486. package/esnext/masking/methods.js +56 -0
  487. package/esnext/masking/style/css/index.css +552 -0
  488. package/esnext/masking/style/css/index.d.ts +3 -0
  489. package/esnext/masking/style/css/index.js +3 -0
  490. package/esnext/masking/style/index.d.ts +3 -0
  491. package/esnext/masking/style/index.js +3 -0
  492. package/esnext/masking/style/index.less +55 -0
  493. package/esnext/nav-bar/back-icon.d.ts +5 -0
  494. package/esnext/nav-bar/back-icon.js +9 -0
  495. package/esnext/nav-bar/index.d.ts +135 -0
  496. package/esnext/nav-bar/index.js +96 -0
  497. package/esnext/nav-bar/style/css/index.css +706 -0
  498. package/esnext/nav-bar/style/css/index.d.ts +2 -0
  499. package/esnext/nav-bar/style/css/index.js +2 -0
  500. package/esnext/nav-bar/style/index.d.ts +2 -0
  501. package/esnext/nav-bar/style/index.js +2 -0
  502. package/esnext/nav-bar/style/index.less +150 -0
  503. package/esnext/notice-bar/index.d.ts +107 -0
  504. package/esnext/notice-bar/index.js +126 -0
  505. package/esnext/notice-bar/style/css/index.css +685 -0
  506. package/esnext/notice-bar/style/css/index.d.ts +2 -0
  507. package/esnext/notice-bar/style/css/index.js +2 -0
  508. package/esnext/notice-bar/style/index.d.ts +2 -0
  509. package/esnext/notice-bar/style/index.js +2 -0
  510. package/esnext/notice-bar/style/index.less +160 -0
  511. package/esnext/notify/index.d.ts +97 -0
  512. package/esnext/notify/index.js +123 -0
  513. package/esnext/notify/methods.d.ts +14 -0
  514. package/esnext/notify/methods.js +63 -0
  515. package/esnext/notify/style/css/index.css +591 -0
  516. package/esnext/notify/style/css/index.d.ts +2 -0
  517. package/esnext/notify/style/css/index.js +2 -0
  518. package/esnext/notify/style/index.d.ts +2 -0
  519. package/esnext/notify/style/index.js +2 -0
  520. package/esnext/notify/style/index.less +90 -0
  521. package/esnext/notify/type.d.ts +70 -0
  522. package/esnext/notify/type.js +1 -0
  523. package/esnext/pagination/arrow.d.ts +2 -0
  524. package/esnext/pagination/arrow.js +5 -0
  525. package/esnext/pagination/index.d.ts +124 -0
  526. package/esnext/pagination/index.js +104 -0
  527. package/esnext/pagination/style/css/index.css +708 -0
  528. package/esnext/pagination/style/css/index.d.ts +2 -0
  529. package/esnext/pagination/style/css/index.js +2 -0
  530. package/esnext/pagination/style/index.d.ts +2 -0
  531. package/esnext/pagination/style/index.js +2 -0
  532. package/esnext/pagination/style/index.less +176 -0
  533. package/esnext/picker/index.d.ts +50 -0
  534. package/esnext/picker/index.js +93 -0
  535. package/esnext/picker/style/css/index.css +592 -0
  536. package/esnext/picker/style/css/index.d.ts +4 -0
  537. package/esnext/picker/style/css/index.js +4 -0
  538. package/esnext/picker/style/index.d.ts +4 -0
  539. package/esnext/picker/style/index.js +4 -0
  540. package/esnext/picker/style/index.less +95 -0
  541. package/esnext/picker/type.d.ts +131 -0
  542. package/esnext/picker/type.js +1 -0
  543. package/esnext/picker-view/components/cascader.d.ts +25 -0
  544. package/esnext/picker-view/components/cascader.js +54 -0
  545. package/esnext/picker-view/components/multi-picker.d.ts +11 -0
  546. package/esnext/picker-view/components/multi-picker.js +32 -0
  547. package/esnext/picker-view/components/picker-cell.d.ts +28 -0
  548. package/esnext/picker-view/components/picker-cell.js +284 -0
  549. package/esnext/picker-view/index.d.ts +62 -0
  550. package/esnext/picker-view/index.js +135 -0
  551. package/esnext/picker-view/style/css/index.css +750 -0
  552. package/esnext/picker-view/style/css/index.d.ts +2 -0
  553. package/esnext/picker-view/style/css/index.js +2 -0
  554. package/esnext/picker-view/style/index.d.ts +2 -0
  555. package/esnext/picker-view/style/index.js +2 -0
  556. package/esnext/picker-view/style/index.less +125 -0
  557. package/esnext/picker-view/type.d.ts +89 -0
  558. package/esnext/picker-view/type.js +1 -0
  559. package/esnext/popover/hooks/index.d.ts +2 -0
  560. package/esnext/popover/hooks/index.js +2 -0
  561. package/esnext/popover/hooks/useEvent.d.ts +8 -0
  562. package/esnext/popover/hooks/useEvent.js +148 -0
  563. package/esnext/popover/hooks/usePosition.d.ts +18 -0
  564. package/esnext/popover/hooks/usePosition.js +419 -0
  565. package/esnext/popover/index.d.ts +14 -0
  566. package/esnext/popover/index.js +20 -0
  567. package/esnext/popover/menu.d.ts +3 -0
  568. package/esnext/popover/menu.js +80 -0
  569. package/esnext/popover/popover-inner.d.ts +3 -0
  570. package/esnext/popover/popover-inner.js +79 -0
  571. package/esnext/popover/popover.d.ts +3 -0
  572. package/esnext/popover/popover.js +132 -0
  573. package/esnext/popover/style/css/index.css +993 -0
  574. package/esnext/popover/style/css/index.d.ts +3 -0
  575. package/esnext/popover/style/css/index.js +3 -0
  576. package/esnext/popover/style/css/menu.css +673 -0
  577. package/esnext/popover/style/index.d.ts +3 -0
  578. package/esnext/popover/style/index.js +3 -0
  579. package/esnext/popover/style/index.less +353 -0
  580. package/esnext/popover/style/menu.less +163 -0
  581. package/esnext/popover/type.d.ts +447 -0
  582. package/esnext/popover/type.js +1 -0
  583. package/esnext/popup/index.d.ts +86 -0
  584. package/esnext/popup/index.js +39 -0
  585. package/esnext/popup/methods.d.ts +10 -0
  586. package/esnext/popup/methods.js +4 -0
  587. package/esnext/popup/style/css/index.css +638 -0
  588. package/esnext/popup/style/css/index.d.ts +3 -0
  589. package/esnext/popup/style/css/index.js +3 -0
  590. package/esnext/popup/style/index.d.ts +3 -0
  591. package/esnext/popup/style/index.js +3 -0
  592. package/esnext/popup/style/index.less +114 -0
  593. package/esnext/popup-swiper/index.d.ts +93 -0
  594. package/esnext/popup-swiper/index.js +192 -0
  595. package/esnext/popup-swiper/methods.d.ts +10 -0
  596. package/esnext/popup-swiper/methods.js +4 -0
  597. package/esnext/popup-swiper/style/css/index.css +531 -0
  598. package/esnext/popup-swiper/style/css/index.d.ts +3 -0
  599. package/esnext/popup-swiper/style/css/index.js +3 -0
  600. package/esnext/popup-swiper/style/index.d.ts +3 -0
  601. package/esnext/popup-swiper/style/index.js +3 -0
  602. package/esnext/popup-swiper/style/index.less +35 -0
  603. package/esnext/portal/index.d.ts +23 -0
  604. package/esnext/portal/index.js +18 -0
  605. package/esnext/portal/style/css/index.css +0 -0
  606. package/esnext/portal/style/css/index.d.ts +2 -0
  607. package/esnext/portal/style/css/index.js +2 -0
  608. package/esnext/portal/style/index.d.ts +2 -0
  609. package/esnext/portal/style/index.js +2 -0
  610. package/esnext/portal/style/index.less +1 -0
  611. package/esnext/progress/index.d.ts +126 -0
  612. package/esnext/progress/index.js +66 -0
  613. package/esnext/progress/style/css/index.css +692 -0
  614. package/esnext/progress/style/css/index.d.ts +2 -0
  615. package/esnext/progress/style/css/index.js +2 -0
  616. package/esnext/progress/style/index.d.ts +2 -0
  617. package/esnext/progress/style/index.js +2 -0
  618. package/esnext/progress/style/index.less +205 -0
  619. package/esnext/pull-refresh/android-pull-refresh.d.ts +3 -0
  620. package/esnext/pull-refresh/android-pull-refresh.js +168 -0
  621. package/esnext/pull-refresh/hooks.d.ts +30 -0
  622. package/esnext/pull-refresh/hooks.js +73 -0
  623. package/esnext/pull-refresh/index.d.ts +28 -0
  624. package/esnext/pull-refresh/index.js +21 -0
  625. package/esnext/pull-refresh/ios-pull-refresh.d.ts +3 -0
  626. package/esnext/pull-refresh/ios-pull-refresh.js +137 -0
  627. package/esnext/pull-refresh/model.d.ts +111 -0
  628. package/esnext/pull-refresh/model.js +8 -0
  629. package/esnext/pull-refresh/style/css/index.css +650 -0
  630. package/esnext/pull-refresh/style/css/index.d.ts +3 -0
  631. package/esnext/pull-refresh/style/css/index.js +3 -0
  632. package/esnext/pull-refresh/style/index.d.ts +3 -0
  633. package/esnext/pull-refresh/style/index.js +3 -0
  634. package/esnext/pull-refresh/style/index.less +131 -0
  635. package/esnext/radio/group.d.ts +5 -0
  636. package/esnext/radio/group.js +50 -0
  637. package/esnext/radio/index.d.ts +19 -0
  638. package/esnext/radio/index.js +22 -0
  639. package/esnext/radio/radio.d.ts +5 -0
  640. package/esnext/radio/radio.js +13 -0
  641. package/esnext/radio/style/css/index.css +604 -0
  642. package/esnext/radio/style/css/index.d.ts +2 -0
  643. package/esnext/radio/style/css/index.js +2 -0
  644. package/esnext/radio/style/index.d.ts +2 -0
  645. package/esnext/radio/style/index.js +2 -0
  646. package/esnext/radio/style/index.less +114 -0
  647. package/esnext/radio/type.d.ts +31 -0
  648. package/esnext/radio/type.js +1 -0
  649. package/esnext/rate/index.d.ts +109 -0
  650. package/esnext/rate/index.js +87 -0
  651. package/esnext/rate/style/css/index.css +595 -0
  652. package/esnext/rate/style/css/index.d.ts +2 -0
  653. package/esnext/rate/style/css/index.js +2 -0
  654. package/esnext/rate/style/index.d.ts +2 -0
  655. package/esnext/rate/style/index.js +2 -0
  656. package/esnext/rate/style/index.less +106 -0
  657. package/esnext/search-bar/association.d.ts +3 -0
  658. package/esnext/search-bar/association.js +51 -0
  659. package/esnext/search-bar/cancel-button.d.ts +10 -0
  660. package/esnext/search-bar/cancel-button.js +18 -0
  661. package/esnext/search-bar/highlight.d.ts +12 -0
  662. package/esnext/search-bar/highlight.js +46 -0
  663. package/esnext/search-bar/index.d.ts +13 -0
  664. package/esnext/search-bar/index.js +109 -0
  665. package/esnext/search-bar/style/css/index.css +765 -0
  666. package/esnext/search-bar/style/css/index.d.ts +2 -0
  667. package/esnext/search-bar/style/css/index.js +2 -0
  668. package/esnext/search-bar/style/index.d.ts +2 -0
  669. package/esnext/search-bar/style/index.js +2 -0
  670. package/esnext/search-bar/style/index.less +198 -0
  671. package/esnext/search-bar/type.d.ts +163 -0
  672. package/esnext/search-bar/type.js +1 -0
  673. package/esnext/show-monitor/index.d.ts +115 -0
  674. package/esnext/show-monitor/index.js +416 -0
  675. package/esnext/show-monitor/style/css/index.css +0 -0
  676. package/esnext/show-monitor/style/css/index.d.ts +2 -0
  677. package/esnext/show-monitor/style/css/index.js +2 -0
  678. package/esnext/show-monitor/style/index.d.ts +2 -0
  679. package/esnext/show-monitor/style/index.js +2 -0
  680. package/esnext/show-monitor/style/index.less +1 -0
  681. package/esnext/skeleton/elements.d.ts +7 -0
  682. package/esnext/skeleton/elements.js +117 -0
  683. package/esnext/skeleton/index.d.ts +19 -0
  684. package/esnext/skeleton/index.js +50 -0
  685. package/esnext/skeleton/skeleton-context.d.ts +3 -0
  686. package/esnext/skeleton/skeleton-context.js +5 -0
  687. package/esnext/skeleton/style/css/index.css +712 -0
  688. package/esnext/skeleton/style/css/index.d.ts +3 -0
  689. package/esnext/skeleton/style/css/index.js +3 -0
  690. package/esnext/skeleton/style/index.d.ts +3 -0
  691. package/esnext/skeleton/style/index.js +3 -0
  692. package/esnext/skeleton/style/index.less +182 -0
  693. package/esnext/skeleton/type.d.ts +105 -0
  694. package/esnext/skeleton/type.js +1 -0
  695. package/esnext/slider/hooks/index.d.ts +12 -0
  696. package/esnext/slider/hooks/index.js +33 -0
  697. package/esnext/slider/hooks/useSliderEvents.d.ts +17 -0
  698. package/esnext/slider/hooks/useSliderEvents.js +128 -0
  699. package/esnext/slider/hooks/useSliderIcon.d.ts +7 -0
  700. package/esnext/slider/hooks/useSliderIcon.js +41 -0
  701. package/esnext/slider/hooks/useSliderInit.d.ts +14 -0
  702. package/esnext/slider/hooks/useSliderInit.js +146 -0
  703. package/esnext/slider/hooks/useSliderStyle.d.ts +13 -0
  704. package/esnext/slider/hooks/useSliderStyle.js +39 -0
  705. package/esnext/slider/index.d.ts +163 -0
  706. package/esnext/slider/index.js +120 -0
  707. package/esnext/slider/marks.d.ts +11 -0
  708. package/esnext/slider/marks.js +17 -0
  709. package/esnext/slider/popover.d.ts +6 -0
  710. package/esnext/slider/popover.js +13 -0
  711. package/esnext/slider/style/css/index.css +863 -0
  712. package/esnext/slider/style/css/index.d.ts +3 -0
  713. package/esnext/slider/style/css/index.js +3 -0
  714. package/esnext/slider/style/index.d.ts +3 -0
  715. package/esnext/slider/style/index.js +3 -0
  716. package/esnext/slider/style/index.less +366 -0
  717. package/esnext/slider/thumb.d.ts +9 -0
  718. package/esnext/slider/thumb.js +21 -0
  719. package/esnext/stepper/hooks/useButtonClick.d.ts +11 -0
  720. package/esnext/stepper/hooks/useButtonClick.js +46 -0
  721. package/esnext/stepper/hooks/useInputEvent.d.ts +10 -0
  722. package/esnext/stepper/hooks/useInputEvent.js +41 -0
  723. package/esnext/stepper/hooks/useValue.d.ts +7 -0
  724. package/esnext/stepper/hooks/useValue.js +33 -0
  725. package/esnext/stepper/index.d.ts +16 -0
  726. package/esnext/stepper/index.js +81 -0
  727. package/esnext/stepper/style/css/index.css +636 -0
  728. package/esnext/stepper/style/css/index.d.ts +2 -0
  729. package/esnext/stepper/style/css/index.js +2 -0
  730. package/esnext/stepper/style/index.d.ts +2 -0
  731. package/esnext/stepper/style/index.js +2 -0
  732. package/esnext/stepper/style/index.less +161 -0
  733. package/esnext/stepper/type.d.ts +159 -0
  734. package/esnext/stepper/type.js +1 -0
  735. package/esnext/steps/index.d.ts +19 -0
  736. package/esnext/steps/index.js +53 -0
  737. package/esnext/steps/step.d.ts +4 -0
  738. package/esnext/steps/step.js +43 -0
  739. package/esnext/steps/style/css/index.css +915 -0
  740. package/esnext/steps/style/css/index.d.ts +2 -0
  741. package/esnext/steps/style/css/index.js +2 -0
  742. package/esnext/steps/style/index.d.ts +2 -0
  743. package/esnext/steps/style/index.js +2 -0
  744. package/esnext/steps/style/index.less +459 -0
  745. package/esnext/steps/type.d.ts +115 -0
  746. package/esnext/steps/type.js +1 -0
  747. package/esnext/sticky/index.d.ts +141 -0
  748. package/esnext/sticky/index.js +165 -0
  749. package/esnext/sticky/style/css/index.css +526 -0
  750. package/esnext/sticky/style/css/index.d.ts +2 -0
  751. package/esnext/sticky/style/css/index.js +2 -0
  752. package/esnext/sticky/style/index.d.ts +2 -0
  753. package/esnext/sticky/style/index.js +2 -0
  754. package/esnext/sticky/style/index.less +30 -0
  755. package/esnext/style.d.ts +60 -0
  756. package/esnext/style.js +60 -0
  757. package/esnext/swipe-action/index.d.ts +13 -0
  758. package/esnext/swipe-action/index.js +220 -0
  759. package/esnext/swipe-action/item.d.ts +11 -0
  760. package/esnext/swipe-action/item.js +20 -0
  761. package/esnext/swipe-action/style/css/index.css +620 -0
  762. package/esnext/swipe-action/style/css/index.d.ts +2 -0
  763. package/esnext/swipe-action/style/css/index.js +2 -0
  764. package/esnext/swipe-action/style/index.d.ts +2 -0
  765. package/esnext/swipe-action/style/index.js +2 -0
  766. package/esnext/swipe-action/style/index.less +132 -0
  767. package/esnext/swipe-action/type.d.ts +123 -0
  768. package/esnext/swipe-action/type.js +1 -0
  769. package/esnext/swipe-load/index.d.ts +13 -0
  770. package/esnext/swipe-load/index.js +255 -0
  771. package/esnext/swipe-load/style/css/index.css +561 -0
  772. package/esnext/swipe-load/style/css/index.d.ts +2 -0
  773. package/esnext/swipe-load/style/css/index.js +2 -0
  774. package/esnext/swipe-load/style/index.d.ts +2 -0
  775. package/esnext/swipe-load/style/index.js +2 -0
  776. package/esnext/swipe-load/style/index.less +66 -0
  777. package/esnext/swipe-load/type.d.ts +152 -0
  778. package/esnext/swipe-load/type.js +1 -0
  779. package/esnext/switch/index.d.ts +105 -0
  780. package/esnext/switch/index.js +83 -0
  781. package/esnext/switch/style/css/index.css +765 -0
  782. package/esnext/switch/style/css/index.d.ts +2 -0
  783. package/esnext/switch/style/css/index.js +2 -0
  784. package/esnext/switch/style/index.d.ts +2 -0
  785. package/esnext/switch/style/index.js +2 -0
  786. package/esnext/switch/style/index.less +217 -0
  787. package/esnext/tab-bar/index.d.ts +14 -0
  788. package/esnext/tab-bar/index.js +16 -0
  789. package/esnext/tab-bar/item.d.ts +3 -0
  790. package/esnext/tab-bar/item.js +31 -0
  791. package/esnext/tab-bar/style/css/index.css +617 -0
  792. package/esnext/tab-bar/style/css/index.d.ts +2 -0
  793. package/esnext/tab-bar/style/css/index.js +2 -0
  794. package/esnext/tab-bar/style/index.d.ts +2 -0
  795. package/esnext/tab-bar/style/index.js +2 -0
  796. package/esnext/tab-bar/style/index.less +96 -0
  797. package/esnext/tab-bar/tab-bar.d.ts +11 -0
  798. package/esnext/tab-bar/tab-bar.js +40 -0
  799. package/esnext/tab-bar/type.d.ts +95 -0
  800. package/esnext/tab-bar/type.js +1 -0
  801. package/esnext/tabs/index.d.ts +13 -0
  802. package/esnext/tabs/index.js +340 -0
  803. package/esnext/tabs/style/css/index.css +1162 -0
  804. package/esnext/tabs/style/css/index.d.ts +2 -0
  805. package/esnext/tabs/style/css/index.js +2 -0
  806. package/esnext/tabs/style/index.d.ts +2 -0
  807. package/esnext/tabs/style/index.js +2 -0
  808. package/esnext/tabs/style/index.less +559 -0
  809. package/esnext/tabs/tab-cell-underline.d.ts +4 -0
  810. package/esnext/tabs/tab-cell-underline.js +237 -0
  811. package/esnext/tabs/tab-cell.d.ts +4 -0
  812. package/esnext/tabs/tab-cell.js +258 -0
  813. package/esnext/tabs/tab-pane.d.ts +4 -0
  814. package/esnext/tabs/tab-pane.js +241 -0
  815. package/esnext/tabs/type.d.ts +629 -0
  816. package/esnext/tabs/type.js +1 -0
  817. package/esnext/tag/index.d.ts +14 -0
  818. package/esnext/tag/index.js +20 -0
  819. package/esnext/tag/list.d.ts +3 -0
  820. package/esnext/tag/list.js +47 -0
  821. package/esnext/tag/style/css/index.css +738 -0
  822. package/esnext/tag/style/css/index.d.ts +2 -0
  823. package/esnext/tag/style/css/index.js +2 -0
  824. package/esnext/tag/style/index.d.ts +2 -0
  825. package/esnext/tag/style/index.js +2 -0
  826. package/esnext/tag/style/index.less +188 -0
  827. package/esnext/tag/tag.d.ts +3 -0
  828. package/esnext/tag/tag.js +32 -0
  829. package/esnext/tag/type.d.ts +159 -0
  830. package/esnext/tag/type.js +1 -0
  831. package/esnext/textarea/index.d.ts +96 -0
  832. package/esnext/textarea/index.js +88 -0
  833. package/esnext/textarea/style/css/index.css +572 -0
  834. package/esnext/textarea/style/css/index.d.ts +3 -0
  835. package/esnext/textarea/style/css/index.js +3 -0
  836. package/esnext/textarea/style/index.d.ts +3 -0
  837. package/esnext/textarea/style/index.js +3 -0
  838. package/esnext/textarea/style/index.less +84 -0
  839. package/esnext/toast/index.d.ts +257 -0
  840. package/esnext/toast/index.js +142 -0
  841. package/esnext/toast/methods.d.ts +16 -0
  842. package/esnext/toast/methods.js +61 -0
  843. package/esnext/toast/style/css/index.css +658 -0
  844. package/esnext/toast/style/css/index.d.ts +4 -0
  845. package/esnext/toast/style/css/index.js +4 -0
  846. package/esnext/toast/style/index.d.ts +4 -0
  847. package/esnext/toast/style/index.js +4 -0
  848. package/esnext/toast/style/index.less +130 -0
  849. package/esnext/transition/index.d.ts +49 -0
  850. package/esnext/transition/index.js +15 -0
  851. package/esnext/transition/style/css/index.css +549 -0
  852. package/esnext/transition/style/css/index.d.ts +2 -0
  853. package/esnext/transition/style/css/index.js +2 -0
  854. package/esnext/transition/style/index.d.ts +2 -0
  855. package/esnext/transition/style/index.js +2 -0
  856. package/esnext/transition/style/index.less +53 -0
  857. package/esnext/uploader/index.d.ts +16 -0
  858. package/esnext/uploader/index.js +75 -0
  859. package/esnext/uploader/style/css/index.css +666 -0
  860. package/esnext/uploader/style/css/index.d.ts +4 -0
  861. package/esnext/uploader/style/css/index.js +4 -0
  862. package/esnext/uploader/style/index.d.ts +4 -0
  863. package/esnext/uploader/style/index.js +4 -0
  864. package/esnext/uploader/style/index.less +161 -0
  865. package/esnext/uploader/type.d.ts +108 -0
  866. package/esnext/uploader/type.js +1 -0
  867. package/esnext/uploader/upload/index.d.ts +2 -0
  868. package/esnext/uploader/upload/index.js +2 -0
  869. package/esnext/uploader/upload/type.d.ts +107 -0
  870. package/esnext/uploader/upload/type.js +1 -0
  871. package/esnext/uploader/upload/upload.d.ts +20 -0
  872. package/esnext/uploader/upload/upload.js +123 -0
  873. package/esnext-tsconfig.json +23 -0
  874. package/package.json +3 -3
  875. package/umd/_helpers/index.d.ts +1 -0
  876. package/umd/_helpers/index.js +10 -4
  877. package/umd/_helpers/react-dom.js +21 -14
  878. package/umd/avatar/index.js +3 -1
  879. package/umd/avatar/type.d.ts +6 -0
  880. package/umd/carousel/index.js +18 -1
  881. package/umd/steps/index.d.ts +1 -1
  882. package/umd/steps/index.js +6 -1
  883. package/umd/steps/style/css/index.css +42 -4
  884. package/umd/steps/style/index.less +58 -6
  885. package/umd/steps/type.d.ts +5 -0
@@ -0,0 +1,257 @@
1
+ import React, { ReactNode } from 'react';
2
+ import { ToastBaseProps } from './methods';
3
+ export * from './methods';
4
+ export declare type ToastType = 'success' | 'error' | 'warn';
5
+ export interface ToastProps {
6
+ /**
7
+ * 自定义类名
8
+ * @en Custom classname
9
+ */
10
+ className?: string;
11
+ /**
12
+ * 提示内容
13
+ * @en Tip content
14
+ */
15
+ content?: React.ReactNode;
16
+ /**
17
+ * 自动关闭的延时(单位: ms),设置为0则不会自动关闭
18
+ * @en Duration of automatic shutdown (unit: ms), if set to 0, it will not automatically shutdown
19
+ * @default 3000
20
+ */
21
+ duration?: number;
22
+ /**
23
+ * 自定义图标
24
+ * @en Custom icon
25
+ */
26
+ icon?: React.ReactNode;
27
+ /**
28
+ * 内容排列布局
29
+ * @en Content layout
30
+ * @default "vertical"
31
+ */
32
+ layout?: 'vertical' | 'horizontal';
33
+ /**
34
+ * 打开关闭动画执行时长(单位: ms)
35
+ * @en Open and close animation duration (unit: ms)
36
+ * @default 300
37
+ */
38
+ transitionDuration?: number;
39
+ /**
40
+ * 关闭函数
41
+ * @en Close function
42
+ */
43
+ close?: () => void;
44
+ /**
45
+ * 关闭后的回调函数
46
+ * @en Callback after closing
47
+ */
48
+ onClose?: () => void;
49
+ /**
50
+ * 是否为加载态
51
+ * @en Whether it is in the loading state
52
+ */
53
+ loading?: boolean;
54
+ /**
55
+ * 加载图标,传入Icon组件type属性或node
56
+ * @en Loading icon, input the type or node of icon component
57
+ */
58
+ loadingIcon?: React.ReactNode;
59
+ /**
60
+ * 加载图标内部元素,仅在 loading 为 true 时生效
61
+ * @en Inner element of loading icon, only takes effect when loading is true
62
+ */
63
+ loadingInner?: string;
64
+ /**
65
+ * 是否禁止toast以外区域的交互
66
+ * @en Whether to prohibit interaction in areas other than toast
67
+ * @default false
68
+ */
69
+ disableBodyTouch?: boolean;
70
+ /**
71
+ * 是否显示toast
72
+ * @en Whether to show toast
73
+ * @default false
74
+ */
75
+ visible?: boolean;
76
+ /**
77
+ * 获取挂载容器
78
+ * @en Get mounted container
79
+ */
80
+ getContainer?: () => HTMLElement;
81
+ /**
82
+ * toast展示信息类型,不同类型对应不同图标,info表示纯文字信息无图标
83
+ * @en toast displays information types, different types correspond to different icons, info means plain text information without icons
84
+ * @default "info"
85
+ */
86
+ type?: ToastType | 'info';
87
+ /**
88
+ * toast出现位置
89
+ * @en The direction where the toast appears
90
+ * @default "center"
91
+ */
92
+ direction?: 'center' | 'top' | 'bottom';
93
+ /**
94
+ * 自定义不同类型对应的不同图标
95
+ * @en Customize different icons corresponding to different types
96
+ */
97
+ typeIconMap?: Partial<Record<ToastType, ReactNode>>;
98
+ /**
99
+ * 页面初始 overflow 状态,即关闭toast时 overflow 应该还原的状态
100
+ * @en The initial overflow state of the page, that is, the state of overflow should be restored when toast is closed
101
+ * @default 第一个全屏组件(弹窗、toast等)打开时页面overflow值
102
+ * @default_en The page overflow value when the first fullscreen component (popup, toast, etc.) is opened
103
+ */
104
+ initialBodyOverflow?: string;
105
+ }
106
+ export interface ToastRef {
107
+ /**
108
+ * 最外层元素 DOM
109
+ * @en The outermost element DOM
110
+ */
111
+ dom: HTMLDivElement | null;
112
+ }
113
+ export declare function methodsGenerator<P extends ToastBaseProps>(Comp: React.FunctionComponent<P>): {
114
+ /**
115
+ * 展示常规提示框
116
+ * @desc {en} Show regular toast
117
+ * @param {string | ToastProps} config Configuration
118
+ * @returns {{ update: (config: ToastProps) => void; close: () => void }}
119
+ */
120
+ toast: (originConfig: string | Pick<P, Exclude<keyof P, "visible" | "close">>, context?: import("../context-provider").GlobalContextParams | undefined) => {
121
+ update: (newConfig: Pick<P, Exclude<keyof P, "visible" | "close">>) => void;
122
+ close: () => void;
123
+ hide: () => void;
124
+ };
125
+ /**
126
+ * 展示常规提示框,同 Toast.toast
127
+ * @desc {en} Show regular toast, the same as Toast.toast
128
+ * @param {string | ToastProps} config Configuration
129
+ * @returns {{ update: (config: ToastProps) => void; close: () => void }}
130
+ */
131
+ info: (originConfig: string | Pick<P, Exclude<keyof P, "visible" | "close">>, context?: import("../context-provider").GlobalContextParams | undefined) => {
132
+ update: (newConfig: Pick<P, Exclude<keyof P, "visible" | "close">>) => void;
133
+ close: () => void;
134
+ hide: () => void;
135
+ };
136
+ /**
137
+ * 展示成功提示框(含成功icon)
138
+ * @desc {en} Show success prompt toast (including success icon)
139
+ * @param {string | ToastProps} config Configuration
140
+ * @returns {{ update: (config: ToastProps) => void; close: () => void }}
141
+ */
142
+ success: (originConfig: string | Pick<P, Exclude<keyof P, "visible" | "close">>, context?: import("../context-provider").GlobalContextParams | undefined) => {
143
+ update: (newConfig: Pick<P, Exclude<keyof P, "visible" | "close">>) => void;
144
+ close: () => void;
145
+ hide: () => void;
146
+ };
147
+ /**
148
+ * 展示错误提示框(含错误icon)
149
+ * @desc {en} Display error prompt toast (including error icon)
150
+ * @param {string | ToastProps} config Configuration
151
+ * @returns {{ update: (config: ToastProps) => void; close: () => void }}
152
+ */
153
+ error: (originConfig: string | Pick<P, Exclude<keyof P, "visible" | "close">>, context?: import("../context-provider").GlobalContextParams | undefined) => {
154
+ update: (newConfig: Pick<P, Exclude<keyof P, "visible" | "close">>) => void;
155
+ close: () => void;
156
+ hide: () => void;
157
+ };
158
+ /**
159
+ * 展示加载中提示框(含加载中icon)
160
+ * @desc {en} Display loading prompt toast (including loading icon)
161
+ * @param {string | ToastProps} config Configuration
162
+ * @returns {{ update: (config: ToastProps) => void; close: () => void }}
163
+ */
164
+ loading: (originConfig: string | Pick<P, Exclude<keyof P, "visible" | "close">>, context?: import("../context-provider").GlobalContextParams | undefined) => {
165
+ update: (newConfig: Pick<P, Exclude<keyof P, "visible" | "close">>) => void;
166
+ close: () => void;
167
+ hide: () => void;
168
+ };
169
+ /**
170
+ * 展示警告提示框(含警告icon)
171
+ * @desc {en} Display warning prompt toast (including warning icon)
172
+ * @param {string | ToastProps} config Configuration
173
+ * @returns {{ update: (config: ToastProps) => void; close: () => void }}
174
+ */
175
+ warn: (originConfig: string | Pick<P, Exclude<keyof P, "visible" | "close">>, context?: import("../context-provider").GlobalContextParams | undefined) => {
176
+ update: (newConfig: Pick<P, Exclude<keyof P, "visible" | "close">>) => void;
177
+ close: () => void;
178
+ hide: () => void;
179
+ };
180
+ };
181
+ declare const _default: React.ForwardRefExoticComponent<ToastProps & React.RefAttributes<ToastRef>> & {
182
+ /**
183
+ * 展示常规提示框
184
+ * @desc {en} Show regular toast
185
+ * @param {string | ToastProps} config Configuration
186
+ * @returns {{ update: (config: ToastProps) => void; close: () => void }}
187
+ */
188
+ toast: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">, context?: import("../context-provider").GlobalContextParams | undefined) => {
189
+ update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => void;
190
+ close: () => void;
191
+ hide: () => void;
192
+ };
193
+ /**
194
+ * 展示常规提示框,同 Toast.toast
195
+ * @desc {en} Show regular toast, the same as Toast.toast
196
+ * @param {string | ToastProps} config Configuration
197
+ * @returns {{ update: (config: ToastProps) => void; close: () => void }}
198
+ */
199
+ info: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">, context?: import("../context-provider").GlobalContextParams | undefined) => {
200
+ update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => void;
201
+ close: () => void;
202
+ hide: () => void;
203
+ };
204
+ /**
205
+ * 展示成功提示框(含成功icon)
206
+ * @desc {en} Show success prompt toast (including success icon)
207
+ * @param {string | ToastProps} config Configuration
208
+ * @returns {{ update: (config: ToastProps) => void; close: () => void }}
209
+ */
210
+ success: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">, context?: import("../context-provider").GlobalContextParams | undefined) => {
211
+ update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => void;
212
+ close: () => void;
213
+ hide: () => void;
214
+ };
215
+ /**
216
+ * 展示错误提示框(含错误icon)
217
+ * @desc {en} Display error prompt toast (including error icon)
218
+ * @param {string | ToastProps} config Configuration
219
+ * @returns {{ update: (config: ToastProps) => void; close: () => void }}
220
+ */
221
+ error: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">, context?: import("../context-provider").GlobalContextParams | undefined) => {
222
+ update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => void;
223
+ close: () => void;
224
+ hide: () => void;
225
+ };
226
+ /**
227
+ * 展示加载中提示框(含加载中icon)
228
+ * @desc {en} Display loading prompt toast (including loading icon)
229
+ * @param {string | ToastProps} config Configuration
230
+ * @returns {{ update: (config: ToastProps) => void; close: () => void }}
231
+ */
232
+ loading: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">, context?: import("../context-provider").GlobalContextParams | undefined) => {
233
+ update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => void;
234
+ close: () => void;
235
+ hide: () => void;
236
+ };
237
+ /**
238
+ * 展示警告提示框(含警告icon)
239
+ * @desc {en} Display warning prompt toast (including warning icon)
240
+ * @param {string | ToastProps} config Configuration
241
+ * @returns {{ update: (config: ToastProps) => void; close: () => void }}
242
+ */
243
+ warn: (originConfig: string | Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">, context?: import("../context-provider").GlobalContextParams | undefined) => {
244
+ update: (newConfig: Pick<import("../context-provider").WithGlobalContext<ToastProps & React.RefAttributes<ToastRef>>, "loading" | "content" | "layout" | "icon" | "direction" | "transitionDuration" | "ref" | "key" | "type" | "context" | "duration" | "className" | "getContainer" | "onClose" | "initialBodyOverflow" | "loadingIcon" | "loadingInner" | "disableBodyTouch" | "typeIconMap">) => void;
245
+ close: () => void;
246
+ hide: () => void;
247
+ };
248
+ };
249
+ /**
250
+ * 轻提示组件,支持各个场景下调用方法。
251
+ * @en The toast component, supports calling methods in various scenarios.
252
+ * @type 反馈
253
+ * @type_en Feedback
254
+ * @name 轻提示
255
+ * @name_en Toast
256
+ */
257
+ export default _default;
@@ -0,0 +1,142 @@
1
+ import React, { useEffect, forwardRef, useRef, useImperativeHandle } from 'react';
2
+ import { cls, componentWrapper } from '@arco-design/mobile-utils';
3
+ import { ContextLayout, CompWithGlobalContext } from '../context-provider';
4
+ import Transition from '../transition';
5
+ import IconErrorCircle from '../icon/IconErrorCircle';
6
+ import IconWarnCircle from '../icon/IconWarnCircle';
7
+ import IconSuccessCircle from '../icon/IconSuccessCircle';
8
+ import Portal from '../portal';
9
+ import { toast } from './methods';
10
+ import Loading from '../loading';
11
+ import { usePreventBodyScroll } from '../_helpers';
12
+ export * from './methods';
13
+ const Toast = forwardRef((props, ref) => {
14
+ const { className, getContainer, visible = false, onClose, close, type = 'info', icon, layout = 'vertical', duration = 3000, transitionDuration = 300, content, loading = false, loadingIcon, disableBodyTouch = false, loadingInner, direction = 'center', typeIconMap, initialBodyOverflow, } = props;
15
+ const closeTimerRef = useRef();
16
+ const domRef = useRef(null);
17
+ const wrapDomRef = useRef(null);
18
+ const isInitialMount = useRef(false);
19
+ const hasType = type && type !== 'info';
20
+ useImperativeHandle(ref, () => ({
21
+ dom: domRef.current,
22
+ }));
23
+ usePreventBodyScroll(visible, disableBodyTouch, initialBodyOverflow);
24
+ function handleClose() {
25
+ if (close) {
26
+ close();
27
+ }
28
+ }
29
+ function startCloseTimer() {
30
+ if (duration) {
31
+ clearTimeout(closeTimerRef.current);
32
+ closeTimerRef.current = window.setTimeout(() => {
33
+ handleClose();
34
+ }, duration);
35
+ }
36
+ }
37
+ function handleClickMask(e) {
38
+ if (disableBodyTouch) {
39
+ e.preventDefault();
40
+ }
41
+ }
42
+ function getTypeIcons() {
43
+ const map = typeIconMap || {};
44
+ const defaultMap = {
45
+ success: React.createElement(IconSuccessCircle, null),
46
+ error: React.createElement(IconErrorCircle, null),
47
+ warn: React.createElement(IconWarnCircle, null),
48
+ };
49
+ return map[type] || defaultMap[type] || null;
50
+ }
51
+ useEffect(() => {
52
+ const mounted = isInitialMount.current;
53
+ if (visible) {
54
+ startCloseTimer();
55
+ }
56
+ else {
57
+ clearTimeout(closeTimerRef.current);
58
+ if (mounted) {
59
+ setTimeout(() => {
60
+ onClose && onClose();
61
+ }, transitionDuration);
62
+ }
63
+ }
64
+ isInitialMount.current = true;
65
+ }, [visible]);
66
+ useEffect(() => {
67
+ startCloseTimer();
68
+ }, [duration]);
69
+ function renderComponent(prefixClass) {
70
+ return (React.createElement("div", { className: cls(`${prefixClass}-wrapper`, `from-${direction}`, {
71
+ 'no-event': !disableBodyTouch,
72
+ }), onClick: handleClickMask, ref: wrapDomRef },
73
+ React.createElement("div", { className: cls(`${prefixClass}-inner`, layout, {
74
+ [`${prefixClass}-inner-mixin`]: (loading || hasType || icon) && layout === 'vertical',
75
+ }) },
76
+ loading && (React.createElement("div", { className: `${prefixClass}-loading-wrapper` },
77
+ loadingIcon !== void 0 ? (loadingIcon) : (React.createElement(Loading, { className: "loading-icon", type: "arc", stroke: 2, radius: loadingInner ? 19 : 11 })),
78
+ loadingInner ? (React.createElement("span", { className: `${prefixClass}-loading-inner` }, loadingInner)) : null)),
79
+ !loading && hasType ? getTypeIcons() : null,
80
+ !loading && !hasType && icon ? icon : null,
81
+ content ? React.createElement("div", { className: `${prefixClass}-content` }, content) : null)));
82
+ }
83
+ return (React.createElement(ContextLayout, null, ({ prefixCls }) => (React.createElement(Portal, { getContainer: getContainer },
84
+ React.createElement("div", { className: cls(`${prefixCls}-toast`, 'all-border-box', className), ref: domRef },
85
+ React.createElement(Transition, { in: visible, timeout: transitionDuration, type: "fade", nodeRef: wrapDomRef }, renderComponent(`${prefixCls}-toast`)))))));
86
+ });
87
+ export function methodsGenerator(Comp) {
88
+ return {
89
+ /**
90
+ * 展示常规提示框
91
+ * @desc {en} Show regular toast
92
+ * @param {string | ToastProps} config Configuration
93
+ * @returns {{ update: (config: ToastProps) => void; close: () => void }}
94
+ */
95
+ toast: toast(Comp),
96
+ /**
97
+ * 展示常规提示框,同 Toast.toast
98
+ * @desc {en} Show regular toast, the same as Toast.toast
99
+ * @param {string | ToastProps} config Configuration
100
+ * @returns {{ update: (config: ToastProps) => void; close: () => void }}
101
+ */
102
+ info: toast(Comp, 'info'),
103
+ /**
104
+ * 展示成功提示框(含成功icon)
105
+ * @desc {en} Show success prompt toast (including success icon)
106
+ * @param {string | ToastProps} config Configuration
107
+ * @returns {{ update: (config: ToastProps) => void; close: () => void }}
108
+ */
109
+ success: toast(Comp, 'success'),
110
+ /**
111
+ * 展示错误提示框(含错误icon)
112
+ * @desc {en} Display error prompt toast (including error icon)
113
+ * @param {string | ToastProps} config Configuration
114
+ * @returns {{ update: (config: ToastProps) => void; close: () => void }}
115
+ */
116
+ error: toast(Comp, 'error'),
117
+ /**
118
+ * 展示加载中提示框(含加载中icon)
119
+ * @desc {en} Display loading prompt toast (including loading icon)
120
+ * @param {string | ToastProps} config Configuration
121
+ * @returns {{ update: (config: ToastProps) => void; close: () => void }}
122
+ */
123
+ loading: toast(Comp, 'loading'),
124
+ /**
125
+ * 展示警告提示框(含警告icon)
126
+ * @desc {en} Display warning prompt toast (including warning icon)
127
+ * @param {string | ToastProps} config Configuration
128
+ * @returns {{ update: (config: ToastProps) => void; close: () => void }}
129
+ */
130
+ warn: toast(Comp, 'warn'),
131
+ };
132
+ }
133
+ const ToastWithGlobalContext = CompWithGlobalContext(Toast);
134
+ /**
135
+ * 轻提示组件,支持各个场景下调用方法。
136
+ * @en The toast component, supports calling methods in various scenarios.
137
+ * @type 反馈
138
+ * @type_en Feedback
139
+ * @name 轻提示
140
+ * @name_en Toast
141
+ */
142
+ export default componentWrapper(Toast, methodsGenerator(ToastWithGlobalContext));
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import { GlobalContextParams } from '../context-provider';
3
+ export interface ToastBaseProps {
4
+ getContainer?: () => HTMLElement;
5
+ onClose?: (scene?: string) => void;
6
+ content?: React.ReactNode;
7
+ visible?: boolean;
8
+ close?: (e: any) => void;
9
+ type?: string;
10
+ loading?: boolean;
11
+ }
12
+ export declare function toast<P extends ToastBaseProps>(Component: React.FunctionComponent<P>, type?: string): (originConfig: string | Pick<P, Exclude<keyof P, "visible" | "close">>, context?: GlobalContextParams | undefined) => {
13
+ update: (newConfig: Pick<P, Exclude<keyof P, "visible" | "close">>) => void;
14
+ close: () => void;
15
+ hide: () => void;
16
+ };
@@ -0,0 +1,61 @@
1
+ import { nextTick } from '@arco-design/mobile-utils';
2
+ import { ReactDOMRender } from '../_helpers/render';
3
+ export function toast(Component, type) {
4
+ return (originConfig, context) => {
5
+ const config = typeof originConfig === 'string'
6
+ ? {
7
+ content: originConfig,
8
+ type: 'info',
9
+ }
10
+ : originConfig;
11
+ if (type !== void 0) {
12
+ config.type = type;
13
+ config.loading = type === 'loading';
14
+ }
15
+ const div = document.createElement('div');
16
+ document.body.appendChild(div);
17
+ const { render, unmount } = new ReactDOMRender(Component, div, context);
18
+ function destroy() {
19
+ const { onClose } = config;
20
+ onClose && onClose();
21
+ unmount();
22
+ if (div.parentNode) {
23
+ div.parentNode.removeChild(div);
24
+ }
25
+ }
26
+ let dynamicProps = {
27
+ ...config,
28
+ close,
29
+ getContainer: () => div,
30
+ onClose: destroy,
31
+ visible: false,
32
+ };
33
+ let leaving = false;
34
+ function update(newConfig) {
35
+ dynamicProps = {
36
+ ...dynamicProps,
37
+ ...newConfig,
38
+ };
39
+ render(dynamicProps);
40
+ }
41
+ function close() {
42
+ leaving = true;
43
+ dynamicProps.visible = false;
44
+ render(dynamicProps);
45
+ }
46
+ render(dynamicProps);
47
+ nextTick(() => {
48
+ // 在即将打开时发现已经调用了close则取消打开操作
49
+ // @en When it is about to be opened, it is found that close has been called and the open operation is canceled
50
+ if (leaving)
51
+ return;
52
+ dynamicProps.visible = true;
53
+ render(dynamicProps);
54
+ });
55
+ return {
56
+ update,
57
+ close,
58
+ hide: close,
59
+ };
60
+ };
61
+ }