@arco-design/mobile-react 2.30.0 → 2.30.2

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 (391) 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/carousel/index.js +3 -1
  5. package/cjs/context-provider/index.d.ts +5 -1
  6. package/cjs/context-provider/index.js +10 -3
  7. package/cjs/form/form-item.js +15 -7
  8. package/cjs/form/type.d.ts +3 -2
  9. package/cjs/form/utils.d.ts +1 -0
  10. package/cjs/form/utils.js +6 -2
  11. package/cjs/nav-bar/back-icon.js +20 -10
  12. package/cjs/nav-bar/style/css/index.css +1 -1
  13. package/cjs/picker-view/components/picker-cell.js +1 -1
  14. package/cjs/picker-view/index.js +1 -1
  15. package/cjs/tabs/style/css/index.css +1 -1
  16. package/dist/index.js +57 -27
  17. package/dist/index.min.js +3 -3
  18. package/dist/style.css +3 -0
  19. package/dist/style.min.css +1 -1
  20. package/esm/carousel/index.js +3 -1
  21. package/esm/context-provider/index.d.ts +5 -1
  22. package/esm/context-provider/index.js +11 -4
  23. package/esm/form/form-item.js +15 -7
  24. package/esm/form/type.d.ts +3 -2
  25. package/esm/form/utils.d.ts +1 -0
  26. package/esm/form/utils.js +6 -2
  27. package/esm/nav-bar/back-icon.js +18 -10
  28. package/esm/nav-bar/style/css/index.css +1 -1
  29. package/esm/picker-view/components/picker-cell.js +1 -1
  30. package/esm/picker-view/index.js +1 -1
  31. package/esm/tabs/style/css/index.css +1 -1
  32. package/package.json +3 -3
  33. package/style/css/public.css +2 -0
  34. package/tokens/app/arcodesign/default/css-variables.less +4 -4
  35. package/tokens/app/arcodesign/default/index.js +4 -4
  36. package/tokens/app/arcodesign/default/index.json +10 -10
  37. package/tokens/app/arcodesign/default/index.less +4 -4
  38. package/umd/carousel/index.js +3 -1
  39. package/umd/context-provider/index.d.ts +5 -1
  40. package/umd/context-provider/index.js +10 -3
  41. package/umd/form/form-item.js +15 -7
  42. package/umd/form/type.d.ts +3 -2
  43. package/umd/form/utils.d.ts +1 -0
  44. package/umd/form/utils.js +6 -2
  45. package/umd/nav-bar/back-icon.js +20 -14
  46. package/umd/nav-bar/style/css/index.css +1 -1
  47. package/umd/picker-view/components/picker-cell.js +1 -1
  48. package/umd/picker-view/index.js +1 -1
  49. package/umd/tabs/style/css/index.css +1 -1
  50. package/cjs/action-sheet/demo/style/css/mobile.css +0 -523
  51. package/cjs/action-sheet/demo/style/mobile.less +0 -52
  52. package/cjs/avatar/demo/style/css/mobile.css +0 -578
  53. package/cjs/avatar/demo/style/mobile.less +0 -96
  54. package/cjs/badge/demo/style/css/mobile.css +0 -580
  55. package/cjs/badge/demo/style/mobile.less +0 -107
  56. package/cjs/button/demo/style/css/mobile.css +0 -530
  57. package/cjs/button/demo/style/mobile.less +0 -44
  58. package/cjs/carousel/demo/style/css/mobile.css +0 -553
  59. package/cjs/carousel/demo/style/mobile.less +0 -70
  60. package/cjs/cell/demo/style/css/mobile.css +0 -585
  61. package/cjs/cell/demo/style/mobile.less +0 -102
  62. package/cjs/checkbox/demo/style/css/mobile.css +0 -520
  63. package/cjs/checkbox/demo/style/mobile.less +0 -45
  64. package/cjs/circle-progress/demo/style/css/mobile.css +0 -516
  65. package/cjs/circle-progress/demo/style/mobile.less +0 -34
  66. package/cjs/collapse/demo/style/css/mobile.css +0 -516
  67. package/cjs/collapse/demo/style/mobile.less +0 -33
  68. package/cjs/context-provider/demo/style/css/mobile.css +0 -520
  69. package/cjs/context-provider/demo/style/mobile.less +0 -37
  70. package/cjs/count-down/demo/style/css/mobile.css +0 -575
  71. package/cjs/count-down/demo/style/mobile.less +0 -96
  72. package/cjs/date-picker/demo/style/css/mobile.css +0 -520
  73. package/cjs/date-picker/demo/style/mobile.less +0 -37
  74. package/cjs/dialog/demo/style/css/mobile.css +0 -547
  75. package/cjs/dialog/demo/style/mobile.less +0 -79
  76. package/cjs/divider/demo/style/css/mobile.css +0 -516
  77. package/cjs/divider/demo/style/mobile.less +0 -36
  78. package/cjs/dropdown/demo/style/css/mobile.css +0 -515
  79. package/cjs/dropdown/demo/style/mobile.less +0 -32
  80. package/cjs/dropdown-menu/demo/style/css/mobile.css +0 -516
  81. package/cjs/dropdown-menu/demo/style/mobile.less +0 -33
  82. package/cjs/ellipsis/demo/style/css/mobile.css +0 -528
  83. package/cjs/ellipsis/demo/style/mobile.less +0 -53
  84. package/cjs/grid/demo/style/css/mobile.css +0 -613
  85. package/cjs/grid/demo/style/mobile.less +0 -157
  86. package/cjs/image/demo/style/css/mobile.css +0 -580
  87. package/cjs/image/demo/style/mobile.less +0 -86
  88. package/cjs/image-picker/demo/style/css/mobile.css +0 -550
  89. package/cjs/image-picker/demo/style/mobile.less +0 -67
  90. package/cjs/image-preview/demo/style/css/mobile.css +0 -551
  91. package/cjs/image-preview/demo/style/mobile.less +0 -61
  92. package/cjs/index-bar/demo/style/css/mobile.css +0 -533
  93. package/cjs/index-bar/demo/style/mobile.less +0 -51
  94. package/cjs/input/demo/style/css/mobile.css +0 -584
  95. package/cjs/input/demo/style/mobile.less +0 -107
  96. package/cjs/keyboard/demo/style/css/mobile.css +0 -520
  97. package/cjs/keyboard/demo/style/mobile.less +0 -42
  98. package/cjs/load-more/demo/style/css/mobile.css +0 -520
  99. package/cjs/load-more/demo/style/mobile.less +0 -39
  100. package/cjs/loading/demo/style/css/mobile.css +0 -529
  101. package/cjs/loading/demo/style/mobile.less +0 -48
  102. package/cjs/masking/demo/style/css/mobile.css +0 -535
  103. package/cjs/masking/demo/style/mobile.less +0 -56
  104. package/cjs/nav-bar/demo/style/css/mobile.css +0 -523
  105. package/cjs/nav-bar/demo/style/mobile.less +0 -46
  106. package/cjs/notice-bar/demo/style/css/mobile.css +0 -4
  107. package/cjs/notice-bar/demo/style/mobile.less +0 -6
  108. package/cjs/notify/demo/style/css/mobile.css +0 -541
  109. package/cjs/notify/demo/style/mobile.less +0 -52
  110. package/cjs/pagination/demo/style/css/index.css +0 -516
  111. package/cjs/pagination/demo/style/index.less +0 -35
  112. package/cjs/picker/demo/style/css/mobile.css +0 -531
  113. package/cjs/picker/demo/style/mobile.less +0 -49
  114. package/cjs/picker-view/demo/style/css/mobile.css +0 -513
  115. package/cjs/picker-view/demo/style/mobile.less +0 -32
  116. package/cjs/popover/demo/style/css/mobile.css +0 -645
  117. package/cjs/popover/demo/style/mobile.less +0 -125
  118. package/cjs/popup/demo/style/css/mobile.css +0 -540
  119. package/cjs/popup/demo/style/mobile.less +0 -66
  120. package/cjs/popup-swiper/demo/style/css/mobile.css +0 -540
  121. package/cjs/popup-swiper/demo/style/mobile.less +0 -66
  122. package/cjs/portal/demo/style/css/mobile.css +0 -527
  123. package/cjs/portal/demo/style/mobile.less +0 -48
  124. package/cjs/progress/demo/style/css/mobile.css +0 -520
  125. package/cjs/progress/demo/style/mobile.less +0 -39
  126. package/cjs/pull-refresh/demo/style/css/mobile.css +0 -554
  127. package/cjs/pull-refresh/demo/style/mobile.less +0 -83
  128. package/cjs/radio/demo/style/css/mobile.css +0 -529
  129. package/cjs/radio/demo/style/mobile.less +0 -54
  130. package/cjs/rate/demo/style/css/mobile.css +0 -514
  131. package/cjs/rate/demo/style/mobile.less +0 -33
  132. package/cjs/search-bar/demo/style/css/mobile.css +0 -520
  133. package/cjs/search-bar/demo/style/mobile.less +0 -43
  134. package/cjs/show-monitor/demo/style/css/mobile.css +0 -569
  135. package/cjs/show-monitor/demo/style/mobile.less +0 -90
  136. package/cjs/skeleton/demo/style/css/mobile.css +0 -517
  137. package/cjs/skeleton/demo/style/mobile.less +0 -38
  138. package/cjs/slider/demo/style/css/mobile.css +0 -529
  139. package/cjs/slider/demo/style/mobile.less +0 -60
  140. package/cjs/stepper/demo/style/css/mobile.css +0 -514
  141. package/cjs/stepper/demo/style/mobile.less +0 -34
  142. package/cjs/steps/demo/style/css/mobile.css +0 -611
  143. package/cjs/steps/demo/style/mobile.less +0 -75
  144. package/cjs/sticky/demo/style/css/mobile.css +0 -527
  145. package/cjs/sticky/demo/style/mobile.less +0 -48
  146. package/cjs/swipe-action/demo/style/css/mobile.css +0 -515
  147. package/cjs/swipe-action/demo/style/mobile.less +0 -34
  148. package/cjs/swipe-load/demo/style/css/mobile.css +0 -580
  149. package/cjs/swipe-load/demo/style/mobile.less +0 -116
  150. package/cjs/switch/demo/style/css/mobile.css +0 -524
  151. package/cjs/switch/demo/style/mobile.less +0 -49
  152. package/cjs/tab-bar/demo/style/css/mobile.css +0 -553
  153. package/cjs/tab-bar/demo/style/mobile.less +0 -59
  154. package/cjs/tabs/demo/style/css/mobile.css +0 -629
  155. package/cjs/tabs/demo/style/mobile.less +0 -168
  156. package/cjs/tag/demo/style/css/mobile.css +0 -516
  157. package/cjs/tag/demo/style/mobile.less +0 -33
  158. package/cjs/textarea/demo/style/css/mobile.css +0 -523
  159. package/cjs/textarea/demo/style/mobile.less +0 -47
  160. package/cjs/toast/demo/style/css/mobile.css +0 -520
  161. package/cjs/toast/demo/style/mobile.less +0 -37
  162. package/cjs/transition/demo/style/css/mobile.css +0 -529
  163. package/cjs/transition/demo/style/mobile.less +0 -47
  164. package/esm/action-sheet/demo/style/css/mobile.css +0 -523
  165. package/esm/action-sheet/demo/style/mobile.less +0 -52
  166. package/esm/avatar/demo/style/css/mobile.css +0 -578
  167. package/esm/avatar/demo/style/mobile.less +0 -96
  168. package/esm/badge/demo/style/css/mobile.css +0 -580
  169. package/esm/badge/demo/style/mobile.less +0 -107
  170. package/esm/button/demo/style/css/mobile.css +0 -530
  171. package/esm/button/demo/style/mobile.less +0 -44
  172. package/esm/carousel/demo/style/css/mobile.css +0 -553
  173. package/esm/carousel/demo/style/mobile.less +0 -70
  174. package/esm/cell/demo/style/css/mobile.css +0 -585
  175. package/esm/cell/demo/style/mobile.less +0 -102
  176. package/esm/checkbox/demo/style/css/mobile.css +0 -520
  177. package/esm/checkbox/demo/style/mobile.less +0 -45
  178. package/esm/circle-progress/demo/style/css/mobile.css +0 -516
  179. package/esm/circle-progress/demo/style/mobile.less +0 -34
  180. package/esm/collapse/demo/style/css/mobile.css +0 -516
  181. package/esm/collapse/demo/style/mobile.less +0 -33
  182. package/esm/context-provider/demo/style/css/mobile.css +0 -520
  183. package/esm/context-provider/demo/style/mobile.less +0 -37
  184. package/esm/count-down/demo/style/css/mobile.css +0 -575
  185. package/esm/count-down/demo/style/mobile.less +0 -96
  186. package/esm/date-picker/demo/style/css/mobile.css +0 -520
  187. package/esm/date-picker/demo/style/mobile.less +0 -37
  188. package/esm/dialog/demo/style/css/mobile.css +0 -547
  189. package/esm/dialog/demo/style/mobile.less +0 -79
  190. package/esm/divider/demo/style/css/mobile.css +0 -516
  191. package/esm/divider/demo/style/mobile.less +0 -36
  192. package/esm/dropdown/demo/style/css/mobile.css +0 -515
  193. package/esm/dropdown/demo/style/mobile.less +0 -32
  194. package/esm/dropdown-menu/demo/style/css/mobile.css +0 -516
  195. package/esm/dropdown-menu/demo/style/mobile.less +0 -33
  196. package/esm/ellipsis/demo/style/css/mobile.css +0 -528
  197. package/esm/ellipsis/demo/style/mobile.less +0 -53
  198. package/esm/grid/demo/style/css/mobile.css +0 -613
  199. package/esm/grid/demo/style/mobile.less +0 -157
  200. package/esm/image/demo/style/css/mobile.css +0 -580
  201. package/esm/image/demo/style/mobile.less +0 -86
  202. package/esm/image-picker/demo/style/css/mobile.css +0 -550
  203. package/esm/image-picker/demo/style/mobile.less +0 -67
  204. package/esm/image-preview/demo/style/css/mobile.css +0 -551
  205. package/esm/image-preview/demo/style/mobile.less +0 -61
  206. package/esm/index-bar/demo/style/css/mobile.css +0 -533
  207. package/esm/index-bar/demo/style/mobile.less +0 -51
  208. package/esm/input/demo/style/css/mobile.css +0 -584
  209. package/esm/input/demo/style/mobile.less +0 -107
  210. package/esm/keyboard/demo/style/css/mobile.css +0 -520
  211. package/esm/keyboard/demo/style/mobile.less +0 -42
  212. package/esm/load-more/demo/style/css/mobile.css +0 -520
  213. package/esm/load-more/demo/style/mobile.less +0 -39
  214. package/esm/loading/demo/style/css/mobile.css +0 -529
  215. package/esm/loading/demo/style/mobile.less +0 -48
  216. package/esm/masking/demo/style/css/mobile.css +0 -535
  217. package/esm/masking/demo/style/mobile.less +0 -56
  218. package/esm/nav-bar/demo/style/css/mobile.css +0 -523
  219. package/esm/nav-bar/demo/style/mobile.less +0 -46
  220. package/esm/notice-bar/demo/style/css/mobile.css +0 -4
  221. package/esm/notice-bar/demo/style/mobile.less +0 -6
  222. package/esm/notify/demo/style/css/mobile.css +0 -541
  223. package/esm/notify/demo/style/mobile.less +0 -52
  224. package/esm/pagination/demo/style/css/index.css +0 -516
  225. package/esm/pagination/demo/style/index.less +0 -35
  226. package/esm/picker/demo/style/css/mobile.css +0 -531
  227. package/esm/picker/demo/style/mobile.less +0 -49
  228. package/esm/picker-view/demo/style/css/mobile.css +0 -513
  229. package/esm/picker-view/demo/style/mobile.less +0 -32
  230. package/esm/popover/demo/style/css/mobile.css +0 -645
  231. package/esm/popover/demo/style/mobile.less +0 -125
  232. package/esm/popup/demo/style/css/mobile.css +0 -540
  233. package/esm/popup/demo/style/mobile.less +0 -66
  234. package/esm/popup-swiper/demo/style/css/mobile.css +0 -540
  235. package/esm/popup-swiper/demo/style/mobile.less +0 -66
  236. package/esm/portal/demo/style/css/mobile.css +0 -527
  237. package/esm/portal/demo/style/mobile.less +0 -48
  238. package/esm/progress/demo/style/css/mobile.css +0 -520
  239. package/esm/progress/demo/style/mobile.less +0 -39
  240. package/esm/pull-refresh/demo/style/css/mobile.css +0 -554
  241. package/esm/pull-refresh/demo/style/mobile.less +0 -83
  242. package/esm/radio/demo/style/css/mobile.css +0 -529
  243. package/esm/radio/demo/style/mobile.less +0 -54
  244. package/esm/rate/demo/style/css/mobile.css +0 -514
  245. package/esm/rate/demo/style/mobile.less +0 -33
  246. package/esm/search-bar/demo/style/css/mobile.css +0 -520
  247. package/esm/search-bar/demo/style/mobile.less +0 -43
  248. package/esm/show-monitor/demo/style/css/mobile.css +0 -569
  249. package/esm/show-monitor/demo/style/mobile.less +0 -90
  250. package/esm/skeleton/demo/style/css/mobile.css +0 -517
  251. package/esm/skeleton/demo/style/mobile.less +0 -38
  252. package/esm/slider/demo/style/css/mobile.css +0 -529
  253. package/esm/slider/demo/style/mobile.less +0 -60
  254. package/esm/stepper/demo/style/css/mobile.css +0 -514
  255. package/esm/stepper/demo/style/mobile.less +0 -34
  256. package/esm/steps/demo/style/css/mobile.css +0 -611
  257. package/esm/steps/demo/style/mobile.less +0 -75
  258. package/esm/sticky/demo/style/css/mobile.css +0 -527
  259. package/esm/sticky/demo/style/mobile.less +0 -48
  260. package/esm/swipe-action/demo/style/css/mobile.css +0 -515
  261. package/esm/swipe-action/demo/style/mobile.less +0 -34
  262. package/esm/swipe-load/demo/style/css/mobile.css +0 -580
  263. package/esm/swipe-load/demo/style/mobile.less +0 -116
  264. package/esm/switch/demo/style/css/mobile.css +0 -524
  265. package/esm/switch/demo/style/mobile.less +0 -49
  266. package/esm/tab-bar/demo/style/css/mobile.css +0 -553
  267. package/esm/tab-bar/demo/style/mobile.less +0 -59
  268. package/esm/tabs/demo/style/css/mobile.css +0 -629
  269. package/esm/tabs/demo/style/mobile.less +0 -168
  270. package/esm/tag/demo/style/css/mobile.css +0 -516
  271. package/esm/tag/demo/style/mobile.less +0 -33
  272. package/esm/textarea/demo/style/css/mobile.css +0 -523
  273. package/esm/textarea/demo/style/mobile.less +0 -47
  274. package/esm/toast/demo/style/css/mobile.css +0 -520
  275. package/esm/toast/demo/style/mobile.less +0 -37
  276. package/esm/transition/demo/style/css/mobile.css +0 -529
  277. package/esm/transition/demo/style/mobile.less +0 -47
  278. package/umd/action-sheet/demo/style/css/mobile.css +0 -523
  279. package/umd/action-sheet/demo/style/mobile.less +0 -52
  280. package/umd/avatar/demo/style/css/mobile.css +0 -578
  281. package/umd/avatar/demo/style/mobile.less +0 -96
  282. package/umd/badge/demo/style/css/mobile.css +0 -580
  283. package/umd/badge/demo/style/mobile.less +0 -107
  284. package/umd/button/demo/style/css/mobile.css +0 -530
  285. package/umd/button/demo/style/mobile.less +0 -44
  286. package/umd/carousel/demo/style/css/mobile.css +0 -553
  287. package/umd/carousel/demo/style/mobile.less +0 -70
  288. package/umd/cell/demo/style/css/mobile.css +0 -585
  289. package/umd/cell/demo/style/mobile.less +0 -102
  290. package/umd/checkbox/demo/style/css/mobile.css +0 -520
  291. package/umd/checkbox/demo/style/mobile.less +0 -45
  292. package/umd/circle-progress/demo/style/css/mobile.css +0 -516
  293. package/umd/circle-progress/demo/style/mobile.less +0 -34
  294. package/umd/collapse/demo/style/css/mobile.css +0 -516
  295. package/umd/collapse/demo/style/mobile.less +0 -33
  296. package/umd/context-provider/demo/style/css/mobile.css +0 -520
  297. package/umd/context-provider/demo/style/mobile.less +0 -37
  298. package/umd/count-down/demo/style/css/mobile.css +0 -575
  299. package/umd/count-down/demo/style/mobile.less +0 -96
  300. package/umd/date-picker/demo/style/css/mobile.css +0 -520
  301. package/umd/date-picker/demo/style/mobile.less +0 -37
  302. package/umd/dialog/demo/style/css/mobile.css +0 -547
  303. package/umd/dialog/demo/style/mobile.less +0 -79
  304. package/umd/divider/demo/style/css/mobile.css +0 -516
  305. package/umd/divider/demo/style/mobile.less +0 -36
  306. package/umd/dropdown/demo/style/css/mobile.css +0 -515
  307. package/umd/dropdown/demo/style/mobile.less +0 -32
  308. package/umd/dropdown-menu/demo/style/css/mobile.css +0 -516
  309. package/umd/dropdown-menu/demo/style/mobile.less +0 -33
  310. package/umd/ellipsis/demo/style/css/mobile.css +0 -528
  311. package/umd/ellipsis/demo/style/mobile.less +0 -53
  312. package/umd/grid/demo/style/css/mobile.css +0 -613
  313. package/umd/grid/demo/style/mobile.less +0 -157
  314. package/umd/image/demo/style/css/mobile.css +0 -580
  315. package/umd/image/demo/style/mobile.less +0 -86
  316. package/umd/image-picker/demo/style/css/mobile.css +0 -550
  317. package/umd/image-picker/demo/style/mobile.less +0 -67
  318. package/umd/image-preview/demo/style/css/mobile.css +0 -551
  319. package/umd/image-preview/demo/style/mobile.less +0 -61
  320. package/umd/index-bar/demo/style/css/mobile.css +0 -533
  321. package/umd/index-bar/demo/style/mobile.less +0 -51
  322. package/umd/input/demo/style/css/mobile.css +0 -584
  323. package/umd/input/demo/style/mobile.less +0 -107
  324. package/umd/keyboard/demo/style/css/mobile.css +0 -520
  325. package/umd/keyboard/demo/style/mobile.less +0 -42
  326. package/umd/load-more/demo/style/css/mobile.css +0 -520
  327. package/umd/load-more/demo/style/mobile.less +0 -39
  328. package/umd/loading/demo/style/css/mobile.css +0 -529
  329. package/umd/loading/demo/style/mobile.less +0 -48
  330. package/umd/masking/demo/style/css/mobile.css +0 -535
  331. package/umd/masking/demo/style/mobile.less +0 -56
  332. package/umd/nav-bar/demo/style/css/mobile.css +0 -523
  333. package/umd/nav-bar/demo/style/mobile.less +0 -46
  334. package/umd/notice-bar/demo/style/css/mobile.css +0 -4
  335. package/umd/notice-bar/demo/style/mobile.less +0 -6
  336. package/umd/notify/demo/style/css/mobile.css +0 -541
  337. package/umd/notify/demo/style/mobile.less +0 -52
  338. package/umd/pagination/demo/style/css/index.css +0 -516
  339. package/umd/pagination/demo/style/index.less +0 -35
  340. package/umd/picker/demo/style/css/mobile.css +0 -531
  341. package/umd/picker/demo/style/mobile.less +0 -49
  342. package/umd/picker-view/demo/style/css/mobile.css +0 -513
  343. package/umd/picker-view/demo/style/mobile.less +0 -32
  344. package/umd/popover/demo/style/css/mobile.css +0 -645
  345. package/umd/popover/demo/style/mobile.less +0 -125
  346. package/umd/popup/demo/style/css/mobile.css +0 -540
  347. package/umd/popup/demo/style/mobile.less +0 -66
  348. package/umd/popup-swiper/demo/style/css/mobile.css +0 -540
  349. package/umd/popup-swiper/demo/style/mobile.less +0 -66
  350. package/umd/portal/demo/style/css/mobile.css +0 -527
  351. package/umd/portal/demo/style/mobile.less +0 -48
  352. package/umd/progress/demo/style/css/mobile.css +0 -520
  353. package/umd/progress/demo/style/mobile.less +0 -39
  354. package/umd/pull-refresh/demo/style/css/mobile.css +0 -554
  355. package/umd/pull-refresh/demo/style/mobile.less +0 -83
  356. package/umd/radio/demo/style/css/mobile.css +0 -529
  357. package/umd/radio/demo/style/mobile.less +0 -54
  358. package/umd/rate/demo/style/css/mobile.css +0 -514
  359. package/umd/rate/demo/style/mobile.less +0 -33
  360. package/umd/search-bar/demo/style/css/mobile.css +0 -520
  361. package/umd/search-bar/demo/style/mobile.less +0 -43
  362. package/umd/show-monitor/demo/style/css/mobile.css +0 -569
  363. package/umd/show-monitor/demo/style/mobile.less +0 -90
  364. package/umd/skeleton/demo/style/css/mobile.css +0 -517
  365. package/umd/skeleton/demo/style/mobile.less +0 -38
  366. package/umd/slider/demo/style/css/mobile.css +0 -529
  367. package/umd/slider/demo/style/mobile.less +0 -60
  368. package/umd/stepper/demo/style/css/mobile.css +0 -514
  369. package/umd/stepper/demo/style/mobile.less +0 -34
  370. package/umd/steps/demo/style/css/mobile.css +0 -611
  371. package/umd/steps/demo/style/mobile.less +0 -75
  372. package/umd/sticky/demo/style/css/mobile.css +0 -527
  373. package/umd/sticky/demo/style/mobile.less +0 -48
  374. package/umd/swipe-action/demo/style/css/mobile.css +0 -515
  375. package/umd/swipe-action/demo/style/mobile.less +0 -34
  376. package/umd/swipe-load/demo/style/css/mobile.css +0 -580
  377. package/umd/swipe-load/demo/style/mobile.less +0 -116
  378. package/umd/switch/demo/style/css/mobile.css +0 -524
  379. package/umd/switch/demo/style/mobile.less +0 -49
  380. package/umd/tab-bar/demo/style/css/mobile.css +0 -553
  381. package/umd/tab-bar/demo/style/mobile.less +0 -59
  382. package/umd/tabs/demo/style/css/mobile.css +0 -629
  383. package/umd/tabs/demo/style/mobile.less +0 -168
  384. package/umd/tag/demo/style/css/mobile.css +0 -516
  385. package/umd/tag/demo/style/mobile.less +0 -33
  386. package/umd/textarea/demo/style/css/mobile.css +0 -523
  387. package/umd/textarea/demo/style/mobile.less +0 -47
  388. package/umd/toast/demo/style/css/mobile.css +0 -520
  389. package/umd/toast/demo/style/mobile.less +0 -37
  390. package/umd/transition/demo/style/css/mobile.css +0 -529
  391. package/umd/transition/demo/style/mobile.less +0 -47
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
3
3
  var _excluded = ["children", "useDarkMode", "isDarkMode", "darkModeSelector", "theme", "locale", "onDarkModeChange"],
