vant 4.6.2 → 4.6.4-beta.0
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/es/address-list/AddressList.d.ts +13 -0
- package/es/address-list/AddressList.mjs +3 -2
- package/es/address-list/index.d.ts +9 -0
- package/es/checkbox/Checkbox.d.ts +13 -23
- package/es/checkbox/Checkbox.mjs +2 -2
- package/es/checkbox/Checker.d.ts +6 -11
- package/es/checkbox/Checker.mjs +8 -6
- package/es/checkbox/index.d.ts +2 -9
- package/es/checkbox-group/CheckboxGroup.d.ts +14 -1
- package/es/checkbox-group/CheckboxGroup.mjs +2 -1
- package/es/checkbox-group/index.d.ts +9 -0
- package/es/floating-bubble/index.d.ts +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/radio/Radio.d.ts +13 -23
- package/es/radio/Radio.mjs +2 -2
- package/es/radio/index.css +1 -1
- package/es/radio/index.d.ts +2 -9
- package/es/radio-group/RadioGroup.d.ts +4 -0
- package/es/radio-group/RadioGroup.mjs +1 -0
- package/es/radio-group/index.d.ts +2 -0
- package/es/tab/Tab.mjs +2 -2
- package/es/text-ellipsis/TextEllipsis.mjs +1 -1
- package/es/utils/basic.d.ts +8 -0
- package/es/utils/basic.mjs +28 -7
- package/es/utils/create.mjs +1 -2
- package/es/utils/deep-assign.mjs +1 -1
- package/es/utils/deep-clone.mjs +1 -1
- package/es/utils/dom.mjs +1 -1
- package/es/utils/format.mjs +1 -1
- package/es/utils/index.d.ts +0 -1
- package/es/utils/index.mjs +0 -1
- package/es/utils/interceptor.mjs +1 -2
- package/lib/address-list/AddressList.d.ts +13 -0
- package/lib/address-list/AddressList.js +3 -2
- package/lib/address-list/index.d.ts +9 -0
- package/lib/checkbox/Checkbox.d.ts +13 -23
- package/lib/checkbox/Checkbox.js +1 -1
- package/lib/checkbox/Checker.d.ts +6 -11
- package/lib/checkbox/Checker.js +7 -5
- package/lib/checkbox/index.d.ts +2 -9
- package/lib/checkbox-group/CheckboxGroup.d.ts +14 -1
- package/lib/checkbox-group/CheckboxGroup.js +1 -0
- package/lib/checkbox-group/index.d.ts +9 -0
- package/lib/floating-bubble/index.d.ts +1 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/radio/Radio.d.ts +13 -23
- package/lib/radio/Radio.js +1 -1
- package/lib/radio/index.css +1 -1
- package/lib/radio/index.d.ts +2 -9
- package/lib/radio-group/RadioGroup.d.ts +4 -0
- package/lib/radio-group/RadioGroup.js +1 -0
- package/lib/radio-group/index.d.ts +2 -0
- package/lib/tab/Tab.js +2 -2
- package/lib/text-ellipsis/TextEllipsis.js +1 -1
- package/lib/utils/basic.d.ts +8 -0
- package/lib/utils/basic.js +29 -8
- package/lib/utils/create.js +1 -2
- package/lib/utils/deep-assign.js +3 -3
- package/lib/utils/deep-clone.js +3 -3
- package/lib/utils/dom.js +2 -2
- package/lib/utils/format.js +4 -4
- package/lib/utils/index.d.ts +0 -1
- package/lib/utils/index.js +0 -1
- package/lib/utils/interceptor.js +1 -2
- package/lib/vant.cjs.js +32 -24
- package/lib/vant.es.js +32 -24
- package/lib/vant.js +97 -35
- package/lib/vant.min.js +1 -1
- package/lib/web-types.json +1 -1
- package/package.json +20 -25
- package/es/utils/validate.d.ts +0 -9
- package/es/utils/validate.mjs +0 -22
- package/lib/utils/validate.d.ts +0 -9
- package/lib/utils/validate.js +0 -41
package/es/utils/basic.d.ts
CHANGED
@@ -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];
|
package/es/utils/basic.mjs
CHANGED
@@ -1,8 +1,18 @@
|
|
1
|
-
import { isObject } from "./validate.mjs";
|
2
1
|
function noop() {
|
3
2
|
}
|
4
3
|
const extend = Object.assign;
|
5
4
|
const inBrowser = typeof window !== "undefined";
|
5
|
+
const isObject = (val) => val !== null && typeof val === "object";
|
6
|
+
const isDef = (val) => val !== void 0 && val !== null;
|
7
|
+
const isFunction = (val) => typeof val === "function";
|
8
|
+
const isPromise = (val) => isObject(val) && isFunction(val.then) && isFunction(val.catch);
|
9
|
+
const isDate = (val) => Object.prototype.toString.call(val) === "[object Date]" && !Number.isNaN(val.getTime());
|
10
|
+
function isMobile(value) {
|
11
|
+
value = value.replace(/[^-|\d]/g, "");
|
12
|
+
return /^((\+86)|(86))?(1)\d{10}$/.test(value) || /^0[0-9-]{10,13}$/.test(value);
|
13
|
+
}
|
14
|
+
const isNumeric = (val) => typeof val === "number" || /^\d+(\.\d+)?$/.test(val);
|
15
|
+
const isIOS = () => inBrowser ? /ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase()) : false;
|
6
16
|
function get(object, path) {
|
7
17
|
const keys = path.split(".");
|
8
18
|
let result = object;
|
@@ -13,12 +23,15 @@ function get(object, path) {
|
|
13
23
|
return result;
|
14
24
|
}
|
15
25
|
function pick(obj, keys, ignoreUndefined) {
|
16
|
-
return keys.reduce(
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
26
|
+
return keys.reduce(
|
27
|
+
(ret, key) => {
|
28
|
+
if (!ignoreUndefined || obj[key] !== void 0) {
|
29
|
+
ret[key] = obj[key];
|
30
|
+
}
|
31
|
+
return ret;
|
32
|
+
},
|
33
|
+
{}
|
34
|
+
);
|
22
35
|
}
|
23
36
|
const isSameValue = (newValue, oldValue) => JSON.stringify(newValue) === JSON.stringify(oldValue);
|
24
37
|
const toArray = (item) => Array.isArray(item) ? item : [item];
|
@@ -26,6 +39,14 @@ export {
|
|
26
39
|
extend,
|
27
40
|
get,
|
28
41
|
inBrowser,
|
42
|
+
isDate,
|
43
|
+
isDef,
|
44
|
+
isFunction,
|
45
|
+
isIOS,
|
46
|
+
isMobile,
|
47
|
+
isNumeric,
|
48
|
+
isObject,
|
49
|
+
isPromise,
|
29
50
|
isSameValue,
|
30
51
|
noop,
|
31
52
|
pick,
|
package/es/utils/create.mjs
CHANGED
@@ -1,6 +1,5 @@
|
|
1
|
-
import { get } from "./basic.mjs";
|
1
|
+
import { get, isFunction } from "./basic.mjs";
|
2
2
|
import { camelize } from "./format.mjs";
|
3
|
-
import { isFunction } from "./validate.mjs";
|
4
3
|
import locale from "../locale/index.mjs";
|
5
4
|
function createTranslate(name) {
|
6
5
|
const prefix = camelize(name) + ".";
|
package/es/utils/deep-assign.mjs
CHANGED
package/es/utils/deep-clone.mjs
CHANGED
package/es/utils/dom.mjs
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { useRect, useWindowSize } from "@vant/use";
|
2
2
|
import { unref } from "vue";
|
3
|
-
import { isIOS as checkIsIOS } from "./
|
3
|
+
import { isIOS as checkIsIOS } from "./basic.mjs";
|
4
4
|
function getScrollTop(el) {
|
5
5
|
const top = "scrollTop" in el ? el.scrollTop : el.pageYOffset;
|
6
6
|
return Math.max(top, 0);
|
package/es/utils/format.mjs
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { inBrowser } from "./basic.mjs";
|
2
2
|
import { windowWidth, windowHeight } from "./dom.mjs";
|
3
|
-
import { isDef, isNumeric } from "./
|
3
|
+
import { isDef, isNumeric } from "./basic.mjs";
|
4
4
|
function addUnit(value) {
|
5
5
|
if (isDef(value)) {
|
6
6
|
return isNumeric(value) ? `${value}px` : String(value);
|
package/es/utils/index.d.ts
CHANGED
package/es/utils/index.mjs
CHANGED
package/es/utils/interceptor.mjs
CHANGED
@@ -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;
|
@@ -44,6 +44,7 @@ const addressListProps = {
|
|
44
44
|
switchable: import_utils.truthProp,
|
45
45
|
disabledText: String,
|
46
46
|
disabledList: (0, import_utils.makeArrayProp)(),
|
47
|
+
showAddButton: import_utils.truthProp,
|
47
48
|
addButtonText: String,
|
48
49
|
defaultTagText: String,
|
49
50
|
rightIcon: (0, import_utils.makeStringProp)("edit")
|
@@ -85,7 +86,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
85
86
|
return list.map((item, index) => renderItem(item, index, disabled));
|
86
87
|
}
|
87
88
|
};
|
88
|
-
const renderBottom = () => (0, import_vue.createVNode)("div", {
|
89
|
+
const renderBottom = () => props.showAddButton ? (0, import_vue.createVNode)("div", {
|
89
90
|
"class": [bem("bottom"), "van-safe-area-bottom"]
|
90
91
|
}, [(0, import_vue.createVNode)(import_button.Button, {
|
91
92
|
"round": true,
|
@@ -94,7 +95,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
94
95
|
"text": props.addButtonText || t("add"),
|
95
96
|
"class": bem("add"),
|
96
97
|
"onClick": () => emit("add")
|
97
|
-
}, null)]);
|
98
|
+
}, null)]) : void 0;
|
98
99
|
return () => {
|
99
100
|
var _a, _b;
|
100
101
|
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:
|
4
|
+
name: PropType<unknown>;
|
5
5
|
disabled: BooleanConstructor;
|
6
6
|
iconSize: (NumberConstructor | StringConstructor)[];
|
7
|
-
modelValue:
|
7
|
+
modelValue: PropType<unknown>;
|
8
8
|
checkedColor: StringConstructor;
|
9
|
-
labelPosition:
|
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:
|
20
|
+
name: PropType<unknown>;
|
24
21
|
disabled: BooleanConstructor;
|
25
22
|
iconSize: (NumberConstructor | StringConstructor)[];
|
26
|
-
modelValue:
|
23
|
+
modelValue: PropType<unknown>;
|
27
24
|
checkedColor: StringConstructor;
|
28
|
-
labelPosition:
|
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:
|
34
|
+
name: PropType<unknown>;
|
41
35
|
disabled: BooleanConstructor;
|
42
36
|
iconSize: (NumberConstructor | StringConstructor)[];
|
43
|
-
modelValue:
|
37
|
+
modelValue: PropType<unknown>;
|
44
38
|
checkedColor: StringConstructor;
|
45
|
-
labelPosition:
|
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
|
}, {}>;
|
package/lib/checkbox/Checkbox.js
CHANGED
@@ -40,7 +40,7 @@ var import_use_expose = require("../composables/use-expose");
|
|
40
40
|
var import_Checker = __toESM(require("./Checker"));
|
41
41
|
const [name, bem] = (0, import_utils.createNamespace)("checkbox");
|
42
42
|
const checkboxProps = (0, import_utils.extend)({}, import_Checker.checkerProps, {
|
43
|
-
shape:
|
43
|
+
shape: String,
|
44
44
|
bindGroup: import_utils.truthProp
|
45
45
|
});
|
46
46
|
var stdin_default = (0, import_vue2.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
|
-
|
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
|
}, {}>;
|
package/lib/checkbox/Checker.js
CHANGED
@@ -38,7 +38,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
38
38
|
props: (0, import_utils.extend)({}, checkerProps, {
|
39
39
|
bem: (0, import_utils.makeRequiredProp)(Function),
|
40
40
|
role: String,
|
41
|
-
shape:
|
41
|
+
shape: String,
|
42
42
|
parent: Object,
|
43
43
|
checked: Boolean,
|
44
44
|
bindGroup: import_utils.truthProp
|
@@ -77,6 +77,9 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
77
77
|
};
|
78
78
|
}
|
79
79
|
});
|
80
|
+
const shape = (0, import_vue2.computed)(() => {
|
81
|
+
return props.shape || getParentProp("shape") || "round";
|
82
|
+
});
|
80
83
|
const onClick = (event) => {
|
81
84
|
const {
|
82
85
|
target
|
@@ -92,17 +95,16 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
92
95
|
var _a, _b;
|
93
96
|
const {
|
94
97
|
bem,
|
95
|
-
shape,
|
96
98
|
checked
|
97
99
|
} = props;
|
98
100
|
const iconSize = props.iconSize || getParentProp("iconSize");
|
99
101
|
return (0, import_vue.createVNode)("div", {
|
100
102
|
"ref": iconRef,
|
101
|
-
"class": bem("icon", [shape, {
|
103
|
+
"class": bem("icon", [shape.value, {
|
102
104
|
disabled: disabled.value,
|
103
105
|
checked
|
104
106
|
}]),
|
105
|
-
"style": shape !== "dot" ? {
|
107
|
+
"style": shape.value !== "dot" ? {
|
106
108
|
fontSize: (0, import_utils.addUnit)(iconSize)
|
107
109
|
} : {
|
108
110
|
width: (0, import_utils.addUnit)(iconSize),
|
@@ -112,7 +114,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
112
114
|
}, [slots.icon ? slots.icon({
|
113
115
|
checked,
|
114
116
|
disabled: disabled.value
|
115
|
-
}) : shape !== "dot" ? (0, import_vue.createVNode)(import_icon.Icon, {
|
117
|
+
}) : shape.value !== "dot" ? (0, import_vue.createVNode)(import_icon.Icon, {
|
116
118
|
"name": "success",
|
117
119
|
"style": iconStyle.value
|
118
120
|
}, null) : (0, import_vue.createVNode)("div", {
|
package/lib/checkbox/index.d.ts
CHANGED
@@ -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;
|
@@ -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;
|
@@ -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
|
-
|
61
|
+
VanFloatingBubble: typeof FloatingBubble;
|
62
62
|
}
|
63
63
|
}
|