@arco-design/mobile-react 2.29.6 → 2.30.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (727) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.en-US.md +2 -2
  3. package/README.md +2 -2
  4. package/cjs/_helpers/hooks.d.ts +242 -2
  5. package/cjs/_helpers/hooks.js +267 -10
  6. package/cjs/_helpers/index.d.ts +78 -1
  7. package/cjs/_helpers/index.js +87 -8
  8. package/cjs/action-sheet/demo/style/css/mobile.css +514 -1
  9. package/cjs/action-sheet/demo/style/mobile.less +32 -0
  10. package/cjs/action-sheet/style/css/index.css +597 -2
  11. package/cjs/action-sheet/style/index.less +62 -0
  12. package/cjs/avatar/demo/style/css/mobile.css +518 -1
  13. package/cjs/avatar/demo/style/mobile.less +41 -1
  14. package/cjs/avatar/style/css/index.css +529 -3
  15. package/cjs/avatar/style/index.less +54 -1
  16. package/cjs/badge/demo/style/css/mobile.css +520 -1
  17. package/cjs/badge/demo/style/mobile.less +40 -0
  18. package/cjs/badge/style/css/index.css +518 -1
  19. package/cjs/badge/style/index.less +36 -0
  20. package/cjs/button/demo/style/css/mobile.css +510 -0
  21. package/cjs/button/demo/style/mobile.less +25 -0
  22. package/cjs/button/style/css/index.css +616 -39
  23. package/cjs/button/style/index.less +135 -25
  24. package/cjs/carousel/demo/style/css/mobile.css +514 -0
  25. package/cjs/carousel/demo/style/mobile.less +33 -0
  26. package/cjs/carousel/index.js +3 -1
  27. package/cjs/carousel/style/css/index.css +525 -3
  28. package/cjs/carousel/style/index.less +55 -0
  29. package/cjs/cell/demo/style/css/mobile.css +521 -0
  30. package/cjs/cell/demo/style/mobile.less +46 -0
  31. package/cjs/cell/style/css/index.css +707 -2
  32. package/cjs/cell/style/index.less +96 -0
  33. package/cjs/checkbox/demo/style/css/mobile.css +510 -0
  34. package/cjs/checkbox/demo/style/mobile.less +25 -0
  35. package/cjs/checkbox/style/css/index.css +535 -4
  36. package/cjs/checkbox/style/index.less +61 -0
  37. package/cjs/circle-progress/demo/style/css/mobile.css +510 -0
  38. package/cjs/circle-progress/demo/style/mobile.less +25 -0
  39. package/cjs/circle-progress/style/css/index.css +527 -3
  40. package/cjs/circle-progress/style/index.less +49 -0
  41. package/cjs/collapse/demo/style/css/mobile.css +510 -0
  42. package/cjs/collapse/demo/style/mobile.less +25 -0
  43. package/cjs/collapse/style/css/index.css +557 -1
  44. package/cjs/collapse/style/index.less +53 -0
  45. package/cjs/context-provider/demo/style/css/mobile.css +510 -0
  46. package/cjs/context-provider/demo/style/mobile.less +25 -0
  47. package/cjs/context-provider/index.d.ts +14 -3
  48. package/cjs/context-provider/index.js +47 -7
  49. package/cjs/count-down/demo/style/css/mobile.css +518 -2
  50. package/cjs/count-down/demo/style/mobile.less +39 -0
  51. package/cjs/count-down/style/css/index.css +513 -0
  52. package/cjs/count-down/style/index.less +30 -0
  53. package/cjs/date-picker/demo/style/css/mobile.css +510 -0
  54. package/cjs/date-picker/demo/style/mobile.less +25 -0
  55. package/cjs/date-picker/style/css/index.css +510 -0
  56. package/cjs/date-picker/style/index.less +25 -0
  57. package/cjs/dialog/demo/style/css/mobile.css +522 -2
  58. package/cjs/dialog/demo/style/mobile.less +46 -1
  59. package/cjs/dialog/style/css/index.css +645 -4
  60. package/cjs/dialog/style/index.less +102 -0
  61. package/cjs/divider/demo/style/css/mobile.css +510 -1
  62. package/cjs/divider/demo/style/mobile.less +26 -2
  63. package/cjs/divider/style/css/index.css +516 -0
  64. package/cjs/divider/style/index.less +44 -9
  65. package/cjs/dropdown/demo/style/css/mobile.css +510 -0
  66. package/cjs/dropdown/demo/style/mobile.less +25 -0
  67. package/cjs/dropdown/style/css/index.css +542 -6
  68. package/cjs/dropdown/style/index.less +69 -0
  69. package/cjs/dropdown-menu/demo/style/css/mobile.css +510 -0
  70. package/cjs/dropdown-menu/demo/style/mobile.less +25 -0
  71. package/cjs/dropdown-menu/style/css/index.css +566 -3
  72. package/cjs/dropdown-menu/style/index.less +62 -0
  73. package/cjs/ellipsis/demo/style/css/mobile.css +519 -1
  74. package/cjs/ellipsis/demo/style/mobile.less +39 -0
  75. package/cjs/ellipsis/style/css/index.css +514 -0
  76. package/cjs/ellipsis/style/index.less +32 -0
  77. package/cjs/form/form-item.js +15 -7
  78. package/cjs/form/style/css/index.css +538 -5
  79. package/cjs/form/style/index.less +66 -3
  80. package/cjs/form/type.d.ts +3 -2
  81. package/cjs/form/utils.d.ts +1 -0
  82. package/cjs/form/utils.js +6 -2
  83. package/cjs/grid/demo/style/css/mobile.css +525 -3
  84. package/cjs/grid/demo/style/mobile.less +47 -0
  85. package/cjs/grid/style/css/index.css +519 -0
  86. package/cjs/grid/style/index.less +48 -0
  87. package/cjs/image/demo/style/css/mobile.css +510 -0
  88. package/cjs/image/demo/style/mobile.less +25 -0
  89. package/cjs/image/style/css/index.css +551 -7
  90. package/cjs/image/style/index.less +54 -0
  91. package/cjs/image-picker/demo/style/css/mobile.css +510 -0
  92. package/cjs/image-picker/demo/style/mobile.less +25 -0
  93. package/cjs/image-picker/style/css/index.css +529 -4
  94. package/cjs/image-picker/style/index.less +54 -0
  95. package/cjs/image-preview/demo/style/css/mobile.css +510 -0
  96. package/cjs/image-preview/demo/style/mobile.less +25 -0
  97. package/cjs/image-preview/style/css/index.css +530 -5
  98. package/cjs/image-preview/style/index.less +37 -0
  99. package/cjs/index-bar/demo/style/css/mobile.css +510 -0
  100. package/cjs/index-bar/demo/style/mobile.less +25 -0
  101. package/cjs/index-bar/style/css/index.css +572 -8
  102. package/cjs/index-bar/style/index.less +67 -0
  103. package/cjs/input/demo/style/css/mobile.css +538 -7
  104. package/cjs/input/demo/style/mobile.less +63 -6
  105. package/cjs/input/style/css/index.css +589 -2
  106. package/cjs/input/style/index.less +87 -0
  107. package/cjs/keyboard/demo/style/css/mobile.css +516 -0
  108. package/cjs/keyboard/demo/style/mobile.less +35 -1
  109. package/cjs/keyboard/style/css/index.css +526 -2
  110. package/cjs/keyboard/style/index.less +51 -0
  111. package/cjs/load-more/demo/style/css/mobile.css +513 -0
  112. package/cjs/load-more/demo/style/mobile.less +30 -0
  113. package/cjs/load-more/style/css/index.css +513 -0
  114. package/cjs/load-more/style/index.less +30 -0
  115. package/cjs/loading/demo/style/css/mobile.css +510 -0
  116. package/cjs/loading/demo/style/mobile.less +25 -0
  117. package/cjs/loading/style/css/index.css +534 -5
  118. package/cjs/loading/style/index.less +45 -0
  119. package/cjs/masking/demo/style/css/mobile.css +514 -1
  120. package/cjs/masking/demo/style/mobile.less +30 -0
  121. package/cjs/masking/style/css/index.css +510 -0
  122. package/cjs/masking/style/index.less +25 -0
  123. package/cjs/nav-bar/demo/style/css/mobile.css +514 -1
  124. package/cjs/nav-bar/demo/style/mobile.less +33 -1
  125. package/cjs/nav-bar/style/css/index.css +550 -1
  126. package/cjs/nav-bar/style/index.less +38 -0
  127. package/cjs/notice-bar/style/css/index.css +520 -2
  128. package/cjs/notice-bar/style/index.less +36 -0
  129. package/cjs/notify/demo/style/css/mobile.css +515 -1
  130. package/cjs/notify/demo/style/mobile.less +34 -1
  131. package/cjs/notify/style/css/index.css +529 -4
  132. package/cjs/notify/style/index.less +50 -0
  133. package/cjs/pagination/demo/style/css/index.css +510 -0
  134. package/cjs/pagination/demo/style/index.less +25 -0
  135. package/cjs/pagination/style/css/index.css +543 -4
  136. package/cjs/pagination/style/index.less +72 -0
  137. package/cjs/picker/demo/style/css/mobile.css +510 -0
  138. package/cjs/picker/demo/style/mobile.less +25 -0
  139. package/cjs/picker/style/css/index.css +525 -3
  140. package/cjs/picker/style/index.less +49 -0
  141. package/cjs/picker-view/demo/style/css/mobile.css +510 -0
  142. package/cjs/picker-view/demo/style/mobile.less +25 -0
  143. package/cjs/picker-view/style/css/index.css +587 -0
  144. package/cjs/picker-view/style/index.less +50 -0
  145. package/cjs/popover/demo/style/css/mobile.css +516 -2
  146. package/cjs/popover/demo/style/mobile.less +37 -2
  147. package/cjs/popover/style/css/index.css +614 -4
  148. package/cjs/popover/style/css/menu.css +539 -1
  149. package/cjs/popover/style/index.less +126 -9
  150. package/cjs/popover/style/menu.less +69 -0
  151. package/cjs/popup/demo/style/css/mobile.css +517 -0
  152. package/cjs/popup/demo/style/mobile.less +38 -0
  153. package/cjs/popup/style/css/index.css +514 -1
  154. package/cjs/popup/style/index.less +32 -0
  155. package/cjs/popup-swiper/demo/style/css/mobile.css +517 -0
  156. package/cjs/popup-swiper/demo/style/mobile.less +38 -0
  157. package/cjs/popup-swiper/style/css/index.css +510 -0
  158. package/cjs/popup-swiper/style/index.less +25 -0
  159. package/cjs/portal/demo/style/css/mobile.css +515 -1
  160. package/cjs/portal/demo/style/mobile.less +31 -0
  161. package/cjs/progress/demo/style/css/mobile.css +510 -0
  162. package/cjs/progress/demo/style/mobile.less +25 -0
  163. package/cjs/progress/style/css/index.css +556 -8
  164. package/cjs/progress/style/index.less +91 -0
  165. package/cjs/pull-refresh/demo/style/css/mobile.css +514 -2
  166. package/cjs/pull-refresh/demo/style/mobile.less +35 -2
  167. package/cjs/pull-refresh/style/css/index.css +536 -3
  168. package/cjs/pull-refresh/style/index.less +45 -0
  169. package/cjs/radio/demo/style/css/mobile.css +513 -0
  170. package/cjs/radio/demo/style/mobile.less +32 -0
  171. package/cjs/radio/style/css/index.css +535 -4
  172. package/cjs/radio/style/index.less +61 -0
  173. package/cjs/rate/demo/style/css/mobile.css +510 -0
  174. package/cjs/rate/demo/style/mobile.less +25 -0
  175. package/cjs/rate/style/css/index.css +522 -2
  176. package/cjs/rate/style/index.less +43 -0
  177. package/cjs/search-bar/demo/style/css/mobile.css +516 -1
  178. package/cjs/search-bar/demo/style/mobile.less +39 -5
  179. package/cjs/search-bar/style/css/index.css +586 -6
  180. package/cjs/search-bar/style/index.less +84 -0
  181. package/cjs/show-monitor/demo/style/css/mobile.css +521 -2
  182. package/cjs/show-monitor/demo/style/mobile.less +43 -1
  183. package/cjs/skeleton/demo/style/css/mobile.css +510 -0
  184. package/cjs/skeleton/demo/style/mobile.less +25 -0
  185. package/cjs/skeleton/style/css/index.css +517 -1
  186. package/cjs/skeleton/style/index.less +35 -0
  187. package/cjs/slider/demo/style/css/mobile.css +514 -1
  188. package/cjs/slider/demo/style/mobile.less +34 -0
  189. package/cjs/slider/style/css/index.css +542 -5
  190. package/cjs/slider/style/index.less +74 -0
  191. package/cjs/stepper/demo/style/css/mobile.css +510 -0
  192. package/cjs/stepper/demo/style/mobile.less +25 -1
  193. package/cjs/stepper/style/css/index.css +551 -7
  194. package/cjs/stepper/style/index.less +84 -3
  195. package/cjs/steps/demo/style/css/mobile.css +544 -4
  196. package/cjs/steps/demo/style/mobile.less +41 -3
  197. package/cjs/steps/style/css/index.css +580 -9
  198. package/cjs/steps/style/index.less +138 -0
  199. package/cjs/steps/type.d.ts +1 -1
  200. package/cjs/sticky/demo/style/css/mobile.css +515 -2
  201. package/cjs/sticky/demo/style/mobile.less +34 -2
  202. package/cjs/sticky/style/css/index.css +510 -0
  203. package/cjs/sticky/style/index.less +25 -0
  204. package/cjs/swipe-action/demo/style/css/mobile.css +510 -0
  205. package/cjs/swipe-action/demo/style/mobile.less +25 -0
  206. package/cjs/swipe-action/style/css/index.css +518 -2
  207. package/cjs/swipe-action/style/index.less +43 -0
  208. package/cjs/swipe-load/demo/style/css/mobile.css +539 -5
  209. package/cjs/swipe-load/demo/style/mobile.less +64 -0
  210. package/cjs/swipe-load/style/css/index.css +517 -1
  211. package/cjs/swipe-load/style/index.less +37 -0
  212. package/cjs/switch/demo/style/css/mobile.css +515 -1
  213. package/cjs/switch/demo/style/mobile.less +35 -0
  214. package/cjs/switch/style/css/index.css +532 -4
  215. package/cjs/switch/style/index.less +59 -0
  216. package/cjs/tab-bar/demo/style/css/mobile.css +510 -0
  217. package/cjs/tab-bar/demo/style/mobile.less +25 -0
  218. package/cjs/tab-bar/style/css/index.css +517 -1
  219. package/cjs/tab-bar/style/index.less +37 -0
  220. package/cjs/tabs/demo/style/css/mobile.css +546 -5
  221. package/cjs/tabs/demo/style/mobile.less +81 -0
  222. package/cjs/tabs/style/css/index.css +618 -13
  223. package/cjs/tabs/style/index.less +123 -0
  224. package/cjs/tabs/tab-cell.js +1 -1
  225. package/cjs/tag/demo/style/css/mobile.css +510 -0
  226. package/cjs/tag/demo/style/mobile.less +25 -0
  227. package/cjs/tag/style/css/index.css +538 -10
  228. package/cjs/tag/style/index.less +55 -0
  229. package/cjs/textarea/demo/style/css/mobile.css +514 -1
  230. package/cjs/textarea/demo/style/mobile.less +32 -1
  231. package/cjs/textarea/style/css/index.css +527 -2
  232. package/cjs/textarea/style/index.less +47 -0
  233. package/cjs/toast/demo/style/css/mobile.css +510 -0
  234. package/cjs/toast/demo/style/mobile.less +25 -0
  235. package/cjs/toast/style/css/index.css +530 -5
  236. package/cjs/toast/style/index.less +37 -0
  237. package/cjs/transition/demo/style/css/mobile.css +510 -0
  238. package/cjs/transition/demo/style/mobile.less +25 -0
  239. package/cjs/transition/style/css/index.css +510 -0
  240. package/cjs/transition/style/index.less +25 -0
  241. package/dist/index.js +1104 -39
  242. package/dist/index.min.js +4 -4
  243. package/dist/style.css +28002 -211
  244. package/dist/style.min.css +1 -1
  245. package/esm/_helpers/hooks.d.ts +242 -2
  246. package/esm/_helpers/hooks.js +269 -10
  247. package/esm/_helpers/index.d.ts +78 -1
  248. package/esm/_helpers/index.js +80 -1
  249. package/esm/action-sheet/demo/style/css/mobile.css +514 -1
  250. package/esm/action-sheet/demo/style/mobile.less +32 -0
  251. package/esm/action-sheet/style/css/index.css +597 -2
  252. package/esm/action-sheet/style/index.less +62 -0
  253. package/esm/avatar/demo/style/css/mobile.css +518 -1
  254. package/esm/avatar/demo/style/mobile.less +41 -1
  255. package/esm/avatar/style/css/index.css +529 -3
  256. package/esm/avatar/style/index.less +54 -1
  257. package/esm/badge/demo/style/css/mobile.css +520 -1
  258. package/esm/badge/demo/style/mobile.less +40 -0
  259. package/esm/badge/style/css/index.css +518 -1
  260. package/esm/badge/style/index.less +36 -0
  261. package/esm/button/demo/style/css/mobile.css +510 -0
  262. package/esm/button/demo/style/mobile.less +25 -0
  263. package/esm/button/style/css/index.css +616 -39
  264. package/esm/button/style/index.less +135 -25
  265. package/esm/carousel/demo/style/css/mobile.css +514 -0
  266. package/esm/carousel/demo/style/mobile.less +33 -0
  267. package/esm/carousel/index.js +3 -1
  268. package/esm/carousel/style/css/index.css +525 -3
  269. package/esm/carousel/style/index.less +55 -0
  270. package/esm/cell/demo/style/css/mobile.css +521 -0
  271. package/esm/cell/demo/style/mobile.less +46 -0
  272. package/esm/cell/style/css/index.css +707 -2
  273. package/esm/cell/style/index.less +96 -0
  274. package/esm/checkbox/demo/style/css/mobile.css +510 -0
  275. package/esm/checkbox/demo/style/mobile.less +25 -0
  276. package/esm/checkbox/style/css/index.css +535 -4
  277. package/esm/checkbox/style/index.less +61 -0
  278. package/esm/circle-progress/demo/style/css/mobile.css +510 -0
  279. package/esm/circle-progress/demo/style/mobile.less +25 -0
  280. package/esm/circle-progress/style/css/index.css +527 -3
  281. package/esm/circle-progress/style/index.less +49 -0
  282. package/esm/collapse/demo/style/css/mobile.css +510 -0
  283. package/esm/collapse/demo/style/mobile.less +25 -0
  284. package/esm/collapse/style/css/index.css +557 -1
  285. package/esm/collapse/style/index.less +53 -0
  286. package/esm/context-provider/demo/style/css/mobile.css +510 -0
  287. package/esm/context-provider/demo/style/mobile.less +25 -0
  288. package/esm/context-provider/index.d.ts +14 -3
  289. package/esm/context-provider/index.js +48 -8
  290. package/esm/count-down/demo/style/css/mobile.css +518 -2
  291. package/esm/count-down/demo/style/mobile.less +39 -0
  292. package/esm/count-down/style/css/index.css +513 -0
  293. package/esm/count-down/style/index.less +30 -0
  294. package/esm/date-picker/demo/style/css/mobile.css +510 -0
  295. package/esm/date-picker/demo/style/mobile.less +25 -0
  296. package/esm/date-picker/style/css/index.css +510 -0
  297. package/esm/date-picker/style/index.less +25 -0
  298. package/esm/dialog/demo/style/css/mobile.css +522 -2
  299. package/esm/dialog/demo/style/mobile.less +46 -1
  300. package/esm/dialog/style/css/index.css +645 -4
  301. package/esm/dialog/style/index.less +102 -0
  302. package/esm/divider/demo/style/css/mobile.css +510 -1
  303. package/esm/divider/demo/style/mobile.less +26 -2
  304. package/esm/divider/style/css/index.css +516 -0
  305. package/esm/divider/style/index.less +44 -9
  306. package/esm/dropdown/demo/style/css/mobile.css +510 -0
  307. package/esm/dropdown/demo/style/mobile.less +25 -0
  308. package/esm/dropdown/style/css/index.css +542 -6
  309. package/esm/dropdown/style/index.less +69 -0
  310. package/esm/dropdown-menu/demo/style/css/mobile.css +510 -0
  311. package/esm/dropdown-menu/demo/style/mobile.less +25 -0
  312. package/esm/dropdown-menu/style/css/index.css +566 -3
  313. package/esm/dropdown-menu/style/index.less +62 -0
  314. package/esm/ellipsis/demo/style/css/mobile.css +519 -1
  315. package/esm/ellipsis/demo/style/mobile.less +39 -0
  316. package/esm/ellipsis/style/css/index.css +514 -0
  317. package/esm/ellipsis/style/index.less +32 -0
  318. package/esm/form/form-item.js +15 -7
  319. package/esm/form/style/css/index.css +538 -5
  320. package/esm/form/style/index.less +66 -3
  321. package/esm/form/type.d.ts +3 -2
  322. package/esm/form/utils.d.ts +1 -0
  323. package/esm/form/utils.js +6 -2
  324. package/esm/grid/demo/style/css/mobile.css +525 -3
  325. package/esm/grid/demo/style/mobile.less +47 -0
  326. package/esm/grid/style/css/index.css +519 -0
  327. package/esm/grid/style/index.less +48 -0
  328. package/esm/image/demo/style/css/mobile.css +510 -0
  329. package/esm/image/demo/style/mobile.less +25 -0
  330. package/esm/image/style/css/index.css +551 -7
  331. package/esm/image/style/index.less +54 -0
  332. package/esm/image-picker/demo/style/css/mobile.css +510 -0
  333. package/esm/image-picker/demo/style/mobile.less +25 -0
  334. package/esm/image-picker/style/css/index.css +529 -4
  335. package/esm/image-picker/style/index.less +54 -0
  336. package/esm/image-preview/demo/style/css/mobile.css +510 -0
  337. package/esm/image-preview/demo/style/mobile.less +25 -0
  338. package/esm/image-preview/style/css/index.css +530 -5
  339. package/esm/image-preview/style/index.less +37 -0
  340. package/esm/index-bar/demo/style/css/mobile.css +510 -0
  341. package/esm/index-bar/demo/style/mobile.less +25 -0
  342. package/esm/index-bar/style/css/index.css +572 -8
  343. package/esm/index-bar/style/index.less +67 -0
  344. package/esm/input/demo/style/css/mobile.css +538 -7
  345. package/esm/input/demo/style/mobile.less +63 -6
  346. package/esm/input/style/css/index.css +589 -2
  347. package/esm/input/style/index.less +87 -0
  348. package/esm/keyboard/demo/style/css/mobile.css +516 -0
  349. package/esm/keyboard/demo/style/mobile.less +35 -1
  350. package/esm/keyboard/style/css/index.css +526 -2
  351. package/esm/keyboard/style/index.less +51 -0
  352. package/esm/load-more/demo/style/css/mobile.css +513 -0
  353. package/esm/load-more/demo/style/mobile.less +30 -0
  354. package/esm/load-more/style/css/index.css +513 -0
  355. package/esm/load-more/style/index.less +30 -0
  356. package/esm/loading/demo/style/css/mobile.css +510 -0
  357. package/esm/loading/demo/style/mobile.less +25 -0
  358. package/esm/loading/style/css/index.css +534 -5
  359. package/esm/loading/style/index.less +45 -0
  360. package/esm/masking/demo/style/css/mobile.css +514 -1
  361. package/esm/masking/demo/style/mobile.less +30 -0
  362. package/esm/masking/style/css/index.css +510 -0
  363. package/esm/masking/style/index.less +25 -0
  364. package/esm/nav-bar/demo/style/css/mobile.css +514 -1
  365. package/esm/nav-bar/demo/style/mobile.less +33 -1
  366. package/esm/nav-bar/style/css/index.css +550 -1
  367. package/esm/nav-bar/style/index.less +38 -0
  368. package/esm/notice-bar/style/css/index.css +520 -2
  369. package/esm/notice-bar/style/index.less +36 -0
  370. package/esm/notify/demo/style/css/mobile.css +515 -1
  371. package/esm/notify/demo/style/mobile.less +34 -1
  372. package/esm/notify/style/css/index.css +529 -4
  373. package/esm/notify/style/index.less +50 -0
  374. package/esm/pagination/demo/style/css/index.css +510 -0
  375. package/esm/pagination/demo/style/index.less +25 -0
  376. package/esm/pagination/style/css/index.css +543 -4
  377. package/esm/pagination/style/index.less +72 -0
  378. package/esm/picker/demo/style/css/mobile.css +510 -0
  379. package/esm/picker/demo/style/mobile.less +25 -0
  380. package/esm/picker/style/css/index.css +525 -3
  381. package/esm/picker/style/index.less +49 -0
  382. package/esm/picker-view/demo/style/css/mobile.css +510 -0
  383. package/esm/picker-view/demo/style/mobile.less +25 -0
  384. package/esm/picker-view/style/css/index.css +587 -0
  385. package/esm/picker-view/style/index.less +50 -0
  386. package/esm/popover/demo/style/css/mobile.css +516 -2
  387. package/esm/popover/demo/style/mobile.less +37 -2
  388. package/esm/popover/style/css/index.css +614 -4
  389. package/esm/popover/style/css/menu.css +539 -1
  390. package/esm/popover/style/index.less +126 -9
  391. package/esm/popover/style/menu.less +69 -0
  392. package/esm/popup/demo/style/css/mobile.css +517 -0
  393. package/esm/popup/demo/style/mobile.less +38 -0
  394. package/esm/popup/style/css/index.css +514 -1
  395. package/esm/popup/style/index.less +32 -0
  396. package/esm/popup-swiper/demo/style/css/mobile.css +517 -0
  397. package/esm/popup-swiper/demo/style/mobile.less +38 -0
  398. package/esm/popup-swiper/style/css/index.css +510 -0
  399. package/esm/popup-swiper/style/index.less +25 -0
  400. package/esm/portal/demo/style/css/mobile.css +515 -1
  401. package/esm/portal/demo/style/mobile.less +31 -0
  402. package/esm/progress/demo/style/css/mobile.css +510 -0
  403. package/esm/progress/demo/style/mobile.less +25 -0
  404. package/esm/progress/style/css/index.css +556 -8
  405. package/esm/progress/style/index.less +91 -0
  406. package/esm/pull-refresh/demo/style/css/mobile.css +514 -2
  407. package/esm/pull-refresh/demo/style/mobile.less +35 -2
  408. package/esm/pull-refresh/style/css/index.css +536 -3
  409. package/esm/pull-refresh/style/index.less +45 -0
  410. package/esm/radio/demo/style/css/mobile.css +513 -0
  411. package/esm/radio/demo/style/mobile.less +32 -0
  412. package/esm/radio/style/css/index.css +535 -4
  413. package/esm/radio/style/index.less +61 -0
  414. package/esm/rate/demo/style/css/mobile.css +510 -0
  415. package/esm/rate/demo/style/mobile.less +25 -0
  416. package/esm/rate/style/css/index.css +522 -2
  417. package/esm/rate/style/index.less +43 -0
  418. package/esm/search-bar/demo/style/css/mobile.css +516 -1
  419. package/esm/search-bar/demo/style/mobile.less +39 -5
  420. package/esm/search-bar/style/css/index.css +586 -6
  421. package/esm/search-bar/style/index.less +84 -0
  422. package/esm/show-monitor/demo/style/css/mobile.css +521 -2
  423. package/esm/show-monitor/demo/style/mobile.less +43 -1
  424. package/esm/skeleton/demo/style/css/mobile.css +510 -0
  425. package/esm/skeleton/demo/style/mobile.less +25 -0
  426. package/esm/skeleton/style/css/index.css +517 -1
  427. package/esm/skeleton/style/index.less +35 -0
  428. package/esm/slider/demo/style/css/mobile.css +514 -1
  429. package/esm/slider/demo/style/mobile.less +34 -0
  430. package/esm/slider/style/css/index.css +542 -5
  431. package/esm/slider/style/index.less +74 -0
  432. package/esm/stepper/demo/style/css/mobile.css +510 -0
  433. package/esm/stepper/demo/style/mobile.less +25 -1
  434. package/esm/stepper/style/css/index.css +551 -7
  435. package/esm/stepper/style/index.less +84 -3
  436. package/esm/steps/demo/style/css/mobile.css +544 -4
  437. package/esm/steps/demo/style/mobile.less +41 -3
  438. package/esm/steps/style/css/index.css +580 -9
  439. package/esm/steps/style/index.less +138 -0
  440. package/esm/steps/type.d.ts +1 -1
  441. package/esm/sticky/demo/style/css/mobile.css +515 -2
  442. package/esm/sticky/demo/style/mobile.less +34 -2
  443. package/esm/sticky/style/css/index.css +510 -0
  444. package/esm/sticky/style/index.less +25 -0
  445. package/esm/swipe-action/demo/style/css/mobile.css +510 -0
  446. package/esm/swipe-action/demo/style/mobile.less +25 -0
  447. package/esm/swipe-action/style/css/index.css +518 -2
  448. package/esm/swipe-action/style/index.less +43 -0
  449. package/esm/swipe-load/demo/style/css/mobile.css +539 -5
  450. package/esm/swipe-load/demo/style/mobile.less +64 -0
  451. package/esm/swipe-load/style/css/index.css +517 -1
  452. package/esm/swipe-load/style/index.less +37 -0
  453. package/esm/switch/demo/style/css/mobile.css +515 -1
  454. package/esm/switch/demo/style/mobile.less +35 -0
  455. package/esm/switch/style/css/index.css +532 -4
  456. package/esm/switch/style/index.less +59 -0
  457. package/esm/tab-bar/demo/style/css/mobile.css +510 -0
  458. package/esm/tab-bar/demo/style/mobile.less +25 -0
  459. package/esm/tab-bar/style/css/index.css +517 -1
  460. package/esm/tab-bar/style/index.less +37 -0
  461. package/esm/tabs/demo/style/css/mobile.css +546 -5
  462. package/esm/tabs/demo/style/mobile.less +81 -0
  463. package/esm/tabs/style/css/index.css +618 -13
  464. package/esm/tabs/style/index.less +123 -0
  465. package/esm/tabs/tab-cell.js +1 -1
  466. package/esm/tag/demo/style/css/mobile.css +510 -0
  467. package/esm/tag/demo/style/mobile.less +25 -0
  468. package/esm/tag/style/css/index.css +538 -10
  469. package/esm/tag/style/index.less +55 -0
  470. package/esm/textarea/demo/style/css/mobile.css +514 -1
  471. package/esm/textarea/demo/style/mobile.less +32 -1
  472. package/esm/textarea/style/css/index.css +527 -2
  473. package/esm/textarea/style/index.less +47 -0
  474. package/esm/toast/demo/style/css/mobile.css +510 -0
  475. package/esm/toast/demo/style/mobile.less +25 -0
  476. package/esm/toast/style/css/index.css +530 -5
  477. package/esm/toast/style/index.less +37 -0
  478. package/esm/transition/demo/style/css/mobile.css +510 -0
  479. package/esm/transition/demo/style/mobile.less +25 -0
  480. package/esm/transition/style/css/index.css +510 -0
  481. package/esm/transition/style/index.less +25 -0
  482. package/less-loader.config.js +6 -0
  483. package/package.json +3 -3
  484. package/style/css/public.css +510 -0
  485. package/tokens/app/arcodesign/default/css-variables.less +355 -101
  486. package/tokens/app/arcodesign/default/index.d.ts +257 -3
  487. package/tokens/app/arcodesign/default/index.js +355 -101
  488. package/tokens/app/arcodesign/default/index.json +2418 -370
  489. package/tokens/app/arcodesign/default/index.less +355 -101
  490. package/tokens/mixin/index.less +255 -1
  491. package/umd/_helpers/hooks.d.ts +242 -2
  492. package/umd/_helpers/hooks.js +267 -10
  493. package/umd/_helpers/index.d.ts +78 -1
  494. package/umd/_helpers/index.js +89 -10
  495. package/umd/action-sheet/demo/style/css/mobile.css +514 -1
  496. package/umd/action-sheet/demo/style/mobile.less +32 -0
  497. package/umd/action-sheet/style/css/index.css +597 -2
  498. package/umd/action-sheet/style/index.less +62 -0
  499. package/umd/avatar/demo/style/css/mobile.css +518 -1
  500. package/umd/avatar/demo/style/mobile.less +41 -1
  501. package/umd/avatar/style/css/index.css +529 -3
  502. package/umd/avatar/style/index.less +54 -1
  503. package/umd/badge/demo/style/css/mobile.css +520 -1
  504. package/umd/badge/demo/style/mobile.less +40 -0
  505. package/umd/badge/style/css/index.css +518 -1
  506. package/umd/badge/style/index.less +36 -0
  507. package/umd/button/demo/style/css/mobile.css +510 -0
  508. package/umd/button/demo/style/mobile.less +25 -0
  509. package/umd/button/style/css/index.css +616 -39
  510. package/umd/button/style/index.less +135 -25
  511. package/umd/carousel/demo/style/css/mobile.css +514 -0
  512. package/umd/carousel/demo/style/mobile.less +33 -0
  513. package/umd/carousel/index.js +3 -1
  514. package/umd/carousel/style/css/index.css +525 -3
  515. package/umd/carousel/style/index.less +55 -0
  516. package/umd/cell/demo/style/css/mobile.css +521 -0
  517. package/umd/cell/demo/style/mobile.less +46 -0
  518. package/umd/cell/style/css/index.css +707 -2
  519. package/umd/cell/style/index.less +96 -0
  520. package/umd/checkbox/demo/style/css/mobile.css +510 -0
  521. package/umd/checkbox/demo/style/mobile.less +25 -0
  522. package/umd/checkbox/style/css/index.css +535 -4
  523. package/umd/checkbox/style/index.less +61 -0
  524. package/umd/circle-progress/demo/style/css/mobile.css +510 -0
  525. package/umd/circle-progress/demo/style/mobile.less +25 -0
  526. package/umd/circle-progress/style/css/index.css +527 -3
  527. package/umd/circle-progress/style/index.less +49 -0
  528. package/umd/collapse/demo/style/css/mobile.css +510 -0
  529. package/umd/collapse/demo/style/mobile.less +25 -0
  530. package/umd/collapse/style/css/index.css +557 -1
  531. package/umd/collapse/style/index.less +53 -0
  532. package/umd/context-provider/demo/style/css/mobile.css +510 -0
  533. package/umd/context-provider/demo/style/mobile.less +25 -0
  534. package/umd/context-provider/index.d.ts +14 -3
  535. package/umd/context-provider/index.js +47 -7
  536. package/umd/count-down/demo/style/css/mobile.css +518 -2
  537. package/umd/count-down/demo/style/mobile.less +39 -0
  538. package/umd/count-down/style/css/index.css +513 -0
  539. package/umd/count-down/style/index.less +30 -0
  540. package/umd/date-picker/demo/style/css/mobile.css +510 -0
  541. package/umd/date-picker/demo/style/mobile.less +25 -0
  542. package/umd/date-picker/style/css/index.css +510 -0
  543. package/umd/date-picker/style/index.less +25 -0
  544. package/umd/dialog/demo/style/css/mobile.css +522 -2
  545. package/umd/dialog/demo/style/mobile.less +46 -1
  546. package/umd/dialog/style/css/index.css +645 -4
  547. package/umd/dialog/style/index.less +102 -0
  548. package/umd/divider/demo/style/css/mobile.css +510 -1
  549. package/umd/divider/demo/style/mobile.less +26 -2
  550. package/umd/divider/style/css/index.css +516 -0
  551. package/umd/divider/style/index.less +44 -9
  552. package/umd/dropdown/demo/style/css/mobile.css +510 -0
  553. package/umd/dropdown/demo/style/mobile.less +25 -0
  554. package/umd/dropdown/style/css/index.css +542 -6
  555. package/umd/dropdown/style/index.less +69 -0
  556. package/umd/dropdown-menu/demo/style/css/mobile.css +510 -0
  557. package/umd/dropdown-menu/demo/style/mobile.less +25 -0
  558. package/umd/dropdown-menu/style/css/index.css +566 -3
  559. package/umd/dropdown-menu/style/index.less +62 -0
  560. package/umd/ellipsis/demo/style/css/mobile.css +519 -1
  561. package/umd/ellipsis/demo/style/mobile.less +39 -0
  562. package/umd/ellipsis/style/css/index.css +514 -0
  563. package/umd/ellipsis/style/index.less +32 -0
  564. package/umd/form/form-item.js +15 -7
  565. package/umd/form/style/css/index.css +538 -5
  566. package/umd/form/style/index.less +66 -3
  567. package/umd/form/type.d.ts +3 -2
  568. package/umd/form/utils.d.ts +1 -0
  569. package/umd/form/utils.js +6 -2
  570. package/umd/grid/demo/style/css/mobile.css +525 -3
  571. package/umd/grid/demo/style/mobile.less +47 -0
  572. package/umd/grid/style/css/index.css +519 -0
  573. package/umd/grid/style/index.less +48 -0
  574. package/umd/image/demo/style/css/mobile.css +510 -0
  575. package/umd/image/demo/style/mobile.less +25 -0
  576. package/umd/image/style/css/index.css +551 -7
  577. package/umd/image/style/index.less +54 -0
  578. package/umd/image-picker/demo/style/css/mobile.css +510 -0
  579. package/umd/image-picker/demo/style/mobile.less +25 -0
  580. package/umd/image-picker/style/css/index.css +529 -4
  581. package/umd/image-picker/style/index.less +54 -0
  582. package/umd/image-preview/demo/style/css/mobile.css +510 -0
  583. package/umd/image-preview/demo/style/mobile.less +25 -0
  584. package/umd/image-preview/style/css/index.css +530 -5
  585. package/umd/image-preview/style/index.less +37 -0
  586. package/umd/index-bar/demo/style/css/mobile.css +510 -0
  587. package/umd/index-bar/demo/style/mobile.less +25 -0
  588. package/umd/index-bar/style/css/index.css +572 -8
  589. package/umd/index-bar/style/index.less +67 -0
  590. package/umd/input/demo/style/css/mobile.css +538 -7
  591. package/umd/input/demo/style/mobile.less +63 -6
  592. package/umd/input/style/css/index.css +589 -2
  593. package/umd/input/style/index.less +87 -0
  594. package/umd/keyboard/demo/style/css/mobile.css +516 -0
  595. package/umd/keyboard/demo/style/mobile.less +35 -1
  596. package/umd/keyboard/style/css/index.css +526 -2
  597. package/umd/keyboard/style/index.less +51 -0
  598. package/umd/load-more/demo/style/css/mobile.css +513 -0
  599. package/umd/load-more/demo/style/mobile.less +30 -0
  600. package/umd/load-more/style/css/index.css +513 -0
  601. package/umd/load-more/style/index.less +30 -0
  602. package/umd/loading/demo/style/css/mobile.css +510 -0
  603. package/umd/loading/demo/style/mobile.less +25 -0
  604. package/umd/loading/style/css/index.css +534 -5
  605. package/umd/loading/style/index.less +45 -0
  606. package/umd/masking/demo/style/css/mobile.css +514 -1
  607. package/umd/masking/demo/style/mobile.less +30 -0
  608. package/umd/masking/style/css/index.css +510 -0
  609. package/umd/masking/style/index.less +25 -0
  610. package/umd/nav-bar/demo/style/css/mobile.css +514 -1
  611. package/umd/nav-bar/demo/style/mobile.less +33 -1
  612. package/umd/nav-bar/style/css/index.css +550 -1
  613. package/umd/nav-bar/style/index.less +38 -0
  614. package/umd/notice-bar/style/css/index.css +520 -2
  615. package/umd/notice-bar/style/index.less +36 -0
  616. package/umd/notify/demo/style/css/mobile.css +515 -1
  617. package/umd/notify/demo/style/mobile.less +34 -1
  618. package/umd/notify/style/css/index.css +529 -4
  619. package/umd/notify/style/index.less +50 -0
  620. package/umd/pagination/demo/style/css/index.css +510 -0
  621. package/umd/pagination/demo/style/index.less +25 -0
  622. package/umd/pagination/style/css/index.css +543 -4
  623. package/umd/pagination/style/index.less +72 -0
  624. package/umd/picker/demo/style/css/mobile.css +510 -0
  625. package/umd/picker/demo/style/mobile.less +25 -0
  626. package/umd/picker/style/css/index.css +525 -3
  627. package/umd/picker/style/index.less +49 -0
  628. package/umd/picker-view/demo/style/css/mobile.css +510 -0
  629. package/umd/picker-view/demo/style/mobile.less +25 -0
  630. package/umd/picker-view/style/css/index.css +587 -0
  631. package/umd/picker-view/style/index.less +50 -0
  632. package/umd/popover/demo/style/css/mobile.css +516 -2
  633. package/umd/popover/demo/style/mobile.less +37 -2
  634. package/umd/popover/style/css/index.css +614 -4
  635. package/umd/popover/style/css/menu.css +539 -1
  636. package/umd/popover/style/index.less +126 -9
  637. package/umd/popover/style/menu.less +69 -0
  638. package/umd/popup/demo/style/css/mobile.css +517 -0
  639. package/umd/popup/demo/style/mobile.less +38 -0
  640. package/umd/popup/style/css/index.css +514 -1
  641. package/umd/popup/style/index.less +32 -0
  642. package/umd/popup-swiper/demo/style/css/mobile.css +517 -0
  643. package/umd/popup-swiper/demo/style/mobile.less +38 -0
  644. package/umd/popup-swiper/style/css/index.css +510 -0
  645. package/umd/popup-swiper/style/index.less +25 -0
  646. package/umd/portal/demo/style/css/mobile.css +515 -1
  647. package/umd/portal/demo/style/mobile.less +31 -0
  648. package/umd/progress/demo/style/css/mobile.css +510 -0
  649. package/umd/progress/demo/style/mobile.less +25 -0
  650. package/umd/progress/style/css/index.css +556 -8
  651. package/umd/progress/style/index.less +91 -0
  652. package/umd/pull-refresh/demo/style/css/mobile.css +514 -2
  653. package/umd/pull-refresh/demo/style/mobile.less +35 -2
  654. package/umd/pull-refresh/style/css/index.css +536 -3
  655. package/umd/pull-refresh/style/index.less +45 -0
  656. package/umd/radio/demo/style/css/mobile.css +513 -0
  657. package/umd/radio/demo/style/mobile.less +32 -0
  658. package/umd/radio/style/css/index.css +535 -4
  659. package/umd/radio/style/index.less +61 -0
  660. package/umd/rate/demo/style/css/mobile.css +510 -0
  661. package/umd/rate/demo/style/mobile.less +25 -0
  662. package/umd/rate/style/css/index.css +522 -2
  663. package/umd/rate/style/index.less +43 -0
  664. package/umd/search-bar/demo/style/css/mobile.css +516 -1
  665. package/umd/search-bar/demo/style/mobile.less +39 -5
  666. package/umd/search-bar/style/css/index.css +586 -6
  667. package/umd/search-bar/style/index.less +84 -0
  668. package/umd/show-monitor/demo/style/css/mobile.css +521 -2
  669. package/umd/show-monitor/demo/style/mobile.less +43 -1
  670. package/umd/skeleton/demo/style/css/mobile.css +510 -0
  671. package/umd/skeleton/demo/style/mobile.less +25 -0
  672. package/umd/skeleton/style/css/index.css +517 -1
  673. package/umd/skeleton/style/index.less +35 -0
  674. package/umd/slider/demo/style/css/mobile.css +514 -1
  675. package/umd/slider/demo/style/mobile.less +34 -0
  676. package/umd/slider/style/css/index.css +542 -5
  677. package/umd/slider/style/index.less +74 -0
  678. package/umd/stepper/demo/style/css/mobile.css +510 -0
  679. package/umd/stepper/demo/style/mobile.less +25 -1
  680. package/umd/stepper/style/css/index.css +551 -7
  681. package/umd/stepper/style/index.less +84 -3
  682. package/umd/steps/demo/style/css/mobile.css +544 -4
  683. package/umd/steps/demo/style/mobile.less +41 -3
  684. package/umd/steps/style/css/index.css +580 -9
  685. package/umd/steps/style/index.less +138 -0
  686. package/umd/steps/type.d.ts +1 -1
  687. package/umd/sticky/demo/style/css/mobile.css +515 -2
  688. package/umd/sticky/demo/style/mobile.less +34 -2
  689. package/umd/sticky/style/css/index.css +510 -0
  690. package/umd/sticky/style/index.less +25 -0
  691. package/umd/swipe-action/demo/style/css/mobile.css +510 -0
  692. package/umd/swipe-action/demo/style/mobile.less +25 -0
  693. package/umd/swipe-action/style/css/index.css +518 -2
  694. package/umd/swipe-action/style/index.less +43 -0
  695. package/umd/swipe-load/demo/style/css/mobile.css +539 -5
  696. package/umd/swipe-load/demo/style/mobile.less +64 -0
  697. package/umd/swipe-load/style/css/index.css +517 -1
  698. package/umd/swipe-load/style/index.less +37 -0
  699. package/umd/switch/demo/style/css/mobile.css +515 -1
  700. package/umd/switch/demo/style/mobile.less +35 -0
  701. package/umd/switch/style/css/index.css +532 -4
  702. package/umd/switch/style/index.less +59 -0
  703. package/umd/tab-bar/demo/style/css/mobile.css +510 -0
  704. package/umd/tab-bar/demo/style/mobile.less +25 -0
  705. package/umd/tab-bar/style/css/index.css +517 -1
  706. package/umd/tab-bar/style/index.less +37 -0
  707. package/umd/tabs/demo/style/css/mobile.css +546 -5
  708. package/umd/tabs/demo/style/mobile.less +81 -0
  709. package/umd/tabs/style/css/index.css +618 -13
  710. package/umd/tabs/style/index.less +123 -0
  711. package/umd/tabs/tab-cell.js +1 -1
  712. package/umd/tag/demo/style/css/mobile.css +510 -0
  713. package/umd/tag/demo/style/mobile.less +25 -0
  714. package/umd/tag/style/css/index.css +538 -10
  715. package/umd/tag/style/index.less +55 -0
  716. package/umd/textarea/demo/style/css/mobile.css +514 -1
  717. package/umd/textarea/demo/style/mobile.less +32 -1
  718. package/umd/textarea/style/css/index.css +527 -2
  719. package/umd/textarea/style/index.less +47 -0
  720. package/umd/toast/demo/style/css/mobile.css +510 -0
  721. package/umd/toast/demo/style/mobile.less +25 -0
  722. package/umd/toast/style/css/index.css +530 -5
  723. package/umd/toast/style/index.less +37 -0
  724. package/umd/transition/demo/style/css/mobile.css +510 -0
  725. package/umd/transition/demo/style/mobile.less +25 -0
  726. package/umd/transition/style/css/index.css +510 -0
  727. package/umd/transition/style/index.less +25 -0