4
4
  _excluded2 = ["context"];
5
- import React, { createContext, useState, useEffect, useCallback, useMemo } from 'react';
5
+ import React, { createContext, useState, useEffect, useCallback, useMemo, useRef } from 'react';
6
6
  import { addCssRules, removeCssStyleDom, defaultLocale } from '@arco-design/mobile-utils';
7
7
  var DEFAULT_DARK_MODE_SELECTOR = 'arco-theme-dark';
8
8
  export var defaultContext = {
@@ -45,9 +45,15 @@ export default function ContextProvider(props) {
45
45
  isDarkModeState = _useState[0],
46
46
  setIsDarkModeState = _useState[1];
47
47
 
48
- var setDarkModeState = function setDarkModeState(isDark) {
48
+ var mountedRef = useRef(false);
49
+
50
+ var setDarkModeState = function setDarkModeState(isDark, needChange) {
51
+ if (needChange === void 0) {
52
+ needChange = true;
53
+ }
54
+
49
55
  setIsDarkModeState(isDark);
50
- onDarkModeChange && onDarkModeChange(isDark);
56
+ needChange && onDarkModeChange && onDarkModeChange(isDark);
51
57
  };
52
58
 
53
59
  var isDarkMode = useMemo(function () {
@@ -76,7 +82,7 @@ export default function ContextProvider(props) {
76
82
 
77
83
  if (useDarkMode) {
78
84
  var dark = matchMedia.matches;
79
- setDarkModeState(dark);
85
+ setDarkModeState(dark, mountedRef.current);
80
86
 
81
87
  if (typeof matchMedia.addEventListener === 'function') {
82
88
  matchMedia.addEventListener('change', changeDarkMode);
@@ -85,6 +91,7 @@ export default function ContextProvider(props) {
85
91
  }
86
92
  }
87
93
 
94
+ mountedRef.current = true;
88
95
  return function () {
89
96
  if (useDarkMode) {
90
97
  if (typeof matchMedia.removeEventListener === 'function') {
@@ -70,12 +70,14 @@ var FormItemInner = /*#__PURE__*/function (_PureComponent) {
70
70
  fieldValidator.validate((_fieldValidator$valid = {}, _fieldValidator$valid[field] = value, _fieldValidator$valid), function (errorsMap) {
71
71
  var _getErrorAndWarnings = getErrorAndWarnings((errorsMap == null ? void 0 : errorsMap[field]) || []),
72
72
  errors = _getErrorAndWarnings.errors,
73
- warnings = _getErrorAndWarnings.warnings;
73
+ warnings = _getErrorAndWarnings.warnings,
74
+ errorTypes = _getErrorAndWarnings.errorTypes;
74
75
 
75
76
  _this._errors = errors;
76
77
  onValidateStatusChange({
77
78
  errors: _this._errors,
78
- warnings: warnings
79
+ warnings: warnings,
80
+ errorTypes: errorTypes
79
81
  });
80
82
  return resolve({
81
83
  errors: _this._errors,
@@ -319,16 +321,22 @@ export default /*#__PURE__*/forwardRef(function (props, ref) {
319
321
  errors = _useState[0],
320
322
  setErrors = _useState[1];
321
323
 
322
- var _useState2 = useState([]),
323
- warnings = _useState2[0],
324
- setWarnings = _useState2[1];
324
+ var _useState2 = useState(null),
325
+ errorTypes = _useState2[0],
326
+ setErrorTypes = _useState2[1];
327
+
328
+ var _useState3 = useState([]),
329
+ warnings = _useState3[0],
330
+ setWarnings = _useState3[1];
325
331
 
326
332
  var formItemRef = useRef(null);
327
333
 
328
334
  var onValidateStatusChange = function onValidateStatusChange(validateResult) {
329
335
  var _errors = validateResult.errors,
330
- _warnings = validateResult.warnings;
336
+ _warnings = validateResult.warnings,
337
+ _errorTypes = validateResult.errorTypes;
331
338
  setErrors(_errors.length ? _errors[0] : null);
339
+ setErrorTypes(_errorTypes.length ? _errorTypes[0] : null);
332
340
  setWarnings(_warnings);
333
341
  };
334
342
 
@@ -350,7 +358,7 @@ export default /*#__PURE__*/forwardRef(function (props, ref) {
350
358
  return /*#__PURE__*/React.createElement("div", {
351
359
  className: cls(prefixCls + "-form-item", prefixCls + "-form-item-" + (itemLayout || layout), className, (_cls = {
352
360
  disabled: fieldDisabled
353
- }, _cls[prefixCls + "-form-item-error"] = !!errors, _cls[prefixCls + "-form-item-warning"] = Boolean(!errors && warnings), _cls)),
361
+ }, _cls[prefixCls + "-form-item-error"] = !!errors, _cls[prefixCls + "-form-item-warning"] = Boolean(!errors && warnings), _cls[prefixCls + "-form-item-error-" + errorTypes] = errorTypes, _cls)),
354
362
  style: style,
355
363
  ref: formItemRef
356
364
  }, /*#__PURE__*/React.createElement("div", {
@@ -344,8 +344,9 @@ export interface IFormItemInnerProps {
344
344
  * @en The callback when validating status changes
345
345
  */
346
346
  onValidateStatusChange: (data: {
347
- errors: any;
348
- warnings: any;
347
+ errors: ReactNode[];
348
+ warnings: ReactNode[];
349
+ errorTypes: string[];
349
350
  }) => void;
350
351
  /**
351
352
  * 获取内部表单项的dom
@@ -3,4 +3,5 @@ export declare const isFieldRequired: (rules?: IRules[]) => boolean;
3
3
  export declare const getErrorAndWarnings: (result: ValidatorError[]) => {
4
4
  warnings: string[];
5
5
  errors: string[];
6
+ errorTypes: string[];
6
7
  };
package/esm/form/utils.js CHANGED
@@ -10,11 +10,13 @@ export var isFieldRequired = function isFieldRequired(rules) {
10
10
  export var getErrorAndWarnings = function getErrorAndWarnings(result) {
11
11
  var errors = [];
12
12
  var warnings = [];
13
+ var errorTypes = [];
13
14
  result.map(function (_ref) {
14
15
  var _ref$message = _ref.message,
15
16
  message = _ref$message === void 0 ? [] : _ref$message,
16
17
  _ref$validateLevel = _ref.validateLevel,
17
- validateLevel = _ref$validateLevel === void 0 ? 'error' : _ref$validateLevel;
18
+ validateLevel = _ref$validateLevel === void 0 ? 'error' : _ref$validateLevel,
19
+ resultErrorTypes = _ref.errorTypes;
18
20
 
19
21
  if (!(message != null && message.length)) {
20
22
  return;
@@ -24,10 +26,12 @@ export var getErrorAndWarnings = function getErrorAndWarnings(result) {
24
26
  warnings = [].concat(warnings, message);
25
27
  } else {
26
28
  errors = [].concat(errors, message);
29
+ errorTypes = [].concat(errorTypes, resultErrorTypes);
27
30
  }
28
31
  });
29
32
  return {
30
33
  warnings: warnings,
31
- errors: errors
34
+ errors: errors,
35
+ errorTypes: errorTypes
32
36
  };
33
37
  };
@@ -1,18 +1,26 @@
1
1
  import React from 'react';
2
+ import { defaultLocale } from '@arco-design/mobile-utils';
3
+ import { ContextLayout } from '../context-provider';
2
4
 
3
5
  function BackArrow(_ref) {
4
6
  var _ref$color = _ref.color,
5
7
  color = _ref$color === void 0 ? 'currentColor' : _ref$color;
6
- return /*#__PURE__*/React.createElement("div", {
7
- className: "c-svg-arrow nav-bar-back"
8
- }, /*#__PURE__*/React.createElement("svg", {
9
- height: "100%",
10
- viewBox: "0 0 16 16"
11
- }, /*#__PURE__*/React.createElement("path", {
12
- id: "path-1_1_",
13
- 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",
14
- fill: color
15
- })));
8
+ return /*#__PURE__*/React.createElement(ContextLayout, null, function (_ref2) {
9
+ var _ref2$locale = _ref2.locale,
10
+ locale = _ref2$locale === void 0 ? defaultLocale : _ref2$locale;
11
+ return /*#__PURE__*/React.createElement("div", {
12
+ role: "button",
13
+ className: "c-svg-arrow nav-bar-back",
14
+ "aria-label": locale.NavBar.backBtnAriaLabel
15
+ }, /*#__PURE__*/React.createElement("svg", {
16
+ height: "100%",
17
+ viewBox: "0 0 16 16"
18
+ }, /*#__PURE__*/React.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
+ })));
23
+ });
16
24
  }
17
25
 
18
26
  export default BackArrow;
@@ -650,7 +650,7 @@
650
650
  }
651
651
  .arco-theme-dark .arco-nav-bar {
652
652
  color: #f6f6f6 ;
653
- background: #232324 ;
653
+ background: #17171A ;
654
654
  }
655
655
  .arco-theme-dark .arco-nav-bar-wrapper.arco-nav-bar-wrapper-border {
656
656
  position: relative;
@@ -286,7 +286,7 @@ var PickerCell = /*#__PURE__*/forwardRef(function (props, ref) {
286
286
  function getCurrentCellValue() {
287
287
  var _data$currentIndex;
288
288
 
289
- return currentValue || ((_data$currentIndex = data[currentIndex]) == null ? void 0 : _data$currentIndex.value);
289
+ return (_data$currentIndex = data[currentIndex]) == null ? void 0 : _data$currentIndex.value;
290
290
  }
291
291
 
292
292
  function _clearTimer() {
@@ -94,7 +94,7 @@ var PickerView = /*#__PURE__*/forwardRef(function (props, ref) {
94
94
  // @en Remove empty values from cascader
95
95
 
96
96
  return curValues.filter(function (v) {
97
- return v;
97
+ return v !== undefined;
98
98
  });
99
99
  };
100
100
 
@@ -1052,7 +1052,7 @@
1052
1052
  color: #f6f6f6 ;
1053
1053
  }
1054
1054
  .arco-theme-dark .arco-tab-cell-container-wrap {
1055
- background: #232324 ;
1055
+ background: #17171A ;
1056
1056
  }
1057
1057
  .arco-theme-dark .arco-tab-cell-container-inner.has-divider.pos-top {
1058
1058
  box-shadow: 0 -1PX 0 0 #484849 inset;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arco-design/mobile-react",
3
- "version": "2.30.0",
3
+ "version": "2.30.2",
4
4
  "description": "",
5
5
  "main": "cjs/index.js",
6
6
  "module": "esm/index.js",
@@ -15,7 +15,7 @@
15
15
  "author": "taoyiyue@bytedance.com",
16
16
  "license": "ISC",
17
17
  "dependencies": {
18
- "@arco-design/mobile-utils": "2.17.0",
18
+ "@arco-design/mobile-utils": "2.17.2",
19
19
  "@arco-design/transformable": "^1.0.0",
20
20
  "lodash.throttle": "^4.1.1",
21
21
  "resize-observer-polyfill": "^1.5.1"
@@ -49,5 +49,5 @@
49
49
  "publishConfig": {
50
50
  "access": "public"
51
51
  },
52
- "gitHead": "1fcfc18668d480891d2fc6052b4dc2d84557e97e"
52
+ "gitHead": "41b5f19cac228f71b84b7a5df4dcdbd6262e2c46"
53
53
  }
@@ -536,6 +536,8 @@ input,
536
536
  textarea {
537
537
  border: 0;
538
538
  outline: 0;
539
+ appearance: auto;
540
+ -webkit-appearance: none;
539
541
  }
540
542
  code,
541
543
  kbd,
@@ -272,8 +272,8 @@
272
272
  --checkbox-text-disabled-opacity: 0.5;
273
273
  --checkbox-group-gutter: ~`pxtorem(24)`;
274
274
  --tabs-tab-bar-font-size: ~`pxtorem(15)`;
275
- --dark-tabs-tab-bar-background: var(--dark-container-background-color);
276
- --tabs-tab-bar-background: var(--container-background-color);
275
+ --dark-tabs-tab-bar-background: var(--dark-background-color);
276
+ --tabs-tab-bar-background: var(--background-color);
277
277
  --tabs-tab-bar-height: ~`pxtorem(42)`;
278
278
  --tabs-tab-bar-width: ~`pxtorem(78)`;
279
279
  --tabs-tab-bar-horizontal-height: ~`pxtorem(54)`;
@@ -318,8 +318,8 @@
318
318
  --nav-bar-height: ~`pxtorem(44)`;
319
319
  --dark-nav-bar-bottom-border-color: var(--dark-line-color);
320
320
  --nav-bar-bottom-border-color: var(--line-color);
321
- --dark-nav-bar-background: var(--dark-container-background-color);
322
- --nav-bar-background: var(--container-background-color);
321
+ --dark-nav-bar-background: var(--dark-background-color);
322
+ --nav-bar-background: var(--background-color);
323
323
  --dark-nav-bar-font-color: var(--dark-font-color);
324
324
  --nav-bar-font-color: var(--font-color);
325
325
  --nav-bar-two-sides-font-size: ~`pxtorem(16)`;
@@ -283,8 +283,8 @@ var tokens = {
283
283
  "checkbox-text-disabled-opacity": "0.5",
284
284
  "checkbox-group-gutter": "0.48rem",
285
285
  "tabs-tab-bar-font-size": "0.3rem",
286
- "dark-tabs-tab-bar-background": "var(--dark-container-background-color)",
287
- "tabs-tab-bar-background": "var(--container-background-color)",
286
+ "dark-tabs-tab-bar-background": "var(--dark-background-color)",
287
+ "tabs-tab-bar-background": "var(--background-color)",
288
288
  "tabs-tab-bar-height": "0.84rem",
289
289
  "tabs-tab-bar-width": "1.56rem",
290
290
  "tabs-tab-bar-horizontal-height": "1.08rem",
@@ -329,8 +329,8 @@ var tokens = {
329
329
  "nav-bar-height": "0.88rem",
330
330
  "dark-nav-bar-bottom-border-color": "var(--dark-line-color)",
331
331
  "nav-bar-bottom-border-color": "var(--line-color)",
332
- "dark-nav-bar-background": "var(--dark-container-background-color)",
333
- "nav-bar-background": "var(--container-background-color)",
332
+ "dark-nav-bar-background": "var(--dark-background-color)",
333
+ "nav-bar-background": "var(--background-color)",
334
334
  "dark-nav-bar-font-color": "var(--dark-font-color)",
335
335
  "nav-bar-font-color": "var(--font-color)",
336
336
  "nav-bar-two-sides-font-size": "0.32rem",
@@ -3239,9 +3239,9 @@
3239
3239
  "cssKey": "dark-nav-bar-background",
3240
3240
  "desc": "",
3241
3241
  "override": "",
3242
- "value": "@dark-container-background-color",
3243
- "jsValue": "@global@darkContainerBackgroundColor",
3244
- "staticValue": "#232324"
3242
+ "value": "@dark-background-color",
3243
+ "jsValue": "@global@darkBackgroundColor",
3244
+ "staticValue": "#17171A"
3245
3245
  },
3246
3246
  "darkNavBarBottomBorderColor": {
3247
3247
  "cssKey": "dark-nav-bar-bottom-border-color",
@@ -4063,9 +4063,9 @@
4063
4063
  "cssKey": "dark-tabs-tab-bar-background",
4064
4064
  "desc": "",
4065
4065
  "override": "",
4066
- "value": "@dark-container-background-color",
4067
- "jsValue": "@global@darkContainerBackgroundColor",
4068
- "staticValue": "#232324"
4066
+ "value": "@dark-background-color",
4067
+ "jsValue": "@global@darkBackgroundColor",
4068
+ "staticValue": "#17171A"
4069
4069
  },
4070
4070
  "darkTabsTabBarCardColor": {
4071
4071
  "cssKey": "dark-tabs-tab-bar-card-color",
@@ -6737,8 +6737,8 @@
6737
6737
  "cssKey": "nav-bar-background",
6738
6738
  "desc": "navBar 背景色",
6739
6739
  "override": "",
6740
- "value": "@container-background-color",
6741
- "jsValue": "@global@containerBackgroundColor",
6740
+ "value": "@background-color",
6741
+ "jsValue": "@global@backgroundColor",
6742
6742
  "staticValue": "#FFFFFF",
6743
6743
  "localeDesc": {
6744
6744
  "ch": "navBar 背景色",
@@ -10709,8 +10709,8 @@
10709
10709
  "cssKey": "tabs-tab-bar-background",
10710
10710
  "desc": "tabs tabbar 背景色",
10711
10711
  "override": "tab-bar-background",
10712
- "value": "@container-background-color",
10713
- "jsValue": "@global@containerBackgroundColor",
10712
+ "value": "@background-color",
10713
+ "jsValue": "@global@backgroundColor",
10714
10714
  "staticValue": "#FFFFFF",
10715
10715
  "localeDesc": {
10716
10716
  "ch": "tabs tabbar 背景色",
@@ -271,8 +271,8 @@
271
271
  @checkbox-text-disabled-opacity: 0.5;
272
272
  @checkbox-group-gutter: ~`pxtorem(24)`;
273
273
  @tabs-tab-bar-font-size: ~`pxtorem(15)`;
274
- @dark-tabs-tab-bar-background: @dark-container-background-color;
275
- @tabs-tab-bar-background: @container-background-color;
274
+ @dark-tabs-tab-bar-background: @dark-background-color;
275
+ @tabs-tab-bar-background: @background-color;
276
276
  @tabs-tab-bar-height: ~`pxtorem(42)`;
277
277
  @tabs-tab-bar-width: ~`pxtorem(78)`;
278
278
  @tabs-tab-bar-horizontal-height: ~`pxtorem(54)`;
@@ -317,8 +317,8 @@
317
317
  @nav-bar-height: ~`pxtorem(44)`;
318
318
  @dark-nav-bar-bottom-border-color: @dark-line-color;
319
319
  @nav-bar-bottom-border-color: @line-color;
320
- @dark-nav-bar-background: @dark-container-background-color;
321
- @nav-bar-background: @container-background-color;
320
+ @dark-nav-bar-background: @dark-background-color;
321
+ @nav-bar-background: @background-color;
322
322
  @dark-nav-bar-font-color: @dark-font-color;
323
323
  @nav-bar-font-color: @font-color;
324
324
  @nav-bar-two-sides-font-size: ~`pxtorem(16)`;
@@ -742,7 +742,9 @@
742
742
  // @en When noLoop is used, the blank space of spaceBetween needs to be exposed at the end, so when sliding to the last one, the transform value moves to the left by the corresponding width
743
743
 
744
744
  var translateDis = noLoop ? noLoopDis - (total > 1 && index === total - 1 ? spaceBetween : 0) * rtlRatio : dis;
745
- var transStr = childSize > 0 ? translateDis + "px" : "-" + index * 100 + "%";
745
+ var initTranslateDis = -1 * index * 100; // bugfix: prop `style` did not match in ssr
746
+
747
+ var transStr = childSize > 0 ? "" + translateDis + (translateDis ? 'px' : '') : "" + initTranslateDis + (initTranslateDis ? '%' : '');
746
748
 
747
749
  if (vertical) {
748
750
  var _translateStyle = (0, _helpers.getStyleWithVendor)({
@@ -47,11 +47,15 @@ export interface GlobalContextParams {
47
47
  * @default false
48
48
  */
49
49
  useRtl?: boolean;
50
+ /**
51
+ * 当系统原生暗黑模式发生变化时触发,useDarkMode=true 时有效
52
+ * @en Triggered when the system's native dark mode changes, valid when useDarkMode=true
53
+ */
54
+ onDarkModeChange?: (isDark: boolean) => void;
50
55
  }
51
56
  export declare const defaultContext: GlobalContextParams;
52
57
  export declare const GlobalContext: React.Context<GlobalContextParams>;
53
58
  export interface ContextProviderProps extends GlobalContextParams {
54
- onDarkModeChange?: (isDark: boolean) => void;
55
59
  children: React.ReactNode;
56
60
  }
57
61
  export declare type WithGlobalContext<T> = T & {
@@ -73,9 +73,15 @@
73
73
  isDarkModeState = _useState[0],
74
74
  setIsDarkModeState = _useState[1];
75
75
 
76
- var setDarkModeState = function setDarkModeState(isDark) {
76
+ var mountedRef = (0, _react.useRef)(false);
77
+
78
+ var setDarkModeState = function setDarkModeState(isDark, needChange) {
79
+ if (needChange === void 0) {
80
+ needChange = true;
81
+ }
82
+
77
83
  setIsDarkModeState(isDark);
78
- onDarkModeChange && onDarkModeChange(isDark);
84
+ needChange && onDarkModeChange && onDarkModeChange(isDark);
79
85
  };
80
86
 
81
87
  var isDarkMode = (0, _react.useMemo)(function () {
@@ -104,7 +110,7 @@
104
110
 
105
111
  if (useDarkMode) {
106
112
  var dark = matchMedia.matches;
107
- setDarkModeState(dark);
113
+ setDarkModeState(dark, mountedRef.current);
108
114
 
109
115
  if (typeof matchMedia.addEventListener === 'function') {
110
116
  matchMedia.addEventListener('change', changeDarkMode);
@@ -113,6 +119,7 @@
113
119
  }
114
120
  }
115
121
 
122
+ mountedRef.current = true;
116
123
  return function () {
117
124
  if (useDarkMode) {
118
125
  if (typeof matchMedia.removeEventListener === 'function') {
@@ -86,12 +86,14 @@
86
86
  fieldValidator.validate((_fieldValidator$valid = {}, _fieldValidator$valid[field] = value, _fieldValidator$valid), function (errorsMap) {
87
87
  var _getErrorAndWarnings = (0, _utils.getErrorAndWarnings)((errorsMap == null ? void 0 : errorsMap[field]) || []),
88
88
  errors = _getErrorAndWarnings.errors,
89
- warnings = _getErrorAndWarnings.warnings;
89
+ warnings = _getErrorAndWarnings.warnings,
90
+ errorTypes = _getErrorAndWarnings.errorTypes;
90
91
 
91
92
  _this._errors = errors;
92
93
  onValidateStatusChange({
93
94
  errors: _this._errors,
94
- warnings: warnings
95
+ warnings: warnings,
96
+ errorTypes: errorTypes
95
97
  });
96
98
  return resolve({
97
99
  errors: _this._errors,
@@ -336,16 +338,22 @@
336
338
  errors = _useState[0],
337
339
  setErrors = _useState[1];
338
340
 
339
- var _useState2 = (0, _react.useState)([]),
340
- warnings = _useState2[0],
341
- setWarnings = _useState2[1];
341
+ var _useState2 = (0, _react.useState)(null),
342
+ errorTypes = _useState2[0],
343
+ setErrorTypes = _useState2[1];
344
+
345
+ var _useState3 = (0, _react.useState)([]),
346
+ warnings = _useState3[0],
347
+ setWarnings = _useState3[1];
342
348
 
343
349
  var formItemRef = (0, _react.useRef)(null);
344
350
 
345
351
  var onValidateStatusChange = function onValidateStatusChange(validateResult) {
346
352
  var _errors = validateResult.errors,
347
- _warnings = validateResult.warnings;
353
+ _warnings = validateResult.warnings,
354
+ _errorTypes = validateResult.errorTypes;
348
355
  setErrors(_errors.length ? _errors[0] : null);
356
+ setErrorTypes(_errorTypes.length ? _errorTypes[0] : null);
349
357
  setWarnings(_warnings);
350
358
  };
351
359
 
@@ -367,7 +375,7 @@
367
375
  return /*#__PURE__*/_react.default.createElement("div", {
368
376
  className: (0, _mobileUtils.cls)(prefixCls + "-form-item", prefixCls + "-form-item-" + (itemLayout || layout), className, (_cls = {
369
377
  disabled: fieldDisabled
370
- }, _cls[prefixCls + "-form-item-error"] = !!errors, _cls[prefixCls + "-form-item-warning"] = Boolean(!errors && warnings), _cls)),
378
+ }, _cls[prefixCls + "-form-item-error"] = !!errors, _cls[prefixCls + "-form-item-warning"] = Boolean(!errors && warnings), _cls[prefixCls + "-form-item-error-" + errorTypes] = errorTypes, _cls)),
371
379
  style: style,
372
380
  ref: formItemRef
373
381
  }, /*#__PURE__*/_react.default.createElement("div", {
@@ -344,8 +344,9 @@ export interface IFormItemInnerProps {
344
344
  * @en The callback when validating status changes
345
345
  */
346
346
  onValidateStatusChange: (data: {
347
- errors: any;
348
- warnings: any;
347
+ errors: ReactNode[];
348
+ warnings: ReactNode[];
349
+ errorTypes: string[];
349
350
  }) => void;
350
351
  /**
351
352
  * 获取内部表单项的dom
@@ -3,4 +3,5 @@ export declare const isFieldRequired: (rules?: IRules[]) => boolean;
3
3
  export declare const getErrorAndWarnings: (result: ValidatorError[]) => {
4
4
  warnings: string[];
5
5
  errors: string[];
6
+ errorTypes: string[];
6
7
  };
package/umd/form/utils.js CHANGED
@@ -31,11 +31,13 @@
31
31
  var getErrorAndWarnings = function getErrorAndWarnings(result) {
32
32
  var errors = [];
33
33
  var warnings = [];
34
+ var errorTypes = [];
34
35
  result.map(function (_ref) {
35
36
  var _ref$message = _ref.message,
36
37
  message = _ref$message === void 0 ? [] : _ref$message,
37
38
  _ref$validateLevel = _ref.validateLevel,
38
- validateLevel = _ref$validateLevel === void 0 ? 'error' : _ref$validateLevel;
39
+ validateLevel = _ref$validateLevel === void 0 ? 'error' : _ref$validateLevel,
40
+ resultErrorTypes = _ref.errorTypes;
39
41
 
40
42
  if (!(message != null && message.length)) {
41
43
  return;
@@ -45,11 +47,13 @@
45
47
  warnings = [].concat(warnings, message);
46
48
  } else {
47
49
  errors = [].concat(errors, message);
50
+ errorTypes = [].concat(errorTypes, resultErrorTypes);
48
51
  }
49
52
  });
50
53
  return {
51
54
  warnings: warnings,
52
- errors: errors
55
+ errors: errors,
56
+ errorTypes: errorTypes
53
57
  };
54
58
  };
55
59
 
@@ -1,16 +1,16 @@
1
1
  (function (global, factory) {
2
2
  if (typeof define === "function" && define.amd) {
3
- define(["exports", "react"], factory);
3
+ define(["exports", "react", "@arco-design/mobile-utils", "../context-provider"], factory);
4
4
  } else if (typeof exports !== "undefined") {
5
- factory(exports, require("react"));
5
+ factory(exports, require("react"), require("@arco-design/mobile-utils"), require("../context-provider"));
6
6
  } else {
7
7
  var mod = {
8
8
  exports: {}
9
9
  };
10
- factory(mod.exports, global.react);
10
+ factory(mod.exports, global.react, global.mobileUtils, global.contextProvider);
11
11
  global.backIcon = mod.exports;
12
12
  }
13
- })(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _react) {
13
+ })(typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : this, function (_exports, _react, _mobileUtils, _contextProvider) {
14
14
  "use strict";
15
15
 
16
16
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -22,16 +22,22 @@
22
22
  function BackArrow(_ref) {
23
23
  var _ref$color = _ref.color,
24
24
  color = _ref$color === void 0 ? 'currentColor' : _ref$color;
25
- return /*#__PURE__*/_react.default.createElement("div", {
26
- className: "c-svg-arrow nav-bar-back"
27
- }, /*#__PURE__*/_react.default.createElement("svg", {
28
- height: "100%",
29
- viewBox: "0 0 16 16"
30
- }, /*#__PURE__*/_react.default.createElement("path", {
31
- id: "path-1_1_",
32
- 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",
33
- fill: color
34
- })));
25
+ return /*#__PURE__*/_react.default.createElement(_contextProvider.ContextLayout, null, function (_ref2) {
26
+ var _ref2$locale = _ref2.locale,
27
+ locale = _ref2$locale === void 0 ? _mobileUtils.defaultLocale : _ref2$locale;
28
+ return /*#__PURE__*/_react.default.createElement("div", {
29
+ role: "button",
30
+ className: "c-svg-arrow nav-bar-back",
31
+ "aria-label": locale.NavBar.backBtnAriaLabel
32
+ }, /*#__PURE__*/_react.default.createElement("svg", {
33
+ height: "100%",
34
+ viewBox: "0 0 16 16"
35
+ }, /*#__PURE__*/_react.default.createElement("path", {
36
+ id: "path-1_1_",
37
+ 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",
38
+ fill: color
39
+ })));
40
+ });
35
41
  }
36
42
 
37
43
  var _default = BackArrow;
@@ -650,7 +650,7 @@
650
650
  }
651
651
  .arco-theme-dark .arco-nav-bar {
652
652
  color: #f6f6f6 ;
653
- background: #232324 ;
653
+ background: #17171A ;
654
654
  }
655
655
  .arco-theme-dark .arco-nav-bar-wrapper.arco-nav-bar-wrapper-border {
656
656
  position: relative;
@@ -308,7 +308,7 @@
308
308
  function getCurrentCellValue() {
309
309
  var _data$currentIndex;
310
310
 
311
- return currentValue || ((_data$currentIndex = data[currentIndex]) == null ? void 0 : _data$currentIndex.value);
311
+ return (_data$currentIndex = data[currentIndex]) == null ? void 0 : _data$currentIndex.value;
312
312
  }
313
313
 
314
314
  function _clearTimer() {
@@ -127,7 +127,7 @@
127
127
  // @en Remove empty values from cascader
128
128
 
129
129
  return curValues.filter(function (v) {
130
- return v;
130
+ return v !== undefined;
131
131
  });
132
132
  };
133
133
 
@@ -1052,7 +1052,7 @@
1052
1052
  color: #f6f6f6 ;
1053
1053
  }
1054
1054
  .arco-theme-dark .arco-tab-cell-container-wrap {
1055
- background: #232324 ;
1055
+ background: #17171A ;
1056
1056
  }
1057
1057
  .arco-theme-dark .arco-tab-cell-container-inner.has-divider.pos-top {
1058
1058
  box-shadow: 0 -1PX 0 0 #484849 inset;