antd-mobile 5.15.0 → 5.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (336) hide show
  1. package/2x/README.md +30 -16
  2. package/2x/bundle/antd-mobile.cjs.js +381 -228
  3. package/2x/bundle/antd-mobile.es.js +382 -229
  4. package/2x/bundle/style.css +66 -13
  5. package/2x/cjs/components/action-sheet/action-sheet.d.ts +2 -4
  6. package/2x/cjs/components/action-sheet/action-sheet.js +6 -2
  7. package/2x/cjs/components/button/button.d.ts +5 -1
  8. package/2x/cjs/components/cascader/cascader.d.ts +29 -4
  9. package/2x/cjs/components/cascader/cascader.js +41 -19
  10. package/2x/cjs/components/cascader/index.d.ts +21 -2
  11. package/2x/cjs/components/center-popup/center-popup.css +11 -0
  12. package/2x/cjs/components/center-popup/center-popup.d.ts +4 -20
  13. package/2x/cjs/components/center-popup/center-popup.js +29 -14
  14. package/2x/cjs/components/checkbox/checkbox.d.ts +5 -1
  15. package/2x/cjs/components/checkbox/index.d.ts +5 -1
  16. package/2x/cjs/components/checkbox/native-input.js +10 -8
  17. package/2x/cjs/components/date-picker/date-picker-date-utils.js +12 -15
  18. package/2x/cjs/components/date-picker/date-picker-week-utils.js +12 -15
  19. package/2x/cjs/components/date-picker/date-picker.d.ts +7 -3
  20. package/2x/cjs/components/date-picker/date-picker.js +3 -1
  21. package/2x/cjs/components/date-picker/index.d.ts +6 -2
  22. package/2x/cjs/components/dialog/dialog.js +5 -2
  23. package/2x/cjs/components/dropdown/dropdown.d.ts +5 -1
  24. package/2x/cjs/components/dropdown/index.d.ts +5 -1
  25. package/2x/cjs/components/floating-panel/floating-panel.d.ts +5 -1
  26. package/2x/cjs/components/form/form.d.ts +5 -1
  27. package/2x/cjs/components/form/index.d.ts +5 -1
  28. package/2x/cjs/components/index-bar/index-bar.d.ts +5 -1
  29. package/2x/cjs/components/index-bar/index.d.ts +5 -1
  30. package/2x/cjs/components/input/input.css +4 -0
  31. package/2x/cjs/components/input/input.d.ts +11 -4
  32. package/2x/cjs/components/input/input.js +5 -1
  33. package/2x/cjs/components/list/index.d.ts +10 -2
  34. package/2x/cjs/components/list/list.d.ts +13 -2
  35. package/2x/cjs/components/list/list.js +16 -6
  36. package/2x/cjs/components/modal/modal-action-button.d.ts +2 -2
  37. package/2x/cjs/components/modal/modal.css +0 -9
  38. package/2x/cjs/components/modal/modal.js +6 -12
  39. package/2x/cjs/components/number-keyboard/number-keyboard.d.ts +1 -5
  40. package/2x/cjs/components/number-keyboard/number-keyboard.js +13 -7
  41. package/2x/cjs/components/passcode-input/passcode-input.d.ts +5 -1
  42. package/2x/cjs/components/picker/index.d.ts +10 -6
  43. package/2x/cjs/components/picker/picker.d.ts +6 -6
  44. package/2x/cjs/components/picker/picker.js +8 -7
  45. package/2x/cjs/components/picker-view/picker-view.css +1 -0
  46. package/2x/cjs/components/picker-view/wheel.js +10 -8
  47. package/2x/cjs/components/popover/index.d.ts +5 -1
  48. package/2x/cjs/components/popover/popover.d.ts +5 -1
  49. package/2x/cjs/components/popup/popup-base-props.d.ts +35 -0
  50. package/2x/cjs/components/popup/popup-base-props.js +18 -0
  51. package/2x/cjs/components/popup/popup.css +32 -0
  52. package/2x/cjs/components/popup/popup.d.ts +3 -19
  53. package/2x/cjs/components/popup/popup.js +43 -18
  54. package/2x/cjs/components/progress-bar/progress-bar.css +17 -3
  55. package/2x/cjs/components/progress-bar/progress-bar.d.ts +4 -2
  56. package/2x/cjs/components/progress-bar/progress-bar.js +27 -5
  57. package/2x/cjs/components/radio/radio.js +3 -3
  58. package/2x/cjs/components/search-bar/search-bar.d.ts +5 -1
  59. package/2x/cjs/components/slider/slider.js +2 -1
  60. package/2x/cjs/components/slider/thumb.d.ts +2 -1
  61. package/2x/cjs/components/slider/thumb.js +13 -1
  62. package/2x/cjs/components/stepper/stepper.js +14 -3
  63. package/2x/cjs/components/steps/steps.css +1 -1
  64. package/2x/cjs/components/swipe-action/swipe-action.d.ts +5 -1
  65. package/2x/cjs/components/swiper/index.d.ts +10 -2
  66. package/2x/cjs/components/swiper/swiper.d.ts +5 -1
  67. package/2x/cjs/components/switch/switch.js +10 -1
  68. package/2x/cjs/components/text-area/text-area.d.ts +5 -1
  69. package/2x/cjs/components/virtual-input/virtual-input.d.ts +5 -1
  70. package/2x/cjs/locales/base.d.ts +10 -0
  71. package/2x/cjs/locales/base.js +10 -0
  72. package/2x/cjs/locales/en-US.d.ts +10 -0
  73. package/2x/cjs/locales/es-ES.d.ts +10 -0
  74. package/2x/cjs/locales/fa-IR.d.ts +10 -0
  75. package/2x/cjs/locales/fr-FR.d.ts +10 -0
  76. package/2x/cjs/locales/id-ID.d.ts +118 -0
  77. package/2x/cjs/locales/id-ID.js +121 -0
  78. package/2x/cjs/locales/kk-KZ.d.ts +118 -0
  79. package/2x/cjs/locales/kk-KZ.js +124 -0
  80. package/2x/cjs/locales/ko-KR.d.ts +10 -0
  81. package/2x/cjs/locales/zh-CN.d.ts +10 -0
  82. package/2x/cjs/locales/zh-CN.js +10 -0
  83. package/2x/cjs/locales/zh-HK.d.ts +10 -0
  84. package/2x/cjs/locales/zh-TW.d.ts +10 -0
  85. package/2x/cjs/utils/native-props.d.ts +3 -3
  86. package/2x/es/components/action-sheet/action-sheet.d.ts +2 -4
  87. package/2x/es/components/action-sheet/action-sheet.js +6 -2
  88. package/2x/es/components/button/button.d.ts +5 -1
  89. package/2x/es/components/cascader/cascader.d.ts +29 -4
  90. package/2x/es/components/cascader/cascader.js +42 -18
  91. package/2x/es/components/cascader/index.d.ts +21 -2
  92. package/2x/es/components/center-popup/center-popup.css +11 -0
  93. package/2x/es/components/center-popup/center-popup.d.ts +4 -20
  94. package/2x/es/components/center-popup/center-popup.js +27 -14
  95. package/2x/es/components/checkbox/checkbox.d.ts +5 -1
  96. package/2x/es/components/checkbox/index.d.ts +5 -1
  97. package/2x/es/components/checkbox/native-input.js +9 -8
  98. package/2x/es/components/date-picker/date-picker-date-utils.js +12 -15
  99. package/2x/es/components/date-picker/date-picker-week-utils.js +12 -15
  100. package/2x/es/components/date-picker/date-picker.d.ts +7 -3
  101. package/2x/es/components/date-picker/date-picker.js +3 -1
  102. package/2x/es/components/date-picker/index.d.ts +6 -2
  103. package/2x/es/components/dialog/dialog.js +5 -2
  104. package/2x/es/components/dropdown/dropdown.d.ts +5 -1
  105. package/2x/es/components/dropdown/index.d.ts +5 -1
  106. package/2x/es/components/floating-panel/floating-panel.d.ts +5 -1
  107. package/2x/es/components/form/form.d.ts +5 -1
  108. package/2x/es/components/form/index.d.ts +5 -1
  109. package/2x/es/components/index-bar/index-bar.d.ts +5 -1
  110. package/2x/es/components/index-bar/index.d.ts +5 -1
  111. package/2x/es/components/input/input.css +4 -0
  112. package/2x/es/components/input/input.d.ts +11 -4
  113. package/2x/es/components/input/input.js +5 -1
  114. package/2x/es/components/list/index.d.ts +10 -2
  115. package/2x/es/components/list/list.d.ts +13 -2
  116. package/2x/es/components/list/list.js +12 -4
  117. package/2x/es/components/modal/modal-action-button.d.ts +2 -2
  118. package/2x/es/components/modal/modal.css +0 -9
  119. package/2x/es/components/modal/modal.js +6 -11
  120. package/2x/es/components/number-keyboard/number-keyboard.d.ts +1 -5
  121. package/2x/es/components/number-keyboard/number-keyboard.js +13 -7
  122. package/2x/es/components/passcode-input/passcode-input.d.ts +5 -1
  123. package/2x/es/components/picker/index.d.ts +10 -6
  124. package/2x/es/components/picker/picker.d.ts +6 -6
  125. package/2x/es/components/picker/picker.js +8 -6
  126. package/2x/es/components/picker-view/picker-view.css +1 -0
  127. package/2x/es/components/picker-view/wheel.js +10 -8
  128. package/2x/es/components/popover/index.d.ts +5 -1
  129. package/2x/es/components/popover/popover.d.ts +5 -1
  130. package/2x/es/components/popup/popup-base-props.d.ts +35 -0
  131. package/2x/es/components/popup/popup-base-props.js +11 -0
  132. package/2x/es/components/popup/popup.css +32 -0
  133. package/2x/es/components/popup/popup.d.ts +3 -19
  134. package/2x/es/components/popup/popup.js +41 -19
  135. package/2x/es/components/progress-bar/progress-bar.css +17 -3
  136. package/2x/es/components/progress-bar/progress-bar.d.ts +4 -2
  137. package/2x/es/components/progress-bar/progress-bar.js +25 -5
  138. package/2x/es/components/radio/radio.js +3 -3
  139. package/2x/es/components/search-bar/search-bar.d.ts +5 -1
  140. package/2x/es/components/slider/slider.js +2 -1
  141. package/2x/es/components/slider/thumb.d.ts +2 -1
  142. package/2x/es/components/slider/thumb.js +12 -1
  143. package/2x/es/components/stepper/stepper.js +13 -3
  144. package/2x/es/components/steps/steps.css +1 -1
  145. package/2x/es/components/swipe-action/swipe-action.d.ts +5 -1
  146. package/2x/es/components/swiper/index.d.ts +10 -2
  147. package/2x/es/components/swiper/swiper.d.ts +5 -1
  148. package/2x/es/components/switch/switch.js +9 -1
  149. package/2x/es/components/text-area/text-area.d.ts +5 -1
  150. package/2x/es/components/virtual-input/virtual-input.d.ts +5 -1
  151. package/2x/es/locales/base.d.ts +10 -0
  152. package/2x/es/locales/base.js +10 -0
  153. package/2x/es/locales/en-US.d.ts +10 -0
  154. package/2x/es/locales/es-ES.d.ts +10 -0
  155. package/2x/es/locales/fa-IR.d.ts +10 -0
  156. package/2x/es/locales/fr-FR.d.ts +10 -0
  157. package/2x/es/locales/id-ID.d.ts +118 -0
  158. package/2x/es/locales/id-ID.js +111 -0
  159. package/2x/es/locales/kk-KZ.d.ts +118 -0
  160. package/2x/es/locales/kk-KZ.js +114 -0
  161. package/2x/es/locales/ko-KR.d.ts +10 -0
  162. package/2x/es/locales/zh-CN.d.ts +10 -0
  163. package/2x/es/locales/zh-CN.js +10 -0
  164. package/2x/es/locales/zh-HK.d.ts +10 -0
  165. package/2x/es/locales/zh-TW.d.ts +10 -0
  166. package/2x/es/utils/native-props.d.ts +3 -3
  167. package/2x/package.json +1 -1
  168. package/2x/umd/antd-mobile.js +1 -1
  169. package/README.md +30 -16
  170. package/bundle/antd-mobile.cjs.js +381 -228
  171. package/bundle/antd-mobile.es.js +382 -229
  172. package/bundle/style.css +56 -12
  173. package/cjs/components/action-sheet/action-sheet.d.ts +2 -4
  174. package/cjs/components/action-sheet/action-sheet.js +6 -2
  175. package/cjs/components/button/button.d.ts +5 -1
  176. package/cjs/components/cascader/cascader.d.ts +29 -4
  177. package/cjs/components/cascader/cascader.js +41 -19
  178. package/cjs/components/cascader/index.d.ts +21 -2
  179. package/cjs/components/center-popup/center-popup.css +10 -0
  180. package/cjs/components/center-popup/center-popup.d.ts +4 -20
  181. package/cjs/components/center-popup/center-popup.js +29 -14
  182. package/cjs/components/checkbox/checkbox.d.ts +5 -1
  183. package/cjs/components/checkbox/index.d.ts +5 -1
  184. package/cjs/components/checkbox/native-input.js +10 -8
  185. package/cjs/components/date-picker/date-picker-date-utils.js +12 -15
  186. package/cjs/components/date-picker/date-picker-week-utils.js +12 -15
  187. package/cjs/components/date-picker/date-picker.d.ts +7 -3
  188. package/cjs/components/date-picker/date-picker.js +3 -1
  189. package/cjs/components/date-picker/index.d.ts +6 -2
  190. package/cjs/components/dialog/dialog.js +5 -2
  191. package/cjs/components/dropdown/dropdown.d.ts +5 -1
  192. package/cjs/components/dropdown/index.d.ts +5 -1
  193. package/cjs/components/floating-panel/floating-panel.d.ts +5 -1
  194. package/cjs/components/form/form.d.ts +5 -1
  195. package/cjs/components/form/index.d.ts +5 -1
  196. package/cjs/components/index-bar/index-bar.d.ts +5 -1
  197. package/cjs/components/index-bar/index.d.ts +5 -1
  198. package/cjs/components/input/input.css +3 -0
  199. package/cjs/components/input/input.d.ts +11 -4
  200. package/cjs/components/input/input.js +5 -1
  201. package/cjs/components/list/index.d.ts +10 -2
  202. package/cjs/components/list/list.d.ts +13 -2
  203. package/cjs/components/list/list.js +16 -6
  204. package/cjs/components/modal/modal-action-button.d.ts +2 -2
  205. package/cjs/components/modal/modal.css +0 -8
  206. package/cjs/components/modal/modal.js +6 -12
  207. package/cjs/components/number-keyboard/number-keyboard.d.ts +1 -5
  208. package/cjs/components/number-keyboard/number-keyboard.js +13 -7
  209. package/cjs/components/passcode-input/passcode-input.d.ts +5 -1
  210. package/cjs/components/picker/index.d.ts +10 -6
  211. package/cjs/components/picker/picker.d.ts +6 -6
  212. package/cjs/components/picker/picker.js +8 -7
  213. package/cjs/components/picker-view/picker-view.css +1 -0
  214. package/cjs/components/picker-view/wheel.js +10 -8
  215. package/cjs/components/popover/index.d.ts +5 -1
  216. package/cjs/components/popover/popover.d.ts +5 -1
  217. package/cjs/components/popup/popup-base-props.d.ts +35 -0
  218. package/cjs/components/popup/popup-base-props.js +18 -0
  219. package/cjs/components/popup/popup.css +26 -0
  220. package/cjs/components/popup/popup.d.ts +3 -19
  221. package/cjs/components/popup/popup.js +43 -18
  222. package/cjs/components/progress-bar/progress-bar.css +15 -3
  223. package/cjs/components/progress-bar/progress-bar.d.ts +4 -2
  224. package/cjs/components/progress-bar/progress-bar.js +27 -5
  225. package/cjs/components/radio/radio.js +3 -3
  226. package/cjs/components/search-bar/search-bar.d.ts +5 -1
  227. package/cjs/components/slider/slider.js +2 -1
  228. package/cjs/components/slider/thumb.d.ts +2 -1
  229. package/cjs/components/slider/thumb.js +13 -1
  230. package/cjs/components/stepper/stepper.js +14 -3
  231. package/cjs/components/steps/steps.css +1 -1
  232. package/cjs/components/swipe-action/swipe-action.d.ts +5 -1
  233. package/cjs/components/swiper/index.d.ts +10 -2
  234. package/cjs/components/swiper/swiper.d.ts +5 -1
  235. package/cjs/components/switch/switch.js +10 -1
  236. package/cjs/components/text-area/text-area.d.ts +5 -1
  237. package/cjs/components/virtual-input/virtual-input.d.ts +5 -1
  238. package/cjs/locales/base.d.ts +10 -0
  239. package/cjs/locales/base.js +10 -0
  240. package/cjs/locales/en-US.d.ts +10 -0
  241. package/cjs/locales/es-ES.d.ts +10 -0
  242. package/cjs/locales/fa-IR.d.ts +10 -0
  243. package/cjs/locales/fr-FR.d.ts +10 -0
  244. package/cjs/locales/id-ID.d.ts +118 -0
  245. package/cjs/locales/id-ID.js +121 -0
  246. package/cjs/locales/kk-KZ.d.ts +118 -0
  247. package/cjs/locales/kk-KZ.js +124 -0
  248. package/cjs/locales/ko-KR.d.ts +10 -0
  249. package/cjs/locales/zh-CN.d.ts +10 -0
  250. package/cjs/locales/zh-CN.js +10 -0
  251. package/cjs/locales/zh-HK.d.ts +10 -0
  252. package/cjs/locales/zh-TW.d.ts +10 -0
  253. package/cjs/utils/native-props.d.ts +3 -3
  254. package/es/components/action-sheet/action-sheet.d.ts +2 -4
  255. package/es/components/action-sheet/action-sheet.js +6 -2
  256. package/es/components/button/button.d.ts +5 -1
  257. package/es/components/cascader/cascader.d.ts +29 -4
  258. package/es/components/cascader/cascader.js +42 -18
  259. package/es/components/cascader/index.d.ts +21 -2
  260. package/es/components/center-popup/center-popup.css +10 -0
  261. package/es/components/center-popup/center-popup.d.ts +4 -20
  262. package/es/components/center-popup/center-popup.js +27 -14
  263. package/es/components/checkbox/checkbox.d.ts +5 -1
  264. package/es/components/checkbox/index.d.ts +5 -1
  265. package/es/components/checkbox/native-input.js +9 -8
  266. package/es/components/date-picker/date-picker-date-utils.js +12 -15
  267. package/es/components/date-picker/date-picker-week-utils.js +12 -15
  268. package/es/components/date-picker/date-picker.d.ts +7 -3
  269. package/es/components/date-picker/date-picker.js +3 -1
  270. package/es/components/date-picker/index.d.ts +6 -2
  271. package/es/components/dialog/dialog.js +5 -2
  272. package/es/components/dropdown/dropdown.d.ts +5 -1
  273. package/es/components/dropdown/index.d.ts +5 -1
  274. package/es/components/floating-panel/floating-panel.d.ts +5 -1
  275. package/es/components/form/form.d.ts +5 -1
  276. package/es/components/form/index.d.ts +5 -1
  277. package/es/components/index-bar/index-bar.d.ts +5 -1
  278. package/es/components/index-bar/index.d.ts +5 -1
  279. package/es/components/input/input.css +3 -0
  280. package/es/components/input/input.d.ts +11 -4
  281. package/es/components/input/input.js +5 -1
  282. package/es/components/list/index.d.ts +10 -2
  283. package/es/components/list/list.d.ts +13 -2
  284. package/es/components/list/list.js +12 -4
  285. package/es/components/modal/modal-action-button.d.ts +2 -2
  286. package/es/components/modal/modal.css +0 -8
  287. package/es/components/modal/modal.js +6 -11
  288. package/es/components/number-keyboard/number-keyboard.d.ts +1 -5
  289. package/es/components/number-keyboard/number-keyboard.js +13 -7
  290. package/es/components/passcode-input/passcode-input.d.ts +5 -1
  291. package/es/components/picker/index.d.ts +10 -6
  292. package/es/components/picker/picker.d.ts +6 -6
  293. package/es/components/picker/picker.js +8 -6
  294. package/es/components/picker-view/picker-view.css +1 -0
  295. package/es/components/picker-view/wheel.js +10 -8
  296. package/es/components/popover/index.d.ts +5 -1
  297. package/es/components/popover/popover.d.ts +5 -1
  298. package/es/components/popup/popup-base-props.d.ts +35 -0
  299. package/es/components/popup/popup-base-props.js +11 -0
  300. package/es/components/popup/popup.css +26 -0
  301. package/es/components/popup/popup.d.ts +3 -19
  302. package/es/components/popup/popup.js +41 -19
  303. package/es/components/progress-bar/progress-bar.css +15 -3
  304. package/es/components/progress-bar/progress-bar.d.ts +4 -2
  305. package/es/components/progress-bar/progress-bar.js +25 -5
  306. package/es/components/radio/radio.js +3 -3
  307. package/es/components/search-bar/search-bar.d.ts +5 -1
  308. package/es/components/slider/slider.js +2 -1
  309. package/es/components/slider/thumb.d.ts +2 -1
  310. package/es/components/slider/thumb.js +12 -1
  311. package/es/components/stepper/stepper.js +13 -3
  312. package/es/components/steps/steps.css +1 -1
  313. package/es/components/swipe-action/swipe-action.d.ts +5 -1
  314. package/es/components/swiper/index.d.ts +10 -2
  315. package/es/components/swiper/swiper.d.ts +5 -1
  316. package/es/components/switch/switch.js +9 -1
  317. package/es/components/text-area/text-area.d.ts +5 -1
  318. package/es/components/virtual-input/virtual-input.d.ts +5 -1
  319. package/es/locales/base.d.ts +10 -0
  320. package/es/locales/base.js +10 -0
  321. package/es/locales/en-US.d.ts +10 -0
  322. package/es/locales/es-ES.d.ts +10 -0
  323. package/es/locales/fa-IR.d.ts +10 -0
  324. package/es/locales/fr-FR.d.ts +10 -0
  325. package/es/locales/id-ID.d.ts +118 -0
  326. package/es/locales/id-ID.js +111 -0
  327. package/es/locales/kk-KZ.d.ts +118 -0
  328. package/es/locales/kk-KZ.js +114 -0
  329. package/es/locales/ko-KR.d.ts +10 -0
  330. package/es/locales/zh-CN.d.ts +10 -0
  331. package/es/locales/zh-CN.js +10 -0
  332. package/es/locales/zh-HK.d.ts +10 -0
  333. package/es/locales/zh-TW.d.ts +10 -0
  334. package/es/utils/native-props.d.ts +3 -3
  335. package/package.json +1 -1
  336. package/umd/antd-mobile.js +1 -1
