vant 3.4.3 → 3.4.6

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 (380) hide show
  1. package/changelog.generated.md +92 -0
  2. package/es/area/Area.js +3 -1
  3. package/es/calendar/Calendar.d.ts +4 -0
  4. package/es/calendar/Calendar.js +2 -0
  5. package/es/calendar/index.d.ts +3 -0
  6. package/es/collapse-item/CollapseItem.d.ts +13 -0
  7. package/es/collapse-item/CollapseItem.js +3 -2
  8. package/es/collapse-item/index.d.ts +9 -0
  9. package/es/dialog/Dialog.d.ts +2 -1
  10. package/es/dialog/Dialog.js +19 -3
  11. package/es/dialog/function-call.d.ts +2 -1
  12. package/es/field/utils.js +2 -1
  13. package/es/index-bar/IndexBar.d.ts +4 -4
  14. package/es/index-bar/IndexBar.js +3 -1
  15. package/es/index-bar/index.d.ts +3 -3
  16. package/es/index.d.ts +1 -1
  17. package/es/index.js +1 -1
  18. package/es/locale/lang/bn-BD.d.ts +64 -0
  19. package/es/locale/lang/bn-BD.js +74 -0
  20. package/es/locale/lang/de-DE-formal.js +1 -1
  21. package/es/locale/lang/de-DE.js +1 -1
  22. package/es/locale/lang/en-US.js +1 -1
  23. package/es/locale/lang/es-ES.js +1 -1
  24. package/es/locale/lang/fr-FR.js +1 -1
  25. package/es/locale/lang/hi-IN.js +1 -1
  26. package/es/locale/lang/id-ID.d.ts +64 -0
  27. package/es/locale/lang/id-ID.js +66 -0
  28. package/es/locale/lang/it-IT.d.ts +64 -0
  29. package/es/locale/lang/it-IT.js +74 -0
  30. package/es/locale/lang/ja-JP.js +1 -1
  31. package/es/locale/lang/ko-KR.js +1 -1
  32. package/es/locale/lang/nb-NO.js +1 -1
  33. package/es/locale/lang/pt-BR.js +1 -1
  34. package/es/locale/lang/ro-RO.js +1 -1
  35. package/es/locale/lang/ru-RU.js +1 -1
  36. package/es/locale/lang/th-TH.js +1 -1
  37. package/es/locale/lang/uk-UA.d.ts +64 -0
  38. package/es/locale/lang/uk-UA.js +74 -0
  39. package/es/locale/lang/vi-VN.d.ts +64 -0
  40. package/es/locale/lang/vi-VN.js +74 -0
  41. package/es/locale/lang/zh-CN.js +1 -1
  42. package/es/locale/lang/zh-HK.js +1 -1
  43. package/es/locale/lang/zh-TW.js +1 -1
  44. package/es/nav-bar/NavBar.d.ts +1 -1
  45. package/es/nav-bar/NavBar.js +3 -3
  46. package/es/nav-bar/index.d.ts +1 -1
  47. package/es/popup/Popup.d.ts +6 -1
  48. package/es/popup/Popup.js +14 -3
  49. package/es/popup/index.d.ts +5 -1
  50. package/es/popup/types.d.ts +5 -2
  51. package/es/skeleton/Skeleton.js +6 -4
  52. package/es/style/base.css +1 -1
  53. package/es/style/base.less +5 -0
  54. package/es/submit-bar/index.css +1 -1
  55. package/es/submit-bar/index.less +1 -0
  56. package/es/swipe-cell/SwipeCell.js +1 -1
  57. package/es/toast/Toast.d.ts +3 -0
  58. package/es/toast/Toast.js +3 -1
  59. package/es/uploader/types.d.ts +1 -3
  60. package/es/utils/interceptor.d.ts +1 -1
  61. package/lib/action-bar/ActionBar.js +14 -13
  62. package/lib/action-bar/index.js +14 -8
  63. package/lib/action-bar-button/ActionBarButton.js +18 -17
  64. package/lib/action-bar-button/index.js +14 -8
  65. package/lib/action-bar-icon/ActionBarIcon.js +18 -17
  66. package/lib/action-bar-icon/index.js +14 -8
  67. package/lib/action-sheet/ActionSheet.js +17 -16
  68. package/lib/action-sheet/index.js +14 -8
  69. package/lib/address-edit/AddressEdit.js +25 -19
  70. package/lib/address-edit/AddressEditDetail.js +15 -14
  71. package/lib/address-edit/index.js +14 -8
  72. package/lib/address-edit/types.js +18 -1
  73. package/lib/address-list/AddressList.js +18 -12
  74. package/lib/address-list/AddressListItem.js +17 -16
  75. package/lib/address-list/index.js +14 -8
  76. package/lib/area/Area.js +20 -17
  77. package/lib/area/index.js +14 -8
  78. package/lib/area/types.js +18 -1
  79. package/lib/badge/Badge.js +13 -12
  80. package/lib/badge/index.js +14 -8
  81. package/lib/button/Button.js +16 -15
  82. package/lib/button/index.js +14 -8
  83. package/lib/button/types.js +18 -1
  84. package/lib/calendar/Calendar.d.ts +4 -0
  85. package/lib/calendar/Calendar.js +26 -18
  86. package/lib/calendar/CalendarDay.js +14 -13
  87. package/lib/calendar/CalendarHeader.js +14 -13
  88. package/lib/calendar/CalendarMonth.js +21 -15
  89. package/lib/calendar/index.d.ts +3 -0
  90. package/lib/calendar/index.js +14 -8
  91. package/lib/calendar/types.js +18 -1
  92. package/lib/calendar/utils.js +11 -10
  93. package/lib/card/Card.js +15 -14
  94. package/lib/card/index.js +14 -8
  95. package/lib/cascader/Cascader.js +16 -15
  96. package/lib/cascader/index.js +14 -8
  97. package/lib/cascader/types.js +18 -1
  98. package/lib/cell/Cell.js +15 -14
  99. package/lib/cell/index.js +14 -8
  100. package/lib/cell-group/CellGroup.js +13 -12
  101. package/lib/cell-group/index.js +14 -8
  102. package/lib/checkbox/Checkbox.js +19 -13
  103. package/lib/checkbox/Checker.js +14 -13
  104. package/lib/checkbox/index.js +14 -8
  105. package/lib/checkbox/types.js +18 -1
  106. package/lib/checkbox-group/CheckboxGroup.js +15 -14
  107. package/lib/checkbox-group/index.js +14 -8
  108. package/lib/checkbox-group/types.js +18 -1
  109. package/lib/circle/Circle.js +14 -13
  110. package/lib/circle/index.js +14 -8
  111. package/lib/col/Col.js +15 -14
  112. package/lib/col/index.js +14 -8
  113. package/lib/collapse/Collapse.js +14 -13
  114. package/lib/collapse/index.js +14 -8
  115. package/lib/collapse-item/CollapseItem.d.ts +13 -0
  116. package/lib/collapse-item/CollapseItem.js +22 -20
  117. package/lib/collapse-item/index.d.ts +9 -0
  118. package/lib/collapse-item/index.js +14 -8
  119. package/lib/collapse-item/types.js +18 -1
  120. package/lib/composables/on-popup-reopen.js +11 -10
  121. package/lib/composables/use-expose.js +12 -11
  122. package/lib/composables/use-height.js +12 -11
  123. package/lib/composables/use-id.js +11 -10
  124. package/lib/composables/use-lazy-render.js +11 -10
  125. package/lib/composables/use-lock-scroll.js +14 -13
  126. package/lib/composables/use-placeholder.js +12 -11
  127. package/lib/composables/use-refs.js +11 -10
  128. package/lib/composables/use-route.js +11 -10
  129. package/lib/composables/use-tab-status.js +11 -10
  130. package/lib/composables/use-touch.js +11 -10
  131. package/lib/composables/use-visibility-change.js +13 -12
  132. package/lib/config-provider/ConfigProvider.js +13 -12
  133. package/lib/config-provider/index.js +14 -8
  134. package/lib/contact-card/ContactCard.js +14 -13
  135. package/lib/contact-card/index.js +14 -8
  136. package/lib/contact-edit/ContactEdit.js +18 -17
  137. package/lib/contact-edit/index.js +14 -8
  138. package/lib/contact-list/ContactList.js +19 -18
  139. package/lib/contact-list/index.js +14 -8
  140. package/lib/count-down/CountDown.js +16 -15
  141. package/lib/count-down/index.js +14 -8
  142. package/lib/count-down/types.js +18 -1
  143. package/lib/count-down/utils.js +11 -10
  144. package/lib/coupon/Coupon.js +15 -14
  145. package/lib/coupon/index.js +14 -8
  146. package/lib/coupon/utils.js +11 -10
  147. package/lib/coupon-cell/CouponCell.js +14 -13
  148. package/lib/coupon-cell/index.js +14 -8
  149. package/lib/coupon-list/CouponList.js +20 -19
  150. package/lib/coupon-list/index.js +14 -8
  151. package/lib/datetime-picker/DatePicker.js +16 -15
  152. package/lib/datetime-picker/DatetimePicker.js +18 -12
  153. package/lib/datetime-picker/TimePicker.js +16 -15
  154. package/lib/datetime-picker/index.js +14 -8
  155. package/lib/datetime-picker/types.js +18 -1
  156. package/lib/datetime-picker/utils.js +12 -11
  157. package/lib/dialog/Dialog.d.ts +2 -1
  158. package/lib/dialog/Dialog.js +35 -18
  159. package/lib/dialog/function-call.d.ts +2 -1
  160. package/lib/dialog/function-call.js +16 -10
  161. package/lib/dialog/index.js +11 -10
  162. package/lib/dialog/types.js +18 -1
  163. package/lib/divider/Divider.js +13 -12
  164. package/lib/divider/index.js +14 -8
  165. package/lib/dropdown-item/DropdownItem.js +19 -18
  166. package/lib/dropdown-item/index.js +14 -8
  167. package/lib/dropdown-item/types.js +18 -1
  168. package/lib/dropdown-menu/DropdownMenu.js +15 -14
  169. package/lib/dropdown-menu/index.js +14 -8
  170. package/lib/dropdown-menu/types.js +18 -1
  171. package/lib/empty/Empty.js +14 -13
  172. package/lib/empty/Network.js +11 -10
  173. package/lib/empty/index.js +14 -8
  174. package/lib/field/Field.js +20 -19
  175. package/lib/field/index.js +14 -8
  176. package/lib/field/types.js +18 -1
  177. package/lib/field/utils.js +13 -11
  178. package/lib/form/Form.js +15 -14
  179. package/lib/form/index.js +14 -8
  180. package/lib/form/types.js +18 -1
  181. package/lib/grid/Grid.js +15 -14
  182. package/lib/grid/index.js +14 -8
  183. package/lib/grid-item/GridItem.js +18 -17
  184. package/lib/grid-item/index.js +14 -8
  185. package/lib/icon/Icon.js +15 -14
  186. package/lib/icon/index.js +14 -8
  187. package/lib/image/Image.js +14 -13
  188. package/lib/image/index.js +14 -8
  189. package/lib/image-preview/ImagePreview.js +21 -15
  190. package/lib/image-preview/ImagePreviewItem.js +17 -16
  191. package/lib/image-preview/function-call.js +16 -10
  192. package/lib/image-preview/index.js +11 -10
  193. package/lib/image-preview/types.js +18 -1
  194. package/lib/index-anchor/IndexAnchor.js +17 -16
  195. package/lib/index-anchor/index.js +14 -8
  196. package/lib/index-bar/IndexBar.d.ts +4 -4
  197. package/lib/index-bar/IndexBar.js +19 -16
  198. package/lib/index-bar/index.d.ts +3 -3
  199. package/lib/index-bar/index.js +14 -8
  200. package/lib/index-bar/types.js +18 -1
  201. package/lib/index.css +1 -1
  202. package/lib/index.d.ts +1 -1
  203. package/lib/index.js +182 -181
  204. package/lib/lazyload/index.js +11 -10
  205. package/lib/lazyload/vue-lazyload/index.js +16 -10
  206. package/lib/lazyload/vue-lazyload/lazy-component.js +12 -11
  207. package/lib/lazyload/vue-lazyload/lazy-container.js +11 -10
  208. package/lib/lazyload/vue-lazyload/lazy-image.js +13 -12
  209. package/lib/lazyload/vue-lazyload/lazy.js +17 -11
  210. package/lib/lazyload/vue-lazyload/listener.js +13 -12
  211. package/lib/lazyload/vue-lazyload/util.js +11 -10
  212. package/lib/list/List.js +17 -16
  213. package/lib/list/index.js +14 -8
  214. package/lib/list/types.js +18 -1
  215. package/lib/loading/Loading.js +13 -12
  216. package/lib/loading/index.js +14 -8
  217. package/lib/locale/index.js +15 -9
  218. package/lib/locale/lang/bn-BD.d.ts +64 -0
  219. package/lib/locale/lang/bn-BD.js +98 -0
  220. package/lib/locale/lang/de-DE-formal.js +20 -3
  221. package/lib/locale/lang/de-DE.js +20 -3
  222. package/lib/locale/lang/en-US.js +20 -3
  223. package/lib/locale/lang/es-ES.js +20 -3
  224. package/lib/locale/lang/fr-FR.js +20 -3
  225. package/lib/locale/lang/hi-IN.js +20 -3
  226. package/lib/locale/lang/id-ID.d.ts +64 -0
  227. package/lib/locale/lang/id-ID.js +90 -0
  228. package/lib/locale/lang/it-IT.d.ts +64 -0
  229. package/lib/locale/lang/it-IT.js +98 -0
  230. package/lib/locale/lang/ja-JP.js +20 -3
  231. package/lib/locale/lang/ko-KR.js +20 -3
  232. package/lib/locale/lang/nb-NO.js +20 -3
  233. package/lib/locale/lang/pt-BR.js +20 -3
  234. package/lib/locale/lang/ro-RO.js +20 -3
  235. package/lib/locale/lang/ru-RU.js +20 -3
  236. package/lib/locale/lang/th-TH.js +20 -3
  237. package/lib/locale/lang/tr-TR.js +19 -2
  238. package/lib/locale/lang/uk-UA.d.ts +64 -0
  239. package/lib/locale/lang/uk-UA.js +98 -0
  240. package/lib/locale/lang/vi-VN.d.ts +64 -0
  241. package/lib/locale/lang/vi-VN.js +98 -0
  242. package/lib/locale/lang/zh-CN.js +20 -3
  243. package/lib/locale/lang/zh-HK.js +20 -3
  244. package/lib/locale/lang/zh-TW.js +20 -3
  245. package/lib/nav-bar/NavBar.d.ts +1 -1
  246. package/lib/nav-bar/NavBar.js +18 -17
  247. package/lib/nav-bar/index.d.ts +1 -1
  248. package/lib/nav-bar/index.js +14 -8
  249. package/lib/notice-bar/NoticeBar.js +17 -16
  250. package/lib/notice-bar/index.js +14 -8
  251. package/lib/notice-bar/types.js +18 -1
  252. package/lib/notify/Notify.js +15 -14
  253. package/lib/notify/function-call.js +16 -10
  254. package/lib/notify/index.js +11 -10
  255. package/lib/notify/types.js +18 -1
  256. package/lib/number-keyboard/NumberKeyboard.js +17 -11
  257. package/lib/number-keyboard/NumberKeyboardKey.js +15 -14
  258. package/lib/number-keyboard/index.js +14 -8
  259. package/lib/overlay/Overlay.js +14 -13
  260. package/lib/overlay/index.js +14 -8
  261. package/lib/pagination/Pagination.js +13 -12
  262. package/lib/pagination/index.js +14 -8
  263. package/lib/password-input/PasswordInput.js +13 -12
  264. package/lib/password-input/index.js +14 -8
  265. package/lib/picker/Picker.js +19 -13
  266. package/lib/picker/PickerColumn.js +17 -16
  267. package/lib/picker/index.js +14 -8
  268. package/lib/picker/types.js +18 -1
  269. package/lib/popover/Popover.js +17 -16
  270. package/lib/popover/index.js +14 -8
  271. package/lib/popover/types.js +18 -1
  272. package/lib/popup/Popup.d.ts +6 -1
  273. package/lib/popup/Popup.js +34 -22
  274. package/lib/popup/index.d.ts +5 -1
  275. package/lib/popup/index.js +14 -8
  276. package/lib/popup/shared.js +11 -10
  277. package/lib/popup/types.d.ts +5 -2
  278. package/lib/popup/types.js +18 -1
  279. package/lib/progress/Progress.js +13 -12
  280. package/lib/progress/index.js +14 -8
  281. package/lib/progress/types.js +18 -1
  282. package/lib/pull-refresh/PullRefresh.js +16 -15
  283. package/lib/pull-refresh/index.js +14 -8
  284. package/lib/radio/Radio.js +18 -12
  285. package/lib/radio/index.js +14 -8
  286. package/lib/radio-group/RadioGroup.js +14 -13
  287. package/lib/radio-group/index.js +14 -8
  288. package/lib/rate/Rate.js +17 -16
  289. package/lib/rate/index.js +14 -8
  290. package/lib/row/Row.js +14 -13
  291. package/lib/row/index.js +14 -8
  292. package/lib/search/Search.js +17 -16
  293. package/lib/search/index.js +14 -8
  294. package/lib/search/types.js +18 -1
  295. package/lib/share-sheet/ShareSheet.js +15 -14
  296. package/lib/share-sheet/index.js +14 -8
  297. package/lib/sidebar/Sidebar.js +14 -13
  298. package/lib/sidebar/index.js +14 -8
  299. package/lib/sidebar-item/SidebarItem.js +17 -16
  300. package/lib/sidebar-item/index.js +14 -8
  301. package/lib/skeleton/Skeleton.js +18 -15
  302. package/lib/skeleton/index.js +14 -8
  303. package/lib/slider/Slider.js +15 -14
  304. package/lib/slider/index.js +14 -8
  305. package/lib/step/Step.js +16 -15
  306. package/lib/step/index.js +14 -8
  307. package/lib/stepper/Stepper.js +14 -13
  308. package/lib/stepper/index.js +14 -8
  309. package/lib/steps/Steps.js +14 -13
  310. package/lib/steps/index.js +14 -8
  311. package/lib/sticky/Sticky.js +15 -14
  312. package/lib/sticky/index.js +14 -8
  313. package/lib/style/base.css +1 -1
  314. package/lib/style/base.less +5 -0
  315. package/lib/submit-bar/SubmitBar.js +15 -14
  316. package/lib/submit-bar/index.css +1 -1
  317. package/lib/submit-bar/index.js +14 -8
  318. package/lib/submit-bar/index.less +1 -0
  319. package/lib/swipe/Swipe.js +17 -16
  320. package/lib/swipe/index.js +14 -8
  321. package/lib/swipe/types.js +18 -1
  322. package/lib/swipe-cell/SwipeCell.js +17 -16
  323. package/lib/swipe-cell/index.js +14 -8
  324. package/lib/swipe-cell/types.js +18 -1
  325. package/lib/swipe-item/SwipeItem.js +16 -15
  326. package/lib/swipe-item/index.js +14 -8
  327. package/lib/switch/Switch.js +15 -14
  328. package/lib/switch/index.js +14 -8
  329. package/lib/tab/Tab.js +20 -19
  330. package/lib/tab/index.js +14 -8
  331. package/lib/tabbar/Tabbar.js +15 -14
  332. package/lib/tabbar/index.js +14 -8
  333. package/lib/tabbar-item/TabbarItem.js +18 -17
  334. package/lib/tabbar-item/index.js +14 -8
  335. package/lib/tabs/Tabs.js +25 -19
  336. package/lib/tabs/TabsContent.js +14 -13
  337. package/lib/tabs/TabsTitle.js +14 -13
  338. package/lib/tabs/index.js +14 -8
  339. package/lib/tabs/types.js +18 -1
  340. package/lib/tabs/utils.js +12 -11
  341. package/lib/tag/Tag.js +14 -13
  342. package/lib/tag/index.js +14 -8
  343. package/lib/toast/Toast.d.ts +3 -0
  344. package/lib/toast/Toast.js +20 -17
  345. package/lib/toast/function-call.js +17 -11
  346. package/lib/toast/index.js +11 -10
  347. package/lib/toast/lock-click.js +19 -2
  348. package/lib/toast/types.js +18 -1
  349. package/lib/tree-select/TreeSelect.js +16 -15
  350. package/lib/tree-select/index.js +14 -8
  351. package/lib/uploader/Uploader.js +21 -15
  352. package/lib/uploader/UploaderPreviewItem.js +17 -16
  353. package/lib/uploader/index.js +14 -8
  354. package/lib/uploader/types.d.ts +1 -3
  355. package/lib/uploader/types.js +18 -1
  356. package/lib/uploader/utils.js +11 -10
  357. package/lib/utils/basic.js +19 -2
  358. package/lib/utils/constant.js +19 -2
  359. package/lib/utils/create.js +16 -10
  360. package/lib/utils/deep-assign.js +11 -10
  361. package/lib/utils/deep-clone.js +11 -10
  362. package/lib/utils/dom.js +13 -12
  363. package/lib/utils/format.js +13 -12
  364. package/lib/utils/index.js +18 -17
  365. package/lib/utils/interceptor.d.ts +1 -1
  366. package/lib/utils/interceptor.js +12 -11
  367. package/lib/utils/mount-component.js +13 -12
  368. package/lib/utils/props.js +19 -2
  369. package/lib/utils/validate.js +11 -10
  370. package/lib/utils/with-install.js +11 -10
  371. package/lib/vant.cjs.js +57 -18
  372. package/lib/vant.cjs.min.js +1 -1
  373. package/lib/vant.es.js +58 -19
  374. package/lib/vant.es.min.js +58 -19
  375. package/lib/vant.js +60 -21
  376. package/lib/vant.min.js +1 -1
  377. package/package.json +4 -7
  378. package/vetur/attributes.json +180 -168
  379. package/vetur/tags.json +57 -54
  380. package/vetur/web-types.json +611 -581
