vant 3.4.5 → 3.4.8

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 (476) hide show
  1. package/README.md +141 -0
  2. package/changelog.generated.md +79 -0
  3. package/es/address-list/AddressListItem.d.ts +3 -2
  4. package/es/address-list/AddressListItem.js +1 -1
  5. package/es/badge/Badge.d.ts +4 -3
  6. package/es/badge/index.d.ts +2 -2
  7. package/es/calendar/Calendar.d.ts +4 -0
  8. package/es/calendar/Calendar.js +3 -1
  9. package/es/calendar/CalendarDay.js +4 -0
  10. package/es/calendar/index.css +1 -1
  11. package/es/calendar/index.d.ts +3 -0
  12. package/es/calendar/index.less +2 -0
  13. package/es/calendar/types.d.ts +2 -1
  14. package/es/calendar/var.less +1 -0
  15. package/es/cascader/types.d.ts +2 -1
  16. package/es/checkbox/Checker.d.ts +2 -1
  17. package/es/collapse/Collapse.d.ts +7 -6
  18. package/es/collapse/index.d.ts +3 -3
  19. package/es/composables/use-touch.js +1 -1
  20. package/es/config-provider/ConfigProvider.d.ts +4 -3
  21. package/es/config-provider/index.d.ts +2 -2
  22. package/es/contact-list/ContactList.d.ts +3 -2
  23. package/es/coupon/Coupon.d.ts +2 -1
  24. package/es/coupon-list/CouponList.d.ts +3 -13
  25. package/es/coupon-list/CouponList.js +9 -7
  26. package/es/coupon-list/index.css +1 -1
  27. package/es/coupon-list/index.d.ts +2 -9
  28. package/es/coupon-list/index.less +4 -16
  29. package/es/coupon-list/style/index.js +1 -0
  30. package/es/coupon-list/style/less.js +1 -0
  31. package/es/coupon-list/var.less +0 -1
  32. package/es/datetime-picker/DatePicker.js +2 -2
  33. package/es/dialog/index.css +1 -1
  34. package/es/dialog/types.d.ts +2 -2
  35. package/es/dropdown-item/types.d.ts +2 -1
  36. package/es/empty/Empty.d.ts +8 -7
  37. package/es/empty/Empty.js +2 -2
  38. package/es/empty/index.d.ts +2 -2
  39. package/es/field/Field.d.ts +4 -0
  40. package/es/field/Field.js +2 -0
  41. package/es/field/index.d.ts +2 -0
  42. package/es/form/Form.js +1 -0
  43. package/es/form/types.d.ts +1 -0
  44. package/es/icon/index.css +1 -1
  45. package/es/index-bar/IndexBar.d.ts +5 -4
  46. package/es/index-bar/IndexBar.js +25 -4
  47. package/es/index-bar/index.d.ts +3 -3
  48. package/es/index-bar/types.d.ts +2 -1
  49. package/es/index.d.ts +1 -1
  50. package/es/index.js +1 -1
  51. package/es/locale/lang/da-DK.d.ts +64 -0
  52. package/es/locale/lang/da-DK.js +66 -0
  53. package/es/locale/lang/is-IS.d.ts +64 -0
  54. package/es/locale/lang/is-IS.js +74 -0
  55. package/es/locale/lang/la-LA.d.ts +64 -0
  56. package/es/locale/lang/la-LA.js +66 -0
  57. package/es/locale/lang/sv-SE.d.ts +64 -0
  58. package/es/locale/lang/sv-SE.js +66 -0
  59. package/es/nav-bar/NavBar.d.ts +1 -1
  60. package/es/nav-bar/NavBar.js +3 -3
  61. package/es/nav-bar/index.d.ts +1 -1
  62. package/es/notify/types.d.ts +2 -1
  63. package/es/number-keyboard/NumberKeyboard.js +10 -1
  64. package/es/picker/types.d.ts +3 -2
  65. package/es/popup/Popup.d.ts +4 -0
  66. package/es/popup/Popup.js +3 -0
  67. package/es/popup/index.css +1 -1
  68. package/es/popup/index.d.ts +3 -0
  69. package/es/progress/Progress.d.ts +4 -3
  70. package/es/progress/index.d.ts +2 -2
  71. package/es/rate/Rate.js +32 -10
  72. package/es/search/Search.d.ts +3 -0
  73. package/es/search/index.d.ts +2 -0
  74. package/es/share-sheet/ShareSheet.js +25 -11
  75. package/es/share-sheet/index.css +1 -1
  76. package/es/share-sheet/index.less +45 -1
  77. package/es/skeleton/Skeleton.d.ts +5 -4
  78. package/es/skeleton/Skeleton.js +6 -4
  79. package/es/skeleton/index.d.ts +3 -3
  80. package/es/slider/index.css +1 -1
  81. package/es/style/animation.css +1 -1
  82. package/es/style/base.css +1 -1
  83. package/es/style/base.less +5 -0
  84. package/es/swipe-cell/SwipeCell.js +1 -1
  85. package/es/swipe-cell/index.css +1 -1
  86. package/es/tabbar/Tabbar.d.ts +2 -2
  87. package/es/tabs/Tabs.d.ts +1 -1
  88. package/es/tabs/Tabs.js +1 -0
  89. package/es/tabs/types.d.ts +5 -4
  90. package/es/toast/Toast.js +1 -0
  91. package/es/toast/types.d.ts +3 -2
  92. package/es/tree-select/TreeSelect.d.ts +7 -6
  93. package/es/tree-select/index.d.ts +3 -3
  94. package/es/uploader/Uploader.d.ts +4 -4
  95. package/es/uploader/Uploader.js +2 -2
  96. package/es/uploader/UploaderPreviewItem.d.ts +3 -3
  97. package/es/uploader/UploaderPreviewItem.js +9 -6
  98. package/es/uploader/index.d.ts +2 -2
  99. package/es/uploader/types.d.ts +5 -5
  100. package/es/utils/basic.d.ts +1 -0
  101. package/es/utils/format.d.ts +7 -6
  102. package/es/utils/format.js +6 -0
  103. package/es/utils/validate.d.ts +2 -1
  104. package/lib/action-bar/ActionBar.js +8 -13
  105. package/lib/action-bar/index.js +9 -16
  106. package/lib/action-bar-button/ActionBarButton.js +8 -13
  107. package/lib/action-bar-button/index.js +9 -16
  108. package/lib/action-bar-icon/ActionBarIcon.js +8 -13
  109. package/lib/action-bar-icon/index.js +9 -16
  110. package/lib/action-sheet/ActionSheet.js +8 -13
  111. package/lib/action-sheet/index.js +9 -16
  112. package/lib/address-edit/AddressEdit.js +9 -16
  113. package/lib/address-edit/AddressEditDetail.js +8 -13
  114. package/lib/address-edit/index.js +9 -16
  115. package/lib/address-edit/types.js +7 -12
  116. package/lib/address-list/AddressList.js +9 -16
  117. package/lib/address-list/AddressListItem.d.ts +3 -2
  118. package/lib/address-list/AddressListItem.js +8 -13
  119. package/lib/address-list/index.js +9 -16
  120. package/lib/area/Area.js +8 -13
  121. package/lib/area/index.js +9 -16
  122. package/lib/area/types.js +7 -12
  123. package/lib/badge/Badge.d.ts +4 -3
  124. package/lib/badge/Badge.js +8 -13
  125. package/lib/badge/index.d.ts +2 -2
  126. package/lib/badge/index.js +9 -16
  127. package/lib/button/Button.js +8 -13
  128. package/lib/button/index.js +9 -16
  129. package/lib/button/types.js +7 -12
  130. package/lib/calendar/Calendar.d.ts +4 -0
  131. package/lib/calendar/Calendar.js +12 -17
  132. package/lib/calendar/CalendarDay.js +12 -13
  133. package/lib/calendar/CalendarHeader.js +8 -13
  134. package/lib/calendar/CalendarMonth.js +9 -16
  135. package/lib/calendar/index.css +1 -1
  136. package/lib/calendar/index.d.ts +3 -0
  137. package/lib/calendar/index.js +9 -16
  138. package/lib/calendar/index.less +2 -0
  139. package/lib/calendar/types.d.ts +2 -1
  140. package/lib/calendar/types.js +7 -12
  141. package/lib/calendar/utils.js +8 -13
  142. package/lib/calendar/var.less +1 -0
  143. package/lib/card/Card.js +8 -13
  144. package/lib/card/index.js +9 -16
  145. package/lib/cascader/Cascader.js +8 -13
  146. package/lib/cascader/index.js +9 -16
  147. package/lib/cascader/types.d.ts +2 -1
  148. package/lib/cascader/types.js +7 -12
  149. package/lib/cell/Cell.js +8 -13
  150. package/lib/cell/index.js +9 -16
  151. package/lib/cell-group/CellGroup.js +8 -13
  152. package/lib/cell-group/index.js +9 -16
  153. package/lib/checkbox/Checkbox.js +9 -16
  154. package/lib/checkbox/Checker.d.ts +2 -1
  155. package/lib/checkbox/Checker.js +8 -13
  156. package/lib/checkbox/index.js +9 -16
  157. package/lib/checkbox/types.js +7 -12
  158. package/lib/checkbox-group/CheckboxGroup.js +8 -13
  159. package/lib/checkbox-group/index.js +9 -16
  160. package/lib/checkbox-group/types.js +7 -12
  161. package/lib/circle/Circle.js +8 -13
  162. package/lib/circle/index.js +9 -16
  163. package/lib/col/Col.js +8 -13
  164. package/lib/col/index.js +9 -16
  165. package/lib/collapse/Collapse.d.ts +7 -6
  166. package/lib/collapse/Collapse.js +8 -13
  167. package/lib/collapse/index.d.ts +3 -3
  168. package/lib/collapse/index.js +9 -16
  169. package/lib/collapse-item/CollapseItem.js +8 -13
  170. package/lib/collapse-item/index.js +9 -16
  171. package/lib/collapse-item/types.js +7 -12
  172. package/lib/composables/on-popup-reopen.js +8 -13
  173. package/lib/composables/use-expose.js +8 -13
  174. package/lib/composables/use-height.js +8 -13
  175. package/lib/composables/use-id.js +8 -13
  176. package/lib/composables/use-lazy-render.js +8 -13
  177. package/lib/composables/use-lock-scroll.js +8 -13
  178. package/lib/composables/use-placeholder.js +8 -13
  179. package/lib/composables/use-refs.js +8 -13
  180. package/lib/composables/use-route.js +8 -13
  181. package/lib/composables/use-tab-status.js +8 -13
  182. package/lib/composables/use-touch.js +9 -14
  183. package/lib/composables/use-visibility-change.js +8 -13
  184. package/lib/config-provider/ConfigProvider.d.ts +4 -3
  185. package/lib/config-provider/ConfigProvider.js +8 -13
  186. package/lib/config-provider/index.d.ts +2 -2
  187. package/lib/config-provider/index.js +9 -16
  188. package/lib/contact-card/ContactCard.js +8 -13
  189. package/lib/contact-card/index.js +9 -16
  190. package/lib/contact-edit/ContactEdit.js +8 -13
  191. package/lib/contact-edit/index.js +9 -16
  192. package/lib/contact-list/ContactList.d.ts +3 -2
  193. package/lib/contact-list/ContactList.js +8 -13
  194. package/lib/contact-list/index.js +9 -16
  195. package/lib/count-down/CountDown.js +8 -13
  196. package/lib/count-down/index.js +9 -16
  197. package/lib/count-down/types.js +7 -12
  198. package/lib/count-down/utils.js +8 -13
  199. package/lib/coupon/Coupon.d.ts +2 -1
  200. package/lib/coupon/Coupon.js +8 -13
  201. package/lib/coupon/index.js +9 -16
  202. package/lib/coupon/utils.js +8 -13
  203. package/lib/coupon-cell/CouponCell.js +8 -13
  204. package/lib/coupon-cell/index.js +9 -16
  205. package/lib/coupon-list/CouponList.d.ts +3 -13
  206. package/lib/coupon-list/CouponList.js +17 -20
  207. package/lib/coupon-list/index.css +1 -1
  208. package/lib/coupon-list/index.d.ts +2 -9
  209. package/lib/coupon-list/index.js +9 -16
  210. package/lib/coupon-list/index.less +4 -16
  211. package/lib/coupon-list/style/index.js +1 -0
  212. package/lib/coupon-list/style/less.js +1 -0
  213. package/lib/coupon-list/var.less +0 -1
  214. package/lib/datetime-picker/DatePicker.js +10 -15
  215. package/lib/datetime-picker/DatetimePicker.js +9 -16
  216. package/lib/datetime-picker/TimePicker.js +8 -13
  217. package/lib/datetime-picker/index.js +9 -16
  218. package/lib/datetime-picker/types.js +7 -12
  219. package/lib/datetime-picker/utils.js +8 -13
  220. package/lib/dialog/Dialog.js +8 -13
  221. package/lib/dialog/function-call.js +9 -16
  222. package/lib/dialog/index.css +1 -1
  223. package/lib/dialog/index.js +8 -13
  224. package/lib/dialog/types.d.ts +2 -2
  225. package/lib/dialog/types.js +7 -12
  226. package/lib/divider/Divider.js +8 -13
  227. package/lib/divider/index.js +9 -16
  228. package/lib/dropdown-item/DropdownItem.js +8 -13
  229. package/lib/dropdown-item/index.js +9 -16
  230. package/lib/dropdown-item/types.d.ts +2 -1
  231. package/lib/dropdown-item/types.js +7 -12
  232. package/lib/dropdown-menu/DropdownMenu.js +8 -13
  233. package/lib/dropdown-menu/index.js +9 -16
  234. package/lib/dropdown-menu/types.js +7 -12
  235. package/lib/empty/Empty.d.ts +8 -7
  236. package/lib/empty/Empty.js +9 -14
  237. package/lib/empty/Network.js +8 -13
  238. package/lib/empty/index.d.ts +2 -2
  239. package/lib/empty/index.js +9 -16
  240. package/lib/field/Field.d.ts +4 -0
  241. package/lib/field/Field.js +10 -13
  242. package/lib/field/index.d.ts +2 -0
  243. package/lib/field/index.js +9 -16
  244. package/lib/field/types.js +7 -12
  245. package/lib/field/utils.js +8 -13
  246. package/lib/form/Form.js +9 -13
  247. package/lib/form/index.js +9 -16
  248. package/lib/form/types.d.ts +1 -0
  249. package/lib/form/types.js +7 -12
  250. package/lib/grid/Grid.js +8 -13
  251. package/lib/grid/index.js +9 -16
  252. package/lib/grid-item/GridItem.js +8 -13
  253. package/lib/grid-item/index.js +9 -16
  254. package/lib/icon/Icon.js +8 -13
  255. package/lib/icon/index.css +1 -1
  256. package/lib/icon/index.js +9 -16
  257. package/lib/image/Image.js +8 -13
  258. package/lib/image/index.js +9 -16
  259. package/lib/image-preview/ImagePreview.js +9 -16
  260. package/lib/image-preview/ImagePreviewItem.js +8 -13
  261. package/lib/image-preview/function-call.js +9 -16
  262. package/lib/image-preview/index.js +8 -13
  263. package/lib/image-preview/types.js +7 -12
  264. package/lib/index-anchor/IndexAnchor.js +8 -13
  265. package/lib/index-anchor/index.js +9 -16
  266. package/lib/index-bar/IndexBar.d.ts +5 -4
  267. package/lib/index-bar/IndexBar.js +33 -17
  268. package/lib/index-bar/index.d.ts +3 -3
  269. package/lib/index-bar/index.js +9 -16
  270. package/lib/index-bar/types.d.ts +2 -1
  271. package/lib/index-bar/types.js +7 -12
  272. package/lib/index.css +1 -1
  273. package/lib/index.d.ts +1 -1
  274. package/lib/index.js +96 -100
  275. package/lib/index.less +2 -2
  276. package/lib/lazyload/index.js +8 -13
  277. package/lib/lazyload/vue-lazyload/index.js +9 -16
  278. package/lib/lazyload/vue-lazyload/lazy-component.js +8 -13
  279. package/lib/lazyload/vue-lazyload/lazy-container.js +8 -13
  280. package/lib/lazyload/vue-lazyload/lazy-image.js +8 -13
  281. package/lib/lazyload/vue-lazyload/lazy.js +9 -16
  282. package/lib/lazyload/vue-lazyload/listener.js +8 -13
  283. package/lib/lazyload/vue-lazyload/util.js +8 -13
  284. package/lib/list/List.js +8 -13
  285. package/lib/list/index.js +9 -16
  286. package/lib/list/types.js +7 -12
  287. package/lib/loading/Loading.js +8 -13
  288. package/lib/loading/index.js +9 -16
  289. package/lib/locale/index.js +9 -16
  290. package/lib/locale/lang/bn-BD.js +8 -13
  291. package/lib/locale/lang/da-DK.d.ts +64 -0
  292. package/lib/locale/lang/da-DK.js +85 -0
  293. package/lib/locale/lang/de-DE-formal.js +8 -13
  294. package/lib/locale/lang/de-DE.js +8 -13
  295. package/lib/locale/lang/en-US.js +8 -13
  296. package/lib/locale/lang/es-ES.js +8 -13
  297. package/lib/locale/lang/fr-FR.js +8 -13
  298. package/lib/locale/lang/hi-IN.js +8 -13
  299. package/lib/locale/lang/id-ID.js +8 -13
  300. package/lib/locale/lang/is-IS.d.ts +64 -0
  301. package/lib/locale/lang/is-IS.js +93 -0
  302. package/lib/locale/lang/it-IT.js +8 -13
  303. package/lib/locale/lang/ja-JP.js +8 -13
  304. package/lib/locale/lang/ko-KR.js +8 -13
  305. package/lib/locale/lang/la-LA.d.ts +64 -0
  306. package/lib/locale/lang/la-LA.js +85 -0
  307. package/lib/locale/lang/nb-NO.js +8 -13
  308. package/lib/locale/lang/pt-BR.js +8 -13
  309. package/lib/locale/lang/ro-RO.js +8 -13
  310. package/lib/locale/lang/ru-RU.js +8 -13
  311. package/lib/locale/lang/sv-SE.d.ts +64 -0
  312. package/lib/locale/lang/sv-SE.js +85 -0
  313. package/lib/locale/lang/th-TH.js +8 -13
  314. package/lib/locale/lang/tr-TR.js +8 -13
  315. package/lib/locale/lang/uk-UA.js +8 -13
  316. package/lib/locale/lang/vi-VN.js +8 -13
  317. package/lib/locale/lang/zh-CN.js +8 -13
  318. package/lib/locale/lang/zh-HK.js +8 -13
  319. package/lib/locale/lang/zh-TW.js +8 -13
  320. package/lib/nav-bar/NavBar.d.ts +1 -1
  321. package/lib/nav-bar/NavBar.js +11 -16
  322. package/lib/nav-bar/index.d.ts +1 -1
  323. package/lib/nav-bar/index.js +9 -16
  324. package/lib/notice-bar/NoticeBar.js +8 -13
  325. package/lib/notice-bar/index.js +9 -16
  326. package/lib/notice-bar/types.js +7 -12
  327. package/lib/notify/Notify.js +8 -13
  328. package/lib/notify/function-call.js +9 -16
  329. package/lib/notify/index.js +8 -13
  330. package/lib/notify/types.d.ts +2 -1
  331. package/lib/notify/types.js +7 -12
  332. package/lib/number-keyboard/NumberKeyboard.js +19 -17
  333. package/lib/number-keyboard/NumberKeyboardKey.js +8 -13
  334. package/lib/number-keyboard/index.js +9 -16
  335. package/lib/overlay/Overlay.js +8 -13
  336. package/lib/overlay/index.js +9 -16
  337. package/lib/pagination/Pagination.js +8 -13
  338. package/lib/pagination/index.js +9 -16
  339. package/lib/password-input/PasswordInput.js +8 -13
  340. package/lib/password-input/index.js +9 -16
  341. package/lib/picker/Picker.js +9 -16
  342. package/lib/picker/PickerColumn.js +8 -13
  343. package/lib/picker/index.js +9 -16
  344. package/lib/picker/types.d.ts +3 -2
  345. package/lib/picker/types.js +7 -12
  346. package/lib/popover/Popover.js +8 -13
  347. package/lib/popover/index.js +9 -16
  348. package/lib/popover/types.js +7 -12
  349. package/lib/popup/Popup.d.ts +4 -0
  350. package/lib/popup/Popup.js +11 -13
  351. package/lib/popup/index.css +1 -1
  352. package/lib/popup/index.d.ts +3 -0
  353. package/lib/popup/index.js +9 -16
  354. package/lib/popup/shared.js +8 -13
  355. package/lib/popup/types.js +7 -12
  356. package/lib/progress/Progress.d.ts +4 -3
  357. package/lib/progress/Progress.js +8 -13
  358. package/lib/progress/index.d.ts +2 -2
  359. package/lib/progress/index.js +9 -16
  360. package/lib/progress/types.js +7 -12
  361. package/lib/pull-refresh/PullRefresh.js +8 -13
  362. package/lib/pull-refresh/index.js +9 -16
  363. package/lib/radio/Radio.js +9 -16
  364. package/lib/radio/index.js +9 -16
  365. package/lib/radio-group/RadioGroup.js +8 -13
  366. package/lib/radio-group/index.js +9 -16
  367. package/lib/rate/Rate.js +39 -22
  368. package/lib/rate/index.js +9 -16
  369. package/lib/row/Row.js +8 -13
  370. package/lib/row/index.js +9 -16
  371. package/lib/search/Search.d.ts +3 -0
  372. package/lib/search/Search.js +8 -13
  373. package/lib/search/index.d.ts +2 -0
  374. package/lib/search/index.js +9 -16
  375. package/lib/search/types.js +7 -12
  376. package/lib/share-sheet/ShareSheet.js +33 -24
  377. package/lib/share-sheet/index.css +1 -1
  378. package/lib/share-sheet/index.js +9 -16
  379. package/lib/share-sheet/index.less +45 -1
  380. package/lib/sidebar/Sidebar.js +8 -13
  381. package/lib/sidebar/index.js +9 -16
  382. package/lib/sidebar-item/SidebarItem.js +8 -13
  383. package/lib/sidebar-item/index.js +9 -16
  384. package/lib/skeleton/Skeleton.d.ts +5 -4
  385. package/lib/skeleton/Skeleton.js +13 -16
  386. package/lib/skeleton/index.d.ts +3 -3
  387. package/lib/skeleton/index.js +9 -16
  388. package/lib/slider/Slider.js +8 -13
  389. package/lib/slider/index.css +1 -1
  390. package/lib/slider/index.js +9 -16
  391. package/lib/step/Step.js +8 -13
  392. package/lib/step/index.js +9 -16
  393. package/lib/stepper/Stepper.js +8 -13
  394. package/lib/stepper/index.js +9 -16
  395. package/lib/steps/Steps.js +8 -13
  396. package/lib/steps/index.js +9 -16
  397. package/lib/sticky/Sticky.js +8 -13
  398. package/lib/sticky/index.js +9 -16
  399. package/lib/style/animation.css +1 -1
  400. package/lib/style/base.css +1 -1
  401. package/lib/style/base.less +5 -0
  402. package/lib/submit-bar/SubmitBar.js +8 -13
  403. package/lib/submit-bar/index.js +9 -16
  404. package/lib/swipe/Swipe.js +8 -13
  405. package/lib/swipe/index.js +9 -16
  406. package/lib/swipe/types.js +7 -12
  407. package/lib/swipe-cell/SwipeCell.js +9 -14
  408. package/lib/swipe-cell/index.css +1 -1
  409. package/lib/swipe-cell/index.js +9 -16
  410. package/lib/swipe-cell/types.js +7 -12
  411. package/lib/swipe-item/SwipeItem.js +8 -13
  412. package/lib/swipe-item/index.js +9 -16
  413. package/lib/switch/Switch.js +8 -13
  414. package/lib/switch/index.js +9 -16
  415. package/lib/tab/Tab.js +8 -13
  416. package/lib/tab/index.js +9 -16
  417. package/lib/tabbar/Tabbar.d.ts +2 -2
  418. package/lib/tabbar/Tabbar.js +8 -13
  419. package/lib/tabbar/index.js +9 -16
  420. package/lib/tabbar-item/TabbarItem.js +8 -13
  421. package/lib/tabbar-item/index.js +9 -16
  422. package/lib/tabs/Tabs.d.ts +1 -1
  423. package/lib/tabs/Tabs.js +10 -16
  424. package/lib/tabs/TabsContent.js +8 -13
  425. package/lib/tabs/TabsTitle.js +8 -13
  426. package/lib/tabs/index.js +9 -16
  427. package/lib/tabs/types.d.ts +5 -4
  428. package/lib/tabs/types.js +7 -12
  429. package/lib/tabs/utils.js +8 -13
  430. package/lib/tag/Tag.js +8 -13
  431. package/lib/tag/index.js +9 -16
  432. package/lib/toast/Toast.js +9 -13
  433. package/lib/toast/function-call.js +9 -16
  434. package/lib/toast/index.js +8 -13
  435. package/lib/toast/lock-click.js +8 -13
  436. package/lib/toast/types.d.ts +3 -2
  437. package/lib/toast/types.js +7 -12
  438. package/lib/tree-select/TreeSelect.d.ts +7 -6
  439. package/lib/tree-select/TreeSelect.js +8 -13
  440. package/lib/tree-select/index.d.ts +3 -3
  441. package/lib/tree-select/index.js +9 -16
  442. package/lib/uploader/Uploader.d.ts +4 -4
  443. package/lib/uploader/Uploader.js +10 -17
  444. package/lib/uploader/UploaderPreviewItem.d.ts +3 -3
  445. package/lib/uploader/UploaderPreviewItem.js +17 -19
  446. package/lib/uploader/index.d.ts +2 -2
  447. package/lib/uploader/index.js +9 -16
  448. package/lib/uploader/types.d.ts +5 -5
  449. package/lib/uploader/types.js +7 -12
  450. package/lib/uploader/utils.js +8 -13
  451. package/lib/utils/basic.d.ts +1 -0
  452. package/lib/utils/basic.js +8 -13
  453. package/lib/utils/constant.js +8 -13
  454. package/lib/utils/create.js +9 -16
  455. package/lib/utils/deep-assign.js +8 -13
  456. package/lib/utils/deep-clone.js +8 -13
  457. package/lib/utils/dom.js +8 -13
  458. package/lib/utils/format.d.ts +7 -6
  459. package/lib/utils/format.js +14 -13
  460. package/lib/utils/index.js +17 -21
  461. package/lib/utils/interceptor.js +8 -13
  462. package/lib/utils/mount-component.js +8 -13
  463. package/lib/utils/props.js +8 -13
  464. package/lib/utils/validate.d.ts +2 -1
  465. package/lib/utils/validate.js +8 -13
  466. package/lib/utils/with-install.js +8 -13
  467. package/lib/vant.cjs.js +347 -256
  468. package/lib/vant.cjs.min.js +1 -1
  469. package/lib/vant.es.js +347 -256
  470. package/lib/vant.es.min.js +347 -256
  471. package/lib/vant.js +347 -256
  472. package/lib/vant.min.js +1 -1
  473. package/package.json +4 -4
  474. package/vetur/attributes.json +223 -279
  475. package/vetur/tags.json +53 -49
  476. package/vetur/web-types.json +1628 -753
