@vuetify/nightly 3.6.3-master.2024-05-07 → 3.6.4-master.2024-05-08

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 (85) hide show
  1. package/CHANGELOG.md +2 -17
  2. package/dist/json/attributes.json +30 -30
  3. package/dist/json/importMap-labs.json +14 -14
  4. package/dist/json/importMap.json +110 -110
  5. package/dist/json/web-types.json +63 -63
  6. package/dist/vuetify-labs.css +2972 -2948
  7. package/dist/vuetify-labs.d.ts +995 -966
  8. package/dist/vuetify-labs.esm.js +88 -61
  9. package/dist/vuetify-labs.esm.js.map +1 -1
  10. package/dist/vuetify-labs.js +87 -60
  11. package/dist/vuetify-labs.min.css +2 -2
  12. package/dist/vuetify.css +1224 -1204
  13. package/dist/vuetify.d.ts +964 -935
  14. package/dist/vuetify.esm.js +88 -61
  15. package/dist/vuetify.esm.js.map +1 -1
  16. package/dist/vuetify.js +87 -60
  17. package/dist/vuetify.js.map +1 -1
  18. package/dist/vuetify.min.css +2 -2
  19. package/dist/vuetify.min.js +980 -976
  20. package/dist/vuetify.min.js.map +1 -1
  21. package/lib/components/VAutocomplete/index.d.mts +169 -140
  22. package/lib/components/VBottomSheet/index.d.mts +33 -27
  23. package/lib/components/VColorPicker/VColorPickerCanvas.mjs +1 -1
  24. package/lib/components/VColorPicker/VColorPickerCanvas.mjs.map +1 -1
  25. package/lib/components/VCombobox/index.d.mts +169 -140
  26. package/lib/components/VDataIterator/index.d.mts +1 -1
  27. package/lib/components/VDataTable/VDataTable.css +1 -1
  28. package/lib/components/VDataTable/VDataTable.sass +2 -1
  29. package/lib/components/VDataTable/VDataTableHeaders.mjs +1 -1
  30. package/lib/components/VDataTable/VDataTableHeaders.mjs.map +1 -1
  31. package/lib/components/VDataTable/VDataTableVirtual.mjs.map +1 -1
  32. package/lib/components/VDataTable/composables/select.mjs +2 -1
  33. package/lib/components/VDataTable/composables/select.mjs.map +1 -1
  34. package/lib/components/VDataTable/index.d.mts +10 -5
  35. package/lib/components/VDatePicker/VDatePickerYears.mjs +4 -4
  36. package/lib/components/VDatePicker/VDatePickerYears.mjs.map +1 -1
  37. package/lib/components/VDialog/index.d.mts +99 -93
  38. package/lib/components/VInfiniteScroll/VInfiniteScroll.mjs +1 -1
  39. package/lib/components/VInfiniteScroll/VInfiniteScroll.mjs.map +1 -1
  40. package/lib/components/VList/VList.mjs.map +1 -1
  41. package/lib/components/VList/index.d.mts +70 -46
  42. package/lib/components/VMenu/index.d.mts +99 -93
  43. package/lib/components/VOverlay/VOverlay.mjs.map +1 -1
  44. package/lib/components/VOverlay/index.d.mts +33 -27
  45. package/lib/components/VOverlay/useActivator.mjs +5 -5
  46. package/lib/components/VOverlay/useActivator.mjs.map +1 -1
  47. package/lib/components/VSelect/index.d.mts +169 -140
  48. package/lib/components/VSheet/VSheet.css +1 -1
  49. package/lib/components/VSheet/_variables.scss +1 -1
  50. package/lib/components/VSlideGroup/VSlideGroup.mjs +25 -25
  51. package/lib/components/VSlideGroup/VSlideGroup.mjs.map +1 -1
  52. package/lib/components/VSlider/VSliderThumb.css +5 -0
  53. package/lib/components/VSlider/VSliderThumb.sass +3 -0
  54. package/lib/components/VSlider/VSliderTrack.css +15 -0
  55. package/lib/components/VSlider/VSliderTrack.sass +9 -0
  56. package/lib/components/VSnackbar/index.d.mts +85 -79
  57. package/lib/components/VSpeedDial/index.d.mts +33 -27
  58. package/lib/components/VStepper/VStepperWindow.mjs +2 -1
  59. package/lib/components/VStepper/VStepperWindow.mjs.map +1 -1
  60. package/lib/components/VStepper/VStepperWindowItem.mjs +2 -1
  61. package/lib/components/VStepper/VStepperWindowItem.mjs.map +1 -1
  62. package/lib/components/VTabs/VTabsWindow.mjs +2 -1
  63. package/lib/components/VTabs/VTabsWindow.mjs.map +1 -1
  64. package/lib/components/VTooltip/index.d.mts +99 -93
  65. package/lib/components/VVirtualScroll/VVirtualScrollItem.mjs.map +1 -1
  66. package/lib/components/index.d.mts +926 -897
  67. package/lib/composables/nested/activeStrategies.mjs +16 -10
  68. package/lib/composables/nested/activeStrategies.mjs.map +1 -1
  69. package/lib/composables/nested/nested.mjs +7 -5
  70. package/lib/composables/nested/nested.mjs.map +1 -1
  71. package/lib/composables/resizeObserver.mjs +5 -5
  72. package/lib/composables/resizeObserver.mjs.map +1 -1
  73. package/lib/entry-bundler.mjs +1 -1
  74. package/lib/framework.mjs +1 -1
  75. package/lib/index.d.mts +38 -38
  76. package/lib/labs/VCalendar/VCalendar.css +5 -1
  77. package/lib/labs/VCalendar/VCalendar.sass +3 -2
  78. package/lib/labs/VCalendar/_variables.scss +8 -0
  79. package/lib/labs/VSnackbarQueue/index.d.mts +97 -91
  80. package/lib/labs/VTreeview/VTreeview.mjs.map +1 -1
  81. package/lib/labs/VTreeview/index.d.mts +82 -58
  82. package/lib/labs/components.d.mts +178 -149
  83. package/lib/util/helpers.mjs +16 -0
  84. package/lib/util/helpers.mjs.map +1 -1
  85. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Vuetify v3.6.3-master.2024-05-07
