@arco-design/mobile-react 2.30.1 → 2.30.3

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 (410) 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/form/type.d.ts +2 -2
  5. package/cjs/image-preview/index.d.ts +6 -0
  6. package/cjs/image-preview/index.js +48 -14
  7. package/cjs/image-preview/style/css/index.css +2 -1
  8. package/cjs/image-preview/style/index.less +2 -1
  9. package/cjs/nav-bar/back-icon.js +20 -10
  10. package/cjs/picker-view/components/picker-cell.js +1 -1
  11. package/cjs/picker-view/index.js +1 -1
  12. package/cjs/popover/style/css/index.css +9 -2
  13. package/cjs/popover/style/css/menu.css +4 -0
  14. package/cjs/popover/style/index.less +1 -2
  15. package/cjs/popover/style/menu.less +1 -1
  16. package/cjs/slider/hooks/useSliderEvents.js +14 -8
  17. package/cjs/slider/hooks/useSliderStyle.js +13 -7
  18. package/cjs/slider/index.js +4 -2
  19. package/cjs/slider/marks.js +4 -2
  20. package/cjs/slider/style/css/index.css +28 -0
  21. package/cjs/slider/style/index.less +13 -4
  22. package/dist/index.js +118 -64
  23. package/dist/index.min.js +4 -4
  24. package/dist/style.css +39 -3
  25. package/dist/style.min.css +1 -1
  26. package/esm/form/type.d.ts +2 -2
  27. package/esm/image-preview/index.d.ts +6 -0
  28. package/esm/image-preview/index.js +48 -14
  29. package/esm/image-preview/style/css/index.css +2 -1
  30. package/esm/image-preview/style/index.less +2 -1
  31. package/esm/nav-bar/back-icon.js +18 -10
  32. package/esm/picker-view/components/picker-cell.js +1 -1
  33. package/esm/picker-view/index.js +1 -1
  34. package/esm/popover/style/css/index.css +9 -2
  35. package/esm/popover/style/css/menu.css +4 -0
  36. package/esm/popover/style/index.less +1 -2
  37. package/esm/popover/style/menu.less +1 -1
  38. package/esm/slider/hooks/useSliderEvents.js +13 -8
  39. package/esm/slider/hooks/useSliderStyle.js +12 -7
  40. package/esm/slider/index.js +4 -2
  41. package/esm/slider/marks.js +4 -2
  42. package/esm/slider/style/css/index.css +28 -0
  43. package/esm/slider/style/index.less +13 -4
  44. package/package.json +3 -3
  45. package/style/css/public.css +2 -0
  46. package/tokens/app/arcodesign/default/css-variables.less +1 -1
  47. package/tokens/app/arcodesign/default/index.d.ts +1 -1
  48. package/tokens/app/arcodesign/default/index.js +1 -1
  49. package/tokens/app/arcodesign/default/index.json +7 -7
  50. package/tokens/app/arcodesign/default/index.less +1 -1
  51. package/umd/form/type.d.ts +2 -2
  52. package/umd/image-preview/index.d.ts +6 -0
  53. package/umd/image-preview/index.js +48 -14
  54. package/umd/image-preview/style/css/index.css +2 -1
  55. package/umd/image-preview/style/index.less +2 -1
  56. package/umd/nav-bar/back-icon.js +20 -14
  57. package/umd/picker-view/components/picker-cell.js +1 -1
  58. package/umd/picker-view/index.js +1 -1
  59. package/umd/popover/style/css/index.css +9 -2
  60. package/umd/popover/style/css/menu.css +4 -0
  61. package/umd/popover/style/index.less +1 -2
  62. package/umd/popover/style/menu.less +1 -1
  63. package/umd/slider/hooks/useSliderEvents.js +16 -12
  64. package/umd/slider/hooks/useSliderStyle.js +15 -11
  65. package/umd/slider/index.js +4 -2
  66. package/umd/slider/marks.js +4 -2
  67. package/umd/slider/style/css/index.css +28 -0
  68. package/umd/slider/style/index.less +13 -4
  69. package/cjs/action-sheet/demo/style/css/mobile.css +0 -523
  70. package/cjs/action-sheet/demo/style/mobile.less +0 -52
  71. package/cjs/avatar/demo/style/css/mobile.css +0 -578
  72. package/cjs/avatar/demo/style/mobile.less +0 -96
  73. package/cjs/badge/demo/style/css/mobile.css +0 -580
  74. package/cjs/badge/demo/style/mobile.less +0 -107
  75. package/cjs/button/demo/style/css/mobile.css +0 -530
  76. package/cjs/button/demo/style/mobile.less +0 -44
  77. package/cjs/carousel/demo/style/css/mobile.css +0 -553
  78. package/cjs/carousel/demo/style/mobile.less +0 -70
  79. package/cjs/cell/demo/style/css/mobile.css +0 -585
  80. package/cjs/cell/demo/style/mobile.less +0 -102
  81. package/cjs/checkbox/demo/style/css/mobile.css +0 -520
  82. package/cjs/checkbox/demo/style/mobile.less +0 -45
  83. package/cjs/circle-progress/demo/style/css/mobile.css +0 -516
  84. package/cjs/circle-progress/demo/style/mobile.less +0 -34
  85. package/cjs/collapse/demo/style/css/mobile.css +0 -516
  86. package/cjs/collapse/demo/style/mobile.less +0 -33
  87. package/cjs/context-provider/demo/style/css/mobile.css +0 -520
  88. package/cjs/context-provider/demo/style/mobile.less +0 -37
  89. package/cjs/count-down/demo/style/css/mobile.css +0 -575
  90. package/cjs/count-down/demo/style/mobile.less +0 -96
  91. package/cjs/date-picker/demo/style/css/mobile.css +0 -520
  92. package/cjs/date-picker/demo/style/mobile.less +0 -37
  93. package/cjs/dialog/demo/style/css/mobile.css +0 -548
  94. package/cjs/dialog/demo/style/mobile.less +0 -80
  95. package/cjs/divider/demo/style/css/mobile.css +0 -516
  96. package/cjs/divider/demo/style/mobile.less +0 -36
  97. package/cjs/dropdown/demo/style/css/mobile.css +0 -515
  98. package/cjs/dropdown/demo/style/mobile.less +0 -32
  99. package/cjs/dropdown-menu/demo/style/css/mobile.css +0 -516
  100. package/cjs/dropdown-menu/demo/style/mobile.less +0 -33
  101. package/cjs/ellipsis/demo/style/css/mobile.css +0 -528
  102. package/cjs/ellipsis/demo/style/mobile.less +0 -53
  103. package/cjs/grid/demo/style/css/mobile.css +0 -613
  104. package/cjs/grid/demo/style/mobile.less +0 -157
  105. package/cjs/image/demo/style/css/mobile.css +0 -580
  106. package/cjs/image/demo/style/mobile.less +0 -86
  107. package/cjs/image-picker/demo/style/css/mobile.css +0 -550
  108. package/cjs/image-picker/demo/style/mobile.less +0 -67
  109. package/cjs/image-preview/demo/style/css/mobile.css +0 -551
  110. package/cjs/image-preview/demo/style/mobile.less +0 -61
  111. package/cjs/index-bar/demo/style/css/mobile.css +0 -533
  112. package/cjs/index-bar/demo/style/mobile.less +0 -51
  113. package/cjs/input/demo/style/css/mobile.css +0 -602
  114. package/cjs/input/demo/style/mobile.less +0 -132
  115. package/cjs/keyboard/demo/style/css/mobile.css +0 -520
  116. package/cjs/keyboard/demo/style/mobile.less +0 -42
  117. package/cjs/load-more/demo/style/css/mobile.css +0 -520
  118. package/cjs/load-more/demo/style/mobile.less +0 -39
  119. package/cjs/loading/demo/style/css/mobile.css +0 -529
  120. package/cjs/loading/demo/style/mobile.less +0 -48
  121. package/cjs/masking/demo/style/css/mobile.css +0 -535
  122. package/cjs/masking/demo/style/mobile.less +0 -56
  123. package/cjs/nav-bar/demo/style/css/mobile.css +0 -523
  124. package/cjs/nav-bar/demo/style/mobile.less +0 -46
  125. package/cjs/notice-bar/demo/style/css/mobile.css +0 -4
  126. package/cjs/notice-bar/demo/style/mobile.less +0 -6
  127. package/cjs/notify/demo/style/css/mobile.css +0 -545
  128. package/cjs/notify/demo/style/mobile.less +0 -60
  129. package/cjs/pagination/demo/style/css/index.css +0 -516
  130. package/cjs/pagination/demo/style/index.less +0 -35
  131. package/cjs/picker/demo/style/css/mobile.css +0 -531
  132. package/cjs/picker/demo/style/mobile.less +0 -49
  133. package/cjs/picker-view/demo/style/css/mobile.css +0 -513
  134. package/cjs/picker-view/demo/style/mobile.less +0 -32
  135. package/cjs/popover/demo/style/css/mobile.css +0 -649
  136. package/cjs/popover/demo/style/mobile.less +0 -135
  137. package/cjs/popup/demo/style/css/mobile.css +0 -540
  138. package/cjs/popup/demo/style/mobile.less +0 -66
  139. package/cjs/popup-swiper/demo/style/css/mobile.css +0 -540
  140. package/cjs/popup-swiper/demo/style/mobile.less +0 -66
  141. package/cjs/portal/demo/style/css/mobile.css +0 -527
  142. package/cjs/portal/demo/style/mobile.less +0 -48
  143. package/cjs/progress/demo/style/css/mobile.css +0 -520
  144. package/cjs/progress/demo/style/mobile.less +0 -39
  145. package/cjs/pull-refresh/demo/style/css/mobile.css +0 -554
  146. package/cjs/pull-refresh/demo/style/mobile.less +0 -83
  147. package/cjs/radio/demo/style/css/mobile.css +0 -529
  148. package/cjs/radio/demo/style/mobile.less +0 -54
  149. package/cjs/rate/demo/style/css/mobile.css +0 -514
  150. package/cjs/rate/demo/style/mobile.less +0 -33
  151. package/cjs/search-bar/demo/style/css/mobile.css +0 -520
  152. package/cjs/search-bar/demo/style/mobile.less +0 -43
  153. package/cjs/show-monitor/demo/style/css/mobile.css +0 -569
  154. package/cjs/show-monitor/demo/style/mobile.less +0 -90
  155. package/cjs/skeleton/demo/style/css/mobile.css +0 -517
  156. package/cjs/skeleton/demo/style/mobile.less +0 -38
  157. package/cjs/slider/demo/style/css/mobile.css +0 -529
  158. package/cjs/slider/demo/style/mobile.less +0 -60
  159. package/cjs/stepper/demo/style/css/mobile.css +0 -514
  160. package/cjs/stepper/demo/style/mobile.less +0 -34
  161. package/cjs/steps/demo/style/css/mobile.css +0 -611
  162. package/cjs/steps/demo/style/mobile.less +0 -75
  163. package/cjs/sticky/demo/style/css/mobile.css +0 -527
  164. package/cjs/sticky/demo/style/mobile.less +0 -48
  165. package/cjs/swipe-action/demo/style/css/mobile.css +0 -515
  166. package/cjs/swipe-action/demo/style/mobile.less +0 -34
  167. package/cjs/swipe-load/demo/style/css/mobile.css +0 -580
  168. package/cjs/swipe-load/demo/style/mobile.less +0 -116
  169. package/cjs/switch/demo/style/css/mobile.css +0 -524
  170. package/cjs/switch/demo/style/mobile.less +0 -49
  171. package/cjs/tab-bar/demo/style/css/mobile.css +0 -553
  172. package/cjs/tab-bar/demo/style/mobile.less +0 -59
  173. package/cjs/tabs/demo/style/css/mobile.css +0 -633
  174. package/cjs/tabs/demo/style/mobile.less +0 -174
  175. package/cjs/tag/demo/style/css/mobile.css +0 -516
  176. package/cjs/tag/demo/style/mobile.less +0 -33
  177. package/cjs/textarea/demo/style/css/mobile.css +0 -523
  178. package/cjs/textarea/demo/style/mobile.less +0 -47
  179. package/cjs/toast/demo/style/css/mobile.css +0 -520
  180. package/cjs/toast/demo/style/mobile.less +0 -37
  181. package/cjs/transition/demo/style/css/mobile.css +0 -529
  182. package/cjs/transition/demo/style/mobile.less +0 -47
  183. package/esm/action-sheet/demo/style/css/mobile.css +0 -523
  184. package/esm/action-sheet/demo/style/mobile.less +0 -52
  185. package/esm/avatar/demo/style/css/mobile.css +0 -578
  186. package/esm/avatar/demo/style/mobile.less +0 -96
  187. package/esm/badge/demo/style/css/mobile.css +0 -580
  188. package/esm/badge/demo/style/mobile.less +0 -107
  189. package/esm/button/demo/style/css/mobile.css +0 -530
  190. package/esm/button/demo/style/mobile.less +0 -44
  191. package/esm/carousel/demo/style/css/mobile.css +0 -553
  192. package/esm/carousel/demo/style/mobile.less +0 -70
  193. package/esm/cell/demo/style/css/mobile.css +0 -585
  194. package/esm/cell/demo/style/mobile.less +0 -102
  195. package/esm/checkbox/demo/style/css/mobile.css +0 -520
  196. package/esm/checkbox/demo/style/mobile.less +0 -45
  197. package/esm/circle-progress/demo/style/css/mobile.css +0 -516
  198. package/esm/circle-progress/demo/style/mobile.less +0 -34
  199. package/esm/collapse/demo/style/css/mobile.css +0 -516
  200. package/esm/collapse/demo/style/mobile.less +0 -33
  201. package/esm/context-provider/demo/style/css/mobile.css +0 -520
  202. package/esm/context-provider/demo/style/mobile.less +0 -37
  203. package/esm/count-down/demo/style/css/mobile.css +0 -575
  204. package/esm/count-down/demo/style/mobile.less +0 -96
  205. package/esm/date-picker/demo/style/css/mobile.css +0 -520
  206. package/esm/date-picker/demo/style/mobile.less +0 -37
  207. package/esm/dialog/demo/style/css/mobile.css +0 -548
  208. package/esm/dialog/demo/style/mobile.less +0 -80
  209. package/esm/divider/demo/style/css/mobile.css +0 -516
  210. package/esm/divider/demo/style/mobile.less +0 -36
  211. package/esm/dropdown/demo/style/css/mobile.css +0 -515
  212. package/esm/dropdown/demo/style/mobile.less +0 -32
  213. package/esm/dropdown-menu/demo/style/css/mobile.css +0 -516
  214. package/esm/dropdown-menu/demo/style/mobile.less +0 -33
  215. package/esm/ellipsis/demo/style/css/mobile.css +0 -528
  216. package/esm/ellipsis/demo/style/mobile.less +0 -53
  217. package/esm/grid/demo/style/css/mobile.css +0 -613
  218. package/esm/grid/demo/style/mobile.less +0 -157
  219. package/esm/image/demo/style/css/mobile.css +0 -580
  220. package/esm/image/demo/style/mobile.less +0 -86
  221. package/esm/image-picker/demo/style/css/mobile.css +0 -550
  222. package/esm/image-picker/demo/style/mobile.less +0 -67
  223. package/esm/image-preview/demo/style/css/mobile.css +0 -551
  224. package/esm/image-preview/demo/style/mobile.less +0 -61
  225. package/esm/index-bar/demo/style/css/mobile.css +0 -533
  226. package/esm/index-bar/demo/style/mobile.less +0 -51
  227. package/esm/input/demo/style/css/mobile.css +0 -602
  228. package/esm/input/demo/style/mobile.less +0 -132
  229. package/esm/keyboard/demo/style/css/mobile.css +0 -520
  230. package/esm/keyboard/demo/style/mobile.less +0 -42
  231. package/esm/load-more/demo/style/css/mobile.css +0 -520
  232. package/esm/load-more/demo/style/mobile.less +0 -39
  233. package/esm/loading/demo/style/css/mobile.css +0 -529
  234. package/esm/loading/demo/style/mobile.less +0 -48
  235. package/esm/masking/demo/style/css/mobile.css +0 -535
  236. package/esm/masking/demo/style/mobile.less +0 -56
  237. package/esm/nav-bar/demo/style/css/mobile.css +0 -523
  238. package/esm/nav-bar/demo/style/mobile.less +0 -46
  239. package/esm/notice-bar/demo/style/css/mobile.css +0 -4
  240. package/esm/notice-bar/demo/style/mobile.less +0 -6
  241. package/esm/notify/demo/style/css/mobile.css +0 -545
  242. package/esm/notify/demo/style/mobile.less +0 -60
  243. package/esm/pagination/demo/style/css/index.css +0 -516
  244. package/esm/pagination/demo/style/index.less +0 -35
  245. package/esm/picker/demo/style/css/mobile.css +0 -531
  246. package/esm/picker/demo/style/mobile.less +0 -49
  247. package/esm/picker-view/demo/style/css/mobile.css +0 -513
  248. package/esm/picker-view/demo/style/mobile.less +0 -32
  249. package/esm/popover/demo/style/css/mobile.css +0 -649
  250. package/esm/popover/demo/style/mobile.less +0 -135
  251. package/esm/popup/demo/style/css/mobile.css +0 -540
  252. package/esm/popup/demo/style/mobile.less +0 -66
  253. package/esm/popup-swiper/demo/style/css/mobile.css +0 -540
  254. package/esm/popup-swiper/demo/style/mobile.less +0 -66
  255. package/esm/portal/demo/style/css/mobile.css +0 -527
  256. package/esm/portal/demo/style/mobile.less +0 -48
  257. package/esm/progress/demo/style/css/mobile.css +0 -520
  258. package/esm/progress/demo/style/mobile.less +0 -39
  259. package/esm/pull-refresh/demo/style/css/mobile.css +0 -554
  260. package/esm/pull-refresh/demo/style/mobile.less +0 -83
  261. package/esm/radio/demo/style/css/mobile.css +0 -529
  262. package/esm/radio/demo/style/mobile.less +0 -54
  263. package/esm/rate/demo/style/css/mobile.css +0 -514
  264. package/esm/rate/demo/style/mobile.less +0 -33
  265. package/esm/search-bar/demo/style/css/mobile.css +0 -520
  266. package/esm/search-bar/demo/style/mobile.less +0 -43
  267. package/esm/show-monitor/demo/style/css/mobile.css +0 -569
  268. package/esm/show-monitor/demo/style/mobile.less +0 -90
  269. package/esm/skeleton/demo/style/css/mobile.css +0 -517
  270. package/esm/skeleton/demo/style/mobile.less +0 -38
  271. package/esm/slider/demo/style/css/mobile.css +0 -529
  272. package/esm/slider/demo/style/mobile.less +0 -60
  273. package/esm/stepper/demo/style/css/mobile.css +0 -514
  274. package/esm/stepper/demo/style/mobile.less +0 -34
  275. package/esm/steps/demo/style/css/mobile.css +0 -611
  276. package/esm/steps/demo/style/mobile.less +0 -75
  277. package/esm/sticky/demo/style/css/mobile.css +0 -527
  278. package/esm/sticky/demo/style/mobile.less +0 -48
  279. package/esm/swipe-action/demo/style/css/mobile.css +0 -515
  280. package/esm/swipe-action/demo/style/mobile.less +0 -34
  281. package/esm/swipe-load/demo/style/css/mobile.css +0 -580
  282. package/esm/swipe-load/demo/style/mobile.less +0 -116
  283. package/esm/switch/demo/style/css/mobile.css +0 -524
  284. package/esm/switch/demo/style/mobile.less +0 -49
  285. package/esm/tab-bar/demo/style/css/mobile.css +0 -553
  286. package/esm/tab-bar/demo/style/mobile.less +0 -59
  287. package/esm/tabs/demo/style/css/mobile.css +0 -633
  288. package/esm/tabs/demo/style/mobile.less +0 -174
  289. package/esm/tag/demo/style/css/mobile.css +0 -516
  290. package/esm/tag/demo/style/mobile.less +0 -33
  291. package/esm/textarea/demo/style/css/mobile.css +0 -523
  292. package/esm/textarea/demo/style/mobile.less +0 -47
  293. package/esm/toast/demo/style/css/mobile.css +0 -520
  294. package/esm/toast/demo/style/mobile.less +0 -37
  295. package/esm/transition/demo/style/css/mobile.css +0 -529
  296. package/esm/transition/demo/style/mobile.less +0 -47
  297. package/umd/action-sheet/demo/style/css/mobile.css +0 -523
  298. package/umd/action-sheet/demo/style/mobile.less +0 -52
  299. package/umd/avatar/demo/style/css/mobile.css +0 -578
  300. package/umd/avatar/demo/style/mobile.less +0 -96
  301. package/umd/badge/demo/style/css/mobile.css +0 -580
  302. package/umd/badge/demo/style/mobile.less +0 -107
  303. package/umd/button/demo/style/css/mobile.css +0 -530
  304. package/umd/button/demo/style/mobile.less +0 -44
  305. package/umd/carousel/demo/style/css/mobile.css +0 -553
  306. package/umd/carousel/demo/style/mobile.less +0 -70
  307. package/umd/cell/demo/style/css/mobile.css +0 -585
  308. package/umd/cell/demo/style/mobile.less +0 -102
  309. package/umd/checkbox/demo/style/css/mobile.css +0 -520
  310. package/umd/checkbox/demo/style/mobile.less +0 -45
  311. package/umd/circle-progress/demo/style/css/mobile.css +0 -516
  312. package/umd/circle-progress/demo/style/mobile.less +0 -34
  313. package/umd/collapse/demo/style/css/mobile.css +0 -516
  314. package/umd/collapse/demo/style/mobile.less +0 -33
  315. package/umd/context-provider/demo/style/css/mobile.css +0 -520
  316. package/umd/context-provider/demo/style/mobile.less +0 -37
  317. package/umd/count-down/demo/style/css/mobile.css +0 -575
  318. package/umd/count-down/demo/style/mobile.less +0 -96
  319. package/umd/date-picker/demo/style/css/mobile.css +0 -520
  320. package/umd/date-picker/demo/style/mobile.less +0 -37
  321. package/umd/dialog/demo/style/css/mobile.css +0 -548
  322. package/umd/dialog/demo/style/mobile.less +0 -80
  323. package/umd/divider/demo/style/css/mobile.css +0 -516
  324. package/umd/divider/demo/style/mobile.less +0 -36
  325. package/umd/dropdown/demo/style/css/mobile.css +0 -515
  326. package/umd/dropdown/demo/style/mobile.less +0 -32
  327. package/umd/dropdown-menu/demo/style/css/mobile.css +0 -516
  328. package/umd/dropdown-menu/demo/style/mobile.less +0 -33
  329. package/umd/ellipsis/demo/style/css/mobile.css +0 -528
  330. package/umd/ellipsis/demo/style/mobile.less +0 -53
  331. package/umd/grid/demo/style/css/mobile.css +0 -613
  332. package/umd/grid/demo/style/mobile.less +0 -157
  333. package/umd/image/demo/style/css/mobile.css +0 -580
  334. package/umd/image/demo/style/mobile.less +0 -86
  335. package/umd/image-picker/demo/style/css/mobile.css +0 -550
  336. package/umd/image-picker/demo/style/mobile.less +0 -67
  337. package/umd/image-preview/demo/style/css/mobile.css +0 -551
  338. package/umd/image-preview/demo/style/mobile.less +0 -61
  339. package/umd/index-bar/demo/style/css/mobile.css +0 -533
  340. package/umd/index-bar/demo/style/mobile.less +0 -51
  341. package/umd/input/demo/style/css/mobile.css +0 -602
  342. package/umd/input/demo/style/mobile.less +0 -132
  343. package/umd/keyboard/demo/style/css/mobile.css +0 -520
  344. package/umd/keyboard/demo/style/mobile.less +0 -42
  345. package/umd/load-more/demo/style/css/mobile.css +0 -520
  346. package/umd/load-more/demo/style/mobile.less +0 -39
  347. package/umd/loading/demo/style/css/mobile.css +0 -529
  348. package/umd/loading/demo/style/mobile.less +0 -48
  349. package/umd/masking/demo/style/css/mobile.css +0 -535
  350. package/umd/masking/demo/style/mobile.less +0 -56
  351. package/umd/nav-bar/demo/style/css/mobile.css +0 -523
  352. package/umd/nav-bar/demo/style/mobile.less +0 -46
  353. package/umd/notice-bar/demo/style/css/mobile.css +0 -4
  354. package/umd/notice-bar/demo/style/mobile.less +0 -6
  355. package/umd/notify/demo/style/css/mobile.css +0 -545
  356. package/umd/notify/demo/style/mobile.less +0 -60
  357. package/umd/pagination/demo/style/css/index.css +0 -516
  358. package/umd/pagination/demo/style/index.less +0 -35
  359. package/umd/picker/demo/style/css/mobile.css +0 -531
  360. package/umd/picker/demo/style/mobile.less +0 -49
  361. package/umd/picker-view/demo/style/css/mobile.css +0 -513
  362. package/umd/picker-view/demo/style/mobile.less +0 -32
  363. package/umd/popover/demo/style/css/mobile.css +0 -649
  364. package/umd/popover/demo/style/mobile.less +0 -135
  365. package/umd/popup/demo/style/css/mobile.css +0 -540
  366. package/umd/popup/demo/style/mobile.less +0 -66
  367. package/umd/popup-swiper/demo/style/css/mobile.css +0 -540
  368. package/umd/popup-swiper/demo/style/mobile.less +0 -66
  369. package/umd/portal/demo/style/css/mobile.css +0 -527
  370. package/umd/portal/demo/style/mobile.less +0 -48
  371. package/umd/progress/demo/style/css/mobile.css +0 -520
  372. package/umd/progress/demo/style/mobile.less +0 -39
  373. package/umd/pull-refresh/demo/style/css/mobile.css +0 -554
  374. package/umd/pull-refresh/demo/style/mobile.less +0 -83
  375. package/umd/radio/demo/style/css/mobile.css +0 -529
  376. package/umd/radio/demo/style/mobile.less +0 -54
  377. package/umd/rate/demo/style/css/mobile.css +0 -514
  378. package/umd/rate/demo/style/mobile.less +0 -33
  379. package/umd/search-bar/demo/style/css/mobile.css +0 -520
  380. package/umd/search-bar/demo/style/mobile.less +0 -43
  381. package/umd/show-monitor/demo/style/css/mobile.css +0 -569
  382. package/umd/show-monitor/demo/style/mobile.less +0 -90
  383. package/umd/skeleton/demo/style/css/mobile.css +0 -517
  384. package/umd/skeleton/demo/style/mobile.less +0 -38
  385. package/umd/slider/demo/style/css/mobile.css +0 -529
  386. package/umd/slider/demo/style/mobile.less +0 -60
  387. package/umd/stepper/demo/style/css/mobile.css +0 -514
  388. package/umd/stepper/demo/style/mobile.less +0 -34
  389. package/umd/steps/demo/style/css/mobile.css +0 -611
  390. package/umd/steps/demo/style/mobile.less +0 -75
  391. package/umd/sticky/demo/style/css/mobile.css +0 -527
  392. package/umd/sticky/demo/style/mobile.less +0 -48
  393. package/umd/swipe-action/demo/style/css/mobile.css +0 -515
  394. package/umd/swipe-action/demo/style/mobile.less +0 -34
  395. package/umd/swipe-load/demo/style/css/mobile.css +0 -580
  396. package/umd/swipe-load/demo/style/mobile.less +0 -116
  397. package/umd/switch/demo/style/css/mobile.css +0 -524
  398. package/umd/switch/demo/style/mobile.less +0 -49
  399. package/umd/tab-bar/demo/style/css/mobile.css +0 -553
  400. package/umd/tab-bar/demo/style/mobile.less +0 -59
  401. package/umd/tabs/demo/style/css/mobile.css +0 -633
  402. package/umd/tabs/demo/style/mobile.less +0 -174
  403. package/umd/tag/demo/style/css/mobile.css +0 -516
  404. package/umd/tag/demo/style/mobile.less +0 -33
  405. package/umd/textarea/demo/style/css/mobile.css +0 -523
  406. package/umd/textarea/demo/style/mobile.less +0 -47
  407. package/umd/toast/demo/style/css/mobile.css +0 -520
  408. package/umd/toast/demo/style/mobile.less +0 -37
  409. package/umd/transition/demo/style/css/mobile.css +0 -529
  410. package/umd/transition/demo/style/mobile.less +0 -47