@@ -27,9 +27,26 @@ var _contextProvider = require("../context-provider");
27
27
 
28
28
  /**
29
29
  * @type hooks
30
- * @name 公共hooks
30
+ * @name GeneralHooks
31
31
  * @name_en General Hooks
32
32
  */
33
+
34
+ /**
35
+ * 监听页面resize事件的统一封装
36
+ * @desc {en} Unified encapsulation for monitoring page resize events
37
+ * @param resizeHandler resize事件回调
38
+ * @param resizeHandler {en} Resize event callback
39
+ * @param deps 触发事件绑定更新的依赖
40
+ * @param deps {en} Dependencies that trigger event binding updates
41
+ * @param needListen 是否开启事件监听,默认开启
42
+ * @param needListen {en} Whether to enable event monitoring
43
+ * @example
44
+ * ```
45
+ * import { useListenResize } from '@arco-design/mobile-react/esm/_helpers/hooks';
46
+ *
47
+ * useListenResize(setSize, [], listenResize);
48
+ * ```
49
+ */
33
50
  function useListenResize(resizeHandler, deps, needListen) {
34
51
  if (deps === void 0) {
35
52
  deps = [];
@@ -40,15 +57,16 @@ function useListenResize(resizeHandler, deps, needListen) {
40
57
  }
41
58
 
42
59
  (0, _react.useEffect)(function () {
43
- if (!needListen) {
44
- return function () {};
60
+ if (needListen) {
61
+ window.addEventListener('resize', resizeHandler);
62
+ window.addEventListener('orientationchange', resizeHandler);
45
63
  }
46
64
 
47
- window.addEventListener('resize', resizeHandler);
48
- window.addEventListener('orientationchange', resizeHandler);
49
65
  return function () {
50
- window.removeEventListener('resize', resizeHandler);
51
- window.removeEventListener('orientationchange', resizeHandler);
66
+ if (needListen) {
67
+ window.removeEventListener('resize', resizeHandler);
68
+ window.removeEventListener('orientationchange', resizeHandler);
69
+ }
52
70
  };
53
71
  }, [].concat(deps, [needListen]));
54
72
  }
@@ -59,6 +77,7 @@ function useListenResize(resizeHandler, deps, needListen) {
59
77
  * @desc {en} Tips: Use in scenarios where asynchronous processing is not completed after unmount. It is not recommended to replace useState without brains
60
78
  * @param initialState 初始状态
61
79
  * @param initialState {en} Initial State
80
+ * @returns [state, setState],同useState返回值
62
81
  * @example
63
82
  * ```
64
83
  * import { useMountedState } from '@arco-design/mobile-react/esm/_helpers/hooks';
@@ -89,6 +108,20 @@ function useMountedState(initialState) {
89
108
  var result = [state, setValidState];
90
109
  return result;
91
110
  }
111
+ /**
112
+ * 用useState管理状态,且在状态更新之前同步至ref,并返回ref
113
+ * @desc {en} Use useState to manage the state, and synchronize to ref before the state is updated, and return ref
114
+ * @param initialValue 初始状态
115
+ * @param initialValue {en} Initial State
116
+ * @returns [state, stateRef, setState]
117
+ * @example
118
+ * ```
119
+ * import { useSameRefState } from '@arco-design/mobile-react/esm/_helpers/hooks';
120
+ *
121
+ * const [opened, openedRef, setOpened] = useSameRefState(false);
122
+ * ```
123
+ */
124
+
92
125
 
93
126
  function useSameRefState(initialValue) {
94
127
  var _useState2 = (0, _react.useState)(initialValue),
@@ -104,6 +137,20 @@ function useSameRefState(initialValue) {
104
137
 
105
138
  return [state, stateRef, setStateProxy];
106
139
  }
140
+ /**
141
+ * 用useState管理状态,且在状态更新后同步至ref,并返回ref
142
+ * @desc {en} Use useState to manage the state, and synchronize to ref after the state is updated, and return ref
143
+ * @param initialValue 初始状态
144
+ * @param initialValue {en} Initial State
145
+ * @returns [state, stateRef, setState]
146
+ * @example
147
+ * ```
148
+ * import { useRefState } from '@arco-design/mobile-react/esm/_helpers/hooks';
149
+ *
150
+ * const [index, indexRef, setIndex] = useRefState(currentIndex);
151
+ * ```
152
+ */
153
+
107
154
 
108
155
  function useRefState(initialValue) {
109
156
  var _useState3 = (0, _react.useState)(initialValue),
@@ -116,6 +163,20 @@ function useRefState(initialValue) {
116
163
  }, [state]);
117
164
  return [state, stateRef, setState];
118
165
  }
166
+ /**
167
+ * 用useState管理状态,且在状态更新后同步至ref,并返回ref,统一处理在组件卸载后还使用setState的行为
168
+ * @desc {en} Use useState to manage the state, and synchronize to ref after the state is updated, and return ref, and uniformly handle the behavior of using setState after the component is uninstalled
169
+ * @param initialValue 初始状态
170
+ * @param initialValue {en} Initial State
171
+ * @returns [state, stateRef, setState]
172
+ * @example
173
+ * ```
174
+ * import { useRefMountedState } from '@arco-design/mobile-react/esm/_helpers/hooks';
175
+ *
176
+ * const [active, activeRef, setActive] = useRefMountedState(false);
177
+ * ```
178
+ */
179
+
119
180
 
120
181
  function useRefMountedState(initialValue) {
121
182
  var _useMountedState = useMountedState(initialValue),
@@ -128,6 +189,23 @@ function useRefMountedState(initialValue) {
128
189
  }, [state]);
129
190
  return [state, stateRef, setState];
130
191
  }
192
+ /**
193
+ * useEffect特殊封装,仅在非首次依赖更新时触发回调
194
+ * @desc {en} Special encapsulation of useEffect, which only triggers the callback when the dependency is not updated for the first time
195
+ * @param effect useEffect回调
196
+ * @param effect {en} useEffect callback
197
+ * @param dependencies useEffect依赖
198
+ * @param dependencies {en} useEffect dependencies
199
+ * @example
200
+ * ```
201
+ * import { useUpdateEffect } from '@arco-design/mobile-react/esm/_helpers/hooks';
202
+ *
203
+ * useUpdateEffect(() => {
204
+ * handleIndexChange(index);
205
+ * }, [index]);
206
+ * ```
207
+ */
208
+
131
209
 
132
210
  function useUpdateEffect(effect, dependencies) {
133
211
  if (dependencies === void 0) {
@@ -143,6 +221,21 @@ function useUpdateEffect(effect, dependencies) {
143
221
  }
144
222
  }, dependencies);
145
223
  }
224
+ /**
225
+ * 手动触发一次组件的rerender
226
+ * @desc {en} Manually trigger the rerender of the component once
227
+ * @example
228
+ * ```
229
+ * import { useForceUpdate } from '@arco-design/mobile-react/esm/_helpers/hooks';
230
+ *
231
+ * const update = useForceUpdate();
232
+ *
233
+ * function forceUpdate() {
234
+ * update();
235
+ * }
236
+ * ```
237
+ */
238
+
146
239
 
147
240
  function useForceUpdate() {
148
241
  var _useState4 = (0, _react.useState)(0),
@@ -155,6 +248,21 @@ function useForceUpdate() {
155
248
  }, []);
156
249
  return update;
157
250
  }
251
+ /**
252
+ * 获取任意变量的最新ref值(用于监听属性、方法等非state变量)
253
+ * @desc {en} Get the latest ref value of any variable (used to monitor non-state variables such as properties and methods)
254
+ * @param variable 待获取最新值的变量
255
+ * @param variable {en} Variable to get latest value
256
+ * @returns variableRef,变量的最新ref值
257
+ * @example
258
+ * ```
259
+ * import { useLatestRef } from '@arco-design/mobile-react/esm/_helpers/hooks';
260
+ *
261
+ * const { wrapSize } = props;
262
+ * const wrapSizeRef = useLatestRef(wrapSize);
263
+ * ```
264
+ */
265
+
158
266
 
159
267
  function useLatestRef(variable) {
160
268
  var variableRef = (0, _react.useRef)(variable);
@@ -163,6 +271,18 @@ function useLatestRef(variable) {
163
271
  }, [variable]);
164
272
  return variableRef;
165
273
  }
274
+ /**
275
+ * 从navigator.userAgent中获取当前操作系统,如果无法获取ua,则从ContextProvider传入的system中获取值
276
+ * @desc {en} Get the current operating system from navigator.userAgent, if ua cannot be obtained, get the value from the system passed in by ContextProvider
277
+ * @returns system 操作系统,"" | "pc" | "android" | "ios"
278
+ * @example
279
+ * ```
280
+ * import { useSystem } from '@arco-design/mobile-react/esm/_helpers/hooks';
281
+ *
282
+ * const system = useSystem();
283
+ * ```
284
+ */
285
+
166
286
 
167
287
  function useSystem() {
168
288
  var _useContext = (0, _react.useContext)(_contextProvider.GlobalContext),
@@ -179,13 +299,27 @@ function useSystem() {
179
299
  }, [currentSystem]);
180
300
  return system;
181
301
  }
302
+ /**
303
+ * 获取页面视口宽高大小,并在页面有resize时更新大小
304
+ * @desc {en} Get the width and height of the page viewport, and update the size when the page is resized
305
+ * @param needListen 是否开启resize事件监听
306
+ * @param needListen {en} Whether to enable resize event monitoring
307
+ * @returns 页面宽高,{ windowWidth, windowHeight }
308
+ * @example
309
+ * ```
310
+ * import { useWindowSize } from '@arco-design/mobile-react/esm/_helpers/hooks';
311
+ *
312
+ * const { windowHeight, windowWidth } = useWindowSize();
313
+ * ```
314
+ */
315
+
182
316
 
183
317
  function useWindowSize(listenResize) {
184
- var _useState6 = (0, _react.useState)(0),
318
+ var _useState6 = (0, _react.useState)(typeof window !== 'undefined' ? window.innerWidth : 0),
185
319
  windowWidth = _useState6[0],
186
320
  setWindowWidth = _useState6[1];
187
321
 
188
- var _useState7 = (0, _react.useState)(0),
322
+ var _useState7 = (0, _react.useState)(typeof window !== 'undefined' ? window.innerHeight : 0),
189
323
  windowHeight = _useState7[0],
190
324
  setWindowHeight = _useState7[1];
191
325
 
@@ -204,7 +338,30 @@ function useWindowSize(listenResize) {
204
338
  };
205
339
  }
206
340
 
207
- /* eslint-disable max-lines-per-function */
341
+ /**
342
+ * 弹窗中滚动统一处理,防止滚动穿透
343
+ * @desc {en} Unified processing of scrolling in pop-up windows to prevent scrolling penetration
344
+ * @param visible 弹窗是否被打开
345
+ * @param visible {en} Whether the popup is opened
346
+ * @param popupDom 弹窗的dom元素
347
+ * @param popupDom {en} DOM element of the popup
348
+ * @param getScrollContainer 弹窗中的滚动容器,可传入多个
349
+ * @param getScrollContainer {en} The scrolling container in the popup, which can pass in multiple
350
+ * @param orientationDirection 弹窗内容朝向,默认为top(从上到下),用于实现模拟横屏
351
+ * @param orientationDirection {en} The content orientation of the popup, the default is top (from top to bottom), which is used to simulate a horizontal screen
352
+ * @param preventCallback 在滚动穿透被阻止(preventDefault被触发)时的回调
353
+ * @param preventCallback {en} Callback when scrolling is blocked (preventDefault is triggered)
354
+ * @param onTouchMove touchmove 自定义事件
355
+ * @param onTouchMove {en} Touchmove custom event
356
+ * @param gestureOutOfControl 是否禁用滚动穿透处理
357
+ * @param gestureOutOfControl {en} Whether to disable scroll through processing
358
+ * @example
359
+ * ```
360
+ * import { usePopupScroll } from '@arco-design/mobile-react/esm/_helpers/hooks';
361
+ *
362
+ * usePopupScroll(visible, domRef.current, getScrollContainer, orientationDirection, onPreventTouchMove, onTouchMove, gestureOutOfControl);
363
+ * ```
364
+ */
208
365
  function usePopupScroll(visible, popupDom, getScrollContainer, orientationDirection, preventCallback, onTouchMove, gestureOutOfControl) {
209
366
  if (orientationDirection === void 0) {
210
367
  orientationDirection = 'top';
@@ -386,6 +543,19 @@ function usePopupScroll(visible, popupDom, getScrollContainer, orientationDirect
386
543
  };
387
544
  }, [visible, popupDom, handleTouchStart, handleTouchMove]);
388
545
  }
546
+ /**
547
+ * 在滑动类组件中,如果有内部可滚动区域,则在内部滚动区域滚动时禁用滑动事件
548
+ * @desc {en} In the sliding class component, if there is an inner scrollable area, the sliding event is disabled when the inner scrolling area is scrolled
549
+ * @param getInnerScrollContainer 内部可滚动区域,可传入多个
550
+ * @param getInnerScrollContainer {en} Inner scrollable area, can pass in multiple
551
+ * @example
552
+ * ```
553
+ * import { useSwiperInnerScroll } from '@arco-design/mobile-react/esm/_helpers/hooks';
554
+ *
555
+ * useSwiperInnerScroll(getInnerScrollContainer);
556
+ * ```
557
+ */
558
+
389
559
 
390
560
  function useSwiperInnerScroll(getInnerScrollContainer) {
391
561
  var stopFunc = (0, _react.useCallback)(function (e) {
@@ -414,6 +584,26 @@ function useSwiperInnerScroll(getInnerScrollContainer) {
414
584
  };
415
585
  }, [getInnerScrollContainer]);
416
586
  }
587
+ /**
588
+ * 事件绑定统一封装
589
+ * @desc {en} Unified encapsulation of event binding
590
+ * @param dom 待绑定事件的dom元素
591
+ * @param dom {en} The dom element to be bound to the event
592
+ * @param event 待绑定事件名称
593
+ * @param event {en} The name of the event to be bound
594
+ * @param handler 待绑定事件回调
595
+ * @param handler {en} The callback of the event to be bound
596
+ * @param options 待绑定事件配置,默认为 { capture: true }
597
+ * @param options {en} Event configuration to be bound, the default is { capture: true }
598
+ * @example
599
+ * ```
600
+ * import { useAddListener } from '@arco-design/mobile-react/esm/_helpers/hooks';
601
+ *
602
+ * useAddListener(domRef.current, 'touchstart', onTouchStart);
603
+ * useAddListener(domRef.current, 'touchend', onTouchEnd);
604
+ * ```
605
+ */
606
+
417
607
 
418
608
  function useAddListener(dom, event, handler, options) {
419
609
  if (options === void 0) {
@@ -444,8 +634,28 @@ function useAddListener(dom, event, handler, options) {
444
634
 
445
635
  var arcoFullScreenCount = 0;
446
636
  var arcoFullScreenOriginOverflow = '';
637
+ /**
638
+ * 在全屏组件出现时,将body的overflow设置为hidden,防止滚动穿透
639
+ * @desc {en} When the full screen component appears, set the overflow of the body to hidden to prevent scrolling penetration
640
+ * @param visible 全屏组件是否被打开
641
+ * @param visible {en} Whether the full screen component is opened
642
+ * @param preventBodyScroll 是否启用防滚动穿透,默认启用
643
+ * @param preventBodyScroll {en} Whether to enable anti-scroll penetration, enabled by default
644
+ * @param initialBodyOverflow body在初始状态下的overflow值,在全屏组件全部关闭后会还原
645
+ * @param initialBodyOverflow {en} The overflow value of the body in the initial state, which will be restored after all full-screen components are closed
646
+ * @example
647
+ * ```
648
+ * import { usePreventBodyScroll } from '@arco-design/mobile-react/esm/_helpers/hooks';
649
+ *
650
+ * usePreventBodyScroll(visible, preventBodyScroll, initialBodyOverflow);
651
+ * ```
652
+ */
447
653
 
448
654
  function usePreventBodyScroll(visible, preventBodyScroll, initialBodyOverflow) {
655
+ if (preventBodyScroll === void 0) {
656
+ preventBodyScroll = true;
657
+ }
658
+
449
659
  // 新出现一个全屏组件则计数+1,并设置body hidden样式
450
660
  // @en When a new full-screen component appears, count + 1 and set the body hidden style
451
661
  var addFullScreen = (0, _react.useCallback)(function () {
@@ -492,6 +702,18 @@ function usePreventBodyScroll(visible, preventBodyScroll, initialBodyOverflow) {
492
702
  };
493
703
  }, [visible]);
494
704
  }
705
+ /**
706
+ * 进度条计算公共逻辑,根据传入的参数计算出当前百分比和过渡效果开关,进度类组件内部使用
707
+ * @desc {en} Progress bar calculation common logic, used internally by the progress class component
708
+ * @returns [当前计算的百分比, 当前是否应有过渡效果]
709
+ * @example
710
+ * ```
711
+ * import { usePreventBodyScroll } from '@arco-design/mobile-react/esm/_helpers/hooks';
712
+ *
713
+ * const [currentPercentage, transitionControl] = useProgress(mountedTransition, percentage, duration, mountedBezier, step);
714
+ * ```
715
+ */
716
+
495
717
 
496
718
  function useProgress(mountedTransition, percentage, duration, mountedBezier, step) {
497
719
  var _useState8 = (0, _react.useState)(0),
@@ -528,6 +750,24 @@ function useProgress(mountedTransition, percentage, duration, mountedBezier, ste
528
750
  }, [count, percentage, step]);
529
751
  return [currentPercentage, transitionControl];
530
752
  }
753
+ /**
754
+ * 单击和双击事件统一处理
755
+ * @desc {en} Unified processing of single and double click events
756
+ * @param onClick 单击事件回调
757
+ * @param onClick {en} Callback of single click event
758
+ * @param onDoubleClick 双击事件回调
759
+ * @param onDoubleClick {en} Callback of double click event
760
+ * @param delay 两次点击被判定为双击事件的最大间隔时间
761
+ * @param delay {en} The maximum interval between two clicks is judged as a double-click event
762
+ * @returns clickHandler,统一后的事件处理方法
763
+ * @example
764
+ * ```
765
+ * import { useSingleAndDoubleClick } from '@arco-design/mobile-react/esm/_helpers/hooks';
766
+ *
767
+ * const handleClick = useSingleAndDoubleClick(handleImageClick, handleImageDoubleClick);
768
+ * ```
769
+ */
770
+
531
771
 
532
772
  function useSingleAndDoubleClick(onClick, onDoubleClick, delay) {
533
773
  if (delay === void 0) {
@@ -558,6 +798,23 @@ function useSingleAndDoubleClick(onClick, onDoubleClick, delay) {
558
798
  }
559
799
 
560
800
  var arcoSvgKeyCount = 0;
801
+ /**
802
+ * 自动生成svg <def>标签的唯一标识,用于区分不同svg的<def>内容
803
+ * @desc {en} Automatically generate the unique identifier of the svg <def> tag, which is used to distinguish the <def> content of different svg
804
+ * @param userSetSvgKey 自定义唯一标识,传入则覆盖自动生成的值
805
+ * @param userSetSvgKey {en} Customize the unique identifier, if passed in, it will override the automatically generated value
806
+ * @returns 包含svgKey的对象 生成后的唯一标识
807
+ * @globalVariable
808
+ * ```
809
+ * let arcoSvgKeyCount = 0;
810
+ * ```
811
+ * @example
812
+ * ```
813
+ * import { useGenSvgKey } from '@arco-design/mobile-react/esm/_helpers/hooks';
814
+ *
815
+ * const { svgKey } = useGenSvgKey(userSetSvgKey);
816
+ * ```
817
+ */
561
818
 
562
819
  function useGenSvgKey(userSetSvgKey) {
563
820
  var _useState12 = (0, _react.useState)(''),
@@ -4,12 +4,89 @@
4
4
  */
5
5
  import { CSSProperties } from 'react';
6
6
  export * from './hooks';
7
- export * from './type';
8
7
  export * from './react-dom';
8
+ export * from './type';
9
+ /**
10
+ * 获取带浏览器前缀的样式
11
+ * @desc {en} Get style with browser vendor prefix
12
+ * @param {CSSProperties} style 原始样式
13
+ * @param {CSSProperties} style {en} Original style
14
+ * @returns {CSSProperties} newStyle 添加了浏览器前缀的新样式
15
+ * @returns {CSSProperties} newStyle {en} New style with browser vendor prefix
16
+ * @example
17
+ * ```
18
+ * import { getStyleWithVendor } from '@arco-design/mobile-react/esm/_helpers';
19
+ *
20
+ * // Example usage:
21
+ * const originalStyle = {
22
+ * transform: 'translateX(50px)',
23
+ * transition: 'all 0.3s ease',
24
+ * opacity: 0.8,
25
+ * };
26
+ *
27
+ * const styleWithPrefix = getStyleWithVendor(originalStyle);
28
+ *
29
+ * // Result:
30
+ * // styleWithPrefix will be:
31
+ * // {
32
+ * // transform: 'translateX(50px)',
33
+ * // WebkitTransform: 'translateX(50px)', // Browser-specific prefix added
34
+ * // transition: 'all 0.3s ease',
35
+ * // WebkitTransition: 'all 0.3s ease', // Browser-specific prefix added
36
+ * // opacity: 0.8,
37
+ * // }
38
+ * ```
39
+ */
9
40
  export declare function getStyleWithVendor(style: CSSProperties): CSSProperties;
41
+ /**
42
+ * 给元素设置带浏览器前缀的样式
43
+ * @desc {en} Set element style with browser vendor prefix
44
+ * @param {HTMLElement} dom 需要设置样式的元素
45
+ * @param {HTMLElement} dom {en} Element to set style
46
+ * @param {CSSProperties} style Original style
47
+ * @param {CSSProperties} style {en} Original style
48
+ * @returns {void}
49
+ * @example
50
+ * ```
51
+ * import { setStyleWithVendor } from '@arco-design/mobile-utils';
52
+ *
53
+ * // Example: Setting and displaying styles with the Webkit browser vendor prefix
54
+ * const element = document.getElementById('myElement');
55
+ * const originalStyle = {
56
+ * transform: 'translateX(100px)',
57
+ * transition: 'transform 0.5s ease',
58
+ * borderRadius: '5px',
59
+ * };
60
+ *
61
+ * // Set the styles with the Webkit browser vendor prefix
62
+ * setStyleWithVendor(element, originalStyle);
63
+ *
64
+ * // Display the styles with the Webkit browser vendor prefixes applied
65
+ * const computedStyle = getComputedStyle(element);
66
+ * console.log(computedStyle.getPropertyValue('-webkit-transform')); // Output: The transformed style with the Webkit browser vendor prefix
67
+ * console.log(computedStyle.getPropertyValue('-webkit-transition')); // Output: The transition style with the Webkit browser vendor prefix
68
+ * console.log(computedStyle.getPropertyValue('border-radius')); // Output: The borderRadius style without a vendor prefix
69
+ * ```
70
+ */
10
71
  export declare function setStyleWithVendor(dom: HTMLElement, style: CSSProperties): void;
11
72
  /**
12
73
  * 计算默认值,仅未定义时使用默认值
13
74
  * @desc {en} Calculate the default value, use default value only if undefined
75
+ * @param {T | undefined} value 输入的值
76
+ * @param {T | undefined} value {en} The input value
77
+ * @param {T} defaultValue 默认值
78
+ * @param {T} defaultValue {en} The default value
79
+ * @returns {T} 如果输入的值是未定义的,那么返回默认值,否则返回输入的值
80
+ * @returns {T} {en} Returns the default value if the input is undefined, otherwise returns the input value
81
+ * @example
82
+ * ```
83
+ * import { getDefaultValue } from '@arco-design/mobile-react/esm/_helpers';
84
+ *
85
+ * const result = getDefaultValue(42, 0);
86
+ * console.log(result); // Output: 42
87
+ *
88
+ * const result2 = getDefaultValue(undefined, 100);
89
+ * console.log(result2); // Output: 100
90
+ * ```
14
91
  */
15
92
  export declare const getDefaultValue: <T>(value: T | undefined, defaultValue: T) => T;
@@ -23,28 +23,60 @@ Object.keys(_hooks).forEach(function (key) {
23
23
  exports[key] = _hooks[key];
24
24
  });
25
25
 
26
- var _type = require("./type");
26
+ var _reactDom = require("./react-dom");
27
27
 
28
- Object.keys(_type).forEach(function (key) {
28
+ Object.keys(_reactDom).forEach(function (key) {
29
29
  if (key === "default" || key === "__esModule") return;
30
30
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
31
- if (key in exports && exports[key] === _type[key]) return;
32
- exports[key] = _type[key];
31
+ if (key in exports && exports[key] === _reactDom[key]) return;
32
+ exports[key] = _reactDom[key];
33
33
  });
34
34
 
35
- var _reactDom = require("./react-dom");
35
+ var _type = require("./type");
36
36
 
37
- Object.keys(_reactDom).forEach(function (key) {
37
+ Object.keys(_type).forEach(function (key) {
38
38
  if (key === "default" || key === "__esModule") return;
39
39
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
40
- if (key in exports && exports[key] === _reactDom[key]) return;
41
- exports[key] = _reactDom[key];
40
+ if (key in exports && exports[key] === _type[key]) return;
41
+ exports[key] = _type[key];
42
42
  });
43
43
 
44
44
  /**
45
45
  * @type utils
46
46
  * @name componentUtils
47
47
  */
48
+
49
+ /**
50
+ * 获取带浏览器前缀的样式
51
+ * @desc {en} Get style with browser vendor prefix
52
+ * @param {CSSProperties} style 原始样式
53
+ * @param {CSSProperties} style {en} Original style
54
+ * @returns {CSSProperties} newStyle 添加了浏览器前缀的新样式
55
+ * @returns {CSSProperties} newStyle {en} New style with browser vendor prefix
56
+ * @example
57
+ * ```
58
+ * import { getStyleWithVendor } from '@arco-design/mobile-react/esm/_helpers';
59
+ *
60
+ * // Example usage:
61
+ * const originalStyle = {
62
+ * transform: 'translateX(50px)',
63
+ * transition: 'all 0.3s ease',
64
+ * opacity: 0.8,
65
+ * };
66
+ *
67
+ * const styleWithPrefix = getStyleWithVendor(originalStyle);
68
+ *
69
+ * // Result:
70
+ * // styleWithPrefix will be:
71
+ * // {
72
+ * // transform: 'translateX(50px)',
73
+ * // WebkitTransform: 'translateX(50px)', // Browser-specific prefix added
74
+ * // transition: 'all 0.3s ease',
75
+ * // WebkitTransition: 'all 0.3s ease', // Browser-specific prefix added
76
+ * // opacity: 0.8,
77
+ * // }
78
+ * ```
79
+ */
48
80
  function getStyleWithVendor(style) {
49
81
  var allowReg = /(transform|transition|animation)/i;
50
82
  var newStyle = Object.keys(style).reduce(function (acc, key) {
@@ -57,6 +89,37 @@ function getStyleWithVendor(style) {
57
89
  }, {});
58
90
  return newStyle;
59
91
  }
92
+ /**
93
+ * 给元素设置带浏览器前缀的样式
94
+ * @desc {en} Set element style with browser vendor prefix
95
+ * @param {HTMLElement} dom 需要设置样式的元素
96
+ * @param {HTMLElement} dom {en} Element to set style
97
+ * @param {CSSProperties} style Original style
98
+ * @param {CSSProperties} style {en} Original style
99
+ * @returns {void}
100
+ * @example
101
+ * ```
102
+ * import { setStyleWithVendor } from '@arco-design/mobile-utils';
103
+ *
104
+ * // Example: Setting and displaying styles with the Webkit browser vendor prefix
105
+ * const element = document.getElementById('myElement');
106
+ * const originalStyle = {
107
+ * transform: 'translateX(100px)',
108
+ * transition: 'transform 0.5s ease',
109
+ * borderRadius: '5px',
110
+ * };
111
+ *
112
+ * // Set the styles with the Webkit browser vendor prefix
113
+ * setStyleWithVendor(element, originalStyle);
114
+ *
115
+ * // Display the styles with the Webkit browser vendor prefixes applied
116
+ * const computedStyle = getComputedStyle(element);
117
+ * console.log(computedStyle.getPropertyValue('-webkit-transform')); // Output: The transformed style with the Webkit browser vendor prefix
118
+ * console.log(computedStyle.getPropertyValue('-webkit-transition')); // Output: The transition style with the Webkit browser vendor prefix
119
+ * console.log(computedStyle.getPropertyValue('border-radius')); // Output: The borderRadius style without a vendor prefix
120
+ * ```
121
+ */
122
+
60
123
 
61
124
  function setStyleWithVendor(dom, style) {
62
125
  var vendorStyle = getStyleWithVendor(style);
@@ -68,6 +131,22 @@ function setStyleWithVendor(dom, style) {
68
131
  /**
69
132
  * 计算默认值,仅未定义时使用默认值
70
133
  * @desc {en} Calculate the default value, use default value only if undefined
134
+ * @param {T | undefined} value 输入的值
135
+ * @param {T | undefined} value {en} The input value
136
+ * @param {T} defaultValue 默认值
137
+ * @param {T} defaultValue {en} The default value
138
+ * @returns {T} 如果输入的值是未定义的,那么返回默认值,否则返回输入的值
139
+ * @returns {T} {en} Returns the default value if the input is undefined, otherwise returns the input value
140
+ * @example
141
+ * ```
142
+ * import { getDefaultValue } from '@arco-design/mobile-react/esm/_helpers';
143
+ *
144
+ * const result = getDefaultValue(42, 0);
145
+ * console.log(result); // Output: 42
146
+ *
147
+ * const result2 = getDefaultValue(undefined, 100);
148
+ * console.log(result2); // Output: 100
149
+ * ```
71
150
  */
72
151
 
73
152