@vuetify/nightly 3.7.12-master.2025-02-14 → 3.7.12-master.2025-02-17

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 (41) hide show
  1. package/CHANGELOG.md +12 -3
  2. package/dist/json/attributes.json +2936 -2924
  3. package/dist/json/importMap-labs.json +16 -16
  4. package/dist/json/importMap.json +174 -174
  5. package/dist/json/tags.json +3 -0
  6. package/dist/json/web-types.json +5456 -5428
  7. package/dist/vuetify-labs.css +3803 -3795
  8. package/dist/vuetify-labs.d.ts +80 -29
  9. package/dist/vuetify-labs.esm.js +109 -46
  10. package/dist/vuetify-labs.esm.js.map +1 -1
  11. package/dist/vuetify-labs.js +109 -46
  12. package/dist/vuetify-labs.min.css +2 -2
  13. package/dist/vuetify.css +3706 -3706
  14. package/dist/vuetify.d.ts +86 -74
  15. package/dist/vuetify.esm.js +20 -13
  16. package/dist/vuetify.esm.js.map +1 -1
  17. package/dist/vuetify.js +20 -13
  18. package/dist/vuetify.js.map +1 -1
  19. package/dist/vuetify.min.css +2 -2
  20. package/dist/vuetify.min.js +6 -6
  21. package/dist/vuetify.min.js.map +1 -1
  22. package/lib/components/VDataTable/composables/sort.mjs +12 -8
  23. package/lib/components/VDataTable/composables/sort.mjs.map +1 -1
  24. package/lib/components/VDatePicker/VDatePickerControls.mjs +1 -1
  25. package/lib/components/VDatePicker/VDatePickerControls.mjs.map +1 -1
  26. package/lib/components/VDatePicker/index.d.mts +27 -15
  27. package/lib/components/index.d.mts +27 -15
  28. package/lib/composables/calendar.mjs +4 -1
  29. package/lib/composables/calendar.mjs.map +1 -1
  30. package/lib/entry-bundler.mjs +1 -1
  31. package/lib/framework.mjs +1 -1
  32. package/lib/index.d.mts +59 -59
  33. package/lib/labs/VCalendar/index.d.mts +8 -2
  34. package/lib/labs/VDateInput/index.d.mts +8 -2
  35. package/lib/labs/VNumberInput/VNumberInput.css +10 -2
  36. package/lib/labs/VNumberInput/VNumberInput.mjs +93 -35
  37. package/lib/labs/VNumberInput/VNumberInput.mjs.map +1 -1
  38. package/lib/labs/VNumberInput/VNumberInput.sass +12 -2
  39. package/lib/labs/VNumberInput/index.d.mts +37 -10
  40. package/lib/labs/components.d.mts +53 -14
  41. package/package.json +1 -1
