antd-mobile 5.39.0 → 5.41.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (312) hide show
  1. package/2x/README.md +8 -1
  2. package/2x/bundle/antd-mobile.cjs.development.js +2495 -1614
  3. package/2x/bundle/antd-mobile.cjs.js +7 -7
  4. package/2x/bundle/antd-mobile.es.development.js +1530 -649
  5. package/2x/bundle/antd-mobile.es.js +7495 -6799
  6. package/2x/bundle/antd-mobile.umd.development.js +2494 -1613
  7. package/2x/bundle/antd-mobile.umd.js +7 -7
  8. package/2x/bundle/style.css +11 -5
  9. package/2x/cjs/components/button/button.d.ts +2 -2
  10. package/2x/cjs/components/button/button.js +1 -0
  11. package/2x/cjs/components/calendar-picker-view/calendar-picker-view.js +3 -0
  12. package/2x/cjs/components/date-picker/date-picker-date-utils.d.ts +1 -1
  13. package/2x/cjs/components/date-picker/date-picker-date-utils.js +23 -8
  14. package/2x/cjs/components/date-picker/date-picker-quarter-utils.d.ts +3 -1
  15. package/2x/cjs/components/date-picker/date-picker-quarter-utils.js +7 -2
  16. package/2x/cjs/components/date-picker/date-picker-week-utils.d.ts +3 -1
  17. package/2x/cjs/components/date-picker/date-picker-week-utils.js +12 -4
  18. package/2x/cjs/components/date-picker-view/date-picker-view.d.ts +5 -3
  19. package/2x/cjs/components/date-picker-view/date-picker-view.js +3 -3
  20. package/2x/cjs/components/date-picker-view/useRenderLabel.js +2 -2
  21. package/2x/cjs/components/ellipsis/ellipsis.d.ts +3 -0
  22. package/2x/cjs/components/ellipsis/ellipsis.js +10 -2
  23. package/2x/cjs/components/number-keyboard/number-keyboard.d.ts +1 -1
  24. package/2x/cjs/components/popover/wrapper.d.ts +6 -9
  25. package/2x/cjs/components/popover/wrapper.js +32 -6
  26. package/2x/cjs/components/space/space.css +4 -4
  27. package/2x/cjs/components/swiper/swiper.js +1 -1
  28. package/2x/cjs/components/tabs/tabs.js +45 -13
  29. package/2x/cjs/components/virtual-input/virtual-input.css +7 -1
  30. package/2x/cjs/components/virtual-input/virtual-input.d.ts +6 -0
  31. package/2x/cjs/components/virtual-input/virtual-input.js +133 -7
  32. package/2x/cjs/index.d.ts +1 -0
  33. package/2x/cjs/index.js +7 -0
  34. package/2x/cjs/locales/ar-SA.d.ts +1 -0
  35. package/2x/cjs/locales/ar-SA.js +1 -0
  36. package/2x/cjs/locales/base.d.ts +1 -0
  37. package/2x/cjs/locales/base.js +1 -0
  38. package/2x/cjs/locales/cnr-ME.d.ts +1 -0
  39. package/2x/cjs/locales/cnr-ME.js +1 -0
  40. package/2x/cjs/locales/da-DK.d.ts +1 -0
  41. package/2x/cjs/locales/de-DE.d.ts +1 -0
  42. package/2x/cjs/locales/de-DE.js +1 -0
  43. package/2x/cjs/locales/en-US.d.ts +1 -0
  44. package/2x/cjs/locales/es-ES.d.ts +1 -0
  45. package/2x/cjs/locales/fa-IR.d.ts +1 -0
  46. package/2x/cjs/locales/fr-FR.d.ts +1 -0
  47. package/2x/cjs/locales/hr-HR.d.ts +1 -0
  48. package/2x/cjs/locales/hr-HR.js +1 -0
  49. package/2x/cjs/locales/hu-HU.d.ts +1 -0
  50. package/2x/cjs/locales/id-ID.d.ts +1 -0
  51. package/2x/cjs/locales/in-ID.d.ts +1 -0
  52. package/2x/cjs/locales/in-ID.js +1 -0
  53. package/2x/cjs/locales/it-IT.d.ts +1 -0
  54. package/2x/cjs/locales/ja-JP.d.ts +1 -0
  55. package/2x/cjs/locales/kk-KZ.d.ts +1 -0
  56. package/2x/cjs/locales/ko-KR.d.ts +1 -0
  57. package/2x/cjs/locales/ms-MY.d.ts +1 -0
  58. package/2x/cjs/locales/ms-MY.js +1 -0
  59. package/2x/cjs/locales/nb-NO.d.ts +1 -0
  60. package/2x/cjs/locales/nl-NL.d.ts +1 -0
  61. package/2x/cjs/locales/pt-BR.d.ts +1 -0
  62. package/2x/cjs/locales/ru-RU.d.ts +1 -0
  63. package/2x/cjs/locales/ru-RU.js +8 -2
  64. package/2x/cjs/locales/sr-RS.d.ts +1 -0
  65. package/2x/cjs/locales/sr-RS.js +1 -0
  66. package/2x/cjs/locales/th-TH.d.ts +1 -0
  67. package/2x/cjs/locales/th-TH.js +1 -0
  68. package/2x/cjs/locales/tr-TR.d.ts +1 -0
  69. package/2x/cjs/locales/vi-VN.d.ts +1 -0
  70. package/2x/cjs/locales/vi-VN.js +1 -0
  71. package/2x/cjs/locales/zh-CN.js +1 -0
  72. package/2x/cjs/locales/zh-HK.d.ts +1 -0
  73. package/2x/cjs/locales/zh-TW.d.ts +1 -0
  74. package/2x/cjs/utils/render-to-body.d.ts +1 -1
  75. package/2x/cjs/utils/render-to-body.js +2 -9
  76. package/2x/cjs/utils/render.d.ts +1 -9
  77. package/2x/cjs/utils/render.js +10 -68
  78. package/2x/cjs/utils/unstable-render.d.ts +9 -0
  79. package/2x/cjs/utils/unstable-render.js +37 -0
  80. package/2x/es/components/button/button.d.ts +2 -2
  81. package/2x/es/components/button/button.js +1 -0
  82. package/2x/es/components/calendar-picker-view/calendar-picker-view.js +3 -0
  83. package/2x/es/components/date-picker/date-picker-date-utils.d.ts +1 -1
  84. package/2x/es/components/date-picker/date-picker-date-utils.js +23 -8
  85. package/2x/es/components/date-picker/date-picker-quarter-utils.d.ts +3 -1
  86. package/2x/es/components/date-picker/date-picker-quarter-utils.js +7 -2
  87. package/2x/es/components/date-picker/date-picker-week-utils.d.ts +3 -1
  88. package/2x/es/components/date-picker/date-picker-week-utils.js +12 -4
  89. package/2x/es/components/date-picker-view/date-picker-view.d.ts +5 -3
  90. package/2x/es/components/date-picker-view/date-picker-view.js +4 -4
  91. package/2x/es/components/date-picker-view/useRenderLabel.js +2 -2
  92. package/2x/es/components/ellipsis/ellipsis.d.ts +3 -0
  93. package/2x/es/components/ellipsis/ellipsis.js +10 -2
  94. package/2x/es/components/number-keyboard/number-keyboard.d.ts +1 -1
  95. package/2x/es/components/popover/wrapper.d.ts +6 -9
  96. package/2x/es/components/popover/wrapper.js +30 -5
  97. package/2x/es/components/space/space.css +4 -4
  98. package/2x/es/components/swiper/swiper.js +1 -1
  99. package/2x/es/components/tabs/tabs.js +44 -12
  100. package/2x/es/components/virtual-input/virtual-input.css +7 -1
  101. package/2x/es/components/virtual-input/virtual-input.d.ts +6 -0
  102. package/2x/es/components/virtual-input/virtual-input.js +133 -7
  103. package/2x/es/index.d.ts +1 -0
  104. package/2x/es/index.js +3 -1
  105. package/2x/es/locales/ar-SA.d.ts +1 -0
  106. package/2x/es/locales/ar-SA.js +1 -0
  107. package/2x/es/locales/base.d.ts +1 -0
  108. package/2x/es/locales/base.js +1 -0
  109. package/2x/es/locales/cnr-ME.d.ts +1 -0
  110. package/2x/es/locales/cnr-ME.js +1 -0
  111. package/2x/es/locales/da-DK.d.ts +1 -0
  112. package/2x/es/locales/de-DE.d.ts +1 -0
  113. package/2x/es/locales/de-DE.js +1 -0
  114. package/2x/es/locales/en-US.d.ts +1 -0
  115. package/2x/es/locales/es-ES.d.ts +1 -0
  116. package/2x/es/locales/fa-IR.d.ts +1 -0
  117. package/2x/es/locales/fr-FR.d.ts +1 -0
  118. package/2x/es/locales/hr-HR.d.ts +1 -0
  119. package/2x/es/locales/hr-HR.js +1 -0
  120. package/2x/es/locales/hu-HU.d.ts +1 -0
  121. package/2x/es/locales/id-ID.d.ts +1 -0
  122. package/2x/es/locales/in-ID.d.ts +1 -0
  123. package/2x/es/locales/in-ID.js +1 -0
  124. package/2x/es/locales/it-IT.d.ts +1 -0
  125. package/2x/es/locales/ja-JP.d.ts +1 -0
  126. package/2x/es/locales/kk-KZ.d.ts +1 -0
  127. package/2x/es/locales/ko-KR.d.ts +1 -0
  128. package/2x/es/locales/ms-MY.d.ts +1 -0
  129. package/2x/es/locales/ms-MY.js +1 -0
  130. package/2x/es/locales/nb-NO.d.ts +1 -0
  131. package/2x/es/locales/nl-NL.d.ts +1 -0
  132. package/2x/es/locales/pt-BR.d.ts +1 -0
  133. package/2x/es/locales/ru-RU.d.ts +1 -0
  134. package/2x/es/locales/ru-RU.js +8 -2
  135. package/2x/es/locales/sr-RS.d.ts +1 -0
  136. package/2x/es/locales/sr-RS.js +1 -0
  137. package/2x/es/locales/th-TH.d.ts +1 -0
  138. package/2x/es/locales/th-TH.js +1 -0
  139. package/2x/es/locales/tr-TR.d.ts +1 -0
  140. package/2x/es/locales/vi-VN.d.ts +1 -0
  141. package/2x/es/locales/vi-VN.js +1 -0
  142. package/2x/es/locales/zh-CN.js +1 -0
  143. package/2x/es/locales/zh-HK.d.ts +1 -0
  144. package/2x/es/locales/zh-TW.d.ts +1 -0
  145. package/2x/es/utils/render-to-body.d.ts +1 -1
  146. package/2x/es/utils/render-to-body.js +2 -9
  147. package/2x/es/utils/render.d.ts +1 -9
  148. package/2x/es/utils/render.js +1 -65
  149. package/2x/es/utils/unstable-render.d.ts +9 -0
  150. package/2x/es/utils/unstable-render.js +28 -0
  151. package/2x/package.json +4 -4
  152. package/README.md +8 -1
  153. package/bundle/antd-mobile.cjs.development.js +2495 -1614
  154. package/bundle/antd-mobile.cjs.js +7 -7
  155. package/bundle/antd-mobile.compatible.umd.js +1 -1
  156. package/bundle/antd-mobile.es.development.js +1530 -649
  157. package/bundle/antd-mobile.es.js +7495 -6799
  158. package/bundle/antd-mobile.umd.development.js +2494 -1613
  159. package/bundle/antd-mobile.umd.js +7 -7
  160. package/bundle/style.css +1 -1
  161. package/cjs/components/button/button.d.ts +2 -2
  162. package/cjs/components/button/button.js +1 -0
  163. package/cjs/components/calendar-picker-view/calendar-picker-view.js +3 -0
  164. package/cjs/components/date-picker/date-picker-date-utils.d.ts +1 -1
  165. package/cjs/components/date-picker/date-picker-date-utils.js +23 -8
  166. package/cjs/components/date-picker/date-picker-quarter-utils.d.ts +3 -1
  167. package/cjs/components/date-picker/date-picker-quarter-utils.js +7 -2
  168. package/cjs/components/date-picker/date-picker-week-utils.d.ts +3 -1
  169. package/cjs/components/date-picker/date-picker-week-utils.js +12 -4
  170. package/cjs/components/date-picker-view/date-picker-view.d.ts +5 -3
  171. package/cjs/components/date-picker-view/date-picker-view.js +3 -3
  172. package/cjs/components/date-picker-view/useRenderLabel.js +2 -2
  173. package/cjs/components/ellipsis/ellipsis.d.ts +3 -0
  174. package/cjs/components/ellipsis/ellipsis.js +10 -2
  175. package/cjs/components/number-keyboard/number-keyboard.d.ts +1 -1
  176. package/cjs/components/popover/wrapper.d.ts +6 -9
  177. package/cjs/components/popover/wrapper.js +32 -6
  178. package/cjs/components/space/space.css +3 -3
  179. package/cjs/components/swiper/swiper.js +1 -1
  180. package/cjs/components/tabs/tabs.js +45 -13
  181. package/cjs/components/virtual-input/virtual-input.css +6 -1
  182. package/cjs/components/virtual-input/virtual-input.d.ts +6 -0
  183. package/cjs/components/virtual-input/virtual-input.js +133 -7
  184. package/cjs/index.d.ts +1 -0
  185. package/cjs/index.js +7 -0
  186. package/cjs/locales/ar-SA.d.ts +1 -0
  187. package/cjs/locales/ar-SA.js +1 -0
  188. package/cjs/locales/base.d.ts +1 -0
  189. package/cjs/locales/base.js +1 -0
  190. package/cjs/locales/cnr-ME.d.ts +1 -0
  191. package/cjs/locales/cnr-ME.js +1 -0
  192. package/cjs/locales/da-DK.d.ts +1 -0
  193. package/cjs/locales/de-DE.d.ts +1 -0
  194. package/cjs/locales/de-DE.js +1 -0
  195. package/cjs/locales/en-US.d.ts +1 -0
  196. package/cjs/locales/es-ES.d.ts +1 -0
  197. package/cjs/locales/fa-IR.d.ts +1 -0
  198. package/cjs/locales/fr-FR.d.ts +1 -0
  199. package/cjs/locales/hr-HR.d.ts +1 -0
  200. package/cjs/locales/hr-HR.js +1 -0
  201. package/cjs/locales/hu-HU.d.ts +1 -0
  202. package/cjs/locales/id-ID.d.ts +1 -0
  203. package/cjs/locales/in-ID.d.ts +1 -0
  204. package/cjs/locales/in-ID.js +1 -0
  205. package/cjs/locales/it-IT.d.ts +1 -0
  206. package/cjs/locales/ja-JP.d.ts +1 -0
  207. package/cjs/locales/kk-KZ.d.ts +1 -0
  208. package/cjs/locales/ko-KR.d.ts +1 -0
  209. package/cjs/locales/ms-MY.d.ts +1 -0
  210. package/cjs/locales/ms-MY.js +1 -0
  211. package/cjs/locales/nb-NO.d.ts +1 -0
  212. package/cjs/locales/nl-NL.d.ts +1 -0
  213. package/cjs/locales/pt-BR.d.ts +1 -0
  214. package/cjs/locales/ru-RU.d.ts +1 -0
  215. package/cjs/locales/ru-RU.js +8 -2
  216. package/cjs/locales/sr-RS.d.ts +1 -0
  217. package/cjs/locales/sr-RS.js +1 -0
  218. package/cjs/locales/th-TH.d.ts +1 -0
  219. package/cjs/locales/th-TH.js +1 -0
  220. package/cjs/locales/tr-TR.d.ts +1 -0
  221. package/cjs/locales/vi-VN.d.ts +1 -0
  222. package/cjs/locales/vi-VN.js +1 -0
  223. package/cjs/locales/zh-CN.js +1 -0
  224. package/cjs/locales/zh-HK.d.ts +1 -0
  225. package/cjs/locales/zh-TW.d.ts +1 -0
  226. package/cjs/utils/render-to-body.d.ts +1 -1
  227. package/cjs/utils/render-to-body.js +2 -9
  228. package/cjs/utils/render.d.ts +1 -9
  229. package/cjs/utils/render.js +10 -68
  230. package/cjs/utils/unstable-render.d.ts +9 -0
  231. package/cjs/utils/unstable-render.js +37 -0
  232. package/es/components/button/button.d.ts +2 -2
  233. package/es/components/button/button.js +1 -0
  234. package/es/components/calendar-picker-view/calendar-picker-view.js +3 -0
  235. package/es/components/date-picker/date-picker-date-utils.d.ts +1 -1
  236. package/es/components/date-picker/date-picker-date-utils.js +23 -8
  237. package/es/components/date-picker/date-picker-quarter-utils.d.ts +3 -1
  238. package/es/components/date-picker/date-picker-quarter-utils.js +7 -2
  239. package/es/components/date-picker/date-picker-week-utils.d.ts +3 -1
  240. package/es/components/date-picker/date-picker-week-utils.js +12 -4
  241. package/es/components/date-picker-view/date-picker-view.d.ts +5 -3
  242. package/es/components/date-picker-view/date-picker-view.js +4 -4
  243. package/es/components/date-picker-view/useRenderLabel.js +2 -2
  244. package/es/components/ellipsis/ellipsis.d.ts +3 -0
  245. package/es/components/ellipsis/ellipsis.js +10 -2
  246. package/es/components/number-keyboard/number-keyboard.d.ts +1 -1
  247. package/es/components/popover/wrapper.d.ts +6 -9
  248. package/es/components/popover/wrapper.js +30 -5
  249. package/es/components/space/space.css +3 -3
  250. package/es/components/swiper/swiper.js +1 -1
  251. package/es/components/tabs/tabs.js +44 -12
  252. package/es/components/virtual-input/virtual-input.css +6 -1
  253. package/es/components/virtual-input/virtual-input.d.ts +6 -0
  254. package/es/components/virtual-input/virtual-input.js +133 -7
  255. package/es/index.d.ts +1 -0
  256. package/es/index.js +3 -1
  257. package/es/locales/ar-SA.d.ts +1 -0
  258. package/es/locales/ar-SA.js +1 -0
  259. package/es/locales/base.d.ts +1 -0
  260. package/es/locales/base.js +1 -0
  261. package/es/locales/cnr-ME.d.ts +1 -0
  262. package/es/locales/cnr-ME.js +1 -0
  263. package/es/locales/da-DK.d.ts +1 -0
  264. package/es/locales/de-DE.d.ts +1 -0
  265. package/es/locales/de-DE.js +1 -0
  266. package/es/locales/en-US.d.ts +1 -0
  267. package/es/locales/es-ES.d.ts +1 -0
  268. package/es/locales/fa-IR.d.ts +1 -0
  269. package/es/locales/fr-FR.d.ts +1 -0
  270. package/es/locales/hr-HR.d.ts +1 -0
  271. package/es/locales/hr-HR.js +1 -0
  272. package/es/locales/hu-HU.d.ts +1 -0
  273. package/es/locales/id-ID.d.ts +1 -0
  274. package/es/locales/in-ID.d.ts +1 -0
  275. package/es/locales/in-ID.js +1 -0
  276. package/es/locales/it-IT.d.ts +1 -0
  277. package/es/locales/ja-JP.d.ts +1 -0
  278. package/es/locales/kk-KZ.d.ts +1 -0
  279. package/es/locales/ko-KR.d.ts +1 -0
  280. package/es/locales/ms-MY.d.ts +1 -0
  281. package/es/locales/ms-MY.js +1 -0
  282. package/es/locales/nb-NO.d.ts +1 -0
  283. package/es/locales/nl-NL.d.ts +1 -0
  284. package/es/locales/pt-BR.d.ts +1 -0
  285. package/es/locales/ru-RU.d.ts +1 -0
  286. package/es/locales/ru-RU.js +8 -2
  287. package/es/locales/sr-RS.d.ts +1 -0
  288. package/es/locales/sr-RS.js +1 -0
  289. package/es/locales/th-TH.d.ts +1 -0
  290. package/es/locales/th-TH.js +1 -0
  291. package/es/locales/tr-TR.d.ts +1 -0
  292. package/es/locales/vi-VN.d.ts +1 -0
  293. package/es/locales/vi-VN.js +1 -0
  294. package/es/locales/zh-CN.js +1 -0
  295. package/es/locales/zh-HK.d.ts +1 -0
  296. package/es/locales/zh-TW.d.ts +1 -0
  297. package/es/utils/render-to-body.d.ts +1 -1
  298. package/es/utils/render-to-body.js +2 -9
  299. package/es/utils/render.d.ts +1 -9
  300. package/es/utils/render.js +1 -65
  301. package/es/utils/unstable-render.d.ts +9 -0
  302. package/es/utils/unstable-render.js +28 -0
  303. package/package.json +4 -4
  304. package/umd/antd-mobile.js +1 -1
  305. package/2x/cjs/components/ellipsis/~ellipsis.d.ts +0 -15
  306. package/2x/cjs/components/ellipsis/~ellipsis.js +0 -161
  307. package/2x/es/components/ellipsis/~ellipsis.d.ts +0 -15
  308. package/2x/es/components/ellipsis/~ellipsis.js +0 -151
  309. package/cjs/components/ellipsis/~ellipsis.d.ts +0 -15
  310. package/cjs/components/ellipsis/~ellipsis.js +0 -161
  311. package/es/components/ellipsis/~ellipsis.d.ts +0 -15
  312. package/es/components/ellipsis/~ellipsis.js +0 -151
