vuetify 3.3.15 → 3.4.0-alpha.1

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 (122) hide show
  1. package/dist/json/attributes.json +111 -11
  2. package/dist/json/importMap.json +4 -4
  3. package/dist/json/tags.json +25 -0
  4. package/dist/json/web-types.json +263 -18
  5. package/dist/vuetify-labs.css +1558 -518
  6. package/dist/vuetify-labs.d.ts +499 -179
  7. package/dist/vuetify-labs.esm.js +264 -73
  8. package/dist/vuetify-labs.esm.js.map +1 -1
  9. package/dist/vuetify-labs.js +263 -72
  10. package/dist/vuetify-labs.min.css +2 -2
  11. package/dist/vuetify.css +1080 -40
  12. package/dist/vuetify.d.ts +484 -170
  13. package/dist/vuetify.esm.js +264 -73
  14. package/dist/vuetify.esm.js.map +1 -1
  15. package/dist/vuetify.js +263 -72
  16. package/dist/vuetify.js.map +1 -1
  17. package/dist/vuetify.min.css +2 -2
  18. package/dist/vuetify.min.js +914 -895
  19. package/dist/vuetify.min.js.map +1 -1
  20. package/lib/components/VAutocomplete/index.d.mts +20 -14
  21. package/lib/components/VAvatar/VAvatar.mjs +2 -1
  22. package/lib/components/VAvatar/VAvatar.mjs.map +1 -1
  23. package/lib/components/VAvatar/index.d.mts +6 -0
  24. package/lib/components/VBanner/VBanner.mjs +5 -3
  25. package/lib/components/VBanner/VBanner.mjs.map +1 -1
  26. package/lib/components/VBanner/index.d.mts +10 -0
  27. package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs +9 -4
  28. package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs.map +1 -1
  29. package/lib/components/VBreadcrumbs/index.d.mts +28 -2
  30. package/lib/components/VCarousel/index.d.mts +26 -0
  31. package/lib/components/VCheckbox/index.d.mts +12 -0
  32. package/lib/components/VColorPicker/VColorPickerPreview.css +5 -0
  33. package/lib/components/VColorPicker/VColorPickerPreview.mjs +28 -2
  34. package/lib/components/VColorPicker/VColorPickerPreview.mjs.map +1 -1
  35. package/lib/components/VColorPicker/VColorPickerPreview.sass +4 -0
  36. package/lib/components/VColorPicker/_variables.scss +1 -0
  37. package/lib/components/VCombobox/index.d.mts +20 -14
  38. package/lib/components/VDialog/index.d.mts +41 -20
  39. package/lib/components/VField/index.d.mts +4 -4
  40. package/lib/components/VFileInput/index.d.mts +4 -4
  41. package/lib/components/VImg/VImg.mjs +13 -1
  42. package/lib/components/VImg/VImg.mjs.map +1 -1
  43. package/lib/components/VImg/index.d.mts +26 -0
  44. package/lib/components/VList/index.d.mts +12 -12
  45. package/lib/components/VMenu/index.d.mts +41 -20
  46. package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs +5 -3
  47. package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs.map +1 -1
  48. package/lib/components/VNavigationDrawer/index.d.mts +10 -0
  49. package/lib/components/VOverlay/VOverlay.mjs +9 -4
  50. package/lib/components/VOverlay/VOverlay.mjs.map +1 -1
  51. package/lib/components/VOverlay/index.d.mts +17 -8
  52. package/lib/components/VOverlay/locationStrategies.mjs +9 -9
  53. package/lib/components/VOverlay/locationStrategies.mjs.map +1 -1
  54. package/lib/components/VOverlay/scrollStrategies.mjs +3 -3
  55. package/lib/components/VOverlay/scrollStrategies.mjs.map +1 -1
  56. package/lib/components/VOverlay/useActivator.mjs +50 -21
  57. package/lib/components/VOverlay/useActivator.mjs.map +1 -1
  58. package/lib/components/VRadio/index.d.mts +6 -0
  59. package/lib/components/VRangeSlider/VRangeSlider.mjs +4 -2
  60. package/lib/components/VRangeSlider/VRangeSlider.mjs.map +1 -1
  61. package/lib/components/VRangeSlider/index.d.mts +14 -0
  62. package/lib/components/VSelect/index.d.mts +20 -14
  63. package/lib/components/VSelectionControl/VSelectionControl.mjs +3 -1
  64. package/lib/components/VSelectionControl/VSelectionControl.mjs.map +1 -1
  65. package/lib/components/VSelectionControl/index.d.mts +6 -0
  66. package/lib/components/VSlideGroup/VSlideGroup.mjs +5 -3
  67. package/lib/components/VSlideGroup/VSlideGroup.mjs.map +1 -1
  68. package/lib/components/VSlideGroup/index.d.mts +10 -0
  69. package/lib/components/VSlider/VSlider.mjs +2 -1
  70. package/lib/components/VSlider/VSlider.mjs.map +1 -1
  71. package/lib/components/VSlider/index.d.mts +14 -0
  72. package/lib/components/VSlider/slider.mjs +5 -1
  73. package/lib/components/VSlider/slider.mjs.map +1 -1
  74. package/lib/components/VSnackbar/VSnackbar.css +9 -0
  75. package/lib/components/VSnackbar/VSnackbar.mjs +65 -6
  76. package/lib/components/VSnackbar/VSnackbar.mjs.map +1 -1
  77. package/lib/components/VSnackbar/VSnackbar.sass +9 -0
  78. package/lib/components/VSnackbar/index.d.mts +52 -25
  79. package/lib/components/VSwitch/index.d.mts +6 -0
  80. package/lib/components/VTabs/index.d.mts +10 -0
  81. package/lib/components/VTextField/index.d.mts +16 -16
  82. package/lib/components/VTextarea/index.d.mts +4 -4
  83. package/lib/components/VTooltip/index.d.mts +41 -20
  84. package/lib/components/index.d.mts +455 -168
  85. package/lib/components/transitions/dialog-transition.mjs +4 -3
  86. package/lib/components/transitions/dialog-transition.mjs.map +1 -1
  87. package/lib/components/transitions/index.d.mts +6 -6
  88. package/lib/composables/directiveComponent.mjs +69 -0
  89. package/lib/composables/directiveComponent.mjs.map +1 -0
  90. package/lib/composables/display.mjs +23 -3
  91. package/lib/composables/display.mjs.map +1 -1
  92. package/lib/composables/resizeObserver.mjs.map +1 -1
  93. package/lib/composables/theme.mjs +7 -7
  94. package/lib/composables/theme.mjs.map +1 -1
  95. package/lib/entry-bundler.mjs +1 -1
  96. package/lib/entry-bundler.mjs.map +1 -1
  97. package/lib/framework.mjs +1 -1
  98. package/lib/framework.mjs.map +1 -1
  99. package/lib/iconsets/fa.mjs +2 -1
  100. package/lib/iconsets/fa.mjs.map +1 -1
  101. package/lib/iconsets/fa4.mjs +2 -1
  102. package/lib/iconsets/fa4.mjs.map +1 -1
  103. package/lib/iconsets/md.mjs +2 -1
  104. package/lib/iconsets/md.mjs.map +1 -1
  105. package/lib/iconsets/mdi-svg.mjs +2 -1
  106. package/lib/iconsets/mdi-svg.mjs.map +1 -1
  107. package/lib/iconsets/mdi.mjs +2 -1
  108. package/lib/iconsets/mdi.mjs.map +1 -1
  109. package/lib/index.d.mts +33 -2
  110. package/lib/labs/VBottomSheet/index.d.mts +14 -8
  111. package/lib/labs/VDateInput/index.d.mts +4 -4
  112. package/lib/labs/VOtpInput/index.d.mts +4 -4
  113. package/lib/labs/components.d.mts +18 -12
  114. package/lib/styles/main.css +1026 -0
  115. package/lib/styles/settings/_utilities.scss +20 -0
  116. package/lib/util/box.mjs +12 -0
  117. package/lib/util/box.mjs.map +1 -1
  118. package/lib/util/globals.mjs +1 -0
  119. package/lib/util/globals.mjs.map +1 -1
  120. package/lib/util/helpers.mjs +9 -1
  121. package/lib/util/helpers.mjs.map +1 -1
  122. package/package.json +2 -2
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Vuetify v3.3.15
2
+ * Vuetify v3.4.0-alpha.1
3
3
  * Forged by John Leider
