vant 4.9.0 → 4.9.2

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 (80) hide show
  1. package/README.md +5 -4
  2. package/es/action-bar-button/ActionBarButton.d.ts +3 -3
  3. package/es/action-bar-button/index.d.ts +2 -2
  4. package/es/action-bar-icon/ActionBarIcon.d.ts +3 -3
  5. package/es/action-bar-icon/index.d.ts +2 -2
  6. package/es/address-list/AddressList.d.ts +13 -13
  7. package/es/address-list/AddressList.mjs +20 -4
  8. package/es/address-list/AddressListItem.d.ts +3 -0
  9. package/es/address-list/AddressListItem.mjs +19 -7
  10. package/es/address-list/index.d.ts +2 -2
  11. package/es/address-list/style/index.mjs +1 -0
  12. package/es/area/utils.mjs +3 -3
  13. package/es/button/Button.d.ts +3 -3
  14. package/es/button/index.d.ts +2 -2
  15. package/es/card/Card.mjs +3 -3
  16. package/es/cell/Cell.d.ts +3 -3
  17. package/es/cell/index.d.ts +2 -2
  18. package/es/composables/use-route.d.ts +1 -2
  19. package/es/floating-panel/FloatingPanel.mjs +11 -5
  20. package/es/form/Form.d.ts +3 -0
  21. package/es/form/Form.mjs +9 -2
  22. package/es/form/index.d.ts +2 -0
  23. package/es/grid-item/GridItem.d.ts +3 -3
  24. package/es/grid-item/index.d.ts +2 -2
  25. package/es/index.d.ts +1 -1
  26. package/es/index.mjs +1 -1
  27. package/es/notify/types.d.ts +3 -0
  28. package/es/sidebar-item/SidebarItem.d.ts +3 -3
  29. package/es/sidebar-item/index.d.ts +2 -2
  30. package/es/stepper/Stepper.mjs +1 -0
  31. package/es/tab/Tab.d.ts +3 -3
  32. package/es/tab/index.d.ts +2 -2
  33. package/es/tabbar-item/TabbarItem.d.ts +3 -3
  34. package/es/tabbar-item/index.d.ts +2 -2
  35. package/es/tabs/index.css +1 -1
  36. package/es/tabs/utils.mjs +3 -1
  37. package/es/uploader/index.d.ts +1 -1
  38. package/lib/action-bar-button/ActionBarButton.d.ts +3 -3
  39. package/lib/action-bar-button/index.d.ts +2 -2
  40. package/lib/action-bar-icon/ActionBarIcon.d.ts +3 -3
  41. package/lib/action-bar-icon/index.d.ts +2 -2
  42. package/lib/address-list/AddressList.d.ts +13 -13
  43. package/lib/address-list/AddressList.js +19 -3
  44. package/lib/address-list/AddressListItem.d.ts +3 -0
  45. package/lib/address-list/AddressListItem.js +19 -7
  46. package/lib/address-list/index.d.ts +2 -2
  47. package/lib/address-list/style/index.js +1 -0
  48. package/lib/area/utils.js +3 -3
  49. package/lib/button/Button.d.ts +3 -3
  50. package/lib/button/index.d.ts +2 -2
  51. package/lib/card/Card.js +2 -2
  52. package/lib/cell/Cell.d.ts +3 -3
  53. package/lib/cell/index.d.ts +2 -2
  54. package/lib/composables/use-route.d.ts +1 -2
  55. package/lib/floating-panel/FloatingPanel.js +11 -5
  56. package/lib/form/Form.d.ts +3 -0
  57. package/lib/form/Form.js +9 -2
  58. package/lib/form/index.d.ts +2 -0
  59. package/lib/grid-item/GridItem.d.ts +3 -3
  60. package/lib/grid-item/index.d.ts +2 -2
  61. package/lib/index.css +1 -1
  62. package/lib/index.d.ts +1 -1
  63. package/lib/index.js +1 -1
  64. package/lib/notify/types.d.ts +3 -0
  65. package/lib/sidebar-item/SidebarItem.d.ts +3 -3
  66. package/lib/sidebar-item/index.d.ts +2 -2
  67. package/lib/stepper/Stepper.js +1 -0
  68. package/lib/tab/Tab.d.ts +3 -3
  69. package/lib/tab/index.d.ts +2 -2
  70. package/lib/tabbar-item/TabbarItem.d.ts +3 -3
  71. package/lib/tabbar-item/index.d.ts +2 -2
  72. package/lib/tabs/index.css +1 -1
  73. package/lib/tabs/utils.js +3 -1
  74. package/lib/uploader/index.d.ts +1 -1
  75. package/lib/vant.cjs.js +342 -300
  76. package/lib/vant.es.js +342 -300
  77. package/lib/vant.js +344 -302
  78. package/lib/vant.min.js +3 -3
  79. package/lib/web-types.json +1 -1
  80. package/package.json +15 -15