package/CHANGELOG.md CHANGED
@@ -3,6 +3,30 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [2.30.3](https://github.com/arco-design/arco-design-mobile/compare/@arco-design/mobile-react@2.30.2...@arco-design/mobile-react@2.30.3) (2023-11-24)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * `ImagePreview` support shrinking animation before closed ([#195](https://github.com/arco-design/arco-design-mobile/issues/195)) ([7420bd5](https://github.com/arco-design/arco-design-mobile/commit/7420bd533a6e22a38a6fbd64407918580f64e095))
12
+ * support rtl for `Slider` & `Popover` ([#200](https://github.com/arco-design/arco-design-mobile/issues/200)) ([1756c8a](https://github.com/arco-design/arco-design-mobile/commit/1756c8a875f5e6fb3f8bdee7222d69c32a142ec3))
13
+
14
+
15
+
16
+
17
+
18
+ ## [2.30.2](https://github.com/arco-design/arco-design-mobile/compare/@arco-design/mobile-react@2.30.1...@arco-design/mobile-react@2.30.2) (2023-11-09)
19
+
20
+
21
+ ### Bug Fixes
22
+
23
+ * `NavBar` add aria-label to back arrow ([#196](https://github.com/arco-design/arco-design-mobile/issues/196)) ([ad97b65](https://github.com/arco-design/arco-design-mobile/commit/ad97b652d142a4d2331fbc4699c7d15d61153e50))
24
+ * `Picker` fix the issue that value=0 cannot be selected ([#199](https://github.com/arco-design/arco-design-mobile/issues/199)) ([acb97ac](https://github.com/arco-design/arco-design-mobile/commit/acb97ac158995cea86f99755e6d0d60b166717fd))
25
+
26
+
27
+
28
+
29
+
6
30
  ## [2.30.1](https://github.com/arco-design/arco-design-mobile/compare/@arco-design/mobile-react@2.30.0...@arco-design/mobile-react@2.30.1) (2023-11-07)
7
31
 
8
32
 
package/README.en-US.md CHANGED
@@ -59,8 +59,8 @@ React & ReactDOM: **<a href="https://reactjs.org/docs/cdn-links.html" target="_b
59
59
  React Transition Group: **<a href="https://reactcommunity.org/react-transition-group/" target="_blank">Click here</a>**
60
60
 
61
61
  ```
62
- <link ref="stylesheet" href="https://unpkg.com/@arco-design/mobile-react@2.30.0/dist/style.min.css">
63
- <script src="https://unpkg.com/@arco-design/mobile-react@2.30.0/dist/index.min.js"></script>
62
+ <link ref="stylesheet" href="https://unpkg.com/@arco-design/mobile-react@2.30.2/dist/style.min.css">
63
+ <script src="https://unpkg.com/@arco-design/mobile-react@2.30.2/dist/index.min.js"></script>
64
64
  ```
65
65
 
66
66
  ## Full import
package/README.md CHANGED
@@ -59,8 +59,8 @@ React & ReactDOM: **<a href="https://reactjs.org/docs/cdn-links.html" target="
59
59
  React Transition Group: **<a href="https://reactcommunity.org/react-transition-group/" target="_blank">戳这里获取</a>**
60
60
 
61
61
  ```
62
- <link ref="stylesheet" href="https://unpkg.com/@arco-design/mobile-react@2.30.0/dist/style.min.css">
63
- <script src="https://unpkg.com/@arco-design/mobile-react@2.30.0/dist/index.min.js"></script>
62
+ <link ref="stylesheet" href="https://unpkg.com/@arco-design/mobile-react@2.30.2/dist/style.min.css">
63
+ <script src="https://unpkg.com/@arco-design/mobile-react@2.30.2/dist/index.min.js"></script>
64
64
  ```
65
65
 
66
66
  ## 引入全部
@@ -99,7 +99,7 @@ export interface IFormDataMethods {
99
99
  * 注册表单项
100
100
  * @en Register field
101
101
  */
102
- registerField: (name: string, self: ReactNode) => () => void;
102
+ registerField: (name: string, self: any) => () => void;
103
103
  }
104
104
  export declare enum ValidateStatus {
105
105
  Init = "init",
@@ -130,7 +130,7 @@ export interface InternalHooks {
130
130
  * 注册表单项
131
131
  * @en Register field
132
132
  */
133
- registerField: (name: string, self: ReactNode) => () => void;
133
+ registerField: (name: string, self: any) => () => void;
134
134
  setInitialValues: (values: FieldItem) => void;
135
135
  setCallbacks: (callbacks: Callbacks) => void;
136
136
  }
@@ -18,6 +18,12 @@ export interface PreviewImageProps {
18
18
  * @en Transition image url
19
19
  */
20
20
  fallbackSrc?: string;
21
+ /**
22
+ * 过渡图到原图放大动效完成后,移除过渡图的延迟时间(ms),一般当原图过大时有调整需求
23
+ * @en After the transition image to the original image enlargement effect is completed, the delay time (ms) before the transition image is removed
24
+ * @default 30
25
+ */
26
+ transitionEndDelay?: number;
21
27
  /**
22
28
  * 缩略图填充方式(backgroundPosition),默认top center
23
29
  * @en Thumbnail fill mode (backgroundPosition), default value is top center
@@ -179,7 +179,7 @@ var ImagePreview = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
179
179
  transformersRef.current = []; // 移除过渡图片
180
180
  // @en Remove transition image
181
181
 
182
- removeChild(document.querySelector('.image-preview-fake-trans-image'));
182
+ removeChild(transImageRef.current);
183
183
  setTransImageInfo(null);
184
184
  setPlaceholders({});
185
185
  var mounted = isInitialMount.current;
@@ -222,7 +222,9 @@ var ImagePreview = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
222
222
 
223
223
  function removeChild(child) {
224
224
  try {
225
- child && document.body.removeChild(child);
225
+ var _domRef$current, _domRef$current$query, _domRef$current$query2;
226
+
227
+ child && ((_domRef$current = domRef.current) == null ? void 0 : (_domRef$current$query = _domRef$current.querySelectorAll('.carousel-item')) == null ? void 0 : (_domRef$current$query2 = _domRef$current$query[innerIndexRef.current]) == null ? void 0 : _domRef$current$query2.removeChild(child));
226
228
  } catch (e) {}
227
229
  } // 监听滑动到上下边缘后还在往外滑动的操作,则关闭弹窗
228
230
  // @en Monitor the operation of sliding out after sliding to the upper and lower edges, then close the popup
@@ -641,7 +643,41 @@ var ImagePreview = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
641
643
  }
642
644
  }
643
645
 
644
- var handleClick = (0, _helpers.useSingleAndDoubleClick)(handleImageClick, handleImageDoubleClick);
646
+ var handleClick = (0, _helpers.useSingleAndDoubleClick)(handleImageClick, handleImageDoubleClick); // 当使用 getThumbBounds 时,关闭图片预览有缩小效果
647
+ // @en When using getThumbBounds, closing the image preview has a shrinking effect
648
+
649
+ function animateBeforeClose() {
650
+ var _imagesRef$current$in2;
651
+
652
+ var index = innerIndexRef.current;
653
+ var imageDom = (_imagesRef$current$in2 = imagesRef.current[index]) == null ? void 0 : _imagesRef$current$in2.image;
654
+ var thumbBounds = getThumbBounds == null ? void 0 : getThumbBounds(index);
655
+
656
+ if (!imageDom || !thumbBounds || !thumbBounds.width || !thumbBounds.height) {
657
+ return;
658
+ } // 小图超过一半在视野外时,不展示缩小效果
659
+ // @en When more than half of the thumbnail is outside the field of view, the zoom effect will not be displayed
660
+
661
+
662
+ if (thumbBounds.top < -1 * thumbBounds.height / 2 || thumbBounds.top > windowHeight - thumbBounds.height / 2 || thumbBounds.left < -1 * thumbBounds.width / 2 || thumbBounds.left > windowWidth - thumbBounds.width / 2) {
663
+ return;
664
+ }
665
+
666
+ var imageDomRect = imageDom.getBoundingClientRect();
667
+
668
+ if (!imageDomRect.width || !imageDomRect.height) {
669
+ return;
670
+ }
671
+
672
+ imageDom.classList.add('closing-animation');
673
+ setImageBounds(imageDom, imageDomRect, imageDomRect);
674
+ imageDom.style.objectPosition = images[index].thumbPosition || 'top center';
675
+ (0, _mobileUtils.nextTick)(function () {
676
+ imageDom.style.transitionDuration = displayDuration + "ms";
677
+ imageDom.style.webkitTransitionDuration = displayDuration + "ms";
678
+ setImageBounds(imageDom, thumbBounds, imageDomRect);
679
+ });
680
+ }
645
681
 
646
682
  function goClose(e) {
647
683
  if (closingRef.current) {
@@ -649,6 +685,7 @@ var ImagePreview = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
649
685
  }
650
686
 
651
687
  closingRef.current = true;
688
+ animateBeforeClose();
652
689
  close(e);
653
690
  }
654
691
  /**
@@ -671,7 +708,7 @@ var ImagePreview = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
671
708
 
672
709
 
673
710
  function setDisplayAnimation(index) {
674
- var _imagesStatusRef$curr4;
711
+ var _imagesStatusRef$curr4, _domRef$current2, _domRef$current2$quer, _domRef$current2$quer2;
675
712
 
676
713
  var firstLoaded = (_imagesStatusRef$curr4 = imagesStatusRef.current[index]) == null ? void 0 : _imagesStatusRef$curr4.firstLoaded;
677
714
  var fallbackSrc = replaceFallbackWhenLoaded && firstLoaded ? images[index].src : images[index].fallbackSrc; // 用户设置了getThumbBounds和images的fallbackSrc属性才有放大过渡效果
@@ -702,7 +739,7 @@ var ImagePreview = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
702
739
  transImage.style.opacity = '0';
703
740
  transImage.style.transitionDuration = displayDuration + "ms";
704
741
  transImage.style.webkitTransitionDuration = displayDuration + "ms";
705
- document.body.appendChild(transImage); // 拿到放大之后的位置rect,没拿到就取消小图放大效果
742
+ (_domRef$current2 = domRef.current) == null ? void 0 : (_domRef$current2$quer = _domRef$current2.querySelectorAll('.carousel-item')) == null ? void 0 : (_domRef$current2$quer2 = _domRef$current2$quer[index]) == null ? void 0 : _domRef$current2$quer2.prepend(transImage); // 拿到放大之后的位置rect,没拿到就取消小图放大效果
706
743
  // @en Get the zoomed-in position rect, and cancel the zoom-in effect if not getting it
707
744
 
708
745
  getNewImageBounds(index, fallbackSrc, transImage, function (rect) {
@@ -724,9 +761,10 @@ var ImagePreview = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
724
761
  return (0, _extends5.default)({}, holders, (_extends3 = {}, _extends3[index] = true, _extends3));
725
762
  });
726
763
  }, Math.max(0, displayDuration - 80));
764
+ var transitionEndDelay = images[index].transitionEndDelay || 30;
727
765
  setTimeout(function () {
728
766
  resetAnimation(index);
729
- }, displayDuration + 30);
767
+ }, displayDuration + transitionEndDelay);
730
768
  });
731
769
  });
732
770
  }
@@ -886,18 +924,14 @@ var ImagePreview = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
886
924
  }) : null;
887
925
  }
888
926
 
889
- function renderLoadingArea(index) {
890
- // loadingArea提出来,放到过渡图上层
891
- // @en The loadingArea is extracted and placed on the upper layer of the transition image
892
- return index === openIndex ? /*#__PURE__*/_react.default.createElement(_portal.default, {
893
- getContainer: getContainer
894
- }, /*#__PURE__*/_react.default.createElement("div", {
927
+ function renderLoadingArea() {
928
+ return /*#__PURE__*/_react.default.createElement("div", {
895
929
  className: "image-preview-loading-area"
896
930
  }, loadingArea || /*#__PURE__*/_react.default.createElement(_loading.default, {
897
931
  type: "circle",
898
932
  className: "loading-icon",
899
933
  radius: 7
900
- }))) : loadingArea;
934
+ }));
901
935
  }
902
936
 
903
937
  return /*#__PURE__*/_react.default.createElement(_contextProvider.ContextLayout, null, function (_ref3) {
@@ -945,7 +979,7 @@ var ImagePreview = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
945
979
  imagesRef.current[index] = r;
946
980
  },
947
981
  showLoading: showLoading,
948
- loadingArea: renderLoadingArea(index),
982
+ loadingArea: renderLoadingArea(),
949
983
  errorArea: errorArea,
950
984
  showError: showError,
951
985
  retryTime: retryTime,
@@ -575,6 +575,7 @@
575
575
  height: 100%;
576
576
  opacity: 0;
577
577
  }
578
+ .arco-image-preview .image-container img.closing-animation,
578
579
  .image-preview-fake-trans-image {
579
580
  position: fixed;
580
581
  left: 0;
@@ -584,7 +585,7 @@
584
585
  transition: all cubic-bezier(0.34, 0.69, 0.1, 1) ;
585
586
  will-change: transform;
586
587
  pointer-events: none;
587
- z-index: 1001;
588
+ height: auto !important;
588
589
  }
589
590
  .image-preview-loading-area {
590
591
  position: fixed;
@@ -77,6 +77,7 @@
77
77
  opacity: 0;
78
78
  }
79
79
 
80
+ .@{prefix}-image-preview .image-container img.closing-animation,
80
81
  .image-preview-fake-trans-image {
81
82
  position: fixed;
82
83
  left: 0;
@@ -85,7 +86,7 @@
85
86
  .use-var(transition, image-preview-thumb-transition);
86
87
  will-change: transform;
87
88
  pointer-events: none;
88
- z-index: @full-screen-z-index + 1;
89
+ height: auto !important;
89
90
  }
90
91
 
91
92
  .image-preview-loading-area {
@@ -7,19 +7,29 @@ exports.default = void 0;
7
7
 
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
 
10
+ var _mobileUtils = require("@arco-design/mobile-utils");
11
+
12
+ var _contextProvider = require("../context-provider");
13
+
10
14
  function BackArrow(_ref) {
11
15
  var _ref$color = _ref.color,
12
16
  color = _ref$color === void 0 ? 'currentColor' : _ref$color;
13
- return /*#__PURE__*/_react.default.createElement("div", {
14
- className: "c-svg-arrow nav-bar-back"
15
- }, /*#__PURE__*/_react.default.createElement("svg", {
16
- height: "100%",
17
- viewBox: "0 0 16 16"
18
- }, /*#__PURE__*/_react.default.createElement("path", {
19
- id: "path-1_1_",
20
- d: "M2.1,8l5.4,5.4c0.1,0.1,0.1,0.3,0,0.5L7,14.4c-0.1,0.1-0.3,0.1-0.5,0L0.7,8.5c-0.3-0.3-0.3-0.7,0-0.9 l5.9-5.9c0.1-0.1,0.3-0.1,0.5,0l0.5,0.5c0.1,0.1,0.1,0.3,0,0.5L2.1,8z",
21
- fill: color
22
- })));
17
+ return /*#__PURE__*/_react.default.createElement(_contextProvider.ContextLayout, null, function (_ref2) {
18
+ var _ref2$locale = _ref2.locale,
19
+ locale = _ref2$locale === void 0 ? _mobileUtils.defaultLocale : _ref2$locale;
20
+ return /*#__PURE__*/_react.default.createElement("div", {
21
+ role: "button",
22
+ className: "c-svg-arrow nav-bar-back",
23
+ "aria-label": locale.NavBar.backBtnAriaLabel
24
+ }, /*#__PURE__*/_react.default.createElement("svg", {
25
+ height: "100%",
26
+ viewBox: "0 0 16 16"
27
+ }, /*#__PURE__*/_react.default.createElement("path", {
28
+ id: "path-1_1_",
29
+ d: "M2.1,8l5.4,5.4c0.1,0.1,0.1,0.3,0,0.5L7,14.4c-0.1,0.1-0.3,0.1-0.5,0L0.7,8.5c-0.3-0.3-0.3-0.7,0-0.9 l5.9-5.9c0.1-0.1,0.3-0.1,0.5,0l0.5,0.5c0.1,0.1,0.1,0.3,0,0.5L2.1,8z",
30
+ fill: color
31
+ })));
32
+ });
23
33
  }
24
34
 
25
35
  var _default = BackArrow;
@@ -301,7 +301,7 @@ var PickerCell = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
301
301
  function getCurrentCellValue() {
302
302
  var _data$currentIndex;
303
303
 
304
- return currentValue || ((_data$currentIndex = data[currentIndex]) == null ? void 0 : _data$currentIndex.value);
304
+ return (_data$currentIndex = data[currentIndex]) == null ? void 0 : _data$currentIndex.value;
305
305
  }
306
306
 
307
307
  function _clearTimer() {
@@ -131,7 +131,7 @@ var PickerView = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
131
131
  // @en Remove empty values from cascader
132
132
 
133
133
  return curValues.filter(function (v) {
134
- return v;
134
+ return v !== undefined;
135
135
  });
136
136
  };
137
137
 
@@ -549,6 +549,10 @@
549
549
  font-size: 0.4rem;
550
550
  line-height: 1;
551
551
  }
552
+ [dir="rtl"] .arco-popover-menu-icon {
553
+ margin-right: initial;
554
+ margin-left: 0.16rem;
555
+ }
552
556
  .arco-popover-menu-icon > * {
553
557
  float: left;
554
558
  }
@@ -634,7 +638,6 @@
634
638
  width: -webkit-max-content;
635
639
  width: max-content;
636
640
  z-index: 1010;
637
- right: 0;
638
641
  background-color: transparent;
639
642
  visibility: hidden;
640
643
  will-change: transform;
@@ -716,11 +719,15 @@
716
719
  padding: 0 0.2rem 0 0.22rem ;
717
720
  }
718
721
  .arco-popover-inner .text-suffix {
719
- padding: 0 0.24rem 0 0 ;
722
+ padding-right: 0.24rem ;
720
723
  -webkit-box-flex: 0;
721
724
  -webkit-flex: 0 0 auto;
722
725
  flex: 0 0 auto;
723
726
  }
727
+ [dir="rtl"] .arco-popover-inner .text-suffix {
728
+ padding-right: initial;
729
+ padding-left: 0.24rem ;
730
+ }
724
731
  .arco-popover-inner .popover-arrow {
725
732
  position: absolute;
726
733
  -webkit-transform: rotate(45deg);
@@ -549,6 +549,10 @@
549
549
  font-size: 0.4rem;
550
550
  line-height: 1;
551
551
  }
552
+ [dir="rtl"] .arco-popover-menu-icon {
553
+ margin-right: initial;
554
+ margin-left: 0.16rem;
555
+ }
552
556
  .arco-popover-menu-icon > * {
553
557
  float: left;
554
558
  }
@@ -29,7 +29,6 @@
29
29
  position: absolute;
30
30
  width: max-content;
31
31
  z-index: @full-screen-z-index + 10;
32
- right: 0;
33
32
  background-color: transparent;
34
33
  visibility: hidden;
35
34
  will-change: transform;
@@ -104,7 +103,7 @@
104
103
  }
105
104
 
106
105
  .text-suffix {
107
- .use-var(padding, popover-text-suffix-padding);
106
+ .use-var-with-rtl(padding-right, popover-text-suffix-edge);
108
107
  flex: 0 0 auto;
109
108
  }
110
109
 
@@ -32,7 +32,7 @@
32
32
  }
33
33
  }
34
34
  &-icon {
35
- .rem(margin-right, 8);
35
+ .rem-with-rtl(margin-right, 8);
36
36
  .rem(font-size, 20);
37
37
  line-height: 1;
38
38
  & > * {
@@ -7,6 +7,8 @@ var _react = require("react");
7
7
 
8
8
  var _ = require(".");
9
9
 
10
+ var _contextProvider = require("../../context-provider");
11
+
10
12
  var IsTouchingStatus;
11
13
 
12
14
  (function (IsTouchingStatus) {
@@ -22,13 +24,16 @@ var useSliderEvents = function useSliderEvents(_ref) {
22
24
  setValueGroup = _ref.setValueGroup,
23
25
  setCommonIsTouching = _ref.setCommonIsTouching;
24
26
 
25
- var _useContext = (0, _react.useContext)(_.SliderContext),
26
- disabled = _useContext.disabled,
27
- step = _useContext.step,
28
- min = _useContext.min,
29
- max = _useContext.max,
30
- type = _useContext.type,
31
- draggableTrackOnly = _useContext.draggableTrackOnly;
27
+ var _useContext = (0, _react.useContext)(_contextProvider.GlobalContext),
28
+ useRtl = _useContext.useRtl;
29
+
30
+ var _useContext2 = (0, _react.useContext)(_.SliderContext),
31
+ disabled = _useContext2.disabled,
32
+ step = _useContext2.step,
33
+ min = _useContext2.min,
34
+ max = _useContext2.max,
35
+ type = _useContext2.type,
36
+ draggableTrackOnly = _useContext2.draggableTrackOnly;
32
37
 
33
38
  var _useState = (0, _react.useState)(IsTouchingStatus.Idle),
34
39
  isTouching = _useState[0],
@@ -54,7 +59,8 @@ var useSliderEvents = function useSliderEvents(_ref) {
54
59
  length = _linePositionRef$curr.length,
55
60
  start = _linePositionRef$curr.start;
56
61
  if (length === 0) return 0;
57
- var newWidth = isHorizontal ? touchPosition - start : length - touchPosition + start;
62
+ var rtlRatio = useRtl ? -1 : 1;
63
+ var newWidth = isHorizontal ? (touchPosition - start) * rtlRatio : length - touchPosition + start;
58
64
 
59
65
  if (newWidth < 0) {
60
66
  newWidth = 0;
@@ -7,17 +7,22 @@ var _react = require("react");
7
7
 
8
8
  var _ = require(".");
9
9
 
10
+ var _contextProvider = require("../../context-provider");
11
+
10
12
  var useSliderStyle = function useSliderStyle(_ref) {
11
13
  var getLinePosition = _ref.getLinePosition,
12
14
  commonIsTouching = _ref.commonIsTouching,
13
15
  valueGroup = _ref.valueGroup;
14
16
 
15
- var _useContext = (0, _react.useContext)(_.SliderContext),
16
- size = _useContext.size,
17
- useAnimation = _useContext.useAnimation,
18
- min = _useContext.min,
19
- max = _useContext.max,
20
- type = _useContext.type;
17
+ var _useContext = (0, _react.useContext)(_contextProvider.GlobalContext),
18
+ useRtl = _useContext.useRtl;
19
+
20
+ var _useContext2 = (0, _react.useContext)(_.SliderContext),
21
+ size = _useContext2.size,
22
+ useAnimation = _useContext2.useAnimation,
23
+ min = _useContext2.min,
24
+ max = _useContext2.max,
25
+ type = _useContext2.type;
21
26
 
22
27
  var isHorizontal = /^horizontal/g.test(type);
23
28
  var heightStyle = (0, _react.useMemo)(function () {
@@ -51,7 +56,8 @@ var useSliderStyle = function useSliderStyle(_ref) {
51
56
  length = (larger - min) / (max - min) * length - start;
52
57
  }
53
58
 
54
- return _ref3 = {}, _ref3[isHorizontal ? 'left' : 'bottom'] = start + "px", _ref3[isHorizontal ? 'width' : 'height'] = Math.abs(length) + "px", _ref3;
59
+ var leftStyle = useRtl ? 'right' : 'left';
60
+ return _ref3 = {}, _ref3[isHorizontal ? leftStyle : 'bottom'] = start + "px", _ref3[isHorizontal ? 'width' : 'height'] = Math.abs(length) + "px", _ref3;
55
61
  }, [valueGroup, getLinePosition, min, max, isHorizontal]);
56
62
  return {
57
63
  heightStyle: heightStyle,
@@ -26,7 +26,8 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
26
26
  var Slider = /*#__PURE__*/(0, _react.forwardRef)(function (_, ref) {
27
27
  var _useContext = (0, _react.useContext)(_contextProvider.GlobalContext),
28
28
  _useContext$prefixCls = _useContext.prefixCls,
29
- prefixCls = _useContext$prefixCls === void 0 ? '' : _useContext$prefixCls;
29
+ prefixCls = _useContext$prefixCls === void 0 ? '' : _useContext$prefixCls,
30
+ useRtl = _useContext.useRtl;
30
31
 
31
32
  var _useContext2 = (0, _react.useContext)(_hooks.SliderContext),
32
33
  className = _useContext2.className,
@@ -77,9 +78,10 @@ var Slider = /*#__PURE__*/(0, _react.forwardRef)(function (_, ref) {
77
78
  top = _ref.top,
78
79
  height = _ref.height;
79
80
 
81
+ var leftValue = useRtl ? left + width : left;
80
82
  return {
81
83
  length: isHorizontal ? width : height,
82
- start: isHorizontal ? left : top
84
+ start: isHorizontal ? leftValue : top
83
85
  };
84
86
  }, [isHorizontal, firstRender]);
85
87
 
@@ -28,7 +28,8 @@ function Marks(_ref) {
28
28
 
29
29
  var _useContext = (0, _react.useContext)(_contextProvider.GlobalContext),
30
30
  _useContext$prefixCls = _useContext.prefixCls,
31
- prefixCls = _useContext$prefixCls === void 0 ? '' : _useContext$prefixCls;
31
+ prefixCls = _useContext$prefixCls === void 0 ? '' : _useContext$prefixCls,
32
+ useRtl = _useContext.useRtl;
32
33
 
33
34
  var _useContext2 = (0, _react.useContext)(_hooks.SliderContext),
34
35
  type = _useContext2.type,
@@ -40,7 +41,8 @@ function Marks(_ref) {
40
41
  var genMarkStyle = (0, _react.useCallback)(function (value) {
41
42
  var _ref2;
42
43
 
43
- return _ref2 = {}, _ref2[isHorizontal ? 'left' : 'bottom'] = (value - min) / (max - min) * 100 + "%", _ref2;
44
+ var leftStyle = useRtl ? 'right' : 'left';
45
+ return _ref2 = {}, _ref2[isHorizontal ? leftStyle : 'bottom'] = (value - min) / (max - min) * 100 + "%", _ref2;
44
46
  }, [isHorizontal, min, max]);
45
47
  return /*#__PURE__*/_react.default.createElement("div", {
46
48
  className: prefixCls + "-slider-marks"
@@ -541,6 +541,10 @@
541
541
  .is-horizontal .arco-slider-label {
542
542
  margin-right: 0.24rem ;
543
543
  }
544
+ [dir="rtl"] .is-horizontal .arco-slider-label {
545
+ margin-right: initial;
546
+ margin-left: 0.24rem ;
547
+ }
544
548
  .is-vertical .arco-slider-label {
545
549
  -webkit-box-orient: vertical;
546
550
  -webkit-box-direction: normal;
@@ -552,6 +556,10 @@
552
556
  margin-right: 0;
553
557
  margin-left: 0.24rem ;
554
558
  }
559
+ [dir="rtl"] .is-horizontal .arco-slider-wrapper + .arco-slider-label {
560
+ margin-left: initial;
561
+ margin-right: 0.24rem ;
562
+ }
555
563
  .is-vertical .arco-slider-wrapper + .arco-slider-label {
556
564
  margin-bottom: 0;
557
565
  margin-top: 0.24rem ;
@@ -636,11 +644,27 @@
636
644
  -webkit-transform: translateX(50%);
637
645
  transform: translateX(50%);
638
646
  }
647
+ [dir="rtl"] .is-horizontal .arco-slider-thumb-wrapper.is-end {
648
+ right: initial;
649
+ left: 0;
650
+ }
651
+ [dir="rtl"] .is-horizontal .arco-slider-thumb-wrapper.is-end {
652
+ -webkit-transform: translateX(-50%);
653
+ transform: translateX(-50%);
654
+ }
639
655
  .is-horizontal .arco-slider-thumb-wrapper.is-start {
640
656
  left: 0;
641
657
  -webkit-transform: translateX(-50%);
642
658
  transform: translateX(-50%);
643
659
  }
660
+ [dir="rtl"] .is-horizontal .arco-slider-thumb-wrapper.is-start {
661
+ left: initial;
662
+ right: 0;
663
+ }
664
+ [dir="rtl"] .is-horizontal .arco-slider-thumb-wrapper.is-start {
665
+ -webkit-transform: translateX(50%);
666
+ transform: translateX(50%);
667
+ }
644
668
  .arco-slider-popover-wrapper .arco-slider-thumb {
645
669
  position: relative;
646
670
  }
@@ -739,6 +763,10 @@
739
763
  -webkit-transform: translateX(-50%);
740
764
  transform: translateX(-50%);
741
765
  }
766
+ [dir="rtl"] .arco-slider-marks-item {
767
+ -webkit-transform: translateX(50%);
768
+ transform: translateX(50%);
769
+ }
742
770
  .arco-slider-marks-item.is-activated {
743
771
  background: #165DFF ;
744
772
  }
@@ -31,7 +31,7 @@
31
31
  .use-var(color, slider-text-color);
32
32
 
33
33
  .is-horizontal & {
34
- .use-var(margin-right, slider-label-gutter);
34
+ .use-var-with-rtl(margin-right, slider-label-gutter);
35
35
  }
36
36
 
37
37
  .is-vertical & {
@@ -44,7 +44,7 @@
44
44
 
45
45
  .is-horizontal & {
46
46
  margin-right: 0;
47
- .use-var(margin-left, slider-label-gutter);
47
+ .use-var-with-rtl(margin-left, slider-label-gutter);
48
48
  }
49
49
 
50
50
  .is-vertical & {
@@ -124,13 +124,19 @@
124
124
  bottom: 0;
125
125
 
126
126
  &.is-end {
127
- right: 0;
127
+ .set-prop-with-rtl(right, 0);
128
128
  transform: translateX(50%);
129
+ [dir="rtl"] & {
130
+ transform: translateX(-50%);
131
+ }
129
132
  }
130
133
 
131
134
  &.is-start {
132
- left: 0;
135
+ .set-prop-with-rtl(left, 0);
133
136
  transform: translateX(-50%);
137
+ [dir="rtl"] & {
138
+ transform: translateX(50%);
139
+ }
134
140
  }
135
141
  }
136
142
  }
@@ -236,6 +242,9 @@
236
242
  .use-var(border-radius, slider-mark-border-radius);
237
243
  .use-var(background, slider-line-color);
238
244
  transform: translateX(-50%);
245
+ [dir="rtl"] & {
246
+ transform: translateX(50%);
247
+ }
239
248
 
240
249
  &.is-activated {
241
250
  .use-var(background, slider-line-activated-color);