4
4
  * Released under the MIT License.
5
5
  */
@@ -78,6 +78,7 @@
78
78
  const IN_BROWSER = typeof window !== 'undefined';
79
79
  const SUPPORTS_INTERSECTION = IN_BROWSER && 'IntersectionObserver' in window;
80
80
  const SUPPORTS_TOUCH = IN_BROWSER && ('ontouchstart' in window || window.navigator.maxTouchPoints > 0);
81
+ const SUPPORTS_EYE_DROPPER = IN_BROWSER && 'EyeDropper' in window;
81
82
 
82
83
  function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
83
84
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
@@ -161,7 +162,15 @@
161
162
  return obj !== null && typeof obj === 'object' && !Array.isArray(obj);
162
163
  }
163
164
  function refElement(obj) {
164
- 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;
165
174
  }
166
175
 
167
176
  // KeyboardEvent.keyCode aliases
@@ -560,6 +569,18 @@
560
569
  }
561
570
  };
562
571
  }
572
+ function getTargetBox(target) {
573
+ if (Array.isArray(target)) {
574
+ return new Box({
575
+ x: target[0],
576
+ y: target[1],
577
+ width: 0,
578
+ height: 0
579
+ });
580
+ } else {
581
+ return target.getBoundingClientRect();
582
+ }
583
+ }
563
584
 
564
585
  // Utilities
565
586
 
@@ -2122,9 +2143,9 @@
2122
2143
  'surface-bright': '#FFFFFF',
2123
2144
  'surface-variant': '#424242',
2124
2145
  'on-surface-variant': '#EEEEEE',
2125
- primary: '#6200EE',
2126
- 'primary-darken-1': '#3700B3',
2127
- secondary: '#03DAC6',
2146
+ primary: '#1867C0',
2147
+ 'primary-darken-1': '#1F5592',
2148
+ secondary: '#48A9A6',
2128
2149
  'secondary-darken-1': '#018786',
2129
2150
  error: '#B00020',
2130
2151
  info: '#2196F3',
@@ -2158,10 +2179,10 @@
2158
2179
  'surface-bright': '#ccbfd6',
2159
2180
  'surface-variant': '#a3a3a3',
2160
2181
  'on-surface-variant': '#424242',
