vuetify 3.7.11 → 3.7.12

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 (59) hide show
  1. package/dist/json/attributes.json +2977 -2989
  2. package/dist/json/importMap-labs.json +24 -24
  3. package/dist/json/importMap.json +160 -160
  4. package/dist/json/tags.json +0 -3
  5. package/dist/json/web-types.json +5639 -5666
  6. package/dist/vuetify-labs.css +4359 -4358
  7. package/dist/vuetify-labs.d.ts +90 -165
  8. package/dist/vuetify-labs.esm.js +134 -58
  9. package/dist/vuetify-labs.esm.js.map +1 -1
  10. package/dist/vuetify-labs.js +134 -58
  11. package/dist/vuetify-labs.min.css +2 -2
  12. package/dist/vuetify.css +5092 -5091
  13. package/dist/vuetify.d.ts +130 -190
  14. package/dist/vuetify.esm.js +119 -52
  15. package/dist/vuetify.esm.js.map +1 -1
  16. package/dist/vuetify.js +119 -52
  17. package/dist/vuetify.js.map +1 -1
  18. package/dist/vuetify.min.css +2 -2
  19. package/dist/vuetify.min.js +1041 -1028
  20. package/dist/vuetify.min.js.map +1 -1
  21. package/lib/components/VAutocomplete/VAutocomplete.mjs +2 -2
  22. package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
  23. package/lib/components/VAutocomplete/index.d.mts +25 -47
  24. package/lib/components/VCombobox/VCombobox.mjs +3 -3
  25. package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
  26. package/lib/components/VCombobox/index.d.mts +25 -47
  27. package/lib/components/VDatePicker/VDatePickerMonth.mjs +2 -2
  28. package/lib/components/VDatePicker/VDatePickerMonth.mjs.map +1 -1
  29. package/lib/components/VDatePicker/index.d.mts +12 -24
  30. package/lib/components/VList/VList.mjs +1 -4
  31. package/lib/components/VList/VList.mjs.map +1 -1
  32. package/lib/components/VList/index.d.mts +7 -16
  33. package/lib/components/VOverlay/VOverlay.css +2 -1
  34. package/lib/components/VOverlay/VOverlay.sass +2 -1
  35. package/lib/components/VOverlay/_variables.scss +1 -1
  36. package/lib/components/VSelect/VSelect.mjs +4 -4
  37. package/lib/components/VSelect/VSelect.mjs.map +1 -1
  38. package/lib/components/VSelect/index.d.mts +25 -47
  39. package/lib/components/VSlider/slider.mjs +25 -12
  40. package/lib/components/VSlider/slider.mjs.map +1 -1
  41. package/lib/components/index.d.mts +73 -133
  42. package/lib/composables/calendar.mjs.map +1 -1
  43. package/lib/composables/list-items.mjs +70 -17
  44. package/lib/composables/list-items.mjs.map +1 -1
  45. package/lib/composables/nested/selectStrategies.mjs +6 -7
  46. package/lib/composables/nested/selectStrategies.mjs.map +1 -1
  47. package/lib/directives/ripple/index.mjs +7 -5
  48. package/lib/directives/ripple/index.mjs.map +1 -1
  49. package/lib/entry-bundler.mjs +1 -1
  50. package/lib/framework.mjs +1 -1
  51. package/lib/index.d.mts +57 -57
  52. package/lib/labs/VDateInput/VDateInput.mjs +17 -7
  53. package/lib/labs/VDateInput/VDateInput.mjs.map +1 -1
  54. package/lib/labs/VDateInput/index.d.mts +11 -17
  55. package/lib/labs/VTreeview/index.d.mts +7 -16
  56. package/lib/labs/components.d.mts +18 -33
  57. package/lib/util/helpers.mjs +3 -0
  58. package/lib/util/helpers.mjs.map +1 -1
  59. package/package.json +2 -2
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Vuetify v3.7.11
2
+ * Vuetify v3.7.12
3
3
  * Forged by John Leider
4
4
  * Released under the MIT License.
5
5
  */