@@ -29,8 +29,6 @@ var _safeArea = _interopRequireDefault(require("../safe-area"));
29
29
 
30
30
  var _pickerUtils = require("./picker-utils");
31
31
 
32
- var _shouldRender = require("../../utils/should-render");
33
-
34
32
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
35
33
 
36
34
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -41,7 +39,9 @@ const classPrefix = `adm-picker`;
41
39
  const defaultProps = {
42
40
  defaultValue: [],
43
41
  closeOnMaskClick: true,
44
- renderLabel: _pickerUtils.defaultRenderLabel
42
+ renderLabel: _pickerUtils.defaultRenderLabel,
43
+ destroyOnClose: false,
44
+ forceRender: false
45
45
  };
46
46
  const Picker = (0, _react.memo)((0, _react.forwardRef)((p, ref) => {
47
47
  var _a;
@@ -105,12 +105,12 @@ const Picker = (0, _react.memo)((0, _react.forwardRef)((p, ref) => {
105
105
  (_a = props.onSelect) === null || _a === void 0 ? void 0 : _a.call(props, val, ext);
106
106
  }
107
107
  });
108
- const shouldRender = (0, _shouldRender.useShouldRender)(visible, props.forceRender, props.destroyOnClose);
109
108
  const pickerElement = (0, _nativeProps.withNativeProps)(props, _react.default.createElement("div", {
110
109
  className: classPrefix
111
110
  }, _react.default.createElement("div", {
112
111
  className: `${classPrefix}-header`
113
112
  }, _react.default.createElement("a", {
113
+ role: 'button',
114
114
  className: `${classPrefix}-header-button`,
115
115
  onClick: () => {
116
116
  var _a;
@@ -121,6 +121,7 @@ const Picker = (0, _react.memo)((0, _react.forwardRef)((p, ref) => {
121
121
  }, props.cancelText), _react.default.createElement("div", {
122
122
  className: `${classPrefix}-header-title`
123
123
  }, props.title), _react.default.createElement("a", {
124
+ role: 'button',
124
125
  className: `${classPrefix}-header-button`,
125
126
  onClick: () => {
126
127
  setValue(innerValue);
@@ -149,13 +150,13 @@ const Picker = (0, _react.memo)((0, _react.forwardRef)((p, ref) => {
149
150
  setVisible(false);
150
151
  },
151
152
  getContainer: props.getContainer,
152
- destroyOnClose: true,
153
+ destroyOnClose: props.destroyOnClose,
153
154
  afterShow: props.afterShow,
154
155
  afterClose: props.afterClose,
155
156
  onClick: props.onClick,
156
- forceRender: true,
157
+ forceRender: props.forceRender,
157
158
  stopPropagation: props.stopPropagation
158
- }, shouldRender && pickerElement, _react.default.createElement(_safeArea.default, {
159
+ }, pickerElement, _react.default.createElement(_safeArea.default, {
159
160
  position: 'bottom'
160
161
  }));
161
162
 
@@ -69,6 +69,7 @@
69
69
  flex-direction: column;
70
70
  position: relative;
71
71
  z-index: 0;
72
+ padding-bottom: 2px;
72
73
  }
73
74
 
74
75
  .adm-picker-view-column-accessible > * {
@@ -154,27 +154,29 @@ const Wheel = (0, _react.memo)(props => {
154
154
  className: 'adm-picker-view-column-accessible-current',
155
155
  role: 'button',
156
156
  "aria-label": current ? `当前选择的是:${current.label}` : '当前未选择'
157
- }, "-"), _react.default.createElement("div", null, previous && _react.default.createElement("div", {
157
+ }, "-"), _react.default.createElement("div", {
158
158
  className: 'adm-picker-view-column-accessible-button',
159
159
  onClick: () => {
160
+ if (!previous) return;
160
161
  scrollSelect(previousIndex);
161
162
  },
162
- role: 'button',
163
- "aria-label": `选择上一项:${previous.label}`
164
- }, "-")), _react.default.createElement("div", null, next && _react.default.createElement("div", {
163
+ role: previous ? 'button' : 'text',
164
+ "aria-label": !previous ? '没有上一项' : `选择上一项:${previous.label}`
165
+ }, "-"), _react.default.createElement("div", {
165
166
  className: 'adm-picker-view-column-accessible-button',
166
167
  onClick: () => {
168
+ if (!next) return;
167
169
  scrollSelect(nextIndex);
168
170
  },
169
- role: 'button',
170
- "aria-label": `选择下一项:${next.label}`
171
- }, "-")));
171
+ role: next ? 'button' : 'text',
172
+ "aria-label": !next ? '没有下一项' : `选择下一项:${next.label}`
173
+ }, "-"));
172
174
  }
173
175
 
174
176
  return _react.default.createElement("div", {
175
- ref: rootRef,
176
177
  className: `${classPrefix}-column`
177
178
  }, _react.default.createElement(_web.animated.div, {
179
+ ref: rootRef,
178
180
  style: {
179
181
  translateY: y
180
182
  },
@@ -17,7 +17,11 @@ declare const _default: import("react").ForwardRefExoticComponent<{
17
17
  placement?: DeprecatedPlacement | Placement | undefined;
18
18
  stopPropagation?: "click"[] | undefined;
19
19
  content: import("react").ReactNode;
20
- } & import("../../utils/native-props").NativeProps<"--z-index"> & import("react").RefAttributes<import("./popover").PopoverRef>> & {
20
+ } & {
21
+ className?: string | undefined;
22
+ style?: (import("react").CSSProperties & Partial<Record<"--z-index", string>>) | undefined;
23
+ tabIndex?: number | undefined;
24
+ } & import("react").AriaAttributes & import("react").RefAttributes<import("./popover").PopoverRef>> & {
21
25
  Menu: import("react").ForwardRefExoticComponent<Omit<import("./popover").PopoverProps, "content"> & {
22
26
  actions: import("./popover-menu").Action[];
23
27
  onAction?: ((item: import("./popover-menu").Action) => void) | undefined;
@@ -33,4 +33,8 @@ export declare const Popover: React.ForwardRefExoticComponent<{
33
33
  placement?: DeprecatedPlacement | Placement | undefined;
34
34
  stopPropagation?: "click"[] | undefined;
35
35
  content: React.ReactNode;
36
- } & NativeProps<"--z-index"> & React.RefAttributes<PopoverRef>>;
36
+ } & {
37
+ className?: string | undefined;
38
+ style?: (React.CSSProperties & Partial<Record<"--z-index", string>>) | undefined;
39
+ tabIndex?: number | undefined;
40
+ } & React.AriaAttributes & React.RefAttributes<PopoverRef>>;
@@ -0,0 +1,35 @@
1
+ import React from 'react';
2
+ import { GetContainer } from '../../utils/render-to-container';
3
+ import { MaskProps } from '../mask';
4
+ import { PropagationEvent } from '../../utils/with-stop-propagation';
5
+ export declare type PopupBaseProps = {
6
+ afterClose?: () => void;
7
+ afterShow?: () => void;
8
+ bodyClassName?: string;
9
+ bodyStyle?: React.CSSProperties;
10
+ closeOnMaskClick?: boolean;
11
+ destroyOnClose?: boolean;
12
+ disableBodyScroll?: boolean;
13
+ forceRender?: boolean;
14
+ getContainer?: GetContainer;
15
+ mask?: boolean;
16
+ maskClassName?: string;
17
+ maskStyle?: MaskProps['style'];
18
+ onClick?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
19
+ onClose?: () => void;
20
+ onMaskClick?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
21
+ showCloseButton?: boolean;
22
+ stopPropagation?: PropagationEvent[];
23
+ visible?: boolean;
24
+ };
25
+ export declare const defaultPopupBaseProps: {
26
+ closeOnMaskClick: boolean;
27
+ destroyOnClose: boolean;
28
+ disableBodyScroll: boolean;
29
+ forceRender: boolean;
30
+ getContainer: () => HTMLElement;
31
+ mask: boolean;
32
+ showCloseButton: boolean;
33
+ stopPropagation: string[];
34
+ visible: boolean;
35
+ };
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.defaultPopupBaseProps = void 0;
7
+ const defaultPopupBaseProps = {
8
+ closeOnMaskClick: false,
9
+ destroyOnClose: false,
10
+ disableBodyScroll: true,
11
+ forceRender: false,
12
+ getContainer: () => document.body,
13
+ mask: true,
14
+ showCloseButton: false,
15
+ stopPropagation: ['click'],
16
+ visible: false
17
+ };
18
+ exports.defaultPopupBaseProps = defaultPopupBaseProps;
@@ -10,26 +10,58 @@
10
10
  z-index: calc(var(--z-index) + 10);
11
11
  }
12
12
 
13
+ .adm-popup-body .adm-popup-close-icon {
14
+ position: absolute;
15
+ z-index: 100;
16
+ }
17
+
13
18
  .adm-popup-body-position-bottom {
14
19
  width: 100%;
15
20
  bottom: 0;
16
21
  left: 0;
17
22
  }
18
23
 
24
+ .adm-popup-body-position-bottom .adm-popup-close-icon {
25
+ right: 16px;
26
+ top: 16px;
27
+ }
28
+
19
29
  .adm-popup-body-position-top {
20
30
  width: 100%;
21
31
  top: 0;
22
32
  left: 0;
23
33
  }
24
34
 
35
+ .adm-popup-body-position-top .adm-popup-close-icon {
36
+ right: 16px;
37
+ bottom: 16px;
38
+ }
39
+
25
40
  .adm-popup-body-position-left {
26
41
  height: 100%;
27
42
  top: 0;
28
43
  left: 0;
29
44
  }
30
45
 
46
+ .adm-popup-body-position-left .adm-popup-close-icon {
47
+ right: 16px;
48
+ top: 16px;
49
+ }
50
+
31
51
  .adm-popup-body-position-right {
32
52
  height: 100%;
33
53
  top: 0;
34
54
  right: 0;
55
+ }
56
+
57
+ .adm-popup-body-position-right .adm-popup-close-icon {
58
+ left: 16px;
59
+ top: 16px;
60
+ }
61
+
62
+ .adm-popup-close-icon {
63
+ cursor: pointer;
64
+ padding: 8px;
65
+ font-size: 36px;
66
+ color: var(--adm-color-weak);
35
67
  }
@@ -1,23 +1,7 @@
1
- import React, { FC, PropsWithChildren } from 'react';
1
+ import { FC, PropsWithChildren } from 'react';
2
2
  import { NativeProps } from '../../utils/native-props';
3
- import type { MaskProps } from '../mask';
4
- import { GetContainer } from '../../utils/render-to-container';
5
- import { PropagationEvent } from '../../utils/with-stop-propagation';
6
- export declare type PopupProps = PropsWithChildren<{
7
- afterClose?: () => void;
8
- afterShow?: () => void;
9
- bodyClassName?: string;
10
- bodyStyle?: React.CSSProperties;
11
- destroyOnClose?: boolean;
12
- forceRender?: boolean;
13
- getContainer?: GetContainer;
14
- mask?: boolean;
15
- maskClassName?: string;
16
- maskStyle?: MaskProps['style'];
17
- onClick?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
18
- onMaskClick?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
3
+ import { PopupBaseProps } from './popup-base-props';
4
+ export declare type PopupProps = PopupBaseProps & PropsWithChildren<{
19
5
  position?: 'bottom' | 'top' | 'left' | 'right';
20
- stopPropagation?: PropagationEvent[];
21
- visible?: boolean;
22
6
  }> & NativeProps<'--z-index'>;
23
7
  export declare const Popup: FC<PopupProps>;
@@ -23,9 +23,15 @@ var _renderToContainer = require("../../utils/render-to-container");
23
23
 
24
24
  var _web = require("@react-spring/web");
25
25
 
26
+ var _withStopPropagation = require("../../utils/with-stop-propagation");
27
+
26
28
  var _shouldRender = require("../../utils/should-render");
27
29
 
28
- var _withStopPropagation = require("../../utils/with-stop-propagation");
30
+ var _antdMobileIcons = require("antd-mobile-icons");
31
+
32
+ var _popupBaseProps = require("./popup-base-props");
33
+
34
+ var _useInnerVisible = require("../../utils/use-inner-visible");
29
35
 
30
36
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
31
37
 
@@ -34,21 +40,21 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
34
40
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
35
41
 
36
42
  const classPrefix = `adm-popup`;
37
- const defaultProps = {
38
- position: 'bottom',
39
- visible: false,
40
- getContainer: () => document.body,
41
- mask: true,
42
- stopPropagation: ['click']
43
- };
43
+ const defaultProps = Object.assign(Object.assign({}, _popupBaseProps.defaultPopupBaseProps), {
44
+ position: 'bottom'
45
+ });
44
46
 
45
47
  const Popup = p => {
46
48
  const props = (0, _withDefaultProps.mergeProps)(defaultProps, p);
47
49
  const bodyCls = (0, _classnames.default)(`${classPrefix}-body`, props.bodyClassName, `${classPrefix}-body-position-${props.position}`);
48
- const ref = (0, _react.useRef)(null);
49
50
  const [active, setActive] = (0, _react.useState)(props.visible);
50
- (0, _useLockScroll.useLockScroll)(ref, active);
51
- const shouldRender = (0, _shouldRender.useShouldRender)(active, props.forceRender, props.destroyOnClose);
51
+ (0, _ahooks.useIsomorphicLayoutEffect)(() => {
52
+ if (props.visible) {
53
+ setActive(true);
54
+ }
55
+ }, [props.visible]);
56
+ const ref = (0, _react.useRef)(null);
57
+ (0, _useLockScroll.useLockScroll)(ref, props.disableBodyScroll && active);
52
58
  const unmountedRef = (0, _ahooks.useUnmountedRef)();
53
59
  const {
54
60
  percent
@@ -60,9 +66,6 @@ const Popup = p => {
60
66
  tension: 300,
61
67
  friction: 30
62
68
  },
63
- onStart: () => {
64
- setActive(true);
65
- },
66
69
  onRest: () => {
67
70
  var _a, _b;
68
71
 
@@ -76,6 +79,7 @@ const Popup = p => {
76
79
  }
77
80
  }
78
81
  });
82
+ const maskVisible = (0, _useInnerVisible.useInnerVisible)(active && props.visible);
79
83
  const node = (0, _withStopPropagation.withStopPropagation)(props.stopPropagation, (0, _nativeProps.withNativeProps)(props, _react.default.createElement("div", {
80
84
  className: classPrefix,
81
85
  onClick: props.onClick,
@@ -83,8 +87,18 @@ const Popup = p => {
83
87
  display: active ? undefined : 'none'
84
88
  }
85
89
  }, props.mask && _react.default.createElement(_mask.default, {
86
- visible: props.visible,
87
- onMaskClick: props.onMaskClick,
90
+ visible: maskVisible,
91
+ forceRender: props.forceRender,
92
+ destroyOnClose: props.destroyOnClose,
93
+ onMaskClick: e => {
94
+ var _a, _b;
95
+
96
+ (_a = props.onMaskClick) === null || _a === void 0 ? void 0 : _a.call(props, e);
97
+
98
+ if (props.closeOnMaskClick) {
99
+ (_b = props.onClose) === null || _b === void 0 ? void 0 : _b.call(props);
100
+ }
101
+ },
88
102
  className: props.maskClassName,
89
103
  style: props.maskStyle,
90
104
  disableBodyScroll: false,
@@ -113,8 +127,19 @@ const Popup = p => {
113
127
  })
114
128
  }),
115
129
  ref: ref
116
- }, shouldRender && props.children))));
117
- return (0, _renderToContainer.renderToContainer)(props.getContainer, node);
130
+ }, props.showCloseButton && _react.default.createElement("a", {
131
+ className: (0, _classnames.default)(`${classPrefix}-close-icon`, 'adm-plain-anchor'),
132
+ onClick: () => {
133
+ var _a;
134
+
135
+ (_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props);
136
+ }
137
+ }, _react.default.createElement(_antdMobileIcons.CloseOutline, null)), props.children))));
138
+ return _react.default.createElement(_shouldRender.ShouldRender, {
139
+ active: active,
140
+ forceRender: props.forceRender,
141
+ destroyOnClose: props.destroyOnClose
142
+ }, (0, _renderToContainer.renderToContainer)(props.getContainer, node));
118
143
  };
119
144
 
120
145
  exports.Popup = Popup;
@@ -1,19 +1,33 @@
1
1
  .adm-progress-bar {
2
- --track-width: var(--adm-progress-bar-track-width, 6px);
2
+ --track-width: var(--adm-progress-bar-track-width, 16px);
3
3
  --track-color: var(--adm-progress-bar-track-color, #e5e5e5);
4
4
  --fill-color: var(--adm-progress-bar-fill-color, var(--adm-color-primary));
5
+ --text-width: var(--adm-progress-bar-text-width, 80px);
6
+ display: flex;
7
+ align-items: center;
5
8
  }
6
9
 
7
10
  .adm-progress-bar-trail {
11
+ flex: auto;
8
12
  background: var(--track-color);
9
13
  overflow: hidden;
10
14
  height: var(--track-width);
11
- border-radius: var(--track-width);
12
15
  }
13
16
 
14
17
  .adm-progress-bar-fill {
15
18
  transition: width 0.3s;
16
19
  background: var(--fill-color);
17
- height: 100%;
20
+ height: var(--track-width);
21
+ }
22
+
23
+ .adm-progress-bar-text {
24
+ flex: none;
25
+ width: calc(var(--text-width) + 16px);
26
+ padding-left: 16px;
27
+ color: #999999;
28
+ }
29
+
30
+ .adm-progress-bar-rounded .adm-progress-bar-trail,
31
+ .adm-progress-bar-rounded .adm-progress-bar-fill {
18
32
  border-radius: var(--track-width);
19
33
  }
@@ -1,6 +1,8 @@
1
- import { FC } from 'react';
1
+ import { FC, ReactNode } from 'react';
2
2
  import { NativeProps } from '../../utils/native-props';
3
3
  export declare type ProgressBarProps = {
4
4
  percent?: number;
5
- } & NativeProps<'--track-width' | '--track-color' | '--fill-color'>;
5
+ rounded?: boolean;
6
+ text?: boolean | ReactNode | ((percent: number) => ReactNode);
7
+ } & NativeProps<'--track-width' | '--track-color' | '--fill-color' | '--text-width'>;
6
8
  export declare const ProgressBar: FC<ProgressBarProps>;
@@ -11,25 +11,47 @@ var _nativeProps = require("../../utils/native-props");
11
11
 
12
12
  var _withDefaultProps = require("../../utils/with-default-props");
13
13
 
14
+ var _classnames = _interopRequireDefault(require("classnames"));
15
+
16
+ var _isNodeWithContent = require("../../utils/is-node-with-content");
17
+
14
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
19
 
16
20
  const classPrefix = `adm-progress-bar`;
21
+ const defaultProps = {
22
+ percent: 0,
23
+ rounded: true,
24
+ text: false
25
+ };
17
26
 
18
27
  const ProgressBar = p => {
19
- const props = (0, _withDefaultProps.mergeProps)({
20
- percent: 0
21
- }, p);
28
+ const props = (0, _withDefaultProps.mergeProps)(defaultProps, p);
22
29
  const fillStyle = {
23
30
  width: `${props.percent}%`
24
31
  };
32
+
33
+ const textElement = function () {
34
+ if (props.text === true) {
35
+ return `${props.percent}%`;
36
+ }
37
+
38
+ if (typeof props.text === 'function') {
39
+ return props.text(props.percent);
40
+ }
41
+
42
+ return props.text;
43
+ }();
44
+
25
45
  return (0, _nativeProps.withNativeProps)(props, _react.default.createElement("div", {
26
- className: classPrefix
46
+ className: (0, _classnames.default)(classPrefix, props.rounded && `${classPrefix}-rounded`)
27
47
  }, _react.default.createElement("div", {
28
48
  className: `${classPrefix}-trail`
29
49
  }, _react.default.createElement("div", {
30
50
  className: `${classPrefix}-fill`,
31
51
  style: fillStyle
32
- }))));
52
+ })), (0, _isNodeWithContent.isNodeWithContent)(textElement) && _react.default.createElement("div", {
53
+ className: `${classPrefix}-text`
54
+ }, textElement)));
33
55
  };