2161
- primary: '#BB86FC',
2162
- 'primary-darken-1': '#3700B3',
2163
- secondary: '#03DAC5',
2164
- 'secondary-darken-1': '#03DAC5',
2182
+ primary: '#2196F3',
2183
+ 'primary-darken-1': '#277CC1',
2184
+ secondary: '#54B6B2',
2185
+ 'secondary-darken-1': '#48A9A6',
2165
2186
  error: '#CF6679',
2166
2187
  info: '#2196F3',
2167
2188
  success: '#4CAF50',
@@ -2646,7 +2667,7 @@
2646
2667
  // Types
2647
2668
 
2648
2669
  const makeVDialogTransitionProps = propsFactory({
2649
- target: Object
2670
+ target: [Object, Array]
2650
2671
  }, 'v-dialog-transition');
2651
2672
  const VDialogTransition = genericComponent()({
2652
2673
  name: 'VDialogTransition',
@@ -2748,7 +2769,7 @@
2748
2769
  return els && [...els];
2749
2770
  }
2750
2771
  function getDimensions(target, el) {
2751
- const targetBox = target.getBoundingClientRect();
2772
+ const targetBox = getTargetBox(target);
2752
2773
  const elBox = nullifyTransforms(el);
2753
2774
  const [originX, originY] = getComputedStyle(el).transformOrigin.split(' ').map(v => parseFloat(v));
2754
2775
  const [anchorSide, anchorOffset] = getComputedStyle(el).getPropertyValue('--v-overlay-anchor-origin').split(' ');
@@ -2994,6 +3015,10 @@
2994
3015
  const makeVImgProps = propsFactory({
2995
3016
  alt: String,
2996
3017
  cover: Boolean,
3018
+ draggable: {
3019
+ type: [Boolean, String],
3020
+ default: undefined
3021
+ },
2997
3022
  eager: Boolean,
2998
3023
  gradient: String,
2999
3024
  lazySrc: String,
@@ -3012,6 +3037,8 @@
3012
3037
  type: [String, Object],
3013
3038
  default: ''
3014
3039
  },
3040
+ crossorigin: String,
3041
+ referrerpolicy: String,
3015
3042
  srcset: String,
3016
3043
  ...makeVResponsiveProps(),
3017
3044
  ...makeComponentProps(),
@@ -3136,6 +3163,9 @@
3136
3163
  "src": normalisedSrc.value.src,
3137
3164
  "srcset": normalisedSrc.value.srcset,
3138
3165
  "alt": props.alt,
3166
+ "crossorigin": props.crossorigin,
3167
+ "referrerpolicy": props.referrerpolicy,
3168
+ "draggable": props.draggable,
3139
3169
  "sizes": props.sizes,
3140
3170
  "ref": image,
3141
3171
  "onLoad": onLoad,
@@ -3157,7 +3187,10 @@
3157
3187
  default: () => [normalisedSrc.value.lazySrc && state.value !== 'loaded' && vue.createVNode("img", {
3158
3188
  "class": ['v-img__img', 'v-img__img--preload', containClasses.value],
3159
3189
  "src": normalisedSrc.value.lazySrc,
3160
- "alt": props.alt
3190
+ "alt": props.alt,
3191
+ "crossorigin": props.crossorigin,
3192
+ "referrerpolicy": props.referrerpolicy,
3193
+ "draggable": props.draggable
3161
3194
  }, null)]
3162
3195
  });
3163
3196
  const __placeholder = () => {
@@ -4181,7 +4214,8 @@
4181
4214
  file: 'mdi-paperclip',
4182
4215
  plus: 'mdi-plus',
4183
4216
  minus: 'mdi-minus',
4184
- calendar: 'mdi-calendar'
4217
+ calendar: 'mdi-calendar',
4218
+ eyeDropper: 'mdi-eyedropper'
4185
4219
  };
4186
4220
  const mdi = {
4187
4221
  // Not using mergeProps here, functional components merge props by default (?)
@@ -5771,6 +5805,7 @@
5771
5805
 
5772
5806
  const makeVSelectionControlProps = propsFactory({
5773
5807
  label: String,
5808
+ baseColor: String,
5774
5809
  trueValue: null,
5775
5810
  falseValue: null,
5776
5811
  value: null,
@@ -5809,7 +5844,8 @@
5809
5844
  textColorClasses,
5810
5845
  textColorStyles
5811
5846
  } = useTextColor(vue.computed(() => {
5812
- return model.value && !props.error && !props.disabled ? props.color : undefined;
5847
+ if (props.error || props.disabled) return undefined;
5848
+ return model.value ? props.color : props.baseColor;
5813
5849
  }));
5814
5850
  const {
5815
5851
  backgroundColorClasses,
@@ -6611,6 +6647,7 @@
6611
6647
  end: Boolean,
6612
6648
  icon: IconValue,
6613
6649
  image: String,
6650
+ text: String,
6614
6651
  ...makeComponentProps(),
6615
6652
  ...makeDensityProps(),
6616
6653
  ...makeRoundedProps(),
@@ -6661,7 +6698,7 @@
6661
6698
  }, null) : props.icon ? vue.createVNode(VIcon, {
6662
6699
  "key": "icon",
6663
6700
  "icon": props.icon
6664
- }, null) : slots.default?.(), genOverlays(false, 'v-avatar')]
6701
+ }, null) : slots.default?.() ?? props.text, genOverlays(false, 'v-avatar')]
6665
6702
  }));
6666
6703
  return {};
6667
6704
  }
