@arco-design/mobile-react 2.19.1 → 2.21.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 (424) hide show
  1. package/CHANGELOG.md +53 -0
  2. package/README.en-US.md +6 -6
  3. package/README.md +6 -6
  4. package/cjs/_helpers/type.d.ts +1 -1
  5. package/cjs/avatar/group.js +1 -1
  6. package/cjs/avatar/index.d.ts +1 -1
  7. package/cjs/avatar/index.js +11 -14
  8. package/cjs/avatar/style/css/index.css +96 -126
  9. package/cjs/avatar/style/index.less +54 -72
  10. package/cjs/badge/index.d.ts +1 -1
  11. package/cjs/badge/index.js +7 -9
  12. package/cjs/badge/style/css/index.css +5 -5
  13. package/cjs/badge/style/index.less +5 -5
  14. package/cjs/button/hooks.d.ts +1 -2
  15. package/cjs/button/hooks.js +5 -3
  16. package/cjs/button/index.d.ts +6 -0
  17. package/cjs/button/index.js +38 -33
  18. package/cjs/button/style/css/index.css +75 -310
  19. package/cjs/button/style/index.less +32 -38
  20. package/cjs/carousel/index.d.ts +1 -1
  21. package/cjs/carousel/index.js +1 -1
  22. package/cjs/cell/index.d.ts +1 -1
  23. package/cjs/cell/index.js +1 -1
  24. package/cjs/checkbox/index.d.ts +1 -1
  25. package/cjs/checkbox/index.js +1 -1
  26. package/cjs/collapse/index.d.ts +1 -1
  27. package/cjs/collapse/index.js +1 -1
  28. package/cjs/count-down/demo/style/mobile.less +1 -1
  29. package/cjs/count-down/index.d.ts +1 -1
  30. package/cjs/count-down/index.js +1 -1
  31. package/cjs/date-picker/index.d.ts +1 -1
  32. package/cjs/date-picker/index.js +1 -1
  33. package/cjs/dropdown/dropdown.d.ts +3 -0
  34. package/cjs/dropdown/dropdown.js +322 -0
  35. package/cjs/dropdown/index.d.ts +3 -4
  36. package/cjs/dropdown/index.js +3 -303
  37. package/cjs/dropdown/options.js +2 -1
  38. package/cjs/dropdown/style/css/index.css +3 -0
  39. package/cjs/dropdown/style/index.less +2 -0
  40. package/cjs/dropdown/type.d.ts +20 -9
  41. package/cjs/dropdown-menu/dropdown-menu.d.ts +4 -0
  42. package/cjs/dropdown-menu/dropdown-menu.js +273 -0
  43. package/cjs/dropdown-menu/helper.d.ts +1 -1
  44. package/cjs/dropdown-menu/index.d.ts +2 -3
  45. package/cjs/dropdown-menu/index.js +2 -245
  46. package/cjs/dropdown-menu/type.d.ts +21 -20
  47. package/cjs/ellipsis/index.d.ts +1 -1
  48. package/cjs/ellipsis/index.js +1 -1
  49. package/cjs/grid/index.js +13 -12
  50. package/cjs/image/index.d.ts +1 -2
  51. package/cjs/image/index.js +14 -9
  52. package/cjs/image/style/css/index.css +2 -1
  53. package/cjs/image/style/index.less +2 -1
  54. package/cjs/image-picker/add-icon.d.ts +2 -0
  55. package/cjs/image-picker/add-icon.js +22 -0
  56. package/cjs/image-picker/demo/style/css/mobile.css +40 -0
  57. package/cjs/image-picker/demo/style/mobile.less +42 -0
  58. package/cjs/image-picker/index.d.ts +13 -0
  59. package/cjs/image-picker/index.js +331 -0
  60. package/cjs/image-picker/style/css/index.css +147 -0
  61. package/cjs/image-picker/style/css/index.d.ts +2 -0
  62. package/cjs/image-picker/style/css/index.js +5 -0
  63. package/cjs/image-picker/style/index.d.ts +2 -0
  64. package/cjs/image-picker/style/index.js +5 -0
  65. package/cjs/image-picker/style/index.less +116 -0
  66. package/cjs/image-picker/type.d.ts +174 -0
  67. package/cjs/image-picker/type.js +3 -0
  68. package/cjs/image-preview/index.d.ts +3 -3
  69. package/cjs/image-preview/index.js +1 -1
  70. package/cjs/index.d.ts +3 -0
  71. package/cjs/index.js +13 -1
  72. package/cjs/input/hooks.js +49 -8
  73. package/cjs/input/index.d.ts +1 -1
  74. package/cjs/input/index.js +1 -1
  75. package/cjs/input/props.d.ts +8 -2
  76. package/cjs/nav-bar/index.js +7 -2
  77. package/cjs/notice-bar/index.d.ts +1 -1
  78. package/cjs/notice-bar/index.js +1 -1
  79. package/cjs/picker/index.d.ts +1 -1
  80. package/cjs/picker/index.js +1 -1
  81. package/cjs/picker-view/index.d.ts +1 -1
  82. package/cjs/picker-view/index.js +1 -1
  83. package/cjs/popover/index.d.ts +1 -1
  84. package/cjs/popover/index.js +1 -1
  85. package/cjs/popup-swiper/index.js +3 -2
  86. package/cjs/radio/index.d.ts +1 -1
  87. package/cjs/radio/index.js +1 -1
  88. package/cjs/rate/index.d.ts +1 -1
  89. package/cjs/rate/index.js +1 -1
  90. package/cjs/search-bar/association.d.ts +3 -0
  91. package/cjs/search-bar/association.js +92 -0
  92. package/cjs/search-bar/cancel-button.d.ts +10 -0
  93. package/cjs/search-bar/cancel-button.js +41 -0
  94. package/cjs/search-bar/demo/style/css/mobile.css +5 -0
  95. package/cjs/search-bar/demo/style/mobile.less +9 -0
  96. package/cjs/search-bar/highlight.d.ts +12 -0
  97. package/cjs/search-bar/highlight.js +77 -0
  98. package/cjs/search-bar/index.d.ts +13 -0
  99. package/cjs/search-bar/index.js +239 -0
  100. package/cjs/search-bar/style/css/index.css +148 -0
  101. package/cjs/search-bar/style/css/index.d.ts +2 -0
  102. package/cjs/search-bar/style/css/index.js +5 -0
  103. package/cjs/search-bar/style/index.d.ts +2 -0
  104. package/cjs/search-bar/style/index.js +5 -0
  105. package/cjs/search-bar/style/index.less +111 -0
  106. package/cjs/search-bar/type.d.ts +163 -0
  107. package/cjs/search-bar/type.js +3 -0
  108. package/cjs/show-monitor/index.js +31 -3
  109. package/cjs/slider/index.d.ts +1 -1
  110. package/cjs/slider/index.js +1 -1
  111. package/cjs/steps/demo/style/css/mobile.css +1 -1
  112. package/cjs/steps/demo/style/mobile.less +1 -1
  113. package/cjs/steps/index.d.ts +1 -1
  114. package/cjs/steps/index.js +1 -1
  115. package/cjs/steps/style/css/index.css +5 -15
  116. package/cjs/steps/style/index.less +6 -10
  117. package/cjs/sticky/index.d.ts +1 -1
  118. package/cjs/style.d.ts +3 -0
  119. package/cjs/style.js +6 -0
  120. package/cjs/swipe-action/demo/style/css/mobile.css +5 -0
  121. package/cjs/swipe-action/demo/style/mobile.less +9 -0
  122. package/cjs/swipe-action/index.d.ts +12 -0
  123. package/cjs/swipe-action/index.js +339 -0
  124. package/cjs/swipe-action/item.d.ts +11 -0
  125. package/cjs/swipe-action/item.js +52 -0
  126. package/cjs/swipe-action/style/css/index.css +88 -0
  127. package/cjs/swipe-action/style/css/index.d.ts +2 -0
  128. package/cjs/swipe-action/style/css/index.js +5 -0
  129. package/cjs/swipe-action/style/index.d.ts +2 -0
  130. package/cjs/swipe-action/style/index.js +5 -0
  131. package/cjs/swipe-action/style/index.less +89 -0
  132. package/cjs/swipe-action/type.d.ts +123 -0
  133. package/cjs/swipe-action/type.js +3 -0
  134. package/cjs/switch/index.d.ts +1 -1
  135. package/cjs/switch/index.js +1 -1
  136. package/cjs/tabs/tab-pane.js +5 -1
  137. package/cjs/tag/index.d.ts +1 -1
  138. package/cjs/tag/index.js +1 -1
  139. package/cjs/textarea/index.d.ts +1 -1
  140. package/cjs/textarea/index.js +1 -1
  141. package/dist/index.js +8040 -6845
  142. package/dist/index.min.js +6 -7
  143. package/dist/style.css +497 -447
  144. package/dist/style.min.css +1 -1
  145. package/esm/_helpers/type.d.ts +1 -1
  146. package/esm/avatar/group.js +1 -1
  147. package/esm/avatar/index.d.ts +1 -1
  148. package/esm/avatar/index.js +11 -14
  149. package/esm/avatar/style/css/index.css +96 -126
  150. package/esm/avatar/style/index.less +54 -72
  151. package/esm/badge/index.d.ts +1 -1
  152. package/esm/badge/index.js +7 -9
  153. package/esm/badge/style/css/index.css +5 -5
  154. package/esm/badge/style/index.less +5 -5
  155. package/esm/button/hooks.d.ts +1 -2
  156. package/esm/button/hooks.js +5 -3
  157. package/esm/button/index.d.ts +6 -0
  158. package/esm/button/index.js +40 -35
  159. package/esm/button/style/css/index.css +75 -310
  160. package/esm/button/style/index.less +32 -38
  161. package/esm/carousel/index.d.ts +1 -1
  162. package/esm/carousel/index.js +1 -1
  163. package/esm/cell/index.d.ts +1 -1
  164. package/esm/cell/index.js +1 -1
  165. package/esm/checkbox/index.d.ts +1 -1
  166. package/esm/checkbox/index.js +1 -1
  167. package/esm/collapse/index.d.ts +1 -1
  168. package/esm/collapse/index.js +1 -1
  169. package/esm/count-down/demo/style/mobile.less +1 -1
  170. package/esm/count-down/index.d.ts +1 -1
  171. package/esm/count-down/index.js +1 -1
  172. package/esm/date-picker/index.d.ts +1 -1
  173. package/esm/date-picker/index.js +1 -1
  174. package/esm/dropdown/dropdown.d.ts +3 -0
  175. package/esm/dropdown/dropdown.js +304 -0
  176. package/esm/dropdown/index.d.ts +3 -4
  177. package/esm/dropdown/index.js +3 -293
  178. package/esm/dropdown/options.js +2 -1
  179. package/esm/dropdown/style/css/index.css +3 -0
  180. package/esm/dropdown/style/index.less +2 -0
  181. package/esm/dropdown/type.d.ts +20 -9
  182. package/esm/dropdown-menu/dropdown-menu.d.ts +4 -0
  183. package/esm/dropdown-menu/dropdown-menu.js +256 -0
  184. package/esm/dropdown-menu/helper.d.ts +1 -1
  185. package/esm/dropdown-menu/index.d.ts +2 -3
  186. package/esm/dropdown-menu/index.js +2 -237
  187. package/esm/dropdown-menu/type.d.ts +21 -20
  188. package/esm/ellipsis/index.d.ts +1 -1
  189. package/esm/ellipsis/index.js +1 -1
  190. package/esm/grid/index.js +13 -12
  191. package/esm/image/index.d.ts +1 -2
  192. package/esm/image/index.js +15 -10
  193. package/esm/image/style/css/index.css +2 -1
  194. package/esm/image/style/index.less +2 -1
  195. package/esm/image-picker/add-icon.d.ts +2 -0
  196. package/esm/image-picker/add-icon.js +14 -0
  197. package/esm/image-picker/demo/style/css/mobile.css +40 -0
  198. package/esm/image-picker/demo/style/mobile.less +42 -0
  199. package/esm/image-picker/index.d.ts +13 -0
  200. package/esm/image-picker/index.js +302 -0
  201. package/esm/image-picker/style/css/index.css +147 -0
  202. package/esm/image-picker/style/css/index.d.ts +2 -0
  203. package/esm/image-picker/style/css/index.js +2 -0
  204. package/esm/image-picker/style/index.d.ts +2 -0
  205. package/esm/image-picker/style/index.js +2 -0
  206. package/esm/image-picker/style/index.less +116 -0
  207. package/esm/image-picker/type.d.ts +174 -0
  208. package/esm/image-picker/type.js +1 -0
  209. package/esm/image-preview/index.d.ts +3 -3
  210. package/esm/image-preview/index.js +1 -1
  211. package/esm/index.d.ts +3 -0
  212. package/esm/index.js +3 -0
  213. package/esm/input/hooks.js +49 -8
  214. package/esm/input/index.d.ts +1 -1
  215. package/esm/input/index.js +1 -1
  216. package/esm/input/props.d.ts +8 -2
  217. package/esm/nav-bar/index.js +6 -2
  218. package/esm/notice-bar/index.d.ts +1 -1
  219. package/esm/notice-bar/index.js +1 -1
  220. package/esm/picker/index.d.ts +1 -1
  221. package/esm/picker/index.js +1 -1
  222. package/esm/picker-view/index.d.ts +1 -1
  223. package/esm/picker-view/index.js +1 -1
  224. package/esm/popover/index.d.ts +1 -1
  225. package/esm/popover/index.js +1 -1
  226. package/esm/popup-swiper/index.js +3 -2
  227. package/esm/radio/index.d.ts +1 -1
  228. package/esm/radio/index.js +1 -1
  229. package/esm/rate/index.d.ts +1 -1
  230. package/esm/rate/index.js +1 -1
  231. package/esm/search-bar/association.d.ts +3 -0
  232. package/esm/search-bar/association.js +82 -0
  233. package/esm/search-bar/cancel-button.d.ts +10 -0
  234. package/esm/search-bar/cancel-button.js +30 -0
  235. package/esm/search-bar/demo/style/css/mobile.css +5 -0
  236. package/esm/search-bar/demo/style/mobile.less +9 -0
  237. package/esm/search-bar/highlight.d.ts +12 -0
  238. package/esm/search-bar/highlight.js +66 -0
  239. package/esm/search-bar/index.d.ts +13 -0
  240. package/esm/search-bar/index.js +213 -0
  241. package/esm/search-bar/style/css/index.css +148 -0
  242. package/esm/search-bar/style/css/index.d.ts +2 -0
  243. package/esm/search-bar/style/css/index.js +2 -0
  244. package/esm/search-bar/style/index.d.ts +2 -0
  245. package/esm/search-bar/style/index.js +2 -0
  246. package/esm/search-bar/style/index.less +111 -0
  247. package/esm/search-bar/type.d.ts +163 -0
  248. package/esm/search-bar/type.js +1 -0
  249. package/esm/show-monitor/index.js +31 -3
  250. package/esm/slider/index.d.ts +1 -1
  251. package/esm/slider/index.js +1 -1
  252. package/esm/steps/demo/style/css/mobile.css +1 -1
  253. package/esm/steps/demo/style/mobile.less +1 -1
  254. package/esm/steps/index.d.ts +1 -1
  255. package/esm/steps/index.js +1 -1
  256. package/esm/steps/style/css/index.css +5 -15
  257. package/esm/steps/style/index.less +6 -10
  258. package/esm/sticky/index.d.ts +1 -1
  259. package/esm/style.d.ts +3 -0
  260. package/esm/style.js +3 -0
  261. package/esm/swipe-action/demo/style/css/mobile.css +5 -0
  262. package/esm/swipe-action/demo/style/mobile.less +9 -0
  263. package/esm/swipe-action/index.d.ts +12 -0
  264. package/esm/swipe-action/index.js +321 -0
  265. package/esm/swipe-action/item.d.ts +11 -0
  266. package/esm/swipe-action/item.js +42 -0
  267. package/esm/swipe-action/style/css/index.css +88 -0
  268. package/esm/swipe-action/style/css/index.d.ts +2 -0
  269. package/esm/swipe-action/style/css/index.js +2 -0
  270. package/esm/swipe-action/style/index.d.ts +2 -0
  271. package/esm/swipe-action/style/index.js +2 -0
  272. package/esm/swipe-action/style/index.less +89 -0
  273. package/esm/swipe-action/type.d.ts +123 -0
  274. package/esm/swipe-action/type.js +1 -0
  275. package/esm/switch/index.d.ts +1 -1
  276. package/esm/switch/index.js +1 -1
  277. package/esm/tabs/tab-pane.js +5 -1
  278. package/esm/tag/index.d.ts +1 -1
  279. package/esm/tag/index.js +1 -1
  280. package/esm/textarea/index.d.ts +1 -1
  281. package/esm/textarea/index.js +1 -1
  282. package/package.json +3 -3
  283. package/tokens/app/arcodesign/default/css-variables.less +53 -3
  284. package/tokens/app/arcodesign/default/index.d.ts +53 -3
  285. package/tokens/app/arcodesign/default/index.js +54 -4
  286. package/tokens/app/arcodesign/default/index.json +629 -39
  287. package/tokens/app/arcodesign/default/index.less +53 -3
  288. package/umd/_helpers/type.d.ts +1 -1
  289. package/umd/avatar/group.js +1 -1
  290. package/umd/avatar/index.d.ts +1 -1
  291. package/umd/avatar/index.js +11 -14
  292. package/umd/avatar/style/css/index.css +96 -126
  293. package/umd/avatar/style/index.less +54 -72
  294. package/umd/badge/index.d.ts +1 -1
  295. package/umd/badge/index.js +7 -9
  296. package/umd/badge/style/css/index.css +5 -5
  297. package/umd/badge/style/index.less +5 -5
  298. package/umd/button/hooks.d.ts +1 -2
  299. package/umd/button/hooks.js +5 -3
  300. package/umd/button/index.d.ts +6 -0
  301. package/umd/button/index.js +38 -33
  302. package/umd/button/style/css/index.css +75 -310
  303. package/umd/button/style/index.less +32 -38
  304. package/umd/carousel/index.d.ts +1 -1
  305. package/umd/carousel/index.js +1 -1
  306. package/umd/cell/index.d.ts +1 -1
  307. package/umd/cell/index.js +1 -1
  308. package/umd/checkbox/index.d.ts +1 -1
  309. package/umd/checkbox/index.js +1 -1
  310. package/umd/collapse/index.d.ts +1 -1
  311. package/umd/collapse/index.js +1 -1
  312. package/umd/count-down/demo/style/mobile.less +1 -1
  313. package/umd/count-down/index.d.ts +1 -1
  314. package/umd/count-down/index.js +1 -1
  315. package/umd/date-picker/index.d.ts +1 -1
  316. package/umd/date-picker/index.js +1 -1
  317. package/umd/dropdown/dropdown.d.ts +3 -0
  318. package/umd/dropdown/dropdown.js +325 -0
  319. package/umd/dropdown/index.d.ts +3 -4
  320. package/umd/dropdown/index.js +5 -298
  321. package/umd/dropdown/options.js +2 -1
  322. package/umd/dropdown/style/css/index.css +3 -0
  323. package/umd/dropdown/style/index.less +2 -0
  324. package/umd/dropdown/type.d.ts +20 -9
  325. package/umd/dropdown-menu/dropdown-menu.d.ts +4 -0
  326. package/umd/dropdown-menu/dropdown-menu.js +278 -0
  327. package/umd/dropdown-menu/helper.d.ts +1 -1
  328. package/umd/dropdown-menu/index.d.ts +2 -3
  329. package/umd/dropdown-menu/index.js +5 -241
  330. package/umd/dropdown-menu/type.d.ts +21 -20
  331. package/umd/ellipsis/index.d.ts +1 -1
  332. package/umd/ellipsis/index.js +1 -1
  333. package/umd/grid/index.js +13 -12
  334. package/umd/image/index.d.ts +1 -2
  335. package/umd/image/index.js +14 -9
  336. package/umd/image/style/css/index.css +2 -1
  337. package/umd/image/style/index.less +2 -1
  338. package/umd/image-picker/add-icon.d.ts +2 -0
  339. package/umd/image-picker/add-icon.js +35 -0
  340. package/umd/image-picker/demo/style/css/mobile.css +40 -0
  341. package/umd/image-picker/demo/style/mobile.less +42 -0
  342. package/umd/image-picker/index.d.ts +13 -0
  343. package/umd/image-picker/index.js +329 -0
  344. package/umd/image-picker/style/css/index.css +147 -0
  345. package/umd/image-picker/style/css/index.d.ts +2 -0
  346. package/umd/image-picker/style/css/index.js +15 -0
  347. package/umd/image-picker/style/index.d.ts +2 -0
  348. package/umd/image-picker/style/index.js +15 -0
  349. package/umd/image-picker/style/index.less +116 -0
  350. package/umd/image-picker/type.d.ts +174 -0
  351. package/umd/image-picker/type.js +17 -0
  352. package/umd/image-preview/index.d.ts +3 -3
  353. package/umd/image-preview/index.js +1 -1
  354. package/umd/index.d.ts +3 -0
  355. package/umd/index.js +11 -5
  356. package/umd/input/hooks.js +48 -7
  357. package/umd/input/index.d.ts +1 -1
  358. package/umd/input/index.js +1 -1
  359. package/umd/input/props.d.ts +8 -2
  360. package/umd/nav-bar/index.js +9 -6
  361. package/umd/notice-bar/index.d.ts +1 -1
  362. package/umd/notice-bar/index.js +1 -1
  363. package/umd/picker/index.d.ts +1 -1
  364. package/umd/picker/index.js +1 -1
  365. package/umd/picker-view/index.d.ts +1 -1
  366. package/umd/picker-view/index.js +1 -1
  367. package/umd/popover/index.d.ts +1 -1
  368. package/umd/popover/index.js +1 -1
  369. package/umd/popup-swiper/index.js +3 -2
  370. package/umd/radio/index.d.ts +1 -1
  371. package/umd/radio/index.js +1 -1
  372. package/umd/rate/index.d.ts +1 -1
  373. package/umd/rate/index.js +1 -1
  374. package/umd/search-bar/association.d.ts +3 -0
  375. package/umd/search-bar/association.js +101 -0
  376. package/umd/search-bar/cancel-button.d.ts +10 -0
  377. package/umd/search-bar/cancel-button.js +52 -0
  378. package/umd/search-bar/demo/style/css/mobile.css +5 -0
  379. package/umd/search-bar/demo/style/mobile.less +9 -0
  380. package/umd/search-bar/highlight.d.ts +12 -0
  381. package/umd/search-bar/highlight.js +87 -0
  382. package/umd/search-bar/index.d.ts +13 -0
  383. package/umd/search-bar/index.js +235 -0
  384. package/umd/search-bar/style/css/index.css +148 -0
  385. package/umd/search-bar/style/css/index.d.ts +2 -0
  386. package/umd/search-bar/style/css/index.js +15 -0
  387. package/umd/search-bar/style/index.d.ts +2 -0
  388. package/umd/search-bar/style/index.js +15 -0
  389. package/umd/search-bar/style/index.less +111 -0
  390. package/umd/search-bar/type.d.ts +163 -0
  391. package/umd/search-bar/type.js +17 -0
  392. package/umd/show-monitor/index.js +31 -3
  393. package/umd/slider/index.d.ts +1 -1
  394. package/umd/slider/index.js +1 -1
  395. package/umd/steps/demo/style/css/mobile.css +1 -1
  396. package/umd/steps/demo/style/mobile.less +1 -1
  397. package/umd/steps/index.d.ts +1 -1
  398. package/umd/steps/index.js +1 -1
  399. package/umd/steps/style/css/index.css +5 -15
  400. package/umd/steps/style/index.less +6 -10
  401. package/umd/sticky/index.d.ts +1 -1
  402. package/umd/style.d.ts +3 -0
  403. package/umd/style.js +4 -4
  404. package/umd/swipe-action/demo/style/css/mobile.css +5 -0
  405. package/umd/swipe-action/demo/style/mobile.less +9 -0
  406. package/umd/swipe-action/index.d.ts +12 -0
  407. package/umd/swipe-action/index.js +342 -0
  408. package/umd/swipe-action/item.d.ts +11 -0
  409. package/umd/swipe-action/item.js +62 -0
  410. package/umd/swipe-action/style/css/index.css +88 -0
  411. package/umd/swipe-action/style/css/index.d.ts +2 -0
  412. package/umd/swipe-action/style/css/index.js +15 -0
  413. package/umd/swipe-action/style/index.d.ts +2 -0
  414. package/umd/swipe-action/style/index.js +15 -0
  415. package/umd/swipe-action/style/index.less +89 -0
  416. package/umd/swipe-action/type.d.ts +123 -0
  417. package/umd/swipe-action/type.js +17 -0
  418. package/umd/switch/index.d.ts +1 -1
  419. package/umd/switch/index.js +1 -1
  420. package/umd/tabs/tab-pane.js +5 -1
  421. package/umd/tag/index.d.ts +1 -1
  422. package/umd/tag/index.js +1 -1
  423. package/umd/textarea/index.d.ts +1 -1
  424. package/umd/textarea/index.js +1 -1
