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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vant",
3
- "version": "4.6.1",
3
+ "version": "4.6.3",
4
4
  "description": "Mobile UI Components built on Vue",
5
5
  "main": "lib/vant.cjs.js",
6
6
  "module": "es/index.mjs",
@@ -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;
@@ -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
- };
@@ -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;
@@ -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;