vant 4.6.1 → 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 (104) hide show
  1. package/README.md +1 -1
  2. package/es/address-list/AddressList.d.ts +13 -0
  3. package/es/address-list/AddressList.mjs +3 -2
  4. package/es/address-list/index.d.ts +9 -0
  5. package/es/checkbox/Checkbox.d.ts +14 -23
  6. package/es/checkbox/Checkbox.mjs +2 -1
  7. package/es/checkbox/Checker.d.ts +6 -15
  8. package/es/checkbox/Checker.mjs +18 -6
  9. package/es/checkbox/index.d.ts +2 -9
  10. package/es/checkbox-group/CheckboxGroup.d.ts +14 -1
  11. package/es/checkbox-group/CheckboxGroup.mjs +2 -1
  12. package/es/checkbox-group/index.d.ts +9 -0
  13. package/es/field/Field.d.ts +25 -0
  14. package/es/field/Field.mjs +9 -0
  15. package/es/field/index.d.ts +13 -0
  16. package/es/floating-bubble/FloatingBubble.d.ts +16 -21
  17. package/es/floating-bubble/FloatingBubble.mjs +6 -8
  18. package/es/floating-bubble/index.css +1 -1
  19. package/es/floating-bubble/index.d.ts +19 -19
  20. package/es/floating-bubble/types.d.ts +12 -0
  21. package/es/index.d.ts +1 -1
  22. package/es/index.mjs +1 -1
  23. package/es/pagination/index.css +1 -1
  24. package/es/radio/Radio.d.ts +18 -25
  25. package/es/radio/Radio.mjs +5 -3
  26. package/es/radio/index.css +1 -1
  27. package/es/radio/index.d.ts +4 -9
  28. package/es/radio/types.d.ts +1 -0
  29. package/es/radio-group/RadioGroup.d.ts +4 -0
  30. package/es/radio-group/RadioGroup.mjs +1 -0
  31. package/es/radio-group/index.d.ts +2 -0
  32. package/es/search/Search.d.ts +19 -0
  33. package/es/search/index.d.ts +13 -0
  34. package/es/tab/Tab.mjs +2 -2
  35. package/es/text-ellipsis/TextEllipsis.d.ts +13 -0
  36. package/es/text-ellipsis/TextEllipsis.mjs +50 -19
  37. package/es/text-ellipsis/index.d.ts +9 -0
  38. package/es/utils/basic.d.ts +8 -0
  39. package/es/utils/basic.mjs +28 -7
  40. package/es/utils/create.mjs +1 -2
  41. package/es/utils/deep-assign.mjs +1 -1
  42. package/es/utils/deep-clone.mjs +1 -1
  43. package/es/utils/dom.mjs +1 -1
  44. package/es/utils/format.mjs +1 -1
  45. package/es/utils/index.d.ts +0 -1
  46. package/es/utils/index.mjs +0 -1
  47. package/es/utils/interceptor.mjs +1 -2
  48. package/lib/address-list/AddressList.d.ts +13 -0
  49. package/lib/address-list/AddressList.js +3 -2
  50. package/lib/address-list/index.d.ts +9 -0
  51. package/lib/checkbox/Checkbox.d.ts +14 -23
  52. package/lib/checkbox/Checkbox.js +1 -0
  53. package/lib/checkbox/Checker.d.ts +6 -15
  54. package/lib/checkbox/Checker.js +17 -5
  55. package/lib/checkbox/index.d.ts +2 -9
  56. package/lib/checkbox-group/CheckboxGroup.d.ts +14 -1
  57. package/lib/checkbox-group/CheckboxGroup.js +1 -0
  58. package/lib/checkbox-group/index.d.ts +9 -0
  59. package/lib/field/Field.d.ts +25 -0
  60. package/lib/field/Field.js +9 -0
  61. package/lib/field/index.d.ts +13 -0
  62. package/lib/floating-bubble/FloatingBubble.d.ts +16 -21
  63. package/lib/floating-bubble/FloatingBubble.js +6 -8
  64. package/lib/floating-bubble/index.css +1 -1
  65. package/lib/floating-bubble/index.d.ts +19 -19
  66. package/lib/floating-bubble/types.d.ts +12 -0
  67. package/lib/index.css +1 -1
  68. package/lib/index.d.ts +1 -1
  69. package/lib/index.js +1 -1
  70. package/lib/pagination/index.css +1 -1
  71. package/lib/radio/Radio.d.ts +18 -25
  72. package/lib/radio/Radio.js +4 -2
  73. package/lib/radio/index.css +1 -1
  74. package/lib/radio/index.d.ts +4 -9
  75. package/lib/radio/types.d.ts +1 -0
  76. package/lib/radio-group/RadioGroup.d.ts +4 -0
  77. package/lib/radio-group/RadioGroup.js +1 -0
  78. package/lib/radio-group/index.d.ts +2 -0
  79. package/lib/search/Search.d.ts +19 -0
  80. package/lib/search/index.d.ts +13 -0
  81. package/lib/tab/Tab.js +2 -2
  82. package/lib/text-ellipsis/TextEllipsis.d.ts +13 -0
  83. package/lib/text-ellipsis/TextEllipsis.js +49 -18
  84. package/lib/text-ellipsis/index.d.ts +9 -0
  85. package/lib/utils/basic.d.ts +8 -0
  86. package/lib/utils/basic.js +29 -8
  87. package/lib/utils/create.js +1 -2
  88. package/lib/utils/deep-assign.js +3 -3
  89. package/lib/utils/deep-clone.js +3 -3
  90. package/lib/utils/dom.js +2 -2
  91. package/lib/utils/format.js +4 -4
  92. package/lib/utils/index.d.ts +0 -1
  93. package/lib/utils/index.js +0 -1
  94. package/lib/utils/interceptor.js +1 -2
  95. package/lib/vant.cjs.js +107 -48
  96. package/lib/vant.es.js +107 -48
  97. package/lib/vant.js +172 -59
  98. package/lib/vant.min.js +1 -1
  99. package/lib/web-types.json +1 -1
  100. package/package.json +1 -1
  101. package/es/utils/validate.d.ts +0 -9
  102. package/es/utils/validate.mjs +0 -22
  103. package/lib/utils/validate.d.ts +0 -9
  104. package/lib/utils/validate.js +0 -41