34
56
 
35
57
  exports.ProgressBar = ProgressBar;
@@ -62,16 +62,16 @@ const Radio = p => {
62
62
 
63
63
  checked = groupContext.value.includes(value);
64
64
 
65
- setChecked = checked => {
65
+ setChecked = innerChecked => {
66
66
  var _a;
67
67
 
68
- if (checked) {
68
+ if (innerChecked) {
69
69
  groupContext.check(value);
70
70
  } else {
71
71
  groupContext.uncheck(value);
72
72
  }
73
73
 
74
- (_a = props.onChange) === null || _a === void 0 ? void 0 : _a.call(props, checked);
74
+ (_a = props.onChange) === null || _a === void 0 ? void 0 : _a.call(props, innerChecked);
75
75
  };
76
76
 
77
77
  disabled = disabled || groupContext.disabled;
@@ -31,4 +31,8 @@ export declare const SearchBar: React.ForwardRefExoticComponent<Pick<InputProps,
31
31
  onSearch?: ((val: string) => void) | undefined;
32
32
  onChange?: ((val: string) => void) | undefined;
33
33
  onCancel?: (() => void) | undefined;
34
- } & NativeProps<"--height" | "--border-radius" | "--padding-left" | "--background" | "--placeholder-color"> & React.RefAttributes<InputRef>>;
34
+ } & {
35
+ className?: string | undefined;
36
+ style?: (React.CSSProperties & Partial<Record<"--height" | "--border-radius" | "--padding-left" | "--background" | "--placeholder-color", string>>) | undefined;
37
+ tabIndex?: number | undefined;
38
+ } & React.AriaAttributes & React.RefAttributes<InputRef>>;
@@ -178,7 +178,8 @@ const Slider = p => {
178
178
  dragLockRef.current -= 1;
179
179
  }, 100);
