antd-mobile 5.32.0 → 5.32.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 (274) hide show
  1. package/2x/bundle/antd-mobile.cjs.development.js +385 -302
  2. package/2x/bundle/antd-mobile.cjs.js +9 -9
  3. package/2x/bundle/antd-mobile.es.development.js +385 -302
  4. package/2x/bundle/antd-mobile.es.js +5266 -5213
  5. package/2x/bundle/antd-mobile.umd.development.js +385 -302
  6. package/2x/bundle/antd-mobile.umd.js +9 -9
  7. package/2x/bundle/style.css +15 -15
  8. package/2x/cjs/components/action-sheet/action-sheet.css +1 -1
  9. package/2x/cjs/components/button/button.css +2 -2
  10. package/2x/cjs/components/calendar/calendar.js +5 -1
  11. package/2x/cjs/components/center-popup/center-popup.js +6 -5
  12. package/2x/cjs/components/collapse/collapse.js +27 -12
  13. package/2x/cjs/components/ellipsis/ellipsis.js +4 -4
  14. package/2x/cjs/components/error-block/create-error-block.js +4 -4
  15. package/2x/cjs/components/error-block/error-block.css +1 -1
  16. package/2x/cjs/components/floating-panel/floating-panel.js +8 -7
  17. package/2x/cjs/components/form/form-item.d.ts +1 -1
  18. package/2x/cjs/components/form/form-item.js +6 -9
  19. package/2x/cjs/components/form/form.css +1 -1
  20. package/2x/cjs/components/form/index.css +1 -1
  21. package/2x/cjs/components/image-uploader/image-uploader.css +1 -1
  22. package/2x/cjs/components/input/input.d.ts +2 -8
  23. package/2x/cjs/components/notice-bar/notice-bar.css +2 -2
  24. package/2x/cjs/components/number-keyboard/number-keyboard.css +2 -2
  25. package/2x/cjs/components/picker-view/wheel.js +61 -14
  26. package/2x/cjs/components/popover/popover-menu.css +2 -2
  27. package/2x/cjs/components/progress-bar/progress-bar.css +1 -1
  28. package/2x/cjs/components/pull-to-refresh/pull-to-refresh.js +1 -1
  29. package/2x/cjs/components/rate/rate.d.ts +1 -1
  30. package/2x/cjs/components/steps/steps.js +5 -5
  31. package/2x/cjs/components/swipe-action/swipe-action.d.ts +4 -3
  32. package/2x/cjs/components/tag/tag.js +1 -1
  33. package/2x/cjs/components/text-area/text-area.js +11 -2
  34. package/2x/cjs/components/toast/toast.css +2 -2
  35. package/2x/cjs/components/water-mark/water-mark.js +1 -1
  36. package/2x/cjs/locales/base.d.ts +1 -1
  37. package/2x/cjs/locales/base.js +1 -1
  38. package/2x/cjs/locales/da-DK.d.ts +1 -1
  39. package/2x/cjs/locales/da-DK.js +1 -1
  40. package/2x/cjs/locales/en-US.d.ts +1 -1
  41. package/2x/cjs/locales/es-ES.d.ts +1 -1
  42. package/2x/cjs/locales/es-ES.js +1 -1
  43. package/2x/cjs/locales/fa-IR.d.ts +1 -1
  44. package/2x/cjs/locales/fa-IR.js +1 -1
  45. package/2x/cjs/locales/fr-FR.d.ts +1 -1
  46. package/2x/cjs/locales/fr-FR.js +1 -1
  47. package/2x/cjs/locales/id-ID.d.ts +1 -1
  48. package/2x/cjs/locales/id-ID.js +1 -1
  49. package/2x/cjs/locales/it-IT.d.ts +1 -1
  50. package/2x/cjs/locales/it-IT.js +1 -1
  51. package/2x/cjs/locales/ja-JP.d.ts +1 -1
  52. package/2x/cjs/locales/ja-JP.js +1 -1
  53. package/2x/cjs/locales/kk-KZ.d.ts +1 -1
  54. package/2x/cjs/locales/kk-KZ.js +1 -1
  55. package/2x/cjs/locales/ko-KR.d.ts +1 -1
  56. package/2x/cjs/locales/ko-KR.js +1 -1
  57. package/2x/cjs/locales/nb-NO.d.ts +1 -1
  58. package/2x/cjs/locales/nb-NO.js +1 -1
  59. package/2x/cjs/locales/nl-NL.d.ts +1 -1
  60. package/2x/cjs/locales/nl-NL.js +1 -1
  61. package/2x/cjs/locales/ru-RU.d.ts +1 -1
  62. package/2x/cjs/locales/ru-RU.js +1 -1
  63. package/2x/cjs/locales/zh-CN.d.ts +1 -1
  64. package/2x/cjs/locales/zh-CN.js +1 -1
  65. package/2x/cjs/locales/zh-HK.d.ts +1 -1
  66. package/2x/cjs/locales/zh-HK.js +1 -1
  67. package/2x/cjs/locales/zh-TW.d.ts +1 -1
  68. package/2x/cjs/locales/zh-TW.js +1 -1
  69. package/2x/cjs/utils/replace-message.d.ts +1 -0
  70. package/2x/cjs/utils/replace-message.js +13 -0
  71. package/2x/cjs/utils/use-lock-scroll.js +6 -2
  72. package/2x/es/components/action-sheet/action-sheet.css +1 -1
  73. package/2x/es/components/button/button.css +2 -2
  74. package/2x/es/components/calendar/calendar.js +5 -1
  75. package/2x/es/components/center-popup/center-popup.js +6 -5
  76. package/2x/es/components/collapse/collapse.js +27 -12
  77. package/2x/es/components/ellipsis/ellipsis.js +4 -4
  78. package/2x/es/components/error-block/create-error-block.js +4 -4
  79. package/2x/es/components/error-block/error-block.css +1 -1
  80. package/2x/es/components/floating-panel/floating-panel.js +8 -7
  81. package/2x/es/components/form/form-item.d.ts +1 -1
  82. package/2x/es/components/form/form-item.js +6 -9
  83. package/2x/es/components/form/form.css +1 -1
  84. package/2x/es/components/form/index.css +1 -1
  85. package/2x/es/components/image-uploader/image-uploader.css +1 -1
  86. package/2x/es/components/input/input.d.ts +2 -8
  87. package/2x/es/components/notice-bar/notice-bar.css +2 -2
  88. package/2x/es/components/number-keyboard/number-keyboard.css +2 -2
  89. package/2x/es/components/picker-view/wheel.js +61 -14
  90. package/2x/es/components/popover/popover-menu.css +2 -2
  91. package/2x/es/components/progress-bar/progress-bar.css +1 -1
  92. package/2x/es/components/pull-to-refresh/pull-to-refresh.js +1 -1
  93. package/2x/es/components/rate/rate.d.ts +1 -1
  94. package/2x/es/components/steps/steps.js +5 -5
  95. package/2x/es/components/swipe-action/swipe-action.d.ts +4 -3
  96. package/2x/es/components/tag/tag.js +1 -1
  97. package/2x/es/components/text-area/text-area.js +11 -2
  98. package/2x/es/components/toast/toast.css +2 -2
  99. package/2x/es/components/water-mark/water-mark.js +1 -1
  100. package/2x/es/locales/base.d.ts +1 -1
  101. package/2x/es/locales/base.js +1 -1
  102. package/2x/es/locales/da-DK.d.ts +1 -1
  103. package/2x/es/locales/da-DK.js +1 -1
  104. package/2x/es/locales/en-US.d.ts +1 -1
  105. package/2x/es/locales/es-ES.d.ts +1 -1
  106. package/2x/es/locales/es-ES.js +1 -1
  107. package/2x/es/locales/fa-IR.d.ts +1 -1
  108. package/2x/es/locales/fa-IR.js +1 -1
  109. package/2x/es/locales/fr-FR.d.ts +1 -1
  110. package/2x/es/locales/fr-FR.js +1 -1
  111. package/2x/es/locales/id-ID.d.ts +1 -1
  112. package/2x/es/locales/id-ID.js +1 -1
  113. package/2x/es/locales/it-IT.d.ts +1 -1
  114. package/2x/es/locales/it-IT.js +1 -1
  115. package/2x/es/locales/ja-JP.d.ts +1 -1
  116. package/2x/es/locales/ja-JP.js +1 -1
  117. package/2x/es/locales/kk-KZ.d.ts +1 -1
  118. package/2x/es/locales/kk-KZ.js +1 -1
  119. package/2x/es/locales/ko-KR.d.ts +1 -1
  120. package/2x/es/locales/ko-KR.js +1 -1
  121. package/2x/es/locales/nb-NO.d.ts +1 -1
  122. package/2x/es/locales/nb-NO.js +1 -1
  123. package/2x/es/locales/nl-NL.d.ts +1 -1
  124. package/2x/es/locales/nl-NL.js +1 -1
  125. package/2x/es/locales/ru-RU.d.ts +1 -1
  126. package/2x/es/locales/ru-RU.js +1 -1
  127. package/2x/es/locales/zh-CN.d.ts +1 -1
  128. package/2x/es/locales/zh-CN.js +1 -1
  129. package/2x/es/locales/zh-HK.d.ts +1 -1
  130. package/2x/es/locales/zh-HK.js +1 -1
  131. package/2x/es/locales/zh-TW.d.ts +1 -1
  132. package/2x/es/locales/zh-TW.js +1 -1
  133. package/2x/es/utils/replace-message.d.ts +1 -0
  134. package/2x/es/utils/replace-message.js +7 -0
  135. package/2x/es/utils/use-lock-scroll.js +6 -2
  136. package/2x/package.json +1 -1
  137. package/bundle/antd-mobile.cjs.development.js +385 -302
  138. package/bundle/antd-mobile.cjs.js +9 -9
  139. package/bundle/antd-mobile.compatible.umd.js +1 -1
  140. package/bundle/antd-mobile.es.development.js +385 -302
  141. package/bundle/antd-mobile.es.js +5266 -5213
  142. package/bundle/antd-mobile.umd.development.js +385 -302
  143. package/bundle/antd-mobile.umd.js +9 -9
  144. package/bundle/style.css +1 -1
  145. package/cjs/components/action-sheet/action-sheet.css +1 -1
  146. package/cjs/components/button/button.css +2 -2
  147. package/cjs/components/calendar/calendar.js +5 -1
  148. package/cjs/components/center-popup/center-popup.js +6 -5
  149. package/cjs/components/collapse/collapse.js +27 -12
  150. package/cjs/components/ellipsis/ellipsis.js +4 -4
  151. package/cjs/components/error-block/create-error-block.js +4 -4
  152. package/cjs/components/error-block/error-block.css +1 -1
  153. package/cjs/components/floating-panel/floating-panel.js +8 -7
  154. package/cjs/components/form/form-item.d.ts +1 -1
  155. package/cjs/components/form/form-item.js +6 -9
  156. package/cjs/components/form/form.css +1 -1
  157. package/cjs/components/form/index.css +1 -1
  158. package/cjs/components/image-uploader/image-uploader.css +1 -1
  159. package/cjs/components/input/input.d.ts +2 -8
  160. package/cjs/components/notice-bar/notice-bar.css +2 -2
  161. package/cjs/components/number-keyboard/number-keyboard.css +2 -2
  162. package/cjs/components/picker-view/wheel.js +61 -14
  163. package/cjs/components/popover/popover-menu.css +2 -2
  164. package/cjs/components/progress-bar/progress-bar.css +1 -1
  165. package/cjs/components/pull-to-refresh/pull-to-refresh.js +1 -1
  166. package/cjs/components/rate/rate.d.ts +1 -1
  167. package/cjs/components/steps/steps.js +5 -5
  168. package/cjs/components/swipe-action/swipe-action.d.ts +4 -3
  169. package/cjs/components/tag/tag.js +1 -1
  170. package/cjs/components/text-area/text-area.js +11 -2
  171. package/cjs/components/toast/toast.css +2 -2
  172. package/cjs/components/water-mark/water-mark.js +1 -1
  173. package/cjs/locales/base.d.ts +1 -1
  174. package/cjs/locales/base.js +1 -1
  175. package/cjs/locales/da-DK.d.ts +1 -1
  176. package/cjs/locales/da-DK.js +1 -1
  177. package/cjs/locales/en-US.d.ts +1 -1
  178. package/cjs/locales/es-ES.d.ts +1 -1
  179. package/cjs/locales/es-ES.js +1 -1
  180. package/cjs/locales/fa-IR.d.ts +1 -1
  181. package/cjs/locales/fa-IR.js +1 -1
  182. package/cjs/locales/fr-FR.d.ts +1 -1
  183. package/cjs/locales/fr-FR.js +1 -1
  184. package/cjs/locales/id-ID.d.ts +1 -1
  185. package/cjs/locales/id-ID.js +1 -1
  186. package/cjs/locales/it-IT.d.ts +1 -1
  187. package/cjs/locales/it-IT.js +1 -1
  188. package/cjs/locales/ja-JP.d.ts +1 -1
  189. package/cjs/locales/ja-JP.js +1 -1
  190. package/cjs/locales/kk-KZ.d.ts +1 -1
  191. package/cjs/locales/kk-KZ.js +1 -1
  192. package/cjs/locales/ko-KR.d.ts +1 -1
  193. package/cjs/locales/ko-KR.js +1 -1
  194. package/cjs/locales/nb-NO.d.ts +1 -1
  195. package/cjs/locales/nb-NO.js +1 -1
  196. package/cjs/locales/nl-NL.d.ts +1 -1
  197. package/cjs/locales/nl-NL.js +1 -1
  198. package/cjs/locales/ru-RU.d.ts +1 -1
  199. package/cjs/locales/ru-RU.js +1 -1
  200. package/cjs/locales/zh-CN.d.ts +1 -1
  201. package/cjs/locales/zh-CN.js +1 -1
  202. package/cjs/locales/zh-HK.d.ts +1 -1
  203. package/cjs/locales/zh-HK.js +1 -1
  204. package/cjs/locales/zh-TW.d.ts +1 -1
  205. package/cjs/locales/zh-TW.js +1 -1
  206. package/cjs/utils/replace-message.d.ts +1 -0
  207. package/cjs/utils/replace-message.js +13 -0
  208. package/cjs/utils/use-lock-scroll.js +6 -2
  209. package/es/components/action-sheet/action-sheet.css +1 -1
  210. package/es/components/button/button.css +2 -2
  211. package/es/components/calendar/calendar.js +5 -1
  212. package/es/components/center-popup/center-popup.js +6 -5
  213. package/es/components/collapse/collapse.js +27 -12
  214. package/es/components/ellipsis/ellipsis.js +4 -4
  215. package/es/components/error-block/create-error-block.js +4 -4
  216. package/es/components/error-block/error-block.css +1 -1
  217. package/es/components/floating-panel/floating-panel.js +8 -7
  218. package/es/components/form/form-item.d.ts +1 -1
  219. package/es/components/form/form-item.js +6 -9
  220. package/es/components/form/form.css +1 -1
  221. package/es/components/form/index.css +1 -1
  222. package/es/components/image-uploader/image-uploader.css +1 -1
  223. package/es/components/input/input.d.ts +2 -8
  224. package/es/components/notice-bar/notice-bar.css +2 -2
  225. package/es/components/number-keyboard/number-keyboard.css +2 -2
  226. package/es/components/picker-view/wheel.js +61 -14
  227. package/es/components/popover/popover-menu.css +2 -2
  228. package/es/components/progress-bar/progress-bar.css +1 -1
  229. package/es/components/pull-to-refresh/pull-to-refresh.js +1 -1
  230. package/es/components/rate/rate.d.ts +1 -1
  231. package/es/components/steps/steps.js +5 -5
  232. package/es/components/swipe-action/swipe-action.d.ts +4 -3
  233. package/es/components/tag/tag.js +1 -1
  234. package/es/components/text-area/text-area.js +11 -2
  235. package/es/components/toast/toast.css +2 -2
  236. package/es/components/water-mark/water-mark.js +1 -1
  237. package/es/locales/base.d.ts +1 -1
  238. package/es/locales/base.js +1 -1
  239. package/es/locales/da-DK.d.ts +1 -1
  240. package/es/locales/da-DK.js +1 -1
  241. package/es/locales/en-US.d.ts +1 -1
  242. package/es/locales/es-ES.d.ts +1 -1
  243. package/es/locales/es-ES.js +1 -1
  244. package/es/locales/fa-IR.d.ts +1 -1
  245. package/es/locales/fa-IR.js +1 -1
  246. package/es/locales/fr-FR.d.ts +1 -1
  247. package/es/locales/fr-FR.js +1 -1
  248. package/es/locales/id-ID.d.ts +1 -1
  249. package/es/locales/id-ID.js +1 -1
  250. package/es/locales/it-IT.d.ts +1 -1
  251. package/es/locales/it-IT.js +1 -1
  252. package/es/locales/ja-JP.d.ts +1 -1
  253. package/es/locales/ja-JP.js +1 -1
  254. package/es/locales/kk-KZ.d.ts +1 -1
  255. package/es/locales/kk-KZ.js +1 -1
  256. package/es/locales/ko-KR.d.ts +1 -1
  257. package/es/locales/ko-KR.js +1 -1
  258. package/es/locales/nb-NO.d.ts +1 -1
  259. package/es/locales/nb-NO.js +1 -1
  260. package/es/locales/nl-NL.d.ts +1 -1
  261. package/es/locales/nl-NL.js +1 -1
  262. package/es/locales/ru-RU.d.ts +1 -1
  263. package/es/locales/ru-RU.js +1 -1
  264. package/es/locales/zh-CN.d.ts +1 -1
  265. package/es/locales/zh-CN.js +1 -1
  266. package/es/locales/zh-HK.d.ts +1 -1
  267. package/es/locales/zh-HK.js +1 -1
  268. package/es/locales/zh-TW.d.ts +1 -1
  269. package/es/locales/zh-TW.js +1 -1
  270. package/es/utils/replace-message.d.ts +1 -0
  271. package/es/utils/replace-message.js +7 -0
  272. package/es/utils/use-lock-scroll.js +6 -2
  273. package/package.json +1 -1
  274. package/umd/antd-mobile.js +1 -1
