vant 4.6.0 β†’ 4.6.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 (74) hide show
  1. package/README.md +7 -7
  2. package/es/checkbox/Checkbox.d.ts +14 -13
  3. package/es/checkbox/Checkbox.mjs +2 -1
  4. package/es/checkbox/Checker.d.ts +9 -13
  5. package/es/checkbox/Checker.mjs +13 -3
  6. package/es/checkbox/index.d.ts +8 -8
  7. package/es/field/Field.d.ts +25 -0
  8. package/es/field/Field.mjs +9 -0
  9. package/es/field/index.d.ts +13 -0
  10. package/es/floating-bubble/FloatingBubble.d.ts +16 -21
  11. package/es/floating-bubble/FloatingBubble.mjs +6 -8
  12. package/es/floating-bubble/index.css +1 -1
  13. package/es/floating-bubble/index.d.ts +18 -18
  14. package/es/floating-bubble/types.d.ts +13 -1
  15. package/es/floating-panel/FloatingPanel.mjs +2 -5
  16. package/es/index.d.ts +1 -1
  17. package/es/index.mjs +1 -1
  18. package/es/lazyload/vue-lazyload/util.d.ts +2 -2
  19. package/es/pagination/index.css +1 -1
  20. package/es/radio/Radio.d.ts +18 -15
  21. package/es/radio/Radio.mjs +5 -3
  22. package/es/radio/index.css +1 -1
  23. package/es/radio/index.d.ts +11 -9
  24. package/es/radio/types.d.ts +1 -0
  25. package/es/search/Search.d.ts +19 -0
  26. package/es/search/index.d.ts +13 -0
  27. package/es/style/base.css +1 -1
  28. package/es/submit-bar/types.d.ts +0 -1
  29. package/es/text-ellipsis/TextEllipsis.d.ts +13 -0
  30. package/es/text-ellipsis/TextEllipsis.mjs +50 -19
  31. package/es/text-ellipsis/index.d.ts +9 -0
  32. package/es/uploader/Uploader.mjs +6 -4
  33. package/es/uploader/UploaderPreviewItem.mjs +1 -1
  34. package/es/uploader/types.d.ts +1 -0
  35. package/lib/checkbox/Checkbox.d.ts +14 -13
  36. package/lib/checkbox/Checkbox.js +1 -0
  37. package/lib/checkbox/Checker.d.ts +9 -13
  38. package/lib/checkbox/Checker.js +13 -3
  39. package/lib/checkbox/index.d.ts +8 -8
  40. package/lib/field/Field.d.ts +25 -0
  41. package/lib/field/Field.js +9 -0
  42. package/lib/field/index.d.ts +13 -0
  43. package/lib/floating-bubble/FloatingBubble.d.ts +16 -21
  44. package/lib/floating-bubble/FloatingBubble.js +6 -8
  45. package/lib/floating-bubble/index.css +1 -1
  46. package/lib/floating-bubble/index.d.ts +18 -18
  47. package/lib/floating-bubble/types.d.ts +13 -1
  48. package/lib/floating-panel/FloatingPanel.js +1 -4
  49. package/lib/index.css +1 -1
  50. package/lib/index.d.ts +1 -1
  51. package/lib/index.js +1 -1
  52. package/lib/lazyload/vue-lazyload/util.d.ts +2 -2
  53. package/lib/pagination/index.css +1 -1
  54. package/lib/radio/Radio.d.ts +18 -15
  55. package/lib/radio/Radio.js +4 -2
  56. package/lib/radio/index.css +1 -1
  57. package/lib/radio/index.d.ts +11 -9
  58. package/lib/radio/types.d.ts +1 -0
  59. package/lib/search/Search.d.ts +19 -0
  60. package/lib/search/index.d.ts +13 -0
  61. package/lib/style/base.css +1 -1
  62. package/lib/submit-bar/types.d.ts +0 -1
  63. package/lib/text-ellipsis/TextEllipsis.d.ts +13 -0
  64. package/lib/text-ellipsis/TextEllipsis.js +49 -18
  65. package/lib/text-ellipsis/index.d.ts +9 -0
  66. package/lib/uploader/Uploader.js +6 -4
  67. package/lib/uploader/UploaderPreviewItem.js +1 -1
  68. package/lib/uploader/types.d.ts +1 -0
  69. package/lib/vant.cjs.js +99 -49
  70. package/lib/vant.es.js +99 -49
  71. package/lib/vant.js +110 -187
  72. package/lib/vant.min.js +1 -1
  73. package/lib/web-types.json +1 -1
  74. package/package.json +1 -1
package/README.md CHANGED
@@ -26,7 +26,7 @@
26
26
  ## Features
27
27
 
28
28
  - πŸš€ 1KB Component average size (min+gzip)
29
- - πŸš€ 70+ High quality components
29
+ - πŸš€ 80+ High quality components
30
30
  - πŸš€ Zero third-party dependencies
31
31
  - πŸ’ͺ 90%+ Unit test coverage
32
32
  - πŸ’ͺ Written in TypeScript