180
180
  }
181
- }
181
+ },
182
+ "aria-label": props['aria-label']
182
183
  });
183
184
  };
184
185
 
@@ -1,4 +1,5 @@
1
1
  import React, { FC, RefObject, ReactNode } from 'react';
2
+ import { NativeProps } from '../../utils/native-props';
2
3
  declare type ThumbProps = {
3
4
  value: number;
4
5
  min: number;
@@ -8,6 +9,6 @@ declare type ThumbProps = {
8
9
  trackRef: RefObject<HTMLDivElement>;
9
10
  icon?: React.ReactNode;
10
11
  popover: boolean | ((value: number) => ReactNode);
11
- };
12
+ } & NativeProps;
12
13
  declare const Thumb: FC<ThumbProps>;
13
14
  export default Thumb;
@@ -13,6 +13,8 @@ var _thumbIcon = require("./thumb-icon");
13
13
 
14
14
  var _popover = require("../popover/popover");
15
15
 
16
+ var _configProvider = require("../config-provider");
17
+
16
18
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
17
19
 
18
20
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -29,6 +31,9 @@ const Thumb = props => {
29
31
  icon
30
32
  } = props;
31
33
  const prevValue = (0, _react.useRef)(value);
34
+ const {
35
+ locale
36
+ } = (0, _configProvider.useConfig)();
32
37
 