@@ -28339,7 +28339,10 @@ declare const VDatePicker: {
28339
28339
  max: vue.PropType<unknown>;
28340
28340
  min: vue.PropType<unknown>;
28341
28341
  year: NumberConstructor;
28342
- disabled: BooleanConstructor;
28342
+ disabled: {
28343
+ type: BooleanConstructor;
28344
+ default: null;
28345
+ };
28343
28346
  month: (StringConstructor | NumberConstructor)[];
28344
28347
  showAdjacentMonths: BooleanConstructor;
28345
28348
  weekdays: {
@@ -28450,7 +28453,10 @@ declare const VDatePicker: {
28450
28453
  max: vue.PropType<unknown>;
28451
28454
  min: vue.PropType<unknown>;
28452
28455
  year: NumberConstructor;
28453
- disabled: BooleanConstructor;
28456
+ disabled: {
28457
+ type: BooleanConstructor;
28458
+ default: null;
28459
+ };
28454
28460
  month: (StringConstructor | NumberConstructor)[];
28455
28461
  showAdjacentMonths: BooleanConstructor;
28456
28462
  weekdays: {
@@ -28522,7 +28528,7 @@ type VDatePicker = InstanceType<typeof VDatePicker>;
28522
28528
 
28523
28529
  declare const VDatePickerControls: {
28524
28530
  new (...args: any[]): vue.CreateComponentPublicInstance<{
28525
- disabled: string | boolean | string[];
28531
+ disabled: string | boolean | string[] | null;
28526
28532
  nextIcon: IconValue;
28527
28533
  prevIcon: IconValue;
28528
28534
  modeIcon: IconValue;
@@ -28552,7 +28558,7 @@ declare const VDatePickerControls: {
28552
28558
  'click:next': () => true;
28553
28559
  'click:text': () => true;
28554
28560
  }, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & {
28555
- disabled: string | boolean | string[];
28561
+ disabled: string | boolean | string[] | null;
28556
28562
  nextIcon: IconValue;
28557
28563
  prevIcon: IconValue;
28558
28564
  modeIcon: IconValue;
@@ -28577,7 +28583,7 @@ declare const VDatePickerControls: {
28577
28583
  "onClick:text"?: (() => any) | undefined;
28578
28584
  }, {
28579
28585
  active: string | string[];
28580
- disabled: string | boolean | string[];
28586
+ disabled: string | boolean | string[] | null;
28581
28587
  nextIcon: IconValue;
28582
28588
  prevIcon: IconValue;
28583
28589
  modeIcon: IconValue;
@@ -28592,7 +28598,7 @@ declare const VDatePickerControls: {
28592
28598
  M: {};
28593
28599
  Defaults: {};
28594
28600
  }, {
28595
- disabled: string | boolean | string[];
28601
+ disabled: string | boolean | string[] | null;
28596
28602
  nextIcon: IconValue;
28597
28603
  prevIcon: IconValue;
28598
28604
  modeIcon: IconValue;
@@ -28617,7 +28623,7 @@ declare const VDatePickerControls: {
28617
28623
  "onClick:text"?: (() => any) | undefined;
28618
28624
  }, {}, {}, {}, {}, {
28619
28625
  active: string | string[];
28620
- disabled: string | boolean | string[];
28626
+ disabled: string | boolean | string[] | null;
28621
28627
  nextIcon: IconValue;
28622
28628
  prevIcon: IconValue;
28623
28629
  modeIcon: IconValue;
@@ -28627,7 +28633,7 @@ declare const VDatePickerControls: {
28627
28633
  __isTeleport?: never;
28628
28634
  __isSuspense?: never;
28629
28635
  } & vue.ComponentOptionsBase<{
28630
- disabled: string | boolean | string[];
28636
+ disabled: string | boolean | string[] | null;
28631
28637
  nextIcon: IconValue;
28632
28638
  prevIcon: IconValue;
28633
28639
  modeIcon: IconValue;
@@ -28658,7 +28664,7 @@ declare const VDatePickerControls: {
28658
28664
  'click:text': () => true;
28659
28665
  }, string, {
28660
28666
  active: string | string[];
28661
- disabled: string | boolean | string[];
28667
+ disabled: string | boolean | string[] | null;
28662
28668
  nextIcon: IconValue;
28663
28669
  prevIcon: IconValue;
28664
28670
  modeIcon: IconValue;
@@ -28671,8 +28677,8 @@ declare const VDatePickerControls: {
28671
28677
  default: undefined;
28672
28678
  };
28673
28679
  disabled: {
28674
- type: PropType<boolean | string | string[]>;
28675
- default: boolean;
28680
+ type: PropType<boolean | string | string[] | null>;
28681
+ default: null;
28676
28682
  };
28677
28683
  nextIcon: {
28678
28684
  type: PropType<IconValue>;
@@ -28697,8 +28703,8 @@ declare const VDatePickerControls: {
28697
28703
  default: undefined;
28698
28704
  };
28699
28705
  disabled: {
28700
- type: PropType<boolean | string | string[]>;
28701
- default: boolean;
28706
+ type: PropType<boolean | string | string[] | null>;
28707
+ default: null;
28702
28708
  };
28703
28709
  nextIcon: {
28704
28710
  type: PropType<IconValue>;
@@ -29123,7 +29129,10 @@ declare const VDatePickerMonth: {
29123
29129
  }>>> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & FilterPropsOptions<{
29124
29130
  max: PropType<unknown>;
29125
29131
  min: PropType<unknown>;
29126
- disabled: BooleanConstructor;
29132
+ disabled: {
29133
+ type: BooleanConstructor;
29134
+ default: null;
29135
+ };
29127
29136
  month: (StringConstructor | NumberConstructor)[];
29128
29137
  year: (StringConstructor | NumberConstructor)[];
29129
29138
  modelValue: PropType<unknown[]>;
@@ -29168,7 +29177,10 @@ declare const VDatePickerMonth: {
29168
29177
  }, vue.ExtractPropTypes<{
29169
29178
  max: PropType<unknown>;
29170
29179
  min: PropType<unknown>;
29171
- disabled: BooleanConstructor;
29180
+ disabled: {
29181
+ type: BooleanConstructor;
29182
+ default: null;
29183
+ };
29172
29184
  month: (StringConstructor | NumberConstructor)[];
29173
29185
  year: (StringConstructor | NumberConstructor)[];
29174
29186
  modelValue: PropType<unknown[]>;
@@ -67384,7 +67396,10 @@ declare const VCalendar: {
67384
67396
  default: number;
67385
67397
  };
67386
67398
  allowedDates: vue.PropType<unknown[] | ((date: unknown) => boolean)>;
67387
- disabled: BooleanConstructor;
67399
+ disabled: {
67400
+ type: BooleanConstructor;
67401
+ default: null;
67402
+ };
67388
67403
  displayValue: vue.PropType<unknown>;
67389
67404
  modelValue: vue.PropType<unknown[]>;
67390
67405
  month: (StringConstructor | NumberConstructor)[];
@@ -67483,7 +67498,10 @@ declare const VCalendar: {
67483
67498
  default: number;
67484
67499
  };
67485
67500
  allowedDates: vue.PropType<unknown[] | ((date: unknown) => boolean)>;
67486
- disabled: BooleanConstructor;
67501
+ disabled: {
67502
+ type: BooleanConstructor;
67503
+ default: null;
67504
+ };
67487
67505
  displayValue: vue.PropType<unknown>;
67488
67506
  modelValue: vue.PropType<unknown[]>;
67489
67507
  month: (StringConstructor | NumberConstructor)[];
@@ -69199,7 +69217,10 @@ declare const VDateInput: {
69199
69217
  default: string;
69200
69218
  };
69201
69219
  text: StringConstructor;
69202
- disabled: BooleanConstructor;
69220
+ disabled: {
69221
+ type: BooleanConstructor;
69222
+ default: null;
69223
+ };
69203
69224
  multiple: PropType<boolean | "range" | number | (string & {})>;
69204
69225
  month: (StringConstructor | NumberConstructor)[];
69205
69226
  year: NumberConstructor;
@@ -69417,7 +69438,10 @@ declare const VDateInput: {
69417
69438
  default: string;
69418
69439
  };
69419
69440
  text: StringConstructor;
69420
- disabled: BooleanConstructor;
69441
+ disabled: {
69442
+ type: BooleanConstructor;
69443
+ default: null;
69444
+ };
69421
69445
  multiple: PropType<boolean | "range" | number | (string & {})>;
69422
69446
  month: (StringConstructor | NumberConstructor)[];
69423
69447
  year: NumberConstructor;
@@ -70920,7 +70944,7 @@ type VFileUploadItem = InstanceType<typeof VFileUploadItem>;
70920
70944
  type ControlSlot = {
70921
70945
  click: (e: MouseEvent) => void;
70922
70946
  };
70923
- type ControlVariant = 'default' | 'stacked' | 'split';
70947
+ type ControlVariant = 'default' | 'stacked' | 'split' | 'hidden';
70924
70948
  declare const VNumberInput: {
70925
70949
  new (...args: any[]): vue.CreateComponentPublicInstance<{
70926
70950
  flat: boolean;
@@ -70943,7 +70967,7 @@ declare const VNumberInput: {
70943
70967
  errorMessages: string | readonly string[] | null;
70944
70968
  maxErrors: string | number;
70945
70969
  rules: readonly ValidationRule$1[];
70946
- modelValue: Number | null;
70970
+ modelValue: number | null;
70947
70971
  tile: boolean;
70948
70972
  density: Density;
70949
70973
  clearIcon: IconValue;
@@ -70957,6 +70981,7 @@ declare const VNumberInput: {
70957
70981
  persistentCounter: boolean;
70958
70982
  hideInput: boolean;
70959
70983
  controlVariant: ControlVariant;
70984
+ precision: number | null;
70960
70985
  } & {
70961
70986
  name?: string | undefined;
70962
70987
  id?: string | undefined;
@@ -70980,6 +71005,8 @@ declare const VNumberInput: {
70980
71005
  bgColor?: string | undefined;
70981
71006
  prependIcon?: IconValue | undefined;
70982
71007
  appendIcon?: IconValue | undefined;
71008
+ appendInnerIcon?: IconValue | undefined;
71009
+ prependInnerIcon?: IconValue | undefined;
70983
71010
  'onClick:clear'?: ((args_0: MouseEvent) => void) | undefined;
70984
71011
  'onClick:append'?: ((args_0: MouseEvent) => void) | undefined;
70985
71012
  'onClick:prepend'?: ((args_0: MouseEvent) => void) | undefined;
@@ -73113,7 +73140,7 @@ declare const VNumberInput: {
73113
73140
  errorMessages: string | readonly string[] | null;
73114
73141
  maxErrors: string | number;
73115
73142
  rules: readonly ValidationRule$1[];
73116
- modelValue: Number | null;
73143
+ modelValue: number | null;
73117
73144
  tile: boolean;
73118
73145
  density: Density;
73119
73146
  clearIcon: IconValue;
@@ -73127,6 +73154,7 @@ declare const VNumberInput: {
73127
73154
  persistentCounter: boolean;
73128
73155
  hideInput: boolean;
73129
73156
  controlVariant: ControlVariant;
73157
+ precision: number | null;
73130
73158
  } & {
73131
73159
  name?: string | undefined;
73132
73160
  id?: string | undefined;
@@ -73150,6 +73178,8 @@ declare const VNumberInput: {
73150
73178
  bgColor?: string | undefined;
73151
73179
  prependIcon?: IconValue | undefined;
73152
73180
  appendIcon?: IconValue | undefined;
73181
+ appendInnerIcon?: IconValue | undefined;
73182
+ prependInnerIcon?: IconValue | undefined;
73153
73183
  'onClick:clear'?: ((args_0: MouseEvent) => void) | undefined;
73154
73184
  'onClick:append'?: ((args_0: MouseEvent) => void) | undefined;
73155
73185
  'onClick:prepend'?: ((args_0: MouseEvent) => void) | undefined;
@@ -73241,7 +73271,7 @@ declare const VNumberInput: {
73241
73271
  errorMessages: string | readonly string[] | null;
73242
73272
  maxErrors: string | number;
73243
73273
  rules: readonly ValidationRule$1[];
73244
- modelValue: Number | null;
73274
+ modelValue: number | null;
73245
73275
  rounded: string | number | boolean;
73246
73276
  tile: boolean;
73247
73277
  density: Density;
@@ -73257,6 +73287,7 @@ declare const VNumberInput: {
73257
73287
  persistentCounter: boolean;
73258
73288
  hideInput: boolean;
73259
73289
  controlVariant: ControlVariant;
73290
+ precision: number | null;
73260
73291
  }, true, {}, vue.SlotsType<Partial<{
73261
73292
  message: (arg: VMessageSlot) => vue.VNode[];
73262
73293
  clear: (arg: DefaultInputSlot & {
@@ -73303,7 +73334,7 @@ declare const VNumberInput: {
73303
73334
  errorMessages: string | readonly string[] | null;
73304
73335
  maxErrors: string | number;
73305
73336
  rules: readonly ValidationRule$1[];
73306
- modelValue: Number | null;
73337
+ modelValue: number | null;
73307
73338
  tile: boolean;
73308
73339
  density: Density;
73309
73340
  clearIcon: IconValue;
@@ -73317,6 +73348,7 @@ declare const VNumberInput: {
73317
73348
  persistentCounter: boolean;
73318
73349
  hideInput: boolean;
73319
73350
  controlVariant: ControlVariant;
73351
+ precision: number | null;
73320
73352
  } & {
73321
73353
  name?: string | undefined;
73322
73354
  id?: string | undefined;
@@ -73340,6 +73372,8 @@ declare const VNumberInput: {
73340
73372
  bgColor?: string | undefined;
73341
73373
  prependIcon?: IconValue | undefined;
73342
73374
  appendIcon?: IconValue | undefined;
73375
+ appendInnerIcon?: IconValue | undefined;
73376
+ prependInnerIcon?: IconValue | undefined;
73343
73377
  'onClick:clear'?: ((args_0: MouseEvent) => void) | undefined;
73344
73378
  'onClick:append'?: ((args_0: MouseEvent) => void) | undefined;
73345
73379
  'onClick:prepend'?: ((args_0: MouseEvent) => void) | undefined;
@@ -75471,7 +75505,7 @@ declare const VNumberInput: {
75471
75505
  errorMessages: string | readonly string[] | null;
75472
75506
  maxErrors: string | number;
75473
75507
  rules: readonly ValidationRule$1[];
75474
- modelValue: Number | null;
75508
+ modelValue: number | null;
75475
75509
  rounded: string | number | boolean;
75476
75510
  tile: boolean;
75477
75511
  density: Density;
@@ -75487,6 +75521,7 @@ declare const VNumberInput: {
75487
75521
  persistentCounter: boolean;
75488
75522
  hideInput: boolean;
75489
75523
  controlVariant: ControlVariant;
75524
+ precision: number | null;
75490
75525
  }>;
75491
75526
  __isFragment?: never;
75492
75527
  __isTeleport?: never;
@@ -75512,7 +75547,7 @@ declare const VNumberInput: {
75512
75547
  errorMessages: string | readonly string[] | null;
75513
75548
  maxErrors: string | number;
75514
75549
  rules: readonly ValidationRule$1[];
75515
- modelValue: Number | null;
75550
+ modelValue: number | null;
75516
75551
  tile: boolean;
75517
75552
  density: Density;
75518
75553
  clearIcon: IconValue;
@@ -75526,6 +75561,7 @@ declare const VNumberInput: {
75526
75561
  persistentCounter: boolean;
75527
75562
  hideInput: boolean;
75528
75563
  controlVariant: ControlVariant;
75564
+ precision: number | null;
75529
75565
  } & {
75530
75566
  name?: string | undefined;
75531
75567
  id?: string | undefined;
@@ -75549,6 +75585,8 @@ declare const VNumberInput: {
75549
75585
  bgColor?: string | undefined;
75550
75586
  prependIcon?: IconValue | undefined;
75551
75587
  appendIcon?: IconValue | undefined;
75588
+ appendInnerIcon?: IconValue | undefined;
75589
+ prependInnerIcon?: IconValue | undefined;
75552
75590
  'onClick:clear'?: ((args_0: MouseEvent) => void) | undefined;
75553
75591
  'onClick:append'?: ((args_0: MouseEvent) => void) | undefined;
75554
75592
  'onClick:prepend'?: ((args_0: MouseEvent) => void) | undefined;
@@ -77682,7 +77720,7 @@ declare const VNumberInput: {
77682
77720
  errorMessages: string | readonly string[] | null;
77683
77721
  maxErrors: string | number;
77684
77722
  rules: readonly ValidationRule$1[];
77685
- modelValue: Number | null;
77723
+ modelValue: number | null;
77686
77724
  rounded: string | number | boolean;
77687
77725
  tile: boolean;
77688
77726
  density: Density;
@@ -77698,6 +77736,7 @@ declare const VNumberInput: {
77698
77736
  persistentCounter: boolean;
77699
77737
  hideInput: boolean;
77700
77738
  controlVariant: ControlVariant;
77739
+ precision: number | null;
77701
77740
  }, {}, string, vue.SlotsType<Partial<{
77702
77741
  message: (arg: VMessageSlot) => vue.VNode[];
77703
77742
  clear: (arg: DefaultInputSlot & {
@@ -77800,6 +77839,8 @@ declare const VNumberInput: {
77800
77839
  type: PropType<IconValue>;
77801
77840
  default: string;
77802
77841
  };
77842
+ appendInnerIcon: PropType<IconValue>;
77843
+ prependInnerIcon: PropType<IconValue>;
77803
77844
  'onClick:clear': PropType<(args_0: MouseEvent) => void>;
77804
77845
  'onClick:append': PropType<(args_0: MouseEvent) => void>;
77805
77846
  'onClick:prepend': PropType<(args_0: MouseEvent) => void>;
@@ -77829,7 +77870,7 @@ declare const VNumberInput: {
77829
77870
  inset: BooleanConstructor;
77830
77871
  hideInput: BooleanConstructor;
77831
77872
  modelValue: {
77832
- type: PropType<Number | null>;
77873
+ type: PropType<number | null>;
77833
77874
  default: null;
77834
77875
  };
77835
77876
  min: {
@@ -77844,6 +77885,10 @@ declare const VNumberInput: {
77844
77885
  type: NumberConstructor;
77845
77886
  default: number;
77846
77887
  };
77888
+ precision: {
77889
+ type: PropType<number | null>;
77890
+ default: number;
77891
+ };
77847
77892
  }, vue.ExtractPropTypes<{
77848
77893
  flat: BooleanConstructor;
77849
77894
  reverse: BooleanConstructor;
@@ -77928,6 +77973,8 @@ declare const VNumberInput: {
77928
77973
  type: PropType<IconValue>;
77929
77974
  default: string;
77930
77975
  };
77976
+ appendInnerIcon: PropType<IconValue>;
77977
+ prependInnerIcon: PropType<IconValue>;
77931
77978
  'onClick:clear': PropType<(args_0: MouseEvent) => void>;
77932
77979
  'onClick:append': PropType<(args_0: MouseEvent) => void>;
77933
77980
  'onClick:prepend': PropType<(args_0: MouseEvent) => void>;
@@ -77957,7 +78004,7 @@ declare const VNumberInput: {
77957
78004
  inset: BooleanConstructor;
77958
78005
  hideInput: BooleanConstructor;
77959
78006
  modelValue: {
77960
- type: PropType<Number | null>;
78007
+ type: PropType<number | null>;
77961
78008
  default: null;
77962
78009
  };
77963
78010
  min: {
@@ -77972,6 +78019,10 @@ declare const VNumberInput: {
77972
78019
  type: NumberConstructor;
77973
78020
  default: number;
77974
78021
  };
78022
+ precision: {
78023
+ type: PropType<number | null>;
78024
+ default: number;
78025
+ };
77975
78026
  }>>;
77976
78027
  type VNumberInput = InstanceType<typeof VNumberInput>;
77977
78028
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Vuetify v3.7.12-master.2025-02-14
2
+ * Vuetify v3.7.12-master.2025-02-17
3
3
  * Forged by John Leider
4
4
  * Released under the MIT License.
5
5
  */
@@ -18830,15 +18830,19 @@ function provideSort(options) {
18830
18830
  })) ?? [];
18831
18831
  const item = newSortBy.find(x => x.key === column.key);
18832
18832
  if (!item) {
18833
- if (multiSort.value) newSortBy = [...newSortBy, {
18834
- key: column.key,
18835
- order: 'asc'
18836
- }];else newSortBy = [{
18837
- key: column.key,
18838
- order: 'asc'
18839
- }];
18833
+ if (multiSort.value) {
18834
+ newSortBy.push({
18835
+ key: column.key,
18836
+ order: 'asc'
18837
+ });
18838
+ } else {
18839
+ newSortBy = [{
18840
+ key: column.key,
18841
+ order: 'asc'
18842
+ }];
18843
+ }
18840
18844
  } else if (item.order === 'desc') {
18841
- if (mustSort.value) {
18845
+ if (mustSort.value && newSortBy.length === 1) {
18842
18846
  item.order = 'asc';
18843
18847
  } else {
18844
18848
  newSortBy = newSortBy.filter(x => x.key !== column.key);
@@ -21463,7 +21467,7 @@ const makeVDatePickerControlsProps = propsFactory({
21463
21467
  },
21464
21468
  disabled: {
21465
21469
  type: [Boolean, String, Array],
21466
- default: false
21470
+ default: null
21467
21471
  },
21468
21472
  nextIcon: {
21469
21473
  type: IconValue,
@@ -21645,7 +21649,10 @@ const VDatePickerHeader = genericComponent()({
21645
21649
  // Composables
21646
21650
  const makeCalendarProps = propsFactory({
21647
21651
  allowedDates: [Array, Function],
21648
- disabled: Boolean,
21652
+ disabled: {
21653
+ type: Boolean,
21654
+ default: null
21655
+ },
21649
21656
  displayValue: null,
21650
21657
  modelValue: Array,
21651
21658
  month: [Number, String],
@@ -28671,7 +28678,11 @@ const makeVNumberInputProps = propsFactory({
28671
28678
  type: Number,
28672
28679
  default: 1
28673
28680
  },
28674
- ...omit(makeVTextFieldProps({}), ['appendInnerIcon', 'modelValue', 'prependInnerIcon'])
28681
+ precision: {
28682
+ type: Number,
28683
+ default: 0
28684
+ },
28685
+ ...omit(makeVTextFieldProps({}), ['modelValue'])
28675
28686
  }, 'VNumberInput');
28676
28687
  const VNumberInput = genericComponent()({
28677
28688
  name: 'VNumberInput',
@@ -28685,27 +28696,37 @@ const VNumberInput = genericComponent()({
28685
28696
  let {
28686
28697
  slots
28687
28698
  } = _ref;
28688
- const _model = useProxiedModel(props, 'modelValue');
28689
- const model = computed({
28690
- get: () => _model.value,
28691
- // model.value could be empty string from VTextField
28692
- // but _model.value should be eventually kept in type Number | null
28699
+ const vTextFieldRef = ref();
28700
+ const form = useForm(props);
28701
+ const controlsDisabled = computed(() => form.isDisabled.value || form.isReadonly.value);
28702
+ const isFocused = ref(false);
28703
+ function correctPrecision(val) {
28704
+ let precision = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : props.precision;
28705
+ const fixed = precision == null ? String(val) : val.toFixed(precision);
28706
+ return isFocused.value ? Number(fixed).toString() // trim zeros
28707
+ : fixed;
28708
+ }
28709
+ const model = useProxiedModel(props, 'modelValue', null, val => val ?? null, val => val == null ? val ?? null : clamp(+val, props.min, props.max));
28710
+ const _inputText = shallowRef(null);
28711
+ watchEffect(() => {
28712
+ if (isFocused.value && !controlsDisabled.value) ; else if (model.value == null || controlsDisabled.value) {
28713
+ _inputText.value = model.value && !isNaN(model.value) ? String(model.value) : null;
28714
+ } else if (!isNaN(model.value)) {
28715
+ _inputText.value = correctPrecision(model.value);
28716
+ }
28717
+ });
28718
+ const inputText = computed({
28719
+ get: () => _inputText.value,
28693
28720
  set(val) {
28694
28721
  if (val === null || val === '') {
28695
- _model.value = null;
28696
- return;
28697
- }
28698
- const value = Number(val);
28699
- if (!isNaN(value) && value <= props.max && value >= props.min) {
28700
- _model.value = value;
28722
+ model.value = null;
28723
+ _inputText.value = null;
28724
+ } else if (!isNaN(+val) && +val <= props.max && +val >= props.min) {
28725
+ model.value = +val;
28726
+ _inputText.value = val;
28701
28727
  }
28702
28728
  }
28703
28729
  });
28704
- const vTextFieldRef = ref();
28705
- const stepDecimals = computed(() => getDecimals(props.step));
28706
- const modelDecimals = computed(() => typeof model.value === 'number' ? getDecimals(model.value) : 0);
28707
- const form = useForm(props);
28708
- const controlsDisabled = computed(() => form.isDisabled.value || form.isReadonly.value);
28709
28730
  const canIncrease = computed(() => {
28710
28731
  if (controlsDisabled.value) return false;
28711
28732
  return (model.value ?? 0) + props.step <= props.max;
@@ -28727,23 +28748,29 @@ const VNumberInput = genericComponent()({
28727
28748
  const decrementSlotProps = computed(() => ({
28728
28749
  click: onClickDown
28729
28750
  }));
28751
+ watch(() => props.precision, () => formatInputValue());
28730
28752
  onMounted(() => {
28731
- if (!controlsDisabled.value) {
28732
- clampModel();
28733
- }
28753
+ clampModel();
28734
28754
  });
28755
+ function inferPrecision(value) {
28756
+ if (value == null) return 0;
28757
+ const str = value.toString();
28758
+ const idx = str.indexOf('.');
28759
+ return ~idx ? str.length - idx : 0;
28760
+ }
28735
28761
  function toggleUpDown() {
28736
28762
  let increment = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
28737
28763
  if (controlsDisabled.value) return;
28738
28764
  if (model.value == null) {
28739
- model.value = clamp(0, props.min, props.max);
28765
+ inputText.value = correctPrecision(clamp(0, props.min, props.max));
28740
28766
  return;
28741
28767
  }
28742
- const decimals = Math.max(modelDecimals.value, stepDecimals.value);
28768
+ let inferredPrecision = Math.max(inferPrecision(model.value), inferPrecision(props.step));
28769
+ if (props.precision != null) inferredPrecision = Math.max(inferredPrecision, props.precision);
28743
28770
  if (increment) {
28744
- if (canIncrease.value) model.value = +(model.value + props.step).toFixed(decimals);
28771
+ if (canIncrease.value) inputText.value = correctPrecision(model.value + props.step, inferredPrecision);
28745
28772
  } else {
28746
- if (canDecrease.value) model.value = +(model.value - props.step).toFixed(decimals);
28773
+ if (canDecrease.value) inputText.value = correctPrecision(model.value - props.step, inferredPrecision);
28747
28774
  }
28748
28775
  }
28749
28776
  function onClickUp(e) {
@@ -28766,6 +28793,16 @@ const VNumberInput = genericComponent()({
28766
28793
  if (!/^-?(\d+(\.\d*)?|(\.\d+)|\d*|\.)$/.test(potentialNewInputVal)) {
28767
28794
  e.preventDefault();
28768
28795
  }
28796
+ if (props.precision == null) return;
28797
+
28798
+ // Ignore decimal digits above precision limit
28799
+ if (potentialNewInputVal.split('.')[1]?.length > props.precision) {
28800
+ e.preventDefault();
28801
+ }
28802
+ // Ignore decimal separator when precision = 0
28803
+ if (props.precision === 0 && potentialNewInputVal.includes('.')) {
28804
+ e.preventDefault();
28805
+ }
28769
28806
  }
28770
28807
  async function onKeydown(e) {
28771
28808
  if (['Enter', 'ArrowLeft', 'ArrowRight', 'Backspace', 'Delete', 'Tab'].includes(e.key) || e.ctrlKey) return;
@@ -28785,14 +28822,39 @@ const VNumberInput = genericComponent()({
28785
28822
  e.stopPropagation();
28786
28823
  }
28787
28824
  function clampModel() {
28825
+ if (controlsDisabled.value) return;
28788
28826
  if (!vTextFieldRef.value) return;
28789
- const inputText = vTextFieldRef.value.value;
28790
- if (inputText && !isNaN(+inputText)) {
28791
- model.value = clamp(+inputText, props.min, props.max);
28827
+ const actualText = vTextFieldRef.value.value;
28828
+ if (actualText && !isNaN(+actualText)) {
28829
+ inputText.value = correctPrecision(clamp(+actualText, props.min, props.max));
28792
28830
  } else {
28793
- model.value = null;
28831
+ inputText.value = null;
28794
28832
  }
28795
28833
  }
28834
+ function formatInputValue() {
28835
+ if (controlsDisabled.value) return;
28836
+ if (model.value === null || isNaN(model.value)) {
28837
+ inputText.value = null;
28838
+ return;
28839
+ }
28840
+ inputText.value = props.precision == null ? String(model.value) : model.value.toFixed(props.precision);
28841
+ }
28842
+ function trimDecimalZeros() {
28843
+ if (controlsDisabled.value) return;
28844
+ if (model.value === null || isNaN(model.value)) {
28845
+ inputText.value = null;
28846
+ return;
28847
+ }
28848
+ inputText.value = model.value.toString();
28849
+ }
28850
+ function onFocus() {
28851
+ isFocused.value = true;
28852
+ trimDecimalZeros();
28853
+ }
28854
+ function onBlur() {
28855
+ isFocused.value = false;
28856
+ clampModel();
28857
+ }
28796
28858
  useRender(() => {
28797
28859
  const {
28798
28860
  modelValue: _,
@@ -28870,20 +28932,21 @@ const VNumberInput = genericComponent()({
28870
28932
  "class": "v-number-input__control"
28871
28933
  }, [createVNode(VDivider, {
28872
28934
  "vertical": true
28873
- }, null), incrementControlNode()]) : props.reverse ? undefined : createVNode(Fragment, null, [dividerNode(), controlNode()]);
28935
+ }, null), incrementControlNode()]) : props.reverse || controlVariant.value === 'hidden' ? undefined : createVNode(Fragment, null, [dividerNode(), controlNode()]);
28874
28936
  const hasAppendInner = slots['append-inner'] || appendInnerControl;
28875
28937
  const prependInnerControl = controlVariant.value === 'split' ? createVNode("div", {
28876
28938
  "class": "v-number-input__control"
28877
28939
  }, [decrementControlNode(), createVNode(VDivider, {
28878
28940
  "vertical": true
28879
- }, null)]) : props.reverse ? createVNode(Fragment, null, [controlNode(), dividerNode()]) : undefined;
28941
+ }, null)]) : props.reverse && controlVariant.value !== 'hidden' ? createVNode(Fragment, null, [controlNode(), dividerNode()]) : undefined;
28880
28942
  const hasPrependInner = slots['prepend-inner'] || prependInnerControl;
28881
28943
  return createVNode(VTextField, mergeProps({
28882
28944
  "ref": vTextFieldRef,
28883
- "modelValue": model.value,
28884
- "onUpdate:modelValue": $event => model.value = $event,
28945
+ "modelValue": inputText.value,
28946
+ "onUpdate:modelValue": $event => inputText.value = $event,
28885
28947
  "onBeforeinput": onBeforeinput,
28886
- "onChange": clampModel,
28948
+ "onFocus": onFocus,
28949
+ "onBlur": onBlur,
28887
28950
  "onKeydown": onKeydown,
28888
28951
  "class": ['v-number-input', {
28889
28952
  'v-number-input--default': controlVariant.value === 'default',
@@ -30903,7 +30966,7 @@ function createVuetify$1() {
30903
30966
  goTo
30904
30967
  };
30905
30968
  }
30906
- const version$1 = "3.7.12-master.2025-02-14";
30969
+ const version$1 = "3.7.12-master.2025-02-17";
30907
30970
  createVuetify$1.version = version$1;
30908
30971
 
30909
30972
  // Vue's inject() can only be used in setup
@@ -31156,7 +31219,7 @@ var index = /*#__PURE__*/Object.freeze({
31156
31219
 
31157
31220
  /* eslint-disable local-rules/sort-imports */
31158
31221
 
31159
- const version = "3.7.12-master.2025-02-14";
31222
+ const version = "3.7.12-master.2025-02-17";
31160
31223
 
31161
31224
  /* eslint-disable local-rules/sort-imports */
31162
31225