@@ -8,7 +8,7 @@ declare const itIT: {
8
8
  };
9
9
  Calendar: {
10
10
  markItems: string[];
11
- renderYearAndMonth: (year: number, month: number) => string;
11
+ yearAndMonth: string;
12
12
  };
13
13
  Cascader: {
14
14
  placeholder: string;
@@ -17,7 +17,7 @@ const itIT = (0, _mergeLocale.mergeLocale)(_base.base, {
17
17
  },
18
18
  Calendar: {
19
19
  markItems: ['lun', 'mar', 'mer', 'gio', 'ven', 'sab', 'dom'],
20
- renderYearAndMonth: (year, month) => `${month}/${year}`
20
+ yearAndMonth: '${month}/${year}'
21
21
  },
22
22
  Cascader: {
23
23
  placeholder: 'Si prega di selezionare'
@@ -8,7 +8,7 @@ declare const jaJP: {
8
8
  };
9
9
  Calendar: {
10
10
  markItems: string[];
11
- renderYearAndMonth: (year: number, month: number) => string;
11
+ yearAndMonth: string;
12
12
  };
13
13
  Cascader: {
14
14
  placeholder: string;
@@ -16,7 +16,7 @@ const jaJP = (0, _mergeLocale.mergeLocale)(_base.base, {
16
16
  },
17
17
  Calendar: {
18
18
  markItems: ['月', '火', '水', '木', '金', '土', '日'],
19
- renderYearAndMonth: (year, month) => ` ${year}年${month}月`
19
+ yearAndMonth: '${year}年${month}月'
20
20
  },
21
21
  Cascader: {
22
22
  placeholder: '選択下さい'
@@ -8,7 +8,7 @@ declare const kkKZ: {
8
8
  };
9
9
  Calendar: {
10
10
  markItems: string[];
11
- renderYearAndMonth: (year: number, month: number) => string;
11
+ yearAndMonth: string;
12
12
  };
13
13
  Cascader: {
14
14
  placeholder: string;
@@ -16,7 +16,7 @@ const kkKZ = (0, _mergeLocale.mergeLocale)(_base.base, {
16
16
  },
17
17
  Calendar: {
18
18
  markItems: ['Дү', 'Се', 'Сә', 'Бе', 'Жұ', 'Се', 'Же'],
19
- renderYearAndMonth: (year, month) => `${year}жыл${month}-ші ай`
19
+ yearAndMonth: '${year}жыл${month}-ші ай'
20
20
  },
21
21
  Cascader: {
22
22
  placeholder: 'Таңдаңыз'
@@ -8,7 +8,7 @@ declare const koKR: {
8
8
  };
9
9
  Calendar: {
10
10
  markItems: string[];
11
- renderYearAndMonth: (year: number, month: number) => string;
11
+ yearAndMonth: string;
12
12
  };
13
13
  Cascader: {
14
14
  placeholder: string;
@@ -17,7 +17,7 @@ const koKR = (0, _mergeLocale.mergeLocale)(_base.base, {
17
17
  },
18
18
  Calendar: {
19
19
  markItems: ['월', '화', '수', '목', '금', '토', '일'],
20
- renderYearAndMonth: (year, month) => `${year}년 ${month}월`
20
+ yearAndMonth: '${year}년 ${month}월'
21
21
  },
22
22
  Cascader: {
23
23
  placeholder: '선택됨'
@@ -8,7 +8,7 @@ declare const nbNO: {
8
8
  };
9
9
  Calendar: {
10
10
  markItems: string[];
11
- renderYearAndMonth: (year: number, month: number) => string;
11
+ yearAndMonth: string;
12
12
  };
13
13
  Cascader: {
14
14
  placeholder: string;
@@ -17,7 +17,7 @@ const nbNO = (0, _mergeLocale.mergeLocale)(_base.base, {
17
17
  },
18
18
  Calendar: {
19
19
  markItems: ['Man', 'Tir', 'Ons', 'Tor', 'Fre', 'Lør', 'Søn'],
20
- renderYearAndMonth: (year, month) => `${month}.${year}`
20
+ yearAndMonth: '${month}.${year}'
21
21
  },
22
22
  Cascader: {
23
23
  placeholder: 'Velg'
@@ -8,7 +8,7 @@ declare const nlNL: {
8
8
  };
9
9
  Calendar: {
10
10
  markItems: string[];
11
- renderYearAndMonth: (year: number, month: number) => string;
11
+ yearAndMonth: string;
12
12
  };
13
13
  Cascader: {
14
14
  placeholder: string;
@@ -17,7 +17,7 @@ const nlNL = (0, _mergeLocale.mergeLocale)(_base.base, {
17
17
  },
18
18
  Calendar: {
19
19
  markItems: ['Ma', 'Di', 'Wo', 'Do', 'Vr', 'Za', 'Zo'],
20
- renderYearAndMonth: (year, month) => `${month}-${year}`
20
+ yearAndMonth: '${month}-${year}'
21
21
  },
22
22
  Cascader: {
23
23
  placeholder: 'Selecteren'
@@ -8,7 +8,7 @@ declare const ruRU: {
8
8
  };
9
9
  Calendar: {
10
10
  markItems: string[];
11
- renderYearAndMonth: (year: number, month: number) => string;
11
+ yearAndMonth: string;
12
12
  };
13
13
  Cascader: {
14
14
  placeholder: string;
@@ -17,7 +17,7 @@ const ruRU = (0, _mergeLocale.mergeLocale)(_base.base, {
17
17
  },
18
18
  Calendar: {
19
19
  markItems: ['Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб', 'Вс'],
20
- renderYearAndMonth: (year, month) => `${year}/${month}`
20
+ yearAndMonth: '${year}/${month}'
21
21
  },
22
22
  Cascader: {
23
23
  placeholder: 'Выбор'
@@ -8,7 +8,7 @@ declare const zhCN: {
8
8
  };
9
9
  Calendar: {
10
10
  markItems: string[];
11
- renderYearAndMonth: (year: number, month: number) => string;
11
+ yearAndMonth: string;
12
12
  };
13
13
  Cascader: {
14
14
  placeholder: string;
@@ -17,7 +17,7 @@ const zhCN = (0, _mergeLocale.mergeLocale)(_base.base, {
17
17
  },
18
18
  Calendar: {
19
19
  markItems: ['一', '二', '三', '四', '五', '六', '日'],
20
- renderYearAndMonth: (year, month) => `${year}年${month}月`
20
+ yearAndMonth: '${year}年${month}月'
21
21
  },
22
22
  Cascader: {
23
23
  placeholder: '请选择'
@@ -8,7 +8,7 @@ declare const zhHK: {
8
8
  };
9
9
  Calendar: {
10
10
  markItems: string[];
11
- renderYearAndMonth: (year: number, month: number) => string;
11
+ yearAndMonth: string;
12
12
  };
13
13
  Cascader: {
14
14
  placeholder: string;
@@ -17,7 +17,7 @@ const zhHK = (0, _mergeLocale.mergeLocale)(_base.base, {
17
17
  },
18
18
  Calendar: {
19
19
  markItems: ['一', '二', '三', '四', '五', '六', '日'],
20
- renderYearAndMonth: (year, month) => `${year}年${month}月`
20
+ yearAndMonth: '${year}年${month}月'
21
21
  },
22
22
  Cascader: {
23
23
  placeholder: '請選擇'
@@ -8,7 +8,7 @@ declare const zhTW: {
8
8
  };
9
9
  Calendar: {
10
10
  markItems: string[];
11
- renderYearAndMonth: (year: number, month: number) => string;
11
+ yearAndMonth: string;
12
12
  };
13
13
  Cascader: {
14
14
  placeholder: string;
@@ -17,7 +17,7 @@ const zhTW = (0, _mergeLocale.mergeLocale)(_base.base, {
17
17
  },
18
18
  Calendar: {
19
19
  markItems: ['一', '二', '三', '四', '五', '六', '日'],
20
- renderYearAndMonth: (year, month) => `${year}年${month}月`
20
+ yearAndMonth: '${year}年${month}月'
21
21
  },
22
22
  Cascader: {
23
23
  placeholder: '請選擇'
@@ -0,0 +1 @@
1
+ export declare function replaceMessage(template: string, kv: Record<string, string>): string;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.replaceMessage = replaceMessage;
7
+ // 移植自 field-form https://github.com/react-component/field-form/blob/master/src/utils/validateUtil.ts#L21
8
+ function replaceMessage(template, kv) {
9
+ return template.replace(/\$\{\w+\}/g, str => {
10
+ const key = str.slice(2, -1);
11
+ return kv[key];
12
+ });
13
+ }
@@ -41,14 +41,18 @@ function useLockScroll(rootRef, shouldLock) {
41
41
  offsetHeight,
42
42
  scrollTop
43
43
  } = el;
44
+ const {
45
+ height
46
+ } = el.getBoundingClientRect();
44
47
  let status = '11';
45
48
  if (scrollTop === 0) {
46
49
  status = offsetHeight >= scrollHeight ? '00' : '01';
47
- } else if (scrollTop + offsetHeight >= scrollHeight) {
50
+ } else if (scrollHeight <= Math.round(height + scrollTop)) {
48
51
  status = '10';
49
52
  }
50
53
  if (status !== '11' && touch.isVertical() && !(parseInt(status, 2) & parseInt(direction, 2))) {
51
- if (event.cancelable) {
54
+ if (event.cancelable && _supportsPassive.supportsPassive) {
55
+ // https://github.com/ant-design/ant-design-mobile/issues/6282
52
56
  event.preventDefault();
53
57
  }
54
58
  }
@@ -27,7 +27,7 @@
27
27
  padding: 16px;
28
28
  }
29
29
  .adm-action-sheet-button-item:active {
30
- background-color: #eeeeee;
30
+ background-color: var(--adm-color-border);
31
31
  }
32
32
  .adm-action-sheet-button-item-disabled {
33
33
  cursor: not-allowed;
@@ -34,8 +34,8 @@
34
34
  transform: translate(calc(var(--border-width) * -1), calc(var(--border-width) * -1));
35
35
  width: 100%;
36
36
  height: 100%;
37
- background-color: #000;
38
- border: var(--border-width) var(--border-style) #000;
37
+ background-color: var(--adm-color-text-dark-solid);
38
+ border: var(--border-width) var(--border-style) var(--adm-color-text-dark-solid);
39
39
  border-radius: var(--border-radius);
40
40
  opacity: 0;
41
41
  content: ' ';
@@ -9,6 +9,7 @@ import { useConfig } from '../config-provider';
9
9
  import isoWeek from 'dayjs/plugin/isoWeek';
10
10
  import { useUpdateEffect } from 'ahooks';
11
11
  import { usePropsValue } from '../../utils/use-props-value';
12
+ import { replaceMessage } from '../../utils/replace-message';
12
13
  import { convertValueToRange, convertPageToDayjs } from './convert';
13
14
  dayjs.extend(isoWeek);
14
15
  const classPrefix = 'adm-calendar';
@@ -97,7 +98,10 @@ export const Calendar = forwardRef((p, ref) => {
97
98
  }
98
99
  }, props.prevMonthButton), React.createElement("div", {
99
100
  className: `${classPrefix}-title`
100
- }, locale.Calendar.renderYearAndMonth(current.year(), current.month() + 1)), React.createElement("a", {
101
+ }, replaceMessage(locale.Calendar.yearAndMonth, {
102
+ year: current.year().toString(),
103
+ month: (current.month() + 1).toString()
104
+ })), React.createElement("a", {
101
105
  className: classNames(`${classPrefix}-arrow-button`, `${classPrefix}-arrow-button-right`, `${classPrefix}-arrow-button-right-month`),
102
106
  onClick: () => {
103
107
  handlePageChange('add', 1, 'month');
@@ -12,6 +12,7 @@ import { ShouldRender } from '../../utils/should-render';
12
12
  import { useLockScroll } from '../../utils/use-lock-scroll';
13
13
  import { CloseOutline } from 'antd-mobile-icons';
14
14
  import { defaultPopupBaseProps } from '../popup/popup-base-props';
15
+ const classPrefix = 'adm-center-popup';
15
16
  const defaultProps = Object.assign(Object.assign({}, defaultPopupBaseProps), {
16
17
  getContainer: null
17
18
  });
@@ -48,11 +49,11 @@ export const CenterPopup = p => {
48
49
  useLockScroll(ref, props.disableBodyScroll && active);
49
50
  const maskVisible = useInnerVisible(active && props.visible);
50
51
  const body = React.createElement("div", {
51
- className: classNames('adm-center-popup-body', props.bodyClassName),
52
+ className: classNames(`${classPrefix}-body`, props.bodyClassName),
52
53
  style: props.bodyStyle
53
54
  }, props.children);
54
55
  const node = withStopPropagation(props.stopPropagation, withNativeProps(props, React.createElement("div", {
55
- className: 'adm-center-popup',
56
+ className: classPrefix,
56
57
  style: {
57
58
  display: active ? undefined : 'none',
58
59
  pointerEvents: active ? undefined : 'none'
@@ -69,18 +70,18 @@ export const CenterPopup = p => {
69
70
  }
70
71
  },
71
72
  style: props.maskStyle,
72
- className: classNames('adm-center-popup-mask', props.maskClassName),
73
+ className: classNames(`${classPrefix}-mask`, props.maskClassName),
73
74
  disableBodyScroll: false,
74
75
  stopPropagation: props.stopPropagation
75
76
  }), React.createElement("div", {
76
- className: 'adm-center-popup-wrap',
77
+ className: `${classPrefix}-wrap`,
77
78
  role: props.role,
78
79
  "aria-label": props['aria-label']
79
80
  }, React.createElement(animated.div, {
80
81
  style: style,
81
82
  ref: ref
82
83
  }, props.showCloseButton && React.createElement("a", {
83
- className: classNames('adm-center-popup-close', 'adm-plain-anchor'),
84
+ className: classNames(`${classPrefix}-close`, 'adm-plain-anchor'),
84
85
  onClick: () => {
85
86
  var _a;
86
87
  (_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props);
@@ -78,7 +78,6 @@ const CollapsePanelContent = props => {
78
78
  }, React.createElement(List.Item, null, shouldRender && props.children)));
79
79
  };
80
80
  export const Collapse = props => {
81
- var _a;
82
81
  const panels = [];
83
82
  traverseReactNode(props.children, child => {
84
83
  if (!isValidElement(child)) return;
@@ -86,18 +85,34 @@ export const Collapse = props => {
86
85
  if (typeof key !== 'string') return;
87
86
  panels.push(child);
88
87
  });
89
- const [activeKey, setActiveKey] = usePropsValue(props.accordion ? {
90
- value: props.activeKey === undefined ? undefined : props.activeKey === null ? [] : [props.activeKey],
91
- defaultValue: props.defaultActiveKey === undefined || props.defaultActiveKey === null ? [] : [props.defaultActiveKey],
92
- onChange: v => {
93
- var _a, _b;
94
- (_a = props.onChange) === null || _a === void 0 ? void 0 : _a.call(props, (_b = v[0]) !== null && _b !== void 0 ? _b : null);
88
+ const handlePropsValue = () => {
89
+ var _a;
90
+ if (!props.accordion) {
91
+ return {
92
+ value: props.activeKey,
93
+ defaultValue: (_a = props.defaultActiveKey) !== null && _a !== void 0 ? _a : [],
94
+ onChange: props.onChange
95
+ };
95
96
  }
96
- } : {
97
- value: props.activeKey,
98
- defaultValue: (_a = props.defaultActiveKey) !== null && _a !== void 0 ? _a : [],
99
- onChange: props.onChange
100
- });
97
+ const initValue = {
98
+ value: [],
99
+ defaultValue: [],
100
+ onChange: v => {
101
+ var _a, _b;
102
+ (_a = props.onChange) === null || _a === void 0 ? void 0 : _a.call(props, (_b = v[0]) !== null && _b !== void 0 ? _b : null);
103
+ }
104
+ };
105
+ if (props.activeKey === undefined) {
106
+ initValue.value = undefined;
107
+ } else if (props.activeKey !== null) {
108
+ initValue.value = [props.activeKey];
109
+ }
110
+ if (![null, undefined].includes(props.defaultActiveKey)) {
111
+ initValue.defaultValue = [props.defaultActiveKey];
112
+ }
113
+ return initValue;
114
+ };
115
+ const [activeKey, setActiveKey] = usePropsValue(handlePropsValue());
101
116
  const activeKeyList = activeKey === null ? [] : Array.isArray(activeKey) ? activeKey : [activeKey];
102
117
  return withNativeProps(props, React.createElement("div", {
103
118
  className: classPrefix
@@ -118,18 +118,18 @@ export const Ellipsis = p => {
118
118
  useIsomorphicLayoutEffect(() => {
119
119
  calcEllipsised();
120
120
  }, [props.content, props.direction, props.rows, props.expandText, props.collapseText]);
121
- const expandActionElement = exceeded && props.expandText ? withStopPropagation(props.stopPropagationForActionButtons, React.createElement("a", {
121
+ const expandActionElement = !!props.expandText && withStopPropagation(props.stopPropagationForActionButtons, React.createElement("a", {
122
122
  ref: expandElRef,
123
123
  onClick: () => {
124
124
  setExpanded(true);
125
125
  }
126
- }, props.expandText)) : null;
127
- const collapseActionElement = exceeded && props.collapseText ? withStopPropagation(props.stopPropagationForActionButtons, React.createElement("a", {
126
+ }, props.expandText));
127
+ const collapseActionElement = !!props.collapseText && withStopPropagation(props.stopPropagationForActionButtons, React.createElement("a", {
128
128
  ref: collapseElRef,
129
129
  onClick: () => {
130
130
  setExpanded(false);
131
131
  }
132
- }, props.collapseText)) : null;
132
+ }, props.collapseText));
133
133
  const renderContent = () => {
134
134
  if (!exceeded) return props.content;
135
135
  if (expanded) return React.createElement(React.Fragment, null, props.content, collapseActionElement);
@@ -15,7 +15,7 @@ export function createErrorBlock(imageRecord) {
15
15
  locale
16
16
  } = useConfig();
17
17
  const contentPack = locale.ErrorBlock[props.status];
18
- const des = 'description' in props ? props.description : contentPack.description;
18
+ const desc = 'description' in props ? props.description : contentPack.description;
19
19
  const title = 'title' in props ? props.title : contentPack.title;
20
20
  const image = (_a = props.image) !== null && _a !== void 0 ? _a : imageRecord[props.status];
21
21
  const imageNode = typeof image === 'string' ? React.createElement("img", {
@@ -30,11 +30,11 @@ export function createErrorBlock(imageRecord) {
30
30
  className: `${classPrefix}-image`
31
31
  }, imageNode), React.createElement("div", {
32
32
  className: `${classPrefix}-description`
33
- }, title && React.createElement("div", {
33
+ }, ![undefined, null].includes(title) && React.createElement("div", {
34
34
  className: `${classPrefix}-description-title`
35
- }, title), des && React.createElement("div", {
35
+ }, title), ![undefined, null].includes(desc) && React.createElement("div", {
36
36
  className: `${classPrefix}-description-subtitle`
37
- }, des)), props.children && React.createElement("div", {
37
+ }, desc)), props.children && React.createElement("div", {
38
38
  className: `${classPrefix}-content`
39
39
  }, props.children)));
40
40
  };
@@ -18,7 +18,7 @@
18
18
  }
19
19
  .adm-error-block-description {
20
20
  font-size: var(--adm-font-size-4);
21
- color: #999;
21
+ color: var(--adm-color-weak);
22
22
  line-height: 1.4;
23
23
  margin-top: 12px;
24
24
  }
@@ -7,6 +7,7 @@ import { nearest } from '../../utils/nearest';
7
7
  import { mergeProps } from '../../utils/with-default-props';
8
8
  import { useLockScroll } from '../../utils/use-lock-scroll';
9
9
  import { useMemoizedFn } from 'ahooks';
10
+ const classPrefix = 'adm-floating-panel';
10
11
  const defaultProps = {
11
12
  handleDraggingOfContent: true
12
13
  };
@@ -65,7 +66,7 @@ export const FloatingPanel = forwardRef((p, ref) => {
65
66
  const {
66
67
  event
67
68
  } = state;
68
- if (event.cancelable) {
69
+ if (event.cancelable && supportsPassive) {
69
70
  event.preventDefault();
70
71
  }
71
72
  event.stopPropagation();
@@ -89,7 +90,7 @@ export const FloatingPanel = forwardRef((p, ref) => {
89
90
  target: elementRef,
90
91
  eventOptions: supportsPassive ? {
91
92
  passive: false
92
- } : false
93
+ } : undefined
93
94
  });
94
95
  useImperativeHandle(ref, () => ({
95
96
  setHeight: (height, options) => {
@@ -102,23 +103,23 @@ export const FloatingPanel = forwardRef((p, ref) => {
102
103
  useLockScroll(elementRef, true);
103
104
  return withNativeProps(props, React.createElement(animated.div, {
104
105
  ref: elementRef,
105
- className: 'adm-floating-panel',
106
+ className: classPrefix,
106
107
  style: {
107
108
  height: Math.round(maxHeight),
108
109
  translateY: y.to(y => `calc(100% + (${Math.round(y)}px))`)
109
110
  }
110
111
  }, React.createElement("div", {
111
- className: 'adm-floating-panel-mask',
112
+ className: `${classPrefix}-mask`,
112
113
  style: {
113
114
  display: pulling ? 'block' : 'none'
114
115
  }
115
116
  }), React.createElement("div", {
116
- className: 'adm-floating-panel-header',
117
+ className: `${classPrefix}-header`,
117
118
  ref: headerRef
118
119
  }, React.createElement("div", {
119
- className: 'adm-floating-panel-bar'
120
+ className: `${classPrefix}-bar`
120
121
  })), React.createElement("div", {
121
- className: 'adm-floating-panel-content',
122
+ className: `${classPrefix}-content`,
122
123
  ref: contentRef
123
124
  }, props.children)));
124
125
  });
@@ -2,8 +2,8 @@ import React, { FC } from 'react';
2
2
  import { NativeProps } from '../../utils/native-props';
3
3
  import { FormInstance } from 'rc-field-form';
4
4
  import type { FieldProps } from 'rc-field-form/lib/Field';
5
- import { ListItemProps } from '../list';
6
5
  import type { FormLayout } from './index';
6
+ import { ListItemProps } from '../list';
7
7
  declare type RenderChildren<Values = any> = (form: FormInstance<Values>) => React.ReactNode;
8
8
  declare type ChildrenType<Values = any> = RenderChildren<Values> | React.ReactNode;
9
9
  declare type RcFieldProps = Omit<FieldProps, 'children'>;
@@ -20,7 +20,6 @@ const MemoInput = React.memo(({
20
20
  const FormItemLayout = props => {
21
21
  var _a;
22
22
  const {
23
- className,
24
23
  style,
25
24
  extra,
26
25
  label,
@@ -62,7 +61,7 @@ const FormItemLayout = props => {
62
61
  return null;
63
62
  }
64
63
  })();
65
- const labelElement = label ? React.createElement("label", {
64
+ const labelElement = !!label && React.createElement("label", {
66
65
  className: `${classPrefix}-label`,
67
66
  htmlFor: htmlFor
68
67
  }, label, requiredMark, help && React.createElement(Popover, {
@@ -74,21 +73,21 @@ const FormItemLayout = props => {
74
73
  onClick: e => {
75
74
  e.preventDefault();
76
75
  }
77
- }, React.createElement(QuestionCircleOutline, null)))) : null;
78
- const description = props.description || hasFeedback ? React.createElement(React.Fragment, null, props.description, hasFeedback && React.createElement(React.Fragment, null, props.errors.map((error, index) => React.createElement("div", {
76
+ }, React.createElement(QuestionCircleOutline, null))));
77
+ const description = (!!props.description || hasFeedback) && React.createElement(React.Fragment, null, props.description, hasFeedback && React.createElement(React.Fragment, null, props.errors.map((error, index) => React.createElement("div", {
79
78
  key: `error-${index}`,
80
79
  className: `${classPrefix}-feedback-error`
81
80
  }, error)), props.warnings.map((warning, index) => React.createElement("div", {
82
81
  key: `warning-${index}`,
83
82
  className: `${classPrefix}-feedback-warning`
84
- }, warning)))) : null;
83
+ }, warning))));
85
84
  return withNativeProps(props, React.createElement(List.Item, {
86
85
  style: style,
87
86
  title: layout === 'vertical' && labelElement,
88
87
  prefix: layout === 'horizontal' && labelElement,
89
88
  extra: extra,
90
89
  description: description,
91
- className: classNames(classPrefix, className, `${classPrefix}-${layout}`, {
90
+ className: classNames(classPrefix, `${classPrefix}-${layout}`, {
92
91
  [`${classPrefix}-hidden`]: hidden,
93
92
  [`${classPrefix}-has-error`]: props.errors.length
94
93
  }),
@@ -105,7 +104,6 @@ const FormItemLayout = props => {
105
104
  export const FormItem = props => {
106
105
  const {
107
106
  // 样式相关
108
- className,
109
107
  style,
110
108
  // FormItem 相关
111
109
  label,
@@ -132,7 +130,7 @@ export const FormItem = props => {
132
130
  clickable,
133
131
  arrow
134
132
  } = props,
135
- fieldProps = __rest(props, ["className", "style", "label", "help", "extra", "hasFeedback", "name", "required", "noStyle", "hidden", "layout", "childElementPosition", "description", "disabled", "rules", "children", "messageVariables", "trigger", "validateTrigger", "onClick", "shouldUpdate", "dependencies", "clickable", "arrow"]);
133
+ fieldProps = __rest(props, ["style", "label", "help", "extra", "hasFeedback", "name", "required", "noStyle", "hidden", "layout", "childElementPosition", "description", "disabled", "rules", "children", "messageVariables", "trigger", "validateTrigger", "onClick", "shouldUpdate", "dependencies", "clickable", "arrow"]);
136
134
  const {
137
135
  name: formName
138
136
  } = useContext(FormContext);
@@ -180,7 +178,6 @@ export const FormItem = props => {
180
178
  return subWarnings;
181
179
  }, curWarnings);
182
180
  return withNativeProps(props, React.createElement(FormItemLayout, {
183
- className: className,
184
181
  style: style,
185
182
  label: label,
186
183
  extra: extra,
@@ -23,5 +23,5 @@
23
23
  }
24
24
  .adm-form-list-operation {
25
25
  text-align: center;
26
- color: #1677ff;
26
+ color: var(--adm-color-primary);
27
27
  }
@@ -23,7 +23,7 @@
23
23
  }
24
24
  .adm-form-list-operation {
25
25
  text-align: center;
26
- color: #1677ff;
26
+ color: var(--adm-color-primary);
27
27
  }
28
28
  .adm-form-item + .adm-form-item {
29
29
  border-top: none;
@@ -76,7 +76,7 @@
76
76
  display: block;
77
77
  }
78
78
  .adm-image-uploader-upload-button-wrap .adm-image-uploader-upload-button-icon {
79
- color: #999999;
79
+ color: var(--adm-color-weak);
80
80
  font-size: 32px;
81
81
  }
82
82
  .adm-image-uploader-upload-button-wrap .adm-image-uploader-input {
@@ -4,13 +4,10 @@ declare type NativeInputProps = React.DetailedHTMLProps<React.InputHTMLAttribute
4
4
  declare type AriaProps = {
5
5
  role?: string;
6
6
  };
7
- export declare type InputProps = Pick<NativeInputProps, 'maxLength' | 'minLength' | 'autoComplete' | 'autoFocus' | 'pattern' | 'inputMode' | 'type' | 'name' | 'onFocus' | 'onBlur' | 'autoCapitalize' | 'autoCorrect' | 'onKeyDown' | 'onKeyUp' | 'onCompositionStart' | 'onCompositionEnd' | 'onClick' | 'step' | 'id'> & {
7
+ export declare type InputProps = Pick<NativeInputProps, 'maxLength' | 'minLength' | 'autoComplete' | 'autoFocus' | 'pattern' | 'inputMode' | 'type' | 'name' | 'onFocus' | 'onBlur' | 'autoCapitalize' | 'autoCorrect' | 'onKeyDown' | 'onKeyUp' | 'onCompositionStart' | 'onCompositionEnd' | 'onClick' | 'step' | 'id' | 'placeholder' | 'readOnly' | 'disabled'> & {
8
8
  value?: string;
9
9
  defaultValue?: string;
10
10
  onChange?: (val: string) => void;
11
- placeholder?: string;
12
- disabled?: boolean;
13
- readOnly?: boolean;
14
11
  clearable?: boolean;
15
12
  onlyShowClearWhenFocus?: boolean;
16
13
  onClear?: () => void;
@@ -25,13 +22,10 @@ export declare type InputRef = {
25
22
  blur: () => void;
26
23
  nativeElement: HTMLInputElement | null;
27
24
  };
28
- export declare const Input: React.ForwardRefExoticComponent<Pick<NativeInputProps, "pattern" | "id" | "onClick" | "onCompositionEnd" | "onCompositionStart" | "onFocus" | "onBlur" | "onKeyDown" | "onKeyUp" | "type" | "step" | "autoFocus" | "autoCapitalize" | "autoCorrect" | "inputMode" | "name" | "autoComplete" | "maxLength" | "minLength"> & {
25
+ export declare const Input: React.ForwardRefExoticComponent<Pick<NativeInputProps, "pattern" | "id" | "onClick" | "disabled" | "onCompositionEnd" | "onCompositionStart" | "onFocus" | "onBlur" | "onKeyDown" | "onKeyUp" | "type" | "step" | "autoFocus" | "placeholder" | "autoCapitalize" | "autoCorrect" | "inputMode" | "name" | "readOnly" | "autoComplete" | "maxLength" | "minLength"> & {
29
26
  value?: string | undefined;
30
27
  defaultValue?: string | undefined;
31
28
  onChange?: ((val: string) => void) | undefined;
32
- placeholder?: string | undefined;
33
- disabled?: boolean | undefined;
34
- readOnly?: boolean | undefined;
35
29
  clearable?: boolean | undefined;
36
30
  onlyShowClearWhenFocus?: boolean | undefined;
37
31
  onClear?: (() => void) | undefined;