@@ -3,6 +3,10 @@ import React from 'react';
3
3
  import { NativeProps } from '../../utils/native-props';
4
4
  import type { InputProps } from '../input';
5
5
  import { NumberKeyboardProps } from '../number-keyboard';
6
+ export declare type Cursor = {
7
+ movable?: boolean;
8
+ onMove?: (position: number) => void;
9
+ };
6
10
  export declare type VirtualInputProps = {
7
11
  onFocus?: () => void;
8
12
  onBlur?: () => void;
@@ -10,6 +14,7 @@ export declare type VirtualInputProps = {
10
14
  keyboard?: ReactElement<NumberKeyboardProps>;
11
15
  clearable?: boolean;
12
16
  onClear?: () => void;
17
+ cursor?: Cursor;
13
18
  } & Pick<InputProps, 'value' | 'onChange' | 'placeholder' | 'disabled' | 'clearIcon'> & NativeProps<'--font-size' | '--color' | '--placeholder-color' | '--disabled-color' | '--text-align' | '--caret-width' | '--caret-color'>;
14
19
  export declare type VirtualInputRef = {
15
20
  focus: () => void;
@@ -22,6 +27,7 @@ export declare const VirtualInput: React.ForwardRefExoticComponent<{
22
27
  keyboard?: ReactElement<NumberKeyboardProps, string | React.JSXElementConstructor<any>> | undefined;
23
28
  clearable?: boolean | undefined;
24
29
  onClear?: (() => void) | undefined;
30
+ cursor?: Cursor | undefined;
25
31
  } & Pick<InputProps, "value" | "onChange" | "disabled" | "placeholder" | "clearIcon"> & {
26
32
  className?: string | undefined;
27
33
  style?: (React.CSSProperties & Partial<Record<"--color" | "--font-size" | "--placeholder-color" | "--text-align" | "--disabled-color" | "--caret-width" | "--caret-color", string>>) | undefined;
@@ -17,7 +17,10 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
17
17
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18
18
  const classPrefix = 'adm-virtual-input';
19
19
  const defaultProps = {
20
- defaultValue: ''
20
+ defaultValue: '',
21
+ cursor: {
22
+ movable: false
23
+ }
21
24
  };
22
25
  const VirtualInput = (0, _react.forwardRef)((props, ref) => {
23
26
  const {
@@ -29,6 +32,14 @@ const VirtualInput = (0, _react.forwardRef)((props, ref) => {
29
32
  const rootRef = (0, _react.useRef)(null);
30
33
  const contentRef = (0, _react.useRef)(null);
31
34
  const [hasFocus, setHasFocus] = (0, _react.useState)(false);
35
+ const [caretPosition, setCaretPosition] = (0, _react.useState)(value.length); // 光标位置,从 0 开始,如值是 2 则表示光标在顺序下标为 2 的数字之前
36
+ const keyboardDataRef = (0, _react.useRef)({}); // 临时记录虚拟键盘输入,在下次更新时用于判断光标位置如何调整
37
+ const touchDataRef = (0, _react.useRef)(); // 记录上一次 touch 时的坐标位置
38
+ const charRef = (0, _react.useRef)(null); // 第一个字符的 DOM
39
+ const charWidthRef = (0, _react.useRef)(0); // 单个字符宽度
40
+ const caretRef = (0, _react.useRef)(null); // 光标的 DOM
41
+ const [isCaretDragging, setIsCaretDragging] = (0, _react.useState)(false);
42
+ const touchMoveTimeoutRef = (0, _react.useRef)();
32
43
  const clearIcon = (0, _withDefaultProps.mergeProp)(_react.default.createElement(_antdMobileIcons.CloseCircleFill, null), componentConfig.clearIcon, props.clearIcon);
33
44
  function scrollToEnd() {
34
45
  const root = rootRef.current;
@@ -40,6 +51,24 @@ const VirtualInput = (0, _react.forwardRef)((props, ref) => {
40
51
  if (!content) return;
41
52
  content.scrollLeft = content.clientWidth;
42
53
  }
54
+ (0, _react.useEffect)(() => {
55
+ // 记录单个字符的宽度,用于光标移动时的计算
56
+ if (charRef.current) {
57
+ charWidthRef.current = charRef.current.getBoundingClientRect().width;
58
+ }
59
+ }, [value]);
60
+ (0, _react.useEffect)(() => {
61
+ // 经过外部受控逻辑后,再调整光标位置,如果受控逻辑改动了值则光标放到最后
62
+ if (value === keyboardDataRef.current.newValue) {
63
+ if (keyboardDataRef.current.mode === 'input') {
64
+ setCaretPosition(c => c + 1);
65
+ } else if (keyboardDataRef.current.mode === 'delete') {
66
+ setCaretPosition(c => c - 1);
67
+ }
68
+ } else {
69
+ setCaretPosition(value.length);
70
+ }
71
+ }, [value]);
43
72
  (0, _ahooks.useIsomorphicLayoutEffect)(() => {
44
73
  scrollToEnd();
45
74
  }, [value]);
@@ -72,12 +101,25 @@ const VirtualInput = (0, _react.forwardRef)((props, ref) => {
72
101
  const keyboardElement = keyboard && _react.default.cloneElement(keyboard, {
73
102
  onInput: v => {
74
103
  var _a, _b;
75
- setValue(value + v);
104
+ const newValue = value.substring(0, caretPosition) + v + value.substring(caretPosition);
105
+ // 临时记录,用于后续光标位置
106
+ keyboardDataRef.current = {
107
+ newValue,
108
+ mode: 'input'
109
+ };
110
+ setValue(newValue);
76
111
  (_b = (_a = keyboard.props).onInput) === null || _b === void 0 ? void 0 : _b.call(_a, v);
77
112
  },
78
113
  onDelete: () => {
79
114
  var _a, _b;
80
- setValue(value.slice(0, -1));
115
+ if (caretPosition === 0) return;
116
+ const newValue = value.substring(0, caretPosition - 1) + value.substring(caretPosition);
117
+ // 临时记录,用于后续光标位置
118
+ keyboardDataRef.current = {
119
+ newValue,
120
+ mode: 'delete'
121
+ };
122
+ setValue(newValue);
81
123
  (_b = (_a = keyboard.props).onDelete) === null || _b === void 0 ? void 0 : _b.call(_a);
82
124
  },
83
125
  visible: hasFocus,
@@ -95,10 +137,82 @@ const VirtualInput = (0, _react.forwardRef)((props, ref) => {
95
137
  },
96
138
  getContainer: null
97
139
  });
140
+ // 点击输入框时,将光标置于最后
141
+ const setCaretPositionToEnd = () => {
142
+ var _a, _b;
143
+ if (caretPosition !== value.length) {
144
+ setCaretPosition(value.length);
145
+ (_b = (_a = mergedProps.cursor) === null || _a === void 0 ? void 0 : _a.onMove) === null || _b === void 0 ? void 0 : _b.call(_a, value.length);
146
+ }
147
+ };
148
+ // 点击单个字符时,根据点击位置置于字符前或后
149
+ const changeCaretPosition = index => e => {
150
+ var _a, _b, _c;
151
+ if (mergedProps.disabled || !((_a = mergedProps.cursor) === null || _a === void 0 ? void 0 : _a.movable)) return;
152
+ e.stopPropagation();
153
+ const rect = e.target.getBoundingClientRect();
154
+ const midX = rect.left + rect.width / 2;
155
+ const clickX = e.clientX;
156
+ // 点击区域是否偏右
157
+ const isRight = clickX > midX;
158
+ const newCaretPosition = isRight ? index + 1 : index;
159
+ setCaretPosition(newCaretPosition);
160
+ (_c = (_b = mergedProps.cursor) === null || _b === void 0 ? void 0 : _b.onMove) === null || _c === void 0 ? void 0 : _c.call(_b, newCaretPosition);
161
+ };
162
+ // 在光标附近 touchmove 时也可以调整光标位置
163
+ const handleTouchStart = e => {
164
+ var _a;
165
+ if (mergedProps.disabled || !((_a = mergedProps.cursor) === null || _a === void 0 ? void 0 : _a.movable)) return;
166
+ if (!caretRef.current) return;
167
+ const touch = e.touches[0];
168
+ const caretRect = caretRef.current.getBoundingClientRect();
169
+ const distance = Math.abs(touch.clientX - (caretRect.left + caretRect.width / 2));
170
+ if (distance < 20) {
171
+ // 20px 阈值可调整
172
+ touchDataRef.current = {
173
+ startX: touch.clientX,
174
+ startCaretPosition: caretPosition
175
+ };
176
+ } else {
177
+ touchDataRef.current = null;
178
+ }
179
+ };
180
+ const handleTouchMove = e => {
181
+ var _a, _b, _c;
182
+ if (!touchDataRef.current || !((_a = mergedProps.cursor) === null || _a === void 0 ? void 0 : _a.movable)) return;
183
+ setIsCaretDragging(true);
184
+ const touch = e.touches[0];
185
+ const deltaX = touch.clientX - touchDataRef.current.startX;
186
+ const charWidth = charWidthRef.current;
187
+ const moveChars = Math.round(deltaX / charWidth);
188
+ let newCaretPosition = touchDataRef.current.startCaretPosition + moveChars;
189
+ // 边界处理
190
+ newCaretPosition = Math.max(0, Math.min(newCaretPosition, value.length));
191
+ setCaretPosition(newCaretPosition);
192
+ (_c = (_b = mergedProps.cursor) === null || _b === void 0 ? void 0 : _b.onMove) === null || _c === void 0 ? void 0 : _c.call(_b, newCaretPosition);
193
+ // 防止 touchend 不触发
194
+ if (touchMoveTimeoutRef.current) {
195
+ clearTimeout(touchMoveTimeoutRef.current);
196
+ }
197
+ touchMoveTimeoutRef.current = setTimeout(() => {
198
+ setIsCaretDragging(false);
199
+ touchMoveTimeoutRef.current = null;
200
+ }, 500);
201
+ };
202
+ const handleTouchEnd = () => {
203
+ touchDataRef.current = null;
204
+ setIsCaretDragging(false);
205
+ if (touchMoveTimeoutRef.current) {
206
+ clearTimeout(touchMoveTimeoutRef.current);
207
+ touchMoveTimeoutRef.current = null;
208
+ }
209
+ };
210
+ const chars = (value + '').split('');
98
211
  return (0, _nativeProps.withNativeProps)(mergedProps, _react.default.createElement("div", {
99
212
  ref: rootRef,
100
213
  className: (0, _classnames.default)(classPrefix, {
101
- [`${classPrefix}-disabled`]: mergedProps.disabled
214
+ [`${classPrefix}-disabled`]: mergedProps.disabled,
215
+ [`${classPrefix}-caret-dragging`]: isCaretDragging
102
216
  }),
103
217
  tabIndex: mergedProps.disabled ? undefined : 0,
104
218
  role: 'textbox',
@@ -109,12 +223,24 @@ const VirtualInput = (0, _react.forwardRef)((props, ref) => {
109
223
  className: `${classPrefix}-content`,
110
224
  ref: contentRef,
111
225
  "aria-disabled": mergedProps.disabled,
112
- "aria-label": mergedProps.placeholder
113
- }, value, _react.default.createElement("div", {
226
+ "aria-label": mergedProps.placeholder,
227
+ onClick: setCaretPositionToEnd,
228
+ onTouchStart: handleTouchStart,
229
+ onTouchMove: handleTouchMove,
230
+ onTouchEnd: handleTouchEnd
231
+ }, chars.slice(0, caretPosition).map((i, index) => _react.default.createElement("span", {
232
+ ref: index === 0 ? charRef : undefined,
233
+ key: index,
234
+ onClick: changeCaretPosition(index)
235
+ }, i)), _react.default.createElement("div", {
114
236
  className: `${classPrefix}-caret-container`
115
237
  }, hasFocus && _react.default.createElement("div", {
238
+ ref: caretRef,
116
239
  className: `${classPrefix}-caret`
117
- }))), mergedProps.clearable && !!value && hasFocus && _react.default.createElement("div", {
240
+ })), chars.slice(caretPosition).map((i, index) => _react.default.createElement("span", {
241
+ key: index,
242
+ onClick: changeCaretPosition(index + caretPosition)
243
+ }, i))), mergedProps.clearable && !!value && hasFocus && _react.default.createElement("div", {
118
244
  className: `${classPrefix}-clear`,
119
245
  onClick: e => {
120
246
  var _a;
package/2x/cjs/index.d.ts CHANGED
@@ -168,3 +168,4 @@ export { default as Footer } from './components/footer';
168
168
  export type { FooterProps } from './components/footer';
169
169
  export { createErrorBlock } from './components/error-block';
170
170
  export { reduceMotion, restoreMotion } from './utils/reduce-and-restore-motion';
171
+ export { unstableSetRender } from './utils/unstable-render';
package/2x/cjs/index.js CHANGED
@@ -525,6 +525,12 @@ Object.defineProperty(exports, "setDefaultConfig", {
525
525
  return _configProvider.setDefaultConfig;
526
526
  }
527
527
  });
528
+ Object.defineProperty(exports, "unstableSetRender", {
529
+ enumerable: true,
530
+ get: function () {
531
+ return _unstableRender.unstableSetRender;
532
+ }
533
+ });
528
534
  Object.defineProperty(exports, "useConfig", {
529
535
  enumerable: true,
530
536
  get: function () {
@@ -616,6 +622,7 @@ var _virtualInput = _interopRequireDefault(require("./components/virtual-input")
616
622
  var _waterMark = _interopRequireDefault(require("./components/water-mark"));
617
623
  var _footer = _interopRequireDefault(require("./components/footer"));
618
624
  var _reduceAndRestoreMotion = require("./utils/reduce-and-restore-motion");
625
+ var _unstableRender = require("./utils/unstable-render");
619
626
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
620
627
  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); }
621
628
  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; }
@@ -11,6 +11,7 @@ declare const arSA: {
11
11
  confirm: string;
12
12
  start: string;
13
13
  end: string;
14
+ startAndEnd: string;
14
15
  today: string;
15
16
  markItems: string[];
16
17
  yearAndMonth: string;
@@ -20,6 +20,7 @@ const arSA = (0, _mergeLocale.mergeLocale)(_base.base, {
20
20
  'confirm': 'تأكيد',
21
21
  'start': 'يبدأ',
22
22
  'end': 'ينهي',
23
+ 'startAndEnd': 'يبدأ/ينهي',
23
24
  'today': 'اليوم',
24
25
  'markItems': ['واحد', 'اثنين', 'ثلاثة', 'أربعة', 'خمسة', 'ستة', 'يوم'],
25
26
  'yearAndMonth': '${year} سنة ${month} شهر'
@@ -11,6 +11,7 @@ export declare const base: {
11
11
  confirm: string;
12
12
  start: string;
13
13
  end: string;
14
+ startAndEnd: string;
14
15
  today: string;
15
16
  markItems: string[];
16
17
  yearAndMonth: string;
@@ -18,6 +18,7 @@ const base = {
18
18
  confirm: 'Confirm',
19
19
  start: 'start',
20
20
  end: 'end',
21
+ startAndEnd: 'start/end',
21
22
  today: 'today',
22
23
  markItems: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
23
24
  yearAndMonth: '${year}/${month}'
@@ -11,6 +11,7 @@ declare const cnrME: {
11
11
  confirm: string;
12
12
  start: string;
13
13
  end: string;
14
+ startAndEnd: string;
14
15
  today: string;
15
16
  markItems: string[];
16
17
  yearAndMonth: string;
@@ -20,6 +20,7 @@ const cnrME = (0, _mergeLocale.mergeLocale)(_base.base, {
20
20
  confirm: 'Potvrdi',
21
21
  start: 'početak',
22
22
  end: 'kraj',
23
+ startAndEnd: 'početak/kraj',
23
24
  today: 'danas',
24
25
  markItems: ['Pon', 'Uto', 'Sre', 'Čet', 'Pet', 'Sub', 'Ned'],
25
26
  yearAndMonth: '${year}/${month}'
@@ -11,6 +11,7 @@ declare const daDK: {
11
11
  confirm: string;
12
12
  start: string;
13
13
  end: string;
14
+ startAndEnd: string;
14
15
  today: string;
15
16
  markItems: string[];
16
17
  yearAndMonth: string;
@@ -11,6 +11,7 @@ declare const deDE: {
11
11
  confirm: string;
12
12
  start: string;
13
13
  end: string;
14
+ startAndEnd: string;
14
15
  today: string;
15
16
  markItems: string[];
16
17
  yearAndMonth: string;
@@ -20,6 +20,7 @@ const deDE = (0, _mergeLocale.mergeLocale)(_base.base, {
20
20
  'confirm': 'Bestätigen',
21
21
  'start': 'Starten',
22
22
  'end': 'Beenden',
23
+ 'startAndEnd': 'Starten/Beenden',
23
24
  'today': 'Heute',
24
25
  'markItems': ['I', 'II', 'III', 'IV', 'V', 'Sechs', 'Tag'],
25
26
  'yearAndMonth': '${year}Jahr${month}Monat'
@@ -11,6 +11,7 @@ declare const enUS: {
11
11
  confirm: string;
12
12
  start: string;
13
13
  end: string;
14
+ startAndEnd: string;
14
15
  today: string;
15
16
  markItems: string[];
16
17
  yearAndMonth: string;
@@ -11,6 +11,7 @@ declare const esES: {
11
11
  confirm: string;
12
12
  start: string;
13
13
  end: string;
14
+ startAndEnd: string;
14
15
  today: string;
15
16
  markItems: string[];
16
17
  yearAndMonth: string;
@@ -11,6 +11,7 @@ declare const faIR: {
11
11
  confirm: string;
12
12
  start: string;
13
13
  end: string;
14
+ startAndEnd: string;
14
15
  today: string;
15
16
  markItems: string[];
16
17
  yearAndMonth: string;
@@ -11,6 +11,7 @@ declare const frFR: {
11
11
  confirm: string;
12
12
  start: string;
13
13
  end: string;
14
+ startAndEnd: string;
14
15
  today: string;
15
16
  markItems: string[];
16
17
  yearAndMonth: string;
@@ -11,6 +11,7 @@ declare const hrHR: {
11
11
  confirm: string;
12
12
  start: string;
13
13
  end: string;
14
+ startAndEnd: string;
14
15
  today: string;
15
16
  markItems: string[];
16
17
  yearAndMonth: string;
@@ -20,6 +20,7 @@ const hrHR = (0, _mergeLocale.mergeLocale)(_base.base, {
20
20
  confirm: 'Potvrdi',
21
21
  start: 'početak',
22
22
  end: 'kraj',
23
+ startAndEnd: 'početak/kraj',
23
24
  today: 'danas',
24
25
  markItems: ['Pon', 'Uto', 'Sri', 'Čet', 'Pet', 'Sub', 'Ned'],
25
26
  yearAndMonth: '${year}/${month}'
@@ -11,6 +11,7 @@ export declare const huHU: {
11
11
  confirm: string;
12
12
  start: string;
13
13
  end: string;
14
+ startAndEnd: string;
14
15
  today: string;
15
16
  markItems: string[];
16
17
  yearAndMonth: string;
@@ -11,6 +11,7 @@ declare const idID: {
11
11
  confirm: string;
12
12
  start: string;
13
13
  end: string;
14
+ startAndEnd: string;
14
15
  today: string;
15
16
  markItems: string[];
16
17
  yearAndMonth: string;
@@ -11,6 +11,7 @@ declare const inID: {
11
11
  confirm: string;
12
12
  start: string;
13
13
  end: string;
14
+ startAndEnd: string;
14
15
  today: string;
15
16
  markItems: string[];
16
17
  yearAndMonth: string;
@@ -20,6 +20,7 @@ const inID = (0, _mergeLocale.mergeLocale)(_base.base, {
20
20
  confirm: 'OK',
21
21
  start: 'Mulai',
22
22
  end: 'Selesai',
23
+ startAndEnd: 'Mulai/Selesai',
23
24
  today: 'Hari Ini',
24
25
  markItems: ['Senin', 'Selasa', 'Rabu', 'Kamis', 'Jumat', 'Sabtu', 'Minggu'],
25
26
  yearAndMonth: '${year} Tahun ${month} Bulan'
@@ -11,6 +11,7 @@ declare const itIT: {
11
11
  confirm: string;
12
12
  start: string;
13
13
  end: string;
14
+ startAndEnd: string;
14
15
  today: string;
15
16
  markItems: string[];
16
17
  yearAndMonth: string;
@@ -11,6 +11,7 @@ declare const jaJP: {
11
11
  confirm: string;
12
12
  start: string;
13
13
  end: string;
14
+ startAndEnd: string;
14
15
  today: string;
15
16
  markItems: string[];
16
17
  yearAndMonth: string;
@@ -11,6 +11,7 @@ declare const kkKZ: {
11
11
  confirm: string;
12
12
  start: string;
13
13
  end: string;
14
+ startAndEnd: string;
14
15
  today: string;
15
16
  markItems: string[];
16
17
  yearAndMonth: string;
@@ -11,6 +11,7 @@ declare const koKR: {
11
11
  confirm: string;
12
12
  start: string;
13
13
  end: string;
14
+ startAndEnd: string;
14
15
  today: string;
15
16
  markItems: string[];
16
17
  yearAndMonth: string;
@@ -11,6 +11,7 @@ declare const msMY: {
11
11
  confirm: string;
12
12
  start: string;
13
13
  end: string;
14
+ startAndEnd: string;
14
15
  today: string;
15
16
  markItems: string[];
16
17
  yearAndMonth: string;
@@ -20,6 +20,7 @@ const msMY = (0, _mergeLocale.mergeLocale)(_base.base, {
20
20
  'confirm': 'Ok',
21
21
  'start': 'Mula',
22
22
  'end': 'Tamat',
23
+ 'startAndEnd': 'Mula/Tamat',
23
24
  'today': 'Hari ini',
24
25
  'markItems': ['Satu', 'Dua', 'Tiga', 'Empat', 'Lima', 'Enam', 'Hari'],
25
26
  'yearAndMonth': 'Tahun${year} bulan ${month}'
@@ -11,6 +11,7 @@ declare const nbNO: {
11
11
  confirm: string;
12
12
  start: string;
13
13
  end: string;
14
+ startAndEnd: string;
14
15
  today: string;
15
16
  markItems: string[];
16
17
  yearAndMonth: string;
@@ -11,6 +11,7 @@ declare const nlNL: {
11
11
  confirm: string;
12
12
  start: string;
13
13
  end: string;
14
+ startAndEnd: string;
14
15
  today: string;
15
16
  markItems: string[];
16
17
  yearAndMonth: string;
@@ -11,6 +11,7 @@ declare const ptBR: {
11
11
  confirm: string;
12
12
  start: string;
13
13
  end: string;
14
+ startAndEnd: string;
14
15
  today: string;
15
16
  markItems: string[];
16
17
  yearAndMonth: string;
@@ -11,6 +11,7 @@ declare const ruRU: {
11
11
  confirm: string;
12
12
  start: string;
13
13
  end: string;
14
+ startAndEnd: string;
14
15
  today: string;
15
16
  markItems: string[];
16
17
  yearAndMonth: string;
@@ -16,6 +16,12 @@ const ruRU = (0, _mergeLocale.mergeLocale)(_base.base, {
16
16
  close: 'Закрыть'
17
17
  },
18
18
  Calendar: {
19
+ title: 'Выбор даты',
20
+ confirm: 'Подтвердить',
21
+ start: 'начало',
22
+ end: 'конец',
23
+ startAndEnd: 'начало/конец',
24
+ today: 'сегодня',
19
25
  markItems: ['Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб', 'Вс'],
20
26
  yearAndMonth: '${year}/${month}'
21
27
  },
@@ -119,9 +125,9 @@ const ruRU = (0, _mergeLocale.mergeLocale)(_base.base, {
119
125
  name: 'Ввод пароля'
120
126
  },
121
127
  PullToRefresh: {
122
- pulling: 'Прокрутите вниз, чтобы обновления',
128
+ pulling: 'Прокрутите вниз, чтобы обновить',
123
129
  canRelease: 'Отпустите, чтобы немедленно обновить',
124
- complete: 'Обновление успешно'
130
+ complete: 'Обновлено успешно'
125
131
  },
126
132
  SearchBar: {
127
133
  name: 'Панель поиска'
@@ -11,6 +11,7 @@ declare const srRS: {
11
11
  confirm: string;
12
12
  start: string;
13
13
  end: string;
14
+ startAndEnd: string;
14
15
  today: string;
15
16
  markItems: string[];
16
17
  yearAndMonth: string;
@@ -20,6 +20,7 @@ const srRS = (0, _mergeLocale.mergeLocale)(_base.base, {
20
20
  confirm: 'Потврди',
21
21
  start: 'почетак',
22
22
  end: 'крај',
23
+ startAndEnd: 'почетак/крај',
23
24
  today: 'данас',
24
25
  markItems: ['Пон', 'Уто', 'Сре', 'Чет', 'Пет', 'Суб', 'Нед'],
25
26
  yearAndMonth: '${year}/${month}'
@@ -11,6 +11,7 @@ declare const thTH: {
11
11
  confirm: string;
12
12
  start: string;
13
13
  end: string;
14
+ startAndEnd: string;
14
15
  today: string;
15
16
  markItems: string[];
16
17
  yearAndMonth: string;
@@ -20,6 +20,7 @@ const thTH = (0, _mergeLocale.mergeLocale)(_base.base, {
20
20
  confirm: 'ยืนยัน',
21
21
  start: 'เริ่ม',
22
22
  end: 'เสร็จ',
23
+ startAndEnd: 'เริ่ม/เสร็จ',
23
24
  today: 'วันนี้',
24
25
  markItems: ['วันจันทร์', 'วันอังคาร', 'วันพุธ', 'วันพฤหัสบดี', 'วันศุกร์', 'วันเสาร์', 'วันอาทิตย์'],
25
26
  yearAndMonth: '${year}/${month}'
@@ -11,6 +11,7 @@ declare const trTR: {
11
11
  confirm: string;
12
12
  start: string;
13
13
  end: string;
14
+ startAndEnd: string;
14
15
  today: string;
15
16
  markItems: string[];
16
17
  yearAndMonth: string;
@@ -11,6 +11,7 @@ declare const viVN: {
11
11
  confirm: string;
12
12
  start: string;
13
13
  end: string;
14
+ startAndEnd: string;
14
15
  today: string;
15
16
  markItems: string[];
16
17
  yearAndMonth: string;
@@ -20,6 +20,7 @@ const viVN = (0, _mergeLocale.mergeLocale)(_base.base, {
20
20
  'confirm': 'Xác nhận',
21
21
  'start': 'Bắt đầu',
22
22
  'end': 'Kết thúc',
23
+ 'startAndEnd': 'Bắt đầu/Kết thúc',
23
24
  'today': 'Hôm nay',
24
25
  'markItems': ['Một', 'Hai', 'Ba', 'Bốn', 'Năm', 'Sáu', 'Ngày'],
25
26
  'yearAndMonth': 'Tháng ${month} năm ${year}'
@@ -18,6 +18,7 @@ const zhCN = {
18
18
  confirm: '确认',
19
19
  start: '开始',
20
20
  end: '结束',
21
+ startAndEnd: '开始/结束',
21
22
  today: '今日',
22
23
  markItems: ['一', '二', '三', '四', '五', '六', '日'],
23
24
  yearAndMonth: '${year}年${month}月'
@@ -11,6 +11,7 @@ declare const zhHK: {
11
11
  confirm: string;
12
12
  start: string;
13
13
  end: string;
14
+ startAndEnd: string;
14
15
  today: string;
15
16
  markItems: string[];
16
17
  yearAndMonth: string;
@@ -11,6 +11,7 @@ declare const zhTW: {
11
11
  confirm: string;
12
12
  start: string;
13
13
  end: string;
14
+ startAndEnd: string;
14
15
  today: string;
15
16
  markItems: string[];
16
17
  yearAndMonth: string;
@@ -1,2 +1,2 @@
1
1
  import type { ReactElement } from 'react';
2
- export declare function renderToBody(element: ReactElement): () => void;
2
+ export declare function renderToBody(element: ReactElement): import("./unstable-render").UnmountType;