vant 4.9.3 → 4.9.5

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 (45) hide show
  1. package/es/calendar/Calendar.mjs +5 -3
  2. package/es/calendar/index.css +1 -1
  3. package/es/calendar/types.d.ts +2 -2
  4. package/es/field/Field.d.ts +8 -0
  5. package/es/field/Field.mjs +8 -1
  6. package/es/field/index.d.ts +4 -0
  7. package/es/index.d.ts +1 -1
  8. package/es/index.mjs +1 -1
  9. package/es/lazyload/vue-lazyload/index.d.ts +1 -1
  10. package/es/locale/lang/kk-KZ.d.ts +63 -0
  11. package/es/locale/lang/kk-KZ.mjs +81 -0
  12. package/es/overlay/Overlay.d.ts +3 -0
  13. package/es/overlay/Overlay.mjs +19 -8
  14. package/es/overlay/index.d.ts +2 -0
  15. package/es/search/Search.d.ts +6 -0
  16. package/es/search/index.d.ts +4 -0
  17. package/es/slider/Slider.d.ts +1 -1
  18. package/es/slider/index.d.ts +1 -1
  19. package/es/swipe-cell/SwipeCell.mjs +7 -3
  20. package/lib/calendar/Calendar.js +5 -3
  21. package/lib/calendar/index.css +1 -1
  22. package/lib/calendar/types.d.ts +2 -2
  23. package/lib/field/Field.d.ts +8 -0
  24. package/lib/field/Field.js +7 -0
  25. package/lib/field/index.d.ts +4 -0
  26. package/lib/index.css +1 -1
  27. package/lib/index.d.ts +1 -1
  28. package/lib/index.js +1 -1
  29. package/lib/lazyload/vue-lazyload/index.d.ts +1 -1
  30. package/lib/locale/lang/kk-KZ.d.ts +63 -0
  31. package/lib/locale/lang/kk-KZ.js +100 -0
  32. package/lib/overlay/Overlay.d.ts +3 -0
  33. package/lib/overlay/Overlay.js +18 -7
  34. package/lib/overlay/index.d.ts +2 -0
  35. package/lib/search/Search.d.ts +6 -0
  36. package/lib/search/index.d.ts +4 -0
  37. package/lib/slider/Slider.d.ts +1 -1
  38. package/lib/slider/index.d.ts +1 -1
  39. package/lib/swipe-cell/SwipeCell.js +7 -3
  40. package/lib/vant.cjs.js +38 -14
  41. package/lib/vant.es.js +39 -15
  42. package/lib/vant.js +38 -14
  43. package/lib/vant.min.js +2 -2
  44. package/lib/web-types.json +1 -1
  45. package/package.json +8 -8
@@ -41,6 +41,8 @@ const fieldSharedProps = {
41
41
  autofocus: Boolean,
42
42
  clearable: Boolean,
43
43
  maxlength: import_utils.numericProp,
44
+ max: Number,
45
+ min: Number,
44
46
  formatter: Function,
45
47
  clearIcon: (0, import_utils.makeStringProp)("clear"),
46
48
  modelValue: (0, import_utils.makeNumericProp)(""),
@@ -238,12 +240,17 @@ var stdin_default = (0, import_vue2.defineComponent)({
238
240
  return value;
239
241
  };
240
242
  const updateValue = (value, trigger = "onChange") => {
243
+ var _a, _b;
241
244
  const originalValue = value;
242
245
  value = limitValueLength(value);
243
246
  const limitDiffLen = (0, import_utils2.getStringLength)(originalValue) - (0, import_utils2.getStringLength)(value);
244
247
  if (props.type === "number" || props.type === "digit") {
245
248
  const isNumber = props.type === "number";
246
249
  value = (0, import_utils.formatNumber)(value, isNumber, isNumber);
250
+ if (trigger === "onBlur" && value !== "") {
251
+ const adjustedValue = (0, import_utils.clamp)(+value, (_a = props.min) != null ? _a : -Infinity, (_b = props.max) != null ? _b : Infinity);
252
+ value = adjustedValue.toString();
253
+ }
247
254
  }
248
255
  let formatterDiffLen = 0;
249
256
  if (props.formatter && trigger === props.formatTrigger) {
@@ -37,6 +37,8 @@ export declare const Field: import("../utils").WithInstall<import("vue").DefineC
37
37
  autofocus: BooleanConstructor;
38
38
  clearable: BooleanConstructor;
39
39
  maxlength: (NumberConstructor | StringConstructor)[];
40
+ max: NumberConstructor;
41
+ min: NumberConstructor;
40
42
  formatter: import("vue").PropType<(value: string) => string>;
41
43
  clearIcon: {
42
44
  type: import("vue").PropType<string>;
@@ -132,6 +134,8 @@ export declare const Field: import("../utils").WithInstall<import("vue").DefineC
132
134
  autofocus: BooleanConstructor;
133
135
  clearable: BooleanConstructor;
134
136
  maxlength: (NumberConstructor | StringConstructor)[];
137
+ max: NumberConstructor;
138
+ min: NumberConstructor;
135
139
  formatter: import("vue").PropType<(value: string) => string>;
136
140
  clearIcon: {
137
141
  type: import("vue").PropType<string>;