@vuetify/nightly 3.2.0-next-20230114.0 → 4.0.0-next-20230205.0

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 (176) hide show
  1. package/CHANGELOG.md +203 -11
  2. package/dist/json/importMap-labs.json +8 -4
  3. package/dist/json/importMap.json +12 -12
  4. package/dist/vuetify-labs.css +173 -165
  5. package/dist/vuetify-labs.d.ts +399 -176
  6. package/dist/vuetify-labs.esm.js +362 -278
  7. package/dist/vuetify-labs.esm.js.map +1 -1
  8. package/dist/vuetify-labs.js +361 -277
  9. package/dist/vuetify-labs.min.css +2 -2
  10. package/dist/vuetify.css +53 -45
  11. package/dist/vuetify.d.ts +330 -179
  12. package/dist/vuetify.esm.js +329 -248
  13. package/dist/vuetify.esm.js.map +1 -1
  14. package/dist/vuetify.js +328 -247
  15. package/dist/vuetify.js.map +1 -1
  16. package/dist/vuetify.min.css +2 -2
  17. package/dist/vuetify.min.js +700 -689
  18. package/dist/vuetify.min.js.map +1 -1
  19. package/lib/blueprints/index.d.ts +2 -2
  20. package/lib/blueprints/md1.d.ts +2 -2
  21. package/lib/blueprints/md2.d.ts +2 -2
  22. package/lib/blueprints/md3.d.ts +2 -2
  23. package/lib/components/VAutocomplete/VAutocomplete.mjs +3 -2
  24. package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
  25. package/lib/components/VAutocomplete/index.d.ts +43 -20
  26. package/lib/components/VBottomSheet/VBottomSheet.mjs +1 -4
  27. package/lib/components/VBottomSheet/VBottomSheet.mjs.map +1 -1
  28. package/lib/components/VBtn/VBtn.css +7 -7
  29. package/lib/components/VBtn/VBtn.mjs +16 -5
  30. package/lib/components/VBtn/VBtn.mjs.map +1 -1
  31. package/lib/components/VBtnGroup/VBtnGroup.mjs +15 -11
  32. package/lib/components/VBtnGroup/VBtnGroup.mjs.map +1 -1
  33. package/lib/components/VBtnGroup/index.d.ts +2 -1
  34. package/lib/components/VBtnToggle/VBtnToggle.mjs +9 -5
  35. package/lib/components/VBtnToggle/VBtnToggle.mjs.map +1 -1
  36. package/lib/components/VBtnToggle/index.d.ts +122 -1
  37. package/lib/components/VCalendar/VCalendar.mjs +3 -0
  38. package/lib/components/VCalendar/VCalendar.mjs.map +1 -1
  39. package/lib/components/VCalendar/VCalendarCategory.sass +9 -3
  40. package/lib/components/VCalendar/VCalendarDaily.mjs +20 -8
  41. package/lib/components/VCalendar/VCalendarDaily.mjs.map +1 -1
  42. package/lib/components/VCalendar/VCalendarWeekly.mjs +25 -5
  43. package/lib/components/VCalendar/VCalendarWeekly.mjs.map +1 -1
  44. package/lib/components/VCalendar/mixins/calendar-with-events.mjs +20 -16
  45. package/lib/components/VCalendar/mixins/calendar-with-events.mjs.map +1 -1
  46. package/lib/components/VCalendar/mixins/mouse.mjs +16 -30
  47. package/lib/components/VCalendar/mixins/mouse.mjs.map +1 -1
  48. package/lib/components/VCard/VCard.css +7 -7
  49. package/lib/components/VChip/VChip.css +7 -7
  50. package/lib/components/VCombobox/VCombobox.mjs +4 -4
  51. package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
  52. package/lib/components/VCombobox/index.d.ts +43 -20
  53. package/lib/components/VData/VData.mjs +2 -4
  54. package/lib/components/VData/VData.mjs.map +1 -1
  55. package/lib/components/VDatePicker/VDatePicker.mjs +7 -5
  56. package/lib/components/VDatePicker/VDatePicker.mjs.map +1 -1
  57. package/lib/components/VDefaultsProvider/index.d.ts +5 -4
  58. package/lib/components/VDialog/VDialog.mjs +6 -5
  59. package/lib/components/VDialog/VDialog.mjs.map +1 -1
  60. package/lib/components/VDialog/index.d.ts +57 -34
  61. package/lib/components/VDivider/VDivider.mjs +6 -6
  62. package/lib/components/VDivider/VDivider.mjs.map +1 -1
  63. package/lib/components/VExpansionPanel/VExpansionPanel.css +7 -7
  64. package/lib/components/VField/VField.css +2 -2
  65. package/lib/components/VField/VField.mjs +28 -26
  66. package/lib/components/VField/VField.mjs.map +1 -1
  67. package/lib/components/VField/VField.sass +2 -2
  68. package/lib/components/VFileInput/VFileInput.css +1 -0
  69. package/lib/components/VFileInput/VFileInput.mjs +7 -4
  70. package/lib/components/VFileInput/VFileInput.mjs.map +1 -1
  71. package/lib/components/VFileInput/VFileInput.sass +1 -0
  72. package/lib/components/VForm/index.d.ts +0 -3
  73. package/lib/components/VList/VList.mjs +4 -1
  74. package/lib/components/VList/VList.mjs.map +1 -1
  75. package/lib/components/VList/VListItem.css +8 -8
  76. package/lib/components/VList/VListItem.mjs +29 -19
  77. package/lib/components/VList/VListItem.mjs.map +1 -1
  78. package/lib/components/VList/VListItem.sass +1 -1
  79. package/lib/components/VMenu/VMenu.mjs +6 -5
  80. package/lib/components/VMenu/VMenu.mjs.map +1 -1
  81. package/lib/components/VMenu/index.d.ts +57 -34
  82. package/lib/components/VNavigationDrawer/VNavigationDrawer.css +4 -0
  83. package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs +1 -1
  84. package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs.map +1 -1
  85. package/lib/components/VNavigationDrawer/VNavigationDrawer.sass +4 -0
  86. package/lib/components/VNavigationDrawer/index.d.ts +3 -3
  87. package/lib/components/VNavigationDrawer/touch.mjs +7 -6
  88. package/lib/components/VNavigationDrawer/touch.mjs.map +1 -1
  89. package/lib/components/VOtpInput/VOtpInput.mjs +22 -46
  90. package/lib/components/VOtpInput/VOtpInput.mjs.map +1 -1
  91. package/lib/components/VOverflowBtn/VOverflowBtn.mjs +3 -0
  92. package/lib/components/VOverflowBtn/VOverflowBtn.mjs.map +1 -1
  93. package/lib/components/VOverlay/index.d.ts +34 -11
  94. package/lib/components/VOverlay/locationStrategies.mjs +40 -29
  95. package/lib/components/VOverlay/locationStrategies.mjs.map +1 -1
  96. package/lib/components/VOverlay/scrollStrategies.mjs +25 -16
  97. package/lib/components/VOverlay/scrollStrategies.mjs.map +1 -1
  98. package/lib/components/VPagination/VPagination.mjs +1 -1
  99. package/lib/components/VPagination/VPagination.mjs.map +1 -1
  100. package/lib/components/VProgressLinear/VProgressLinear.mjs +13 -1
  101. package/lib/components/VProgressLinear/VProgressLinear.mjs.map +1 -1
  102. package/lib/components/VProgressLinear/index.d.ts +18 -0
  103. package/lib/components/VSelect/VSelect.mjs +3 -4
  104. package/lib/components/VSelect/VSelect.mjs.map +1 -1
  105. package/lib/components/VSelect/index.d.ts +43 -20
  106. package/lib/components/VSelectionControl/VSelectionControl.css +2 -2
  107. package/lib/components/VSkeletonLoader/VSkeletonLoader.sass +1 -1
  108. package/lib/components/VSnackbar/index.d.ts +42 -19
  109. package/lib/components/VStepper/VStepper.sass +6 -6
  110. package/lib/components/VStepper/VStepperStep.mjs +12 -2
  111. package/lib/components/VStepper/VStepperStep.mjs.map +1 -1
  112. package/lib/components/VTable/VTable.css +4 -4
  113. package/lib/components/VTable/VTable.sass +2 -2
  114. package/lib/components/VTimePicker/VTimePicker.mjs.map +1 -1
  115. package/lib/components/VTimeline/_mixins.sass +1 -1
  116. package/lib/components/VTooltip/VTooltip.mjs +4 -3
  117. package/lib/components/VTooltip/VTooltip.mjs.map +1 -1
  118. package/lib/components/VTooltip/index.d.ts +57 -34
  119. package/lib/components/VTreeview/VTreeview.mjs +1 -1
  120. package/lib/components/VTreeview/VTreeview.mjs.map +1 -1
  121. package/lib/components/index.d.ts +328 -176
  122. package/lib/composables/defaults.mjs +1 -1
  123. package/lib/composables/defaults.mjs.map +1 -1
  124. package/lib/composables/filter.mjs +3 -3
  125. package/lib/composables/filter.mjs.map +1 -1
  126. package/lib/composables/form.mjs +0 -1
  127. package/lib/composables/form.mjs.map +1 -1
  128. package/lib/composables/toggleScope.mjs +14 -7
  129. package/lib/composables/toggleScope.mjs.map +1 -1
  130. package/lib/directives/ripple/VRipple.css +3 -0
  131. package/lib/directives/ripple/VRipple.sass +3 -0
  132. package/lib/directives/ripple/_variables.scss +1 -1
  133. package/lib/directives/ripple/index.mjs +2 -7
  134. package/lib/directives/ripple/index.mjs.map +1 -1
  135. package/lib/entry-bundler.mjs +1 -1
  136. package/lib/framework.mjs +1 -1
  137. package/lib/index.d.ts +5 -5
  138. package/lib/labs/VDataTable/VDataTable.mjs +6 -6
  139. package/lib/labs/VDataTable/VDataTable.mjs.map +1 -1
  140. package/lib/labs/VDataTable/VDataTableFooter.mjs +1 -1
  141. package/lib/labs/VDataTable/VDataTableFooter.mjs.map +1 -1
  142. package/lib/labs/VDataTable/VDataTableRows.mjs +1 -1
  143. package/lib/labs/VDataTable/VDataTableRows.mjs.map +1 -1
  144. package/lib/labs/VDataTable/VDataTableServer.mjs +19 -12
  145. package/lib/labs/VDataTable/VDataTableServer.mjs.map +1 -1
  146. package/lib/labs/VDataTable/VDataTableVirtual.mjs +6 -5
  147. package/lib/labs/VDataTable/VDataTableVirtual.mjs.map +1 -1
  148. package/lib/labs/VDataTable/composables/options.mjs +3 -7
  149. package/lib/labs/VDataTable/composables/options.mjs.map +1 -1
  150. package/lib/labs/VDataTable/composables/paginate.mjs +1 -1
  151. package/lib/labs/VDataTable/composables/paginate.mjs.map +1 -1
  152. package/lib/labs/VDataTable/index.d.ts +71 -1
  153. package/lib/labs/VDataTable/index.mjs +1 -0
  154. package/lib/labs/VDataTable/index.mjs.map +1 -1
  155. package/lib/labs/components.d.ts +71 -1
  156. package/lib/locale/adapters/vue-i18n.mjs +12 -2
  157. package/lib/locale/adapters/vue-i18n.mjs.map +1 -1
  158. package/lib/locale/ar.mjs +20 -20
  159. package/lib/locale/ar.mjs.map +1 -1
  160. package/lib/locale/en.mjs +2 -2
  161. package/lib/locale/en.mjs.map +1 -1
  162. package/lib/locale/es.mjs +3 -3
  163. package/lib/locale/es.mjs.map +1 -1
  164. package/lib/locale/fi.mjs +5 -5
  165. package/lib/locale/fi.mjs.map +1 -1
  166. package/lib/locale/it.mjs +6 -6
  167. package/lib/locale/it.mjs.map +1 -1
  168. package/lib/locale/sv.mjs +13 -13
  169. package/lib/locale/sv.mjs.map +1 -1
  170. package/lib/styles/settings/_variables.scss +6 -6
  171. package/lib/styles/tools/_states.sass +3 -3
  172. package/lib/util/defineComponent.mjs +21 -18
  173. package/lib/util/defineComponent.mjs.map +1 -1
  174. package/lib/util/helpers.mjs +5 -19
  175. package/lib/util/helpers.mjs.map +1 -1
  176. package/package.json +1 -1
