vant 4.6.2 → 4.6.3

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 (75) hide show
  1. package/es/address-list/AddressList.d.ts +13 -0
  2. package/es/address-list/AddressList.mjs +3 -2
  3. package/es/address-list/index.d.ts +9 -0
  4. package/es/checkbox/Checkbox.d.ts +13 -23
  5. package/es/checkbox/Checkbox.mjs +2 -2
  6. package/es/checkbox/Checker.d.ts +6 -11
  7. package/es/checkbox/Checker.mjs +8 -6
  8. package/es/checkbox/index.d.ts +2 -9
  9. package/es/checkbox-group/CheckboxGroup.d.ts +14 -1
  10. package/es/checkbox-group/CheckboxGroup.mjs +2 -1
  11. package/es/checkbox-group/index.d.ts +9 -0
  12. package/es/floating-bubble/index.d.ts +1 -1
  13. package/es/index.d.ts +1 -1
  14. package/es/index.mjs +1 -1
  15. package/es/radio/Radio.d.ts +13 -23
  16. package/es/radio/Radio.mjs +2 -2
  17. package/es/radio/index.css +1 -1
  18. package/es/radio/index.d.ts +2 -9
  19. package/es/radio-group/RadioGroup.d.ts +4 -0
  20. package/es/radio-group/RadioGroup.mjs +1 -0
  21. package/es/radio-group/index.d.ts +2 -0
  22. package/es/tab/Tab.mjs +2 -2
  23. package/es/utils/basic.d.ts +8 -0
  24. package/es/utils/basic.mjs +28 -7
  25. package/es/utils/create.mjs +1 -2
  26. package/es/utils/deep-assign.mjs +1 -1
  27. package/es/utils/deep-clone.mjs +1 -1
  28. package/es/utils/dom.mjs +1 -1
  29. package/es/utils/format.mjs +1 -1
  30. package/es/utils/index.d.ts +0 -1
  31. package/es/utils/index.mjs +0 -1
  32. package/es/utils/interceptor.mjs +1 -2
  33. package/lib/address-list/AddressList.d.ts +13 -0
  34. package/lib/address-list/AddressList.js +3 -2
  35. package/lib/address-list/index.d.ts +9 -0
  36. package/lib/checkbox/Checkbox.d.ts +13 -23
  37. package/lib/checkbox/Checkbox.js +1 -1
  38. package/lib/checkbox/Checker.d.ts +6 -11
  39. package/lib/checkbox/Checker.js +7 -5
  40. package/lib/checkbox/index.d.ts +2 -9
  41. package/lib/checkbox-group/CheckboxGroup.d.ts +14 -1
  42. package/lib/checkbox-group/CheckboxGroup.js +1 -0
  43. package/lib/checkbox-group/index.d.ts +9 -0
  44. package/lib/floating-bubble/index.d.ts +1 -1
  45. package/lib/index.css +1 -1
  46. package/lib/index.d.ts +1 -1
  47. package/lib/index.js +1 -1
  48. package/lib/radio/Radio.d.ts +13 -23
  49. package/lib/radio/Radio.js +1 -1
  50. package/lib/radio/index.css +1 -1
  51. package/lib/radio/index.d.ts +2 -9
  52. package/lib/radio-group/RadioGroup.d.ts +4 -0
  53. package/lib/radio-group/RadioGroup.js +1 -0
  54. package/lib/radio-group/index.d.ts +2 -0
  55. package/lib/tab/Tab.js +2 -2
  56. package/lib/utils/basic.d.ts +8 -0
  57. package/lib/utils/basic.js +29 -8
  58. package/lib/utils/create.js +1 -2
  59. package/lib/utils/deep-assign.js +3 -3
  60. package/lib/utils/deep-clone.js +3 -3
  61. package/lib/utils/dom.js +2 -2
  62. package/lib/utils/format.js +4 -4
  63. package/lib/utils/index.d.ts +0 -1
  64. package/lib/utils/index.js +0 -1
  65. package/lib/utils/interceptor.js +1 -2
  66. package/lib/vant.cjs.js +31 -23
  67. package/lib/vant.es.js +31 -23
  68. package/lib/vant.js +96 -34
  69. package/lib/vant.min.js +1 -1
  70. package/lib/web-types.json +1 -1
  71. package/package.json +1 -1
  72. package/es/utils/validate.d.ts +0 -9
  73. package/es/utils/validate.mjs +0 -22
  74. package/lib/utils/validate.d.ts +0 -9
  75. package/lib/utils/validate.js +0 -41
@@ -15,6 +15,10 @@ export declare const addressListProps: {
15
15
  type: import("vue").PropType<AddressListAddress[]>;
16
16
  default: () => never[];
17
17
  };
18
+ showAddButton: {
19
+ type: BooleanConstructor;
20
+ default: true;
21
+ };
18
22
  addButtonText: StringConstructor;
19
23
  defaultTagText: StringConstructor;