@@ -0,0 +1,321 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import React, { useRef, forwardRef, useImperativeHandle, useEffect, useMemo, useContext, useState } from 'react';
3
+ import { nextTick } from '@arco-design/mobile-utils/utils';
4
+ import { cls } from '@arco-design/mobile-utils';
5
+ import { GlobalContext } from '../context-provider';
6
+ import RenderAction from './item';
7
+ import { getStyleWithVendor, useLatestRef, useRefState } from '../_helpers';
8
+ /**
9
+ * 滑动操作组件,左右滑动拉出菜单栏
10
+ * @en SwipeAction component, slide left and right to pull out the menu bar
11
+ * @type 反馈
12
+ * @type_en FeedBack
13
+ * @name 滑动操作
14
+ * @name_en SwipeAction
15
+ */
16
+
17
+ var SwipeAction = /*#__PURE__*/forwardRef(function (props, ref) {
18
+ var _props$className = props.className,
19
+ className = _props$className === void 0 ? '' : _props$className,
20
+ style = props.style,
21
+ children = props.children,
22
+ leftActions = props.leftActions,
23
+ rightActions = props.rightActions,
24
+ _props$disabled = props.disabled,
25
+ disabled = _props$disabled === void 0 ? false : _props$disabled,
26
+ _props$threshold = props.threshold,
27
+ threshold = _props$threshold === void 0 ? 0.15 : _props$threshold,
28
+ closeOnTouchOutside = props.closeOnTouchOutside,
29
+ _props$transitionDura = props.transitionDuration,
30
+ transitionDuration = _props$transitionDura === void 0 ? 300 : _props$transitionDura,
31
+ _props$dampRate = props.dampRate,
32
+ dampRate = _props$dampRate === void 0 ? 15 : _props$dampRate,
33
+ _props$openStyleType = props.openStyleType,
34
+ openStyleType = _props$openStyleType === void 0 ? 'layer' : _props$openStyleType,
35
+ onClose = props.onClose,
36
+ onOpen = props.onOpen;
37
+ var domRef = useRef(null);
38
+ var leftRef = useRef(null);
39
+ var rightRef = useRef(null);
40
+ var isOpen = useRef(false);
41
+ var leftMenuWidthRef = useRef(0);
42
+
43
+ var _useState = useState([]),
44
+ leftMenuWidthArr = _useState[0],
45
+ setLeftMenuWidthArr = _useState[1];
46
+
47
+ var rightMenuWidthRef = useRef(0);
48
+
49
+ var _useState2 = useState([]),
50
+ rightMenuWidthArr = _useState2[0],
51
+ setRightMenuWidthArr = _useState2[1];
52
+
53
+ var dampRateRef = useLatestRef(dampRate);
54
+ var forbidClick = useRef(false);
55
+
56
+ var _useRefState = useRefState(false),
57
+ moving = _useRefState[0],
58
+ movingRef = _useRefState[1],
59
+ setMoving = _useRefState[2];
60
+
61
+ var _useRefState2 = useRefState(0),
62
+ offset = _useRefState2[0],
63
+ offsetRef = _useRefState2[1],
64
+ setOffset = _useRefState2[2];
65
+
66
+ var _useContext = useContext(GlobalContext),
67
+ prefixCls = _useContext.prefixCls;
68
+
69
+ var startRef = useRef(0);
70
+ var startX = useRef(0);
71
+ var slideX = useRef(0);
72
+ var isLayer = openStyleType === 'layer';
73
+ var transitionStyle = useMemo(function () {
74
+ return getStyleWithVendor({
75
+ transitionDuration: moving ? '0ms' : transitionDuration + "ms"
76
+ });
77
+ }, [moving, transitionDuration]);
78
+
79
+ function resetMoveData() {
80
+ startX.current = 0;
81
+ slideX.current = 0;
82
+ }
83
+
84
+ function getMenuCurrentWidth(a, min, max) {
85
+ var buffer = Math.abs(a) / dampRateRef.current;
86
+ return Math.min(Math.max(a, min - buffer), max + buffer);
87
+ }
88
+
89
+ function touchstart(e) {
90
+ startRef.current = offsetRef.current;
91
+ resetMoveData();
92
+ startX.current = e.touches[0].pageX;
93
+ }
94
+
95
+ function touchmove(e) {
96
+ e.preventDefault();
97
+ slideX.current = e.touches[0].pageX - startX.current;
98
+ forbidClick.current = true;
99
+ setMoving(true);
100
+ setOffset(getMenuCurrentWidth(slideX.current + startRef.current, -rightMenuWidthRef.current, leftMenuWidthRef.current));
101
+ }
102
+
103
+ function touchend() {
104
+ if (movingRef.current) {
105
+ var currentMenu = offsetRef.current > 0 ? 'left' : 'right';
106
+ changeMenu(currentMenu);
107
+ setMoving(false);
108
+ nextTick(function () {
109
+ forbidClick.current = false;
110
+ });
111
+ }
112
+ }
113
+
114
+ function changeMenu(dir) {
115
+ var cookedThreshold = isOpen.current ? 1 - threshold : threshold;
116
+ var width = dir === 'left' ? leftMenuWidthRef.current : rightMenuWidthRef.current;
117
+
118
+ if (width && Math.abs(offsetRef.current) > width * cookedThreshold) {
119
+ open(dir);
120
+ } else {
121
+ close(dir);
122
+ }
123
+ }
124
+
125
+ function getWidthByRef(widthRef) {
126
+ if (!widthRef.current) {
127
+ return {
128
+ totalWidth: 0,
129
+ widthArr: []
130
+ };
131
+ }
132
+
133
+ var totalWidth = 0;
134
+ var widthArr = [];
135
+ var allEle = widthRef.current.getElementsByClassName(prefixCls + "-swipe-action-menu-action-info-container");
136
+ Array.prototype.forEach.call(allEle, function (ele) {
137
+ var _ele$getBoundingClien;
138
+
139
+ var w = (_ele$getBoundingClien = ele.getBoundingClientRect().width) != null ? _ele$getBoundingClien : 0;
140
+ totalWidth += w;
141
+ widthArr.push(w);
142
+ });
143
+ return {
144
+ totalWidth: totalWidth,
145
+ widthArr: widthArr
146
+ };
147
+ }
148
+
149
+ useEffect(function () {
150
+ var container = domRef.current;
151
+
152
+ if (!disabled && container) {
153
+ container.addEventListener('touchstart', touchstart);
154
+ container.addEventListener('touchmove', touchmove);
155
+ container.addEventListener('touchend', touchend);
156
+ }
157
+
158
+ return function () {
159
+ if (!disabled && container) {
160
+ container.removeEventListener('touchstart', touchstart);
161
+ container.removeEventListener('touchmove', touchmove);
162
+ container.removeEventListener('touchend', touchend);
163
+ }
164
+ };
165
+ }, [disabled]); // 获取左右菜单的宽度
166
+ // @en Get the width of the left and right menu
167
+
168
+ useEffect(function () {
169
+ var _getWidthByRef = getWidthByRef(leftRef),
170
+ leftTotalWidth = _getWidthByRef.totalWidth,
171
+ leftWidthArr = _getWidthByRef.widthArr;
172
+
173
+ leftMenuWidthRef.current = leftTotalWidth;
174
+ setLeftMenuWidthArr(leftWidthArr);
175
+
176
+ var _getWidthByRef2 = getWidthByRef(rightRef),
177
+ rightTotalWidth = _getWidthByRef2.totalWidth,
178
+ rightWidthArr = _getWidthByRef2.widthArr;
179
+
180
+ rightMenuWidthRef.current = rightTotalWidth;
181
+ setRightMenuWidthArr(rightWidthArr);
182
+ }, [leftActions, rightActions]); // 点击外部区域事件
183
+ // @en Event when clicking outside of the element
184
+
185
+ useEffect(function () {
186
+ var handle = function handle(e) {
187
+ var _domRef$current;
188
+
189
+ if (!((_domRef$current = domRef.current) != null && _domRef$current.contains(e.target)) && isOpen.current) {
190
+ close();
191
+ }
192
+ };
193
+
194
+ closeOnTouchOutside && document.addEventListener('touchstart', handle);
195
+ return function () {
196
+ closeOnTouchOutside && document.removeEventListener('touchstart', handle);
197
+ };
198
+ }, [closeOnTouchOutside]);
199
+ useImperativeHandle(ref, function () {
200
+ return {
201
+ dom: domRef.current,
202
+ close: close,
203
+ open: open
204
+ };
205
+ });
206
+
207
+ function close(dir) {
208
+ setOffset(0);
209
+
210
+ if (isOpen.current) {
211
+ isOpen.current = false;
212
+
213
+ if (!dir && offsetRef.current !== 0) {
214
+ var noDir = offsetRef.current > 0 ? 'left' : 'right';
215
+ handleClose(noDir);
216
+ return;
217
+ }
218
+
219
+ handleClose(dir);
220
+ }
221
+ }
222
+
223
+ function open(dir) {
224
+ if (dir === void 0) {
225
+ dir = 'right';
226
+ }
227
+
228
+ if (!isOpen.current) {
229
+ isOpen.current = true;
230
+ handleOpen(dir);
231
+ }
232
+
233
+ setOffset(dir === 'left' ? leftMenuWidthRef.current : -rightMenuWidthRef.current);
234
+ }
235
+
236
+ function handleOpen(dir) {
237
+ setTimeout(function () {
238
+ onOpen == null ? void 0 : onOpen(dir);
239
+ }, transitionDuration);
240
+ }
241
+
242
+ function handleClose(dir) {
243
+ setTimeout(function () {
244
+ onClose == null ? void 0 : onClose(dir);
245
+ }, transitionDuration);
246
+ }
247
+
248
+ function actionClick(e) {
249
+ var _leftRef$current, _rightRef$current;
250
+
251
+ if (isOpen.current && !forbidClick.current && !((_leftRef$current = leftRef.current) != null && _leftRef$current.contains(e.target)) && !((_rightRef$current = rightRef.current) != null && _rightRef$current.contains(e.target))) {
252
+ close();
253
+ }
254
+ }
255
+
256
+ function getActionRightByIndex(index) {
257
+ var preWidth = leftMenuWidthArr.slice(index + 1).reduce(function (acc, cur) {
258
+ return acc + cur;
259
+ }, 0);
260
+ return (preWidth / leftMenuWidthRef.current || 0) * 100 + "%";
261
+ }
262
+
263
+ function getActionLeftByIndex(index) {
264
+ var preWidth = rightMenuWidthArr.slice(0, index).reduce(function (acc, cur) {
265
+ return acc + cur;
266
+ }, 0);
267
+ return (preWidth / rightMenuWidthRef.current || 0) * 100 + "%";
268
+ }
269
+
270
+ return /*#__PURE__*/React.createElement("div", {
271
+ className: cls(prefixCls + "-swipe-action", className, offset === 0 ? 'action-close' : 'action-open'),
272
+ style: getStyleWithVendor(_extends({}, style || {}, transitionStyle, {
273
+ transform: "translateX(" + offset + "px)"
274
+ })),
275
+ ref: domRef,
276
+ onClick: actionClick
277
+ }, /*#__PURE__*/React.createElement("div", {
278
+ className: cls(prefixCls + "-swipe-action-menu-left", prefixCls + "-swipe-action-menu", offset > 0 ? 'action-open' : 'action-close'),
279
+ ref: leftRef,
280
+ style: isLayer && offset >= 0 ? _extends({
281
+ width: offset
282
+ }, transitionStyle) : {}
283
+ }, leftActions == null ? void 0 : leftActions.map(function (action, index) {
284
+ return /*#__PURE__*/React.createElement(RenderAction, {
285
+ action: _extends({}, action || {}, {
286
+ style: _extends({}, isLayer ? {
287
+ right: getActionRightByIndex(index)
288
+ } : {}, action.style || {}),
289
+ className: cls(action.className, "open-style-" + openStyleType)
290
+ }),
291
+ prefixCls: prefixCls + "-swipe-action-menu-action",
292
+ index: leftActions.length - index,
293
+ type: "left",
294
+ close: close,
295
+ key: index
296
+ });
297
+ })), /*#__PURE__*/React.createElement("div", {
298
+ className: prefixCls + "-swipe-action-content"
299
+ }, children), /*#__PURE__*/React.createElement("div", {
300
+ className: cls(prefixCls + "-swipe-action-menu-right", prefixCls + "-swipe-action-menu", offset < 0 ? 'action-open' : 'action-close'),
301
+ ref: rightRef,
302
+ style: isLayer && offset <= 0 ? _extends({
303
+ width: -1 * offset
304
+ }, transitionStyle) : {}
305
+ }, rightActions == null ? void 0 : rightActions.map(function (action, index) {
306
+ return /*#__PURE__*/React.createElement(RenderAction, {
307
+ action: _extends({}, action || {}, {
308
+ style: _extends({}, isLayer ? {
309
+ left: getActionLeftByIndex(index)
310
+ } : {}, action.style || {}),
311
+ className: cls(action.className, "open-style-" + openStyleType)
312
+ }),
313
+ prefixCls: prefixCls + "-swipe-action-menu-action",
314
+ index: index + 1,
315
+ type: "right",
316
+ close: close,
317
+ key: index
318
+ });
319
+ })));
320
+ });
321
+ export default SwipeAction;
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import { Action } from './type';
3
+ interface IProps {
4
+ action: Action;
5
+ prefixCls: string;
6
+ index: number;
7
+ type: 'left' | 'right';
8
+ close: () => void;
9
+ }
10
+ export default function renderAction({ action, prefixCls, index, type, close }: IProps): JSX.Element;
11
+ export {};
@@ -0,0 +1,42 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import React from 'react';
3
+ import { cls } from '@arco-design/mobile-utils';
4
+ export default function renderAction(_ref) {
5
+ var action = _ref.action,
6
+ prefixCls = _ref.prefixCls,
7
+ index = _ref.index,
8
+ type = _ref.type,
9
+ close = _ref.close;
10
+ var text = action.text,
11
+ actionStyle = action.style,
12
+ className = action.className,
13
+ onClick = action.onClick,
14
+ icon = action.icon,
15
+ children = action.children;
16
+
17
+ function click() {
18
+ var result = (onClick == null ? void 0 : onClick()) || null;
19
+
20
+ if (!result || typeof result === 'boolean') {
21
+ !result && close();
22
+ } else if (result && result.then) {
23
+ result.then(function (res) {
24
+ return !res && close();
25
+ });
26
+ }
27
+ }
28
+
29
+ return /*#__PURE__*/React.createElement("div", {
30
+ className: cls(prefixCls + "-" + type + " " + prefixCls + "-info-container", className),
31
+ style: _extends({
32
+ zIndex: index
33
+ }, actionStyle),
34
+ onClick: click
35
+ }, children || /*#__PURE__*/React.createElement("div", {
36
+ className: prefixCls + "-info"
37
+ }, icon ? /*#__PURE__*/React.createElement("div", {
38
+ className: prefixCls + "-info-icon"
39
+ }, icon) : null, text ? /*#__PURE__*/React.createElement("div", {
40
+ className: prefixCls + "-info-text"
41
+ }, text) : null));
42
+ }
@@ -0,0 +1,88 @@
1
+ .arco-swipe-action {
2
+ position: relative;
3
+ -webkit-transition: -webkit-transform 0s;
4
+ transition: -webkit-transform 0s;
5
+ transition: transform 0s;
6
+ transition: transform 0s, -webkit-transform 0s;
7
+ font-size: 0.32rem ;
8
+ }
9
+ .arco-swipe-action.action-open,
10
+ .arco-swipe-action-menu.action-open {
11
+ -webkit-transition-timing-function: cubic-bezier(0.2, 0.8, 0.32, 1.28) ;
12
+ transition-timing-function: cubic-bezier(0.2, 0.8, 0.32, 1.28) ;
13
+ }
14
+ .arco-swipe-action.action-close,
15
+ .arco-swipe-action-menu.action-close {
16
+ -webkit-transition-timing-function: cubic-bezier(0.34, 0.69, 0.1, 1) ;
17
+ transition-timing-function: cubic-bezier(0.34, 0.69, 0.1, 1) ;
18
+ }
19
+ .arco-swipe-action-content {
20
+ width: 100%;
21
+ }
22
+ .arco-swipe-action-menu {
23
+ display: -webkit-box;
24
+ display: -webkit-flex;
25
+ display: flex;
26
+ position: absolute;
27
+ height: 100%;
28
+ overflow: visible;
29
+ -webkit-flex-wrap: nowrap;
30
+ flex-wrap: nowrap;
31
+ top: 0;
32
+ -webkit-transition: width 0s;
33
+ transition: width 0s;
34
+ }
35
+ .arco-swipe-action-menu-left {
36
+ right: 100%;
37
+ }
38
+ .arco-swipe-action-menu-right {
39
+ left: 100%;
40
+ }
41
+ .arco-swipe-action-menu-action-left::after {
42
+ right: 100%;
43
+ margin-right: -1PX;
44
+ }
45
+ .arco-swipe-action-menu-action-right::after {
46
+ left: 100%;
47
+ margin-left: -1PX;
48
+ }
49
+ .arco-swipe-action-menu-action-info {
50
+ height: 100%;
51
+ padding: 0.32rem ;
52
+ display: -webkit-box;
53
+ display: -webkit-flex;
54
+ display: flex;
55
+ -webkit-box-pack: center;
56
+ -webkit-justify-content: center;
57
+ justify-content: center;
58
+ -webkit-box-align: center;
59
+ -webkit-align-items: center;
60
+ align-items: center;
61
+ }
62
+ .arco-swipe-action-menu-action-info-container {
63
+ position: relative;
64
+ }
65
+ .arco-swipe-action-menu-action-info-container.open-style-layer {
66
+ position: absolute;
67
+ height: 100%;
68
+ }
69
+ .arco-swipe-action-menu-action-info-container::after {
70
+ content: " ";
71
+ position: absolute;
72
+ top: 0;
73
+ height: 100%;
74
+ width: 0.6rem ;
75
+ background: inherit;
76
+ }
77
+ .arco-swipe-action-menu-action-info-text {
78
+ white-space: nowrap;
79
+ font-size: 0.32rem ;
80
+ line-height: 0.44rem ;
81
+ color: #ffffff ;
82
+ }
83
+ .arco-swipe-action-menu-action-info-icon {
84
+ margin-right: 0.08rem ;
85
+ height: 0.4rem ;
86
+ width: 0.4rem ;
87
+ color: #ffffff ;
88
+ }
@@ -0,0 +1,2 @@
1
+ import '../../../../style/css/public.css';
2
+ import './index.css';
@@ -0,0 +1,2 @@
1
+ import '../../../../style/css/public.css';
2
+ import './index.css';
@@ -0,0 +1,2 @@
1
+ import '../../../style/public.less';
2
+ import './index.less';
@@ -0,0 +1,2 @@
1
+ import '../../../style/public.less';
2
+ import './index.less';
@@ -0,0 +1,89 @@
1
+ @import '../../../style/mixin.less';
2
+
3
+ .@{prefix}-swipe-action {
4
+ position: relative;
5
+ transition: transform 0s;
6
+ .use-var(font-size,swipe-action-text-font-size);
7
+
8
+ &, &-menu {
9
+ &.action-open {
10
+ .use-var(transition-timing-function, swipe-action-open-transition);
11
+ }
12
+ &.action-close {
13
+ .use-var(transition-timing-function, swipe-action-close-transition);
14
+ }
15
+ }
16
+
17
+ &-content {
18
+ width: 100%;
19
+ }
20
+
21
+ &-menu {
22
+ display: flex;
23
+ position: absolute;
24
+ height: 100%;
25
+ overflow: visible;
26
+ flex-wrap: nowrap;
27
+ top: 0;
28
+ transition: width 0s;
29
+
30
+ &-left {
31
+ right: 100%;
32
+ }
33
+
34
+ &-right {
35
+ left: 100%;
36
+ }
37
+ &-action {
38
+ &-left {
39
+ &::after {
40
+ right: 100%;
41
+ margin-right: -1PX;
42
+ }
43
+ }
44
+ &-right {
45
+ &::after {
46
+ left: 100%;
47
+ margin-left: -1PX;
48
+ }
49
+ }
50
+ &-info {
51
+ height: 100%;
52
+ .use-var(padding, swipe-action-info-padding);
53
+ display: flex;
54
+ justify-content: center;
55
+ align-items: center;
56
+
57
+ &-container {
58
+ position: relative;
59
+ &.open-style-layer {
60
+ position: absolute;
61
+ height: 100%;
62
+ }
63
+ &::after {
64
+ content: " ";
65
+ position: absolute;
66
+ top: 0;
67
+ height: 100%;
68
+ .use-var(width, swipe-action-info-bounce-buffer);
69
+ background: inherit;
70
+ }
71
+ }
72
+
73
+ &-text {
74
+ white-space: nowrap;
75
+ .use-var(font-size,swipe-action-text-font-size);
76
+ .use-var(line-height,swipe-action-text-line-height);
77
+ .use-var(color, swipe-action-text-color);
78
+ }
79
+
80
+ &-icon {
81
+ .use-var(margin-right,swipe-action-icon-margin-right);
82
+ .use-var(height, swipe-action-icon-height);
83
+ .use-var(width, swipe-action-icon-width);
84
+ .use-var(color, swipe-action-text-color);
85
+ }
86
+ }
87
+ }
88
+ }
89
+ }
@@ -0,0 +1,123 @@
1
+ import { CSSProperties, ReactNode } from 'react';
2
+ export interface SwipeActionProps {
3
+ /**
4
+ * 自定义类名
5
+ * @en Custom classname
6
+ */
7
+ className?: string;
8
+ /**
9
+ * 自定义样式
10
+ * @en Custom style
11
+ */
12
+ style?: React.CSSProperties;
13
+ /**
14
+ * 子元素
15
+ * @en Inner Content
16
+ */
17
+ children: ReactNode;
18
+ /**
19
+ * 右侧菜单
20
+ * @en right Menu
21
+ */
22
+ rightActions?: Action[];
23
+ /**
24
+ * 左侧菜单
25
+ * @en left Menu
26
+ */
27
+ leftActions?: Action[];
28
+ /**
29
+ * 点击外部是否自动归位
30
+ * @en Click outside for auto return
31
+ * @default false
32
+ */
33
+ closeOnTouchOutside?: boolean;
34
+ /**
35
+ * 菜单滑出多少距离后自动滑出/关闭的系数 范围 0-1
36
+ * @en How far the menu slides off/off automatically ranges from 0 to 1
37
+ * @default 0.15
38
+ */
39
+ threshold?: number;
40
+ /**
41
+ * 是否禁用
42
+ * @en Whether to disable
43
+ * @default false
44
+ */
45
+ disabled?: boolean;
46
+ /**
47
+ * 动画的执行时间 (单位ms)
48
+ * @en Animation execution time in ms
49
+ * @default 300
50
+ */
51
+ transitionDuration?: number;
52
+ /**
53
+ * 阻尼系数
54
+ * @en Damping coefficient
55
+ * @default 15
56
+ */
57
+ dampRate?: number;
58
+ /**
59
+ * 菜单滑入时的样式类型,layer - 分层堆叠进入,push - 直接依次推入
60
+ * @en The style type when the menu slides in. layer - the menu is stacked in layers; push - the menu is pushed directly in sequence
61
+ * @default "layer"
62
+ */
63
+ openStyleType?: 'layer' | 'push';
64
+ /**
65
+ * 滑出动画结束后触发
66
+ * @en Triggered when the slide out animation ends
67
+ */
68
+ onOpen?: (direction: 'left' | 'right') => void;
69
+ /**
70
+ * 滑入动画结束后触发
71
+ * @en Triggered when the slide in animation ends
72
+ */
73
+ onClose?: (direction: 'left' | 'right') => void;
74
+ }
75
+ export interface SwipeActionRef {
76
+ /**
77
+ * 最外层元素 DOM
78
+ * @en The outermost element DOM
79
+ */
80
+ dom: HTMLDivElement | null;
81
+ /**
82
+ * 使滑动条归位
83
+ * @en Bring the slider back into position
84
+ */
85
+ close: () => void;
86
+ /**
87
+ * 打开滑动条,默认打开右边
88
+ * @en Open the slider, the right by default
89
+ */
90
+ open: (direction: 'left' | 'right') => void;
91
+ }
92
+ export interface Action {
93
+ /**
94
+ * 自定义内容
95
+ * @en Custom Content
96
+ */
97
+ text?: ReactNode;
98
+ /**
99
+ * 自定义图标
100
+ * @en Custom Icon
101
+ */
102
+ icon?: ReactNode;
103
+ /**
104
+ * 自定义样式
105
+ * @en Custom Style
106
+ */
107
+ style?: CSSProperties;
108
+ /**
109
+ * 自定义类名
110
+ * @en Custom Style
111
+ */
112
+ className?: string;
113
+ /**
114
+ * 点击事件 返回true可以阻止菜单的关闭
115
+ * @en Clicking the event to return true prevents the menu from closing
116
+ */
117
+ onClick?: () => (void | boolean) | Promise<void | boolean>;
118
+ /**
119
+ * 子元素没有text或者icon的传递children
120
+ * @en Child elements do not pass children with text or icon
121
+ */
122
+ children?: ReactNode;
123
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -93,7 +93,7 @@ export interface SwitchRef {
93
93
  /**
94
94
  * 开关组件,支持点击和滑动触发开关动作。
95
95
  * @en A switch component that supports click and slide trigger switch actions.
96
- * @type 数据输入
96
+ * @type 数据录入
97
97
  * @type_en Data Entry
98
98
  * @name 开关
99
99
  * @name_en Switch