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,10 +1,10 @@
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
  */
6
6
 
7
- import { Fragment, reactive, computed, watchEffect, toRefs, capitalize, warn, ref, unref, provide, shallowRef, inject as inject$1, defineComponent as defineComponent$1, camelize, h, getCurrentInstance as getCurrentInstance$1, onBeforeUnmount, watch, readonly, onDeactivated, onActivated, onMounted, onScopeDispose, effectScope, toRaw, createVNode, TransitionGroup, Transition, mergeProps, onBeforeMount, nextTick, withDirectives, resolveDirective, vShow, isRef, toRef, Text, resolveDynamicComponent, Teleport, cloneVNode, createTextVNode, onBeforeUpdate, vModelText } from 'vue';
7
+ import { Fragment, reactive, computed, watchEffect, toRefs, capitalize, warn, ref, unref, provide, shallowRef, inject as inject$1, defineComponent as defineComponent$1, camelize, h, getCurrentInstance as getCurrentInstance$1, onBeforeUnmount, watch, readonly, onDeactivated, onActivated, onMounted, onScopeDispose, effectScope, toRaw, createVNode, TransitionGroup, Transition, mergeProps, onBeforeMount, nextTick, withDirectives, resolveDirective, vShow, isRef, toRef, Text, resolveDynamicComponent, Teleport, cloneVNode, createTextVNode, onUnmounted, onBeforeUpdate, vModelText } from 'vue';
8
8
 
9
9
  // Types
10
10
  // eslint-disable-line vue/prefer-import-from-vue
@@ -74,6 +74,7 @@ const makeComponentProps = propsFactory({
74
74
  const IN_BROWSER = typeof window !== 'undefined';
75
75
  const SUPPORTS_INTERSECTION = IN_BROWSER && 'IntersectionObserver' in window;
76
76
  const SUPPORTS_TOUCH = IN_BROWSER && ('ontouchstart' in window || window.navigator.maxTouchPoints > 0);
77
+ const SUPPORTS_EYE_DROPPER = IN_BROWSER && 'EyeDropper' in window;
77
78
 
78
79
  function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
79
80
  function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
@@ -157,7 +158,15 @@ function isObject(obj) {
157
158
  return obj !== null && typeof obj === 'object' && !Array.isArray(obj);
158
159
  }
159
160
  function refElement(obj) {
160
- return obj && '$el' in obj ? obj.$el : obj;
161
+ if (obj && '$el' in obj) {
162
+ const el = obj.$el;
163
+ if (el?.nodeType === Node.TEXT_NODE) {
164
+ // Multi-root component, use the first element
165
+ return el.nextElementSibling;
166
+ }
167
+ return el;
168
+ }
169
+ return obj;
161
170
  }
162
171
 
163
172
  // KeyboardEvent.keyCode aliases
@@ -548,6 +557,18 @@ function getOverflow(a, b) {
548
557
  }
549
558
  };
550
559
  }
560
+ function getTargetBox(target) {
561
+ if (Array.isArray(target)) {
562
+ return new Box({
563
+ x: target[0],
564
+ y: target[1],
565
+ width: 0,
566
+ height: 0
567
+ });
568
+ } else {
569
+ return target.getBoundingClientRect();
570
+ }
571
+ }
551
572
 
552
573
  // Utilities
553
574
 