@@ -124,13 +124,13 @@ You can scan the following QR code to access the demo:
124
124
 
125
125
  Core contributors of Vant and Vant Weapp:
126
126
 
127
- | [![chenjiahan](https://avatars.githubusercontent.com/u/7237365?s=80&v=4)](https://github.com/chenjiahan/) | [![cookfront](https://avatars.githubusercontent.com/u/4829465?s=80&v=4)](https://github.com/cookfront/) | [![w91](https://avatars.githubusercontent.com/u/2599455?s=80&v=4)](https://github.com/w91/) | [![pangxie1991](https://avatars.githubusercontent.com/u/5961240?s=80&v=4)](https://github.com/pangxie1991/) | [![rex-zsd](https://avatars.githubusercontent.com/u/8767877?s=80&v=4)](https://github.com/rex-zsd/) |
128
- | :-: | :-: | :-: | :-: | :-: |
129
- | [chenjiahan](https://github.com/chenjiahan/) | [cookfront](https://github.com/cookfront/) | [wangnaiyi](https://github.com/w91/) | [pangxie](https://github.com/pangxie1991/) | [rex-zsd](https://github.com/rex-zsd/) |
127
+ | [![chenjiahan](https://avatars.githubusercontent.com/u/7237365?s=80&v=4)](https://github.com/chenjiahan/) | [![cookfront](https://avatars.githubusercontent.com/u/4829465?s=80&v=4)](https://github.com/cookfront/) | [![w91](https://avatars.githubusercontent.com/u/2599455?s=80&v=4)](https://github.com/w91/) | [![pangxie1991](https://avatars.githubusercontent.com/u/5961240?s=80&v=4)](https://github.com/pangxie1991/) | [![rex-zsd](https://avatars.githubusercontent.com/u/8767877?s=80&v=4)](https://github.com/rex-zsd/) | [![nemo-shen](https://avatars.githubusercontent.com/u/13480805?s=80&v=4)](https://github.com/nemo-shen/) |
128
+ | :-: | :-: | :-: | :-: | :-: | :-: |
129
+ | [chenjiahan](https://github.com/chenjiahan/) | [cookfront](https://github.com/cookfront/) | [wangnaiyi](https://github.com/w91/) | [pangxie](https://github.com/pangxie1991/) | [rex-zsd](https://github.com/rex-zsd/) | [nemo-shen](https://github.com/nemo-shen/) |
130
130
 
131
- | [![nemo-shen](https://avatars.githubusercontent.com/u/13480805?s=80&v=4)](https://github.com/nemo-shen/) | [![Lindysen](https://avatars.githubusercontent.com/u/33708359?s=80&v=4)](https://github.com/Lindysen/) | [![JakeLaoyu](https://avatars.githubusercontent.com/u/16181940?s=80&v=4)](https://github.com/JakeLaoyu/) | [![landluck](https://avatars.githubusercontent.com/u/27060081?s=80&v=4)](https://github.com/landluck/) | [![wjw-gavin](https://avatars.githubusercontent.com/u/19986739?s=80&v=4)](https://github.com/wjw-gavin/) |
132
- | :-: | :-: | :-: | :-: | :-: |
133
- | [nemo-shen](https://github.com/nemo-shen/) | [Lindysen](https://github.com/Lindysen/) | [JakeLaoyu](https://github.com/JakeLaoyu/) | [landluck](https://github.com/landluck/) | [wjw-gavin](https://github.com/wjw-gavin/) |
131
+ | [![Lindysen](https://avatars.githubusercontent.com/u/33708359?s=80&v=4)](https://github.com/Lindysen/) | [![JakeLaoyu](https://avatars.githubusercontent.com/u/16181940?s=80&v=4)](https://github.com/JakeLaoyu/) | [![landluck](https://avatars.githubusercontent.com/u/27060081?s=80&v=4)](https://github.com/landluck/) | [![wjw-gavin](https://avatars.githubusercontent.com/u/19986739?s=80&v=4)](https://github.com/wjw-gavin/) | [![inottn](https://avatars.githubusercontent.com/u/18509404?s=80&v=4)](https://github.com/inottn/) | [![zhousg](https://avatars.githubusercontent.com/u/15833290?s=80&v=4)](https://github.com/zhousg/) |
132
+ | :-: | :-: | :-: | :-: | :-: | :-: |
133
+ | [Lindysen](https://github.com/Lindysen/) | [JakeLaoyu](https://github.com/JakeLaoyu/) | [landluck](https://github.com/landluck/) | [wjw-gavin](https://github.com/wjw-gavin/) | [inottn](https://github.com/inottn/) | [zhousg](https://github.com/zhousg/) |
134
134
 
135
135
  ## All Contributors
136
136
 
@@ -1,10 +1,7 @@
1
1
  import { type ExtractPropTypes } from 'vue';
2
+ import { type CheckerShape } from './Checker';
2
3
  export declare const checkboxProps: {
3
4
  name: import("vue").PropType<unknown>;
4
- shape: {
5
- type: import("vue").PropType<import("./Checker").CheckerShape>;
6
- default: import("./Checker").CheckerShape;
7
- };
8
5
  disabled: BooleanConstructor;
9
6
  iconSize: (NumberConstructor | StringConstructor)[];
10
7
  modelValue: import("vue").PropType<unknown>;
@@ -12,6 +9,10 @@ export declare const checkboxProps: {
12
9
  labelPosition: import("vue").PropType<import("./Checker").CheckerLabelPosition>;
13
10
  labelDisabled: BooleanConstructor;
14
11
  } & {
12
+ shape: {
13
+ type: import("vue").PropType<CheckerShape>;
14
+ default: CheckerShape;
15
+ };
15
16
  bindGroup: {
16
17
  type: BooleanConstructor;
17
18
  default: true;
@@ -20,10 +21,6 @@ export declare const checkboxProps: {
20
21
  export type CheckboxProps = ExtractPropTypes<typeof checkboxProps>;
21
22
  declare const _default: import("vue").DefineComponent<{
22
23
  name: import("vue").PropType<unknown>;
23
- shape: {
24
- type: import("vue").PropType<import("./Checker").CheckerShape>;
25
- default: import("./Checker").CheckerShape;
26
- };
27
24
  disabled: BooleanConstructor;
28
25
  iconSize: (NumberConstructor | StringConstructor)[];
29
26
  modelValue: import("vue").PropType<unknown>;
@@ -31,16 +28,16 @@ declare const _default: import("vue").DefineComponent<{
31
28
  labelPosition: import("vue").PropType<import("./Checker").CheckerLabelPosition>;
32
29
  labelDisabled: BooleanConstructor;
33
30
  } & {
31
+ shape: {
32
+ type: import("vue").PropType<CheckerShape>;
33
+ default: CheckerShape;
34
+ };
34
35
  bindGroup: {
35
36
  type: BooleanConstructor;
36
37
  default: true;
37
38
  };
38
39
  }, () => 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<{
39
40
  name: import("vue").PropType<unknown>;
40
- shape: {
41
- type: import("vue").PropType<import("./Checker").CheckerShape>;
42
- default: import("./Checker").CheckerShape;
43
- };
44
41
  disabled: BooleanConstructor;
45
42
  iconSize: (NumberConstructor | StringConstructor)[];
46
43
  modelValue: import("vue").PropType<unknown>;
@@ -48,6 +45,10 @@ declare const _default: import("vue").DefineComponent<{
48
45
  labelPosition: import("vue").PropType<import("./Checker").CheckerLabelPosition>;
49
46
  labelDisabled: BooleanConstructor;
50
47
  } & {
48
+ shape: {
49
+ type: import("vue").PropType<CheckerShape>;
50
+ default: CheckerShape;
51
+ };
51
52
  bindGroup: {
52
53
  type: BooleanConstructor;
53
54
  default: true;
@@ -57,7 +58,7 @@ declare const _default: import("vue").DefineComponent<{
57
58
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
58
59
  }, {
59
60
  disabled: boolean;
60
- shape: import("./Checker").CheckerShape;
61
+ shape: CheckerShape;
61
62
  labelDisabled: boolean;
62
63
  bindGroup: boolean;
63
64
  }, {}>;
@@ -1,12 +1,13 @@
1
1
  import { createVNode as _createVNode, mergeProps as _mergeProps } from "vue";
2
2
  import { watch, computed, defineComponent } from "vue";
3
- import { createNamespace, extend, pick, truthProp } from "../utils/index.mjs";
3
+ import { pick, extend, truthProp, makeStringProp, 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
11
  bindGroup: truthProp
11
12
  });
12
13
  var stdin_default = defineComponent({
@@ -15,10 +15,6 @@ export type CheckerParent = {
15
15
  };
16
16
  export declare const checkerProps: {
17
17
  name: PropType<unknown>;
18
- shape: {
19
- type: PropType<CheckerShape>;
20
- default: CheckerShape;
21
- };
22
18
  disabled: BooleanConstructor;
23
19
  iconSize: (NumberConstructor | StringConstructor)[];
24
20
  modelValue: PropType<unknown>;
@@ -28,10 +24,6 @@ export declare const checkerProps: {
28
24
  };
29
25
  declare const _default: import("vue").DefineComponent<{
30
26
  name: PropType<unknown>;
31
- shape: {
32
- type: PropType<CheckerShape>;
33
- default: CheckerShape;
34
- };
35
27
  disabled: BooleanConstructor;
36
28
  iconSize: (NumberConstructor | StringConstructor)[];
37
29
  modelValue: PropType<unknown>;
@@ -44,6 +36,10 @@ declare const _default: import("vue").DefineComponent<{
44
36
  required: true;
45
37
  };
46
38
  role: StringConstructor;
39
+ shape: {
40
+ type: PropType<"dot" | "round" | "square">;
41
+ default: "dot" | "round" | "square";
42
+ };
47
43
  parent: PropType<CheckerParent | null>;
48
44
  checked: BooleanConstructor;
49
45
  bindGroup: {
@@ -52,10 +48,6 @@ declare const _default: import("vue").DefineComponent<{
52
48
  };
53
49
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "toggle")[], "click" | "toggle", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
54
50
  name: PropType<unknown>;
55
- shape: {
56
- type: PropType<CheckerShape>;
57
- default: CheckerShape;
58
- };
59
51
  disabled: BooleanConstructor;
60
52
  iconSize: (NumberConstructor | StringConstructor)[];
61
53
  modelValue: PropType<unknown>;
@@ -68,6 +60,10 @@ declare const _default: import("vue").DefineComponent<{
68
60
  required: true;
69
61
  };
70
62
  role: StringConstructor;
63
+ shape: {
64
+ type: PropType<"dot" | "round" | "square">;
65
+ default: "dot" | "round" | "square";
66
+ };
71
67
  parent: PropType<CheckerParent | null>;
72
68
  checked: BooleanConstructor;
73
69
  bindGroup: {
@@ -80,7 +76,7 @@ declare const _default: import("vue").DefineComponent<{
80
76
  }, {
81
77
  checked: boolean;
82
78
  disabled: boolean;
83
- shape: CheckerShape;
79
+ shape: "dot" | "round" | "square";
84
80
  labelDisabled: boolean;
85
81
  bindGroup: boolean;
86
82
  }, {}>;
@@ -4,7 +4,6 @@ import { extend, addUnit, truthProp, numericProp, unknownProp, makeStringProp, m
4
4
  import { Icon } from "../icon/index.mjs";
5
5
  const checkerProps = {
6
6
  name: unknownProp,
7
- shape: makeStringProp("round"),
8
7
  disabled: Boolean,
9
8
  iconSize: numericProp,
10
9
  modelValue: unknownProp,
@@ -16,6 +15,7 @@ var stdin_default = defineComponent({
16
15
  props: extend({}, checkerProps, {
17
16
  bem: makeRequiredProp(Function),
18
17
  role: String,
18
+ shape: makeStringProp("round"),
19
19
  parent: Object,
20
20
  checked: Boolean,
21
21
  bindGroup: truthProp
@@ -66,6 +66,7 @@ var stdin_default = defineComponent({
66
66
  emit("click", event);
67
67
  };
68
68
  const renderIcon = () => {
69
+ var _a, _b;
69
70
  const {
70
71
  bem,
71
72
  shape,
@@ -78,15 +79,24 @@ var stdin_default = defineComponent({
78
79
  disabled: disabled.value,
79
80
  checked
80
81
  }]),
81
- "style": {
82
+ "style": shape !== "dot" ? {
82
83
  fontSize: addUnit(iconSize)
84
+ } : {
85
+ width: addUnit(iconSize),
86
+ height: addUnit(iconSize),
87
+ borderColor: (_a = iconStyle.value) == null ? void 0 : _a.borderColor
83
88
  }
84
89
  }, [slots.icon ? slots.icon({
85
90
  checked,
86
91
  disabled: disabled.value
87
- }) : _createVNode(Icon, {
92
+ }) : shape !== "dot" ? _createVNode(Icon, {
88
93
  "name": "success",
89
94
  "style": iconStyle.value
95
+ }, null) : _createVNode("div", {
96
+ "class": bem("icon--dot__icon"),
97
+ "style": {
98
+ backgroundColor: (_b = iconStyle.value) == null ? void 0 : _b.backgroundColor
99
+ }
90
100
  }, null)]);
91
101
  };
92
102
  const renderLabel = () => {
@@ -1,9 +1,5 @@
1
1
  export declare const Checkbox: import("../utils").WithInstall<import("vue").DefineComponent<{
2
2
  name: import("vue").PropType<unknown>;
3
- shape: {
4
- type: import("vue").PropType<import("./Checker").CheckerShape>;
5
- default: import("./Checker").CheckerShape;
6
- };
7
3
  disabled: BooleanConstructor;
8
4
  iconSize: (NumberConstructor | StringConstructor)[];
9
5
  modelValue: import("vue").PropType<unknown>;
@@ -11,16 +7,16 @@ export declare const Checkbox: import("../utils").WithInstall<import("vue").Defi
11
7
  labelPosition: import("vue").PropType<import("./Checker").CheckerLabelPosition>;
12
8
  labelDisabled: BooleanConstructor;
13
9
  } & {
10
+ shape: {
11
+ type: import("vue").PropType<import("./Checker").CheckerShape>;
12
+ default: import("./Checker").CheckerShape;
13
+ };
14
14
  bindGroup: {
15
15
  type: BooleanConstructor;
16
16
  default: true;
17
17
  };
18
18
  }, () => 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<{
19
19
  name: import("vue").PropType<unknown>;
20
- shape: {
21
- type: import("vue").PropType<import("./Checker").CheckerShape>;
22
- default: import("./Checker").CheckerShape;
23
- };
24
20
  disabled: BooleanConstructor;
25
21
  iconSize: (NumberConstructor | StringConstructor)[];
26
22
  modelValue: import("vue").PropType<unknown>;
@@ -28,6 +24,10 @@ export declare const Checkbox: import("../utils").WithInstall<import("vue").Defi
28
24
  labelPosition: import("vue").PropType<import("./Checker").CheckerLabelPosition>;
29
25
  labelDisabled: BooleanConstructor;
30
26
  } & {
27
+ shape: {
28
+ type: import("vue").PropType<import("./Checker").CheckerShape>;
29
+ default: import("./Checker").CheckerShape;
30
+ };
31
31
  bindGroup: {
32
32
  type: BooleanConstructor;
33
33
  default: true;
@@ -20,8 +20,14 @@ export declare const fieldSharedProps: {
20
20
  inputAlign: PropType<FieldTextAlign>;
21
21
  placeholder: StringConstructor;
22
22
  autocomplete: StringConstructor;
23
+ autocapitalize: StringConstructor;
24
+ autocorrect: StringConstructor;
23
25
  errorMessage: StringConstructor;
24
26
  enterkeyhint: StringConstructor;
27
+ spellcheck: {
28
+ type: BooleanConstructor;
29
+ default: null;
30
+ };
25
31
  clearTrigger: {
26
32
  type: PropType<FieldClearTrigger>;
27
33
  default: FieldClearTrigger;
@@ -90,8 +96,14 @@ export declare const fieldProps: {
90
96
  inputAlign: PropType<FieldTextAlign>;
91
97
  placeholder: StringConstructor;
92
98
  autocomplete: StringConstructor;
99
+ autocapitalize: StringConstructor;
100
+ autocorrect: StringConstructor;
93
101
  errorMessage: StringConstructor;
94
102
  enterkeyhint: StringConstructor;
103
+ spellcheck: {
104
+ type: BooleanConstructor;
105
+ default: null;
106
+ };
95
107
  clearTrigger: {
96
108
  type: PropType<FieldClearTrigger>;
97
109
  default: FieldClearTrigger;
@@ -178,8 +190,14 @@ declare const _default: import("vue").DefineComponent<{
178
190
  inputAlign: PropType<FieldTextAlign>;
179
191
  placeholder: StringConstructor;
180
192
  autocomplete: StringConstructor;
193
+ autocapitalize: StringConstructor;
194
+ autocorrect: StringConstructor;
181
195
  errorMessage: StringConstructor;
182
196
  enterkeyhint: StringConstructor;
197
+ spellcheck: {
198
+ type: BooleanConstructor;
199
+ default: null;
200
+ };
183
201
  clearTrigger: {
184
202
  type: PropType<FieldClearTrigger>;
185
203
  default: FieldClearTrigger;
@@ -264,8 +282,14 @@ declare const _default: import("vue").DefineComponent<{
264
282
  inputAlign: PropType<FieldTextAlign>;
265
283
  placeholder: StringConstructor;
266
284
  autocomplete: StringConstructor;
285
+ autocapitalize: StringConstructor;
286
+ autocorrect: StringConstructor;
267
287
  errorMessage: StringConstructor;
268
288
  enterkeyhint: StringConstructor;
289
+ spellcheck: {
290
+ type: BooleanConstructor;
291
+ default: null;
292
+ };
269
293
  clearTrigger: {
270
294
  type: PropType<FieldClearTrigger>;
271
295
  default: FieldClearTrigger;
@@ -327,6 +351,7 @@ declare const _default: import("vue").DefineComponent<{
327
351
  clearable: boolean;
328
352
  clearIcon: string;
329
353
  modelValue: string | number;
354
+ spellcheck: boolean;
330
355
  clearTrigger: FieldClearTrigger;
331
356
  formatTrigger: FieldFormatTrigger;
332
357
  error: boolean;
@@ -23,8 +23,14 @@ const fieldSharedProps = {
23
23
  inputAlign: String,
24
24
  placeholder: String,
25
25
  autocomplete: String,
26
+ autocapitalize: String,
27
+ autocorrect: String,
26
28
  errorMessage: String,
27
29
  enterkeyhint: String,
30
+ spellcheck: {
31
+ type: Boolean,
32
+ default: null
33
+ },
28
34
  clearTrigger: makeStringProp("focus"),
29
35
  formatTrigger: makeStringProp("onChange"),
30
36
  error: {
@@ -352,7 +358,10 @@ var stdin_default = defineComponent({
352
358
  autofocus: props.autofocus,
353
359
  placeholder: props.placeholder,
354
360
  autocomplete: props.autocomplete,
361
+ autocapitalize: props.autocapitalize,
362
+ autocorrect: props.autocorrect,
355
363
  enterkeyhint: props.enterkeyhint,
364
+ spellcheck: props.spellcheck,
356
365
  "aria-labelledby": props.label ? `${id}-label` : void 0,
357
366
  onBlur,
358
367
  onFocus,
@@ -46,8 +46,14 @@ export declare const Field: import("../utils").WithInstall<import("vue").DefineC
46
46
  inputAlign: import("vue").PropType<import("./types").FieldTextAlign>;
47
47
  placeholder: StringConstructor;
48
48
  autocomplete: StringConstructor;
49
+ autocapitalize: StringConstructor;
50
+ autocorrect: StringConstructor;
49
51
  errorMessage: StringConstructor;
50
52
  enterkeyhint: StringConstructor;
53
+ spellcheck: {
54
+ type: BooleanConstructor;
55
+ default: null;
56
+ };
51
57
  clearTrigger: {
52
58
  type: import("vue").PropType<import("./types").FieldClearTrigger>;
53
59
  default: import("./types").FieldClearTrigger;
@@ -132,8 +138,14 @@ export declare const Field: import("../utils").WithInstall<import("vue").DefineC
132
138
  inputAlign: import("vue").PropType<import("./types").FieldTextAlign>;
133
139
  placeholder: StringConstructor;
134
140
  autocomplete: StringConstructor;
141
+ autocapitalize: StringConstructor;
142
+ autocorrect: StringConstructor;
135
143
  errorMessage: StringConstructor;
136
144
  enterkeyhint: StringConstructor;
145
+ spellcheck: {
146
+ type: BooleanConstructor;
147
+ default: null;
148
+ };
137
149
  clearTrigger: {
138
150
  type: import("vue").PropType<import("./types").FieldClearTrigger>;
139
151
  default: import("./types").FieldClearTrigger;
@@ -195,6 +207,7 @@ export declare const Field: import("../utils").WithInstall<import("vue").DefineC
195
207
  clearable: boolean;
196
208
  clearIcon: string;
197
209
  modelValue: string | number;
210
+ spellcheck: boolean;
198
211
  clearTrigger: import("./types").FieldClearTrigger;
199
212
  formatTrigger: import("./types").FieldFormatTrigger;
200
213
  error: boolean;
@@ -1,21 +1,16 @@
1
1
  import { PropType, type ExtractPropTypes } from 'vue';
2
- export type FloatingBubbleAxis = 'x' | 'y' | 'xy' | 'lock';
3
- export type FloatingBubbleMagnetic = 'x' | 'y';
4
- export type FloatingBubbleOffset = {
5
- x: number;
6
- y: number;
7
- };
2
+ import { FloatingBubbleAxis, FloatingBubbleMagnetic, FloatingBubbleOffset } from './types';
8
3
  export declare const floatingBubbleProps: {
4
+ gap: {
5
+ type: NumberConstructor;
6
+ default: number;
7
+ };
8
+ icon: StringConstructor;
9
9
  axis: {
10
10
  type: PropType<FloatingBubbleAxis>;
11
11
  default: FloatingBubbleAxis;
12
12
  };
13
13
  magnetic: PropType<FloatingBubbleMagnetic>;
14
- icon: StringConstructor;
15
- gap: {
16
- type: NumberConstructor;
17
- default: number;
18
- };
19
14
  offset: {
20
15
  type: PropType<FloatingBubbleOffset>;
21
16
  default: () => {
@@ -30,16 +25,16 @@ export declare const floatingBubbleProps: {
30
25
  };
31
26
  export type FloatingBubbleProps = ExtractPropTypes<typeof floatingBubbleProps>;
32
27
  declare const _default: import("vue").DefineComponent<{
28
+ gap: {
29
+ type: NumberConstructor;
30
+ default: number;
31
+ };
32
+ icon: StringConstructor;
33
33
  axis: {
34
34
  type: PropType<FloatingBubbleAxis>;
35
35
  default: FloatingBubbleAxis;
36
36
  };
37
37
  magnetic: PropType<FloatingBubbleMagnetic>;
38
- icon: StringConstructor;
39
- gap: {
40
- type: NumberConstructor;
41
- default: number;
42
- };
43
38
  offset: {
44
39
  type: PropType<FloatingBubbleOffset>;
45
40
  default: () => {
@@ -52,16 +47,16 @@ declare const _default: import("vue").DefineComponent<{
52
47
  default: string;
53
48
  };
54
49
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "update:offset" | "offsetChange")[], "click" | "update:offset" | "offsetChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
50
+ gap: {
51
+ type: NumberConstructor;
52
+ default: number;
53
+ };
54
+ icon: StringConstructor;
55
55
  axis: {
56
56
  type: PropType<FloatingBubbleAxis>;
57
57
  default: FloatingBubbleAxis;
58
58
  };
59
59
  magnetic: PropType<FloatingBubbleMagnetic>;
60
- icon: StringConstructor;
61
- gap: {
62
- type: NumberConstructor;
63
- default: number;
64
- };
65
60
  offset: {
66
61
  type: PropType<FloatingBubbleOffset>;
67
62
  default: () => {
@@ -1,14 +1,14 @@
1
1
  import { withDirectives as _withDirectives, vShow as _vShow, createVNode as _createVNode } from "vue";
2
2
  import { Teleport, computed, defineComponent, nextTick, onMounted, ref, watch, onActivated, onDeactivated } from "vue";
3
+ import { pick, addUnit, closest, createNamespace, makeNumberProp, makeStringProp, windowWidth, windowHeight } from "../utils/index.mjs";
3
4
  import { useRect, useEventListener } from "@vant/use";
4
5
  import { useTouch } from "../composables/use-touch.mjs";
5
- import { addUnit, closest, createNamespace, makeNumberProp, makeStringProp, pick, windowWidth, windowHeight } from "../utils/index.mjs";
6
6
  import Icon from "../icon/index.mjs";
7
7
  const floatingBubbleProps = {
8
+ gap: makeNumberProp(24),
9
+ icon: String,
8
10
  axis: makeStringProp("y"),
9
11
  magnetic: String,
10
- icon: String,
11
- gap: makeNumberProp(24),
12
12
  offset: {
13
13
  type: Object,
14
14
  default: () => ({
@@ -39,8 +39,8 @@ var stdin_default = defineComponent({
39
39
  });
40
40
  const boundary = computed(() => ({
41
41
  top: props.gap,
42
- right: windowWidth.value - state.value.height - props.gap,
43
- bottom: windowHeight.value - state.value.width - props.gap,
42
+ right: windowWidth.value - state.value.width - props.gap,
43
+ bottom: windowHeight.value - state.value.height - props.gap,
44
44
  left: props.gap
45
45
  }));
46
46
  const dragging = ref(false);
@@ -138,9 +138,7 @@ var stdin_default = defineComponent({
138
138
  initialized = true;
139
139
  });
140
140
  });
141
- watch([windowWidth, windowHeight, () => props.gap, () => props.offset], () => updateState(), {
142
- deep: true
143
- });
141
+ watch([windowWidth, windowHeight, () => props.gap, () => props.offset], updateState);
144
142
  const show = ref(true);
145
143
  onActivated(() => {
146
144
  show.value = true;
@@ -1 +1 @@
1
- :root{--van-floating-bubble-size: 48px;--van-floating-bubble-initial-gap: 24px;--van-floating-bubble-icon-size: 28px;--van-floating-bubble-background: var(--van-primary-color);--van-floating-bubble-color: var(--van-background-2);--van-floating-bubble-z-index: 999}.van-floating-bubble{position:fixed;left:0;top:0;right:var(--van-floating-bubble-initial-gap);bottom:var(--van-floating-bubble-initial-gap);width:var(--van-floating-bubble-size);height:var(--van-floating-bubble-size);box-sizing:border-box;display:flex;justify-content:center;align-items:center;overflow:hidden;cursor:pointer;-webkit-user-select:none;user-select:none;touch-action:none;background:var(--van-floating-bubble-background);color:var(--van-floating-bubble-color);border-radius:var(--van-radius-max);z-index:var(--van-floating-bubble-z-index);transition:transform .3s}.van-floating-bubble:active{opacity:.9}.van-floating-bubble__icon{font-size:var(--van-floating-bubble-icon-size)}
1
+ :root{--van-floating-bubble-size: 48px;--van-floating-bubble-initial-gap: 24px;--van-floating-bubble-icon-size: 28px;--van-floating-bubble-background: var(--van-primary-color);--van-floating-bubble-color: var(--van-background-2);--van-floating-bubble-z-index: 999;--van-floating-bubble-border-radius: var(--van-radius-max)}.van-floating-bubble{position:fixed;left:0;top:0;right:var(--van-floating-bubble-initial-gap);bottom:var(--van-floating-bubble-initial-gap);width:var(--van-floating-bubble-size);height:var(--van-floating-bubble-size);box-sizing:border-box;display:flex;justify-content:center;align-items:center;overflow:hidden;cursor:pointer;-webkit-user-select:none;user-select:none;touch-action:none;background:var(--van-floating-bubble-background);color:var(--van-floating-bubble-color);border-radius:var(--van-floating-bubble-border-radius);z-index:var(--van-floating-bubble-z-index);transition:transform var(--van-duration-base)}.van-floating-bubble:active{opacity:.8}.van-floating-bubble__icon{font-size:var(--van-floating-bubble-icon-size)}
@@ -1,16 +1,16 @@
1
1
  export declare const FloatingBubble: import("../utils").WithInstall<import("vue").DefineComponent<{
2
- axis: {
3
- type: import("vue").PropType<import("./FloatingBubble").FloatingBubbleAxis>;
4
- default: import("./FloatingBubble").FloatingBubbleAxis;
5
- };
6
- magnetic: import("vue").PropType<import("./FloatingBubble").FloatingBubbleMagnetic>;
7
- icon: StringConstructor;
8
2
  gap: {
9
3
  type: NumberConstructor;
10
4
  default: number;
11
5
  };
6
+ icon: StringConstructor;
7
+ axis: {
8
+ type: import("vue").PropType<import("./types").FloatingBubbleAxis>;
9
+ default: import("./types").FloatingBubbleAxis;
10
+ };
11
+ magnetic: import("vue").PropType<import("./types").FloatingBubbleMagnetic>;
12
12
  offset: {
13
- type: import("vue").PropType<import("./FloatingBubble").FloatingBubbleOffset>;
13
+ type: import("vue").PropType<import("./types").FloatingBubbleOffset>;
14
14
  default: () => {
15
15
  x: number;
16
16
  y: number;
@@ -21,18 +21,18 @@ export declare const FloatingBubble: import("../utils").WithInstall<import("vue"
21
21
  default: string;
22
22
  };
23
23
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "update:offset" | "offsetChange")[], "click" | "update:offset" | "offsetChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
24
- axis: {
25
- type: import("vue").PropType<import("./FloatingBubble").FloatingBubbleAxis>;
26
- default: import("./FloatingBubble").FloatingBubbleAxis;
27
- };
28
- magnetic: import("vue").PropType<import("./FloatingBubble").FloatingBubbleMagnetic>;
29
- icon: StringConstructor;
30
24
  gap: {
31
25
  type: NumberConstructor;
32
26
  default: number;
33
27
  };
28
+ icon: StringConstructor;
29
+ axis: {
30
+ type: import("vue").PropType<import("./types").FloatingBubbleAxis>;
31
+ default: import("./types").FloatingBubbleAxis;
32
+ };
33
+ magnetic: import("vue").PropType<import("./types").FloatingBubbleMagnetic>;
34
34
  offset: {
35
- type: import("vue").PropType<import("./FloatingBubble").FloatingBubbleOffset>;
35
+ type: import("vue").PropType<import("./types").FloatingBubbleOffset>;
36
36
  default: () => {
37
37
  x: number;
38
38
  y: number;
@@ -47,15 +47,15 @@ export declare const FloatingBubble: import("../utils").WithInstall<import("vue"
47
47
  "onUpdate:offset"?: ((...args: any[]) => any) | undefined;
48
48
  onOffsetChange?: ((...args: any[]) => any) | undefined;
49
49
  }, {
50
- offset: import("./FloatingBubble").FloatingBubbleOffset;
50
+ offset: import("./types").FloatingBubbleOffset;
51
51
  teleport: string | import("vue").RendererElement | null | undefined;
52
52
  gap: number;
53
- axis: import("./FloatingBubble").FloatingBubbleAxis;
53
+ axis: import("./types").FloatingBubbleAxis;
54
54
  }, {}>>;
55
55
  export default FloatingBubble;
56
56
  export { floatingBubbleProps } from './FloatingBubble';
57
- export type { FloatingBubbleProps, FloatingBubbleAxis, FloatingBubbleMagnetic, FloatingBubbleOffset, } from './FloatingBubble';
58
- export type { FloatingBubbleThemeVars } from './types';
57
+ export type { FloatingBubbleProps } from './FloatingBubble';
58
+ export type { FloatingBubbleThemeVars, FloatingBubbleAxis, FloatingBubbleMagnetic, FloatingBubbleOffset, } from './types';
59
59
  declare module 'vue' {
60
60
  interface GlobalComponents {
61
61
  FloatingBubble: typeof FloatingBubble;
@@ -2,7 +2,19 @@ export type FloatingBubbleThemeVars = {
2
2
  floatingBubbleSize?: string;
3
3
  floatingBubbleInitialGap?: string;
4
4
  floatingBubbleIconSize?: string;
5
- floatingBubbleBackground: string;
5
+ floatingBubbleBackground?: string;
6
6
  floatingBubbleColor?: string;
7
7
  floatingBubbleZIndex?: number | string;
8
8
  };
9
+ export type FloatingBubbleAxis = 'x' | 'y' | 'xy' | 'lock';
10
+ export type FloatingBubbleMagnetic = 'x' | 'y';
11
+ export type FloatingBubbleOffset = {
12
+ x: number;
13
+ y: number;
14
+ };
15
+ export type FloatingBubbleBoundary = {
16
+ top: number;
17
+ right: number;
18
+ bottom: number;
19
+ left: number;
20
+ };
@@ -1,13 +1,10 @@
1
1
  import { createVNode as _createVNode } from "vue";
2
2
  import { computed, defineComponent, ref, watch } from "vue";
3
- import { addUnit, closest, createNamespace, makeArrayProp, makeNumericProp, truthProp } from "../utils/index.mjs";
4
- import { useWindowSize, useEventListener } from "@vant/use";
3
+ import { addUnit, closest, createNamespace, makeArrayProp, makeNumericProp, truthProp, windowHeight } from "../utils/index.mjs";
4
+ import { useEventListener } from "@vant/use";
5
5
  import { useLockScroll } from "../composables/use-lock-scroll.mjs";
6
6
  import { useTouch } from "../composables/use-touch.mjs";
7
7
  import { useSyncPropRef } from "../composables/use-sync-prop-ref.mjs";
8
- const {
9
- height: windowHeight
10
- } = useWindowSize();
11
8
  const floatingPanelProps = {
12
9
  height: makeNumericProp(0),
13
10
  anchors: makeArrayProp(),
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.0";
108
+ export const version: "4.6.2";
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.0";
101
+ const version = "4.6.2";
102
102
  function install(app) {
103
103
  const components = [
104
104
  ActionBar,