@@ -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';
@@ -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,8 +90,9 @@ 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
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("open" | "close" | "opened" | "closed" | "update:show" | "click-overlay" | "click-close-icon")[], "open" | "close" | "opened" | "closed" | "update:show" | "click-overlay" | "click-close-icon", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
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;
95
97
  zIndex: (NumberConstructor | StringConstructor)[];
96
98
  overlay: {
@@ -133,8 +135,10 @@ 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
  }>> & {
141
+ onKeydown?: ((...args: any[]) => any) | undefined;
138
142
  onOpen?: ((...args: any[]) => any) | undefined;
139
143
  onClose?: ((...args: any[]) => any) | undefined;
140
144
  onOpened?: ((...args: any[]) => any) | undefined;
@@ -156,5 +160,6 @@ declare const _default: import("vue").DefineComponent<{
156
160
  closeable: boolean;
157
161
  closeOnPopstate: boolean;
158
162
  closeIconPosition: PopupCloseIconPosition;
163
+ safeAreaInsetTop: boolean;
159
164
  }>;
160
165
  export default _default;
package/es/popup/Popup.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Fragment as _Fragment, withDirectives as _withDirectives, mergeProps as _mergeProps, vShow as _vShow, createVNode as _createVNode } from "vue";
2
- import { ref, watch, provide, Teleport, computed, onMounted, Transition, onActivated, onDeactivated, defineComponent } from "vue";
2
+ import { ref, watch, provide, Teleport, nextTick, computed, onMounted, Transition, onActivated, onDeactivated, defineComponent } from "vue";
3
3
  import { popupSharedProps } from "./shared";