@@ -577,6 +577,9 @@ function checkPrintable(e) {
577
577
  const noModifier = !e.ctrlKey && !e.metaKey && !e.altKey;
578
578
  return isPrintableChar && noModifier;
579
579
  }
580
+ function isPrimitive(value) {
581
+ return typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean' || typeof value === 'bigint';
582
+ }
580
583
 
581
584
  // Utilities
582
585
  const block = ['top', 'bottom'];
@@ -5345,11 +5348,13 @@ const ripples = {
5345
5348
  animation.classList.add('v-ripple__animation--visible');
5346
5349
  transform(animation, `translate(${x}, ${y}) scale3d(${scale},${scale},${scale})`);
5347
5350
  animation.dataset.activated = String(performance.now());
5348
- setTimeout(() => {
5349
- animation.classList.remove('v-ripple__animation--enter');
5350
- animation.classList.add('v-ripple__animation--in');
5351
- transform(animation, `translate(${centerX}, ${centerY}) scale3d(1,1,1)`);
5352
- }, 0);
5351
+ requestAnimationFrame(() => {
5352
+ requestAnimationFrame(() => {
5353
+ animation.classList.remove('v-ripple__animation--enter');
5354
+ animation.classList.add('v-ripple__animation--in');
5355
+ transform(animation, `translate(${centerX}, ${centerY}) scale3d(1,1,1)`);
5356
+ });
5357
+ });
5353
5358
  },
