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/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "vant",
|
3
|
-
"version": "4.6.
|
3
|
+
"version": "4.6.4-beta.0",
|
4
4
|
"description": "Mobile UI Components built on Vue",
|
5
5
|
"main": "lib/vant.cjs.js",
|
6
6
|
"module": "es/index.mjs",
|
@@ -12,18 +12,6 @@
|
|
12
12
|
"es",
|
13
13
|
"lib"
|
14
14
|
],
|
15
|
-
"scripts": {
|
16
|
-
"dev": "vant-cli dev",
|
17
|
-
"lint": "vant-cli lint",
|
18
|
-
"test": "vant-cli test",
|
19
|
-
"build": "vant-cli build",
|
20
|
-
"build:site": "vant-cli build-site",
|
21
|
-
"release": "cp ../../README.md ./ && vant-cli release && rm ./README.md",
|
22
|
-
"release:site": "pnpm build:site && npx gh-pages -d site-dist --add",
|
23
|
-
"test:update": "vant-cli test --updateSnapshot",
|
24
|
-
"test:watch": "vant-cli test --watch",
|
25
|
-
"test:coverage": "open test/coverage/index.html"
|
26
|
-
},
|
27
15
|
"publishConfig": {
|
28
16
|
"registry": "https://registry.npmjs.org/"
|
29
17
|
},
|
@@ -55,25 +43,32 @@
|
|
55
43
|
"devDependencies": {
|
56
44
|
"@types/jest": "^29.5.1",
|
57
45
|
"@types/node": "^18.16.3",
|
58
|
-
"@vant/area-data": "workspace:*",
|
59
|
-
"@vant/cli": "workspace:*",
|
60
|
-
"@vant/eslint-config": "workspace:*",
|
61
|
-
"@vant/icons": "workspace:*",
|
62
46
|
"@vue/runtime-core": "^3.3.4",
|
63
47
|
"@vue/test-utils": "^2.3.2",
|
64
48
|
"typescript": "^5.0.4",
|
65
49
|
"vue": "^3.3.4",
|
66
|
-
"vue-router": "^4.1.6"
|
50
|
+
"vue-router": "^4.1.6",
|
51
|
+
"@vant/eslint-config": "4.0.0",
|
52
|
+
"@vant/area-data": "1.5.0",
|
53
|
+
"@vant/cli": "6.2.0",
|
54
|
+
"@vant/icons": "2.0.1"
|
67
55
|
},
|
68
56
|
"sideEffects": [
|
69
57
|
"es/**/style/*",
|
70
58
|
"lib/**/style/*",
|
71
59
|
"*.css"
|
72
60
|
],
|
73
|
-
"
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
61
|
+
"web-types": "lib/web-types.json",
|
62
|
+
"scripts": {
|
63
|
+
"dev": "vant-cli dev",
|
64
|
+
"lint": "vant-cli lint",
|
65
|
+
"test": "vant-cli test",
|
66
|
+
"build": "vant-cli build",
|
67
|
+
"build:site": "vant-cli build-site",
|
68
|
+
"release": "cp ../../README.md ./ && vant-cli release --gitTag && rm ./README.md",
|
69
|
+
"release:site": "pnpm build:site && npx gh-pages -d site-dist --add",
|
70
|
+
"test:update": "vant-cli test --updateSnapshot",
|
71
|
+
"test:watch": "vant-cli test --watch",
|
72
|
+
"test:coverage": "open test/coverage/index.html"
|
73
|
+
}
|
74
|
+
}
|
package/es/utils/validate.d.ts
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
import { type Numeric } from './basic';
|
2
|
-
export declare const isDef: <T>(val: T) => val is NonNullable<T>;
|
3
|
-
export declare const isFunction: (val: unknown) => val is Function;
|
4
|
-
export declare const isObject: (val: unknown) => val is Record<any, any>;
|
5
|
-
export declare const isPromise: <T = any>(val: unknown) => val is Promise<T>;
|
6
|
-
export declare const isDate: (val: unknown) => val is Date;
|
7
|
-
export declare function isMobile(value: string): boolean;
|
8
|
-
export declare const isNumeric: (val: Numeric) => val is string;
|
9
|
-
export declare const isIOS: () => boolean;
|
package/es/utils/validate.mjs
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
import { inBrowser } from "./basic.mjs";
|
2
|
-
const isDef = (val) => val !== void 0 && val !== null;
|
3
|
-
const isFunction = (val) => typeof val === "function";
|
4
|
-
const isObject = (val) => val !== null && typeof val === "object";
|
5
|
-
const isPromise = (val) => isObject(val) && isFunction(val.then) && isFunction(val.catch);
|
6
|
-
const isDate = (val) => Object.prototype.toString.call(val) === "[object Date]" && !Number.isNaN(val.getTime());
|
7
|
-
function isMobile(value) {
|
8
|
-
value = value.replace(/[^-|\d]/g, "");
|
9
|
-
return /^((\+86)|(86))?(1)\d{10}$/.test(value) || /^0[0-9-]{10,13}$/.test(value);
|
10
|
-
}
|
11
|
-
const isNumeric = (val) => typeof val === "number" || /^\d+(\.\d+)?$/.test(val);
|
12
|
-
const isIOS = () => inBrowser ? /ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase()) : false;
|
13
|
-
export {
|
14
|
-
isDate,
|
15
|
-
isDef,
|
16
|
-
isFunction,
|
17
|
-
isIOS,
|
18
|
-
isMobile,
|
19
|
-
isNumeric,
|
20
|
-
isObject,
|
21
|
-
isPromise
|
22
|
-
};
|
package/lib/utils/validate.d.ts
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
import { type Numeric } from './basic';
|
2
|
-
export declare const isDef: <T>(val: T) => val is NonNullable<T>;
|
3
|
-
export declare const isFunction: (val: unknown) => val is Function;
|
4
|
-
export declare const isObject: (val: unknown) => val is Record<any, any>;
|
5
|
-
export declare const isPromise: <T = any>(val: unknown) => val is Promise<T>;
|
6
|
-
export declare const isDate: (val: unknown) => val is Date;
|
7
|
-
export declare function isMobile(value: string): boolean;
|
8
|
-
export declare const isNumeric: (val: Numeric) => val is string;
|
9
|
-
export declare const isIOS: () => boolean;
|
package/lib/utils/validate.js
DELETED
@@ -1,41 +0,0 @@
|
|
1
|
-
var __defProp = Object.defineProperty;
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
5
|
-
var __export = (target, all) => {
|
6
|
-
for (var name in all)
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
8
|
-
};
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
11
|
-
for (let key of __getOwnPropNames(from))
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
14
|
-
}
|
15
|
-
return to;
|
16
|
-
};
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
18
|
-
var stdin_exports = {};
|
19
|
-
__export(stdin_exports, {
|
20
|
-
isDate: () => isDate,
|
21
|
-
isDef: () => isDef,
|
22
|
-
isFunction: () => isFunction,
|
23
|
-
isIOS: () => isIOS,
|
24
|
-
isMobile: () => isMobile,
|
25
|
-
isNumeric: () => isNumeric,
|
26
|
-
isObject: () => isObject,
|
27
|
-
isPromise: () => isPromise
|
28
|
-
});
|
29
|
-
module.exports = __toCommonJS(stdin_exports);
|
30
|
-
var import_basic = require("./basic");
|
31
|
-
const isDef = (val) => val !== void 0 && val !== null;
|
32
|
-
const isFunction = (val) => typeof val === "function";
|
33
|
-
const isObject = (val) => val !== null && typeof val === "object";
|
34
|
-
const isPromise = (val) => isObject(val) && isFunction(val.then) && isFunction(val.catch);
|
35
|
-
const isDate = (val) => Object.prototype.toString.call(val) === "[object Date]" && !Number.isNaN(val.getTime());
|
36
|
-
function isMobile(value) {
|
37
|
-
value = value.replace(/[^-|\d]/g, "");
|
38
|
-
return /^((\+86)|(86))?(1)\d{10}$/.test(value) || /^0[0-9-]{10,13}$/.test(value);
|
39
|
-
}
|
40
|
-
const isNumeric = (val) => typeof val === "number" || /^\d+(\.\d+)?$/.test(val);
|
41
|
-
const isIOS = () => import_basic.inBrowser ? /ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase()) : false;
|