@@ -0,0 +1,74 @@
1
+ var stdin_default = {
2
+ name: "Nafn",
3
+ tel: "S\xEDmi",
4
+ save: "Vista",
5
+ confirm: "Sta\xF0festa",
6
+ cancel: "h\xE6tta vi\xF0",
7
+ delete: "Ey\xF0a",
8
+ loading: "Hle\xF0ur...",
9
+ noCoupon: "Engin afsl\xE1ttarmi\xF0a",
10
+ nameEmpty: "Vinsamlegast fylltu \xFAt nafn",
11
+ addContact: "B\xE6ta vi\xF0 tengili\xF0",
12
+ telInvalid: "Ganga\xF0 s\xEDman\xFAmer",
13
+ vanCalendar: {
14
+ end: "Enda",
15
+ start: "Byrja",
16
+ title: "Dagatal",
17
+ weekdays: [
18
+ "sunnudag",
19
+ "M\xE1nudagur",
20
+ "\xFEri\xF0judag",
21
+ "mi\xF0vikudag",
22
+ "fimmtudag",
23
+ "f\xF6studag",
24
+ "laugardag"
25
+ ],
26
+ monthTitle: (year, month) => `${year}/${month}`,
27
+ rangePrompt: (maxRange) => `Veldu ekki fleiri en ${maxRange} daga`
28
+ },
29
+ vanCascader: {
30
+ select: "Velja"
31
+ },
32
+ vanPagination: {
33
+ prev: "Fyrri",
34
+ next: "N\xE6st"
35
+ },
36
+ vanPullRefresh: {
37
+ pulling: "Dreg\xF0u til a\xF0 endurn\xFDja...",
38
+ loosing: "Loose to refresh..."
39
+ },
40
+ vanSubmitBar: {
41
+ label: "Samtals:"
42
+ },
43
+ vanCoupon: {
44
+ unlimited: "\xD3takmarka\xF0",
45
+ discount: (discount) => `${discount * 10}% afsl\xE1ttur`,
46
+ condition: (condition) => `A\xF0 minnsta kosti ${condition}`
47
+ },
48
+ vanCouponCell: {
49
+ title: "Afsl\xE1ttarmi\xF0i",
50
+ count: (count) => `\xDE\xFA \xE1tt ${count} afsl\xE1ttarmi\xF0a`
51
+ },
52
+ vanCouponList: {
53
+ exchange: "Skipti",
54
+ close: "Loka",
55
+ enable: "Laus",
56
+ disabled: "\xD3tilt\xE6kt",
57
+ placeholder: "Afsl\xE1ttarmi\xF0ak\xF3\xF0i"
58
+ },
59
+ vanAddressEdit: {
60
+ area: "Sv\xE6\xF0i",
61
+ postal: "p\xF3stur",
62
+ areaEmpty: "Vinsamlega veldu m\xF3tt\xF6kusv\xE6\xF0i",
63
+ addressEmpty: "Heimilisfang m\xE1 ekki vera t\xF3mt",
64
+ postalEmpty: "Rangt p\xF3stn\xFAmer",
65
+ addressDetail: "Heimilisfang",
66
+ defaultAddress: "Setja sem sj\xE1lfgefi\xF0 heimilisfang"
67
+ },
68
+ vanAddressList: {
69
+ add: "B\xE6ta vi\xF0 n\xFDju heimilisfangi"
70
+ }
71
+ };
72
+ export {
73
+ stdin_default as default
74
+ };
@@ -0,0 +1,64 @@
1
+ declare const _default: {
2
+ name: string;
3
+ tel: string;
4
+ save: string;
5
+ confirm: string;
6
+ cancel: string;
7
+ delete: string;
8
+ loading: string;
9
+ noCoupon: string;
10
+ nameEmpty: string;
11
+ addContact: string;
12
+ telInvalid: string;
13
+ vanCalendar: {
14
+ end: string;
15
+ start: string;
16
+ title: string;
17
+ weekdays: string[];
18
+ monthTitle: (year: number, month: number) => string;
19
+ rangePrompt: (maxRange: number) => string;
20
+ };
21
+ vanCascader: {
22
+ select: string;
23
+ };
24
+ vanPagination: {
25
+ prev: string;
26
+ next: string;
27
+ };
28
+ vanPullRefresh: {
29
+ pulling: string;
30
+ loosing: string;
31
+ };
32
+ vanSubmitBar: {
33
+ label: string;
34
+ };
35
+ vanCoupon: {
36
+ unlimited: string;
37
+ discount: (discount: number) => string;
38
+ condition: (condition: number) => string;
39
+ };
40
+ vanCouponCell: {
41
+ title: string;
42
+ count: (count: number) => string;
43
+ };
44
+ vanCouponList: {
45
+ exchange: string;
46
+ close: string;
47
+ enable: string;
48
+ disabled: string;
49
+ placeholder: string;
50
+ };
51
+ vanAddressEdit: {
52
+ area: string;
53
+ postal: string;
54
+ areaEmpty: string;
55
+ addressEmpty: string;
56
+ postalEmpty: string;
57
+ addressDetail: string;
58
+ defaultAddress: string;
59
+ };
60
+ vanAddressList: {
61
+ add: string;
62
+ };
63
+ };
64
+ export default _default;
@@ -0,0 +1,66 @@
1
+ var stdin_default = {
2
+ name: "\u0E8A\u0EB7\u0EC8",
3
+ tel: "\u0EC2\u0E97\u0EA5\u0EB0\u0EAA\u0EB1\u0E9A",
4
+ save: "\u0E9A\u0EB1\u0E99\u0E97\u0EB6\u0E81",
5
+ confirm: "\u0EA2\u0EB6\u0E99\u0EA2\u0EB1\u0E99",
6
+ cancel: "\u0E8D\u0EBB\u0E81\u0EC0\u0EA5\u0EB5\u0E81",
7
+ delete: "\u0EA5\u0EB7\u0E9A",
8
+ loading: "\u0E81\u0EB3\u0EA5\u0EB1\u0E87\u0EC2\u0EAB\u0EBC\u0E94...",
9
+ noCoupon: "\u0E9A\u0ECD\u0EC8\u0EA1\u0EB5\u0E84\u0EB9\u0E9B\u0EAD\u0E87",
10
+ nameEmpty: "\u0E81\u0EB0\u0EA5\u0EB8\u0E99\u0EB2\u0E9B\u0EC9\u0EAD\u0E99\u0E8A\u0EB7\u0EC8",
11
+ addContact: "\u0EC0\u0E9E\u0EB5\u0EC8\u0EA1\u0E9C\u0EB9\u0EC9\u0E95\u0EB4\u0E94\u0E95\u0ECD\u0EC8",
12
+ telInvalid: "\u0EC0\u0E9A\u0EB5\u0EC2\u0E97\u0EA5\u0EB0\u0EAA\u0EB1\u0E9A\u0E9A\u0ECD\u0EC8\u0E96\u0EB7\u0E81\u0E95\u0EC9\u0EAD\u0E87",
13
+ vanCalendar: {
14
+ end: "\u0E88\u0EBB\u0E9A",
15
+ start: "\u0EC0\u0EA5\u0EB5\u0EC8\u0EA1",
16
+ title: "\u0E81\u0EB2\u0E99\u0EC0\u0EA5\u0EB7\u0EAD\u0E81\u0EA7\u0EB1\u0E99\u0E97\u0EB5\u0EC8",
17
+ weekdays: ["\u0EAD\u0EB2", "\u0E88", "\u0EAD", "\u0E9E", "\u0E9E\u0EAB", "\u0EAA", "\u0EAA"],
18
+ monthTitle: (year, month) => `${year}\u0E9B\u0EB5${month}\u0EC0\u0E94\u0EB7\u0EAD\u0E99`,
19
+ rangePrompt: (maxRange) => `\u0E88\u0EB3\u0E99\u0EAD\u0E99\u0EA7\u0EB1\u0E99\u0E97\u0EB5\u0EC8\u0EC0\u0EA5\u0EB7\u0EAD\u0E81\u0E95\u0EC9\u0EAD\u0E87\u0E9A\u0ECD\u0EC8\u0EC0\u0E81\u0EB5\u0E99 ${maxRange} \u0EA7\u0EB1\u0E99`
20
+ },
21
+ vanCascader: {
22
+ select: "\u0E81\u0EB0\u0EA5\u0EB8\u0E99\u0EB2\u0EC0\u0EA5\u0EB7\u0EAD\u0E81"
23
+ },
24
+ vanPagination: {
25
+ prev: "\u0EDC\u0EC9\u0EB2\u0E97\u0EB5\u0EC8\u0EC1\u0EA5\u0EC9\u0EA7",
26
+ next: "\u0EDC\u0EC9\u0EB2\u0E95\u0ECD\u0EC8\u0EC4\u0E9B"
27
+ },
28
+ vanPullRefresh: {
29
+ pulling: "\u0E94\u0EB7\u0E87\u0EA5\u0EBB\u0E87\u0EC0\u0E9E\u0EB7\u0EC8\u0EAD\u0EA3\u0EB5\u0EC0\u0E9F\u0EAA...",
30
+ loosing: "\u0E9B\u0EC8\u0EAD\u0E8D\u0EC0\u0E9E\u0EB7\u0EC8\u0EAD\u0EA3\u0EB5\u0EC0\u0E9F\u0EAA..."
31
+ },
32
+ vanSubmitBar: {
33
+ label: "\u0EA5\u0EA7\u0EA1:"
34
+ },
35
+ vanCoupon: {
36
+ unlimited: "\u0E9A\u0ECD\u0EC8 \u0E88\u0EB3\u0E81\u0EB1\u0E94",
37
+ discount: (discount) => `\u0EA5\u0EBB\u0E94${discount}`,
38
+ condition: (condition) => `\u0EA1\u0EB5\u0E88\u0EB3\u0EDC\u0EC8\u0EB2\u0E8D\u0EC3\u0E99\u0EA5\u0EB2\u0E84\u0EB2 ${condition} \u0E81\u0EA7\u0EC8\u0EB2\u0EAB\u0E8D\u0EA7\u0E99`
39
+ },
40
+ vanCouponCell: {
41
+ title: "\u0E84\u0EB9\u0E9B\u0EAD\u0E87",
42
+ count: (count) => `\u0EA1\u0EB5\u0EAE\u0EB9\u0E9A\u0E9E\u0EB2\u0E9A ${count} \u0EAE\u0EB9\u0E9A`
43
+ },
44
+ vanCouponList: {
45
+ exchange: "\u0EC1\u0EA5\u0E81\u0E9B\u0EC8\u0EBD\u0E99",
46
+ close: "\u0E9A\u0ECD\u0EC8\u0EC4\u0E94\u0EC9\u0EC3\u0E8A\u0EC9",
47
+ enable: "\u0E9E\u0EC9\u0EAD\u0EA1\u0EC3\u0E8A\u0EC9\u0E87\u0EB2\u0E99",
48
+ disabled: "\u0E9A\u0ECD\u0EC8\u0E9E\u0EC9\u0EAD\u0EA1\u0EC3\u0E8A\u0EC9\u0E87\u0EB2\u0E99",
49
+ placeholder: "\u0E81\u0EB0\u0EA5\u0EB8\u0E99\u0EB2\u0E9B\u0EC9\u0EAD\u0E99\u0E84\u0EB9\u0E9B\u0EAD\u0E87"
50
+ },
51
+ vanAddressEdit: {
52
+ area: "\u0E9E\u0EB7\u0EC9\u0E99\u0E97\u0EB5\u0EC8",
53
+ postal: "\u0EA5\u0EB0\u0EAB\u0EB1\u0E94\u0EC4\u0E9B\u0EAA\u0EB0\u0E99\u0EB5",
54
+ areaEmpty: "\u0E81\u0EB0\u0EA5\u0EB8\u0E99\u0EB2\u0EC0\u0EA5\u0EB7\u0EAD\u0E81\u0E9E\u0EB7\u0EC9\u0E99\u0E97\u0EB5\u0EC8",
55
+ addressEmpty: "\u0E81\u0EB0\u0EA5\u0EB8\u0E99\u0EB2\u0E9B\u0EC9\u0EAD\u0E99\u0E97\u0EB5\u0EC8\u0EA2\u0EB9\u0EC8",
56
+ postalEmpty: "\u0E81\u0EB0\u0EA5\u0EB8\u0E99\u0EB2\u0E9B\u0EC9\u0EAD\u0E99\u0EA5\u0EB0\u0EAB\u0EB1\u0E94\u0EC4\u0E9B\u0EAA\u0EB0\u0E99\u0EB5",
57
+ addressDetail: "\u0E97\u0EB5\u0EC8\u0EA2\u0EB9\u0EC8",
58
+ defaultAddress: "\u0E95\u0EB1\u0EC9\u0E87\u0EC0\u0E9B\u0EB1\u0E99\u0E97\u0EB5\u0EC8\u0EA2\u0EB9\u0EC8\u0EC0\u0EA5\u0EB5\u0EC8\u0EA1\u0E95\u0EBB\u0EC9\u0E99"
59
+ },
60
+ vanAddressList: {
61
+ add: "\u0EC0\u0E9E\u0EB5\u0EC8\u0EA1\u0E97\u0EB5\u0EC8\u0EA2\u0EB9\u0EC8"
62
+ }
63
+ };
64
+ export {
65
+ stdin_default as default
66
+ };
@@ -0,0 +1,64 @@
1
+ declare const _default: {
2
+ name: string;
3
+ tel: string;
4
+ save: string;
5
+ confirm: string;
6
+ cancel: string;
7
+ delete: string;
8
+ loading: string;
9
+ noCoupon: string;
10
+ nameEmpty: string;
11
+ addContact: string;
12
+ telInvalid: string;
13
+ vanCalendar: {
14
+ end: string;
15
+ start: string;
16
+ title: string;
17
+ weekdays: string[];
18
+ monthTitle: (year: number, month: number) => string;
19
+ rangePrompt: (maxRange: number) => string;
20
+ };
21
+ vanCascader: {
22
+ select: string;
23
+ };
24
+ vanPagination: {
25
+ prev: string;
26
+ next: string;
27
+ };
28
+ vanPullRefresh: {
29
+ pulling: string;
30
+ loosing: string;
31
+ };
32
+ vanSubmitBar: {
33
+ label: string;
34
+ };
35
+ vanCoupon: {
36
+ unlimited: string;
37
+ discount: (discount: number) => string;
38
+ condition: (condition: number) => string;
39
+ };
40
+ vanCouponCell: {
41
+ title: string;
42
+ count: (count: number) => string;
43
+ };
44
+ vanCouponList: {
45
+ exchange: string;
46
+ close: string;
47
+ enable: string;
48
+ disabled: string;
49
+ placeholder: string;
50
+ };
51
+ vanAddressEdit: {
52
+ area: string;
53
+ postal: string;
54
+ areaEmpty: string;
55
+ addressEmpty: string;
56
+ postalEmpty: string;
57
+ addressDetail: string;
58
+ defaultAddress: string;
59
+ };
60
+ vanAddressList: {
61
+ add: string;
62
+ };
63
+ };
64
+ export default _default;
@@ -0,0 +1,66 @@
1
+ var stdin_default = {
2
+ name: "Namn",
3
+ tel: "Telefon",
4
+ save: "Spara",
5
+ confirm: "Bekr\xE4fta",
6
+ cancel: "Avbryt",
7
+ delete: "Radera",
8
+ loading: "Laddar...",
9
+ noCoupon: "Inga kuponger",
10
+ nameEmpty: "V\xE4nligen fyll i namnet",
11
+ addContact: "L\xE4gg till kontakt",
12
+ telInvalid: "Felformat telefonnummer",
13
+ vanCalendar: {
14
+ end: "Slut",
15
+ start: "Start",
16
+ title: "Kalender",
17
+ weekdays: ["s\xF6n", "m\xE5n", "tis", "ons", "tors", "fre", "l\xF6r"],
18
+ monthTitle: (year, month) => `${year}/${month}`,
19
+ rangePrompt: (maxRange) => `V\xE4lj h\xF6gst ${maxRange} dagar`
20
+ },
21
+ vanCascader: {
22
+ select: "V\xE4lj"
23
+ },
24
+ vanPagination: {
25
+ prev: "F\xF6reg\xE5ende",
26
+ next: "N\xE4sta"
27
+ },
28
+ vanPullRefresh: {
29
+ pulling: "Dra f\xF6r att uppdatera...",
30
+ loosing: "L\xF6s f\xF6r att uppdatera..."
31
+ },
32
+ vanSubmitBar: {
33
+ label: "Totalt:"
34
+ },
35
+ vanCoupon: {
36
+ unlimited: "Obegr\xE4nsat",
37
+ discount: (discount) => `${discount * 10}% rabatt`,
38
+ condition: (condition) => `Minst ${condition}`
39
+ },
40
+ vanCouponCell: {
41
+ title: "Kupong",
42
+ count: (count) => `Du har ${count} kuponger`
43
+ },
44
+ vanCouponList: {
45
+ exchange: "Utbyta",
46
+ close: "St\xE4ng",
47
+ enable: "Tillg\xE4ngliga",
48
+ disabled: "Inte tillg\xE4nglig",
49
+ placeholder: "Kupongkod"
50
+ },
51
+ vanAddressEdit: {
52
+ area: "Omr\xE5de",
53
+ postal: "Post",
54
+ areaEmpty: "V\xE4lj ett mottagningsomr\xE5de",
55
+ addressEmpty: "Adressen f\xE5r inte vara tom",
56
+ postalEmpty: "Fel postnummer",
57
+ addressDetail: "Adress",
58
+ defaultAddress: "Ange som standardadress"
59
+ },
60
+ vanAddressList: {
61
+ add: "L\xE4gg till ny adress"
62
+ }
63
+ };
64
+ export {
65
+ stdin_default as default
66
+ };
@@ -47,7 +47,7 @@ declare const _default: import("vue").DefineComponent<{
47
47
  fixed: boolean;
48
48
  border: boolean;
49
49
  placeholder: boolean;
50
- leftArrow: boolean;
51
50
  safeAreaInsetTop: boolean;
51
+ leftArrow: boolean;
52
52
  }>;