@@ -8442,7 +8479,7 @@
8442
8479
  return contentBox;
8443
8480
  }
8444
8481
  function connectedLocationStrategy(data, props, contentStyles) {
8445
- const activatorFixed = isFixedPosition(data.activatorEl.value);
8482
+ const activatorFixed = Array.isArray(data.target.value) || isFixedPosition(data.target.value);
8446
8483
  if (activatorFixed) {
8447
8484
  Object.assign(contentStyles.value, {
8448
8485
  position: 'fixed',
@@ -8491,11 +8528,11 @@
8491
8528
  const observer = new ResizeObserver(() => {
8492
8529
  if (observe) updateLocation();
8493
8530
  });
8494
- vue.watch([data.activatorEl, data.contentEl], (_ref, _ref2) => {
8495
- let [newActivatorEl, newContentEl] = _ref;
8496
- let [oldActivatorEl, oldContentEl] = _ref2;
8497
- if (oldActivatorEl) observer.unobserve(oldActivatorEl);
8498
- if (newActivatorEl) observer.observe(newActivatorEl);
8531
+ vue.watch([data.target, data.contentEl], (_ref, _ref2) => {
8532
+ let [newTarget, newContentEl] = _ref;
8533
+ let [oldTarget, oldContentEl] = _ref2;
8534
+ if (oldTarget && !Array.isArray(oldTarget)) observer.unobserve(oldTarget);
8535
+ if (newTarget && !Array.isArray(newTarget)) observer.observe(newTarget);
8499
8536
  if (oldContentEl) observer.unobserve(oldContentEl);
8500
8537
  if (newContentEl) observer.observe(newContentEl);
8501
8538
  }, {
@@ -8511,8 +8548,8 @@
8511
8548
  requestAnimationFrame(() => {
8512
8549
  requestAnimationFrame(() => observe = true);
8513
8550
  });
8514
- if (!data.activatorEl.value || !data.contentEl.value) return;
8515
- const targetBox = data.activatorEl.value.getBoundingClientRect();
8551
+ if (!data.target.value || !data.contentEl.value) return;
8552
+ const targetBox = getTargetBox(data.target.value);
8516
8553
  const contentBox = getIntrinsicSize(data.contentEl.value, data.isRtl.value);
8517
8554
  const scrollParents = getScrollParents(data.contentEl.value);
8518
8555
  const viewportMargin = 12;
@@ -8799,11 +8836,11 @@
8799
8836
  function onScroll(e) {
8800
8837
  data.isActive.value = false;
8801
8838
  }
8802
- bindScroll(data.activatorEl.value ?? data.contentEl.value, onScroll);
8839
+ bindScroll(data.targetEl.value ?? data.contentEl.value, onScroll);
8803
8840
  }
8804
8841
  function blockScrollStrategy(data, props) {
8805
8842
  const offsetParent = data.root.value?.offsetParent;
8806
- 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'));
8843
+ 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'));
8807
8844
  const scrollbarWidth = window.innerWidth - document.documentElement.offsetWidth;
8808
8845
  const scrollableParent = (el => hasScrollbar(el) && el)(offsetParent || document.documentElement);
8809
8846
  if (scrollableParent) {
@@ -8847,7 +8884,7 @@
8847
8884
  }
8848
8885
  ric = (typeof requestIdleCallback === 'undefined' ? cb => cb() : requestIdleCallback)(() => {
8849
8886
  scope.run(() => {
8850
- bindScroll(data.activatorEl.value ?? data.contentEl.value, e => {
8887
+ bindScroll(data.targetEl.value ?? data.contentEl.value, e => {
8851
8888
  if (slow) {
8852
8889
  // If the position calculation is slow,
8853
8890
  // defer updates until scrolling is finished.
@@ -8928,6 +8965,7 @@
8928
8965
  // Types
8929
8966
 
8930
8967
  const makeActivatorProps = propsFactory({
8968
+ target: [String, Object],
8931
8969
  activator: [String, Object],
8932
8970
  activatorProps: {
8933
8971
  type: Object,
@@ -8950,6 +8988,7 @@
8950
8988
  isActive,
8951
8989
  isTop
8952
8990
  } = _ref;
8991
+ const vm = getCurrentInstance('useActivator');
8953
8992
  const activatorEl = vue.ref();
8954
8993
  let isHovered = false;
8955
8994
  let isFocused = false;
@@ -8967,10 +9006,14 @@
8967
9006
  isActive.value = value;
8968
9007
  }
8969
9008
  });
9009
+ const cursorTarget = vue.ref();
8970
9010
  const availableEvents = {
8971
9011
  onClick: e => {
8972
9012
  e.stopPropagation();
8973
9013
  activatorEl.value = e.currentTarget || e.target;
9014
+ if (!isActive.value) {
9015
+ cursorTarget.value = [e.clientX, e.clientY];
9016
+ }
8974
9017
  isActive.value = !isActive.value;
8975
9018
  },
8976
9019
  onMouseenter: e => {
@@ -9064,6 +9107,15 @@
9064
9107
  isActive.value = false;
9065
9108
  }
9066
9109
  });
9110
+ vue.watch(isActive, val => {
9111
+ if (!val) {
9112
+ setTimeout(() => {
9113
+ cursorTarget.value = undefined;
9114
+ });
9115
+ }
9116
+ }, {
9117
+ flush: 'post'
9118
+ });
9067
9119
  const activatorRef = vue.ref();
9068
9120
  vue.watchEffect(() => {
9069
9121
  if (!activatorRef.value) return;
@@ -9071,7 +9123,15 @@
9071
9123
  activatorEl.value = refElement(activatorRef.value);
9072
9124
  });
9073
9125
  });
9074
- const vm = getCurrentInstance('useActivator');
9126
+ const targetRef = vue.ref();
9127
+ const target = vue.computed(() => {
9128
+ if (props.target === 'cursor' && cursorTarget.value) return cursorTarget.value;
9129
+ if (targetRef.value) return refElement(targetRef.value);
9130
+ return getTarget(props.target, vm) || activatorEl.value;
9131
+ });
9132
+ const targetEl = vue.computed(() => {
9133
+ return Array.isArray(target.value) ? undefined : target.value;
9134
+ });
9075
9135
  let scope;
9076
9136
  vue.watch(() => !!props.activator, val => {
9077
9137
  if (val && IN_BROWSER) {
@@ -9095,6 +9155,9 @@
9095
9155
  return {
9096
9156
  activatorEl,
9097
9157
  activatorRef,
9158
+ target,
9159
+ targetEl,
9160
+ targetRef,
9098
9161
  activatorEvents,
9099
9162
  contentEvents,
9100
9163
  scrimEvents
@@ -9136,31 +9199,34 @@
9136
9199
  }
9137
9200
  function getActivator() {
9138
9201
  let selector = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : props.activator;
9139
- let activator;
9140
- if (selector) {
9141
- if (selector === 'parent') {
9142
- let el = vm?.proxy?.$el?.parentNode;
9143
- while (el?.hasAttribute('data-no-activator')) {
9144
- el = el.parentNode;
9145
- }
9146
- activator = el;
9147
- } else if (typeof selector === 'string') {
9148
- // Selector
9149
- activator = document.querySelector(selector);
9150
- } else if ('$el' in selector) {
9151
- // Component (ref)
9152
- activator = selector.$el;
9153
- } else {
9154
- // HTMLElement | Element
9155
- activator = selector;
9156
- }
9157
- }
9202
+ const activator = getTarget(selector, vm);
9158
9203
 
9159
9204
  // The activator should only be a valid element (Ignore comments and text nodes)
9160
- activatorEl.value = activator?.nodeType === Node.ELEMENT_NODE ? activator : null;
9205
+ activatorEl.value = activator?.nodeType === Node.ELEMENT_NODE ? activator : undefined;
9161
9206
  return activatorEl.value;
9162
9207
  }
9163
9208
  }
9209
+ function getTarget(selector, vm) {
9210
+ if (!selector) return;
9211
+ let target;
9212
+ if (selector === 'parent') {
9213
+ let el = vm?.proxy?.$el?.parentNode;
9214
+ while (el?.hasAttribute('data-no-activator')) {
9215
+ el = el.parentNode;
9216
+ }
9217
+ target = el;
9218
+ } else if (typeof selector === 'string') {
9219
+ // Selector
9220
+ target = document.querySelector(selector);
9221
+ } else if ('$el' in selector) {
9222
+ // Component (ref)
9223
+ target = selector.$el;
9224
+ } else {
9225
+ // HTMLElement | Element | [x, y]
9226
+ target = selector;
9227
+ }
9228
+ return target;
9229
+ }
9164
9230
 
9165
9231
  // Utilities
9166
9232
 
@@ -9284,10 +9350,30 @@
9284
9350
  ssr: !!ssr
9285
9351
  };
9286
9352
  }
9353
+ const makeDisplayProps = propsFactory({
9354
+ mobileBreakpoint: [Number, String]
9355
+ }, 'display');
9287
9356
  function useDisplay() {
9357
+ let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
9358
+ let name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getCurrentInstanceName();
9288
9359
  const display = vue.inject(DisplaySymbol);
9289
9360
  if (!display) throw new Error('Could not find Vuetify display injection');
9290
- return display;
9361
+ const mobile = vue.computed(() => {
9362
+ if (!props.mobileBreakpoint) return display.mobile.value;
9363
+ const breakpointValue = typeof props.mobileBreakpoint === 'number' ? props.mobileBreakpoint : display.thresholds.value[props.mobileBreakpoint];
9364
+ return display.width.value < breakpointValue;
9365
+ });
9366
+ const displayClasses = vue.computed(() => {
9367
+ if (!name) return {};
9368
+ return {
9369
+ [`${name}--mobile`]: mobile.value
9370
+ };
9371
+ });
9372
+ return {
9373
+ ...display,
9374
+ displayClasses,
9375
+ mobile
9376
+ };
9291
9377
  }
9292
9378
 
9293
9379
  // Composables
@@ -9604,6 +9690,9 @@
9604
9690
  const {
9605
9691
  activatorEl,
9606
9692
  activatorRef,
9693
+ target,
9694
+ targetEl,
9695
+ targetRef,
9607
9696
  activatorEvents,
9608
9697
  contentEvents,
9609
9698
  scrimEvents
@@ -9629,13 +9718,13 @@
9629
9718
  } = useLocationStrategies(props, {
9630
9719
  isRtl,
9631
9720
  contentEl,
9632
- activatorEl,
9721
+ target,
9633
9722
  isActive
9634
9723
  });
9635
9724
  useScrollStrategies(props, {
9636
9725
  root,
9637
9726
  contentEl,
9638
- activatorEl,
9727
+ targetEl,
9639
9728
  isActive,
9640
9729
  updateLocation
9641
9730
  });
@@ -9703,7 +9792,8 @@
9703
9792
  useRender(() => vue.createVNode(vue.Fragment, null, [slots.activator?.({
9704
9793
  isActive: isActive.value,
9705
9794
  props: vue.mergeProps({
9706
- ref: activatorRef
9795
+ ref: activatorRef,
9796
+ targetRef
9707
9797
  }, activatorEvents.value, props.activatorProps)
9708
9798
  }), isMounted.value && hasContent.value && vue.createVNode(vue.Teleport, {
9709
9799
  "disabled": !teleportTarget.value,
@@ -9726,7 +9816,7 @@
9726
9816
  "appear": true,
9727
9817
  "persisted": true,
9728
9818
  "transition": props.transition,
9729
- "target": activatorEl.value,
9819
+ "target": target.value,
9730
9820
  "onAfterLeave": () => {
9731
9821
  onAfterLeave();
9732
9822
  emit('afterLeave');
@@ -9747,6 +9837,7 @@
9747
9837
  })]));
9748
9838
  return {
9749
9839
  activatorEl,
9840
+ target,
9750
9841
  animateClick,
9751
9842
  contentEl,
9752
9843
  globalTop,
@@ -11886,6 +11977,7 @@
11886
11977
  ...makeComponentProps(),
11887
11978
  ...makeDensityProps(),
11888
11979
  ...makeDimensionProps(),
11980
+ ...makeDisplayProps(),
11889
11981
  ...makeElevationProps(),
11890
11982
  ...makeLocationProps(),
11891
11983
  ...makePositionProps(),
@@ -11907,8 +11999,9 @@
11907
11999
  densityClasses
11908
12000
  } = useDensity(props);
11909
12001
  const {
12002
+ displayClasses,
11910
12003
  mobile
11911
- } = useDisplay();
12004
+ } = useDisplay(props);
11912
12005
  const {
11913
12006
  dimensionStyles
11914
12007
  } = useDimension(props);
@@ -11944,7 +12037,7 @@
11944
12037
  'v-banner--stacked': props.stacked || mobile.value,
11945
12038
  'v-banner--sticky': props.sticky,
11946
12039
  [`v-banner--${props.lines}-line`]: !!props.lines
11947
- }, borderClasses.value, densityClasses.value, elevationClasses.value, positionClasses.value, roundedClasses.value, themeClasses.value, props.class],
12040
+ }, borderClasses.value, densityClasses.value, displayClasses.value, elevationClasses.value, positionClasses.value, roundedClasses.value, themeClasses.value, props.class],
11948
12041
  "style": [dimensionStyles.value, locationStyles.value, props.style],
11949
12042
  "role": "banner"
11950
12043
  }, {
@@ -12251,12 +12344,17 @@
12251
12344
  item,
12252
12345
  raw
12253
12346
  } = _ref2;
12254
- return vue.createVNode(vue.Fragment, null, [vue.createVNode(VBreadcrumbsItem, vue.mergeProps({
12255
- "key": item.title,
12347
+ return vue.createVNode(vue.Fragment, null, [slots.item?.({
12348
+ item,
12349
+ index
12350
+ }) ?? vue.createVNode(VBreadcrumbsItem, vue.mergeProps({
12351
+ "key": index,
12256
12352
  "disabled": index >= array.length - 1
12257
- }, item), {
12353
+ }, typeof item === 'string' ? {
12354
+ title: item
12355
+ } : item), {
12258
12356
  default: slots.title ? () => slots.title?.({
12259
- item: raw,
12357
+ item,
12260
12358
  index
12261
12359
  }) : undefined
12262
12360
  }), index < array.length - 1 && vue.createVNode(VBreadcrumbsDivider, null, {
@@ -13594,7 +13692,11 @@
13594
13692
  ...makeRoundedProps(),
13595
13693
  ...makeElevationProps({
13596
13694
  elevation: 2
13597
- })
13695
+ }),
13696
+ ripple: {
13697
+ type: Boolean,
13698
+ default: true
13699
+ }
13598
13700
  }, 'Slider');
13599
13701
  const useSteps = props => {
13600
13702
  const min = vue.computed(() => parseFloat(props.min));
@@ -14201,7 +14303,8 @@
14201
14303
  "position": trackStop.value,
14202
14304
  "elevation": props.elevation,
14203
14305
  "onFocus": focus,
14204
- "onBlur": blur
14306
+ "onBlur": blur,
14307
+ "ripple": props.ripple
14205
14308
  }, {
14206
14309
  'thumb-label': slots['thumb-label']
14207
14310
  })]);
@@ -14232,12 +14335,36 @@
14232
14335
  let {
14233
14336
  emit
14234
14337
  } = _ref;
14338
+ const abortController = new AbortController();
14339
+ vue.onUnmounted(() => abortController.abort());
14340
+ async function openEyeDropper() {
14341
+ if (!SUPPORTS_EYE_DROPPER) return;
14342
+ const eyeDropper = new window.EyeDropper();
14343
+ try {
14344
+ const result = await eyeDropper.open({
14345
+ signal: abortController.signal
14346
+ });
14347
+ const colorHexValue = HexToHSV(result.sRGBHex);
14348
+ emit('update:color', {
14349
+ ...(props.color ?? nullColor),
14350
+ ...colorHexValue
14351
+ });
14352
+ } catch (e) {}
14353
+ }
14235
14354
  useRender(() => vue.createVNode("div", {
14236
14355
  "class": ['v-color-picker-preview', {
14237
14356
  'v-color-picker-preview--hide-alpha': props.hideAlpha
14238
14357
  }, props.class],
14239
14358
  "style": props.style
14240
- }, [vue.createVNode("div", {
14359
+ }, [SUPPORTS_EYE_DROPPER && vue.createVNode("div", {
14360
+ "class": "v-color-picker-preview__eye-dropper",
14361
+ "key": "eyeDropper"
14362
+ }, [vue.createVNode(VBtn, {
14363
+ "onClick": openEyeDropper,
14364
+ "icon": "$eyeDropper",
14365
+ "variant": "plain",
14366
+ "density": "comfortable"
14367
+ }, null)]), vue.createVNode("div", {
14241
14368
  "class": "v-color-picker-preview__dot"
14242
14369
  }, [vue.createVNode("div", {
14243
14370
  "style": {
@@ -16918,6 +17045,7 @@
16918
17045
  sticky: Boolean,
16919
17046
  ...makeBorderProps(),
16920
17047
  ...makeComponentProps(),
17048
+ ...makeDisplayProps(),
16921
17049
  ...makeElevationProps(),
16922
17050
  ...makeLayoutItemProps(),
16923
17051
  ...makeRoundedProps(),
@@ -16956,8 +17084,9 @@
16956
17084
  elevationClasses
16957
17085
  } = useElevation(props);
16958
17086
  const {
17087
+ displayClasses,
16959
17088
  mobile
16960
- } = useDisplay();
17089
+ } = useDisplay(props);
16961
17090
  const {
16962
17091
  roundedClasses
16963
17092
  } = useRounded(props);
@@ -17068,7 +17197,7 @@
17068
17197
  'v-navigation-drawer--temporary': isTemporary.value,
17069
17198
  'v-navigation-drawer--active': isActive.value,
17070
17199
  'v-navigation-drawer--sticky': isSticky.value
17071
- }, themeClasses.value, backgroundColorClasses.value, borderClasses.value, elevationClasses.value, roundedClasses.value, props.class],
17200
+ }, themeClasses.value, backgroundColorClasses.value, borderClasses.value, displayClasses.value, elevationClasses.value, roundedClasses.value, props.class],
17072
17201
  "style": [backgroundColorStyles.value, layoutItemStyles.value, dragStyles.value, ssrBootStyles.value, stickyStyles.value, props.style]
17073
17202
  }, scopeId, attrs), {
17074
17203
  default: () => [hasImage && vue.createVNode("div", {
@@ -17816,7 +17945,8 @@
17816
17945
  },
17817
17946
  "min": min.value,
17818
17947
  "max": model.value[1],
17819
- "position": trackStart.value
17948
+ "position": trackStart.value,
17949
+ "ripple": props.ripple
17820
17950
  }, {
17821
17951
  'thumb-label': slots['thumb-label']
17822
17952
  }), vue.createVNode(VSliderThumb, {
@@ -17844,7 +17974,8 @@
17844
17974
  },
17845
17975
  "min": model.value[0],
17846
17976
  "max": max.value,
17847
- "position": trackStop.value
17977
+ "position": trackStop.value,
17978
+ "ripple": props.ripple
17848
17979
  }, {
17849
17980
  'thumb-label': slots['thumb-label']
17850
17981
  })]);
@@ -18118,6 +18249,7 @@
18118
18249
  validator: v => typeof v === 'boolean' || ['always', 'desktop', 'mobile'].includes(v)
18119
18250
  },
18120
18251
  ...makeComponentProps(),
18252
+ ...makeDisplayProps(),
18121
18253
  ...makeTagProps(),
18122
18254
  ...makeGroupProps({
18123
18255
  selectedClass: 'v-slide-group-item--active'
@@ -18137,8 +18269,9 @@
18137
18269
  isRtl
18138
18270
  } = useRtl();
18139
18271
  const {
18272
+ displayClasses,
18140
18273
  mobile
18141
- } = useDisplay();
18274
+ } = useDisplay(props);
18142
18275
  const group = useGroup(props, props.symbol);
18143
18276
  const isOverflowing = vue.shallowRef(false);
18144
18277
  const scrollOffset = vue.shallowRef(0);
@@ -18358,7 +18491,7 @@
18358
18491
  'v-slide-group--vertical': !isHorizontal.value,
18359
18492
  'v-slide-group--has-affixes': hasAffixes.value,
18360
18493
  'v-slide-group--is-overflowing': isOverflowing.value
18361
- }, props.class],
18494
+ }, displayClasses.value, props.class],
18362
18495
  "style": props.style,
18363
18496
  "tabindex": isFocused.value || group.selected.value.length ? -1 : 0,
18364
18497
  "onFocus": onFocus
@@ -18433,8 +18566,41 @@
18433
18566
  }
18434
18567
  });
18435
18568
 
18569
+ function useCountdown(milliseconds) {
18570
+ const time = vue.shallowRef(milliseconds);
18571
+ let timer = -1;
18572
+ function clear() {
18573
+ clearInterval(timer);
18574
+ }
18575
+ function reset() {
18576
+ clear();
18577
+ vue.nextTick(() => time.value = milliseconds);
18578
+ }
18579
+ function start(el) {
18580
+ const style = el ? getComputedStyle(el) : {
18581
+ transitionDuration: 0.2
18582
+ };
18583
+ const interval = parseFloat(style.transitionDuration) * 1000 || 200;
18584
+ clear();
18585
+ if (time.value <= 0) return;
18586
+ const startTime = performance.now();
18587
+ timer = window.setInterval(() => {
18588
+ const elapsed = performance.now() - startTime + interval;
18589
+ time.value = Math.max(milliseconds - elapsed, 0);
18590
+ if (time.value <= 0) clear();
18591
+ }, interval);
18592
+ }
18593
+ vue.onScopeDispose(clear);
18594
+ return {
18595
+ clear,
18596
+ time,
18597
+ start,
18598
+ reset
18599
+ };
18600
+ }
18436
18601
  const makeVSnackbarProps = propsFactory({
18437
18602
  multiLine: Boolean,
18603
+ timer: [Boolean, String],
18438
18604
  timeout: {
18439
18605
  type: [Number, String],
18440
18606
  default: 5000
@@ -18482,7 +18648,10 @@
18482
18648
  const {
18483
18649
  roundedClasses
18484
18650
  } = useRounded(props);
18651
+ const countdown = useCountdown(Number(props.timeout));
18485
18652
  const overlay = vue.ref();
18653
+ const timerRef = vue.ref();
18654
+ const isHovering = vue.shallowRef(false);
18486
18655
  vue.watch(isActive, startTimeout);
18487
18656
  vue.watch(() => props.timeout, startTimeout);
18488
18657
  vue.onMounted(() => {
@@ -18490,16 +18659,28 @@
18490
18659
  });
18491
18660
  let activeTimeout = -1;
18492
18661
  function startTimeout() {
18662
+ countdown.reset();
18493
18663
  window.clearTimeout(activeTimeout);
18494
18664
  const timeout = Number(props.timeout);
18495
18665
  if (!isActive.value || timeout === -1) return;
18666
+ const element = refElement(timerRef.value);
18667
+ countdown.start(element);
18496
18668
  activeTimeout = window.setTimeout(() => {
18497
18669
  isActive.value = false;
18498
18670
  }, timeout);
18499
18671
  }
18500
- function onPointerenter() {
18672
+ function clearTimeout() {
18673
+ countdown.reset();
18501
18674
  window.clearTimeout(activeTimeout);
18502
18675
  }
18676
+ function onPointerenter() {
18677
+ isHovering.value = true;
18678
+ clearTimeout();
18679
+ }
18680
+ function onPointerleave() {
18681
+ isHovering.value = false;
18682
+ startTimeout();
18683
+ }
18503
18684
  useRender(() => {
18504
18685
  const [overlayProps] = VOverlay.filterProps(props);
18505
18686
  return vue.createVNode(VOverlay, vue.mergeProps({
@@ -18507,6 +18688,7 @@
18507
18688
  "class": ['v-snackbar', {
18508
18689
  'v-snackbar--active': isActive.value,
18509
18690
  'v-snackbar--multi-line': props.multiLine && !props.vertical,
18691
+ 'v-snackbar--timer': !!props.timer,
18510
18692
  'v-snackbar--vertical': props.vertical
18511
18693
  }, positionClasses.value, props.class],
18512
18694
  "style": props.style
@@ -18517,7 +18699,7 @@
18517
18699
  class: ['v-snackbar__wrapper', themeClasses.value, colorClasses.value, roundedClasses.value, variantClasses.value],
18518
18700
  style: [locationStyles.value, colorStyles.value],
18519
18701
  onPointerenter,
18520
- onPointerleave: startTimeout
18702
+ onPointerleave
18521
18703
  }, overlayProps.contentProps),
18522
18704
  "persistent": true,
18523
18705
  "noClickAnimation": true,
@@ -18525,7 +18707,16 @@
18525
18707
  "scrollStrategy": "none",
18526
18708
  "_disableGlobalStack": true
18527
18709
  }, scopeId), {
18528
- default: () => [genOverlays(false, 'v-snackbar'), slots.default && vue.createVNode("div", {
18710
+ default: () => [genOverlays(false, 'v-snackbar'), props.timer && vue.createVNode("div", {
18711
+ "key": "timer",
18712
+ "class": "v-snackbar__timer"
18713
+ }, [vue.createVNode(VProgressLinear, {
18714
+ "ref": timerRef,
18715
+ "active": !isHovering.value,
18716
+ "color": typeof props.timer === 'string' ? props.timer : 'info',
18717
+ "max": props.timeout,
18718
+ "model-value": countdown.time.value
18719
+ }, null)]), slots.default && vue.createVNode("div", {
18529
18720
  "class": "v-snackbar__content",
18530
18721
  "role": "status",
18531
18722
  "aria-live": "polite"
@@ -24578,7 +24769,7 @@
24578
24769
  date
24579
24770
  };
24580
24771
  }
24581
- const version$1 = "3.3.15";
24772
+ const version$1 = "3.4.0-alpha.1";
24582
24773
  createVuetify$1.version = version$1;
24583
24774
 
24584
24775
  // Vue's inject() can only be used in setup
@@ -24592,7 +24783,7 @@
24592
24783
 
24593
24784
  /* eslint-disable local-rules/sort-imports */
24594
24785
 
24595
- const version = "3.3.15";
24786
+ const version = "3.4.0-alpha.1";
24596
24787
 
24597
24788
  /* eslint-disable local-rules/sort-imports */
24598
24789