33
38
  const currentPosition = () => {
34
39
  return {
@@ -70,7 +75,14 @@ const Thumb = props => {
70
75
  return _react.default.createElement("div", Object.assign({
71
76
  className: `${classPrefix}-thumb-container`,
72
77
  style: currentPosition()
73
- }, bind()), renderPopoverContent ? _react.default.createElement(_popover.Popover, {
78
+ }, bind(), {
79
+ role: 'slider',
80
+ "aria-label": props['aria-label'] || locale.Slider.name,
81
+ "aria-valuemax": max,
82
+ "aria-valuemin": min,
83
+ "aria-valuenow": value,
84
+ "aria-disabled": disabled
85
+ }), renderPopoverContent ? _react.default.createElement(_popover.Popover, {
74
86
  content: renderPopoverContent(value),
75
87
  placement: 'top',
76
88
  visible: dragging,
@@ -25,6 +25,8 @@ var _button = _interopRequireDefault(require("../button"));
25
25
 
26
26
  var _big = _interopRequireDefault(require("big.js"));
27
27
 
28
+ var _configProvider = require("../config-provider");
29
+
28
30
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
29
31
 
30
32
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -48,6 +50,9 @@ const Stepper = p => {
48
50
  min,
49
51
  inputReadOnly
50
52
  } = props;
53
+ const {
54
+ locale
55
+ } = (0, _configProvider.useConfig)();
51
56
  const [value, setValue] = (0, _usePropsValue.usePropsValue)(props);
52
57
  const [inputValue, setInputValue] = (0, _react.useState)(() => convertValueToText(value, props.digits));
53
58
 
@@ -129,7 +134,8 @@ const Stepper = p => {
129
134
  disabled: minusDisabled(),
130
135
  fill: 'none',
131
136
  shape: 'rectangular',
132
- color: 'primary'
137
+ color: 'primary',
138
+ "aria-label": locale.Stepper.decrease
133
139
  }, _react.default.createElement(_antdMobileIcons.MinusOutline, null)), _react.default.createElement("div", {
134
140
  className: `${classPrefix}-middle`
135
141
  }, _react.default.createElement(_input.default, {
@@ -151,14 +157,19 @@ const Stepper = p => {
151
157
  setHasFocus(false);
152
158
  (_a = props.onBlur) === null || _a === void 0 ? void 0 : _a.call(props, e);
153
159
  },
154
- readOnly: inputReadOnly
160
+ readOnly: inputReadOnly,
161
+ role: 'spinbutton',
162
+ "aria-valuenow": Number(inputValue),
163
+ "aria-valuemax": max,
164
+ "aria-valuemin": min
155
165
  })), _react.default.createElement(_button.default, {
156
166
  className: `${classPrefix}-plus`,
157
167
  onClick: handlePlus,
158
168
  disabled: plusDisabled(),
159
169
  fill: 'none',
160
170
  shape: 'rectangular',
161
- color: 'primary'
171
+ color: 'primary',
172
+ "aria-label": locale.Stepper.increase
162
173
  }, _react.default.createElement(_antdMobileIcons.AddOutline, null))));
163
174
  };
164
175
 
@@ -17,7 +17,7 @@
17
17
  .adm-step .adm-step-indicator .adm-step-icon-container {
18
18
  position: absolute;
19
19
  z-index: 1;
20
- background: var(--adm-color-white);
20
+ background: var(--adm-color-background);
21
21
  color: var(--icon-color);
22
22
  }
23
23
 
@@ -29,5 +29,9 @@ export declare const SwipeAction: React.ForwardRefExoticComponent<{
29
29
  closeOnAction?: boolean | undefined;
30
30
  children: ReactNode;
31
31
  stopPropagation?: "click"[] | undefined;
32
- } & NativeProps<"--background"> & React.RefAttributes<SwipeActionRef>>;
32
+ } & {
33
+ className?: string | undefined;
34
+ style?: (React.CSSProperties & Partial<Record<"--background", string>>) | undefined;
35
+ tabIndex?: number | undefined;
36
+ } & React.AriaAttributes & React.RefAttributes<SwipeActionRef>>;
33
37
  export {};