53
53
  export default _default;
@@ -60,10 +60,10 @@ var stdin_default = defineComponent({
60
60
  "ref": navBarRef,
61
61
  "style": style,
62
62
  "class": [bem({
63
- fixed,
64
- "safe-area-inset-top": props.safeAreaInsetTop
63
+ fixed
65
64
  }), {
66
- [BORDER_BOTTOM]: border
65
+ [BORDER_BOTTOM]: border,
66
+ "van-safe-area-top": props.safeAreaInsetTop
67
67
  }]
68
68
  }, [_createVNode("div", {
69
69
  "class": bem("content")
@@ -31,8 +31,8 @@ export declare const NavBar: import("../utils").WithInstall<import("vue").Define
31
31
  fixed: boolean;
32
32
  border: boolean;
33
33
  placeholder: boolean;
34
- leftArrow: boolean;
35
34
  safeAreaInsetTop: boolean;
35
+ leftArrow: boolean;
36
36
  }>>;
37
37
  export default NavBar;
38
38
  export type { NavBarProps } from './NavBar';
@@ -1,5 +1,6 @@
1
1
  import { Notify } from './function-call';
2
- export declare type NotifyMessage = string | number;
2
+ import type { Numeric } from '../utils';
3
+ export declare type NotifyMessage = Numeric;
3
4
  export declare type NotifyType = 'primary' | 'success' | 'danger' | 'warning';
4
5
  export declare type NotifyPosition = 'top' | 'bottom';
5
6
  export declare type NotifyOptions = {
@@ -26,6 +26,15 @@ const numberKeyboardProps = {
26
26
  default: ""
27
27
  }
28
28
  };
29
+ function shuffle(array) {
30
+ for (let i = array.length - 1; i > 0; i--) {
31
+ const j = Math.floor(Math.random() * (i + 1));
32
+ const temp = array[i];
33
+ array[i] = array[j];
34
+ array[j] = temp;
35
+ }
36
+ return array;
37
+ }
29
38
  var stdin_default = defineComponent({
30
39
  name,
31
40
  props: numberKeyboardProps,
@@ -40,7 +49,7 @@ var stdin_default = defineComponent({
40
49
  text: i + 1
41
50
  }));
42
51
  if (props.randomKeyOrder) {
43
- keys2.sort(() => Math.random() > 0.5 ? 1 : -1);
52
+ shuffle(keys2);
44
53
  }
45
54
  return keys2;
46
55
  };
@@ -1,4 +1,5 @@
1
1
  import type { ComponentPublicInstance } from 'vue';
2
+ import type { Numeric } from '../utils';
2
3
  import type { PickerProps } from './Picker';
3
4
  export declare type PickerToolbarPosition = 'top' | 'bottom';
4
5
  export declare type PickerFieldNames = {
@@ -7,11 +8,11 @@ export declare type PickerFieldNames = {
7
8
  children?: string;
8
9
  };
9
10
  export declare type PickerObjectOption = {
10
- text?: string | number;
11
+ text?: Numeric;
11
12
  disabled?: boolean;
12
13
  [key: PropertyKey]: any;
13
14
  };
14
- export declare type PickerOption = string | number | PickerObjectOption;
15
+ export declare type PickerOption = Numeric | PickerObjectOption;
15
16
  export declare type PickerObjectColumn = {
16
17
  values?: PickerOption[];
17
18
  children?: PickerColumn;
@@ -43,6 +43,7 @@ declare const popupProps: {
43
43
  type: import("vue").PropType<PopupCloseIconPosition>;
44
44
  default: PopupCloseIconPosition;
45
45
  };
46
+ safeAreaInsetTop: BooleanConstructor;
46
47
  safeAreaInsetBottom: BooleanConstructor;
47
48
  };
48
49
  export declare type PopupProps = ExtractPropTypes<typeof popupProps>;
@@ -89,6 +90,7 @@ declare const _default: import("vue").DefineComponent<{
89
90
  type: import("vue").PropType<PopupCloseIconPosition>;
90
91
  default: PopupCloseIconPosition;
91
92
  };
93
+ safeAreaInsetTop: BooleanConstructor;
92
94
  safeAreaInsetBottom: BooleanConstructor;
93
95
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("open" | "close" | "keydown" | "opened" | "closed" | "update:show" | "click-overlay" | "click-close-icon")[], "open" | "close" | "keydown" | "opened" | "closed" | "update:show" | "click-overlay" | "click-close-icon", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
94
96
  show: BooleanConstructor;
@@ -133,6 +135,7 @@ declare const _default: import("vue").DefineComponent<{
133
135
  type: import("vue").PropType<PopupCloseIconPosition>;
134
136
  default: PopupCloseIconPosition;
135
137
  };
138
+ safeAreaInsetTop: BooleanConstructor;
136
139
  safeAreaInsetBottom: BooleanConstructor;
137
140
  }>> & {
138
141
  onKeydown?: ((...args: any[]) => any) | undefined;
@@ -157,5 +160,6 @@ declare const _default: import("vue").DefineComponent<{
157
160
  closeable: boolean;
158
161
  closeOnPopstate: boolean;
159
162
  closeIconPosition: PopupCloseIconPosition;
163
+ safeAreaInsetTop: boolean;
160
164
  }>;
161
165
  export default _default;
package/es/popup/Popup.js CHANGED
@@ -18,6 +18,7 @@ const popupProps = extend({}, popupSharedProps, {
18
18
  iconPrefix: String,
19
19
  closeOnPopstate: Boolean,
20
20
  closeIconPosition: makeStringProp("top-right"),
21
+ safeAreaInsetTop: Boolean,
21
22
  safeAreaInsetBottom: Boolean
22
23
  });
23
24
  const [name, bem] = createNamespace("popup");
@@ -112,6 +113,7 @@ var stdin_default = defineComponent({
112
113
  const {
113
114
  round,
114
115
  position,
116
+ safeAreaInsetTop,
115
117
  safeAreaInsetBottom
116
118
  } = props;
117
119
  return _withDirectives(_createVNode("div", _mergeProps({
@@ -121,6 +123,7 @@ var stdin_default = defineComponent({
121
123
  round,
122
124
  [position]: position
123
125
  }), {
126
+ "van-safe-area-top": safeAreaInsetTop,
124
127
  "van-safe-area-bottom": safeAreaInsetBottom
125
128
  }],
126
129
  "onKeydown": onKeydown
@@ -1 +1 @@
1
- :root{--van-popup-background-color: var(--van-background-color-light);--van-popup-transition: transform var(--van-animation-duration-base);--van-popup-round-border-radius: 16px;--van-popup-close-icon-size: 22px;--van-popup-close-icon-color: var(--van-gray-5);--van-popup-close-icon-margin: 16px;--van-popup-close-icon-z-index: 1}.van-overflow-hidden{overflow:hidden!important}.van-popup{position:fixed;max-height:100%;overflow-y:auto;background:var(--van-popup-background-color);transition:var(--van-popup-transition);-webkit-overflow-scrolling:touch}.van-popup--center{top:50%;left:50%;transform:translate(-50%,-50%)}.van-popup--center.van-popup--round{border-radius:var(--van-popup-round-border-radius)}.van-popup--top{top:0;left:0;width:100%}.van-popup--top.van-popup--round{border-radius:0 0 var(--van-popup-round-border-radius) var(--van-popup-round-border-radius)}.van-popup--right{top:50%;right:0;transform:translateY(-50%)}.van-popup--right.van-popup--round{border-radius:var(--van-popup-round-border-radius) 0 0 var(--van-popup-round-border-radius)}.van-popup--bottom{bottom:0;left:0;width:100%}.van-popup--bottom.van-popup--round{border-radius:var(--van-popup-round-border-radius) var(--van-popup-round-border-radius) 0 0}.van-popup--left{top:50%;left:0;transform:translateY(-50%)}.van-popup--left.van-popup--round{border-radius:0 var(--van-popup-round-border-radius) var(--van-popup-round-border-radius) 0}.van-popup-slide-top-enter-active,.van-popup-slide-left-enter-active,.van-popup-slide-right-enter-active,.van-popup-slide-bottom-enter-active{transition-timing-function:var(--van-animation-timing-function-enter)}.van-popup-slide-top-leave-active,.van-popup-slide-left-leave-active,.van-popup-slide-right-leave-active,.van-popup-slide-bottom-leave-active{transition-timing-function:var(--van-animation-timing-function-leave)}.van-popup-slide-top-enter-from,.van-popup-slide-top-leave-active{transform:translateY(-100%)}.van-popup-slide-right-enter-from,.van-popup-slide-right-leave-active{transform:translate(100%,-50%)}.van-popup-slide-bottom-enter-from,.van-popup-slide-bottom-leave-active{transform:translateY(100%)}.van-popup-slide-left-enter-from,.van-popup-slide-left-leave-active{transform:translate(-100%,-50%)}.van-popup__close-icon{position:absolute;z-index:var(--van-popup-close-icon-z-index);color:var(--van-popup-close-icon-color);font-size:var(--van-popup-close-icon-size)}.van-popup__close-icon--top-left{top:var(--van-popup-close-icon-margin);left:var(--van-popup-close-icon-margin)}.van-popup__close-icon--top-right{top:var(--van-popup-close-icon-margin);right:var(--van-popup-close-icon-margin)}.van-popup__close-icon--bottom-left{bottom:var(--van-popup-close-icon-margin);left:var(--van-popup-close-icon-margin)}.van-popup__close-icon--bottom-right{right:var(--van-popup-close-icon-margin);bottom:var(--van-popup-close-icon-margin)}
1
+ :root{--van-popup-background-color: var(--van-background-color-light);--van-popup-transition: transform var(--van-animation-duration-base);--van-popup-round-border-radius: 16px;--van-popup-close-icon-size: 22px;--van-popup-close-icon-color: var(--van-gray-5);--van-popup-close-icon-margin: 16px;--van-popup-close-icon-z-index: 1}.van-overflow-hidden{overflow:hidden!important}.van-popup{position:fixed;max-height:100%;overflow-y:auto;background:var(--van-popup-background-color);transition:var(--van-popup-transition);-webkit-overflow-scrolling:touch}.van-popup--center{top:50%;left:50%;transform:translate3d(-50%,-50%,0)}.van-popup--center.van-popup--round{border-radius:var(--van-popup-round-border-radius)}.van-popup--top{top:0;left:0;width:100%}.van-popup--top.van-popup--round{border-radius:0 0 var(--van-popup-round-border-radius) var(--van-popup-round-border-radius)}.van-popup--right{top:50%;right:0;transform:translate3d(0,-50%,0)}.van-popup--right.van-popup--round{border-radius:var(--van-popup-round-border-radius) 0 0 var(--van-popup-round-border-radius)}.van-popup--bottom{bottom:0;left:0;width:100%}.van-popup--bottom.van-popup--round{border-radius:var(--van-popup-round-border-radius) var(--van-popup-round-border-radius) 0 0}.van-popup--left{top:50%;left:0;transform:translate3d(0,-50%,0)}.van-popup--left.van-popup--round{border-radius:0 var(--van-popup-round-border-radius) var(--van-popup-round-border-radius) 0}.van-popup-slide-top-enter-active,.van-popup-slide-left-enter-active,.van-popup-slide-right-enter-active,.van-popup-slide-bottom-enter-active{transition-timing-function:var(--van-animation-timing-function-enter)}.van-popup-slide-top-leave-active,.van-popup-slide-left-leave-active,.van-popup-slide-right-leave-active,.van-popup-slide-bottom-leave-active{transition-timing-function:var(--van-animation-timing-function-leave)}.van-popup-slide-top-enter-from,.van-popup-slide-top-leave-active{transform:translate3d(0,-100%,0)}.van-popup-slide-right-enter-from,.van-popup-slide-right-leave-active{transform:translate3d(100%,-50%,0)}.van-popup-slide-bottom-enter-from,.van-popup-slide-bottom-leave-active{transform:translate3d(0,100%,0)}.van-popup-slide-left-enter-from,.van-popup-slide-left-leave-active{transform:translate3d(-100%,-50%,0)}.van-popup__close-icon{position:absolute;z-index:var(--van-popup-close-icon-z-index);color:var(--van-popup-close-icon-color);font-size:var(--van-popup-close-icon-size)}.van-popup__close-icon--top-left{top:var(--van-popup-close-icon-margin);left:var(--van-popup-close-icon-margin)}.van-popup__close-icon--top-right{top:var(--van-popup-close-icon-margin);right:var(--van-popup-close-icon-margin)}.van-popup__close-icon--bottom-left{bottom:var(--van-popup-close-icon-margin);left:var(--van-popup-close-icon-margin)}.van-popup__close-icon--bottom-right{right:var(--van-popup-close-icon-margin);bottom:var(--van-popup-close-icon-margin)}
@@ -41,6 +41,7 @@ export declare const Popup: import("../utils").WithInstall<import("vue").DefineC
41
41
  type: import("vue").PropType<import("./types").PopupCloseIconPosition>;
42
42
  default: import("./types").PopupCloseIconPosition;
43
43
  };
44
+ safeAreaInsetTop: BooleanConstructor;
44
45
  safeAreaInsetBottom: BooleanConstructor;
45
46
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("open" | "close" | "keydown" | "opened" | "closed" | "update:show" | "click-overlay" | "click-close-icon")[], "open" | "close" | "keydown" | "opened" | "closed" | "update:show" | "click-overlay" | "click-close-icon", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
46
47
  show: BooleanConstructor;
@@ -85,6 +86,7 @@ export declare const Popup: import("../utils").WithInstall<import("vue").DefineC
85
86
  type: import("vue").PropType<import("./types").PopupCloseIconPosition>;
86
87
  default: import("./types").PopupCloseIconPosition;
87
88
  };
89
+ safeAreaInsetTop: BooleanConstructor;
88
90
  safeAreaInsetBottom: BooleanConstructor;
89
91
  }>> & {
90
92
  onKeydown?: ((...args: any[]) => any) | undefined;
@@ -109,6 +111,7 @@ export declare const Popup: import("../utils").WithInstall<import("vue").DefineC
109
111
  closeable: boolean;
110
112
  closeOnPopstate: boolean;
111
113
  closeIconPosition: import("./types").PopupCloseIconPosition;
114
+ safeAreaInsetTop: boolean;
112
115
  }>>;
113
116
  export default Popup;
114
117
  export type { PopupProps } from './Popup';
@@ -1,4 +1,5 @@
1
1
  import { type ExtractPropTypes } from 'vue';
2
+ import { type Numeric } from '../utils';
2
3
  declare const progressProps: {
3
4
  color: StringConstructor;
4
5
  inactive: BooleanConstructor;
@@ -14,7 +15,7 @@ declare const progressProps: {
14
15
  percentage: {
15
16
  type: (NumberConstructor | StringConstructor)[];
16
17
  default: number;
17
- validator: (value: number | string) => boolean;
18
+ validator: (value: Numeric) => boolean;
18
19
  };
19
20
  };
20
21
  export declare type ProgressProps = ExtractPropTypes<typeof progressProps>;
@@ -33,7 +34,7 @@ declare const _default: import("vue").DefineComponent<{
33
34
  percentage: {
34
35
  type: (NumberConstructor | StringConstructor)[];
35
36
  default: number;
36
- validator: (value: string | number) => boolean;
37
+ validator: (value: Numeric) => boolean;
37
38
  };
38
39
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
39
40
  color: StringConstructor;
@@ -50,7 +51,7 @@ declare const _default: import("vue").DefineComponent<{
50
51
  percentage: {
51
52
  type: (NumberConstructor | StringConstructor)[];
52
53
  default: number;
53
- validator: (value: string | number) => boolean;
54
+ validator: (value: Numeric) => boolean;
54
55
  };
55
56
  }>>, {
56
57
  inactive: boolean;
@@ -14,7 +14,7 @@ export declare const Progress: import("../utils").WithInstall<import("vue").Defi
14
14
  percentage: {
15
15
  type: (NumberConstructor | StringConstructor)[];
16
16
  default: number;
17
- validator: (value: string | number) => boolean;
17
+ validator: (value: import("../utils").Numeric) => boolean;
18
18
  };
19
19
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
20
20
  color: StringConstructor;
@@ -31,7 +31,7 @@ export declare const Progress: import("../utils").WithInstall<import("vue").Defi
31
31
  percentage: {
32
32
  type: (NumberConstructor | StringConstructor)[];
33
33
  default: number;
34
- validator: (value: string | number) => boolean;
34
+ validator: (value: import("../utils").Numeric) => boolean;
35
35
  };
36
36
  }>>, {
37
37
  inactive: boolean;
package/es/rate/Rate.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { createVNode as _createVNode } from "vue";
2
- import { computed, defineComponent } from "vue";
2
+ import { computed, defineComponent, ref } from "vue";
3
3
  import { addUnit, truthProp, numericProp, preventDefault, makeStringProp, makeNumberProp, makeNumericProp, createNamespace } from "../utils";
4
4
  import { useRect, useCustomFieldValue } from "@vant/use";
5
5
  import { useRefs } from "../composables/use-refs";
@@ -56,33 +56,53 @@ var stdin_default = defineComponent({
56
56
  }) {
57
57
  const touch = useTouch();
58
58
  const [itemRefs, setItemRefs] = useRefs();
59
+ const groupRef = ref();
59
60
  const untouchable = () => props.readonly || props.disabled || !props.touchable;
60
61
  const list = computed(() => Array(+props.count).fill("").map((_, i) => getRateStatus(props.modelValue, i + 1, props.allowHalf, props.readonly)));
61
62
  let ranges;
63
+ let groupRefRect;
64
+ let minRectTop = Number.MAX_SAFE_INTEGER;
65
+ let maxRectTop = Number.MIN_SAFE_INTEGER;
62
66
  const updateRanges = () => {
67
+ groupRefRect = useRect(groupRef);
63
68
  const rects = itemRefs.value.map(useRect);
64
69
  ranges = [];
65
70
  rects.forEach((rect, index) => {
71
+ minRectTop = Math.min(rect.top, minRectTop);
72
+ maxRectTop = Math.max(rect.top, maxRectTop);
66
73
  if (props.allowHalf) {
67
74
  ranges.push({
68
75
  score: index + 0.5,
69
- left: rect.left
76
+ left: rect.left,
77
+ top: rect.top,
78
+ height: rect.height
70
79
  }, {
71
80
  score: index + 1,
72
- left: rect.left + rect.width / 2
81
+ left: rect.left + rect.width / 2,
82
+ top: rect.top,
83
+ height: rect.height
73
84
  });
74
85
  } else {
75
86
  ranges.push({
76
87
  score: index + 1,
77
- left: rect.left
88
+ left: rect.left,
89
+ top: rect.top,
90
+ height: rect.height
78
91
  });
79
92
  }
80
93
  });
81
94
  };
82
- const getScoreByPosition = (x) => {
95
+ const getScoreByPosition = (x, y) => {
83
96
  for (let i = ranges.length - 1; i > 0; i--) {
84
- if (x > ranges[i].left) {
85
- return ranges[i].score;
97
+ if (y >= groupRefRect.top && y <= groupRefRect.bottom) {
98
+ if (x > ranges[i].left && y >= ranges[i].top && y <= ranges[i].top + ranges[i].height) {
99
+ return ranges[i].score;
100
+ }
101
+ } else {
102
+ const curTop = y < groupRefRect.top ? minRectTop : maxRectTop;
103
+ if (x > ranges[i].left && ranges[i].top === curTop) {
104
+ return ranges[i].score;
105
+ }
86
106
  }
87
107
  }
88
108
  return props.allowHalf ? 0.5 : 1;
@@ -107,10 +127,11 @@ var stdin_default = defineComponent({
107
127
  touch.move(event);
108
128
  if (touch.isHorizontal()) {
109
129
  const {
110
- clientX
130
+ clientX,
131
+ clientY
111
132
  } = event.touches[0];
112
133
  preventDefault(event);
113
- select(getScoreByPosition(clientX));
134
+ select(getScoreByPosition(clientX, clientY));
114
135
  }
115
136
  };
116
137
  const renderStar = (item, index) => {
@@ -139,7 +160,7 @@ var stdin_default = defineComponent({
139
160
  }
140
161
  const onClickItem = (event) => {
141
162
  updateRanges();
142
- select(allowHalf ? getScoreByPosition(event.clientX) : score);
163
+ select(allowHalf ? getScoreByPosition(event.clientX, event.clientY) : score);
143
164
  };
144
165
  return _createVNode("div", {
145
166
  "key": index,
@@ -177,6 +198,7 @@ var stdin_default = defineComponent({
177
198
  };
178
199
  useCustomFieldValue(() => props.modelValue);
179
200
  return () => _createVNode("div", {
201
+ "ref": groupRef,
180
202
  "role": "radiogroup",
181
203
  "class": bem({
182
204
  readonly: props.readonly,