20
24
  rightIcon: {
@@ -38,6 +42,10 @@ declare const _default: import("vue").DefineComponent<{
38
42
  type: import("vue").PropType<AddressListAddress[]>;
39
43
  default: () => never[];
40
44
  };
45
+ showAddButton: {
46
+ type: BooleanConstructor;
47
+ default: true;
48
+ };
41
49
  addButtonText: StringConstructor;
42
50
  defaultTagText: StringConstructor;
43
51
  rightIcon: {
@@ -59,6 +67,10 @@ declare const _default: import("vue").DefineComponent<{
59
67
  type: import("vue").PropType<AddressListAddress[]>;
60
68
  default: () => never[];
61
69
  };
70
+ showAddButton: {
71
+ type: BooleanConstructor;
72
+ default: true;
73
+ };
62
74
  addButtonText: StringConstructor;
63
75
  defaultTagText: StringConstructor;
64
76
  rightIcon: {
@@ -78,5 +90,6 @@ declare const _default: import("vue").DefineComponent<{
78
90
  switchable: boolean;
79
91
  list: AddressListAddress[];
80
92
  disabledList: AddressListAddress[];
93
+ showAddButton: boolean;
81
94
  }, {}>;
82
95
  export default _default;
@@ -11,6 +11,7 @@ const addressListProps = {
11
11
  switchable: truthProp,
12
12
  disabledText: String,
13
13
  disabledList: makeArrayProp(),
14
+ showAddButton: truthProp,
14
15
  addButtonText: String,
15
16
  defaultTagText: String,
16
17
  rightIcon: makeStringProp("edit")
@@ -52,7 +53,7 @@ var stdin_default = defineComponent({
52
53
  return list.map((item, index) => renderItem(item, index, disabled));
53
54
  }
54
55
  };
55
- const renderBottom = () => _createVNode("div", {
56
+ const renderBottom = () => props.showAddButton ? _createVNode("div", {
56
57
  "class": [bem("bottom"), "van-safe-area-bottom"]
57
58
  }, [_createVNode(Button, {
58
59
  "round": true,
@@ -61,7 +62,7 @@ var stdin_default = defineComponent({
61
62
  "text": props.addButtonText || t("add"),
62
63
  "class": bem("add"),
63
64
  "onClick": () => emit("add")
64
- }, null)]);
65
+ }, null)]) : void 0;
65
66
  return () => {
66
67
  var _a, _b;
67
68
  const List = renderList(props.list);
@@ -13,6 +13,10 @@ export declare const AddressList: import("../utils").WithInstall<import("vue").D
13
13
  type: import("vue").PropType<import("./AddressListItem").AddressListAddress[]>;
14
14
  default: () => never[];
15
15
  };
16
+ showAddButton: {
17
+ type: BooleanConstructor;
18
+ default: true;
19
+ };
16
20
  addButtonText: StringConstructor;
17
21
  defaultTagText: StringConstructor;
18
22
  rightIcon: {
@@ -34,6 +38,10 @@ export declare const AddressList: import("../utils").WithInstall<import("vue").D
34
38
  type: import("vue").PropType<import("./AddressListItem").AddressListAddress[]>;
35
39
  default: () => never[];
36
40
  };
41
+ showAddButton: {
42
+ type: BooleanConstructor;
43
+ default: true;
44
+ };
37
45
  addButtonText: StringConstructor;
38
46
  defaultTagText: StringConstructor;
39
47
  rightIcon: {
@@ -53,6 +61,7 @@ export declare const AddressList: import("../utils").WithInstall<import("vue").D
53
61
  switchable: boolean;
54
62
  list: import("./AddressListItem").AddressListAddress[];
55
63
  disabledList: import("./AddressListItem").AddressListAddress[];
64
+ showAddButton: boolean;
56
65
  }, {}>>;
57
66
  export default AddressList;
58
67
  export { addressListProps } from './AddressList';
@@ -1,18 +1,15 @@
1
- import { type ExtractPropTypes } from 'vue';
1
+ import { type PropType, type ExtractPropTypes } from 'vue';
2
2
  import { type CheckerShape } from './Checker';
3
3
  export declare const checkboxProps: {
4
- name: import("vue").PropType<unknown>;
4
+ name: PropType<unknown>;
5
5
  disabled: BooleanConstructor;
6
6
  iconSize: (NumberConstructor | StringConstructor)[];
7
- modelValue: import("vue").PropType<unknown>;
7
+ modelValue: PropType<unknown>;
8
8
  checkedColor: StringConstructor;
9
- labelPosition: import("vue").PropType<import("./Checker").CheckerLabelPosition>;
9
+ labelPosition: PropType<import("./Checker").CheckerLabelPosition>;
10
10
  labelDisabled: BooleanConstructor;
11
11
  } & {
12
- shape: {
13
- type: import("vue").PropType<CheckerShape>;
14
- default: CheckerShape;
15
- };
12
+ shape: PropType<CheckerShape>;
16
13
  bindGroup: {
17
14
  type: BooleanConstructor;
18
15
  default: true;
@@ -20,35 +17,29 @@ export declare const checkboxProps: {
20
17
  };
21
18
  export type CheckboxProps = ExtractPropTypes<typeof checkboxProps>;
22
19
  declare const _default: import("vue").DefineComponent<{
23
- name: import("vue").PropType<unknown>;
20
+ name: PropType<unknown>;
24
21
  disabled: BooleanConstructor;
25
22
  iconSize: (NumberConstructor | StringConstructor)[];
26
- modelValue: import("vue").PropType<unknown>;
23
+ modelValue: PropType<unknown>;
27
24
  checkedColor: StringConstructor;
28
- labelPosition: import("vue").PropType<import("./Checker").CheckerLabelPosition>;
25
+ labelPosition: PropType<import("./Checker").CheckerLabelPosition>;
29
26
  labelDisabled: BooleanConstructor;
30
27
  } & {
31
- shape: {
32
- type: import("vue").PropType<CheckerShape>;
33
- default: CheckerShape;
34
- };
28
+ shape: PropType<CheckerShape>;
35
29
  bindGroup: {
36
30
  type: BooleanConstructor;
37
31
  default: true;
38
32
  };
39
33
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
40
- name: import("vue").PropType<unknown>;
34
+ name: PropType<unknown>;
41
35
  disabled: BooleanConstructor;
42
36
  iconSize: (NumberConstructor | StringConstructor)[];
43
- modelValue: import("vue").PropType<unknown>;
37
+ modelValue: PropType<unknown>;
44
38
  checkedColor: StringConstructor;
45
- labelPosition: import("vue").PropType<import("./Checker").CheckerLabelPosition>;
39
+ labelPosition: PropType<import("./Checker").CheckerLabelPosition>;
46
40
  labelDisabled: BooleanConstructor;
47
41
  } & {
48
- shape: {
49
- type: import("vue").PropType<CheckerShape>;
50
- default: CheckerShape;
51
- };
42
+ shape: PropType<CheckerShape>;
52
43
  bindGroup: {
53
44
  type: BooleanConstructor;
54
45
  default: true;
@@ -58,7 +49,6 @@ declare const _default: import("vue").DefineComponent<{
58
49
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
59
50
  }, {
60
51
  disabled: boolean;
61
- shape: CheckerShape;
62
52
  labelDisabled: boolean;
63
53
  bindGroup: boolean;
64
54
  }, {}>;
@@ -1,13 +1,13 @@
1
1
  import { createVNode as _createVNode, mergeProps as _mergeProps } from "vue";
2
2
  import { watch, computed, defineComponent } from "vue";
3
- import { pick, extend, truthProp, makeStringProp, createNamespace } from "../utils/index.mjs";
3
+ import { pick, extend, truthProp, createNamespace } from "../utils/index.mjs";
4
4
  import { CHECKBOX_GROUP_KEY } from "../checkbox-group/CheckboxGroup.mjs";
5
5
  import { useParent, useCustomFieldValue } from "@vant/use";
6
6
  import { useExpose } from "../composables/use-expose.mjs";
7
7
  import Checker, { checkerProps } from "./Checker.mjs";
8
8
  const [name, bem] = createNamespace("checkbox");
9
9
  const checkboxProps = extend({}, checkerProps, {
10
- shape: makeStringProp("round"),
10
+ shape: String,
11
11
  bindGroup: truthProp
12
12
  });
13
13
  var stdin_default = defineComponent({
@@ -1,16 +1,18 @@
1
1
  import { type PropType } from 'vue';
2
2
  import { type Numeric } from '../utils';
3
+ import type { RadioShape } from '../radio';
3
4
  export type CheckerShape = 'square' | 'round';
4
5
  export type CheckerDirection = 'horizontal' | 'vertical';
5
6
  export type CheckerLabelPosition = 'left' | 'right';
6
7
  export type CheckerParent = {
7
8
  props: {
9
+ max?: Numeric;
10
+ shape?: CheckerShape | RadioShape;
8
11
  disabled?: boolean;
9
12
  iconSize?: Numeric;
10
13
  direction?: CheckerDirection;
11
- checkedColor?: string;
12
14
  modelValue?: unknown | unknown[];
13
- max?: Numeric;
15
+ checkedColor?: string;
14
16
  };
15
17
  };
16
18
  export declare const checkerProps: {
@@ -36,10 +38,7 @@ declare const _default: import("vue").DefineComponent<{
36
38
  required: true;
37
39
  };
38
40
  role: StringConstructor;
39
- shape: {
40
- type: PropType<"dot" | "round" | "square">;
41
- default: "dot" | "round" | "square";
42
- };
41
+ shape: PropType<"dot" | "round" | "square">;
43
42
  parent: PropType<CheckerParent | null>;
44
43
  checked: BooleanConstructor;
45
44
  bindGroup: {
@@ -60,10 +59,7 @@ declare const _default: import("vue").DefineComponent<{
60
59
  required: true;
61
60
  };
62
61
  role: StringConstructor;
63
- shape: {
64
- type: PropType<"dot" | "round" | "square">;
65
- default: "dot" | "round" | "square";
66
- };
62
+ shape: PropType<"dot" | "round" | "square">;
67
63
  parent: PropType<CheckerParent | null>;
68
64
  checked: BooleanConstructor;
69
65
  bindGroup: {
@@ -76,7 +72,6 @@ declare const _default: import("vue").DefineComponent<{
76
72
  }, {
77
73
  checked: boolean;
78
74
  disabled: boolean;
79
- shape: "dot" | "round" | "square";
80
75
  labelDisabled: boolean;
81
76
  bindGroup: boolean;
82
77
  }, {}>;
@@ -1,6 +1,6 @@
1
1
  import { createVNode as _createVNode } from "vue";
2
2
  import { ref, computed, defineComponent } from "vue";
3
- import { extend, addUnit, truthProp, numericProp, unknownProp, makeStringProp, makeRequiredProp } from "../utils/index.mjs";
3
+ import { extend, addUnit, truthProp, numericProp, unknownProp, makeRequiredProp } from "../utils/index.mjs";
4
4
  import { Icon } from "../icon/index.mjs";
5
5
  const checkerProps = {
6
6
  name: unknownProp,
@@ -15,7 +15,7 @@ var stdin_default = defineComponent({
15
15
  props: extend({}, checkerProps, {
16
16
  bem: makeRequiredProp(Function),
17
17
  role: String,
18
- shape: makeStringProp("round"),
18
+ shape: String,
19
19
  parent: Object,
20
20
  checked: Boolean,
21
21
  bindGroup: truthProp
@@ -54,6 +54,9 @@ var stdin_default = defineComponent({
54
54
  };
55
55
  }
56
56
  });
57
+ const shape = computed(() => {
58
+ return props.shape || getParentProp("shape") || "round";
59
+ });
57
60
  const onClick = (event) => {
58
61
  const {
59
62
  target
@@ -69,17 +72,16 @@ var stdin_default = defineComponent({
69
72
  var _a, _b;
70
73
  const {
71
74
  bem,
72
- shape,
73
75
  checked
74
76
  } = props;
75
77
  const iconSize = props.iconSize || getParentProp("iconSize");
76
78
  return _createVNode("div", {
77
79
  "ref": iconRef,
78
- "class": bem("icon", [shape, {
80
+ "class": bem("icon", [shape.value, {
79
81
  disabled: disabled.value,
80
82
  checked
81
83
  }]),
82
- "style": shape !== "dot" ? {
84
+ "style": shape.value !== "dot" ? {
83
85
  fontSize: addUnit(iconSize)
84
86
  } : {
85
87
  width: addUnit(iconSize),
@@ -89,7 +91,7 @@ var stdin_default = defineComponent({
89
91
  }, [slots.icon ? slots.icon({
90
92
  checked,
91
93
  disabled: disabled.value
92
- }) : shape !== "dot" ? _createVNode(Icon, {
94
+ }) : shape.value !== "dot" ? _createVNode(Icon, {
93
95
  "name": "success",
94
96
  "style": iconStyle.value
95
97
  }, null) : _createVNode("div", {
@@ -7,10 +7,7 @@ export declare const Checkbox: import("../utils").WithInstall<import("vue").Defi
7
7
  labelPosition: import("vue").PropType<import("./Checker").CheckerLabelPosition>;
8
8
  labelDisabled: BooleanConstructor;
9
9
  } & {
10
- shape: {
11
- type: import("vue").PropType<import("./Checker").CheckerShape>;
12
- default: import("./Checker").CheckerShape;
13
- };
10
+ shape: import("vue").PropType<import("./Checker").CheckerShape>;
14
11
  bindGroup: {
15
12
  type: BooleanConstructor;
16
13
  default: true;
@@ -24,10 +21,7 @@ export declare const Checkbox: import("../utils").WithInstall<import("vue").Defi
24
21
  labelPosition: import("vue").PropType<import("./Checker").CheckerLabelPosition>;
25
22
  labelDisabled: BooleanConstructor;
26
23
  } & {
27
- shape: {
28
- type: import("vue").PropType<import("./Checker").CheckerShape>;
29
- default: import("./Checker").CheckerShape;
30
- };
24
+ shape: import("vue").PropType<import("./Checker").CheckerShape>;
31
25
  bindGroup: {
32
26
  type: BooleanConstructor;
33
27
  default: true;
@@ -37,7 +31,6 @@ export declare const Checkbox: import("../utils").WithInstall<import("vue").Defi
37
31
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
38
32
  }, {
39
33
  disabled: boolean;
40
- shape: import("./Checker").CheckerShape;
41
34
  labelDisabled: boolean;
42
35
  bindGroup: boolean;
43
36
  }, {}>>;
@@ -1,8 +1,12 @@
1
1
  import { type PropType, type InjectionKey, type ExtractPropTypes } from 'vue';
2
- import type { CheckerDirection } from '../checkbox/Checker';
2
+ import type { CheckerShape, CheckerDirection } from '../checkbox/Checker';
3
3
  import type { CheckboxGroupProvide } from './types';
4
4
  export declare const checkboxGroupProps: {
5
5
  max: (NumberConstructor | StringConstructor)[];
6
+ shape: {
7
+ type: PropType<CheckerShape>;
8
+ default: CheckerShape;
9
+ };
6
10
  disabled: BooleanConstructor;
7
11
  iconSize: (NumberConstructor | StringConstructor)[];
8
12
  direction: PropType<CheckerDirection>;
@@ -16,6 +20,10 @@ export type CheckboxGroupProps = ExtractPropTypes<typeof checkboxGroupProps>;
16
20
  export declare const CHECKBOX_GROUP_KEY: InjectionKey<CheckboxGroupProvide>;
17
21
  declare const _default: import("vue").DefineComponent<{
18
22
  max: (NumberConstructor | StringConstructor)[];
23
+ shape: {
24
+ type: PropType<CheckerShape>;
25
+ default: CheckerShape;
26
+ };
19
27
  disabled: BooleanConstructor;
20
28
  iconSize: (NumberConstructor | StringConstructor)[];
21
29
  direction: PropType<CheckerDirection>;
@@ -26,6 +34,10 @@ declare const _default: import("vue").DefineComponent<{
26
34
  checkedColor: StringConstructor;
27
35
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
28
36
  max: (NumberConstructor | StringConstructor)[];
37
+ shape: {
38
+ type: PropType<CheckerShape>;
39
+ default: CheckerShape;
40
+ };
29
41
  disabled: BooleanConstructor;
30
42
  iconSize: (NumberConstructor | StringConstructor)[];
31
43
  direction: PropType<CheckerDirection>;
@@ -39,6 +51,7 @@ declare const _default: import("vue").DefineComponent<{
39
51
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
40
52
  }, {
41
53
  disabled: boolean;
54
+ shape: CheckerShape;
42
55
  modelValue: unknown[];
43
56
  }, {}>;
44
57
  export default _default;
@@ -1,11 +1,12 @@
1
1
  import { createVNode as _createVNode } from "vue";
2
2
  import { watch, defineComponent } from "vue";
3
- import { numericProp, createNamespace, makeArrayProp } from "../utils/index.mjs";
3
+ import { numericProp, makeArrayProp, makeStringProp, createNamespace } from "../utils/index.mjs";
4
4
  import { useChildren, useCustomFieldValue } from "@vant/use";
5
5
  import { useExpose } from "../composables/use-expose.mjs";
6
6
  const [name, bem] = createNamespace("checkbox-group");
7
7
  const checkboxGroupProps = {
8
8
  max: numericProp,
9
+ shape: makeStringProp("round"),
9
10
  disabled: Boolean,
10
11
  iconSize: numericProp,
11
12
  direction: String,
@@ -1,5 +1,9 @@
1
1
  export declare const CheckboxGroup: import("../utils").WithInstall<import("vue").DefineComponent<{
2
2
  max: (NumberConstructor | StringConstructor)[];
3
+ shape: {
4
+ type: import("vue").PropType<import("../checkbox/Checker").CheckerShape>;
5
+ default: import("../checkbox/Checker").CheckerShape;
6
+ };
3
7
  disabled: BooleanConstructor;
4
8
  iconSize: (NumberConstructor | StringConstructor)[];
5
9
  direction: import("vue").PropType<import("../checkbox/Checker").CheckerDirection>;
@@ -10,6 +14,10 @@ export declare const CheckboxGroup: import("../utils").WithInstall<import("vue")
10
14
  checkedColor: StringConstructor;
11
15
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
12
16
  max: (NumberConstructor | StringConstructor)[];
17
+ shape: {
18
+ type: import("vue").PropType<import("../checkbox/Checker").CheckerShape>;
19
+ default: import("../checkbox/Checker").CheckerShape;
20
+ };
13
21
  disabled: BooleanConstructor;
14
22
  iconSize: (NumberConstructor | StringConstructor)[];
15
23
  direction: import("vue").PropType<import("../checkbox/Checker").CheckerDirection>;
@@ -23,6 +31,7 @@ export declare const CheckboxGroup: import("../utils").WithInstall<import("vue")
23
31
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
24
32
  }, {
25
33
  disabled: boolean;
34
+ shape: import("../checkbox/Checker").CheckerShape;
26
35
  modelValue: unknown[];
27
36
  }, {}>>;
28
37
  export default CheckboxGroup;
@@ -58,6 +58,6 @@ export type { FloatingBubbleProps } from './FloatingBubble';
58
58
  export type { FloatingBubbleThemeVars, FloatingBubbleAxis, FloatingBubbleMagnetic, FloatingBubbleOffset, } from './types';
59
59
  declare module 'vue' {
60
60
  interface GlobalComponents {
61
- FloatingBubble: typeof FloatingBubble;
61
+ VanFloatingBubble: typeof FloatingBubble;
62
62
  }
63
63
  }
package/es/index.d.ts CHANGED
@@ -105,4 +105,4 @@ declare namespace _default {
105
105
  }
106
106
  export default _default;
107
107
  export function install(app: any): void;
108
- export const version: "4.6.2";
108
+ export const version: "4.6.3";
package/es/index.mjs CHANGED
@@ -98,7 +98,7 @@ import { Toast } from "./toast/index.mjs";
98
98
  import { TreeSelect } from "./tree-select/index.mjs";
99
99
  import { Uploader } from "./uploader/index.mjs";
100
100
  import { Watermark } from "./watermark/index.mjs";
101
- const version = "4.6.2";
101
+ const version = "4.6.3";
102
102
  function install(app) {
103
103
  const components = [
104
104
  ActionBar,
@@ -1,53 +1,43 @@
1
- import { type ExtractPropTypes } from 'vue';
1
+ import { type PropType, type ExtractPropTypes } from 'vue';
2
2
  import { type CheckerShape, type CheckerLabelPosition } from '../checkbox/Checker';
3
3
  export type RadioShape = CheckerShape | 'dot';
4
4
  export declare const radioProps: {
5
- name: import("vue").PropType<unknown>;
5
+ name: PropType<unknown>;
6
6
  disabled: BooleanConstructor;
7
7
  iconSize: (NumberConstructor | StringConstructor)[];
8
- modelValue: import("vue").PropType<unknown>;
8
+ modelValue: PropType<unknown>;
9
9
  checkedColor: StringConstructor;
10
- labelPosition: import("vue").PropType<CheckerLabelPosition>;
10
+ labelPosition: PropType<CheckerLabelPosition>;
11
11
  labelDisabled: BooleanConstructor;
12
12
  } & {
13
- shape: {
14
- type: import("vue").PropType<RadioShape>;
15
- default: RadioShape;
16
- };
13
+ shape: PropType<RadioShape>;
17
14
  };
18
15
  export type RadioLabelPosition = CheckerLabelPosition;
19
16
  export type RadioProps = ExtractPropTypes<typeof radioProps>;
20
17
  declare const _default: import("vue").DefineComponent<{
21
- name: import("vue").PropType<unknown>;
18
+ name: PropType<unknown>;
22
19
  disabled: BooleanConstructor;
23
20
  iconSize: (NumberConstructor | StringConstructor)[];
24
- modelValue: import("vue").PropType<unknown>;
21
+ modelValue: PropType<unknown>;
25
22
  checkedColor: StringConstructor;
26
- labelPosition: import("vue").PropType<CheckerLabelPosition>;
23
+ labelPosition: PropType<CheckerLabelPosition>;
27
24
  labelDisabled: BooleanConstructor;
28
25
  } & {
29
- shape: {
30
- type: import("vue").PropType<RadioShape>;
31
- default: RadioShape;
32
- };
26
+ shape: PropType<RadioShape>;
33
27
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
34
- name: import("vue").PropType<unknown>;
28
+ name: PropType<unknown>;
35
29
  disabled: BooleanConstructor;
36
30
  iconSize: (NumberConstructor | StringConstructor)[];
37
- modelValue: import("vue").PropType<unknown>;
31
+ modelValue: PropType<unknown>;
38
32
  checkedColor: StringConstructor;
39
- labelPosition: import("vue").PropType<CheckerLabelPosition>;
33
+ labelPosition: PropType<CheckerLabelPosition>;
40
34
  labelDisabled: BooleanConstructor;
41
35
  } & {
42
- shape: {
43
- type: import("vue").PropType<RadioShape>;
44
- default: RadioShape;
45
- };
36
+ shape: PropType<RadioShape>;
46
37
  }>> & {
47
38
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
48
39
  }, {
49
40
  disabled: boolean;
50
- shape: RadioShape;
51
41
  labelDisabled: boolean;
52
42
  }, {}>;
53
43
  export default _default;
@@ -1,11 +1,11 @@
1
1
  import { createVNode as _createVNode, mergeProps as _mergeProps } from "vue";
2
2
  import { defineComponent } from "vue";
3
- import { pick, extend, createNamespace, makeStringProp } from "../utils/index.mjs";
3
+ import { pick, extend, createNamespace } from "../utils/index.mjs";
4
4
  import { RADIO_KEY } from "../radio-group/RadioGroup.mjs";
5
5
  import { useParent } from "@vant/use";
6
6
  import Checker, { checkerProps } from "../checkbox/Checker.mjs";
7
7
  const radioProps = extend({}, checkerProps, {
8
- shape: makeStringProp("round")
8
+ shape: String
9
9
  });
10
10
  const [name, bem] = createNamespace("radio");
11
11
  var stdin_default = defineComponent({
@@ -1 +1 @@
1
- :root{--van-radio-size: 20px;--van-radio-dot-size: 8px;--van-radio-border-color: var(--van-gray-5);--van-radio-duration: var(--van-duration-fast);--van-radio-label-margin: var(--van-padding-xs);--van-radio-label-color: var(--van-text-color);--van-radio-checked-icon-color: var(--van-primary-color);--van-radio-disabled-icon-color: var(--van-gray-5);--van-radio-disabled-label-color: var(--van-text-color-3);--van-radio-disabled-background: var(--van-border-color)}.van-radio{display:flex;align-items:center;overflow:hidden;cursor:pointer;-webkit-user-select:none;user-select:none}.van-radio--disabled{cursor:not-allowed}.van-radio--label-disabled{cursor:default}.van-radio--horizontal{margin-right:var(--van-padding-sm)}.van-radio__icon{flex:none;height:1em;font-size:var(--van-radio-size);line-height:1em;cursor:pointer}.van-radio__icon .van-icon{display:block;box-sizing:border-box;width:1.25em;height:1.25em;color:transparent;font-size:.8em;line-height:1.25;text-align:center;border:1px solid var(--van-radio-border-color);transition-duration:var(--van-radio-duration);transition-property:color,border-color,background-color}.van-radio__icon--round .van-icon{border-radius:100%}.van-radio__icon--dot{position:relative;border-radius:100%;box-sizing:border-box;width:var(--van-radio-size);height:var(--van-radio-size);border:1px solid var(--van-radio-border-color);transition-duration:var(--van-radio-duration);transition-property:border-color}.van-radio__icon--dot__icon{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);border-radius:100%;height:calc(100% - var(--van-radio-dot-size));width:calc(100% - var(--van-radio-dot-size));transition-duration:var(--van-radio-duration);transition-property:border-color,background-color}.van-radio__icon--checked .van-icon{color:var(--van-white);background-color:var(--van-radio-checked-icon-color);border-color:var(--van-radio-checked-icon-color)}.van-radio__icon--checked.van-radio__icon--dot{border-color:var(--van-radio-checked-icon-color)}.van-radio__icon--checked.van-radio__icon--dot .van-radio__icon--dot__icon{background:var(--van-radio-checked-icon-color)}.van-radio__icon--disabled{cursor:not-allowed}.van-radio__icon--disabled .van-icon{background-color:var(--van-radio-disabled-background);border-color:var(--van-radio-disabled-icon-color)}.van-radio__icon--disabled.van-radio__icon--checked .van-icon{color:var(--van-radio-disabled-icon-color)}.van-radio__label{margin-left:var(--van-radio-label-margin);color:var(--van-radio-label-color);line-height:var(--van-radio-size)}.van-radio__label--left{margin:0 var(--van-radio-label-margin) 0 0}.van-radio__label--disabled{color:var(--van-radio-disabled-label-color)}
1
+ :root{--van-radio-size: 20px;--van-radio-dot-size: 8px;--van-radio-border-color: var(--van-gray-5);--van-radio-duration: var(--van-duration-fast);--van-radio-label-margin: var(--van-padding-xs);--van-radio-label-color: var(--van-text-color);--van-radio-checked-icon-color: var(--van-primary-color);--van-radio-disabled-icon-color: var(--van-gray-5);--van-radio-disabled-label-color: var(--van-text-color-3);--van-radio-disabled-background: var(--van-border-color)}.van-radio{display:flex;align-items:center;overflow:hidden;cursor:pointer;-webkit-user-select:none;user-select:none}.van-radio--disabled{cursor:not-allowed}.van-radio--label-disabled{cursor:default}.van-radio--horizontal{margin-right:var(--van-padding-sm)}.van-radio__icon{flex:none;height:1em;font-size:var(--van-radio-size);line-height:1em;cursor:pointer}.van-radio__icon .van-icon{display:block;box-sizing:border-box;width:1.25em;height:1.25em;color:transparent;font-size:.8em;line-height:1.25;text-align:center;border:1px solid var(--van-radio-border-color);transition-duration:var(--van-radio-duration);transition-property:color,border-color,background-color}.van-radio__icon--round .van-icon{border-radius:100%}.van-radio__icon--dot{position:relative;border-radius:100%;box-sizing:border-box;width:var(--van-radio-size);height:var(--van-radio-size);border:1px solid var(--van-radio-border-color);transition-duration:var(--van-radio-duration);transition-property:border-color}.van-radio__icon--dot__icon{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);border-radius:100%;height:calc(100% - var(--van-radio-dot-size));width:calc(100% - var(--van-radio-dot-size));transition-duration:var(--van-radio-duration);transition-property:background-color}.van-radio__icon--checked .van-icon{color:var(--van-white);background-color:var(--van-radio-checked-icon-color);border-color:var(--van-radio-checked-icon-color)}.van-radio__icon--checked.van-radio__icon--dot{border-color:var(--van-radio-checked-icon-color)}.van-radio__icon--checked.van-radio__icon--dot .van-radio__icon--dot__icon{background:var(--van-radio-checked-icon-color)}.van-radio__icon--disabled{cursor:not-allowed}.van-radio__icon--disabled .van-icon{background-color:var(--van-radio-disabled-background);border-color:var(--van-radio-disabled-icon-color)}.van-radio__icon--disabled.van-radio__icon--checked .van-icon{color:var(--van-radio-disabled-icon-color)}.van-radio__label{margin-left:var(--van-radio-label-margin);color:var(--van-radio-label-color);line-height:var(--van-radio-size)}.van-radio__label--left{margin:0 var(--van-radio-label-margin) 0 0}.van-radio__label--disabled{color:var(--van-radio-disabled-label-color)}
@@ -7,10 +7,7 @@ export declare const Radio: import("../utils").WithInstall<import("vue").DefineC
7
7
  labelPosition: import("vue").PropType<import("../checkbox/Checker").CheckerLabelPosition>;
8
8
  labelDisabled: BooleanConstructor;
9
9
  } & {
10
- shape: {
11
- type: import("vue").PropType<import("./Radio").RadioShape>;
12
- default: import("./Radio").RadioShape;
13
- };
10
+ shape: import("vue").PropType<import("./Radio").RadioShape>;
14
11
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
15
12
  name: import("vue").PropType<unknown>;
16
13
  disabled: BooleanConstructor;
@@ -20,15 +17,11 @@ export declare const Radio: import("../utils").WithInstall<import("vue").DefineC
20
17
  labelPosition: import("vue").PropType<import("../checkbox/Checker").CheckerLabelPosition>;
21
18
  labelDisabled: BooleanConstructor;
22
19
  } & {
23
- shape: {
24
- type: import("vue").PropType<import("./Radio").RadioShape>;
25
- default: import("./Radio").RadioShape;
26
- };
20
+ shape: import("vue").PropType<import("./Radio").RadioShape>;
27
21
  }>> & {
28
22
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
29
23
  }, {
30
24
  disabled: boolean;
31
- shape: import("./Radio").RadioShape;
32
25
  labelDisabled: boolean;
33
26
  }, {}>>;
34
27
  export default Radio;
@@ -1,7 +1,9 @@
1
1
  import { type PropType, type InjectionKey, type ExtractPropTypes } from 'vue';
2
+ import type { RadioShape } from '../radio';
2
3
  import type { CheckerDirection } from '../checkbox/Checker';
3
4
  export type RadioGroupDirection = CheckerDirection;
4
5
  export declare const radioGroupProps: {
6
+ shape: PropType<RadioShape>;
5
7
  disabled: BooleanConstructor;
6
8
  iconSize: (NumberConstructor | StringConstructor)[];
7
9
  direction: PropType<CheckerDirection>;
@@ -15,12 +17,14 @@ export type RadioGroupProvide = {
15
17
  };
16
18
  export declare const RADIO_KEY: InjectionKey<RadioGroupProvide>;
17
19
  declare const _default: import("vue").DefineComponent<{
20
+ shape: PropType<RadioShape>;
18
21
  disabled: BooleanConstructor;
19
22
  iconSize: (NumberConstructor | StringConstructor)[];
20
23
  direction: PropType<CheckerDirection>;
21
24
  modelValue: PropType<unknown>;
22
25
  checkedColor: StringConstructor;
23
26
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
27
+ shape: PropType<RadioShape>;
24
28
  disabled: BooleanConstructor;
25
29
  iconSize: (NumberConstructor | StringConstructor)[];
26
30
  direction: PropType<CheckerDirection>;
@@ -4,6 +4,7 @@ import { unknownProp, numericProp, createNamespace } from "../utils/index.mjs";
4
4
  import { useChildren, useCustomFieldValue } from "@vant/use";
5
5
  const [name, bem] = createNamespace("radio-group");
6
6
  const radioGroupProps = {
7
+ shape: String,
7
8
  disabled: Boolean,
8
9
  iconSize: numericProp,
9
10
  direction: String,
@@ -1,10 +1,12 @@
1
1
  export declare const RadioGroup: import("../utils").WithInstall<import("vue").DefineComponent<{
2
+ shape: import("vue").PropType<import("..").RadioShape>;
2
3
  disabled: BooleanConstructor;
3
4
  iconSize: (NumberConstructor | StringConstructor)[];
4
5
  direction: import("vue").PropType<import("../checkbox/Checker").CheckerDirection>;
5
6
  modelValue: import("vue").PropType<unknown>;
6
7
  checkedColor: StringConstructor;
7
8
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
9
+ shape: import("vue").PropType<import("..").RadioShape>;
8
10
  disabled: BooleanConstructor;
9
11
  iconSize: (NumberConstructor | StringConstructor)[];
10
12
  direction: import("vue").PropType<import("../checkbox/Checker").CheckerDirection>;
package/es/tab/Tab.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { withDirectives as _withDirectives, vShow as _vShow, createVNode as _createVNode, mergeProps as _mergeProps } from "vue";
2
- import { ref, watch, provide, computed, nextTick, watchEffect, normalizeClass, normalizeStyle, defineComponent, getCurrentInstance } from "vue";
3
- import { stringifyStyle } from "@vue/shared";
2
+ import { ref, watch, provide, computed, nextTick, watchEffect, defineComponent, getCurrentInstance } from "vue";
3
+ import { normalizeClass, normalizeStyle, stringifyStyle } from "@vue/shared";
4
4
  import { pick, extend, truthProp, unknownProp, numericProp, createNamespace } from "../utils/index.mjs";
5
5
  import { TABS_KEY } from "../tabs/Tabs.mjs";
6
6
  import { doubleRaf, useParent } from "@vant/use";
@@ -9,6 +9,14 @@ export declare const extend: {
9
9
  export declare const inBrowser: boolean;
10
10
  export type Numeric = number | string;
11
11
  export type ComponentInstance = ComponentPublicInstance<{}, any>;
12
+ export declare const isObject: (val: unknown) => val is Record<any, any>;
13
+ export declare const isDef: <T>(val: T) => val is NonNullable<T>;
14
+ export declare const isFunction: (val: unknown) => val is Function;
15
+ export declare const isPromise: <T = any>(val: unknown) => val is Promise<T>;
16
+ export declare const isDate: (val: unknown) => val is Date;
17
+ export declare function isMobile(value: string): boolean;
18
+ export declare const isNumeric: (val: Numeric) => val is string;
19
+ export declare const isIOS: () => boolean;
12
20
  export declare function get(object: any, path: string): any;
13
21
  export type Writeable<T> = {
14
22
  -readonly [P in keyof T]: T[P];