@@ -2106,9 +2127,9 @@ const defaultThemeOptions = {
2106
2127
  'surface-bright': '#FFFFFF',
2107
2128
  'surface-variant': '#424242',
2108
2129
  'on-surface-variant': '#EEEEEE',
2109
- primary: '#6200EE',
2110
- 'primary-darken-1': '#3700B3',
2111
- secondary: '#03DAC6',
2130
+ primary: '#1867C0',
2131
+ 'primary-darken-1': '#1F5592',
2132
+ secondary: '#48A9A6',
2112
2133
  'secondary-darken-1': '#018786',
2113
2134
  error: '#B00020',
2114
2135
  info: '#2196F3',
@@ -2142,10 +2163,10 @@ const defaultThemeOptions = {
2142
2163
  'surface-bright': '#ccbfd6',
2143
2164
  'surface-variant': '#a3a3a3',
2144
2165
  'on-surface-variant': '#424242',
2145
- primary: '#BB86FC',
2146
- 'primary-darken-1': '#3700B3',
2147
- secondary: '#03DAC5',
2148
- 'secondary-darken-1': '#03DAC5',
2166
+ primary: '#2196F3',
2167
+ 'primary-darken-1': '#277CC1',
2168
+ secondary: '#54B6B2',
2169
+ 'secondary-darken-1': '#48A9A6',
2149
2170
  error: '#CF6679',
2150
2171
  info: '#2196F3',
2151
2172
  success: '#4CAF50',
@@ -2630,7 +2651,7 @@ function ExpandTransitionGenerator () {
2630
2651
  // Types
2631
2652
 
2632
2653
  const makeVDialogTransitionProps = propsFactory({
2633
- target: Object
2654
+ target: [Object, Array]
2634
2655
  }, 'v-dialog-transition');
2635
2656
  const VDialogTransition = genericComponent()({
2636
2657
  name: 'VDialogTransition',
@@ -2732,7 +2753,7 @@ function getChildren(el) {
2732
2753
  return els && [...els];
2733
2754
  }
2734
2755
  function getDimensions(target, el) {
2735
- const targetBox = target.getBoundingClientRect();
2756
+ const targetBox = getTargetBox(target);
2736
2757
  const elBox = nullifyTransforms(el);
2737
2758
  const [originX, originY] = getComputedStyle(el).transformOrigin.split(' ').map(v => parseFloat(v));
2738
2759
  const [anchorSide, anchorOffset] = getComputedStyle(el).getPropertyValue('--v-overlay-anchor-origin').split(' ');
@@ -2978,6 +2999,10 @@ const Intersect = {
2978
2999
  const makeVImgProps = propsFactory({
2979
3000
  alt: String,
2980
3001
  cover: Boolean,
3002
+ draggable: {
3003
+ type: [Boolean, String],
3004
+ default: undefined
3005
+ },
2981
3006
  eager: Boolean,
2982
3007
  gradient: String,
2983
3008
  lazySrc: String,
@@ -2996,6 +3021,8 @@ const makeVImgProps = propsFactory({
2996
3021
  type: [String, Object],
2997
3022
  default: ''
2998
3023
  },
3024
+ crossorigin: String,
3025
+ referrerpolicy: String,
2999
3026
  srcset: String,
3000
3027
  ...makeVResponsiveProps(),
3001
3028
  ...makeComponentProps(),
@@ -3120,6 +3147,9 @@ const VImg = genericComponent()({
3120
3147
  "src": normalisedSrc.value.src,
3121
3148
  "srcset": normalisedSrc.value.srcset,
3122
3149
  "alt": props.alt,
3150
+ "crossorigin": props.crossorigin,
3151
+ "referrerpolicy": props.referrerpolicy,
3152
+ "draggable": props.draggable,
3123
3153
  "sizes": props.sizes,
3124
3154
  "ref": image,
3125
3155
  "onLoad": onLoad,
@@ -3141,7 +3171,10 @@ const VImg = genericComponent()({
3141
3171
  default: () => [normalisedSrc.value.lazySrc && state.value !== 'loaded' && createVNode("img", {
3142
3172
  "class": ['v-img__img', 'v-img__img--preload', containClasses.value],
3143
3173
  "src": normalisedSrc.value.lazySrc,
3144
- "alt": props.alt
3174
+ "alt": props.alt,
3175
+ "crossorigin": props.crossorigin,
3176
+ "referrerpolicy": props.referrerpolicy,
3177
+ "draggable": props.draggable
3145
3178
  }, null)]
3146
3179
  });
3147
3180
  const __placeholder = () => {
@@ -4165,7 +4198,8 @@ const aliases = {
4165
4198
  file: 'mdi-paperclip',
4166
4199
  plus: 'mdi-plus',
4167
4200
  minus: 'mdi-minus',
4168
- calendar: 'mdi-calendar'
4201
+ calendar: 'mdi-calendar',
4202
+ eyeDropper: 'mdi-eyedropper'
4169
4203
  };
4170
4204
  const mdi = {
4171
4205
  // Not using mergeProps here, functional components merge props by default (?)
@@ -5755,6 +5789,7 @@ const VSelectionControlGroup = genericComponent()({
5755
5789
 
5756
5790
  const makeVSelectionControlProps = propsFactory({
5757
5791
  label: String,
5792
+ baseColor: String,
5758
5793
  trueValue: null,
5759
5794
  falseValue: null,
5760
5795
  value: null,
@@ -5793,7 +5828,8 @@ function useSelectionControl(props) {
5793
5828
  textColorClasses,
5794
5829
  textColorStyles
5795
5830
  } = useTextColor(computed(() => {
5796
- return model.value && !props.error && !props.disabled ? props.color : undefined;
5831
+ if (props.error || props.disabled) return undefined;
5832
+ return model.value ? props.color : props.baseColor;
5797
5833
  }));
5798
5834
  const {
5799
5835
  backgroundColorClasses,
@@ -6595,6 +6631,7 @@ const makeVAvatarProps = propsFactory({
6595
6631
  end: Boolean,
6596
6632
  icon: IconValue,
6597
6633
  image: String,
6634
+ text: String,
6598
6635
  ...makeComponentProps(),
6599
6636
  ...makeDensityProps(),
6600
6637
  ...makeRoundedProps(),
@@ -6645,7 +6682,7 @@ const VAvatar = genericComponent()({
6645
6682
  }, null) : props.icon ? createVNode(VIcon, {
6646
6683
  "key": "icon",
6647
6684
  "icon": props.icon
6648
- }, null) : slots.default?.(), genOverlays(false, 'v-avatar')]
6685
+ }, null) : slots.default?.() ?? props.text, genOverlays(false, 'v-avatar')]
6649
6686
  }));
6650
6687
  return {};
6651
6688
  }
@@ -8426,7 +8463,7 @@ function getIntrinsicSize(el, isRtl) {
8426
8463
  return contentBox;
8427
8464
  }
8428
8465
  function connectedLocationStrategy(data, props, contentStyles) {
8429
- const activatorFixed = isFixedPosition(data.activatorEl.value);
8466
+ const activatorFixed = Array.isArray(data.target.value) || isFixedPosition(data.target.value);
8430
8467
  if (activatorFixed) {
8431
8468
  Object.assign(contentStyles.value, {
8432
8469
  position: 'fixed',
@@ -8475,11 +8512,11 @@ function connectedLocationStrategy(data, props, contentStyles) {
8475
8512
  const observer = new ResizeObserver(() => {
8476
8513
  if (observe) updateLocation();
8477
8514
  });
8478
- watch([data.activatorEl, data.contentEl], (_ref, _ref2) => {
8479
- let [newActivatorEl, newContentEl] = _ref;
8480
- let [oldActivatorEl, oldContentEl] = _ref2;
8481
- if (oldActivatorEl) observer.unobserve(oldActivatorEl);
8482
- if (newActivatorEl) observer.observe(newActivatorEl);
8515
+ watch([data.target, data.contentEl], (_ref, _ref2) => {
8516
+ let [newTarget, newContentEl] = _ref;
8517
+ let [oldTarget, oldContentEl] = _ref2;
8518
+ if (oldTarget && !Array.isArray(oldTarget)) observer.unobserve(oldTarget);
8519
+ if (newTarget && !Array.isArray(newTarget)) observer.observe(newTarget);
8483
8520
  if (oldContentEl) observer.unobserve(oldContentEl);
8484
8521
  if (newContentEl) observer.observe(newContentEl);
8485
8522
  }, {
@@ -8495,8 +8532,8 @@ function connectedLocationStrategy(data, props, contentStyles) {
8495
8532
  requestAnimationFrame(() => {
8496
8533
  requestAnimationFrame(() => observe = true);
8497
8534
  });
8498
- if (!data.activatorEl.value || !data.contentEl.value) return;
8499
- const targetBox = data.activatorEl.value.getBoundingClientRect();
8535
+ if (!data.target.value || !data.contentEl.value) return;
8536
+ const targetBox = getTargetBox(data.target.value);
8500
8537
  const contentBox = getIntrinsicSize(data.contentEl.value, data.isRtl.value);
8501
8538
  const scrollParents = getScrollParents(data.contentEl.value);
8502
8539
  const viewportMargin = 12;
@@ -8783,11 +8820,11 @@ function closeScrollStrategy(data) {
8783
8820
  function onScroll(e) {
8784
8821
  data.isActive.value = false;
8785
8822
  }
8786
- bindScroll(data.activatorEl.value ?? data.contentEl.value, onScroll);
8823
+ bindScroll(data.targetEl.value ?? data.contentEl.value, onScroll);
8787
8824
  }
8788
8825
  function blockScrollStrategy(data, props) {
8789
8826
  const offsetParent = data.root.value?.offsetParent;
8790
- 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'));
8827
+ 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'));
8791
8828
  const scrollbarWidth = window.innerWidth - document.documentElement.offsetWidth;
8792
8829
  const scrollableParent = (el => hasScrollbar(el) && el)(offsetParent || document.documentElement);
8793
8830
  if (scrollableParent) {
@@ -8831,7 +8868,7 @@ function repositionScrollStrategy(data, props, scope) {
8831
8868
  }
8832
8869
  ric = (typeof requestIdleCallback === 'undefined' ? cb => cb() : requestIdleCallback)(() => {
8833
8870
  scope.run(() => {
8834
- bindScroll(data.activatorEl.value ?? data.contentEl.value, e => {
8871
+ bindScroll(data.targetEl.value ?? data.contentEl.value, e => {
8835
8872
  if (slow) {
8836
8873
  // If the position calculation is slow,
8837
8874
  // defer updates until scrolling is finished.
@@ -8912,6 +8949,7 @@ function useDelay(props, cb) {
8912
8949
  // Types
8913
8950
 
8914
8951
  const makeActivatorProps = propsFactory({
8952
+ target: [String, Object],
8915
8953
  activator: [String, Object],
8916
8954
  activatorProps: {
8917
8955
  type: Object,
@@ -8934,6 +8972,7 @@ function useActivator(props, _ref) {
8934
8972
  isActive,
8935
8973
  isTop
8936
8974
  } = _ref;
8975
+ const vm = getCurrentInstance('useActivator');
8937
8976
  const activatorEl = ref();
8938
8977
  let isHovered = false;
8939
8978
  let isFocused = false;
@@ -8951,10 +8990,14 @@ function useActivator(props, _ref) {
8951
8990
  isActive.value = value;
8952
8991
  }
8953
8992
  });
8993
+ const cursorTarget = ref();
8954
8994
  const availableEvents = {
8955
8995
  onClick: e => {
8956
8996
  e.stopPropagation();
8957
8997
  activatorEl.value = e.currentTarget || e.target;
8998
+ if (!isActive.value) {
8999
+ cursorTarget.value = [e.clientX, e.clientY];
9000
+ }
8958
9001
  isActive.value = !isActive.value;
8959
9002
  },
8960
9003
  onMouseenter: e => {
@@ -9048,6 +9091,15 @@ function useActivator(props, _ref) {
9048
9091
  isActive.value = false;
9049
9092
  }
9050
9093
  });
9094
+ watch(isActive, val => {
9095
+ if (!val) {
9096
+ setTimeout(() => {
9097
+ cursorTarget.value = undefined;
9098
+ });
9099
+ }
9100
+ }, {
9101
+ flush: 'post'
9102
+ });
9051
9103
  const activatorRef = ref();
9052
9104
  watchEffect(() => {
9053
9105
  if (!activatorRef.value) return;
@@ -9055,7 +9107,15 @@ function useActivator(props, _ref) {
9055
9107
  activatorEl.value = refElement(activatorRef.value);
9056
9108
  });
9057
9109
  });
9058
- const vm = getCurrentInstance('useActivator');
9110
+ const targetRef = ref();
9111
+ const target = computed(() => {
9112
+ if (props.target === 'cursor' && cursorTarget.value) return cursorTarget.value;
9113
+ if (targetRef.value) return refElement(targetRef.value);
9114
+ return getTarget(props.target, vm) || activatorEl.value;
9115
+ });
9116
+ const targetEl = computed(() => {
9117
+ return Array.isArray(target.value) ? undefined : target.value;
9118
+ });
9059
9119
  let scope;
9060
9120
  watch(() => !!props.activator, val => {
9061
9121
  if (val && IN_BROWSER) {
@@ -9079,6 +9139,9 @@ function useActivator(props, _ref) {
9079
9139
  return {
9080
9140
  activatorEl,
9081
9141
  activatorRef,
9142
+ target,
9143
+ targetEl,
9144
+ targetRef,
9082
9145
  activatorEvents,
9083
9146
  contentEvents,
9084
9147
  scrimEvents
@@ -9120,31 +9183,34 @@ function _useActivator(props, vm, _ref2) {
9120
9183
  }
9121
9184
  function getActivator() {
9122
9185
  let selector = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : props.activator;
9123
- let activator;
9124
- if (selector) {
9125
- if (selector === 'parent') {
9126
- let el = vm?.proxy?.$el?.parentNode;
9127
- while (el?.hasAttribute('data-no-activator')) {
9128
- el = el.parentNode;
9129
- }
9130
- activator = el;
9131
- } else if (typeof selector === 'string') {
9132
- // Selector
9133
- activator = document.querySelector(selector);
9134
- } else if ('$el' in selector) {
9135
- // Component (ref)
9136
- activator = selector.$el;
9137
- } else {
9138
- // HTMLElement | Element
9139
- activator = selector;
9140
- }
9141
- }
9186
+ const activator = getTarget(selector, vm);
9142
9187
 
9143
9188
  // The activator should only be a valid element (Ignore comments and text nodes)
9144
- activatorEl.value = activator?.nodeType === Node.ELEMENT_NODE ? activator : null;
9189
+ activatorEl.value = activator?.nodeType === Node.ELEMENT_NODE ? activator : undefined;
9145
9190
  return activatorEl.value;
9146
9191
  }
9147
9192
  }
9193
+ function getTarget(selector, vm) {
9194
+ if (!selector) return;
9195
+ let target;
9196
+ if (selector === 'parent') {
9197
+ let el = vm?.proxy?.$el?.parentNode;
9198
+ while (el?.hasAttribute('data-no-activator')) {
9199
+ el = el.parentNode;
9200
+ }
9201
+ target = el;
9202
+ } else if (typeof selector === 'string') {
9203
+ // Selector
9204
+ target = document.querySelector(selector);
9205
+ } else if ('$el' in selector) {
9206
+ // Component (ref)
9207
+ target = selector.$el;
9208
+ } else {
9209
+ // HTMLElement | Element | [x, y]
9210
+ target = selector;
9211
+ }
9212
+ return target;
9213
+ }
9148
9214
 
9149
9215
  // Utilities
9150
9216
 
@@ -9268,10 +9334,30 @@ function createDisplay(options, ssr) {
9268
9334
  ssr: !!ssr
9269
9335
  };
9270
9336
  }
9337
+ const makeDisplayProps = propsFactory({
9338
+ mobileBreakpoint: [Number, String]
9339
+ }, 'display');
9271
9340
  function useDisplay() {
9341
+ let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
9342
+ let name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getCurrentInstanceName();
9272
9343
  const display = inject$1(DisplaySymbol);
9273
9344
  if (!display) throw new Error('Could not find Vuetify display injection');
9274
- return display;
9345
+ const mobile = computed(() => {
9346
+ if (!props.mobileBreakpoint) return display.mobile.value;
9347
+ const breakpointValue = typeof props.mobileBreakpoint === 'number' ? props.mobileBreakpoint : display.thresholds.value[props.mobileBreakpoint];
9348
+ return display.width.value < breakpointValue;
9349
+ });
9350
+ const displayClasses = computed(() => {
9351
+ if (!name) return {};
9352
+ return {
9353
+ [`${name}--mobile`]: mobile.value
9354
+ };
9355
+ });
9356
+ return {
9357
+ ...display,
9358
+ displayClasses,
9359
+ mobile
9360
+ };
9275
9361
  }
9276
9362
 
9277
9363
  // Composables
@@ -9588,6 +9674,9 @@ const VOverlay = genericComponent()({
9588
9674
  const {
9589
9675
  activatorEl,
9590
9676
  activatorRef,
9677
+ target,
9678
+ targetEl,
9679
+ targetRef,
9591
9680
  activatorEvents,
9592
9681
  contentEvents,
9593
9682
  scrimEvents
@@ -9613,13 +9702,13 @@ const VOverlay = genericComponent()({
9613
9702
  } = useLocationStrategies(props, {
9614
9703
  isRtl,
9615
9704
  contentEl,
9616
- activatorEl,
9705
+ target,
9617
9706
  isActive
9618
9707
  });
9619
9708
  useScrollStrategies(props, {
9620
9709
  root,
9621
9710
  contentEl,
9622
- activatorEl,
9711
+ targetEl,
9623
9712
  isActive,
9624
9713
  updateLocation
9625
9714
  });
@@ -9687,7 +9776,8 @@ const VOverlay = genericComponent()({
9687
9776
  useRender(() => createVNode(Fragment, null, [slots.activator?.({
9688
9777
  isActive: isActive.value,
9689
9778
  props: mergeProps({
9690
- ref: activatorRef
9779
+ ref: activatorRef,
9780
+ targetRef
9691
9781
  }, activatorEvents.value, props.activatorProps)
9692
9782
  }), isMounted.value && hasContent.value && createVNode(Teleport, {
9693
9783
  "disabled": !teleportTarget.value,
@@ -9710,7 +9800,7 @@ const VOverlay = genericComponent()({
9710
9800
  "appear": true,
9711
9801
  "persisted": true,
9712
9802
  "transition": props.transition,
9713
- "target": activatorEl.value,
9803
+ "target": target.value,
9714
9804
  "onAfterLeave": () => {
9715
9805
  onAfterLeave();
9716
9806
  emit('afterLeave');
@@ -9731,6 +9821,7 @@ const VOverlay = genericComponent()({
9731
9821
  })]));
9732
9822
  return {
9733
9823
  activatorEl,
9824
+ target,
9734
9825
  animateClick,
9735
9826
  contentEl,
9736
9827
  globalTop,
@@ -11870,6 +11961,7 @@ const makeVBannerProps = propsFactory({
11870
11961
  ...makeComponentProps(),
11871
11962
  ...makeDensityProps(),
11872
11963
  ...makeDimensionProps(),
11964
+ ...makeDisplayProps(),
11873
11965
  ...makeElevationProps(),
11874
11966
  ...makeLocationProps(),
11875
11967
  ...makePositionProps(),
@@ -11891,8 +11983,9 @@ const VBanner = genericComponent()({
11891
11983
  densityClasses
11892
11984
  } = useDensity(props);
11893
11985
  const {
11986
+ displayClasses,
11894
11987
  mobile
11895
- } = useDisplay();
11988
+ } = useDisplay(props);
11896
11989
  const {
11897
11990
  dimensionStyles
11898
11991
  } = useDimension(props);
@@ -11928,7 +12021,7 @@ const VBanner = genericComponent()({
11928
12021
  'v-banner--stacked': props.stacked || mobile.value,
11929
12022
  'v-banner--sticky': props.sticky,
11930
12023
  [`v-banner--${props.lines}-line`]: !!props.lines
11931
- }, borderClasses.value, densityClasses.value, elevationClasses.value, positionClasses.value, roundedClasses.value, themeClasses.value, props.class],
12024
+ }, borderClasses.value, densityClasses.value, displayClasses.value, elevationClasses.value, positionClasses.value, roundedClasses.value, themeClasses.value, props.class],
11932
12025
  "style": [dimensionStyles.value, locationStyles.value, props.style],
11933
12026
  "role": "banner"
11934
12027
  }, {
@@ -12235,12 +12328,17 @@ const VBreadcrumbs = genericComponent()({
12235
12328
  item,
12236
12329
  raw
12237
12330
  } = _ref2;
12238
- return createVNode(Fragment, null, [createVNode(VBreadcrumbsItem, mergeProps({
12239
- "key": item.title,
12331
+ return createVNode(Fragment, null, [slots.item?.({
12332
+ item,
12333
+ index
12334
+ }) ?? createVNode(VBreadcrumbsItem, mergeProps({
12335
+ "key": index,
12240
12336
  "disabled": index >= array.length - 1
12241
- }, item), {
12337
+ }, typeof item === 'string' ? {
12338
+ title: item
12339
+ } : item), {
12242
12340
  default: slots.title ? () => slots.title?.({
12243
- item: raw,
12341
+ item,
12244
12342
  index
12245
12343
  }) : undefined
12246
12344
  }), index < array.length - 1 && createVNode(VBreadcrumbsDivider, null, {
@@ -13578,7 +13676,11 @@ const makeSliderProps = propsFactory({
13578
13676
  ...makeRoundedProps(),
13579
13677
  ...makeElevationProps({
13580
13678
  elevation: 2
13581
- })
13679
+ }),
13680
+ ripple: {
13681
+ type: Boolean,
13682
+ default: true
13683
+ }
13582
13684
  }, 'Slider');
13583
13685
  const useSteps = props => {
13584
13686
  const min = computed(() => parseFloat(props.min));
@@ -14185,7 +14287,8 @@ const VSlider = genericComponent()({
14185
14287
  "position": trackStop.value,
14186
14288
  "elevation": props.elevation,
14187
14289
  "onFocus": focus,
14188
- "onBlur": blur
14290
+ "onBlur": blur,
14291
+ "ripple": props.ripple
14189
14292
  }, {
14190
14293
  'thumb-label': slots['thumb-label']
14191
14294
  })]);
@@ -14216,12 +14319,36 @@ const VColorPickerPreview = defineComponent({
14216
14319
  let {
14217
14320
  emit
14218
14321
  } = _ref;
14322
+ const abortController = new AbortController();
14323
+ onUnmounted(() => abortController.abort());
14324
+ async function openEyeDropper() {
14325
+ if (!SUPPORTS_EYE_DROPPER) return;
14326
+ const eyeDropper = new window.EyeDropper();
14327
+ try {
14328
+ const result = await eyeDropper.open({
14329
+ signal: abortController.signal
14330
+ });
14331
+ const colorHexValue = HexToHSV(result.sRGBHex);
14332
+ emit('update:color', {
14333
+ ...(props.color ?? nullColor),
14334
+ ...colorHexValue
14335
+ });
14336
+ } catch (e) {}
14337
+ }
14219
14338
  useRender(() => createVNode("div", {
14220
14339
  "class": ['v-color-picker-preview', {
14221
14340
  'v-color-picker-preview--hide-alpha': props.hideAlpha
14222
14341
  }, props.class],
14223
14342
  "style": props.style
14224
- }, [createVNode("div", {
14343
+ }, [SUPPORTS_EYE_DROPPER && createVNode("div", {
14344
+ "class": "v-color-picker-preview__eye-dropper",
14345
+ "key": "eyeDropper"
14346
+ }, [createVNode(VBtn, {
14347
+ "onClick": openEyeDropper,
14348
+ "icon": "$eyeDropper",
14349
+ "variant": "plain",
14350
+ "density": "comfortable"
14351
+ }, null)]), createVNode("div", {
14225
14352
  "class": "v-color-picker-preview__dot"
14226
14353
  }, [createVNode("div", {
14227
14354
  "style": {
@@ -16902,6 +17029,7 @@ const makeVNavigationDrawerProps = propsFactory({
16902
17029
  sticky: Boolean,
16903
17030
  ...makeBorderProps(),
16904
17031
  ...makeComponentProps(),
17032
+ ...makeDisplayProps(),
16905
17033
  ...makeElevationProps(),
16906
17034
  ...makeLayoutItemProps(),
16907
17035
  ...makeRoundedProps(),
@@ -16940,8 +17068,9 @@ const VNavigationDrawer = genericComponent()({
16940
17068
  elevationClasses
16941
17069
  } = useElevation(props);
16942
17070
  const {
17071
+ displayClasses,
16943
17072
  mobile
16944
- } = useDisplay();
17073
+ } = useDisplay(props);
16945
17074
  const {
16946
17075
  roundedClasses
16947
17076
  } = useRounded(props);
@@ -17052,7 +17181,7 @@ const VNavigationDrawer = genericComponent()({
17052
17181
  'v-navigation-drawer--temporary': isTemporary.value,
17053
17182
  'v-navigation-drawer--active': isActive.value,
17054
17183
  'v-navigation-drawer--sticky': isSticky.value
17055
- }, themeClasses.value, backgroundColorClasses.value, borderClasses.value, elevationClasses.value, roundedClasses.value, props.class],
17184
+ }, themeClasses.value, backgroundColorClasses.value, borderClasses.value, displayClasses.value, elevationClasses.value, roundedClasses.value, props.class],
17056
17185
  "style": [backgroundColorStyles.value, layoutItemStyles.value, dragStyles.value, ssrBootStyles.value, stickyStyles.value, props.style]
17057
17186
  }, scopeId, attrs), {
17058
17187
  default: () => [hasImage && createVNode("div", {
@@ -17800,7 +17929,8 @@ const VRangeSlider = genericComponent()({
17800
17929
  },
17801
17930
  "min": min.value,
17802
17931
  "max": model.value[1],
17803
- "position": trackStart.value
17932
+ "position": trackStart.value,
17933
+ "ripple": props.ripple
17804
17934
  }, {
17805
17935
  'thumb-label': slots['thumb-label']
17806
17936
  }), createVNode(VSliderThumb, {
@@ -17828,7 +17958,8 @@ const VRangeSlider = genericComponent()({
17828
17958
  },
17829
17959
  "min": model.value[0],
17830
17960
  "max": max.value,
17831
- "position": trackStop.value
17961
+ "position": trackStop.value,
17962
+ "ripple": props.ripple
17832
17963
  }, {
17833
17964
  'thumb-label': slots['thumb-label']
17834
17965
  })]);
@@ -18102,6 +18233,7 @@ const makeVSlideGroupProps = propsFactory({
18102
18233
  validator: v => typeof v === 'boolean' || ['always', 'desktop', 'mobile'].includes(v)
18103
18234
  },
18104
18235
  ...makeComponentProps(),
18236
+ ...makeDisplayProps(),
18105
18237
  ...makeTagProps(),
18106
18238
  ...makeGroupProps({
18107
18239
  selectedClass: 'v-slide-group-item--active'
@@ -18121,8 +18253,9 @@ const VSlideGroup = genericComponent()({
18121
18253
  isRtl
18122
18254
  } = useRtl();
18123
18255
  const {
18256
+ displayClasses,
18124
18257
  mobile
18125
- } = useDisplay();
18258
+ } = useDisplay(props);
18126
18259
  const group = useGroup(props, props.symbol);
18127
18260
  const isOverflowing = shallowRef(false);
18128
18261
  const scrollOffset = shallowRef(0);
@@ -18342,7 +18475,7 @@ const VSlideGroup = genericComponent()({
18342
18475
  'v-slide-group--vertical': !isHorizontal.value,
18343
18476
  'v-slide-group--has-affixes': hasAffixes.value,
18344
18477
  'v-slide-group--is-overflowing': isOverflowing.value
18345
- }, props.class],
18478
+ }, displayClasses.value, props.class],
18346
18479
  "style": props.style,
18347
18480
  "tabindex": isFocused.value || group.selected.value.length ? -1 : 0,
18348
18481
  "onFocus": onFocus
@@ -18417,8 +18550,41 @@ const VSlideGroupItem = genericComponent()({
18417
18550
  }
18418
18551
  });
18419
18552
 
18553
+ function useCountdown(milliseconds) {
18554
+ const time = shallowRef(milliseconds);
18555
+ let timer = -1;
18556
+ function clear() {
18557
+ clearInterval(timer);
18558
+ }
18559
+ function reset() {
18560
+ clear();
18561
+ nextTick(() => time.value = milliseconds);
18562
+ }
18563
+ function start(el) {
18564
+ const style = el ? getComputedStyle(el) : {
18565
+ transitionDuration: 0.2
18566
+ };
18567
+ const interval = parseFloat(style.transitionDuration) * 1000 || 200;
18568
+ clear();
18569
+ if (time.value <= 0) return;
18570
+ const startTime = performance.now();
18571
+ timer = window.setInterval(() => {
18572
+ const elapsed = performance.now() - startTime + interval;
18573
+ time.value = Math.max(milliseconds - elapsed, 0);
18574
+ if (time.value <= 0) clear();
18575
+ }, interval);
18576
+ }
18577
+ onScopeDispose(clear);
18578
+ return {
18579
+ clear,
18580
+ time,
18581
+ start,
18582
+ reset
18583
+ };
18584
+ }
18420
18585
  const makeVSnackbarProps = propsFactory({
18421
18586
  multiLine: Boolean,
18587
+ timer: [Boolean, String],
18422
18588
  timeout: {
18423
18589
  type: [Number, String],
18424
18590
  default: 5000
@@ -18466,7 +18632,10 @@ const VSnackbar = genericComponent()({
18466
18632
  const {
18467
18633
  roundedClasses
18468
18634
  } = useRounded(props);
18635
+ const countdown = useCountdown(Number(props.timeout));
18469
18636
  const overlay = ref();
18637
+ const timerRef = ref();
18638
+ const isHovering = shallowRef(false);
18470
18639
  watch(isActive, startTimeout);
18471
18640
  watch(() => props.timeout, startTimeout);
18472
18641
  onMounted(() => {
@@ -18474,16 +18643,28 @@ const VSnackbar = genericComponent()({
18474
18643
  });
18475
18644
  let activeTimeout = -1;
18476
18645
  function startTimeout() {
18646
+ countdown.reset();
18477
18647
  window.clearTimeout(activeTimeout);
18478
18648
  const timeout = Number(props.timeout);
18479
18649
  if (!isActive.value || timeout === -1) return;
18650
+ const element = refElement(timerRef.value);
18651
+ countdown.start(element);
18480
18652
  activeTimeout = window.setTimeout(() => {
18481
18653
  isActive.value = false;
18482
18654
  }, timeout);
18483
18655
  }
18484
- function onPointerenter() {
18656
+ function clearTimeout() {
18657
+ countdown.reset();
18485
18658
  window.clearTimeout(activeTimeout);
18486
18659
  }
18660
+ function onPointerenter() {
18661
+ isHovering.value = true;
18662
+ clearTimeout();
18663
+ }
18664
+ function onPointerleave() {
18665
+ isHovering.value = false;
18666
+ startTimeout();
18667
+ }
18487
18668
  useRender(() => {
18488
18669
  const [overlayProps] = VOverlay.filterProps(props);
18489
18670
  return createVNode(VOverlay, mergeProps({
@@ -18491,6 +18672,7 @@ const VSnackbar = genericComponent()({
18491
18672
  "class": ['v-snackbar', {
18492
18673
  'v-snackbar--active': isActive.value,
18493
18674
  'v-snackbar--multi-line': props.multiLine && !props.vertical,
18675
+ 'v-snackbar--timer': !!props.timer,
18494
18676
  'v-snackbar--vertical': props.vertical
18495
18677
  }, positionClasses.value, props.class],
18496
18678
  "style": props.style
@@ -18501,7 +18683,7 @@ const VSnackbar = genericComponent()({
18501
18683
  class: ['v-snackbar__wrapper', themeClasses.value, colorClasses.value, roundedClasses.value, variantClasses.value],
18502
18684
  style: [locationStyles.value, colorStyles.value],
18503
18685
  onPointerenter,
18504
- onPointerleave: startTimeout
18686
+ onPointerleave
18505
18687
  }, overlayProps.contentProps),
18506
18688
  "persistent": true,
18507
18689
  "noClickAnimation": true,
@@ -18509,7 +18691,16 @@ const VSnackbar = genericComponent()({
18509
18691
  "scrollStrategy": "none",
18510
18692
  "_disableGlobalStack": true
18511
18693
  }, scopeId), {
18512
- default: () => [genOverlays(false, 'v-snackbar'), slots.default && createVNode("div", {
18694
+ default: () => [genOverlays(false, 'v-snackbar'), props.timer && createVNode("div", {
18695
+ "key": "timer",
18696
+ "class": "v-snackbar__timer"
18697
+ }, [createVNode(VProgressLinear, {
18698
+ "ref": timerRef,
18699
+ "active": !isHovering.value,
18700
+ "color": typeof props.timer === 'string' ? props.timer : 'info',
18701
+ "max": props.timeout,
18702
+ "model-value": countdown.time.value
18703
+ }, null)]), slots.default && createVNode("div", {
18513
18704
  "class": "v-snackbar__content",
18514
18705
  "role": "status",
18515
18706
  "aria-live": "polite"
@@ -20408,7 +20599,7 @@ function createVuetify$1() {
20408
20599
  date
20409
20600
  };
20410
20601
  }
20411
- const version$1 = "3.3.15";
20602
+ const version$1 = "3.4.0-alpha.1";
20412
20603
  createVuetify$1.version = version$1;
20413
20604
 
20414
20605
  // Vue's inject() can only be used in setup
@@ -20433,7 +20624,7 @@ const createVuetify = function () {
20433
20624
  ...options
20434
20625
  });
20435
20626
  };
20436
- const version = "3.3.15";
20627
+ const version = "3.4.0-alpha.1";
20437
20628
  createVuetify.version = version;
20438
20629
 
20439
20630
  export { components, createVuetify, directives, useDefaults, useDisplay, useLayout, useLocale, useRtl, useTheme, version };