@vuetify/nightly 3.3.12-dev.2023-08-15 → 3.3.12-dev.2023-08-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 (50) hide show
  1. package/CHANGELOG.md +3 -2
  2. package/dist/json/attributes.json +31 -7
  3. package/dist/json/importMap.json +46 -46
  4. package/dist/json/tags.json +6 -0
  5. package/dist/json/web-types.json +62 -8
  6. package/dist/vuetify-labs.css +884 -884
  7. package/dist/vuetify-labs.d.ts +227 -110
  8. package/dist/vuetify-labs.esm.js +96 -42
  9. package/dist/vuetify-labs.esm.js.map +1 -1
  10. package/dist/vuetify-labs.js +96 -42
  11. package/dist/vuetify-labs.min.css +2 -2
  12. package/dist/vuetify.css +240 -240
  13. package/dist/vuetify.d.ts +227 -116
  14. package/dist/vuetify.esm.js +96 -42
  15. package/dist/vuetify.esm.js.map +1 -1
  16. package/dist/vuetify.js +96 -42
  17. package/dist/vuetify.js.map +1 -1
  18. package/dist/vuetify.min.css +2 -2
  19. package/dist/vuetify.min.js +740 -739
  20. package/dist/vuetify.min.js.map +1 -1
  21. package/lib/components/VAutocomplete/index.d.mts +14 -8
  22. package/lib/components/VCombobox/index.d.mts +14 -8
  23. package/lib/components/VDialog/index.d.mts +41 -20
  24. package/lib/components/VMenu/index.d.mts +41 -20
  25. package/lib/components/VOverlay/VOverlay.mjs +9 -4
  26. package/lib/components/VOverlay/VOverlay.mjs.map +1 -1
  27. package/lib/components/VOverlay/index.d.mts +17 -8
  28. package/lib/components/VOverlay/locationStrategies.mjs +9 -9
  29. package/lib/components/VOverlay/locationStrategies.mjs.map +1 -1
  30. package/lib/components/VOverlay/scrollStrategies.mjs +3 -3
  31. package/lib/components/VOverlay/scrollStrategies.mjs.map +1 -1
  32. package/lib/components/VOverlay/useActivator.mjs +50 -21
  33. package/lib/components/VOverlay/useActivator.mjs.map +1 -1
  34. package/lib/components/VSelect/index.d.mts +14 -8
  35. package/lib/components/VSnackbar/index.d.mts +41 -20
  36. package/lib/components/VTooltip/index.d.mts +41 -20
  37. package/lib/components/index.d.mts +215 -104
  38. package/lib/components/transitions/dialog-transition.mjs +4 -3
  39. package/lib/components/transitions/dialog-transition.mjs.map +1 -1
  40. package/lib/components/transitions/index.d.mts +6 -6
  41. package/lib/entry-bundler.mjs +1 -1
  42. package/lib/framework.mjs +1 -1
  43. package/lib/index.d.mts +12 -12
  44. package/lib/labs/VBottomSheet/index.d.mts +14 -8
  45. package/lib/labs/components.d.mts +14 -8
  46. package/lib/util/box.mjs +12 -0
  47. package/lib/util/box.mjs.map +1 -1
  48. package/lib/util/helpers.mjs +9 -1
  49. package/lib/util/helpers.mjs.map +1 -1
  50. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Vuetify v3.3.12-dev.2023-08-15
2
+ * Vuetify v3.3.12-dev.2023-08-17
3
3
  * Forged by John Leider
4
4
  * Released under the MIT License.
5
5
  */
@@ -162,7 +162,15 @@
162
162
  return obj !== null && typeof obj === 'object' && !Array.isArray(obj);
163
163
  }
164
164
  function refElement(obj) {
165
- return obj && '$el' in obj ? obj.$el : obj;
165
+ if (obj && '$el' in obj) {
166
+ const el = obj.$el;
167
+ if (el?.nodeType === Node.TEXT_NODE) {
168
+ // Multi-root component, use the first element
169
+ return el.nextElementSibling;
170
+ }
171
+ return el;
172
+ }
173
+ return obj;
166
174
  }
167
175
 
168
176
  // KeyboardEvent.keyCode aliases
@@ -555,6 +563,18 @@
555
563
  }
556
564
  };
557
565
  }
566
+ function getTargetBox(target) {
567
+ if (Array.isArray(target)) {
568
+ return new Box({
569
+ x: target[0],
570
+ y: target[1],
571
+ width: 0,
572
+ height: 0
573
+ });
574
+ } else {
575
+ return target.getBoundingClientRect();
576
+ }
577
+ }
558
578
 
