vant 4.6.1 → 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.
- package/README.md +1 -1
- package/es/checkbox/Checkbox.d.ts +14 -13
- package/es/checkbox/Checkbox.mjs +2 -1
- package/es/checkbox/Checker.d.ts +9 -13
- package/es/checkbox/Checker.mjs +13 -3
- package/es/checkbox/index.d.ts +8 -8
- package/es/field/Field.d.ts +25 -0
- package/es/field/Field.mjs +9 -0
- package/es/field/index.d.ts +13 -0
- package/es/floating-bubble/FloatingBubble.d.ts +16 -21
- package/es/floating-bubble/FloatingBubble.mjs +6 -8
- package/es/floating-bubble/index.css +1 -1
- package/es/floating-bubble/index.d.ts +18 -18
- package/es/floating-bubble/types.d.ts +12 -0
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/pagination/index.css +1 -1
- package/es/radio/Radio.d.ts +18 -15
- package/es/radio/Radio.mjs +5 -3
- package/es/radio/index.css +1 -1
- package/es/radio/index.d.ts +11 -9
- package/es/radio/types.d.ts +1 -0
- package/es/search/Search.d.ts +19 -0
- package/es/search/index.d.ts +13 -0
- package/es/text-ellipsis/TextEllipsis.d.ts +13 -0
- package/es/text-ellipsis/TextEllipsis.mjs +50 -19
- package/es/text-ellipsis/index.d.ts +9 -0
- package/lib/checkbox/Checkbox.d.ts +14 -13
- package/lib/checkbox/Checkbox.js +1 -0
- package/lib/checkbox/Checker.d.ts +9 -13
- package/lib/checkbox/Checker.js +13 -3
- package/lib/checkbox/index.d.ts +8 -8
- package/lib/field/Field.d.ts +25 -0
- package/lib/field/Field.js +9 -0
- package/lib/field/index.d.ts +13 -0
- package/lib/floating-bubble/FloatingBubble.d.ts +16 -21
- package/lib/floating-bubble/FloatingBubble.js +6 -8
- package/lib/floating-bubble/index.css +1 -1
- package/lib/floating-bubble/index.d.ts +18 -18
- package/lib/floating-bubble/types.d.ts +12 -0
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/pagination/index.css +1 -1
- package/lib/radio/Radio.d.ts +18 -15
- package/lib/radio/Radio.js +4 -2
- package/lib/radio/index.css +1 -1
- package/lib/radio/index.d.ts +11 -9
- package/lib/radio/types.d.ts +1 -0
- package/lib/search/Search.d.ts +19 -0
- package/lib/search/index.d.ts +13 -0
- package/lib/text-ellipsis/TextEllipsis.d.ts +13 -0
- package/lib/text-ellipsis/TextEllipsis.js +49 -18
- package/lib/text-ellipsis/index.d.ts +9 -0
- package/lib/vant.cjs.js +82 -31
- package/lib/vant.es.js +82 -31
- package/lib/vant.js +82 -31
- package/lib/vant.min.js +1 -1
- package/lib/web-types.json +1 -1
- package/package.json +1 -1
package/lib/field/Field.d.ts
CHANGED
@@ -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;
|
package/lib/field/Field.js
CHANGED
@@ -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,
|
package/lib/field/index.d.ts
CHANGED
@@ -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
|
-
|
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.
|
76
|
-
bottom: import_utils.windowHeight.value - state.value.
|
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],
|
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
|
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("./
|
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("./
|
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("./
|
50
|
+
offset: import("./types").FloatingBubbleOffset;
|
51
51
|
teleport: string | import("vue").RendererElement | null | undefined;
|
52
52
|
gap: number;
|
53
|
-
axis: import("./
|
53
|
+
axis: import("./types").FloatingBubbleAxis;
|
54
54
|
}, {}>>;
|
55
55
|
export default FloatingBubble;
|
56
56
|
export { floatingBubbleProps } from './FloatingBubble';
|
57
|
-
export type { FloatingBubbleProps
|
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;
|
@@ -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
|
+
};
|