@@ -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;
@@ -30,6 +30,7 @@ var import_use_expose = require("../composables/use-expose");
30
30
  const [name, bem] = (0, import_utils.createNamespace)("checkbox-group");
31
31
  const checkboxGroupProps = {
32
32
  max: import_utils.numericProp,
33
+ shape: (0, import_utils.makeStringProp)("round"),
33
34
  disabled: Boolean,
34
35
  iconSize: import_utils.numericProp,
35
36
  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;
@@ -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;
@@ -47,8 +47,14 @@ const fieldSharedProps = {
47
47
  inputAlign: String,
48
48
  placeholder: String,
49
49
  autocomplete: String,
50
+ autocapitalize: String,
51
+ autocorrect: String,
50
52
  errorMessage: String,
51
53
  enterkeyhint: String,
54
+ spellcheck: {
55
+ type: Boolean,
56
+ default: null
57
+ },
52
58
  clearTrigger: (0, import_utils.makeStringProp)("focus"),
53
59
  formatTrigger: (0, import_utils.makeStringProp)("onChange"),
54
60
  error: {
@@ -376,7 +382,10 @@ var stdin_default = (0, import_vue2.defineComponent)({
376
382
  autofocus: props.autofocus,
377
383
  placeholder: props.placeholder,
378
384
  autocomplete: props.autocomplete,
385
+ autocapitalize: props.autocapitalize,
386
+ autocorrect: props.autocorrect,
379
387
  enterkeyhint: props.enterkeyhint,
388
+ spellcheck: props.spellcheck,
380
389
  "aria-labelledby": props.label ? `${id}-label` : void 0,
381
390
  onBlur,
382
391
  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: () => {
@@ -33,15 +33,15 @@ __export(stdin_exports, {
33
33
  module.exports = __toCommonJS(stdin_exports);
34
34
  var import_vue = require("vue");
35
35
  var import_vue2 = require("vue");
36
+ var import_utils = require("../utils");
36
37
  var import_use = require("@vant/use");
37
38
  var import_use_touch = require("../composables/use-touch");
38
- var import_utils = require("../utils");
39
39
  var import_icon = __toESM(require("../icon"));
40
40
  const floatingBubbleProps = {
41
+ gap: (0, import_utils.makeNumberProp)(24),
42
+ icon: String,
41
43
  axis: (0, import_utils.makeStringProp)("y"),
42
44
  magnetic: String,
43
- icon: String,
44
- gap: (0, import_utils.makeNumberProp)(24),
45
45
  offset: {
46
46
  type: Object,
47
47
  default: () => ({
@@ -72,8 +72,8 @@ var stdin_default = (0, import_vue2.defineComponent)({
72
72
  });
73
73
  const boundary = (0, import_vue2.computed)(() => ({
74
74
  top: props.gap,
75
- right: import_utils.windowWidth.value - state.value.height - props.gap,
76
- bottom: import_utils.windowHeight.value - state.value.width - props.gap,
75
+ right: import_utils.windowWidth.value - state.value.width - props.gap,
76
+ bottom: import_utils.windowHeight.value - state.value.height - props.gap,
77
77
  left: props.gap
78
78
  }));
79
79
  const dragging = (0, import_vue2.ref)(false);
@@ -171,9 +171,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
171
171
  initialized = true;
172
172
  });
173
173
  });
174
- (0, import_vue2.watch)([import_utils.windowWidth, import_utils.windowHeight, () => props.gap, () => props.offset], () => updateState(), {
175
- deep: true
176
- });
174
+ (0, import_vue2.watch)([import_utils.windowWidth, import_utils.windowHeight, () => props.gap, () => props.offset], updateState);
177
175
  const show = (0, import_vue2.ref)(true);
178
176
  (0, import_vue2.onActivated)(() => {
179
177
  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,17 +47,17 @@ 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
- FloatingBubble: typeof FloatingBubble;
61
+ VanFloatingBubble: typeof FloatingBubble;
62
62
  }
63
63
  }
@@ -6,3 +6,15 @@ export type FloatingBubbleThemeVars = {
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
+ };