559
579
  // Utilities
560
580
 
@@ -2632,7 +2652,7 @@
2632
2652
  // Types
2633
2653
 
2634
2654
  const makeVDialogTransitionProps = propsFactory({
2635
- target: Object
2655
+ target: [Object, Array]
2636
2656
  }, 'v-dialog-transition');
2637
2657
  const VDialogTransition = genericComponent()({
2638
2658
  name: 'VDialogTransition',
@@ -2734,7 +2754,7 @@
2734
2754
  return els && [...els];
2735
2755
  }
2736
2756
  function getDimensions(target, el) {
2737
- const targetBox = target.getBoundingClientRect();
2757
+ const targetBox = getTargetBox(target);
2738
2758
  const elBox = nullifyTransforms(el);
2739
2759
  const [originX, originY] = getComputedStyle(el).transformOrigin.split(' ').map(v => parseFloat(v));
2740
2760
  const [anchorSide, anchorOffset] = getComputedStyle(el).getPropertyValue('--v-overlay-anchor-origin').split(' ');
@@ -8420,7 +8440,7 @@
8420
8440
  return contentBox;
8421
8441
  }
8422
8442
  function connectedLocationStrategy(data, props, contentStyles) {
8423
- const activatorFixed = isFixedPosition(data.activatorEl.value);
8443
+ const activatorFixed = Array.isArray(data.target.value) || isFixedPosition(data.target.value);
8424
8444
  if (activatorFixed) {
8425
8445
  Object.assign(contentStyles.value, {
8426
8446
  position: 'fixed',
@@ -8469,11 +8489,11 @@
8469
8489
  const observer = new ResizeObserver(() => {
8470
8490
  if (observe) updateLocation();
8471
8491
  });
8472
- vue.watch([data.activatorEl, data.contentEl], (_ref, _ref2) => {
8473
- let [newActivatorEl, newContentEl] = _ref;
8474
- let [oldActivatorEl, oldContentEl] = _ref2;
8475
- if (oldActivatorEl) observer.unobserve(oldActivatorEl);
8476
- if (newActivatorEl) observer.observe(newActivatorEl);
8492
+ vue.watch([data.target, data.contentEl], (_ref, _ref2) => {
8493
+ let [newTarget, newContentEl] = _ref;
8494
+ let [oldTarget, oldContentEl] = _ref2;
8495
+ if (oldTarget && !Array.isArray(oldTarget)) observer.unobserve(oldTarget);
8496
+ if (newTarget && !Array.isArray(newTarget)) observer.observe(newTarget);
8477
8497
  if (oldContentEl) observer.unobserve(oldContentEl);
8478
8498
  if (newContentEl) observer.observe(newContentEl);
8479
8499
  }, {
@@ -8489,8 +8509,8 @@
8489
8509
  requestAnimationFrame(() => {
8490
8510
  requestAnimationFrame(() => observe = true);
8491
8511
  });
8492
- if (!data.activatorEl.value || !data.contentEl.value) return;
8493
- const targetBox = data.activatorEl.value.getBoundingClientRect();
8512
+ if (!data.target.value || !data.contentEl.value) return;
8513
+ const targetBox = getTargetBox(data.target.value);
8494
8514
  const contentBox = getIntrinsicSize(data.contentEl.value, data.isRtl.value);
8495
8515
  const scrollParents = getScrollParents(data.contentEl.value);
8496
8516
  const viewportMargin = 12;
@@ -8777,11 +8797,11 @@
8777
8797
  function onScroll(e) {
8778
8798
  data.isActive.value = false;
8779
8799
  }
8780
- bindScroll(data.activatorEl.value ?? data.contentEl.value, onScroll);
8800
+ bindScroll(data.targetEl.value ?? data.contentEl.value, onScroll);
8781
8801
  }
8782
8802
  function blockScrollStrategy(data, props) {
8783
8803
  const offsetParent = data.root.value?.offsetParent;
8784
- const scrollElements = [...new Set([...getScrollParents(data.activatorEl.value, props.contained ? offsetParent : undefined), ...getScrollParents(data.contentEl.value, props.contained ? offsetParent : undefined)])].filter(el => !el.classList.contains('v-overlay-scroll-blocked'));
8804
+ const scrollElements = [...new Set([...getScrollParents(data.targetEl.value, props.contained ? offsetParent : undefined), ...getScrollParents(data.contentEl.value, props.contained ? offsetParent : undefined)])].filter(el => !el.classList.contains('v-overlay-scroll-blocked'));
8785
8805
  const scrollbarWidth = window.innerWidth - document.documentElement.offsetWidth;
8786
8806
  const scrollableParent = (el => hasScrollbar(el) && el)(offsetParent || document.documentElement);
8787
8807
  if (scrollableParent) {
@@ -8825,7 +8845,7 @@
8825
8845
  }
8826
8846
  ric = (typeof requestIdleCallback === 'undefined' ? cb => cb() : requestIdleCallback)(() => {
8827
8847
  scope.run(() => {
8828
- bindScroll(data.activatorEl.value ?? data.contentEl.value, e => {
8848
+ bindScroll(data.targetEl.value ?? data.contentEl.value, e => {
8829
8849
  if (slow) {
8830
8850
  // If the position calculation is slow,
8831
8851
  // defer updates until scrolling is finished.
@@ -8906,6 +8926,7 @@
8906
8926
  // Types
8907
8927
 
8908
8928
  const makeActivatorProps = propsFactory({
8929
+ target: [String, Object],
8909
8930
  activator: [String, Object],
8910
8931
  activatorProps: {
8911
8932
  type: Object,
@@ -8928,6 +8949,7 @@
8928
8949
  isActive,
8929
8950
  isTop
8930
8951
  } = _ref;
8952
+ const vm = getCurrentInstance('useActivator');
8931
8953
  const activatorEl = vue.ref();
8932
8954
  let isHovered = false;
8933
8955
  let isFocused = false;
@@ -8945,10 +8967,14 @@
8945
8967
  isActive.value = value;
8946
8968
  }
8947
8969
  });
8970
+ const cursorTarget = vue.ref();
8948
8971
  const availableEvents = {
8949
8972
  onClick: e => {
8950
8973
  e.stopPropagation();
8951
8974
  activatorEl.value = e.currentTarget || e.target;
8975
+ if (!isActive.value) {
8976
+ cursorTarget.value = [e.clientX, e.clientY];
8977
+ }
8952
8978
  isActive.value = !isActive.value;
8953
8979
  },
8954
8980
  onMouseenter: e => {
@@ -9042,6 +9068,15 @@
9042
9068
  isActive.value = false;
9043
9069
  }
9044
9070
  });
9071
+ vue.watch(isActive, val => {
9072
+ if (!val) {
9073
+ setTimeout(() => {
9074
+ cursorTarget.value = undefined;
9075
+ });
9076
+ }
9077
+ }, {
9078
+ flush: 'post'
9079
+ });
9045
9080
  const activatorRef = vue.ref();
9046
9081
  vue.watchEffect(() => {
9047
9082
  if (!activatorRef.value) return;
@@ -9049,7 +9084,15 @@
9049
9084
  activatorEl.value = refElement(activatorRef.value);
9050
9085
  });
9051
9086
  });
9052
- const vm = getCurrentInstance('useActivator');
9087
+ const targetRef = vue.ref();
9088
+ const target = vue.computed(() => {
9089
+ if (props.target === 'cursor' && cursorTarget.value) return cursorTarget.value;
9090
+ if (targetRef.value) return refElement(targetRef.value);
9091
+ return getTarget(props.target, vm) || activatorEl.value;
9092
+ });
9093
+ const targetEl = vue.computed(() => {
9094
+ return Array.isArray(target.value) ? undefined : target.value;
9095
+ });
9053
9096
  let scope;
9054
9097
  vue.watch(() => !!props.activator, val => {
9055
9098
  if (val && IN_BROWSER) {
@@ -9073,6 +9116,9 @@
9073
9116
  return {
9074
9117
  activatorEl,
9075
9118
  activatorRef,
9119
+ target,
9120
+ targetEl,
9121
+ targetRef,
9076
9122
  activatorEvents,
9077
9123
  contentEvents,
9078
9124
  scrimEvents
@@ -9114,31 +9160,34 @@
9114
9160
  }
9115
9161
  function getActivator() {
9116
9162
  let selector = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : props.activator;
9117
- let activator;
9118
- if (selector) {
9119
- if (selector === 'parent') {
9120
- let el = vm?.proxy?.$el?.parentNode;
9121
- while (el.hasAttribute('data-no-activator')) {
9122
- el = el.parentNode;
9123
- }
9124
- activator = el;
9125
- } else if (typeof selector === 'string') {
9126
- // Selector
9127
- activator = document.querySelector(selector);
9128
- } else if ('$el' in selector) {
9129
- // Component (ref)
9130
- activator = selector.$el;
9131
- } else {
9132
- // HTMLElement | Element
9133
- activator = selector;
9134
- }
9135
- }
9163
+ const activator = getTarget(selector, vm);
9136
9164
 
9137
9165
  // The activator should only be a valid element (Ignore comments and text nodes)
9138
- activatorEl.value = activator?.nodeType === Node.ELEMENT_NODE ? activator : null;
9166
+ activatorEl.value = activator?.nodeType === Node.ELEMENT_NODE ? activator : undefined;
9139
9167
  return activatorEl.value;
9140
9168
  }
9141
9169
  }
9170
+ function getTarget(selector, vm) {
9171
+ if (!selector) return;
9172
+ let target;
9173
+ if (selector === 'parent') {
9174
+ let el = vm?.proxy?.$el?.parentNode;
9175
+ while (el.hasAttribute('data-no-activator')) {
9176
+ el = el.parentNode;
9177
+ }
9178
+ target = el;
9179
+ } else if (typeof selector === 'string') {
9180
+ // Selector
9181
+ target = document.querySelector(selector);
9182
+ } else if ('$el' in selector) {
9183
+ // Component (ref)
9184
+ target = selector.$el;
9185
+ } else {
9186
+ // HTMLElement | Element | [x, y]
9187
+ target = selector;
9188
+ }
9189
+ return target;
9190
+ }
9142
9191
 
9143
9192
  // Utilities
9144
9193
 
@@ -9582,6 +9631,9 @@
9582
9631
  const {
9583
9632
  activatorEl,
9584
9633
  activatorRef,
9634
+ target,
9635
+ targetEl,
9636
+ targetRef,
9585
9637
  activatorEvents,
9586
9638
  contentEvents,
9587
9639
  scrimEvents
@@ -9607,13 +9659,13 @@
9607
9659
  } = useLocationStrategies(props, {
9608
9660
  isRtl,
9609
9661
  contentEl,
9610
- activatorEl,
9662
+ target,
9611
9663
  isActive
9612
9664
  });
9613
9665
  useScrollStrategies(props, {
9614
9666
  root,
9615
9667
  contentEl,
9616
- activatorEl,
9668
+ targetEl,
9617
9669
  isActive,
9618
9670
  updateLocation
9619
9671
  });
@@ -9681,7 +9733,8 @@
9681
9733
  useRender(() => vue.createVNode(vue.Fragment, null, [slots.activator?.({
9682
9734
  isActive: isActive.value,
9683
9735
  props: vue.mergeProps({
9684
- ref: activatorRef
9736
+ ref: activatorRef,
9737
+ targetRef
9685
9738
  }, activatorEvents.value, props.activatorProps)
9686
9739
  }), isMounted.value && hasContent.value && vue.createVNode(vue.Teleport, {
9687
9740
  "disabled": !teleportTarget.value,
@@ -9704,7 +9757,7 @@
9704
9757
  "appear": true,
9705
9758
  "persisted": true,
9706
9759
  "transition": props.transition,
9707
- "target": activatorEl.value,
9760
+ "target": target.value,
9708
9761
  "onAfterLeave": () => {
9709
9762
  onAfterLeave();
9710
9763
  emit('afterLeave');
@@ -9725,6 +9778,7 @@
9725
9778
  })]));
9726
9779
  return {
9727
9780
  activatorEl,
9781
+ target,
9728
9782
  animateClick,
9729
9783
  contentEl,
9730
9784
  globalTop,
@@ -24486,7 +24540,7 @@
24486
24540
  date
24487
24541
  };
24488
24542
  }
24489
- const version$1 = "3.3.12-dev.2023-08-15";
24543
+ const version$1 = "3.3.12-dev.2023-08-17";
24490
24544
  createVuetify$1.version = version$1;
24491
24545
 
24492
24546
  // Vue's inject() can only be used in setup
@@ -24500,7 +24554,7 @@
24500
24554
 
24501
24555
  /* eslint-disable local-rules/sort-imports */
24502
24556
 
24503
- const version = "3.3.12-dev.2023-08-15";
24557
+ const version = "3.3.12-dev.2023-08-17";
24504
24558
 
24505
24559
  /* eslint-disable local-rules/sort-imports */
24506
24560