4
4
  import { isDef, extend, makeStringProp, callInterceptor, createNamespace, HAPTICS_FEEDBACK } from "../utils";
5
5
  import { useEventListener } from "@vant/use";
@@ -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");
@@ -26,7 +27,7 @@ var stdin_default = defineComponent({
26
27
  name,
27
28
  inheritAttrs: false,
28
29
  props: popupProps,
29
- emits: ["open", "close", "opened", "closed", "update:show", "click-overlay", "click-close-icon"],
30
+ emits: ["open", "close", "opened", "closed", "keydown", "update:show", "click-overlay", "click-close-icon"],
30
31
  setup(props, {
31
32
  emit,
32
33
  attrs,
@@ -106,11 +107,13 @@ var stdin_default = defineComponent({
106
107
  };
107
108
  const onOpened = () => emit("opened");
108
109
  const onClosed = () => emit("closed");
110
+ const onKeydown = (event) => emit("keydown", event);
109
111
  const renderPopup = lazyRender(() => {
110
112
  var _a;
111
113
  const {
112
114
  round,
113
115
  position,
116
+ safeAreaInsetTop,
114
117
  safeAreaInsetBottom
115
118
  } = props;
116
119
  return _withDirectives(_createVNode("div", _mergeProps({
@@ -120,8 +123,10 @@ var stdin_default = defineComponent({
120
123
  round,
121
124
  [position]: position
122
125
  }), {
126
+ "van-safe-area-top": safeAreaInsetTop,
123
127
  "van-safe-area-bottom": safeAreaInsetBottom
124
- }]
128
+ }],
129
+ "onKeydown": onKeydown
125
130
  }, attrs), [(_a = slots.default) == null ? void 0 : _a.call(slots), renderCloseIcon()]), [[_vShow, props.show]]);
126
131
  });
127
132
  const renderTransition = () => {
@@ -143,6 +148,12 @@ var stdin_default = defineComponent({
143
148
  watch(() => props.show, (show) => {
144
149
  if (show && !opened) {
145
150
  open();
151
+ if (attrs.tabindex === 0) {
152
+ nextTick(() => {
153
+ var _a;
154
+ (_a = popupRef.value) == null ? void 0 : _a.focus();
155
+ });
156
+ }
146
157
  }
147
158
  if (!show && opened) {
148
159
  opened = false;
@@ -41,8 +41,9 @@ 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
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("open" | "close" | "opened" | "closed" | "update:show" | "click-overlay" | "click-close-icon")[], "open" | "close" | "opened" | "closed" | "update:show" | "click-overlay" | "click-close-icon", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
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;
47
48
  zIndex: (NumberConstructor | StringConstructor)[];
48
49
  overlay: {
@@ -85,8 +86,10 @@ 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
  }>> & {
92
+ onKeydown?: ((...args: any[]) => any) | undefined;
90
93
  onOpen?: ((...args: any[]) => any) | undefined;
91
94
  onClose?: ((...args: any[]) => any) | undefined;
92
95
  onOpened?: ((...args: any[]) => any) | undefined;
@@ -108,6 +111,7 @@ export declare const Popup: import("../utils").WithInstall<import("vue").DefineC
108
111
  closeable: boolean;
109
112
  closeOnPopstate: boolean;
110
113
  closeIconPosition: import("./types").PopupCloseIconPosition;
114
+ safeAreaInsetTop: boolean;
111
115
  }>>;
112
116
  export default Popup;
113
117
  export type { PopupProps } from './Popup';
@@ -1,5 +1,8 @@
1
- import type { ComponentPublicInstance } from 'vue';
1
+ import type { Ref, ComponentPublicInstance } from 'vue';
2
2
  import type { PopupProps } from './Popup';
3
3
  export declare type PopupPosition = 'top' | 'left' | 'bottom' | 'right' | 'center' | '';
4
4
  export declare type PopupCloseIconPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
5
- export declare type PopupInstance = ComponentPublicInstance<PopupProps>;
5
+ export declare type PopupExpose = {
6
+ popupRef: Ref<HTMLElement>;
7
+ };
8
+ export declare type PopupInstance = ComponentPublicInstance<PopupProps, PopupExpose>;
@@ -1,4 +1,4 @@
1
- import { createVNode as _createVNode } from "vue";
1
+ import { mergeProps as _mergeProps, createVNode as _createVNode } from "vue";
2
2
  import { defineComponent } from "vue";
3
3
  import { addUnit, truthProp, numericProp, getSizeStyle, makeStringProp, makeNumericProp, createNamespace } from "../utils";
4
4
  const [name, bem] = createNamespace("skeleton");
@@ -21,9 +21,11 @@ const skeletonProps = {
21
21
  };
22
22
  var stdin_default = defineComponent({
23
23
  name,
24
+ inheritAttrs: false,
24
25
  props: skeletonProps,
25
26
  setup(props, {
26
- slots
27
+ slots,
28
+ attrs
27
29
  }) {
28
30
  const renderAvatar = () => {
29
31
  if (props.avatar) {
@@ -66,12 +68,12 @@ var stdin_default = defineComponent({
66
68
  if (!props.loading) {
67
69
  return (_a = slots.default) == null ? void 0 : _a.call(slots);
68
70
  }
69
- return _createVNode("div", {
71
+ return _createVNode("div", _mergeProps({
70
72
  "class": bem({
71
73
  animate: props.animate,
72
74
  round: props.round
73
75
  })
74
- }, [renderAvatar(), _createVNode("div", {
76
+ }, attrs), [renderAvatar(), _createVNode("div", {
75
77
  "class": bem("content")
76
78
  }, [renderTitle(), renderRows()])]);
77
79
  };
package/es/style/base.css CHANGED
@@ -1 +1 @@
1
- :root{--van-black: #000;--van-white: #fff;--van-gray-1: #f7f8fa;--van-gray-2: #f2f3f5;--van-gray-3: #ebedf0;--van-gray-4: #dcdee0;--van-gray-5: #c8c9cc;--van-gray-6: #969799;--van-gray-7: #646566;--van-gray-8: #323233;--van-red: #ee0a24;--van-blue: #1989fa;--van-orange: #ff976a;--van-orange-dark: #ed6a0c;--van-orange-light: #fffbe8;--van-green: #07c160;--van-gradient-red: linear-gradient(to right, #ff6034, #ee0a24);--van-gradient-orange: linear-gradient(to right, #ffd01e, #ff8917);--van-primary-color: var(--van-blue);--van-success-color: var(--van-green);--van-danger-color: var(--van-red);--van-warning-color: var(--van-orange);--van-text-color: var(--van-gray-8);--van-text-color-2: var(--van-gray-6);--van-text-color-3: var(--van-gray-5);--van-text-link-color: #576b95;--van-active-color: var(--van-gray-2);--van-active-opacity: .6;--van-disabled-opacity: .5;--van-background-color: var(--van-gray-1);--van-background-color-light: var(--van-white);--van-padding-base: 4px;--van-padding-xs: 8px;--van-padding-sm: 12px;--van-padding-md: 16px;--van-padding-lg: 24px;--van-padding-xl: 32px;--van-font-size-xs: 10px;--van-font-size-sm: 12px;--van-font-size-md: 14px;--van-font-size-lg: 16px;--van-font-weight-bold: 500;--van-line-height-xs: 14px;--van-line-height-sm: 18px;--van-line-height-md: 20px;--van-line-height-lg: 22px;--van-base-font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Segoe UI, Arial, Roboto, "PingFang SC", "miui", "Hiragino Sans GB", "Microsoft Yahei", sans-serif;--van-price-integer-font-family: Avenir-Heavy, PingFang SC, Helvetica Neue, Arial, sans-serif;--van-animation-duration-base: .3s;--van-animation-duration-fast: .2s;--van-animation-timing-function-enter: ease-out;--van-animation-timing-function-leave: ease-in;--van-border-color: var(--van-gray-3);--van-border-width-base: 1px;--van-border-radius-sm: 2px;--van-border-radius-md: 4px;--van-border-radius-lg: 8px;--van-border-radius-max: 999px}html{-webkit-tap-highlight-color:transparent}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,Helvetica,Segoe UI,Arial,Roboto,PingFang SC,miui,Hiragino Sans GB,Microsoft Yahei,sans-serif}a{text-decoration:none}input,button,textarea{color:inherit;font:inherit}a:focus,input:focus,button:focus,textarea:focus,[class*=van-]:focus{outline:none}ol,ul{margin:0;padding:0;list-style:none}@keyframes van-slide-up-enter{0%{transform:translateY(100%)}}@keyframes van-slide-up-leave{to{transform:translateY(100%)}}@keyframes van-slide-down-enter{0%{transform:translateY(-100%)}}@keyframes van-slide-down-leave{to{transform:translateY(-100%)}}@keyframes van-slide-left-enter{0%{transform:translate(-100%)}}@keyframes van-slide-left-leave{to{transform:translate(-100%)}}@keyframes van-slide-right-enter{0%{transform:translate(100%)}}@keyframes van-slide-right-leave{to{transform:translate(100%)}}@keyframes van-fade-in{0%{opacity:0}to{opacity:1}}@keyframes van-fade-out{0%{opacity:1}to{opacity:0}}@keyframes van-rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.van-fade-enter-active{animation:var(--van-animation-duration-base) van-fade-in both var(--van-animation-timing-function-enter)}.van-fade-leave-active{animation:var(--van-animation-duration-base) van-fade-out both var(--van-animation-timing-function-leave)}.van-slide-up-enter-active{animation:van-slide-up-enter var(--van-animation-duration-base) both var(--van-animation-timing-function-enter)}.van-slide-up-leave-active{animation:van-slide-up-leave var(--van-animation-duration-base) both var(--van-animation-timing-function-leave)}.van-slide-down-enter-active{animation:van-slide-down-enter var(--van-animation-duration-base) both var(--van-animation-timing-function-enter)}.van-slide-down-leave-active{animation:van-slide-down-leave var(--van-animation-duration-base) both var(--van-animation-timing-function-leave)}.van-slide-left-enter-active{animation:van-slide-left-enter var(--van-animation-duration-base) both var(--van-animation-timing-function-enter)}.van-slide-left-leave-active{animation:van-slide-left-leave var(--van-animation-duration-base) both var(--van-animation-timing-function-leave)}.van-slide-right-enter-active{animation:van-slide-right-enter var(--van-animation-duration-base) both var(--van-animation-timing-function-enter)}.van-slide-right-leave-active{animation:van-slide-right-leave var(--van-animation-duration-base) both var(--van-animation-timing-function-leave)}.van-clearfix:after{display:table;clear:both;content:""}.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:3;-webkit-box-orient:vertical}.van-safe-area-bottom{padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom)}.van-haptics-feedback{cursor:pointer}.van-haptics-feedback:active{opacity:var(--van-active-opacity)}[class*=van-hairline]:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid var(--van-border-color);transform:scale(.5)}.van-hairline,.van-hairline--top,.van-hairline--left,.van-hairline--right,.van-hairline--bottom,.van-hairline--surround,.van-hairline--top-bottom{position:relative}.van-hairline--top:after{border-top-width:1px}.van-hairline--left:after{border-left-width:1px}.van-hairline--right:after{border-right-width:1px}.van-hairline--bottom:after{border-bottom-width:1px}.van-hairline--top-bottom:after,.van-hairline-unset--top-bottom:after{border-width:1px 0}.van-hairline--surround:after{border-width:1px}
1
+ :root{--van-black: #000;--van-white: #fff;--van-gray-1: #f7f8fa;--van-gray-2: #f2f3f5;--van-gray-3: #ebedf0;--van-gray-4: #dcdee0;--van-gray-5: #c8c9cc;--van-gray-6: #969799;--van-gray-7: #646566;--van-gray-8: #323233;--van-red: #ee0a24;--van-blue: #1989fa;--van-orange: #ff976a;--van-orange-dark: #ed6a0c;--van-orange-light: #fffbe8;--van-green: #07c160;--van-gradient-red: linear-gradient(to right, #ff6034, #ee0a24);--van-gradient-orange: linear-gradient(to right, #ffd01e, #ff8917);--van-primary-color: var(--van-blue);--van-success-color: var(--van-green);--van-danger-color: var(--van-red);--van-warning-color: var(--van-orange);--van-text-color: var(--van-gray-8);--van-text-color-2: var(--van-gray-6);--van-text-color-3: var(--van-gray-5);--van-text-link-color: #576b95;--van-active-color: var(--van-gray-2);--van-active-opacity: .6;--van-disabled-opacity: .5;--van-background-color: var(--van-gray-1);--van-background-color-light: var(--van-white);--van-padding-base: 4px;--van-padding-xs: 8px;--van-padding-sm: 12px;--van-padding-md: 16px;--van-padding-lg: 24px;--van-padding-xl: 32px;--van-font-size-xs: 10px;--van-font-size-sm: 12px;--van-font-size-md: 14px;--van-font-size-lg: 16px;--van-font-weight-bold: 500;--van-line-height-xs: 14px;--van-line-height-sm: 18px;--van-line-height-md: 20px;--van-line-height-lg: 22px;--van-base-font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Segoe UI, Arial, Roboto, "PingFang SC", "miui", "Hiragino Sans GB", "Microsoft Yahei", sans-serif;--van-price-integer-font-family: Avenir-Heavy, PingFang SC, Helvetica Neue, Arial, sans-serif;--van-animation-duration-base: .3s;--van-animation-duration-fast: .2s;--van-animation-timing-function-enter: ease-out;--van-animation-timing-function-leave: ease-in;--van-border-color: var(--van-gray-3);--van-border-width-base: 1px;--van-border-radius-sm: 2px;--van-border-radius-md: 4px;--van-border-radius-lg: 8px;--van-border-radius-max: 999px}html{-webkit-tap-highlight-color:transparent}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,Helvetica,Segoe UI,Arial,Roboto,PingFang SC,miui,Hiragino Sans GB,Microsoft Yahei,sans-serif}a{text-decoration:none}input,button,textarea{color:inherit;font:inherit}a:focus,input:focus,button:focus,textarea:focus,[class*=van-]:focus{outline:none}ol,ul{margin:0;padding:0;list-style:none}@keyframes van-slide-up-enter{0%{transform:translateY(100%)}}@keyframes van-slide-up-leave{to{transform:translateY(100%)}}@keyframes van-slide-down-enter{0%{transform:translateY(-100%)}}@keyframes van-slide-down-leave{to{transform:translateY(-100%)}}@keyframes van-slide-left-enter{0%{transform:translate(-100%)}}@keyframes van-slide-left-leave{to{transform:translate(-100%)}}@keyframes van-slide-right-enter{0%{transform:translate(100%)}}@keyframes van-slide-right-leave{to{transform:translate(100%)}}@keyframes van-fade-in{0%{opacity:0}to{opacity:1}}@keyframes van-fade-out{0%{opacity:1}to{opacity:0}}@keyframes van-rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.van-fade-enter-active{animation:var(--van-animation-duration-base) van-fade-in both var(--van-animation-timing-function-enter)}.van-fade-leave-active{animation:var(--van-animation-duration-base) van-fade-out both var(--van-animation-timing-function-leave)}.van-slide-up-enter-active{animation:van-slide-up-enter var(--van-animation-duration-base) both var(--van-animation-timing-function-enter)}.van-slide-up-leave-active{animation:van-slide-up-leave var(--van-animation-duration-base) both var(--van-animation-timing-function-leave)}.van-slide-down-enter-active{animation:van-slide-down-enter var(--van-animation-duration-base) both var(--van-animation-timing-function-enter)}.van-slide-down-leave-active{animation:van-slide-down-leave var(--van-animation-duration-base) both var(--van-animation-timing-function-leave)}.van-slide-left-enter-active{animation:van-slide-left-enter var(--van-animation-duration-base) both var(--van-animation-timing-function-enter)}.van-slide-left-leave-active{animation:van-slide-left-leave var(--van-animation-duration-base) both var(--van-animation-timing-function-leave)}.van-slide-right-enter-active{animation:van-slide-right-enter var(--van-animation-duration-base) both var(--van-animation-timing-function-enter)}.van-slide-right-leave-active{animation:van-slide-right-leave var(--van-animation-duration-base) both var(--van-animation-timing-function-leave)}.van-clearfix:after{display:table;clear:both;content:""}.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:3;-webkit-box-orient:vertical}.van-safe-area-top{padding-top:constant(safe-area-inset-top);padding-top:env(safe-area-inset-top)}.van-safe-area-bottom{padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom)}.van-haptics-feedback{cursor:pointer}.van-haptics-feedback:active{opacity:var(--van-active-opacity)}[class*=van-hairline]:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid var(--van-border-color);transform:scale(.5)}.van-hairline,.van-hairline--top,.van-hairline--left,.van-hairline--right,.van-hairline--bottom,.van-hairline--surround,.van-hairline--top-bottom{position:relative}.van-hairline--top:after{border-top-width:1px}.van-hairline--left:after{border-left-width:1px}.van-hairline--right:after{border-right-width:1px}.van-hairline--bottom:after{border-bottom-width:1px}.van-hairline--top-bottom:after,.van-hairline-unset--top-bottom:after{border-width:1px 0}.van-hairline--surround:after{border-width:1px}
@@ -26,6 +26,11 @@
26
26
  .multi-ellipsis(3);
27
27
  }
28
28
 
29
+ .van-safe-area-top {
30
+ padding-top: constant(safe-area-inset-top);
31
+ padding-top: env(safe-area-inset-top);
32
+ }
33
+
29
34
  .van-safe-area-bottom {
30
35
  padding-bottom: constant(safe-area-inset-bottom);
31
36
  padding-bottom: env(safe-area-inset-bottom);
@@ -1 +1 @@
1
- :root{--van-submit-bar-height: 50px;--van-submit-bar-z-index: 100;--van-submit-bar-background-color: var(--van-background-color-light);--van-submit-bar-button-width: 110px;--van-submit-bar-price-color: var(--van-danger-color);--van-submit-bar-price-font-size: var(--van-font-size-sm);--van-submit-bar-price-integer-font-size: 20px;--van-submit-bar-price-font-family: var(--van-price-integer-font-family);--van-submit-bar-currency-font-size: var(--van-font-size-md);--van-submit-bar-text-color: var(--van-text-color);--van-submit-bar-text-font-size: var(--van-font-size-md);--van-submit-bar-tip-padding: var(--van-padding-xs) var(--van-padding-sm);--van-submit-bar-tip-font-size: var(--van-font-size-sm);--van-submit-bar-tip-line-height: 1.5;--van-submit-bar-tip-color: var(--van-orange-dark);--van-submit-bar-tip-background-color: var(--van-orange-light);--van-submit-bar-tip-icon-size: 12px;--van-submit-bar-button-height: 40px;--van-submit-bar-padding: 0 var(--van-padding-md)}.van-submit-bar{position:fixed;bottom:0;left:0;z-index:var(--van-submit-bar-z-index);width:100%;background:var(--van-submit-bar-background-color);-webkit-user-select:none;user-select:none}.van-submit-bar__tip{padding:var(--van-submit-bar-tip-padding);color:var(--van-submit-bar-tip-color);font-size:var(--van-submit-bar-tip-font-size);line-height:var(--van-submit-bar-tip-line-height);background:var(--van-submit-bar-tip-background-color)}.van-submit-bar__tip-icon{margin-right:var(--van-padding-base);font-size:var(--van-submit-bar-tip-icon-size);vertical-align:middle}.van-submit-bar__tip-text{vertical-align:middle}.van-submit-bar__bar{display:flex;align-items:center;justify-content:flex-end;height:var(--van-submit-bar-height);padding:var(--van-submit-bar-padding);font-size:var(--van-submit-bar-text-font-size)}.van-submit-bar__text{flex:1;padding-right:var(--van-padding-sm);color:var(--van-submit-bar-text-color);text-align:right}.van-submit-bar__text span{display:inline-block}.van-submit-bar__suffix-label{margin-left:var(--van-padding-base);font-weight:var(--van-font-weight-bold)}.van-submit-bar__price{color:var(--van-submit-bar-price-color);font-weight:var(--van-font-weight-bold);font-size:var(--van-submit-bar-price-font-size)}.van-submit-bar__price-integer{font-size:var(--van-submit-bar-price-integer-font-size);font-family:var(--van-submit-bar-price-font-family)}.van-submit-bar__button{width:var(--van-submit-bar-button-width);height:var(--van-submit-bar-button-height);font-weight:var(--van-font-weight-bold);border:none}.van-submit-bar__button--danger{background:var(--van-gradient-red)}
1
+ :root{--van-submit-bar-height: 50px;--van-submit-bar-z-index: 100;--van-submit-bar-background-color: var(--van-background-color-light);--van-submit-bar-button-width: 110px;--van-submit-bar-price-color: var(--van-danger-color);--van-submit-bar-price-font-size: var(--van-font-size-sm);--van-submit-bar-price-integer-font-size: 20px;--van-submit-bar-price-font-family: var(--van-price-integer-font-family);--van-submit-bar-currency-font-size: var(--van-font-size-md);--van-submit-bar-text-color: var(--van-text-color);--van-submit-bar-text-font-size: var(--van-font-size-md);--van-submit-bar-tip-padding: var(--van-padding-xs) var(--van-padding-sm);--van-submit-bar-tip-font-size: var(--van-font-size-sm);--van-submit-bar-tip-line-height: 1.5;--van-submit-bar-tip-color: var(--van-orange-dark);--van-submit-bar-tip-background-color: var(--van-orange-light);--van-submit-bar-tip-icon-size: 12px;--van-submit-bar-button-height: 40px;--van-submit-bar-padding: 0 var(--van-padding-md)}.van-submit-bar{position:fixed;bottom:0;left:0;z-index:var(--van-submit-bar-z-index);width:100%;background:var(--van-submit-bar-background-color);-webkit-user-select:none;user-select:none}.van-submit-bar__tip{padding:var(--van-submit-bar-tip-padding);color:var(--van-submit-bar-tip-color);font-size:var(--van-submit-bar-tip-font-size);line-height:var(--van-submit-bar-tip-line-height);background:var(--van-submit-bar-tip-background-color)}.van-submit-bar__tip-icon{margin-right:var(--van-padding-base);font-size:var(--van-submit-bar-tip-icon-size);vertical-align:middle}.van-submit-bar__tip-text{vertical-align:middle}.van-submit-bar__bar{display:flex;align-items:center;justify-content:flex-end;height:var(--van-submit-bar-height);padding:var(--van-submit-bar-padding);font-size:var(--van-submit-bar-text-font-size)}.van-submit-bar__text{flex:1;padding-right:var(--van-padding-sm);color:var(--van-submit-bar-text-color);text-align:right}.van-submit-bar__text span{display:inline-block}.van-submit-bar__suffix-label{margin-left:var(--van-padding-base);font-weight:var(--van-font-weight-bold)}.van-submit-bar__price{color:var(--van-submit-bar-price-color);font-weight:var(--van-font-weight-bold);font-size:var(--van-submit-bar-price-font-size);margin-left:var(--van-padding-base)}.van-submit-bar__price-integer{font-size:var(--van-submit-bar-price-integer-font-size);font-family:var(--van-submit-bar-price-font-family)}.van-submit-bar__button{width:var(--van-submit-bar-button-width);height:var(--van-submit-bar-button-height);font-weight:var(--van-font-weight-bold);border:none}.van-submit-bar__button--danger{background:var(--van-gradient-red)}
@@ -78,6 +78,7 @@
78
78
  color: var(--van-submit-bar-price-color);
79
79
  font-weight: var(--van-font-weight-bold);
80
80
  font-size: var(--van-submit-bar-price-font-size);
81
+ margin-left: var(--van-padding-base);
81
82
 
82
83
  &-integer {
83
84
  font-size: var(--van-submit-bar-price-integer-font-size);
@@ -143,7 +143,7 @@ var stdin_default = defineComponent({
143
143
  return _createVNode("div", {
144
144
  "ref": root,
145
145
  "class": bem(),
146
- "onClick": getClickHandler("cell"),
146
+ "onClick": getClickHandler("cell", lockClick),
147
147
  "onTouchstart": onTouchStart,
148
148
  "onTouchmove": onTouchMove,
149
149
  "onTouchend": onTouchEnd,
@@ -19,6 +19,7 @@ declare const toastProps: {
19
19
  type: PropType<ToastPosition>;
20
20
  default: ToastPosition;
21
21
  };
22
+ teleport: PropType<string | import("vue").RendererElement | null | undefined>;
22
23
  className: PropType<unknown>;
23
24
  iconPrefix: StringConstructor;
24
25
  transition: {
@@ -51,6 +52,7 @@ declare const _default: import("vue").DefineComponent<{
51
52
  type: PropType<ToastPosition>;
52
53
  default: ToastPosition;
53
54
  };
55
+ teleport: PropType<string | import("vue").RendererElement | null | undefined>;
54
56
  className: PropType<unknown>;
55
57
  iconPrefix: StringConstructor;
56
58
  transition: {
@@ -81,6 +83,7 @@ declare const _default: import("vue").DefineComponent<{
81
83
  type: PropType<ToastPosition>;
82
84
  default: ToastPosition;
83
85
  };
86
+ teleport: PropType<string | import("vue").RendererElement | null | undefined>;
84
87
  className: PropType<unknown>;
85
88
  iconPrefix: StringConstructor;
86
89
  transition: {
package/es/toast/Toast.js CHANGED
@@ -6,7 +6,7 @@ import { Icon } from "../icon";
6
6
  import { Popup } from "../popup";
7
7
  import { Loading } from "../loading";
8
8
  const [name, bem] = createNamespace("toast");
9
- const popupInheritProps = ["show", "overlay", "transition", "overlayClass", "overlayStyle", "closeOnClickOverlay"];
9
+ const popupInheritProps = ["show", "overlay", "teleport", "transition", "overlayClass", "overlayStyle", "closeOnClickOverlay"];
10
10
  const toastProps = {
11
11
  icon: String,
12
12
  show: Boolean,
@@ -16,6 +16,7 @@ const toastProps = {
16
16
  iconSize: numericProp,
17
17
  duration: makeNumberProp(2e3),
18
18
  position: makeStringProp("middle"),
19
+ teleport: [String, Object],
19
20
  className: unknownProp,
20
21
  iconPrefix: String,
21
22
  transition: makeStringProp("van-fade"),
@@ -81,6 +82,7 @@ var stdin_default = defineComponent({
81
82
  } = props;
82
83
  if (isDef(message) && message !== "") {
83
84
  return type === "html" ? _createVNode("div", {
85
+ "key": 0,
84
86
  "class": bem("text"),
85
87
  "innerHTML": String(message)
86
88
  }, null) : _createVNode("div", {
@@ -16,11 +16,10 @@ export declare type UploaderFileListItem = {
16
16
  beforeDelete?: Interceptor;
17
17
  };
18
18
  export declare type UploaderMaxSize = number | string | ((file: File) => boolean);
19
- declare type PromiseOrNot<T> = T | Promise<T>;
20
19
  export declare type UploaderBeforeRead = (file: File | File[], detail: {
21
20
  name: string | number;
22
21
  index: number;
23
- }) => PromiseOrNot<File | File[] | undefined>;
22
+ }) => boolean | undefined | Promise<File | File[] | undefined>;
24
23
  export declare type UploaderAfterRead = (items: UploaderFileListItem | UploaderFileListItem[], detail: {
25
24
  name: string | number;
26
25
  index: number;
@@ -30,4 +29,3 @@ export declare type UploaderExpose = {
30
29
  closeImagePreview: () => void;
31
30
  };
32
31
  export declare type UploaderInstance = ComponentPublicInstance<UploaderProps, UploaderExpose>;
33
- export {};
@@ -1,4 +1,4 @@
1
- export declare type Interceptor = (...args: any[]) => Promise<boolean> | boolean | undefined;
1
+ export declare type Interceptor = (...args: any[]) => Promise<boolean> | boolean | undefined | void;
2
2
  export declare function callInterceptor(interceptor: Interceptor | undefined, { args, done, canceled, }: {
3
3
  args?: unknown[];
4
4
  done: () => void;
@@ -1,34 +1,34 @@
1
- var __create = Object.create;
2
1
  var __defProp = Object.defineProperty;
3
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
5
  var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
6
  var __export = (target, all) => {
9
- __markAsModule(target);
10
7
  for (var name2 in all)
11
8
  __defProp(target, name2, { get: all[name2], enumerable: true });
12
9
  };
13
- var __reExport = (target, module2, desc) => {
10
+ var __reExport = (target, module2, copyDefault, desc) => {
14
11
  if (module2 && typeof module2 === "object" || typeof module2 === "function") {
15
12
  for (let key of __getOwnPropNames(module2))
16
- if (!__hasOwnProp.call(target, key) && key !== "default")
13
+ if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
17
14
  __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
18
15
  }
19
16
  return target;
20
17
  };
21
- var __toModule = (module2) => {
22
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
23
- };
24
- __export(exports, {
18
+ var __toCommonJS = /* @__PURE__ */ ((cache) => {
19
+ return (module2, temp) => {
20
+ return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
21
+ };
22
+ })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
23
+ var stdin_exports = {};
24
+ __export(stdin_exports, {
25
25
  ACTION_BAR_KEY: () => ACTION_BAR_KEY,
26
26
  default: () => stdin_default
27
27
  });
28
- var import_vue = __toModule(require("vue"));
29
- var import_vue2 = __toModule(require("vue"));
30
- var import_utils = __toModule(require("../utils"));
31
- var import_use = __toModule(require("@vant/use"));
28
+ var import_vue = require("vue");
29
+ var import_vue2 = require("vue");
30
+ var import_utils = require("../utils");
31
+ var import_use = require("@vant/use");
32
32
  const [name, bem] = (0, import_utils.createNamespace)("action-bar");
33
33
  const ACTION_BAR_KEY = Symbol(name);
34
34
  const actionBarProps = {
@@ -54,3 +54,4 @@ var stdin_default = (0, import_vue2.defineComponent)({
54
54
  };
55
55
  }
56
56
  });
57
+ module.exports = __toCommonJS(stdin_exports);
@@ -6,26 +6,32 @@ var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
8
  var __export = (target, all) => {
9
- __markAsModule(target);
10
9
  for (var name in all)
11
10
  __defProp(target, name, { get: all[name], enumerable: true });
12
11
  };
13
- var __reExport = (target, module2, desc) => {
12
+ var __reExport = (target, module2, copyDefault, desc) => {
14
13
  if (module2 && typeof module2 === "object" || typeof module2 === "function") {
15
14
  for (let key of __getOwnPropNames(module2))
16
- if (!__hasOwnProp.call(target, key) && key !== "default")
15
+ if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
17
16
  __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
18
17
  }
19
18
  return target;
20
19
  };
21
- var __toModule = (module2) => {
22
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
20
+ var __toESM = (module2, isNodeMode) => {
21
+ return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
23
22
  };
24
- __export(exports, {
23
+ var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
+ return (module2, temp) => {
25
+ return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
+ };
27
+ })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
+ var stdin_exports = {};
29
+ __export(stdin_exports, {
25
30
  ActionBar: () => ActionBar,
26
31
  default: () => stdin_default
27
32
  });
28
- var import_utils = __toModule(require("../utils"));
29
- var import_ActionBar = __toModule(require("./ActionBar"));
33
+ var import_utils = require("../utils");
34
+ var import_ActionBar = __toESM(require("./ActionBar"));
30
35
  const ActionBar = (0, import_utils.withInstall)(import_ActionBar.default);
31
36
  var stdin_default = ActionBar;
37
+ module.exports = __toCommonJS(stdin_exports);
@@ -1,37 +1,37 @@
1
- var __create = Object.create;
2
1
  var __defProp = Object.defineProperty;
3
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
5
  var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
6
  var __export = (target, all) => {
9
- __markAsModule(target);
10
7
  for (var name2 in all)
11
8
  __defProp(target, name2, { get: all[name2], enumerable: true });
12
9
  };
13
- var __reExport = (target, module2, desc) => {
10
+ var __reExport = (target, module2, copyDefault, desc) => {
14
11
  if (module2 && typeof module2 === "object" || typeof module2 === "function") {
15
12
  for (let key of __getOwnPropNames(module2))
16
- if (!__hasOwnProp.call(target, key) && key !== "default")
13
+ if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
17
14
  __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
18
15
  }
19
16
  return target;
20
17
  };
21
- var __toModule = (module2) => {
22
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
23
- };
24
- __export(exports, {
18
+ var __toCommonJS = /* @__PURE__ */ ((cache) => {
19
+ return (module2, temp) => {
20
+ return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
21
+ };
22
+ })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
23
+ var stdin_exports = {};
24
+ __export(stdin_exports, {
25
25
  default: () => stdin_default
26
26
  });
27
- var import_vue = __toModule(require("vue"));
28
- var import_vue2 = __toModule(require("vue"));
29
- var import_utils = __toModule(require("../utils"));
30
- var import_ActionBar = __toModule(require("../action-bar/ActionBar"));
31
- var import_use = __toModule(require("@vant/use"));
32
- var import_use_expose = __toModule(require("../composables/use-expose"));
33
- var import_use_route = __toModule(require("../composables/use-route"));
34
- var import_button = __toModule(require("../button"));
27
+ var import_vue = require("vue");
28
+ var import_vue2 = require("vue");
29
+ var import_utils = require("../utils");
30
+ var import_ActionBar = require("../action-bar/ActionBar");
31
+ var import_use = require("@vant/use");
32
+ var import_use_expose = require("../composables/use-expose");
33
+ var import_use_route = require("../composables/use-route");
34
+ var import_button = require("../button");
35
35
  const [name, bem] = (0, import_utils.createNamespace)("action-bar-button");
36
36
  const actionBarButtonProps = (0, import_utils.extend)({}, import_use_route.routeProps, {
37
37
  type: String,
@@ -94,3 +94,4 @@ var stdin_default = (0, import_vue2.defineComponent)({
94
94
  };
95
95
  }
96
96
  });
97
+ module.exports = __toCommonJS(stdin_exports);
@@ -6,26 +6,32 @@ var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
8
  var __export = (target, all) => {
9
- __markAsModule(target);
10
9
  for (var name in all)
11
10
  __defProp(target, name, { get: all[name], enumerable: true });
12
11
  };
13
- var __reExport = (target, module2, desc) => {
12
+ var __reExport = (target, module2, copyDefault, desc) => {
14
13
  if (module2 && typeof module2 === "object" || typeof module2 === "function") {
15
14
  for (let key of __getOwnPropNames(module2))
16
- if (!__hasOwnProp.call(target, key) && key !== "default")
15
+ if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
17
16
  __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
18
17
  }
19
18
  return target;
20
19
  };
21
- var __toModule = (module2) => {
22
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
20
+ var __toESM = (module2, isNodeMode) => {
21
+ return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
23
22
  };
24
- __export(exports, {
23
+ var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
+ return (module2, temp) => {
25
+ return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
+ };
27
+ })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
+ var stdin_exports = {};
29
+ __export(stdin_exports, {
25
30
  ActionBarButton: () => ActionBarButton,
26
31
  default: () => stdin_default
27
32
  });
28
- var import_utils = __toModule(require("../utils"));
29
- var import_ActionBarButton = __toModule(require("./ActionBarButton"));
33
+ var import_utils = require("../utils");
34
+ var import_ActionBarButton = __toESM(require("./ActionBarButton"));
30
35
  const ActionBarButton = (0, import_utils.withInstall)(import_ActionBarButton.default);
31
36
  var stdin_default = ActionBarButton;
37
+ module.exports = __toCommonJS(stdin_exports);
@@ -1,37 +1,37 @@
1
- var __create = Object.create;
2
1
  var __defProp = Object.defineProperty;
3
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
5
  var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
6
  var __export = (target, all) => {
9
- __markAsModule(target);
10
7
  for (var name2 in all)
11
8
  __defProp(target, name2, { get: all[name2], enumerable: true });
12
9
  };
13
- var __reExport = (target, module2, desc) => {
10
+ var __reExport = (target, module2, copyDefault, desc) => {
14
11
  if (module2 && typeof module2 === "object" || typeof module2 === "function") {
15
12
  for (let key of __getOwnPropNames(module2))
16
- if (!__hasOwnProp.call(target, key) && key !== "default")
13
+ if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
17
14
  __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
18
15
  }
19
16
  return target;
20
17
  };
21
- var __toModule = (module2) => {
22
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
23
- };
24
- __export(exports, {
18
+ var __toCommonJS = /* @__PURE__ */ ((cache) => {
19
+ return (module2, temp) => {
20
+ return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
21
+ };
22
+ })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
23
+ var stdin_exports = {};
24
+ __export(stdin_exports, {
25
25
  default: () => stdin_default
26
26
  });
27
- var import_vue = __toModule(require("vue"));
28
- var import_vue2 = __toModule(require("vue"));
29
- var import_utils = __toModule(require("../utils"));
30
- var import_ActionBar = __toModule(require("../action-bar/ActionBar"));
31
- var import_use = __toModule(require("@vant/use"));
32
- var import_use_route = __toModule(require("../composables/use-route"));
33
- var import_icon = __toModule(require("../icon"));
34
- var import_badge = __toModule(require("../badge"));
27
+ var import_vue = require("vue");
28
+ var import_vue2 = require("vue");
29
+ var import_utils = require("../utils");
30
+ var import_ActionBar = require("../action-bar/ActionBar");
31
+ var import_use = require("@vant/use");
32
+ var import_use_route = require("../composables/use-route");
33
+ var import_icon = require("../icon");
34
+ var import_badge = require("../badge");
35
35
  const [name, bem] = (0, import_utils.createNamespace)("action-bar-icon");
36
36
  const actionBarIconProps = (0, import_utils.extend)({}, import_use_route.routeProps, {
37
37
  dot: Boolean,
@@ -89,3 +89,4 @@ var stdin_default = (0, import_vue2.defineComponent)({
89
89
  }, [renderIcon(), slots.default ? slots.default() : props.text]);
90
90
  }
91
91
  });
92
+ module.exports = __toCommonJS(stdin_exports);