package/README.md CHANGED
@@ -17,7 +17,7 @@
17
17
   
18
18
  ·
19
19
   
20
- <a href="https://vant-ui.github.io/vant">文档站</a>
20
+ <a href="https://vant.pro/vant/">Documentation (backup)</a>
21
21
  &nbsp;
22
22
  ·
23
23
  &nbsp;
@@ -98,7 +98,7 @@ const app = createApp();
98
98
  app.use(Button);
99
99
  ```
100
100
 
101
- See more in [Quickstart](https://vant-ui.github.io/vant#/en-US/quickstart).
101
+ See more in [Quickstart](https://vant-ui.github.io/vant/#/en-US/quickstart).
102
102
 
103
103
  ## Browser Support
104
104
 
@@ -133,8 +133,9 @@ Vant 3/4 supports modern browsers and Chrome >= 51、iOS >= 10.0 (same as Vue 3)
133
133
 
134
134
  ## Links
135
135
 
136
- - [Documentation](https://vant-ui.github.io/vant)
137
- - [Changelog](https://vant-ui.github.io/vant#/en-US/changelog)
136
+ - [Documentation](https://vant-ui.github.io/vant/)
137
+ - [Documentation (backup)](https://vant.pro/vant/)
138
+ - [Changelog](https://vant-ui.github.io/vant/#/en-US/changelog)
138
139
  - [Discussions](https://github.com/vant-ui/vant/discussions)
139
140
 
140
141
  ## Preview
@@ -1,7 +1,7 @@
1
1
  import { type PropType, type ExtractPropTypes } from 'vue';
2
2
  import { ButtonType } from '../button';
3
3
  export declare const actionBarButtonProps: {
4
- to: PropType<import("vue-router").RouteLocationRaw>;
4
+ to: PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
5
5
  url: StringConstructor;
6
6
  replace: BooleanConstructor;
7
7
  } & {
@@ -14,7 +14,7 @@ export declare const actionBarButtonProps: {
14
14
  };
15
15
  export type ActionBarButtonProps = ExtractPropTypes<typeof actionBarButtonProps>;
16
16
  declare const _default: import("vue").DefineComponent<{
17
- to: PropType<import("vue-router").RouteLocationRaw>;
17
+ to: PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
18
18
  url: StringConstructor;
19
19
  replace: BooleanConstructor;
20
20
  } & {
@@ -25,7 +25,7 @@ declare const _default: import("vue").DefineComponent<{
25
25
  loading: BooleanConstructor;
26
26
  disabled: BooleanConstructor;
27
27
  }, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ExtractPropTypes<{
28
- to: PropType<import("vue-router").RouteLocationRaw>;
28
+ to: PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
29
29
  url: StringConstructor;
30
30
  replace: BooleanConstructor;
31
31
  } & {
@@ -1,5 +1,5 @@
1
1
  export declare const ActionBarButton: import("../utils").WithInstall<import("vue").DefineComponent<{
2
- to: import("vue").PropType<import("vue-router").RouteLocationRaw>;
2
+ to: import("vue").PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
3
3
  url: StringConstructor;
4
4
  replace: BooleanConstructor;
5
5
  } & {
@@ -10,7 +10,7 @@ export declare const ActionBarButton: import("../utils").WithInstall<import("vue
10
10
  loading: BooleanConstructor;
11
11
  disabled: BooleanConstructor;
12
12
  }, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
13
- to: import("vue").PropType<import("vue-router").RouteLocationRaw>;
13
+ to: import("vue").PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
14
14
  url: StringConstructor;
15
15
  replace: BooleanConstructor;
16
16
  } & {
@@ -1,7 +1,7 @@
1
1
  import { type PropType, type ExtractPropTypes } from 'vue';
2
2
  import { type BadgeProps } from '../badge';
3
3
  export declare const actionBarIconProps: {
4
- to: PropType<import("vue-router").RouteLocationRaw>;
4
+ to: PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
5
5
  url: StringConstructor;
6
6
  replace: BooleanConstructor;
7
7
  } & {
@@ -16,7 +16,7 @@ export declare const actionBarIconProps: {
16
16
  };
17
17
  export type ActionBarIconProps = ExtractPropTypes<typeof actionBarIconProps>;
18
18
  declare const _default: import("vue").DefineComponent<{
19
- to: PropType<import("vue-router").RouteLocationRaw>;
19
+ to: PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
20
20
  url: StringConstructor;
21
21
  replace: BooleanConstructor;
22
22
  } & {
@@ -29,7 +29,7 @@ declare const _default: import("vue").DefineComponent<{
29
29
  badgeProps: PropType<Partial<BadgeProps>>;
30
30
  iconPrefix: StringConstructor;
31
31
  }, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ExtractPropTypes<{
32
- to: PropType<import("vue-router").RouteLocationRaw>;
32
+ to: PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
33
33
  url: StringConstructor;
34
34
  replace: BooleanConstructor;
35
35
  } & {
@@ -1,5 +1,5 @@
1
1
  export declare const ActionBarIcon: import("../utils").WithInstall<import("vue").DefineComponent<{
2
- to: import("vue").PropType<import("vue-router").RouteLocationRaw>;
2
+ to: import("vue").PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
3
3
  url: StringConstructor;
4
4
  replace: BooleanConstructor;
5
5
  } & {
@@ -12,7 +12,7 @@ export declare const ActionBarIcon: import("../utils").WithInstall<import("vue")
12
12
  badgeProps: import("vue").PropType<Partial<import("..").BadgeProps>>;
13
13
  iconPrefix: StringConstructor;
14
14
  }, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
15
- to: import("vue").PropType<import("vue-router").RouteLocationRaw>;
15
+ to: import("vue").PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
16
16
  url: StringConstructor;
17
17
  replace: BooleanConstructor;
18
18
  } & {
@@ -1,18 +1,18 @@
1
- import { type ExtractPropTypes } from 'vue';
1
+ import { type ExtractPropTypes, type PropType } from 'vue';
2
2
  import { AddressListAddress } from './AddressListItem';
3
3
  export declare const addressListProps: {
4
4
  list: {
5
- type: import("vue").PropType<AddressListAddress[]>;
5
+ type: PropType<AddressListAddress[]>;
6
6
  default: () => never[];
7
7
  };
8
- modelValue: (NumberConstructor | StringConstructor)[];
8
+ modelValue: PropType<string | number | (string | number)[]>;
9
9
  switchable: {
10
10
  type: BooleanConstructor;
11
11
  default: true;
12
12
  };
13
13
  disabledText: StringConstructor;
14
14
  disabledList: {
15
- type: import("vue").PropType<AddressListAddress[]>;
15
+ type: PropType<AddressListAddress[]>;
16
16
  default: () => never[];
17
17
  };
18
18
  showAddButton: {
@@ -22,24 +22,24 @@ export declare const addressListProps: {
22
22
  addButtonText: StringConstructor;
23
23
  defaultTagText: StringConstructor;
24
24
  rightIcon: {
25
- type: import("vue").PropType<string>;
25
+ type: PropType<string>;
26
26
  default: string;
27
27
  };
28
28
  };
29
29
  export type AddressListProps = ExtractPropTypes<typeof addressListProps>;
30
30
  declare const _default: import("vue").DefineComponent<{
31
31
  list: {
32
- type: import("vue").PropType<AddressListAddress[]>;
32
+ type: PropType<AddressListAddress[]>;
33
33
  default: () => never[];
34
34
  };
35
- modelValue: (NumberConstructor | StringConstructor)[];
35
+ modelValue: PropType<string | number | (string | number)[]>;
36
36
  switchable: {
37
37
  type: BooleanConstructor;
38
38
  default: true;
39
39
  };
40
40
  disabledText: StringConstructor;
41
41
  disabledList: {
42
- type: import("vue").PropType<AddressListAddress[]>;
42
+ type: PropType<AddressListAddress[]>;
43
43
  default: () => never[];
44
44
  };
45
45
  showAddButton: {
@@ -49,22 +49,22 @@ declare const _default: import("vue").DefineComponent<{
49
49
  addButtonText: StringConstructor;
50
50
  defaultTagText: StringConstructor;
51
51
  rightIcon: {
52
- type: import("vue").PropType<string>;
52
+ type: PropType<string>;
53
53
  default: string;
54
54
  };
55
55
  }, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "add" | "update:modelValue" | "edit" | "clickItem" | "editDisabled" | "selectDisabled")[], "select" | "add" | "update:modelValue" | "edit" | "clickItem" | "editDisabled" | "selectDisabled", import("vue").PublicProps, Readonly<ExtractPropTypes<{
56
56
  list: {
57
- type: import("vue").PropType<AddressListAddress[]>;
57
+ type: PropType<AddressListAddress[]>;
58
58
  default: () => never[];
59
59
  };
60
- modelValue: (NumberConstructor | StringConstructor)[];
60
+ modelValue: PropType<string | number | (string | number)[]>;
61
61
  switchable: {
62
62
  type: BooleanConstructor;
63
63
  default: true;
64
64
  };
65
65
  disabledText: StringConstructor;
66
66
  disabledList: {
67
- type: import("vue").PropType<AddressListAddress[]>;
67
+ type: PropType<AddressListAddress[]>;
68
68
  default: () => never[];
69
69
  };
70
70
  showAddButton: {
@@ -74,7 +74,7 @@ declare const _default: import("vue").DefineComponent<{
74
74
  addButtonText: StringConstructor;
75
75
  defaultTagText: StringConstructor;
76
76
  rightIcon: {
77
- type: import("vue").PropType<string>;
77
+ type: PropType<string>;
78
78
  default: string;
79
79
  };
80
80
  }>> & {
@@ -1,13 +1,14 @@
1
1
  import { createVNode as _createVNode } from "vue";
2
- import { defineComponent } from "vue";
2
+ import { defineComponent, computed } from "vue";
3
3
  import { truthProp, numericProp, makeArrayProp, createNamespace, makeStringProp } from "../utils/index.mjs";
4
4
  import { Button } from "../button/index.mjs";
5
5
  import { RadioGroup } from "../radio-group/index.mjs";
6
+ import { CheckboxGroup } from "../checkbox-group/index.mjs";
6
7
  import AddressListItem from "./AddressListItem.mjs";
7
8
  const [name, bem, t] = createNamespace("address-list");
8
9
  const addressListProps = {
9
10
  list: makeArrayProp(),
10
- modelValue: numericProp,
11
+ modelValue: [...numericProp, Array],
11
12
  switchable: truthProp,
12
13
  disabledText: String,
13
14
  disabledList: makeArrayProp(),
@@ -24,6 +25,7 @@ var stdin_default = defineComponent({
24
25
  slots,
25
26
  emit
26
27
  }) {
28
+ const singleChoice = computed(() => !Array.isArray(props.modelValue));
27
29
  const renderItem = (item, index, disabled) => {
28
30
  const onEdit = () => emit(disabled ? "editDisabled" : "edit", item, index);
29
31
  const onClick = (event) => emit("clickItem", item, index, {
@@ -32,7 +34,16 @@ var stdin_default = defineComponent({
32
34
  const onSelect = () => {
33
35
  emit(disabled ? "selectDisabled" : "select", item, index);
34
36
  if (!disabled) {
35
- emit("update:modelValue", item.id);
37
+ if (singleChoice.value) {
38
+ emit("update:modelValue", item.id);
39
+ } else {
40
+ const value = props.modelValue;
41
+ if (value.includes(item.id)) {
42
+ emit("update:modelValue", value.filter((id) => id !== item.id));
43
+ } else {
44
+ emit("update:modelValue", [...value, item.id]);
45
+ }
46
+ }
36
47
  }
37
48
  };
38
49
  return _createVNode(AddressListItem, {
@@ -40,6 +51,7 @@ var stdin_default = defineComponent({
40
51
  "address": item,
41
52
  "disabled": disabled,
42
53
  "switchable": props.switchable,
54
+ "singleChoice": singleChoice.value,
43
55
  "defaultTagText": props.defaultTagText,
44
56
  "rightIcon": props.rightIcon,
45
57
  "onEdit": onEdit,
@@ -74,7 +86,11 @@ var stdin_default = defineComponent({
74
86
  }, [props.disabledText]);
75
87
  return _createVNode("div", {
76
88
  "class": bem()
77
- }, [(_a = slots.top) == null ? void 0 : _a.call(slots), _createVNode(RadioGroup, {
89
+ }, [(_a = slots.top) == null ? void 0 : _a.call(slots), !singleChoice.value && Array.isArray(props.modelValue) ? _createVNode(CheckboxGroup, {
90
+ "modelValue": props.modelValue
91
+ }, {
92
+ default: () => [List]
93
+ }) : _createVNode(RadioGroup, {
78
94
  "modelValue": props.modelValue
79
95
  }, {
80
96
  default: () => [List]
@@ -14,6 +14,7 @@ declare const _default: import("vue").DefineComponent<{
14
14
  };
15
15
  disabled: BooleanConstructor;
16
16
  switchable: BooleanConstructor;
17
+ singleChoice: BooleanConstructor;
17
18
  defaultTagText: StringConstructor;
18
19
  rightIcon: {
19
20
  type: PropType<string>;
@@ -26,6 +27,7 @@ declare const _default: import("vue").DefineComponent<{
26
27
  };
27
28
  disabled: BooleanConstructor;
28
29
  switchable: BooleanConstructor;
30
+ singleChoice: BooleanConstructor;
29
31
  defaultTagText: StringConstructor;
30
32
  rightIcon: {
31
33
  type: PropType<string>;
@@ -39,5 +41,6 @@ declare const _default: import("vue").DefineComponent<{
39
41
  disabled: boolean;
40
42
  rightIcon: string;
41
43
  switchable: boolean;
44
+ singleChoice: boolean;
42
45
  }, {}>;
43
46
  export default _default;
@@ -5,6 +5,7 @@ import { Tag } from "../tag/index.mjs";
5
5
  import { Icon } from "../icon/index.mjs";
6
6
  import { Cell } from "../cell/index.mjs";
7
7
  import { Radio } from "../radio/index.mjs";
8
+ import { Checkbox } from "../checkbox/index.mjs";
8
9
  const [name, bem] = createNamespace("address-item");
9
10
  var stdin_default = defineComponent({
10
11
  name,
@@ -12,6 +13,7 @@ var stdin_default = defineComponent({
12
13
  address: makeRequiredProp(Object),
13
14
  disabled: Boolean,
14
15
  switchable: Boolean,
16
+ singleChoice: Boolean,
15
17
  defaultTagText: String,
16
18
  rightIcon: makeStringProp("edit")
17
19
  },
@@ -53,7 +55,8 @@ var stdin_default = defineComponent({
53
55
  const {
54
56
  address,
55
57
  disabled,
56
- switchable
58
+ switchable,
59
+ singleChoice
57
60
  } = props;
58
61
  const Info = [_createVNode("div", {
59
62
  "class": bem("name")
@@ -61,12 +64,21 @@ var stdin_default = defineComponent({
61
64
  "class": bem("address")
62
65
  }, [address.address])];
63
66
  if (switchable && !disabled) {
64
- return _createVNode(Radio, {
65
- "name": address.id,
66
- "iconSize": 18
67
- }, {
68
- default: () => [Info]
69
- });
67
+ if (singleChoice) {
68
+ return _createVNode(Radio, {
69
+ "name": address.id,
70
+ "iconSize": 18
71
+ }, {
72
+ default: () => [Info]
73
+ });
74
+ } else {
75
+ return _createVNode(Checkbox, {
76
+ "name": address.id,
77
+ "iconSize": 18
78
+ }, {
79
+ default: () => [Info]
80
+ });
81
+ }
70
82
  }
71
83
  return Info;
72
84
  };
@@ -3,7 +3,7 @@ export declare const AddressList: import("../utils").WithInstall<import("vue").D
3
3
  type: import("vue").PropType<import("./AddressListItem").AddressListAddress[]>;
4
4
  default: () => never[];
5
5
  };
6
- modelValue: (NumberConstructor | StringConstructor)[];
6
+ modelValue: import("vue").PropType<string | number | (string | number)[]>;
7
7
  switchable: {
8
8
  type: BooleanConstructor;
9
9
  default: true;
@@ -28,7 +28,7 @@ export declare const AddressList: import("../utils").WithInstall<import("vue").D
28
28
  type: import("vue").PropType<import("./AddressListItem").AddressListAddress[]>;
29
29
  default: () => never[];
30
30
  };
31
- modelValue: (NumberConstructor | StringConstructor)[];
31
+ modelValue: import("vue").PropType<string | number | (string | number)[]>;
32
32
  switchable: {
33
33
  type: BooleanConstructor;
34
34
  default: true;
@@ -6,6 +6,7 @@ import "../../cell/index.css";
6
6
  import "../../loading/index.css";
7
7
  import "../../button/index.css";
8
8
  import "../../radio-group/index.css";
9
+ import "../../checkbox-group/index.css";
9
10
  import "../../checkbox/index.css";
10
11
  import "../../radio/index.css";
11
12
  import "../index.css";
package/es/area/utils.mjs CHANGED
@@ -36,9 +36,9 @@ function formatDataForCascade({
36
36
  const showCounty = +columnsNum > 2;
37
37
  const getProvinceChildren = () => {
38
38
  if (showCity) {
39
- return placeholder.length ? [
39
+ return placeholder.length > 1 ? [
40
40
  makeOption(
41
- placeholder[0],
41
+ placeholder[1],
42
42
  AREA_EMPTY_CODE,
43
43
  showCounty ? [] : void 0
44
44
  )
@@ -56,7 +56,7 @@ function formatDataForCascade({
56
56
  if (showCity) {
57
57
  const getCityChildren = () => {
58
58
  if (showCounty) {
59
- return placeholder.length ? [makeOption(placeholder[1])] : [];
59
+ return placeholder.length > 2 ? [makeOption(placeholder[2])] : [];
60
60
  }
61
61
  };
62
62
  Object.keys(city).forEach((code) => {
@@ -2,7 +2,7 @@ import { type PropType, type ExtractPropTypes } from 'vue';
2
2
  import { LoadingType } from '../loading';
3
3
  import { ButtonSize, ButtonType, ButtonNativeType, ButtonIconPosition } from './types';
4
4
  export declare const buttonProps: {
5
- to: PropType<import("vue-router").RouteLocationRaw>;
5
+ to: PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
6
6
  url: StringConstructor;
7
7
  replace: BooleanConstructor;
8
8
  } & {
@@ -43,7 +43,7 @@ export declare const buttonProps: {
43
43
  };
44
44
  export type ButtonProps = ExtractPropTypes<typeof buttonProps>;
45
45
  declare const _default: import("vue").DefineComponent<{
46
- to: PropType<import("vue-router").RouteLocationRaw>;
46
+ to: PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
47
47
  url: StringConstructor;
48
48
  replace: BooleanConstructor;
49
49
  } & {
@@ -82,7 +82,7 @@ declare const _default: import("vue").DefineComponent<{
82
82
  default: ButtonIconPosition;
83
83
  };
84
84
  }, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click"[], "click", import("vue").PublicProps, Readonly<ExtractPropTypes<{
85
- to: PropType<import("vue-router").RouteLocationRaw>;
85
+ to: PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
86
86
  url: StringConstructor;
87
87
  replace: BooleanConstructor;
88
88
  } & {
@@ -1,5 +1,5 @@
1
1
  export declare const Button: import("../utils").WithInstall<import("vue").DefineComponent<{
2
- to: import("vue").PropType<import("vue-router").RouteLocationRaw>;
2
+ to: import("vue").PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
3
3
  url: StringConstructor;
4
4
  replace: BooleanConstructor;
5
5
  } & {
@@ -38,7 +38,7 @@ export declare const Button: import("../utils").WithInstall<import("vue").Define
38
38
  default: import("./types").ButtonIconPosition;
39
39
  };
40
40
  }, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click"[], "click", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
41
- to: import("vue").PropType<import("vue-router").RouteLocationRaw>;
41
+ to: import("vue").PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
42
42
  url: StringConstructor;
43
43
  replace: BooleanConstructor;
44
44
  } & {
package/es/card/Card.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { createTextVNode as _createTextVNode, createVNode as _createVNode } from "vue";
1
+ import { createTextVNode as _createTextVNode, Fragment as _Fragment, createVNode as _createVNode } from "vue";
2
2
  import { defineComponent } from "vue";
3
3
  import { isDef, numericProp, makeStringProp, createNamespace } from "../utils/index.mjs";
4
4
  import { Tag } from "../tag/index.mjs";
@@ -84,9 +84,9 @@ var stdin_default = defineComponent({
84
84
  "class": bem("price-currency")
85
85
  }, [props.currency]), _createVNode("span", {
86
86
  "class": bem("price-integer")
87
- }, [priceArr[0]]), _createTextVNode("."), _createVNode("span", {
87
+ }, [priceArr[0]]), priceArr.length > 1 && _createVNode(_Fragment, null, [_createTextVNode("."), _createVNode("span", {
88
88
  "class": bem("price-decimal")
89
- }, [priceArr[1]])]);
89
+ }, [priceArr[1]])])]);
90
90
  };
91
91
  return () => {
92
92
  var _a, _b, _c;
package/es/cell/Cell.d.ts CHANGED
@@ -63,7 +63,7 @@ export declare const cellProps: {
63
63
  default: null;
64
64
  };
65
65
  } & {
66
- to: PropType<import("vue-router").RouteLocationRaw>;
66
+ to: PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
67
67
  url: StringConstructor;
68
68
  replace: BooleanConstructor;
69
69
  };
@@ -99,7 +99,7 @@ declare const _default: import("vue").DefineComponent<{
99
99
  default: null;
100
100
  };
101
101
  } & {
102
- to: PropType<import("vue-router").RouteLocationRaw>;
102
+ to: PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
103
103
  url: StringConstructor;
104
104
  replace: BooleanConstructor;
105
105
  }, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ExtractPropTypes<{
@@ -133,7 +133,7 @@ declare const _default: import("vue").DefineComponent<{
133
133
  default: null;
134
134
  };
135
135
  } & {
136
- to: PropType<import("vue-router").RouteLocationRaw>;
136
+ to: PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
137
137
  url: StringConstructor;
138
138
  replace: BooleanConstructor;
139
139
  }>>, {
@@ -29,7 +29,7 @@ export declare const Cell: import("../utils").WithInstall<import("vue").DefineCo
29
29
  default: null;
30
30
  };
31
31
  } & {
32
- to: import("vue").PropType<import("vue-router").RouteLocationRaw>;
32
+ to: import("vue").PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
33
33
  url: StringConstructor;
34
34
  replace: BooleanConstructor;
35
35
  }, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
@@ -63,7 +63,7 @@ export declare const Cell: import("../utils").WithInstall<import("vue").DefineCo
63
63
  default: null;
64
64
  };
65
65
  } & {
66
- to: import("vue").PropType<import("vue-router").RouteLocationRaw>;
66
+ to: import("vue").PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
67
67
  url: StringConstructor;
68
68
  replace: BooleanConstructor;
69
69
  }>>, {
@@ -2,9 +2,8 @@
2
2
  * Vue Router support
3
3
  */
4
4
  import { type PropType, type ExtractPropTypes, type ComponentPublicInstance } from 'vue';
5
- import type { RouteLocationRaw } from 'vue-router';
6
5
  export declare const routeProps: {
7
- to: PropType<RouteLocationRaw>;
6
+ to: PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
8
7
  url: StringConstructor;
9
8
  replace: BooleanConstructor;
10
9
  };
@@ -102,6 +102,16 @@ var stdin_default = defineComponent({
102
102
  useEventListener("touchmove", onTouchmove, {
103
103
  target: rootRef
104
104
  });
105
+ const renderHeader = () => {
106
+ if (slots.header) {
107
+ return slots.header();
108
+ }
109
+ return _createVNode("div", {
110
+ "class": bem("header")
111
+ }, [_createVNode("div", {
112
+ "class": bem("header-bar")
113
+ }, null)]);
114
+ };
105
115
  return () => {
106
116
  var _a;
107
117
  return _createVNode("div", {
@@ -113,11 +123,7 @@ var stdin_default = defineComponent({
113
123
  "onTouchstartPassive": onTouchstart,
114
124
  "onTouchend": onTouchend,
115
125
  "onTouchcancel": onTouchend
116
- }, [_createVNode("div", {
117
- "class": bem("header")
118
- }, [_createVNode("div", {
119
- "class": bem("header-bar")
120
- }, null)]), _createVNode("div", {
126
+ }, [renderHeader(), _createVNode("div", {
121
127
  "class": bem("content"),
122
128
  "ref": contentRef
123
129
  }, [(_a = slots.default) == null ? void 0 : _a.call(slots)])]);
package/es/form/Form.d.ts CHANGED
@@ -10,6 +10,7 @@ export declare const formProps: {
10
10
  labelAlign: PropType<FieldTextAlign>;
11
11
  inputAlign: PropType<FieldTextAlign>;
12
12
  scrollToError: BooleanConstructor;
13
+ scrollToErrorPosition: PropType<ScrollLogicalPosition>;
13
14
  validateFirst: BooleanConstructor;
14
15
  submitOnEnter: {
15
16
  type: BooleanConstructor;
@@ -36,6 +37,7 @@ declare const _default: import("vue").DefineComponent<{
36
37
  labelAlign: PropType<FieldTextAlign>;
37
38
  inputAlign: PropType<FieldTextAlign>;
38
39
  scrollToError: BooleanConstructor;
40
+ scrollToErrorPosition: PropType<ScrollLogicalPosition>;
39
41
  validateFirst: BooleanConstructor;
40
42
  submitOnEnter: {
41
43
  type: BooleanConstructor;
@@ -60,6 +62,7 @@ declare const _default: import("vue").DefineComponent<{
60
62
  labelAlign: PropType<FieldTextAlign>;
61
63
  inputAlign: PropType<FieldTextAlign>;
62
64
  scrollToError: BooleanConstructor;
65
+ scrollToErrorPosition: PropType<ScrollLogicalPosition>;
63
66
  validateFirst: BooleanConstructor;
64
67
  submitOnEnter: {
65
68
  type: BooleanConstructor;
package/es/form/Form.mjs CHANGED
@@ -14,6 +14,7 @@ const formProps = {
14
14
  labelAlign: String,
15
15
  inputAlign: String,
16
16
  scrollToError: Boolean,
17
+ scrollToErrorPosition: String,
17
18
  validateFirst: Boolean,
18
19
  submitOnEnter: truthProp,
19
20
  showErrorMessage: truthProp,
@@ -127,8 +128,14 @@ var stdin_default = defineComponent({
127
128
  values,
128
129
  errors
129
130
  });
130
- if (props.scrollToError && errors[0].name) {
131
- scrollToField(errors[0].name);
131
+ const {
132
+ scrollToError,
133
+ scrollToErrorPosition
134
+ } = props;
135
+ if (scrollToError && errors[0].name) {
136
+ scrollToField(errors[0].name, scrollToErrorPosition ? {
137
+ block: scrollToErrorPosition
138
+ } : void 0);
132
139
  }
133
140
  });
134
141
  };
@@ -9,6 +9,7 @@ export declare const Form: import("../utils").WithInstall<import("vue").DefineCo
9
9
  labelAlign: import("vue").PropType<import("..").FieldTextAlign>;
10
10
  inputAlign: import("vue").PropType<import("..").FieldTextAlign>;
11
11
  scrollToError: BooleanConstructor;
12
+ scrollToErrorPosition: import("vue").PropType<ScrollLogicalPosition>;
12
13
  validateFirst: BooleanConstructor;
13
14
  submitOnEnter: {
14
15
  type: BooleanConstructor;
@@ -33,6 +34,7 @@ export declare const Form: import("../utils").WithInstall<import("vue").DefineCo
33
34
  labelAlign: import("vue").PropType<import("..").FieldTextAlign>;
34
35
  inputAlign: import("vue").PropType<import("..").FieldTextAlign>;
35
36
  scrollToError: BooleanConstructor;
37
+ scrollToErrorPosition: import("vue").PropType<ScrollLogicalPosition>;
36
38
  validateFirst: BooleanConstructor;
37
39
  submitOnEnter: {
38
40
  type: BooleanConstructor;
@@ -1,7 +1,7 @@
1
1
  import { type PropType, type ExtractPropTypes } from 'vue';
2
2
  import { type BadgeProps } from '../badge';
3
3
  export declare const gridItemProps: {
4
- to: PropType<import("vue-router").RouteLocationRaw>;
4
+ to: PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
5
5
  url: StringConstructor;
6
6
  replace: BooleanConstructor;
7
7
  } & {
@@ -15,7 +15,7 @@ export declare const gridItemProps: {
15
15
  };
16
16
  export type GridItemProps = ExtractPropTypes<typeof gridItemProps>;
17
17
  declare const _default: import("vue").DefineComponent<{
18
- to: PropType<import("vue-router").RouteLocationRaw>;
18
+ to: PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
19
19
  url: StringConstructor;
20
20
  replace: BooleanConstructor;
21
21
  } & {
@@ -27,7 +27,7 @@ declare const _default: import("vue").DefineComponent<{
27
27
  iconPrefix: StringConstructor;
28
28
  badgeProps: PropType<Partial<BadgeProps>>;
29
29
  }, (() => import("vue/jsx-runtime").JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ExtractPropTypes<{
30
- to: PropType<import("vue-router").RouteLocationRaw>;
30
+ to: PropType<string | import("vue-router").RouteLocationAsRelativeGeneric | import("vue-router").RouteLocationAsPathGeneric>;
31
31
  url: StringConstructor;
32
32
  replace: BooleanConstructor;
33
33
  } & {