5354
5359
  hide(el) {
5355
5360
  if (!el?._ripple?.enabled) return;
@@ -8344,12 +8349,12 @@ const independentSelectStrategy = mandatory => {
8344
8349
  return selected;
8345
8350
  },
8346
8351
  in: (v, children, parents) => {
8347
- let map = new Map();
8352
+ const map = new Map();
8348
8353
  for (const id of v || []) {
8349
- map = strategy.select({
8354
+ strategy.select({
8350
8355
  id,
8351
8356
  value: true,
8352
- selected: new Map(map),
8357
+ selected: map,
8353
8358
  children,
8354
8359
  parents
8355
8360
  });
@@ -8384,11 +8389,10 @@ const independentSingleSelectStrategy = mandatory => {
8384
8389
  });
8385
8390
  },
8386
8391
  in: (v, children, parents) => {
8387
- let map = new Map();
8388
8392
  if (v?.length) {
8389
- map = parentStrategy.in(v.slice(0, 1), children, parents);
8393
+ return parentStrategy.in(v.slice(0, 1), children, parents);
8390
8394
  }
8391
- return map;
8395
+ return new Map();
8392
8396
  },
8393
8397
  out: (v, children, parents) => {
8394
8398
  return parentStrategy.out(v, children, parents);
@@ -8491,7 +8495,7 @@ const classicSelectStrategy = mandatory => {
8491
8495
  map = strategy.select({
8492
8496
  id,
8493
8497
  value: true,
8494
- selected: new Map(map),
8498
+ selected: map,
8495
8499
  children,
8496
8500
  parents
8497
8501
  });
@@ -9375,10 +9379,7 @@ const makeItemsProps = propsFactory({
9375
9379
  default: 'props'
9376
9380
  },
9377
9381
  returnObject: Boolean,
9378
- valueComparator: {
9379
- type: Function,
9380
- default: deepEqual
9381
- }
9382
+ valueComparator: Function
9382
9383
  }, 'list-items');
9383
9384
  function transformItem$3(props, item) {
9384
9385
  const title = getPropertyFromItem(item, props.itemTitle, item);
@@ -9399,29 +9400,85 @@ function transformItem$3(props, item) {
9399
9400
  };
9400
9401
  }
9401
9402
  function transformItems$3(props, items) {
9403
+ const _props = pick(props, ['itemTitle', 'itemValue', 'itemChildren', 'itemProps', 'returnObject', 'valueComparator']);
9402
9404
  const array = [];
9403
9405
  for (const item of items) {
9404
- array.push(transformItem$3(props, item));
9406
+ array.push(transformItem$3(_props, item));
9405
9407
  }
9406
9408
  return array;
9407
9409
  }
9408
9410
  function useItems(props) {
9409
9411
  const items = computed(() => transformItems$3(props, props.items));
9410
9412
  const hasNullItem = computed(() => items.value.some(item => item.value === null));
9413
+ const itemsMap = shallowRef(new Map());
9414
+ const keylessItems = shallowRef([]);
9415
+ watchEffect(() => {
9416
+ const _items = items.value;
9417
+ const map = new Map();
9418
+ const keyless = [];
9419
+ for (let i = 0; i < _items.length; i++) {
9420
+ const item = _items[i];
9421
+ if (isPrimitive(item.value) || item.value === null) {
9422
+ let values = map.get(item.value);
9423
+ if (!values) {
9424
+ values = [];
9425
+ map.set(item.value, values);
9426
+ }
9427
+ values.push(item);
9428
+ } else {
9429
+ keyless.push(item);
9430
+ }
9431
+ }
9432
+ itemsMap.value = map;
9433
+ keylessItems.value = keyless;
9434
+ });
9411
9435
  function transformIn(value) {
9412
- if (!hasNullItem.value) {
9436
+ // Cache unrefed values outside the loop,
9437
+ // proxy getters can be slow when you call them a billion times
9438
+ const _value = toRaw(value);
9439
+ const _items = itemsMap.value;
9440
+ const _allItems = items.value;
9441
+ const _keylessItems = keylessItems.value;
9442
+ const _hasNullItem = hasNullItem.value;
9443
+ const _returnObject = props.returnObject;
9444
+ const hasValueComparator = !!props.valueComparator;
9445
+ const valueComparator = props.valueComparator || deepEqual;
9446
+ const _props = pick(props, ['itemTitle', 'itemValue', 'itemChildren', 'itemProps', 'returnObject', 'valueComparator']);
9447
+ const returnValue = [];
9448
+ main: for (const v of _value) {
9413
9449
  // When the model value is null, return an InternalItem
9414
9450
  // based on null only if null is one of the items
9415
- value = value.filter(v => v !== null);
9416
- }
9417
- return value.map(v => {
9418
- if (props.returnObject && typeof v === 'string') {
9419
- // String model value means value is a custom input value from combobox
9420
- // Don't look up existing items if the model value is a string
9421
- return transformItem$3(props, v);
9451
+ if (!_hasNullItem && v === null) continue;
9452
+
9453
+ // String model value means value is a custom input value from combobox
9454
+ // Don't look up existing items if the model value is a string
9455
+ if (_returnObject && typeof v === 'string') {
9456
+ returnValue.push(transformItem$3(_props, v));
9457
+ continue;
9422
9458
  }
9423
- return items.value.find(item => props.valueComparator(v, item.value)) || transformItem$3(props, v);
9424
- });
9459
+
9460
+ // Fast path, items with primitive values and no
9461
+ // custom valueComparator can use a constant-time
9462
+ // map lookup instead of searching the items array
9463
+ const fastItems = _items.get(v);
9464
+
9465
+ // Slow path, always use valueComparator.
9466
+ // This is O(n^2) so we really don't want to
9467
+ // do it for more than a couple hundred items.
9468
+ if (hasValueComparator || !fastItems) {
9469
+ for (const item of hasValueComparator ? _allItems : _keylessItems) {
9470
+ if (valueComparator(v, item.value)) {
9471
+ returnValue.push(item);
9472
+ continue main;
9473
+ }
9474
+ }
9475
+ // Not an existing item, construct it from the model (#4000)
9476
+ returnValue.push(transformItem$3(_props, v));
9477
+ continue;
9478
+ }
9479
+ returnValue.push(...fastItems);
9480
+ }
9481
+ return returnValue;
9425
9482
  }
9426
9483
  function transformOut(value) {
9427
9484
  return props.returnObject ? value.map(_ref => {
@@ -9445,9 +9502,6 @@ function useItems(props) {
9445
9502
 
9446
9503
  // Types
9447
9504
 
9448
- function isPrimitive(value) {
9449
- return typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean';
9450
- }
9451
9505
  function transformItem$2(props, item) {
9452
9506
  const type = getPropertyFromItem(item, props.itemType, 'item');
9453
9507
  const title = isPrimitive(item) ? item : getPropertyFromItem(item, props.itemTitle);
@@ -12496,7 +12550,7 @@ const VSelect = genericComponent()({
12496
12550
  let keyboardLookupLastTime;
12497
12551
  const displayItems = computed(() => {
12498
12552
  if (props.hideSelected) {
12499
- return items.value.filter(item => !model.value.some(s => props.valueComparator(s, item)));
12553
+ return items.value.filter(item => !model.value.some(s => (props.valueComparator || deepEqual)(s, item)));
12500
12554
  }
12501
12555
  return items.value;
12502
12556
  });
@@ -12568,7 +12622,7 @@ const VSelect = genericComponent()({
12568
12622
  let set = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
12569
12623
  if (item.props.disabled) return;
12570
12624
  if (props.multiple) {
12571
- const index = model.value.findIndex(selection => props.valueComparator(selection.value, item.value));
12625
+ const index = model.value.findIndex(selection => (props.valueComparator || deepEqual)(selection.value, item.value));
12572
12626
  const add = set == null ? !~index : set;
12573
12627
  if (~index) {
12574
12628
  const value = add ? [...model.value, item] : [...model.value];
@@ -12615,7 +12669,7 @@ const VSelect = genericComponent()({
12615
12669
  }
12616
12670
  watch(menu, () => {
12617
12671
  if (!props.hideSelected && menu.value && model.value.length) {
12618
- const index = displayItems.value.findIndex(item => model.value.some(s => props.valueComparator(s.value, item.value)));
12672
+ const index = displayItems.value.findIndex(item => model.value.some(s => (props.valueComparator || deepEqual)(s.value, item.value)));
12619
12673
  IN_BROWSER && window.requestAnimationFrame(() => {
12620
12674
  index >= 0 && vVirtualScrollRef.value?.scrollToIndex(index);
12621
12675
  });
@@ -13147,7 +13201,7 @@ const VAutocomplete = genericComponent()({
13147
13201
  let set = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
13148
13202
  if (!item || item.props.disabled) return;
13149
13203
  if (props.multiple) {
13150
- const index = model.value.findIndex(selection => props.valueComparator(selection.value, item.value));
13204
+ const index = model.value.findIndex(selection => (props.valueComparator || deepEqual)(selection.value, item.value));
13151
13205
  const add = set == null ? !~index : set;
13152
13206
  if (~index) {
13153
13207
  const value = add ? [...model.value, item] : [...model.value];
@@ -15536,6 +15590,8 @@ const useSlider = _ref => {
15536
15590
  const trackContainerRef = ref();
15537
15591
  const activeThumbRef = ref();
15538
15592
  function parseMouseMove(e) {
15593
+ const el = trackContainerRef.value?.$el;
15594
+ if (!el) return;
15539
15595
  const vertical = props.direction === 'vertical';
15540
15596
  const start = vertical ? 'top' : 'left';
15541
15597
  const length = vertical ? 'height' : 'width';
@@ -15543,7 +15599,7 @@ const useSlider = _ref => {
15543
15599
  const {
15544
15600
  [start]: trackStart,
15545
15601
  [length]: trackLength
15546
- } = trackContainerRef.value?.$el.getBoundingClientRect();
15602
+ } = el.getBoundingClientRect();
15547
15603
  const clickOffset = getPosition(e, position);
15548
15604
 
15549
15605
  // It is possible for left to be NaN, force to number
@@ -15552,13 +15608,17 @@ const useSlider = _ref => {
15552
15608
  return roundValue(min.value + clickPos * (max.value - min.value));
15553
15609
  }
15554
15610
  const handleStop = e => {
15555
- onSliderEnd({
15556
- value: parseMouseMove(e)
15557
- });
15611
+ const value = parseMouseMove(e);
15612
+ if (value != null) {
15613
+ onSliderEnd({
15614
+ value
15615
+ });
15616
+ }
15558
15617
  mousePressed.value = false;
15559
15618
  startOffset.value = 0;
15560
15619
  };
15561
15620
  const handleStart = e => {
15621
+ const value = parseMouseMove(e);
15562
15622
  activeThumbRef.value = getActiveThumb(e);
15563
15623
  if (!activeThumbRef.value) return;
15564
15624
  mousePressed.value = true;
@@ -15566,13 +15626,17 @@ const useSlider = _ref => {
15566
15626
  startOffset.value = getOffset(e, activeThumbRef.value, props.direction);
15567
15627
  } else {
15568
15628
  startOffset.value = 0;
15569
- onSliderMove({
15570
- value: parseMouseMove(e)
15629
+ if (value != null) {
15630
+ onSliderMove({
15631
+ value
15632
+ });
15633
+ }
15634
+ }
15635
+ if (value != null) {
15636
+ onSliderStart({
15637
+ value
15571
15638
  });
15572
15639
  }
15573
- onSliderStart({
15574
- value: parseMouseMove(e)
15575
- });
15576
15640
  nextTick(() => activeThumbRef.value?.focus());
15577
15641
  };
15578
15642
  const moveListenerOptions = {
@@ -15580,9 +15644,12 @@ const useSlider = _ref => {
15580
15644
  capture: true
15581
15645
  };
15582
15646
  function onMouseMove(e) {
15583
- onSliderMove({
15584
- value: parseMouseMove(e)
15585
- });
15647
+ const value = parseMouseMove(e);
15648
+ if (value != null) {
15649
+ onSliderMove({
15650
+ value
15651
+ });
15652
+ }
15586
15653
  }
15587
15654
  function onSliderMouseUp(e) {
15588
15655
  e.stopPropagation();
@@ -17021,7 +17088,7 @@ const VCombobox = genericComponent()({
17021
17088
  let set = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
17022
17089
  if (!item || item.props.disabled) return;
17023
17090
  if (props.multiple) {
17024
- const index = model.value.findIndex(selection => props.valueComparator(selection.value, item.value));
17091
+ const index = model.value.findIndex(selection => (props.valueComparator || deepEqual)(selection.value, item.value));
17025
17092
  const add = set == null ? !~index : set;
17026
17093
  if (~index) {
17027
17094
  const value = add ? [...model.value, item] : [...model.value];
@@ -17081,7 +17148,7 @@ const VCombobox = genericComponent()({
17081
17148
  });
17082
17149
  watch(menu, () => {
17083
17150
  if (!props.hideSelected && menu.value && model.value.length) {
17084
- const index = displayItems.value.findIndex(item => model.value.some(s => props.valueComparator(s.value, item.value)));
17151
+ const index = displayItems.value.findIndex(item => model.value.some(s => (props.valueComparator || deepEqual)(s.value, item.value)));
17085
17152
  IN_BROWSER && window.requestAnimationFrame(() => {
17086
17153
  index >= 0 && vVirtualScrollRef.value?.scrollToIndex(index);
17087
17154
  });
@@ -21715,7 +21782,7 @@ const makeVDatePickerMonthProps = propsFactory({
21715
21782
  type: String,
21716
21783
  default: 'picker-reverse-transition'
21717
21784
  },
21718
- ...makeCalendarProps()
21785
+ ...omit(makeCalendarProps(), ['displayValue'])
21719
21786
  }, 'VDatePickerMonth');
21720
21787
  const VDatePickerMonth = genericComponent()({
21721
21788
  name: 'VDatePickerMonth',
@@ -28124,7 +28191,7 @@ const makeVDateInputProps = propsFactory({
28124
28191
  ...omit(makeVDatePickerProps({
28125
28192
  weeksInMonth: 'dynamic',
28126
28193
  hideHeader: true
28127
- }), ['active', 'location'])
28194
+ }), ['active', 'location', 'rounded'])
28128
28195
  }, 'VDateInput');
28129
28196
  const VDateInput = genericComponent()({
28130
28197
  name: 'VDateInput',
@@ -28145,8 +28212,9 @@ const VDateInput = genericComponent()({
28145
28212
  focus,
28146
28213
  blur
28147
28214
  } = useFocus(props);
28148
- const model = useProxiedModel(props, 'modelValue', props.multiple ? [] : null);
28215
+ const model = useProxiedModel(props, 'modelValue', props.multiple ? [] : null, val => Array.isArray(val) ? val.map(item => adapter.toJsDate(item)) : val ? adapter.toJsDate(val) : val, val => Array.isArray(val) ? val.map(item => adapter.date(item)) : val ? adapter.date(val) : val);
28149
28216
  const menu = shallowRef(false);
28217
+ const vDateInputRef = ref();
28150
28218
  const display = computed(() => {
28151
28219
  const value = wrapInArray(model.value);
28152
28220
  if (!value.length) return null;
@@ -28168,7 +28236,7 @@ const VDateInput = genericComponent()({
28168
28236
  return;
28169
28237
  }
28170
28238
  const target = e.target;
28171
- model.value = adapter.date(target.value);
28239
+ model.value = target.value;
28172
28240
  }
28173
28241
  function onClick(e) {
28174
28242
  e.preventDefault();
@@ -28178,11 +28246,17 @@ const VDateInput = genericComponent()({
28178
28246
  function onSave() {
28179
28247
  menu.value = false;
28180
28248
  }
28249
+ function onUpdateModel(value) {
28250
+ if (value != null) return;
28251
+ model.value = null;
28252
+ }
28181
28253
  useRender(() => {
28182
28254
  const confirmEditProps = VConfirmEdit.filterProps(props);
28183
- const datePickerProps = VDatePicker.filterProps(omit(props, ['active', 'location']));
28255
+ const datePickerProps = VDatePicker.filterProps(omit(props, ['active', 'location', 'rounded']));
28184
28256
  const textFieldProps = VTextField.filterProps(props);
28185
- return createVNode(VTextField, mergeProps(textFieldProps, {
28257
+ return createVNode(VTextField, mergeProps({
28258
+ "ref": vDateInputRef
28259
+ }, textFieldProps, {
28186
28260
  "class": props.class,
28187
28261
  "style": props.style,
28188
28262
  "modelValue": display.value,
@@ -28191,7 +28265,8 @@ const VDateInput = genericComponent()({
28191
28265
  "onFocus": focus,
28192
28266
  "onBlur": blur,
28193
28267
  "onClick:control": isInteractive.value ? onClick : undefined,
28194
- "onClick:prepend": isInteractive.value ? onClick : undefined
28268
+ "onClick:prepend": isInteractive.value ? onClick : undefined,
28269
+ "onUpdate:modelValue": onUpdateModel
28195
28270
  }), {
28196
28271
  default: () => [createVNode(VMenu, {
28197
28272
  "modelValue": menu.value,
@@ -28239,6 +28314,7 @@ const VDateInput = genericComponent()({
28239
28314
  }), slots.default?.()]
28240
28315
  });
28241
28316
  });
28317
+ return forwardRefs({}, vDateInputRef);
28242
28318
  }
28243
28319
  });
28244
28320
 
@@ -30817,7 +30893,7 @@ function createVuetify$1() {
30817
30893
  goTo
30818
30894
  };
30819
30895
  }
30820
- const version$1 = "3.7.11";
30896
+ const version$1 = "3.7.12";
30821
30897
  createVuetify$1.version = version$1;
30822
30898
 
30823
30899
  // Vue's inject() can only be used in setup
@@ -31070,7 +31146,7 @@ var index = /*#__PURE__*/Object.freeze({
31070
31146
 
31071
31147
  /* eslint-disable local-rules/sort-imports */
31072
31148
 
31073
- const version = "3.7.11";
31149
+ const version = "3.7.12";
31074
31150
 
31075
31151
  /* eslint-disable local-rules/sort-imports */
31076
31152