2
+ * Vuetify v3.6.4-master.2024-05-08
3
3
  * Forged by John Leider
4
4
  * Released under the MIT License.
5
5
  */
@@ -561,6 +561,22 @@
561
561
  const divBottom = divRect.bottom;
562
562
  return mouseX >= divLeft && mouseX <= divRight && mouseY >= divTop && mouseY <= divBottom;
563
563
  }
564
+ function templateRef() {
565
+ const el = vue.shallowRef();
566
+ const fn = target => {
567
+ el.value = target;
568
+ };
569
+ Object.defineProperty(fn, 'value', {
570
+ enumerable: true,
571
+ get: () => el.value,
572
+ set: val => el.value = val
573
+ });
574
+ Object.defineProperty(fn, 'el', {
575
+ enumerable: true,
576
+ get: () => refElement(el.value)
577
+ });
578
+ return fn;
579
+ }
564
580
 
565
581
  // Utilities
566
582
  const block = ['top', 'bottom'];
@@ -1569,7 +1585,7 @@
1569
1585
 
1570
1586
  function useResizeObserver(callback) {
1571
1587
  let box = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'content';
1572
- const resizeRef = vue.ref();
1588
+ const resizeRef = templateRef();
1573
1589
  const contentRect = vue.ref();
1574
1590
  if (IN_BROWSER) {
1575
1591
  const observer = new ResizeObserver(entries => {
@@ -1584,12 +1600,12 @@
1584
1600
  vue.onBeforeUnmount(() => {
1585
1601
  observer.disconnect();
1586
1602
  });
1587
- vue.watch(resizeRef, (newValue, oldValue) => {
1603
+ vue.watch(() => resizeRef.el, (newValue, oldValue) => {
1588
1604
  if (oldValue) {
1589
- observer.unobserve(refElement(oldValue));
1605
+ observer.unobserve(oldValue);
1590
1606
  contentRect.value = undefined;
1591
1607
  }
1592
- if (newValue) observer.observe(refElement(newValue));
1608
+ if (newValue) observer.observe(newValue);
1593
1609
  }, {
1594
1610
  flush: 'post'
1595
1611
  });
@@ -7388,7 +7404,7 @@
7388
7404
  const goTo = useGoTo();
7389
7405
  const goToOptions = vue.computed(() => {
7390
7406
  return {
7391
- container: containerRef.value,
7407
+ container: containerRef.el,
7392
7408
  duration: 200,
7393
7409
  easing: 'easeOutQuart'
7394
7410
  };
@@ -7412,9 +7428,9 @@
7412
7428
  contentSize.value = contentRect.value[sizeProperty];
7413
7429
  isOverflowing.value = containerSize.value + 1 < contentSize.value;
7414
7430
  }
7415
- if (firstSelectedIndex.value >= 0 && contentRef.value) {
7431
+ if (firstSelectedIndex.value >= 0 && contentRef.el) {
7416
7432
  // TODO: Is this too naive? Should we store element references in group composable?
7417
- const selectedElement = contentRef.value.children[lastSelectedIndex.value];
7433
+ const selectedElement = contentRef.el.children[lastSelectedIndex.value];
7418
7434
  scrollToChildren(selectedElement, props.centerActive);
7419
7435
  }
7420
7436
  });
@@ -7425,13 +7441,13 @@
7425
7441
  let target = 0;
7426
7442
  if (center) {
7427
7443
  target = calculateCenteredTarget({
7428
- containerElement: containerRef.value,
7444
+ containerElement: containerRef.el,
7429
7445
  isHorizontal: isHorizontal.value,
7430
7446
  selectedElement: children
7431
7447
  });
7432
7448
  } else {
7433
7449
  target = calculateUpdatedTarget({
7434
- containerElement: containerRef.value,
7450
+ containerElement: containerRef.el,
7435
7451
  isHorizontal: isHorizontal.value,
7436
7452
  isRtl: isRtl.value,
7437
7453
  selectedElement: children
@@ -7440,18 +7456,18 @@
7440
7456
  scrollToPosition(target);
7441
7457
  }
7442
7458
  function scrollToPosition(newPosition) {
7443
- if (!IN_BROWSER || !containerRef.value) return;
7444
- const offsetSize = getOffsetSize(isHorizontal.value, containerRef.value);
7445
- const scrollPosition = getScrollPosition(isHorizontal.value, isRtl.value, containerRef.value);
7446
- const scrollSize = getScrollSize(isHorizontal.value, containerRef.value);
7459
+ if (!IN_BROWSER || !containerRef.el) return;
7460
+ const offsetSize = getOffsetSize(isHorizontal.value, containerRef.el);
7461
+ const scrollPosition = getScrollPosition(isHorizontal.value, isRtl.value, containerRef.el);
7462
+ const scrollSize = getScrollSize(isHorizontal.value, containerRef.el);
7447
7463
  if (scrollSize <= offsetSize ||
7448
7464
  // Prevent scrolling by only a couple of pixels, which doesn't look smooth
7449
7465
  Math.abs(newPosition - scrollPosition) < 16) return;
7450
- if (isHorizontal.value && isRtl.value && containerRef.value) {
7466
+ if (isHorizontal.value && isRtl.value && containerRef.el) {
7451
7467
  const {
7452
7468
  scrollWidth,
7453
7469
  offsetWidth: containerWidth
7454
- } = containerRef.value;
7470
+ } = containerRef.el;
7455
7471
  newPosition = scrollWidth - containerWidth - newPosition;
7456
7472
  }
7457
7473
  if (isHorizontal.value) {
@@ -7469,12 +7485,12 @@
7469
7485
  }
7470
7486
  function onFocusin(e) {
7471
7487
  isFocused.value = true;
7472
- if (!isOverflowing.value || !contentRef.value) return;
7488
+ if (!isOverflowing.value || !contentRef.el) return;
7473
7489
 
7474
7490
  // Focused element is likely to be the root of an item, so a
7475
7491
  // breadth-first search will probably find it in the first iteration
7476
7492
  for (const el of e.composedPath()) {
7477
- for (const item of contentRef.value.children) {
7493
+ for (const item of contentRef.el.children) {
7478
7494
  if (item === el) {
7479
7495
  scrollToChildren(item);
7480
7496
  return;
@@ -7489,14 +7505,14 @@
7489
7505
  // Affix clicks produce onFocus that we have to ignore to avoid extra scrollToChildren
7490
7506
  let ignoreFocusEvent = false;
7491
7507
  function onFocus(e) {
7492
- if (!ignoreFocusEvent && !isFocused.value && !(e.relatedTarget && contentRef.value?.contains(e.relatedTarget))) focus();
7508
+ if (!ignoreFocusEvent && !isFocused.value && !(e.relatedTarget && contentRef.el?.contains(e.relatedTarget))) focus();
7493
7509
  ignoreFocusEvent = false;
7494
7510
  }
7495
7511
  function onFocusAffixes() {
7496
7512
  ignoreFocusEvent = true;
7497
7513
  }
7498
7514
  function onKeydown(e) {
7499
- if (!contentRef.value) return;
7515
+ if (!contentRef.el) return;
7500
7516
  function toFocus(location) {
7501
7517
  e.preventDefault();
7502
7518
  focus(location);
@@ -7521,21 +7537,21 @@
7521
7537
  }
7522
7538
  }
7523
7539
  function focus(location) {
7524
- if (!contentRef.value) return;
7540
+ if (!contentRef.el) return;
7525
7541
  let el;
7526
7542
  if (!location) {
7527
- const focusable = focusableChildren(contentRef.value);
7543
+ const focusable = focusableChildren(contentRef.el);
7528
7544
  el = focusable[0];
7529
7545
  } else if (location === 'next') {
7530
- el = contentRef.value.querySelector(':focus')?.nextElementSibling;
7546
+ el = contentRef.el.querySelector(':focus')?.nextElementSibling;
7531
7547
  if (!el) return focus('first');
7532
7548
  } else if (location === 'prev') {
7533
- el = contentRef.value.querySelector(':focus')?.previousElementSibling;
7549
+ el = contentRef.el.querySelector(':focus')?.previousElementSibling;
7534
7550
  if (!el) return focus('last');
7535
7551
  } else if (location === 'first') {
7536
- el = contentRef.value.firstElementChild;
7552
+ el = contentRef.el.firstElementChild;
7537
7553
  } else if (location === 'last') {
7538
- el = contentRef.value.lastElementChild;
7554
+ el = contentRef.el.lastElementChild;
7539
7555
  }
7540
7556
  if (el) {
7541
7557
  el.focus({
@@ -7549,11 +7565,11 @@
7549
7565
  let newPosition = scrollOffset.value + offsetStep;
7550
7566
 
7551
7567
  // TODO: improve it
7552
- if (isHorizontal.value && isRtl.value && containerRef.value) {
7568
+ if (isHorizontal.value && isRtl.value && containerRef.el) {
7553
7569
  const {
7554
7570
  scrollWidth,
7555
7571
  offsetWidth: containerWidth
7556
- } = containerRef.value;
7572
+ } = containerRef.el;
7557
7573
  newPosition += scrollWidth - containerWidth;
7558
7574
  }
7559
7575
  scrollToPosition(newPosition);
@@ -7596,8 +7612,8 @@
7596
7612
  });
7597
7613
  const hasNext = vue.computed(() => {
7598
7614
  if (!containerRef.value) return false;
7599
- const scrollSize = getScrollSize(isHorizontal.value, containerRef.value);
7600
- const clientSize = getClientSize(isHorizontal.value, containerRef.value);
7615
+ const scrollSize = getScrollSize(isHorizontal.value, containerRef.el);
7616
+ const clientSize = getClientSize(isHorizontal.value, containerRef.el);
7601
7617
  const scrollSizeMax = scrollSize - clientSize;
7602
7618
 
7603
7619
  // 1 pixel in reserve, may be lost after rounding
@@ -8021,14 +8037,16 @@
8021
8037
  },
8022
8038
  in: (v, children, parents) => {
8023
8039
  let set = new Set();
8024
- for (const id of v || []) {
8025
- set = strategy.activate({
8026
- id,
8027
- value: true,
8028
- activated: new Set(set),
8029
- children,
8030
- parents
8031
- });
8040
+ if (v != null) {
8041
+ for (const id of wrapInArray(v)) {
8042
+ set = strategy.activate({
8043
+ id,
8044
+ value: true,
8045
+ activated: new Set(set),
8046
+ children,
8047
+ parents
8048
+ });
8049
+ }
8032
8050
  }
8033
8051
  return set;
8034
8052
  },
@@ -8057,8 +8075,11 @@
8057
8075
  },
8058
8076
  in: (v, children, parents) => {
8059
8077
  let set = new Set();
8060
- if (v?.length) {
8061
- set = parentStrategy.in(v.slice(0, 1), children, parents);
8078
+ if (v != null) {
8079
+ const arr = wrapInArray(v);
8080
+ if (arr.length) {
8081
+ set = parentStrategy.in(arr.slice(0, 1), children, parents);
8082
+ }
8062
8083
  }
8063
8084
  return set;
8064
8085
  },
@@ -8402,12 +8423,12 @@
8402
8423
  const makeNestedProps = propsFactory({
8403
8424
  activatable: Boolean,
8404
8425
  selectable: Boolean,
8405
- activeStrategy: [String, Function],
8406
- selectStrategy: [String, Function],
8426
+ activeStrategy: [String, Function, Object],
8427
+ selectStrategy: [String, Function, Object],
8407
8428
  openStrategy: [String, Object],
8408
- opened: Array,
8409
- activated: Array,
8410
- selected: Array,
8429
+ opened: null,
8430
+ activated: null,
8431
+ selected: null,
8411
8432
  mandatory: Boolean
8412
8433
  }, 'nested');
8413
8434
  const useNested = props => {
@@ -8417,6 +8438,7 @@
8417
8438
  const opened = useProxiedModel(props, 'opened', props.opened, v => new Set(v), v => [...v.values()]);
8418
8439
  const activeStrategy = vue.computed(() => {
8419
8440
  if (typeof props.activeStrategy === 'object') return props.activeStrategy;
8441
+ if (typeof props.activeStrategy === 'function') return props.activeStrategy(props.mandatory);
8420
8442
  switch (props.activeStrategy) {
8421
8443
  case 'leaf':
8422
8444
  return leafActiveStrategy(props.mandatory);
@@ -8431,6 +8453,7 @@
8431
8453
  });
8432
8454
  const selectStrategy = vue.computed(() => {
8433
8455
  if (typeof props.selectStrategy === 'object') return props.selectStrategy;
8456
+ if (typeof props.selectStrategy === 'function') return props.selectStrategy(props.mandatory);
8434
8457
  switch (props.selectStrategy) {
8435
8458
  case 'single-leaf':
8436
8459
  return leafSingleSelectStrategy(props.mandatory);
@@ -10331,17 +10354,17 @@
10331
10354
  }, {
10332
10355
  flush: 'post'
10333
10356
  });
10334
- const activatorRef = vue.ref();
10357
+ const activatorRef = templateRef();
10335
10358
  vue.watchEffect(() => {
10336
10359
  if (!activatorRef.value) return;
10337
10360
  vue.nextTick(() => {
10338
- activatorEl.value = refElement(activatorRef.value);
10361
+ activatorEl.value = activatorRef.el;
10339
10362
  });
10340
10363
  });
10341
- const targetRef = vue.ref();
10364
+ const targetRef = templateRef();
10342
10365
  const target = vue.computed(() => {
10343
10366
  if (props.target === 'cursor' && cursorTarget.value) return cursorTarget.value;
10344
- if (targetRef.value) return refElement(targetRef.value);
10367
+ if (targetRef.value) return targetRef.el;
10345
10368
  return getTarget(props.target, vm) || activatorEl.value;
10346
10369
  });
10347
10370
  const targetEl = vue.computed(() => {
@@ -14810,7 +14833,7 @@
14810
14833
  const {
14811
14834
  resizeRef
14812
14835
  } = useResizeObserver(entries => {
14813
- if (!resizeRef.value?.offsetParent) return;
14836
+ if (!resizeRef.el?.offsetParent) return;
14814
14837
  const {
14815
14838
  width,
14816
14839
  height
@@ -18433,6 +18456,7 @@
18433
18456
  });
18434
18457
  return !!items.length && isSelected(items);
18435
18458
  });
18459
+ const showSelectAll = vue.computed(() => selectStrategy.value.showSelectAll);
18436
18460
  const data = {
18437
18461
  toggleSelect,
18438
18462
  select,
@@ -18441,7 +18465,7 @@
18441
18465
  isSomeSelected,
18442
18466
  someSelected,
18443
18467
  allSelected,
18444
- showSelectAll: selectStrategy.value.showSelectAll
18468
+ showSelectAll
18445
18469
  };
18446
18470
  vue.provide(VDataTableSelectionSymbol, data);
18447
18471
  return data;
@@ -19712,7 +19736,7 @@
19712
19736
  };
19713
19737
  if (slots[columnSlotName]) return slots[columnSlotName](columnSlotProps);
19714
19738
  if (column.key === 'data-table-select') {
19715
- return slots['header.data-table-select']?.(columnSlotProps) ?? (showSelectAll && vue.createVNode(VCheckboxBtn, {
19739
+ return slots['header.data-table-select']?.(columnSlotProps) ?? (showSelectAll.value && vue.createVNode(VCheckboxBtn, {
19716
19740
  "modelValue": allSelected.value,
19717
19741
  "indeterminate": someSelected.value && !allSelected.value,
19718
19742
  "onUpdate:modelValue": selectAll
@@ -21681,10 +21705,10 @@
21681
21705
  vue.watchEffect(() => {
21682
21706
  model.value = model.value ?? adapter.getYear(adapter.date());
21683
21707
  });
21684
- const yearRef = vue.ref();
21708
+ const yearRef = templateRef();
21685
21709
  vue.onMounted(async () => {
21686
21710
  await vue.nextTick();
21687
- yearRef.value?.$el.scrollIntoView({
21711
+ yearRef.el?.scrollIntoView({
21688
21712
  block: 'center'
21689
21713
  });
21690
21714
  });
@@ -23010,7 +23034,7 @@
23010
23034
  function intersecting(side) {
23011
23035
  if (props.mode !== 'manual' && !isIntersecting.value) return;
23012
23036
  const status = getStatus(side);
23013
- if (!rootEl.value || status === 'loading') return;
23037
+ if (!rootEl.value || ['empty', 'loading'].includes(status)) return;
23014
23038
  previousScrollSize = getScrollSize();
23015
23039
  setStatus(side, 'loading');
23016
23040
  function done(status) {
@@ -25905,7 +25929,8 @@
25905
25929
  }, windowProps, {
25906
25930
  "modelValue": model.value,
25907
25931
  "onUpdate:modelValue": $event => model.value = $event,
25908
- "class": "v-stepper-window",
25932
+ "class": ['v-stepper-window', props.class],
25933
+ "style": props.style,
25909
25934
  "mandatory": false,
25910
25935
  "touch": false
25911
25936
  }), slots);
@@ -25929,7 +25954,8 @@
25929
25954
  return vue.createVNode(VWindowItem, vue.mergeProps({
25930
25955
  "_as": "VStepperWindowItem"
25931
25956
  }, windowItemProps, {
25932
- "class": "v-stepper-window-item"
25957
+ "class": ['v-stepper-window-item', props.class],
25958
+ "style": props.style
25933
25959
  }), slots);
25934
25960
  });
25935
25961
  return {};
@@ -26428,7 +26454,8 @@
26428
26454
  }, windowProps, {
26429
26455
  "modelValue": model.value,
26430
26456
  "onUpdate:modelValue": $event => model.value = $event,
26431
- "class": "v-tabs-window",
26457
+ "class": ['v-tabs-window', props.class],
26458
+ "style": props.style,
26432
26459
  "mandatory": false,
26433
26460
  "touch": false
26434
26461
  }), slots);
@@ -29748,7 +29775,7 @@
29748
29775
  goTo
29749
29776
  };
29750
29777
  }
29751
- const version$1 = "3.6.3-master.2024-05-07";
29778
+ const version$1 = "3.6.4-master.2024-05-08";
29752
29779
  createVuetify$1.version = version$1;
29753
29780
 
29754
29781
  // Vue's inject() can only be used in setup
@@ -30001,7 +30028,7 @@
30001
30028
 
30002
30029
  /* eslint-disable local-rules/sort-imports */
30003
30030
 
30004
- const version = "3.6.3-master.2024-05-07";
30031
+ const version = "3.6.4-master.2024-05-08";
30005
30032
 
30006
30033
  /* eslint-disable local-rules/sort-imports */
30007
30034