package/dist/vuetify.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Vuetify v3.2.0-next-20230114.0
2
+ * Vuetify v4.0.0-next-20230205.0
3
3
  * Forged by John Leider
4
4
  * Released under the MIT License.
5
5
  */
@@ -262,8 +262,12 @@
262
262
  }
263
263
  function toKebabCase() {
264
264
  let str = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
265
- return str.replace(/[^a-z]/gi, '-').replace(/\B([A-Z])/g, '-$1').toLowerCase();
265
+ if (toKebabCase.cache.has(str)) return toKebabCase.cache.get(str);
266
+ const kebab = str.replace(/[^a-z]/gi, '-').replace(/\B([A-Z])/g, '-$1').toLowerCase();
267
+ toKebabCase.cache.set(str, kebab);
268
+ return kebab;
266
269
  }
270
+ toKebabCase.cache = new Map();
267
271
  function findChildrenWithProvide(key, vnode) {
268
272
  if (!vnode || typeof vnode !== 'object') return [];
269
273
  if (Array.isArray(vnode)) {
@@ -890,7 +894,7 @@
890
894
 
891
895
  const DefaultsSymbol = Symbol.for('vuetify:defaults');
892
896
  function createDefaults(options) {
893
- return vue.ref(options ?? {});
897
+ return vue.ref(options);
894
898
  }
895
899
  function useDefaults() {
896
900
  const defaults = vue.inject(DefaultsSymbol);
@@ -922,23 +926,30 @@
922
926
  return newDefaults;
923
927
  }
924
928
 
925
- function useToggleScope(source, cb) {
929
+ function useToggleScope(source, fn) {
926
930
  let scope;
931
+ function start() {
932
+ scope = vue.effectScope();
933
+ scope.run(() => fn.length ? fn(() => {
934
+ var _scope;
935
+ (_scope = scope) == null ? void 0 : _scope.stop();
936
+ start();
937
+ }) : fn());
938
+ }
927
939
  vue.watch(source, active => {
928
940
  if (active && !scope) {
929
- scope = vue.effectScope();
930
- scope.run(cb);
941
+ start();
931
942
  } else if (!active) {
932
- var _scope;
933
- (_scope = scope) == null ? void 0 : _scope.stop();
943
+ var _scope2;
944
+ (_scope2 = scope) == null ? void 0 : _scope2.stop();
934
945
  scope = undefined;
935
946
  }
936
947
  }, {
937
948
  immediate: true
938
949
  });
939
950
  vue.onScopeDispose(() => {
940
- var _scope2;
941
- (_scope2 = scope) == null ? void 0 : _scope2.stop();
951
+ var _scope3;
952
+ (_scope3 = scope) == null ? void 0 : _scope3.stop();
942
953
  });
943
954
  }
944
955
 
@@ -1007,33 +1018,36 @@
1007
1018
  options.props = propsFactory(options.props, toKebabCase(options.name))();
1008
1019
  options.props._as = String;
1009
1020
  options.setup = function setup(props, ctx) {
1010
- const vm = vue.getCurrentInstance();
1011
1021
  const defaults = useDefaults();
1012
- const _subcomponentDefaults = vue.shallowRef();
1013
- const _props = vue.shallowReactive({
1014
- ...vue.toRaw(props)
1022
+
1023
+ // Skip props proxy if defaults are not provided
1024
+ if (!defaults.value) return options._setup(props, ctx);
1025
+ const vm = vue.getCurrentInstance();
1026
+ const componentDefaults = vue.computed(() => defaults.value[props._as ?? options.name]);
1027
+ const _props = new Proxy(props, {
1028
+ get(target, prop) {
1029
+ if (!propIsDefined(vm.vnode, prop)) {
1030
+ var _componentDefaults$va, _global;
1031
+ return ((_componentDefaults$va = componentDefaults.value) == null ? void 0 : _componentDefaults$va[prop]) ?? ((_global = defaults.value.global) == null ? void 0 : _global[prop]) ?? target[prop];
1032
+ }
1033
+ return Reflect.get(target, prop);
1034
+ }
1015
1035
  });
1036
+ const _subcomponentDefaults = vue.shallowRef();
1016
1037
  vue.watchEffect(() => {
1017
- const globalDefaults = defaults.value.global;
1018
- const componentDefaults = defaults.value[props._as ?? options.name];
1019
- if (componentDefaults) {
1020
- const subComponents = Object.entries(componentDefaults).filter(_ref => {
1038
+ if (componentDefaults.value) {
1039
+ const subComponents = Object.entries(componentDefaults.value).filter(_ref => {
1021
1040
  let [key] = _ref;
1022
1041
  return key.startsWith(key[0].toUpperCase());
1023
1042
  });
1024
1043
  if (subComponents.length) _subcomponentDefaults.value = Object.fromEntries(subComponents);
1025
1044
  }
1026
- for (const prop of Object.keys(props)) {
1027
- let newVal = props[prop];
1028
- if (!propIsDefined(vm.vnode, prop)) {
1029
- newVal = (componentDefaults == null ? void 0 : componentDefaults[prop]) ?? (globalDefaults == null ? void 0 : globalDefaults[prop]) ?? props[prop];
1030
- }
1031
- if (_props[prop] !== newVal) {
1032
- _props[prop] = newVal;
1033
- }
1034
- }
1035
1045
  });
1036
1046
  const setupBindings = options._setup(_props, ctx);
1047
+
1048
+ // If subcomponent defaults are provided, override any
1049
+ // subcomponents provided by the component's setup function.
1050
+ // This uses injectSelf so must be done after the original setup to work.
1037
1051
  useToggleScope(_subcomponentDefaults, () => {
1038
1052
  var _injectSelf;
1039
1053
  provideDefaults(mergeDeep(((_injectSelf = injectSelf(DefaultsSymbol)) == null ? void 0 : _injectSelf.value) ?? {}, _subcomponentDefaults.value));
@@ -1892,8 +1906,8 @@
1892
1906
  root: 'Pagination Navigation',
1893
1907
  next: 'Next page',
1894
1908
  previous: 'Previous page',
1895
- page: 'Goto Page {0}',
1896
- currentPage: 'Page {0}, Current Page',
1909
+ page: 'Go to page {0}',
1910
+ currentPage: 'Page {0}, Current page',
1897
1911
  first: 'First page',
1898
1912
  last: 'Last page'
1899
1913
  }
@@ -3368,18 +3382,21 @@
3368
3382
  };
3369
3383
  }
3370
3384
 
3385
+ // Types
3386
+
3387
+ const makeVBtnGroupProps = propsFactory({
3388
+ divided: Boolean,
3389
+ ...makeBorderProps(),
3390
+ ...makeDensityProps(),
3391
+ ...makeElevationProps(),
3392
+ ...makeRoundedProps(),
3393
+ ...makeTagProps(),
3394
+ ...makeThemeProps(),
3395
+ ...makeVariantProps()
3396
+ }, 'v-btn-group');
3371
3397
  const VBtnGroup = defineComponent({
3372
3398
  name: 'VBtnGroup',
3373
- props: {
3374
- divided: Boolean,
3375
- ...makeBorderProps(),
3376
- ...makeDensityProps(),
3377
- ...makeElevationProps(),
3378
- ...makeRoundedProps(),
3379
- ...makeTagProps(),
3380
- ...makeThemeProps(),
3381
- ...makeVariantProps()
3382
- },
3399
+ props: makeVBtnGroupProps(),
3383
3400
  setup(props, _ref) {
3384
3401
  let {
3385
3402
  slots
@@ -3417,6 +3434,9 @@
3417
3434
  });
3418
3435
  }
3419
3436
  });
3437
+ function filterVBtnGroupProps(props) {
3438
+ return pick(props, Object.keys(VBtnGroup.props));
3439
+ }
3420
3440
 
3421
3441
  // Composables
3422
3442
 
@@ -3624,7 +3644,10 @@
3624
3644
  const VBtnToggleSymbol = Symbol.for('vuetify:v-btn-toggle');
3625
3645
  const VBtnToggle = genericComponent()({
3626
3646
  name: 'VBtnToggle',
3627
- props: makeGroupProps(),
3647
+ props: {
3648
+ ...makeVBtnGroupProps(),
3649
+ ...makeGroupProps()
3650
+ },
3628
3651
  emits: {
3629
3652
  'update:modelValue': value => true
3630
3653
  },
@@ -3641,9 +3664,10 @@
3641
3664
  } = useGroup(props, VBtnToggleSymbol);
3642
3665
  useRender(() => {
3643
3666
  var _slots$default;
3644
- return vue.createVNode(VBtnGroup, {
3667
+ const [btnGroupProps] = filterVBtnGroupProps(props);
3668
+ return vue.createVNode(VBtnGroup, vue.mergeProps({
3645
3669
  "class": "v-btn-toggle"
3646
- }, {
3670
+ }, btnGroupProps), {
3647
3671
  default: () => [(_slots$default = slots.default) == null ? void 0 : _slots$default.call(slots, {
3648
3672
  isSelected,
3649
3673
  next,
@@ -4098,9 +4122,6 @@
4098
4122
  el.style.transform = value;
4099
4123
  el.style.webkitTransform = value;
4100
4124
  }
4101
- function opacity(el, value) {
4102
- el.style.opacity = `calc(${value} * var(--v-theme-overlay-multiplier))`;
4103
- }
4104
4125
  function isTouchEvent(e) {
4105
4126
  return e.constructor.name === 'TouchEvent';
4106
4127
  }
@@ -4176,13 +4197,11 @@
4176
4197
  animation.classList.add('v-ripple__animation--enter');
4177
4198
  animation.classList.add('v-ripple__animation--visible');
4178
4199
  transform(animation, `translate(${x}, ${y}) scale3d(${scale},${scale},${scale})`);
4179
- opacity(animation, 0);
4180
4200
  animation.dataset.activated = String(performance.now());
4181
4201
  setTimeout(() => {
4182
4202
  animation.classList.remove('v-ripple__animation--enter');
4183
4203
  animation.classList.add('v-ripple__animation--in');
4184
4204
  transform(animation, `translate(${centerX}, ${centerY}) scale3d(1,1,1)`);
4185
- opacity(animation, 0.08);
4186
4205
  }, 0);
4187
4206
  },
4188
4207
  hide(el) {
@@ -4197,14 +4216,14 @@
4197
4216
  setTimeout(() => {
4198
4217
  animation.classList.remove('v-ripple__animation--in');
4199
4218
  animation.classList.add('v-ripple__animation--out');
4200
- opacity(animation, 0);
4201
4219
  setTimeout(() => {
4220
+ var _animation$parentNode;
4202
4221
  const ripples = el.getElementsByClassName('v-ripple__animation');
4203
4222
  if (ripples.length === 1 && el.dataset.previousPosition) {
4204
4223
  el.style.position = el.dataset.previousPosition;
4205
4224
  delete el.dataset.previousPosition;
4206
4225
  }
4207
- animation.parentNode && el.removeChild(animation.parentNode);
4226
+ if (((_animation$parentNode = animation.parentNode) == null ? void 0 : _animation$parentNode.parentNode) === el) el.removeChild(animation.parentNode);
4208
4227
  }, 300);
4209
4228
  }, delay);
4210
4229
  }
@@ -4384,9 +4403,69 @@
4384
4403
  updated: updated$1
4385
4404
  };
4386
4405
 
4406
+ // Composables
4407
+
4408
+ // Types
4409
+
4410
+ const oppositeMap = {
4411
+ center: 'center',
4412
+ top: 'bottom',
4413
+ bottom: 'top',
4414
+ left: 'right',
4415
+ right: 'left'
4416
+ };
4417
+ const makeLocationProps = propsFactory({
4418
+ location: String
4419
+ }, 'location');
4420
+ function useLocation(props) {
4421
+ let opposite = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
4422
+ let offset = arguments.length > 2 ? arguments[2] : undefined;
4423
+ const {
4424
+ isRtl
4425
+ } = useRtl();
4426
+ const locationStyles = vue.computed(() => {
4427
+ if (!props.location) return {};
4428
+ const {
4429
+ side,
4430
+ align
4431
+ } = parseAnchor(props.location.split(' ').length > 1 ? props.location : `${props.location} center`, isRtl.value);
4432
+ function getOffset(side) {
4433
+ return offset ? offset(side) : 0;
4434
+ }
4435
+ const styles = {};
4436
+ if (side !== 'center') {
4437
+ if (opposite) styles[oppositeMap[side]] = `calc(100% - ${getOffset(side)}px)`;else styles[side] = 0;
4438
+ }
4439
+ if (align !== 'center') {
4440
+ if (opposite) styles[oppositeMap[align]] = `calc(100% - ${getOffset(align)}px)`;else styles[align] = 0;
4441
+ } else {
4442
+ if (side === 'center') styles.top = styles.left = '50%';else {
4443
+ styles[{
4444
+ top: 'left',
4445
+ bottom: 'left',
4446
+ left: 'top',
4447
+ right: 'top'
4448
+ }[side]] = '50%';
4449
+ }
4450
+ styles.transform = {
4451
+ top: 'translateX(-50%)',
4452
+ bottom: 'translateX(-50%)',
4453
+ left: 'translateY(-50%)',
4454
+ right: 'translateY(-50%)',
4455
+ center: 'translate(-50%, -50%)'
4456
+ }[side];
4457
+ }
4458
+ return styles;
4459
+ });
4460
+ return {
4461
+ locationStyles
4462
+ };
4463
+ }
4464
+
4387
4465
  const VProgressLinear = defineComponent({
4388
4466
  name: 'VProgressLinear',
4389
4467
  props: {
4468
+ absolute: Boolean,
4390
4469
  active: {
4391
4470
  type: Boolean,
4392
4471
  default: true
@@ -4416,6 +4495,9 @@
4416
4495
  stream: Boolean,
4417
4496
  striped: Boolean,
4418
4497
  roundedBar: Boolean,
4498
+ ...makeLocationProps({
4499
+ location: 'top'
4500
+ }),
4419
4501
  ...makeRoundedProps(),
4420
4502
  ...makeTagProps(),
4421
4503
  ...makeThemeProps()
@@ -4434,6 +4516,9 @@
4434
4516
  const {
4435
4517
  themeClasses
4436
4518
  } = provideTheme(props);
4519
+ const {
4520
+ locationStyles
4521
+ } = useLocation(props);
4437
4522
  const {
4438
4523
  textColorClasses,
4439
4524
  textColorStyles
@@ -4475,6 +4560,7 @@
4475
4560
  useRender(() => vue.createVNode(props.tag, {
4476
4561
  "ref": intersectionRef,
4477
4562
  "class": ['v-progress-linear', {
4563
+ 'v-progress-linear--absolute': props.absolute,
4478
4564
  'v-progress-linear--active': props.active && isIntersecting.value,
4479
4565
  'v-progress-linear--reverse': isReversed.value,
4480
4566
  'v-progress-linear--rounded': props.rounded,
@@ -4482,8 +4568,11 @@
4482
4568
  'v-progress-linear--striped': props.striped
4483
4569
  }, roundedClasses.value, themeClasses.value],
4484
4570
  "style": {
4571
+ bottom: props.location === 'bottom' ? 0 : undefined,
4572
+ top: props.location === 'top' ? 0 : undefined,
4485
4573
  height: props.active ? convertToUnit(height.value) : 0,
4486
- '--v-progress-linear-height': convertToUnit(height.value)
4574
+ '--v-progress-linear-height': convertToUnit(height.value),
4575
+ ...locationStyles.value
4487
4576
  },
4488
4577
  "role": "progressbar",
4489
4578
  "aria-hidden": props.active ? 'false' : 'true',
@@ -4569,65 +4658,6 @@
4569
4658
  }, null)]);
4570
4659
  }
4571
4660
 
4572
- // Composables
4573
-
4574
- // Types
4575
-
4576
- const oppositeMap = {
4577
- center: 'center',
4578
- top: 'bottom',
4579
- bottom: 'top',
4580
- left: 'right',
4581
- right: 'left'
4582
- };
4583
- const makeLocationProps = propsFactory({
4584
- location: String
4585
- }, 'location');
4586
- function useLocation(props) {
4587
- let opposite = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
4588
- let offset = arguments.length > 2 ? arguments[2] : undefined;
4589
- const {
4590
- isRtl
4591
- } = useRtl();
4592
- const locationStyles = vue.computed(() => {
4593
- if (!props.location) return {};
4594
- const {
4595
- side,
4596
- align
4597
- } = parseAnchor(props.location.split(' ').length > 1 ? props.location : `${props.location} center`, isRtl.value);
4598
- function getOffset(side) {
4599
- return offset ? offset(side) : 0;
4600
- }
4601
- const styles = {};
4602
- if (side !== 'center') {
4603
- if (opposite) styles[oppositeMap[side]] = `calc(100% - ${getOffset(side)}px)`;else styles[side] = 0;
4604
- }
4605
- if (align !== 'center') {
4606
- if (opposite) styles[oppositeMap[align]] = `calc(100% - ${getOffset(align)}px)`;else styles[align] = 0;
4607
- } else {
4608
- if (side === 'center') styles.top = styles.left = '50%';else {
4609
- styles[{
4610
- top: 'left',
4611
- bottom: 'left',
4612
- left: 'top',
4613
- right: 'top'
4614
- }[side]] = '50%';
4615
- }
4616
- styles.transform = {
4617
- top: 'translateX(-50%)',
4618
- bottom: 'translateX(-50%)',
4619
- left: 'translateY(-50%)',
4620
- right: 'translateY(-50%)',
4621
- center: 'translate(-50%, -50%)'
4622
- }[side];
4623
- }
4624
- return styles;
4625
- });
4626
- return {
4627
- locationStyles
4628
- };
4629
- }
4630
-
4631
4661
  // Utilities
4632
4662
 
4633
4663
  // Types
@@ -4833,21 +4863,31 @@
4833
4863
  const group = useGroupItem(props, props.symbol, false);
4834
4864
  const link = useLink(props, attrs);
4835
4865
  const isActive = vue.computed(() => {
4836
- var _link$isActive;
4837
- return props.active !== false && (props.active || ((_link$isActive = link.isActive) == null ? void 0 : _link$isActive.value) || (group == null ? void 0 : group.isSelected.value));
4866
+ if (props.active !== undefined) {
4867
+ return props.active;
4868
+ }
4869
+ if (link.isLink.value) {
4870
+ var _link$isActive;
4871
+ return (_link$isActive = link.isActive) == null ? void 0 : _link$isActive.value;
4872
+ }
4873
+ return group == null ? void 0 : group.isSelected.value;
4838
4874
  });
4839
4875
  const isDisabled = vue.computed(() => (group == null ? void 0 : group.disabled.value) || props.disabled);
4840
4876
  const isElevated = vue.computed(() => {
4841
4877
  return props.variant === 'elevated' && !(props.disabled || props.flat || props.border);
4842
4878
  });
4879
+ const valueAttr = vue.computed(() => {
4880
+ if (props.value === undefined) return undefined;
4881
+ return Object(props.value) === props.value ? JSON.stringify(props.value, null, 0) : props.value;
4882
+ });
4843
4883
  useSelectLink(link, group == null ? void 0 : group.select);
4844
4884
  useRender(() => {
4845
- var _slots$prepend, _slots$default, _slots$append, _slots$loader;
4885
+ var _link$isActive2, _link$isActive3, _slots$prepend, _slots$default, _slots$append, _slots$loader;
4846
4886
  const Tag = link.isLink.value ? 'a' : props.tag;
4847
- const hasColor = !group || group.isSelected.value;
4848
4887
  const hasPrepend = !!(props.prependIcon || slots.prepend);
4849
4888
  const hasAppend = !!(props.appendIcon || slots.append);
4850
4889
  const hasIcon = !!(props.icon && props.icon !== true);
4890
+ const hasColor = (group == null ? void 0 : group.isSelected.value) && (!link.isLink.value || ((_link$isActive2 = link.isActive) == null ? void 0 : _link$isActive2.value)) || !group || ((_link$isActive3 = link.isActive) == null ? void 0 : _link$isActive3.value);
4851
4891
  return vue.withDirectives(vue.createVNode(Tag, {
4852
4892
  "type": Tag === 'a' ? undefined : 'button',
4853
4893
  "class": ['v-btn', group == null ? void 0 : group.selectedClass.value, {
@@ -4868,7 +4908,8 @@
4868
4908
  if (isDisabled.value) return;
4869
4909
  (_link$navigate = link.navigate) == null ? void 0 : _link$navigate.call(link, e);
4870
4910
  group == null ? void 0 : group.toggle();
4871
- }
4911
+ },
4912
+ "value": valueAttr.value
4872
4913
  }, {
4873
4914
  default: () => [genOverlays(true, 'v-btn'), !props.icon && hasPrepend && vue.createVNode(VDefaultsProvider, {
4874
4915
  "key": "prepend",
@@ -5342,32 +5383,34 @@
5342
5383
  if (hasLabel.value) {
5343
5384
  const el = labelRef.value.$el;
5344
5385
  const targetEl = floatingLabelRef.value.$el;
5345
- const rect = nullifyTransforms(el);
5346
- const targetRect = targetEl.getBoundingClientRect();
5347
- const x = targetRect.x - rect.x;
5348
- const y = targetRect.y - rect.y - (rect.height / 2 - targetRect.height / 2);
5349
- const targetWidth = targetRect.width / 0.75;
5350
- const width = Math.abs(targetWidth - rect.width) > 1 ? {
5351
- maxWidth: convertToUnit(targetWidth)
5352
- } : undefined;
5353
- const style = getComputedStyle(el);
5354
- const targetStyle = getComputedStyle(targetEl);
5355
- const duration = parseFloat(style.transitionDuration) * 1000 || 150;
5356
- const scale = parseFloat(targetStyle.getPropertyValue('--v-field-label-scale'));
5357
- const color = targetStyle.getPropertyValue('color');
5358
- el.style.visibility = 'visible';
5359
- targetEl.style.visibility = 'hidden';
5360
- animate(el, {
5361
- transform: `translate(${x}px, ${y}px) scale(${scale})`,
5362
- color,
5363
- ...width
5364
- }, {
5365
- duration,
5366
- easing: standardEasing,
5367
- direction: val ? 'normal' : 'reverse'
5368
- }).finished.then(() => {
5369
- el.style.removeProperty('visibility');
5370
- targetEl.style.removeProperty('visibility');
5386
+ requestAnimationFrame(() => {
5387
+ const rect = nullifyTransforms(el);
5388
+ const targetRect = targetEl.getBoundingClientRect();
5389
+ const x = targetRect.x - rect.x;
5390
+ const y = targetRect.y - rect.y - (rect.height / 2 - targetRect.height / 2);
5391
+ const targetWidth = targetRect.width / 0.75;
5392
+ const width = Math.abs(targetWidth - rect.width) > 1 ? {
5393
+ maxWidth: convertToUnit(targetWidth)
5394
+ } : undefined;
5395
+ const style = getComputedStyle(el);
5396
+ const targetStyle = getComputedStyle(targetEl);
5397
+ const duration = parseFloat(style.transitionDuration) * 1000 || 150;
5398
+ const scale = parseFloat(targetStyle.getPropertyValue('--v-field-label-scale'));
5399
+ const color = targetStyle.getPropertyValue('color');
5400
+ el.style.visibility = 'visible';
5401
+ targetEl.style.visibility = 'hidden';
5402
+ animate(el, {
5403
+ transform: `translate(${x}px, ${y}px) scale(${scale})`,
5404
+ color,
5405
+ ...width
5406
+ }, {
5407
+ duration,
5408
+ easing: standardEasing,
5409
+ direction: val ? 'normal' : 'reverse'
5410
+ }).finished.then(() => {
5411
+ el.style.removeProperty('visibility');
5412
+ targetEl.style.removeProperty('visibility');
5413
+ });
5371
5414
  });
5372
5415
  }
5373
5416
  }, {
@@ -5556,7 +5599,6 @@
5556
5599
  const makeFormProps = propsFactory({
5557
5600
  disabled: Boolean,
5558
5601
  fastFail: Boolean,
5559
- lazyValidation: Boolean,
5560
5602
  readonly: Boolean,
5561
5603
  modelValue: {
5562
5604
  type: Boolean,
@@ -6960,9 +7002,9 @@
6960
7002
  themeClasses
6961
7003
  } = provideTheme(props);
6962
7004
  const {
6963
- backgroundColorClasses,
6964
- backgroundColorStyles
6965
- } = useBackgroundColor(vue.toRef(props, 'color'));
7005
+ textColorClasses,
7006
+ textColorStyles
7007
+ } = useTextColor(vue.toRef(props, 'color'));
6966
7008
  const dividerStyles = vue.computed(() => {
6967
7009
  const styles = {};
6968
7010
  if (props.length) {
@@ -6978,8 +7020,8 @@
6978
7020
  'v-divider': true,
6979
7021
  'v-divider--inset': props.inset,
6980
7022
  'v-divider--vertical': props.vertical
6981
- }, themeClasses.value, backgroundColorClasses.value],
6982
- "style": [dividerStyles.value, backgroundColorStyles.value],
7023
+ }, themeClasses.value, textColorClasses.value],
7024
+ "style": [dividerStyles.value, textColorStyles.value],
6983
7025
  "aria-orientation": !attrs.role || attrs.role === 'separator' ? props.vertical ? 'vertical' : 'horizontal' : undefined,
6984
7026
  "role": `${attrs.role || 'separator'}`
6985
7027
  }, null));
@@ -7689,7 +7731,7 @@
7689
7731
  }
7690
7732
  }
7691
7733
  useRender(() => {
7692
- var _slots$prepend, _slots$title, _slots$subtitle, _slots$default, _slots$append;
7734
+ var _slots$title, _slots$subtitle, _slots$default;
7693
7735
  const Tag = isLink.value ? 'a' : props.tag;
7694
7736
  const hasColor = !list || isSelected.value || isActive.value;
7695
7737
  const hasTitle = slots.title || props.title;
@@ -7712,7 +7754,18 @@
7712
7754
  "onClick": onClick,
7713
7755
  "onKeydown": isClickable.value && !isLink.value && onKeyDown
7714
7756
  }, {
7715
- default: () => [genOverlays(isClickable.value || isActive.value, 'v-list-item'), hasPrepend && vue.createVNode(VDefaultsProvider, {
7757
+ default: () => [genOverlays(isClickable.value || isActive.value, 'v-list-item'), hasPrepend && vue.createVNode("div", {
7758
+ "key": "prepend",
7759
+ "class": "v-list-item__prepend"
7760
+ }, [props.prependAvatar && vue.createVNode(VAvatar, {
7761
+ "key": "prepend-avatar",
7762
+ "density": props.density,
7763
+ "image": props.prependAvatar
7764
+ }, null), props.prependIcon && vue.createVNode(VIcon, {
7765
+ "key": "prepend-icon",
7766
+ "density": props.density,
7767
+ "icon": props.prependIcon
7768
+ }, null), slots.prepend && vue.createVNode(VDefaultsProvider, {
7716
7769
  "key": "prepend",
7717
7770
  "defaults": {
7718
7771
  VAvatar: {
@@ -7728,14 +7781,8 @@
7728
7781
  }
7729
7782
  }
7730
7783
  }, {
7731
- default: () => [vue.createVNode("div", {
7732
- "class": "v-list-item__prepend"
7733
- }, [props.prependAvatar && vue.createVNode(VAvatar, {
7734
- "key": "prepend-avatar"
7735
- }, null), props.prependIcon && vue.createVNode(VIcon, {
7736
- "key": "prepend-icon"
7737
- }, null), (_slots$prepend = slots.prepend) == null ? void 0 : _slots$prepend.call(slots, slotProps.value)])]
7738
- }), vue.createVNode("div", {
7784
+ default: () => [slots.prepend(slotProps.value)]
7785
+ })]), vue.createVNode("div", {
7739
7786
  "class": "v-list-item__content",
7740
7787
  "data-no-activator": ""
7741
7788
  }, [hasTitle && vue.createVNode(VListItemTitle, {
@@ -7750,7 +7797,10 @@
7750
7797
  default: () => [((_slots$subtitle = slots.subtitle) == null ? void 0 : _slots$subtitle.call(slots, {
7751
7798
  subtitle: props.subtitle
7752
7799
  })) ?? props.subtitle]
7753
- }), (_slots$default = slots.default) == null ? void 0 : _slots$default.call(slots, slotProps.value)]), hasAppend && vue.createVNode(VDefaultsProvider, {
7800
+ }), (_slots$default = slots.default) == null ? void 0 : _slots$default.call(slots, slotProps.value)]), hasAppend && vue.createVNode("div", {
7801
+ "key": "append",
7802
+ "class": "v-list-item__append"
7803
+ }, [slots.append && vue.createVNode(VDefaultsProvider, {
7754
7804
  "key": "append",
7755
7805
  "defaults": {
7756
7806
  VAvatar: {
@@ -7766,14 +7816,16 @@
7766
7816
  }
7767
7817
  }
7768
7818
  }, {
7769
- default: () => [vue.createVNode("div", {
7770
- "class": "v-list-item__append"
7771
- }, [(_slots$append = slots.append) == null ? void 0 : _slots$append.call(slots, slotProps.value), props.appendIcon && vue.createVNode(VIcon, {
7772
- "key": "append-icon"
7773
- }, null), props.appendAvatar && vue.createVNode(VAvatar, {
7774
- "key": "append-avatar"
7775
- }, null)])]
7776
- })]
7819
+ default: () => [slots.append(slotProps.value)]
7820
+ }), props.appendIcon && vue.createVNode(VIcon, {
7821
+ "key": "append-icon",
7822
+ "density": props.density,
7823
+ "icon": props.appendIcon
7824
+ }, null), props.appendAvatar && vue.createVNode(VAvatar, {
7825
+ "key": "append-avatar",
7826
+ "density": props.density,
7827
+ "image": props.appendAvatar
7828
+ }, null)])]
7777
7829
  }), [[vue.resolveDirective("ripple"), isClickable.value && props.ripple]]);
7778
7830
  });
7779
7831
  return {};
@@ -7987,9 +8039,12 @@
7987
8039
 
7988
8040
  // Types
7989
8041
 
8042
+ function isPrimitive(value) {
8043
+ return typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean';
8044
+ }
7990
8045
  function transformItem(props, item) {
7991
8046
  const type = getPropertyFromItem(item, props.itemType, 'item');
7992
- const title = typeof item === 'string' ? item : getPropertyFromItem(item, props.itemTitle);
8047
+ const title = isPrimitive(item) ? item : getPropertyFromItem(item, props.itemTitle);
7993
8048
  const value = getPropertyFromItem(item, props.itemValue, undefined);
7994
8049
  const children = getPropertyFromItem(item, props.itemChildren);
7995
8050
  const itemProps = props.itemProps === true ? pick(item, ['children'])[1] : getPropertyFromItem(item, props.itemProps);
@@ -8615,17 +8670,12 @@
8615
8670
  function useLocationStrategies(props, data) {
8616
8671
  const contentStyles = vue.ref({});
8617
8672
  const updateLocation = vue.ref();
8618
- let scope;
8619
- vue.watchEffect(async () => {
8620
- var _scope;
8621
- (_scope = scope) == null ? void 0 : _scope.stop();
8622
- updateLocation.value = undefined;
8623
- if (!(IN_BROWSER && data.isActive.value && props.locationStrategy)) return;
8624
- scope = vue.effectScope();
8625
- if (!(props.locationStrategy === 'connected')) {
8626
- await vue.nextTick();
8627
- }
8628
- scope.run(() => {
8673
+ if (IN_BROWSER) {
8674
+ useToggleScope(() => !!(data.isActive.value && props.locationStrategy), reset => {
8675
+ vue.watch(() => props.locationStrategy, reset);
8676
+ vue.onScopeDispose(() => {
8677
+ updateLocation.value = undefined;
8678
+ });
8629
8679
  if (typeof props.locationStrategy === 'function') {
8630
8680
  var _props$locationStrate;
8631
8681
  updateLocation.value = (_props$locationStrate = props.locationStrategy(data, props, contentStyles)) == null ? void 0 : _props$locationStrate.updateLocation;
@@ -8634,16 +8684,14 @@
8634
8684
  updateLocation.value = (_locationStrategies$p = locationStrategies[props.locationStrategy](data, props, contentStyles)) == null ? void 0 : _locationStrategies$p.updateLocation;
8635
8685
  }
8636
8686
  });
8637
- });
8638
- IN_BROWSER && window.addEventListener('resize', onResize, {
8639
- passive: true
8640
- });
8641
- vue.onScopeDispose(() => {
8642
- var _scope2;
8643
- IN_BROWSER && window.removeEventListener('resize', onResize);
8644
- updateLocation.value = undefined;
8645
- (_scope2 = scope) == null ? void 0 : _scope2.stop();
8646
- });
8687
+ window.addEventListener('resize', onResize, {
8688
+ passive: true
8689
+ });
8690
+ vue.onScopeDispose(() => {
8691
+ window.removeEventListener('resize', onResize);
8692
+ updateLocation.value = undefined;
8693
+ });
8694
+ }
8647
8695
  function onResize(e) {
8648
8696
  var _updateLocation$value;
8649
8697
  (_updateLocation$value = updateLocation.value) == null ? void 0 : _updateLocation$value.call(updateLocation, e);
@@ -8937,13 +8985,30 @@
8937
8985
  maxWidth: convertToUnit(pixelCeil(clamp(available.x, minWidth.value === Infinity ? 0 : minWidth.value, maxWidth.value))),
8938
8986
  maxHeight: convertToUnit(pixelCeil(clamp(available.y, minHeight.value === Infinity ? 0 : minHeight.value, maxHeight.value)))
8939
8987
  });
8988
+ return {
8989
+ available,
8990
+ contentBox
8991
+ };
8940
8992
  }
8941
- vue.watch(() => [preferredAnchor.value, preferredOrigin.value, props.offset, props.minWidth, props.minHeight, props.maxWidth, props.maxHeight], () => updateLocation(), {
8942
- immediate: !activatorFixed
8943
- });
8944
- if (activatorFixed) vue.nextTick(() => updateLocation());
8945
- requestAnimationFrame(() => {
8946
- if (contentStyles.value.maxHeight) updateLocation();
8993
+ vue.watch(() => [preferredAnchor.value, preferredOrigin.value, props.offset, props.minWidth, props.minHeight, props.maxWidth, props.maxHeight], () => updateLocation());
8994
+ vue.nextTick(() => {
8995
+ const result = updateLocation();
8996
+
8997
+ // TODO: overflowing content should only require a single updateLocation call
8998
+ // Icky hack to make sure the content is positioned consistently
8999
+ if (!result) return;
9000
+ const {
9001
+ available,
9002
+ contentBox
9003
+ } = result;
9004
+ if (contentBox.height > available.y) {
9005
+ requestAnimationFrame(() => {
9006
+ updateLocation();
9007
+ requestAnimationFrame(() => {
9008
+ updateLocation();
9009
+ });
9010
+ });
9011
+ }
8947
9012
  });
8948
9013
  return {
8949
9014
  updateLocation
@@ -9011,10 +9076,10 @@
9011
9076
  await vue.nextTick();
9012
9077
  scope.run(() => {
9013
9078
  if (typeof props.scrollStrategy === 'function') {
9014
- props.scrollStrategy(data, props);
9079
+ props.scrollStrategy(data, props, scope);
9015
9080
  } else {
9016
9081
  var _scrollStrategies$pro;
9017
- (_scrollStrategies$pro = scrollStrategies[props.scrollStrategy]) == null ? void 0 : _scrollStrategies$pro.call(scrollStrategies, data, props);
9082
+ (_scrollStrategies$pro = scrollStrategies[props.scrollStrategy]) == null ? void 0 : _scrollStrategies$pro.call(scrollStrategies, data, props, scope);
9018
9083
  }
9019
9084
  });
9020
9085
  });
@@ -9060,9 +9125,10 @@
9060
9125
  }
9061
9126
  });
9062
9127
  }
9063
- function repositionScrollStrategy(data) {
9128
+ function repositionScrollStrategy(data, props, scope) {
9064
9129
  let slow = false;
9065
9130
  let raf = -1;
9131
+ let ric = -1;
9066
9132
  function update(e) {
9067
9133
  requestNewFrame(() => {
9068
9134
  var _data$updateLocation$, _data$updateLocation;
@@ -9072,21 +9138,29 @@
9072
9138
  slow = time / (1000 / 60) > 2;
9073
9139
  });
9074
9140
  }
9075
- bindScroll(data.activatorEl.value ?? data.contentEl.value, e => {
9076
- if (slow) {
9077
- // If the position calculation is slow,
9078
- // defer updates until scrolling is finished.
9079
- // Browsers usually fire one scroll event per frame so
9080
- // we just wait until we've got two frames without an event
9081
- cancelAnimationFrame(raf);
9082
- raf = requestAnimationFrame(() => {
9083
- raf = requestAnimationFrame(() => {
9141
+ ric = requestIdleCallback(() => {
9142
+ scope.run(() => {
9143
+ bindScroll(data.activatorEl.value ?? data.contentEl.value, e => {
9144
+ if (slow) {
9145
+ // If the position calculation is slow,
9146
+ // defer updates until scrolling is finished.
9147
+ // Browsers usually fire one scroll event per frame so
9148
+ // we just wait until we've got two frames without an event
9149
+ cancelAnimationFrame(raf);
9150
+ raf = requestAnimationFrame(() => {
9151
+ raf = requestAnimationFrame(() => {
9152
+ update(e);
9153
+ });
9154
+ });
9155
+ } else {
9084
9156
  update(e);
9085
- });
9157
+ }
9086
9158
  });
9087
- } else {
9088
- update(e);
9089
- }
9159
+ });
9160
+ });
9161
+ vue.onScopeDispose(() => {
9162
+ cancelIdleCallback(ric);
9163
+ cancelAnimationFrame(raf);
9090
9164
  });
9091
9165
  }
9092
9166
 
@@ -9729,6 +9803,11 @@
9729
9803
  function onClickOutside() {
9730
9804
  parent == null ? void 0 : parent.closeParents();
9731
9805
  }
9806
+ const activatorProps = vue.computed(() => vue.mergeProps({
9807
+ 'aria-haspopup': 'menu',
9808
+ 'aria-expanded': String(isActive.value),
9809
+ 'aria-owns': id.value
9810
+ }, props.activatorProps));
9732
9811
  useRender(() => {
9733
9812
  const [overlayProps] = filterVOverlayProps(props);
9734
9813
  return vue.createVNode(VOverlay, vue.mergeProps({
@@ -9738,11 +9817,7 @@
9738
9817
  "modelValue": isActive.value,
9739
9818
  "onUpdate:modelValue": $event => isActive.value = $event,
9740
9819
  "absolute": true,
9741
- "activatorProps": vue.mergeProps({
9742
- 'aria-haspopup': 'menu',
9743
- 'aria-expanded': String(isActive.value),
9744
- 'aria-owns': id.value
9745
- }, props.activatorProps),
9820
+ "activatorProps": activatorProps.value,
9746
9821
  "onClick:outside": onClickOutside
9747
9822
  }, scopeId), {
9748
9823
  activator: slots.activator,
@@ -9856,8 +9931,10 @@
9856
9931
  }
9857
9932
  function onKeydown(e) {
9858
9933
  if (props.readonly || form != null && form.isReadonly.value) return;
9859
- if (['Enter', 'ArrowDown', ' '].includes(e.key)) {
9934
+ if (['Enter', ' ', 'ArrowDown', 'ArrowUp', 'Home', 'End'].includes(e.key)) {
9860
9935
  e.preventDefault();
9936
+ }
9937
+ if (['Enter', 'ArrowDown', ' '].includes(e.key)) {
9861
9938
  menu.value = true;
9862
9939
  }
9863
9940
  if (['Escape', 'Tab'].includes(e.key)) {
@@ -9868,15 +9945,12 @@
9868
9945
  (_listRef$value = listRef.value) == null ? void 0 : _listRef$value.focus('next');
9869
9946
  } else if (e.key === 'ArrowUp') {
9870
9947
  var _listRef$value2;
9871
- e.preventDefault();
9872
9948
  (_listRef$value2 = listRef.value) == null ? void 0 : _listRef$value2.focus('prev');
9873
9949
  } else if (e.key === 'Home') {
9874
9950
  var _listRef$value3;
9875
- e.preventDefault();
9876
9951
  (_listRef$value3 = listRef.value) == null ? void 0 : _listRef$value3.focus('first');
9877
9952
  } else if (e.key === 'End') {
9878
9953
  var _listRef$value4;
9879
- e.preventDefault();
9880
9954
  (_listRef$value4 = listRef.value) == null ? void 0 : _listRef$value4.focus('last');
9881
9955
  }
9882
9956
  }
@@ -10058,7 +10132,7 @@
10058
10132
  const customFiltersLength = Object.keys((options == null ? void 0 : options.customKeyFilter) ?? {}).length;
10059
10133
  if (!(items != null && items.length)) return array;
10060
10134
  loop: for (let i = 0; i < items.length; i++) {
10061
- const item = items[i].raw;
10135
+ const item = items[i];
10062
10136
  const customMatches = {};
10063
10137
  const defaultMatches = {};
10064
10138
  let match = -1;
@@ -10098,7 +10172,7 @@
10098
10172
  }
10099
10173
  return array;
10100
10174
  }
10101
- function useFilter(props, items, query) {
10175
+ function useFilter(props, items, query, options) {
10102
10176
  const strQuery = vue.computed(() => typeof (query == null ? void 0 : query.value) !== 'string' && typeof (query == null ? void 0 : query.value) !== 'number' ? '' : String(query.value));
10103
10177
  const filteredItems = vue.ref([]);
10104
10178
  const filteredMatches = vue.ref(new Map());
@@ -10109,7 +10183,7 @@
10109
10183
  const results = filterItems(transformedItems, strQuery.value, {
10110
10184
  customKeyFilter: props.customKeyFilter,
10111
10185
  default: props.customFilter,
10112
- filterKeys: props.filterKeys,
10186
+ filterKeys: vue.unref(options == null ? void 0 : options.filterKeys) ?? props.filterKeys,
10113
10187
  filterMode: props.filterMode,
10114
10188
  noFilter: props.noFilter
10115
10189
  });
@@ -10220,6 +10294,9 @@
10220
10294
  }
10221
10295
  function onKeydown(e) {
10222
10296
  if (props.readonly || form != null && form.isReadonly.value) return;
10297
+ if (['Enter', 'ArrowDown', 'ArrowUp'].includes(e.key)) {
10298
+ e.preventDefault();
10299
+ }
10223
10300
  if (['Enter', 'ArrowDown'].includes(e.key)) {
10224
10301
  menu.value = true;
10225
10302
  }
@@ -10231,11 +10308,9 @@
10231
10308
  }
10232
10309
  if (e.key === 'ArrowDown') {
10233
10310
  var _listRef$value;
10234
- e.preventDefault();
10235
10311
  (_listRef$value = listRef.value) == null ? void 0 : _listRef$value.focus('next');
10236
10312
  } else if (e.key === 'ArrowUp') {
10237
10313
  var _listRef$value2;
10238
- e.preventDefault();
10239
10314
  (_listRef$value2 = listRef.value) == null ? void 0 : _listRef$value2.focus('prev');
10240
10315
  }
10241
10316
  }
@@ -13564,7 +13639,9 @@
13564
13639
  if (props.readonly || form != null && form.isReadonly.value) return;
13565
13640
  const selectionStart = vTextFieldRef.value.selectionStart;
13566
13641
  const length = selected.value.length;
13567
- if (selectionIndex.value > -1) e.preventDefault();
13642
+ if (selectionIndex.value > -1 || ['Enter', 'ArrowDown', 'ArrowUp'].includes(e.key)) {
13643
+ e.preventDefault();
13644
+ }
13568
13645
  if (['Enter', 'ArrowDown'].includes(e.key)) {
13569
13646
  menu.value = true;
13570
13647
  }
@@ -13576,11 +13653,9 @@
13576
13653
  }
13577
13654
  if (e.key === 'ArrowDown') {
13578
13655
  var _listRef$value;
13579
- e.preventDefault();
13580
13656
  (_listRef$value = listRef.value) == null ? void 0 : _listRef$value.focus('next');
13581
13657
  } else if (e.key === 'ArrowUp') {
13582
13658
  var _listRef$value2;
13583
- e.preventDefault();
13584
13659
  (_listRef$value2 = listRef.value) == null ? void 0 : _listRef$value2.focus('prev');
13585
13660
  }
13586
13661
  if (!props.multiple) return;
@@ -13614,7 +13689,7 @@
13614
13689
  vTextFieldRef.value.setSelectionRange(0, 0);
13615
13690
  }
13616
13691
  }
13617
- if (e.key === 'Enter') {
13692
+ if (e.key === 'Enter' && search.value) {
13618
13693
  select(transformItem$1(props, search.value));
13619
13694
  search.value = '';
13620
13695
  }
@@ -13875,6 +13950,10 @@
13875
13950
  });
13876
13951
  }
13877
13952
  });
13953
+ const activatorProps = vue.computed(() => vue.mergeProps({
13954
+ 'aria-haspopup': 'dialog',
13955
+ 'aria-expanded': String(isActive.value)
13956
+ }, props.activatorProps));
13878
13957
  useRender(() => {
13879
13958
  const [overlayProps] = filterVOverlayProps(props);
13880
13959
  return vue.createVNode(VOverlay, vue.mergeProps({
@@ -13888,10 +13967,7 @@
13888
13967
  "onUpdate:modelValue": $event => isActive.value = $event,
13889
13968
  "aria-role": "dialog",
13890
13969
  "aria-modal": "true",
13891
- "activatorProps": vue.mergeProps({
13892
- 'aria-haspopup': 'dialog',
13893
- 'aria-expanded': String(isActive.value)
13894
- }, props.activatorProps)
13970
+ "activatorProps": activatorProps.value
13895
13971
  }, scopeId), {
13896
13972
  activator: slots.activator,
13897
13973
  default: function () {
@@ -14240,12 +14316,15 @@
14240
14316
  onFocus();
14241
14317
  vue.nextTick(() => {
14242
14318
  model.value = [];
14243
- if (inputRef != null && inputRef.value) {
14244
- inputRef.value.value = '';
14245
- }
14246
14319
  callEvent(props['onClick:clear'], e);
14247
14320
  });
14248
14321
  }
14322
+ vue.watch(model, newValue => {
14323
+ const hasModelReset = !Array.isArray(newValue) || !newValue.length;
14324
+ if (hasModelReset && inputRef.value) {
14325
+ inputRef.value.value = '';
14326
+ }
14327
+ });
14249
14328
  useRender(() => {
14250
14329
  const hasCounter = !!(slots.counter || props.counter);
14251
14330
  const hasDetails = !!(hasCounter || slots.details);
@@ -15236,7 +15315,7 @@
15236
15315
  window.removeEventListener('touchmove', onTouchmove);
15237
15316
  window.removeEventListener('touchend', onTouchend);
15238
15317
  });
15239
- const isHorizontal = vue.computed(() => position.value !== 'bottom');
15318
+ const isHorizontal = vue.computed(() => ['left', 'right'].includes(position.value));
15240
15319
  const {
15241
15320
  addMovement,
15242
15321
  endTouch,
@@ -15248,11 +15327,11 @@
15248
15327
  const offset = vue.ref(0);
15249
15328
  let start;
15250
15329
  function getOffset(pos, active) {
15251
- return (position.value === 'left' ? pos : position.value === 'right' ? document.documentElement.clientWidth - pos : position.value === 'bottom' ? document.documentElement.clientHeight - pos : oops()) - (active ? width.value : 0);
15330
+ return (position.value === 'left' ? pos : position.value === 'right' ? document.documentElement.clientWidth - pos : position.value === 'top' ? pos : position.value === 'bottom' ? document.documentElement.clientHeight - pos : oops()) - (active ? width.value : 0);
15252
15331
  }
15253
15332
  function getProgress(pos) {
15254
15333
  let limit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
15255
- const progress = position.value === 'left' ? (pos - offset.value) / width.value : position.value === 'right' ? (document.documentElement.clientWidth - pos - offset.value) / width.value : position.value === 'bottom' ? (document.documentElement.clientHeight - pos - offset.value) / width.value : oops();
15334
+ const progress = position.value === 'left' ? (pos - offset.value) / width.value : position.value === 'right' ? (document.documentElement.clientWidth - pos - offset.value) / width.value : position.value === 'top' ? (pos - offset.value) / width.value : position.value === 'bottom' ? (document.documentElement.clientHeight - pos - offset.value) / width.value : oops();
15256
15335
  return limit ? Math.max(0, Math.min(1, progress)) : progress;
15257
15336
  }
15258
15337
  function onTouchstart(e) {
@@ -15260,8 +15339,8 @@
15260
15339
  const touchX = e.changedTouches[0].clientX;
15261
15340
  const touchY = e.changedTouches[0].clientY;
15262
15341
  const touchZone = 25;
15263
- const inTouchZone = position.value === 'left' ? touchX < touchZone : position.value === 'right' ? touchX > document.documentElement.clientWidth - touchZone : position.value === 'bottom' ? touchY > document.documentElement.clientHeight - touchZone : oops();
15264
- const inElement = isActive.value && (position.value === 'left' ? touchX < width.value : position.value === 'right' ? touchX > document.documentElement.clientWidth - width.value : position.value === 'bottom' ? touchY > document.documentElement.clientHeight - width.value : oops());
15342
+ const inTouchZone = position.value === 'left' ? touchX < touchZone : position.value === 'right' ? touchX > document.documentElement.clientWidth - touchZone : position.value === 'top' ? touchY < touchZone : position.value === 'bottom' ? touchY > document.documentElement.clientHeight - touchZone : oops();
15343
+ const inElement = isActive.value && (position.value === 'left' ? touchX < width.value : position.value === 'right' ? touchX > document.documentElement.clientWidth - width.value : position.value === 'top' ? touchY < width.value : position.value === 'bottom' ? touchY > document.documentElement.clientHeight - width.value : oops());
15265
15344
  if (inTouchZone || inElement || isActive.value && isTemporary.value) {
15266
15345
  maybeDragging = true;
15267
15346
  start = [touchX, touchY];
@@ -15313,6 +15392,7 @@
15313
15392
  isActive.value = velocity.direction === ({
15314
15393
  left: 'right',
15315
15394
  right: 'left',
15395
+ top: 'down',
15316
15396
  bottom: 'up'
15317
15397
  }[position.value] || oops());
15318
15398
  } else {
@@ -15321,7 +15401,7 @@
15321
15401
  }
15322
15402
  const dragStyles = vue.computed(() => {
15323
15403
  return isDragging.value ? {
15324
- transform: position.value === 'left' ? `translateX(calc(-100% + ${dragProgress.value * width.value}px))` : position.value === 'right' ? `translateX(calc(100% - ${dragProgress.value * width.value}px))` : position.value === 'bottom' ? `translateY(calc(100% - ${dragProgress.value * width.value}px))` : oops(),
15404
+ transform: position.value === 'left' ? `translateX(calc(-100% + ${dragProgress.value * width.value}px))` : position.value === 'right' ? `translateX(calc(100% - ${dragProgress.value * width.value}px))` : position.value === 'top' ? `translateY(calc(-100% + ${dragProgress.value * width.value}px))` : position.value === 'bottom' ? `translateY(calc(100% - ${dragProgress.value * width.value}px))` : oops(),
15325
15405
  transition: 'none'
15326
15406
  } : undefined;
15327
15407
  });
@@ -15337,7 +15417,7 @@
15337
15417
 
15338
15418
  // Types
15339
15419
 
15340
- const locations = ['start', 'end', 'left', 'right', 'bottom'];
15420
+ const locations = ['start', 'end', 'left', 'right', 'top', 'bottom'];
15341
15421
  const VNavigationDrawer = defineComponent({
15342
15422
  name: 'VNavigationDrawer',
15343
15423
  props: {
@@ -15794,7 +15874,7 @@
15794
15874
  disabled: !!props.disabled || props.length < 2,
15795
15875
  color: isActive ? props.activeColor : props.color,
15796
15876
  ariaCurrent: isActive,
15797
- ariaLabel: t(isActive ? props.currentPageAriaLabel : props.pageAriaLabel, index + 1),
15877
+ ariaLabel: t(isActive ? props.currentPageAriaLabel : props.pageAriaLabel, item),
15798
15878
  onClick: e => setValue(e, item)
15799
15879
  }
15800
15880
  };
@@ -17973,6 +18053,9 @@
17973
18053
  if (props.transition) return props.transition;
17974
18054
  return isActive.value ? 'scale-transition' : 'fade-transition';
17975
18055
  });
18056
+ const activatorProps = vue.computed(() => vue.mergeProps({
18057
+ 'aria-describedby': id.value
18058
+ }, props.activatorProps));
17976
18059
  useRender(() => {
17977
18060
  const [overlayProps] = filterVOverlayProps(props);
17978
18061
  return vue.createVNode(VOverlay, vue.mergeProps({
@@ -17989,9 +18072,7 @@
17989
18072
  "persistent": true,
17990
18073
  "role": "tooltip",
17991
18074
  "eager": true,
17992
- "activatorProps": vue.mergeProps({
17993
- 'aria-describedby': id.value
17994
- }, props.activatorProps),
18075
+ "activatorProps": activatorProps.value,
17995
18076
  "_disableGlobalStack": true
17996
18077
  }, scopeId), {
17997
18078
  activator: slots.activator,
@@ -18377,7 +18458,7 @@
18377
18458
  locale
18378
18459
  };
18379
18460
  }
18380
- const version$1 = "3.2.0-next-20230114.0";
18461
+ const version$1 = "4.0.0-next-20230205.0";
18381
18462
  createVuetify$1.version = version$1;
18382
18463
 
18383
18464
  // Vue's inject() can only be used in setup
@@ -18398,7 +18479,7 @@
18398
18479
  ...options
18399
18480
  });
18400
18481
  };
18401
- const version = "3.2.0-next-20230114.0";
18482
+ const version = "4.0.0-next-20230205.0";
18402
18483
  createVuetify.version = version;
18403
18484
 
18404
18485
  exports.components = components;