vuetify 3.1.2 → 3.1.4

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 (187) hide show
  1. package/LICENSE.md +1 -1
  2. package/dist/json/attributes.json +1125 -1085
  3. package/dist/json/importMap-labs.json +4 -0
  4. package/dist/json/importMap.json +74 -74
  5. package/dist/json/tags.json +19 -4
  6. package/dist/json/web-types.json +1750 -1627
  7. package/dist/vuetify-labs.css +4451 -4445
  8. package/dist/vuetify-labs.d.ts +416 -224
  9. package/dist/vuetify-labs.esm.js +334 -242
  10. package/dist/vuetify-labs.esm.js.map +1 -1
  11. package/dist/vuetify-labs.js +333 -241
  12. package/dist/vuetify-labs.min.css +2 -2
  13. package/dist/vuetify.css +71 -64
  14. package/dist/vuetify.d.ts +349 -198
  15. package/dist/vuetify.esm.js +258 -190
  16. package/dist/vuetify.esm.js.map +1 -1
  17. package/dist/vuetify.js +257 -189
  18. package/dist/vuetify.js.map +1 -1
  19. package/dist/vuetify.min.css +2 -2
  20. package/dist/vuetify.min.js +475 -464
  21. package/dist/vuetify.min.js.map +1 -1
  22. package/lib/blueprints/index.d.ts +2 -2
  23. package/lib/blueprints/md1.d.ts +2 -2
  24. package/lib/blueprints/md2.d.ts +2 -2
  25. package/lib/blueprints/md3.d.ts +2 -2
  26. package/lib/components/VAppBar/VAppBarTitle.mjs +3 -4
  27. package/lib/components/VAppBar/VAppBarTitle.mjs.map +1 -1
  28. package/lib/components/VAppBar/index.d.ts +14 -2
  29. package/lib/components/VAutocomplete/VAutocomplete.mjs +3 -2
  30. package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
  31. package/lib/components/VAutocomplete/index.d.ts +43 -20
  32. package/lib/components/VBottomSheet/VBottomSheet.mjs +1 -4
  33. package/lib/components/VBottomSheet/VBottomSheet.mjs.map +1 -1
  34. package/lib/components/VBtn/VBtn.css +7 -7
  35. package/lib/components/VBtn/VBtn.mjs +8 -3
  36. package/lib/components/VBtn/VBtn.mjs.map +1 -1
  37. package/lib/components/VBtnGroup/VBtnGroup.mjs +15 -11
  38. package/lib/components/VBtnGroup/VBtnGroup.mjs.map +1 -1
  39. package/lib/components/VBtnGroup/index.d.ts +2 -1
  40. package/lib/components/VBtnToggle/VBtnToggle.mjs +9 -5
  41. package/lib/components/VBtnToggle/VBtnToggle.mjs.map +1 -1
  42. package/lib/components/VBtnToggle/index.d.ts +122 -1
  43. package/lib/components/VCalendar/VCalendar.mjs +3 -0
  44. package/lib/components/VCalendar/VCalendar.mjs.map +1 -1
  45. package/lib/components/VCalendar/VCalendarCategory.sass +9 -3
  46. package/lib/components/VCalendar/VCalendarDaily.mjs +20 -8
  47. package/lib/components/VCalendar/VCalendarDaily.mjs.map +1 -1
  48. package/lib/components/VCalendar/VCalendarWeekly.mjs +25 -5
  49. package/lib/components/VCalendar/VCalendarWeekly.mjs.map +1 -1
  50. package/lib/components/VCalendar/mixins/calendar-with-events.mjs +20 -16
  51. package/lib/components/VCalendar/mixins/calendar-with-events.mjs.map +1 -1
  52. package/lib/components/VCalendar/mixins/mouse.mjs +16 -30
  53. package/lib/components/VCalendar/mixins/mouse.mjs.map +1 -1
  54. package/lib/components/VCard/VCard.css +7 -7
  55. package/lib/components/VChip/VChip.css +7 -7
  56. package/lib/components/VChip/VChip.mjs +6 -1
  57. package/lib/components/VChip/VChip.mjs.map +1 -1
  58. package/lib/components/VCombobox/VCombobox.mjs +3 -3
  59. package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
  60. package/lib/components/VCombobox/index.d.ts +43 -20
  61. package/lib/components/VData/VData.mjs +2 -4
  62. package/lib/components/VData/VData.mjs.map +1 -1
  63. package/lib/components/VDatePicker/VDatePicker.mjs +7 -5
  64. package/lib/components/VDatePicker/VDatePicker.mjs.map +1 -1
  65. package/lib/components/VDefaultsProvider/index.d.ts +5 -4
  66. package/lib/components/VDialog/VDialog.mjs +6 -5
  67. package/lib/components/VDialog/VDialog.mjs.map +1 -1
  68. package/lib/components/VDialog/index.d.ts +57 -34
  69. package/lib/components/VDivider/VDivider.mjs +6 -6
  70. package/lib/components/VDivider/VDivider.mjs.map +1 -1
  71. package/lib/components/VExpansionPanel/VExpansionPanel.css +7 -7
  72. package/lib/components/VField/VField.css +2 -2
  73. package/lib/components/VField/VField.mjs +28 -26
  74. package/lib/components/VField/VField.mjs.map +1 -1
  75. package/lib/components/VField/VField.sass +2 -2
  76. package/lib/components/VFileInput/VFileInput.mjs +7 -4
  77. package/lib/components/VFileInput/VFileInput.mjs.map +1 -1
  78. package/lib/components/VForm/index.d.ts +0 -3
  79. package/lib/components/VList/VList.mjs +4 -1
  80. package/lib/components/VList/VList.mjs.map +1 -1
  81. package/lib/components/VList/VListItem.css +7 -7
  82. package/lib/components/VList/VListItem.mjs +29 -19
  83. package/lib/components/VList/VListItem.mjs.map +1 -1
  84. package/lib/components/VMenu/VMenu.mjs +6 -5
  85. package/lib/components/VMenu/VMenu.mjs.map +1 -1
  86. package/lib/components/VMenu/index.d.ts +57 -34
  87. package/lib/components/VNavigationDrawer/VNavigationDrawer.css +4 -0
  88. package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs +1 -1
  89. package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs.map +1 -1
  90. package/lib/components/VNavigationDrawer/VNavigationDrawer.sass +4 -0
  91. package/lib/components/VNavigationDrawer/index.d.ts +3 -3
  92. package/lib/components/VNavigationDrawer/touch.mjs +7 -6
  93. package/lib/components/VNavigationDrawer/touch.mjs.map +1 -1
  94. package/lib/components/VOtpInput/VOtpInput.mjs +22 -46
  95. package/lib/components/VOtpInput/VOtpInput.mjs.map +1 -1
  96. package/lib/components/VOverflowBtn/VOverflowBtn.mjs +3 -0
  97. package/lib/components/VOverflowBtn/VOverflowBtn.mjs.map +1 -1
  98. package/lib/components/VOverlay/index.d.ts +34 -11
  99. package/lib/components/VOverlay/locationStrategies.mjs +40 -29
  100. package/lib/components/VOverlay/locationStrategies.mjs.map +1 -1
  101. package/lib/components/VOverlay/scrollStrategies.mjs +25 -16
  102. package/lib/components/VOverlay/scrollStrategies.mjs.map +1 -1
  103. package/lib/components/VPagination/VPagination.mjs +1 -1
  104. package/lib/components/VPagination/VPagination.mjs.map +1 -1
  105. package/lib/components/VSelect/VSelect.mjs +3 -4
  106. package/lib/components/VSelect/VSelect.mjs.map +1 -1
  107. package/lib/components/VSelect/index.d.ts +43 -20
  108. package/lib/components/VSelectionControl/VSelectionControl.css +2 -2
  109. package/lib/components/VSkeletonLoader/VSkeletonLoader.sass +1 -1
  110. package/lib/components/VSnackbar/index.d.ts +42 -19
  111. package/lib/components/VStepper/VStepper.sass +6 -6
  112. package/lib/components/VStepper/VStepperStep.mjs +12 -2
  113. package/lib/components/VStepper/VStepperStep.mjs.map +1 -1
  114. package/lib/components/VTable/VTable.css +4 -4
  115. package/lib/components/VTable/VTable.sass +2 -2
  116. package/lib/components/VTimePicker/VTimePicker.mjs.map +1 -1
  117. package/lib/components/VTimeline/_mixins.sass +1 -1
  118. package/lib/components/VToolbar/VToolbarTitle.mjs +6 -5
  119. package/lib/components/VToolbar/VToolbarTitle.mjs.map +1 -1
  120. package/lib/components/VTooltip/VTooltip.mjs +4 -3
  121. package/lib/components/VTooltip/VTooltip.mjs.map +1 -1
  122. package/lib/components/VTooltip/index.d.ts +57 -34
  123. package/lib/components/VTreeview/VTreeview.mjs +1 -1
  124. package/lib/components/VTreeview/VTreeview.mjs.map +1 -1
  125. package/lib/components/index.d.ts +330 -178
  126. package/lib/composables/defaults.mjs +1 -1
  127. package/lib/composables/defaults.mjs.map +1 -1
  128. package/lib/composables/form.mjs +0 -1
  129. package/lib/composables/form.mjs.map +1 -1
  130. package/lib/composables/nested/nested.mjs +2 -1
  131. package/lib/composables/nested/nested.mjs.map +1 -1
  132. package/lib/composables/toggleScope.mjs +14 -7
  133. package/lib/composables/toggleScope.mjs.map +1 -1
  134. package/lib/directives/ripple/VRipple.css +3 -0
  135. package/lib/directives/ripple/VRipple.sass +3 -0
  136. package/lib/directives/ripple/_variables.scss +1 -1
  137. package/lib/directives/ripple/index.mjs +2 -7
  138. package/lib/directives/ripple/index.mjs.map +1 -1
  139. package/lib/entry-bundler.mjs +1 -1
  140. package/lib/framework.mjs +1 -1
  141. package/lib/index.d.ts +22 -22
  142. package/lib/labs/VDataTable/VDataTable.mjs +2 -5
  143. package/lib/labs/VDataTable/VDataTable.mjs.map +1 -1
  144. package/lib/labs/VDataTable/VDataTableFooter.mjs +1 -1
  145. package/lib/labs/VDataTable/VDataTableFooter.mjs.map +1 -1
  146. package/lib/labs/VDataTable/VDataTableRows.mjs +1 -1
  147. package/lib/labs/VDataTable/VDataTableRows.mjs.map +1 -1
  148. package/lib/labs/VDataTable/VDataTableServer.mjs +19 -12
  149. package/lib/labs/VDataTable/VDataTableServer.mjs.map +1 -1
  150. package/lib/labs/VDataTable/VDataTableVirtual.mjs +2 -4
  151. package/lib/labs/VDataTable/VDataTableVirtual.mjs.map +1 -1
  152. package/lib/labs/VDataTable/composables/options.mjs +3 -7
  153. package/lib/labs/VDataTable/composables/options.mjs.map +1 -1
  154. package/lib/labs/VDataTable/composables/paginate.mjs +1 -1
  155. package/lib/labs/VDataTable/composables/paginate.mjs.map +1 -1
  156. package/lib/labs/VDataTable/index.d.ts +71 -1
  157. package/lib/labs/VDataTable/index.mjs +1 -0
  158. package/lib/labs/VDataTable/index.mjs.map +1 -1
  159. package/lib/labs/VVirtualScroll/VVirtualScroll.css +0 -1
  160. package/lib/labs/VVirtualScroll/VVirtualScroll.mjs +40 -22
  161. package/lib/labs/VVirtualScroll/VVirtualScroll.mjs.map +1 -1
  162. package/lib/labs/VVirtualScroll/VVirtualScroll.sass +0 -1
  163. package/lib/labs/VVirtualScroll/VVirtualScrollItem.mjs +20 -8
  164. package/lib/labs/VVirtualScroll/VVirtualScrollItem.mjs.map +1 -1
  165. package/lib/labs/VVirtualScroll/index.d.ts +15 -46
  166. package/lib/labs/components.d.ts +86 -47
  167. package/lib/locale/adapters/vue-i18n.mjs +12 -2
  168. package/lib/locale/adapters/vue-i18n.mjs.map +1 -1
  169. package/lib/locale/ar.mjs +20 -20
  170. package/lib/locale/ar.mjs.map +1 -1
  171. package/lib/locale/en.mjs +2 -2
  172. package/lib/locale/en.mjs.map +1 -1
  173. package/lib/locale/es.mjs +3 -3
  174. package/lib/locale/es.mjs.map +1 -1
  175. package/lib/locale/fi.mjs +5 -5
  176. package/lib/locale/fi.mjs.map +1 -1
  177. package/lib/locale/it.mjs +6 -6
  178. package/lib/locale/it.mjs.map +1 -1
  179. package/lib/locale/sv.mjs +13 -13
  180. package/lib/locale/sv.mjs.map +1 -1
  181. package/lib/styles/settings/_variables.scss +6 -6
  182. package/lib/styles/tools/_states.sass +3 -3
  183. package/lib/util/defineComponent.mjs +21 -18
  184. package/lib/util/defineComponent.mjs.map +1 -1
  185. package/lib/util/helpers.mjs +5 -19
  186. package/lib/util/helpers.mjs.map +1 -1
  187. package/package.json +2 -2
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Vuetify v3.1.2
2
+ * Vuetify v3.1.4
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));
@@ -1896,8 +1910,8 @@
1896
1910
  root: 'Pagination Navigation',
1897
1911
  next: 'Next page',
1898
1912
  previous: 'Previous page',
1899
- page: 'Goto Page {0}',
1900
- currentPage: 'Page {0}, Current Page',
1913
+ page: 'Go to page {0}',
1914
+ currentPage: 'Page {0}, Current page',
1901
1915
  first: 'First page',
1902
1916
  last: 'Last page'
1903
1917
  }
@@ -2915,12 +2929,13 @@
2915
2929
 
2916
2930
  // Types
2917
2931
 
2932
+ const makeVToolbarTitleProps = propsFactory({
2933
+ text: String,
2934
+ ...makeTagProps()
2935
+ }, 'v-toolbar-title');
2918
2936
  const VToolbarTitle = genericComponent()({
2919
2937
  name: 'VToolbarTitle',
2920
- props: {
2921
- text: String,
2922
- ...makeTagProps()
2923
- },
2938
+ props: makeVToolbarTitleProps(),
2924
2939
  setup(props, _ref) {
2925
2940
  let {
2926
2941
  slots
@@ -3372,18 +3387,21 @@
3372
3387
  };
3373
3388
  }
3374
3389
 
3390
+ // Types
3391
+
3392
+ const makeVBtnGroupProps = propsFactory({
3393
+ divided: Boolean,
3394
+ ...makeBorderProps(),
3395
+ ...makeDensityProps(),
3396
+ ...makeElevationProps(),
3397
+ ...makeRoundedProps(),
3398
+ ...makeTagProps(),
3399
+ ...makeThemeProps(),
3400
+ ...makeVariantProps()
3401
+ }, 'v-btn-group');
3375
3402
  const VBtnGroup = defineComponent({
3376
3403
  name: 'VBtnGroup',
3377
- props: {
3378
- divided: Boolean,
3379
- ...makeBorderProps(),
3380
- ...makeDensityProps(),
3381
- ...makeElevationProps(),
3382
- ...makeRoundedProps(),
3383
- ...makeTagProps(),
3384
- ...makeThemeProps(),
3385
- ...makeVariantProps()
3386
- },
3404
+ props: makeVBtnGroupProps(),
3387
3405
  setup(props, _ref) {
3388
3406
  let {
3389
3407
  slots
@@ -3421,6 +3439,9 @@
3421
3439
  });
3422
3440
  }
3423
3441
  });
3442
+ function filterVBtnGroupProps(props) {
3443
+ return pick(props, Object.keys(VBtnGroup.props));
3444
+ }
3424
3445
 
3425
3446
  // Composables
3426
3447
 
@@ -3628,7 +3649,10 @@
3628
3649
  const VBtnToggleSymbol = Symbol.for('vuetify:v-btn-toggle');
3629
3650
  const VBtnToggle = genericComponent()({
3630
3651
  name: 'VBtnToggle',
3631
- props: makeGroupProps(),
3652
+ props: {
3653
+ ...makeVBtnGroupProps(),
3654
+ ...makeGroupProps()
3655
+ },
3632
3656
  emits: {
3633
3657
  'update:modelValue': value => true
3634
3658
  },
@@ -3645,9 +3669,10 @@
3645
3669
  } = useGroup(props, VBtnToggleSymbol);
3646
3670
  useRender(() => {
3647
3671
  var _slots$default;
3648
- return vue.createVNode(VBtnGroup, {
3672
+ const [btnGroupProps] = filterVBtnGroupProps(props);
3673
+ return vue.createVNode(VBtnGroup, vue.mergeProps({
3649
3674
  "class": "v-btn-toggle"
3650
- }, {
3675
+ }, btnGroupProps), {
3651
3676
  default: () => [(_slots$default = slots.default) == null ? void 0 : _slots$default.call(slots, {
3652
3677
  isSelected,
3653
3678
  next,
@@ -4102,9 +4127,6 @@
4102
4127
  el.style.transform = value;
4103
4128
  el.style.webkitTransform = value;
4104
4129
  }
4105
- function opacity(el, value) {
4106
- el.style.opacity = `calc(${value} * var(--v-theme-overlay-multiplier))`;
4107
- }
4108
4130
  function isTouchEvent(e) {
4109
4131
  return e.constructor.name === 'TouchEvent';
4110
4132
  }
@@ -4180,13 +4202,11 @@
4180
4202
  animation.classList.add('v-ripple__animation--enter');
4181
4203
  animation.classList.add('v-ripple__animation--visible');
4182
4204
  transform(animation, `translate(${x}, ${y}) scale3d(${scale},${scale},${scale})`);
4183
- opacity(animation, 0);
4184
4205
  animation.dataset.activated = String(performance.now());
4185
4206
  setTimeout(() => {
4186
4207
  animation.classList.remove('v-ripple__animation--enter');
4187
4208
  animation.classList.add('v-ripple__animation--in');
4188
4209
  transform(animation, `translate(${centerX}, ${centerY}) scale3d(1,1,1)`);
4189
- opacity(animation, 0.08);
4190
4210
  }, 0);
4191
4211
  },
4192
4212
  hide(el) {
@@ -4201,14 +4221,14 @@
4201
4221
  setTimeout(() => {
4202
4222
  animation.classList.remove('v-ripple__animation--in');
4203
4223
  animation.classList.add('v-ripple__animation--out');
4204
- opacity(animation, 0);
4205
4224
  setTimeout(() => {
4225
+ var _animation$parentNode;
4206
4226
  const ripples = el.getElementsByClassName('v-ripple__animation');
4207
4227
  if (ripples.length === 1 && el.dataset.previousPosition) {
4208
4228
  el.style.position = el.dataset.previousPosition;
4209
4229
  delete el.dataset.previousPosition;
4210
4230
  }
4211
- animation.parentNode && el.removeChild(animation.parentNode);
4231
+ if (((_animation$parentNode = animation.parentNode) == null ? void 0 : _animation$parentNode.parentNode) === el) el.removeChild(animation.parentNode);
4212
4232
  }, 300);
4213
4233
  }, delay);
4214
4234
  }
@@ -4861,14 +4881,18 @@
4861
4881
  const isElevated = vue.computed(() => {
4862
4882
  return props.variant === 'elevated' && !(props.disabled || props.flat || props.border);
4863
4883
  });
4884
+ const valueAttr = vue.computed(() => {
4885
+ if (props.value === undefined) return undefined;
4886
+ return Object(props.value) === props.value ? JSON.stringify(props.value, null, 0) : props.value;
4887
+ });
4864
4888
  useSelectLink(link, group == null ? void 0 : group.select);
4865
4889
  useRender(() => {
4866
- var _slots$prepend, _slots$default, _slots$append, _slots$loader;
4890
+ var _link$isActive2, _link$isActive3, _slots$prepend, _slots$default, _slots$append, _slots$loader;
4867
4891
  const Tag = link.isLink.value ? 'a' : props.tag;
4868
- const hasColor = !group || isActive.value;
4869
4892
  const hasPrepend = !!(props.prependIcon || slots.prepend);
4870
4893
  const hasAppend = !!(props.appendIcon || slots.append);
4871
4894
  const hasIcon = !!(props.icon && props.icon !== true);
4895
+ 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);
4872
4896
  return vue.withDirectives(vue.createVNode(Tag, {
4873
4897
  "type": Tag === 'a' ? undefined : 'button',
4874
4898
  "class": ['v-btn', group == null ? void 0 : group.selectedClass.value, {
@@ -4889,7 +4913,8 @@
4889
4913
  if (isDisabled.value) return;
4890
4914
  (_link$navigate = link.navigate) == null ? void 0 : _link$navigate.call(link, e);
4891
4915
  group == null ? void 0 : group.toggle();
4892
- }
4916
+ },
4917
+ "value": valueAttr.value
4893
4918
  }, {
4894
4919
  default: () => [genOverlays(true, 'v-btn'), !props.icon && hasPrepend && vue.createVNode(VDefaultsProvider, {
4895
4920
  "key": "prepend",
@@ -4990,9 +5015,7 @@
4990
5015
 
4991
5016
  const VAppBarTitle = defineComponent({
4992
5017
  name: 'VAppBarTitle',
4993
- props: {
4994
- ...VToolbarTitle.props
4995
- },
5018
+ props: makeVToolbarTitleProps(),
4996
5019
  setup(props, _ref) {
4997
5020
  let {
4998
5021
  slots
@@ -5363,32 +5386,34 @@
5363
5386
  if (hasLabel.value) {
5364
5387
  const el = labelRef.value.$el;
5365
5388
  const targetEl = floatingLabelRef.value.$el;
5366
- const rect = nullifyTransforms(el);
5367
- const targetRect = targetEl.getBoundingClientRect();
5368
- const x = targetRect.x - rect.x;
5369
- const y = targetRect.y - rect.y - (rect.height / 2 - targetRect.height / 2);
5370
- const targetWidth = targetRect.width / 0.75;
5371
- const width = Math.abs(targetWidth - rect.width) > 1 ? {
5372
- maxWidth: convertToUnit(targetWidth)
5373
- } : undefined;
5374
- const style = getComputedStyle(el);
5375
- const targetStyle = getComputedStyle(targetEl);
5376
- const duration = parseFloat(style.transitionDuration) * 1000 || 150;
5377
- const scale = parseFloat(targetStyle.getPropertyValue('--v-field-label-scale'));
5378
- const color = targetStyle.getPropertyValue('color');
5379
- el.style.visibility = 'visible';
5380
- targetEl.style.visibility = 'hidden';
5381
- animate(el, {
5382
- transform: `translate(${x}px, ${y}px) scale(${scale})`,
5383
- color,
5384
- ...width
5385
- }, {
5386
- duration,
5387
- easing: standardEasing,
5388
- direction: val ? 'normal' : 'reverse'
5389
- }).finished.then(() => {
5390
- el.style.removeProperty('visibility');
5391
- targetEl.style.removeProperty('visibility');
5389
+ requestAnimationFrame(() => {
5390
+ const rect = nullifyTransforms(el);
5391
+ const targetRect = targetEl.getBoundingClientRect();
5392
+ const x = targetRect.x - rect.x;
5393
+ const y = targetRect.y - rect.y - (rect.height / 2 - targetRect.height / 2);
5394
+ const targetWidth = targetRect.width / 0.75;
5395
+ const width = Math.abs(targetWidth - rect.width) > 1 ? {
5396
+ maxWidth: convertToUnit(targetWidth)
5397
+ } : undefined;
5398
+ const style = getComputedStyle(el);
5399
+ const targetStyle = getComputedStyle(targetEl);
5400
+ const duration = parseFloat(style.transitionDuration) * 1000 || 150;
5401
+ const scale = parseFloat(targetStyle.getPropertyValue('--v-field-label-scale'));
5402
+ const color = targetStyle.getPropertyValue('color');
5403
+ el.style.visibility = 'visible';
5404
+ targetEl.style.visibility = 'hidden';
5405
+ animate(el, {
5406
+ transform: `translate(${x}px, ${y}px) scale(${scale})`,
5407
+ color,
5408
+ ...width
5409
+ }, {
5410
+ duration,
5411
+ easing: standardEasing,
5412
+ direction: val ? 'normal' : 'reverse'
5413
+ }).finished.then(() => {
5414
+ el.style.removeProperty('visibility');
5415
+ targetEl.style.removeProperty('visibility');
5416
+ });
5392
5417
  });
5393
5418
  }
5394
5419
  }, {
@@ -5577,7 +5602,6 @@
5577
5602
  const makeFormProps = propsFactory({
5578
5603
  disabled: Boolean,
5579
5604
  fastFail: Boolean,
5580
- lazyValidation: Boolean,
5581
5605
  readonly: Boolean,
5582
5606
  modelValue: {
5583
5607
  type: Boolean,
@@ -6817,6 +6841,9 @@
6817
6841
  emit,
6818
6842
  slots
6819
6843
  } = _ref;
6844
+ const {
6845
+ t
6846
+ } = useLocale();
6820
6847
  const {
6821
6848
  borderClasses
6822
6849
  } = useBorder(props);
@@ -6953,6 +6980,7 @@
6953
6980
  }, {
6954
6981
  default: () => [vue.createVNode("div", {
6955
6982
  "class": "v-chip__close",
6983
+ "aria-label": t(props.closeLabel),
6956
6984
  "onClick": onCloseClick
6957
6985
  }, [slots.close ? slots.close() : vue.createVNode(VIcon, null, null)])]
6958
6986
  })]
@@ -6981,9 +7009,9 @@
6981
7009
  themeClasses
6982
7010
  } = provideTheme(props);
6983
7011
  const {
6984
- backgroundColorClasses,
6985
- backgroundColorStyles
6986
- } = useBackgroundColor(vue.toRef(props, 'color'));
7012
+ textColorClasses,
7013
+ textColorStyles
7014
+ } = useTextColor(vue.toRef(props, 'color'));
6987
7015
  const dividerStyles = vue.computed(() => {
6988
7016
  const styles = {};
6989
7017
  if (props.length) {
@@ -6999,8 +7027,8 @@
6999
7027
  'v-divider': true,
7000
7028
  'v-divider--inset': props.inset,
7001
7029
  'v-divider--vertical': props.vertical
7002
- }, themeClasses.value, backgroundColorClasses.value],
7003
- "style": [dividerStyles.value, backgroundColorStyles.value],
7030
+ }, themeClasses.value, textColorClasses.value],
7031
+ "style": [dividerStyles.value, textColorStyles.value],
7004
7032
  "aria-orientation": !attrs.role || attrs.role === 'separator' ? props.vertical ? 'vertical' : 'horizontal' : undefined,
7005
7033
  "role": `${attrs.role || 'separator'}`
7006
7034
  }, null));
@@ -7438,7 +7466,8 @@
7438
7466
  };
7439
7467
  const useNestedItem = (id, isGroup) => {
7440
7468
  const parent = vue.inject(VNestedSymbol, emptyNested);
7441
- const computedId = vue.computed(() => id.value ?? Symbol(getUid()));
7469
+ const uidSymbol = Symbol(getUid());
7470
+ const computedId = vue.computed(() => id.value ?? uidSymbol);
7442
7471
  const item = {
7443
7472
  ...parent,
7444
7473
  id: computedId,
@@ -7710,7 +7739,7 @@
7710
7739
  }
7711
7740
  }
7712
7741
  useRender(() => {
7713
- var _slots$prepend, _slots$title, _slots$subtitle, _slots$default, _slots$append;
7742
+ var _slots$title, _slots$subtitle, _slots$default;
7714
7743
  const Tag = isLink.value ? 'a' : props.tag;
7715
7744
  const hasColor = !list || isSelected.value || isActive.value;
7716
7745
  const hasTitle = slots.title || props.title;
@@ -7733,7 +7762,18 @@
7733
7762
  "onClick": onClick,
7734
7763
  "onKeydown": isClickable.value && !isLink.value && onKeyDown
7735
7764
  }, {
7736
- default: () => [genOverlays(isClickable.value || isActive.value, 'v-list-item'), hasPrepend && vue.createVNode(VDefaultsProvider, {
7765
+ default: () => [genOverlays(isClickable.value || isActive.value, 'v-list-item'), hasPrepend && vue.createVNode("div", {
7766
+ "key": "prepend",
7767
+ "class": "v-list-item__prepend"
7768
+ }, [props.prependAvatar && vue.createVNode(VAvatar, {
7769
+ "key": "prepend-avatar",
7770
+ "density": props.density,
7771
+ "image": props.prependAvatar
7772
+ }, null), props.prependIcon && vue.createVNode(VIcon, {
7773
+ "key": "prepend-icon",
7774
+ "density": props.density,
7775
+ "icon": props.prependIcon
7776
+ }, null), slots.prepend && vue.createVNode(VDefaultsProvider, {
7737
7777
  "key": "prepend",
7738
7778
  "defaults": {
7739
7779
  VAvatar: {
@@ -7749,14 +7789,8 @@
7749
7789
  }
7750
7790
  }
7751
7791
  }, {
7752
- default: () => [vue.createVNode("div", {
7753
- "class": "v-list-item__prepend"
7754
- }, [props.prependAvatar && vue.createVNode(VAvatar, {
7755
- "key": "prepend-avatar"
7756
- }, null), props.prependIcon && vue.createVNode(VIcon, {
7757
- "key": "prepend-icon"
7758
- }, null), (_slots$prepend = slots.prepend) == null ? void 0 : _slots$prepend.call(slots, slotProps.value)])]
7759
- }), vue.createVNode("div", {
7792
+ default: () => [slots.prepend(slotProps.value)]
7793
+ })]), vue.createVNode("div", {
7760
7794
  "class": "v-list-item__content",
7761
7795
  "data-no-activator": ""
7762
7796
  }, [hasTitle && vue.createVNode(VListItemTitle, {
@@ -7771,7 +7805,10 @@
7771
7805
  default: () => [((_slots$subtitle = slots.subtitle) == null ? void 0 : _slots$subtitle.call(slots, {
7772
7806
  subtitle: props.subtitle
7773
7807
  })) ?? props.subtitle]
7774
- }), (_slots$default = slots.default) == null ? void 0 : _slots$default.call(slots, slotProps.value)]), hasAppend && vue.createVNode(VDefaultsProvider, {
7808
+ }), (_slots$default = slots.default) == null ? void 0 : _slots$default.call(slots, slotProps.value)]), hasAppend && vue.createVNode("div", {
7809
+ "key": "append",
7810
+ "class": "v-list-item__append"
7811
+ }, [slots.append && vue.createVNode(VDefaultsProvider, {
7775
7812
  "key": "append",
7776
7813
  "defaults": {
7777
7814
  VAvatar: {
@@ -7787,14 +7824,16 @@
7787
7824
  }
7788
7825
  }
7789
7826
  }, {
7790
- default: () => [vue.createVNode("div", {
7791
- "class": "v-list-item__append"
7792
- }, [(_slots$append = slots.append) == null ? void 0 : _slots$append.call(slots, slotProps.value), props.appendIcon && vue.createVNode(VIcon, {
7793
- "key": "append-icon"
7794
- }, null), props.appendAvatar && vue.createVNode(VAvatar, {
7795
- "key": "append-avatar"
7796
- }, null)])]
7797
- })]
7827
+ default: () => [slots.append(slotProps.value)]
7828
+ }), props.appendIcon && vue.createVNode(VIcon, {
7829
+ "key": "append-icon",
7830
+ "density": props.density,
7831
+ "icon": props.appendIcon
7832
+ }, null), props.appendAvatar && vue.createVNode(VAvatar, {
7833
+ "key": "append-avatar",
7834
+ "density": props.density,
7835
+ "image": props.appendAvatar
7836
+ }, null)])]
7798
7837
  }), [[vue.resolveDirective("ripple"), isClickable.value && props.ripple]]);
7799
7838
  });
7800
7839
  return {};
@@ -8008,9 +8047,12 @@
8008
8047
 
8009
8048
  // Types
8010
8049
 
8050
+ function isPrimitive(value) {
8051
+ return typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean';
8052
+ }
8011
8053
  function transformItem(props, item) {
8012
8054
  const type = getPropertyFromItem(item, props.itemType, 'item');
8013
- const title = typeof item === 'string' ? item : getPropertyFromItem(item, props.itemTitle);
8055
+ const title = isPrimitive(item) ? item : getPropertyFromItem(item, props.itemTitle);
8014
8056
  const value = getPropertyFromItem(item, props.itemValue, undefined);
8015
8057
  const children = getPropertyFromItem(item, props.itemChildren);
8016
8058
  const itemProps = props.itemProps === true ? pick(item, ['children'])[1] : getPropertyFromItem(item, props.itemProps);
@@ -8636,17 +8678,12 @@
8636
8678
  function useLocationStrategies(props, data) {
8637
8679
  const contentStyles = vue.ref({});
8638
8680
  const updateLocation = vue.ref();
8639
- let scope;
8640
- vue.watchEffect(async () => {
8641
- var _scope;
8642
- (_scope = scope) == null ? void 0 : _scope.stop();
8643
- updateLocation.value = undefined;
8644
- if (!(IN_BROWSER && data.isActive.value && props.locationStrategy)) return;
8645
- scope = vue.effectScope();
8646
- if (!(props.locationStrategy === 'connected')) {
8647
- await vue.nextTick();
8648
- }
8649
- scope.run(() => {
8681
+ if (IN_BROWSER) {
8682
+ useToggleScope(() => !!(data.isActive.value && props.locationStrategy), reset => {
8683
+ vue.watch(() => props.locationStrategy, reset);
8684
+ vue.onScopeDispose(() => {
8685
+ updateLocation.value = undefined;
8686
+ });
8650
8687
  if (typeof props.locationStrategy === 'function') {
8651
8688
  var _props$locationStrate;
8652
8689
  updateLocation.value = (_props$locationStrate = props.locationStrategy(data, props, contentStyles)) == null ? void 0 : _props$locationStrate.updateLocation;
@@ -8655,16 +8692,14 @@
8655
8692
  updateLocation.value = (_locationStrategies$p = locationStrategies[props.locationStrategy](data, props, contentStyles)) == null ? void 0 : _locationStrategies$p.updateLocation;
8656
8693
  }
8657
8694
  });
8658
- });
8659
- IN_BROWSER && window.addEventListener('resize', onResize, {
8660
- passive: true
8661
- });
8662
- vue.onScopeDispose(() => {
8663
- var _scope2;
8664
- IN_BROWSER && window.removeEventListener('resize', onResize);
8665
- updateLocation.value = undefined;
8666
- (_scope2 = scope) == null ? void 0 : _scope2.stop();
8667
- });
8695
+ window.addEventListener('resize', onResize, {
8696
+ passive: true
8697
+ });
8698
+ vue.onScopeDispose(() => {
8699
+ window.removeEventListener('resize', onResize);
8700
+ updateLocation.value = undefined;
8701
+ });
8702
+ }
8668
8703
  function onResize(e) {
8669
8704
  var _updateLocation$value;
8670
8705
  (_updateLocation$value = updateLocation.value) == null ? void 0 : _updateLocation$value.call(updateLocation, e);
@@ -8958,13 +8993,30 @@
8958
8993
  maxWidth: convertToUnit(pixelCeil(clamp(available.x, minWidth.value === Infinity ? 0 : minWidth.value, maxWidth.value))),
8959
8994
  maxHeight: convertToUnit(pixelCeil(clamp(available.y, minHeight.value === Infinity ? 0 : minHeight.value, maxHeight.value)))
8960
8995
  });
8996
+ return {
8997
+ available,
8998
+ contentBox
8999
+ };
8961
9000
  }
8962
- vue.watch(() => [preferredAnchor.value, preferredOrigin.value, props.offset, props.minWidth, props.minHeight, props.maxWidth, props.maxHeight], () => updateLocation(), {
8963
- immediate: !activatorFixed
8964
- });
8965
- if (activatorFixed) vue.nextTick(() => updateLocation());
8966
- requestAnimationFrame(() => {
8967
- if (contentStyles.value.maxHeight) updateLocation();
9001
+ vue.watch(() => [preferredAnchor.value, preferredOrigin.value, props.offset, props.minWidth, props.minHeight, props.maxWidth, props.maxHeight], () => updateLocation());
9002
+ vue.nextTick(() => {
9003
+ const result = updateLocation();
9004
+
9005
+ // TODO: overflowing content should only require a single updateLocation call
9006
+ // Icky hack to make sure the content is positioned consistently
9007
+ if (!result) return;
9008
+ const {
9009
+ available,
9010
+ contentBox
9011
+ } = result;
9012
+ if (contentBox.height > available.y) {
9013
+ requestAnimationFrame(() => {
9014
+ updateLocation();
9015
+ requestAnimationFrame(() => {
9016
+ updateLocation();
9017
+ });
9018
+ });
9019
+ }
8968
9020
  });
8969
9021
  return {
8970
9022
  updateLocation
@@ -9032,10 +9084,10 @@
9032
9084
  await vue.nextTick();
9033
9085
  scope.run(() => {
9034
9086
  if (typeof props.scrollStrategy === 'function') {
9035
- props.scrollStrategy(data, props);
9087
+ props.scrollStrategy(data, props, scope);
9036
9088
  } else {
9037
9089
  var _scrollStrategies$pro;
9038
- (_scrollStrategies$pro = scrollStrategies[props.scrollStrategy]) == null ? void 0 : _scrollStrategies$pro.call(scrollStrategies, data, props);
9090
+ (_scrollStrategies$pro = scrollStrategies[props.scrollStrategy]) == null ? void 0 : _scrollStrategies$pro.call(scrollStrategies, data, props, scope);
9039
9091
  }
9040
9092
  });
9041
9093
  });
@@ -9081,9 +9133,10 @@
9081
9133
  }
9082
9134
  });
9083
9135
  }
9084
- function repositionScrollStrategy(data) {
9136
+ function repositionScrollStrategy(data, props, scope) {
9085
9137
  let slow = false;
9086
9138
  let raf = -1;
9139
+ let ric = -1;
9087
9140
  function update(e) {
9088
9141
  requestNewFrame(() => {
9089
9142
  var _data$updateLocation$, _data$updateLocation;
@@ -9093,21 +9146,29 @@
9093
9146
  slow = time / (1000 / 60) > 2;
9094
9147
  });
9095
9148
  }
9096
- bindScroll(data.activatorEl.value ?? data.contentEl.value, e => {
9097
- if (slow) {
9098
- // If the position calculation is slow,
9099
- // defer updates until scrolling is finished.
9100
- // Browsers usually fire one scroll event per frame so
9101
- // we just wait until we've got two frames without an event
9102
- cancelAnimationFrame(raf);
9103
- raf = requestAnimationFrame(() => {
9104
- raf = requestAnimationFrame(() => {
9149
+ ric = requestIdleCallback(() => {
9150
+ scope.run(() => {
9151
+ bindScroll(data.activatorEl.value ?? data.contentEl.value, e => {
9152
+ if (slow) {
9153
+ // If the position calculation is slow,
9154
+ // defer updates until scrolling is finished.
9155
+ // Browsers usually fire one scroll event per frame so
9156
+ // we just wait until we've got two frames without an event
9157
+ cancelAnimationFrame(raf);
9158
+ raf = requestAnimationFrame(() => {
9159
+ raf = requestAnimationFrame(() => {
9160
+ update(e);
9161
+ });
9162
+ });
9163
+ } else {
9105
9164
  update(e);
9106
- });
9165
+ }
9107
9166
  });
9108
- } else {
9109
- update(e);
9110
- }
9167
+ });
9168
+ });
9169
+ vue.onScopeDispose(() => {
9170
+ cancelIdleCallback(ric);
9171
+ cancelAnimationFrame(raf);
9111
9172
  });
9112
9173
  }
9113
9174
 
@@ -9750,6 +9811,11 @@
9750
9811
  function onClickOutside() {
9751
9812
  parent == null ? void 0 : parent.closeParents();
9752
9813
  }
9814
+ const activatorProps = vue.computed(() => vue.mergeProps({
9815
+ 'aria-haspopup': 'menu',
9816
+ 'aria-expanded': String(isActive.value),
9817
+ 'aria-owns': id.value
9818
+ }, props.activatorProps));
9753
9819
  useRender(() => {
9754
9820
  const [overlayProps] = filterVOverlayProps(props);
9755
9821
  return vue.createVNode(VOverlay, vue.mergeProps({
@@ -9759,11 +9825,7 @@
9759
9825
  "modelValue": isActive.value,
9760
9826
  "onUpdate:modelValue": $event => isActive.value = $event,
9761
9827
  "absolute": true,
9762
- "activatorProps": vue.mergeProps({
9763
- 'aria-haspopup': 'menu',
9764
- 'aria-expanded': String(isActive.value),
9765
- 'aria-owns': id.value
9766
- }, props.activatorProps),
9828
+ "activatorProps": activatorProps.value,
9767
9829
  "onClick:outside": onClickOutside
9768
9830
  }, scopeId), {
9769
9831
  activator: slots.activator,
@@ -9877,8 +9939,10 @@
9877
9939
  }
9878
9940
  function onKeydown(e) {
9879
9941
  if (props.readonly || form != null && form.isReadonly.value) return;
9880
- if (['Enter', 'ArrowDown', ' '].includes(e.key)) {
9942
+ if (['Enter', ' ', 'ArrowDown', 'ArrowUp', 'Home', 'End'].includes(e.key)) {
9881
9943
  e.preventDefault();
9944
+ }
9945
+ if (['Enter', 'ArrowDown', ' '].includes(e.key)) {
9882
9946
  menu.value = true;
9883
9947
  }
9884
9948
  if (['Escape', 'Tab'].includes(e.key)) {
@@ -9889,15 +9953,12 @@
9889
9953
  (_listRef$value = listRef.value) == null ? void 0 : _listRef$value.focus('next');
9890
9954
  } else if (e.key === 'ArrowUp') {
9891
9955
  var _listRef$value2;
9892
- e.preventDefault();
9893
9956
  (_listRef$value2 = listRef.value) == null ? void 0 : _listRef$value2.focus('prev');
9894
9957
  } else if (e.key === 'Home') {
9895
9958
  var _listRef$value3;
9896
- e.preventDefault();
9897
9959
  (_listRef$value3 = listRef.value) == null ? void 0 : _listRef$value3.focus('first');
9898
9960
  } else if (e.key === 'End') {
9899
9961
  var _listRef$value4;
9900
- e.preventDefault();
9901
9962
  (_listRef$value4 = listRef.value) == null ? void 0 : _listRef$value4.focus('last');
9902
9963
  }
9903
9964
  }
@@ -10241,6 +10302,9 @@
10241
10302
  }
10242
10303
  function onKeydown(e) {
10243
10304
  if (props.readonly || form != null && form.isReadonly.value) return;
10305
+ if (['Enter', 'ArrowDown', 'ArrowUp'].includes(e.key)) {
10306
+ e.preventDefault();
10307
+ }
10244
10308
  if (['Enter', 'ArrowDown'].includes(e.key)) {
10245
10309
  menu.value = true;
10246
10310
  }
@@ -10252,11 +10316,9 @@
10252
10316
  }
10253
10317
  if (e.key === 'ArrowDown') {
10254
10318
  var _listRef$value;
10255
- e.preventDefault();
10256
10319
  (_listRef$value = listRef.value) == null ? void 0 : _listRef$value.focus('next');
10257
10320
  } else if (e.key === 'ArrowUp') {
10258
10321
  var _listRef$value2;
10259
- e.preventDefault();
10260
10322
  (_listRef$value2 = listRef.value) == null ? void 0 : _listRef$value2.focus('prev');
10261
10323
  }
10262
10324
  }
@@ -13585,7 +13647,9 @@
13585
13647
  if (props.readonly || form != null && form.isReadonly.value) return;
13586
13648
  const selectionStart = vTextFieldRef.value.selectionStart;
13587
13649
  const length = selected.value.length;
13588
- if (selectionIndex.value > -1) e.preventDefault();
13650
+ if (selectionIndex.value > -1 || ['Enter', 'ArrowDown', 'ArrowUp'].includes(e.key)) {
13651
+ e.preventDefault();
13652
+ }
13589
13653
  if (['Enter', 'ArrowDown'].includes(e.key)) {
13590
13654
  menu.value = true;
13591
13655
  }
@@ -13597,11 +13661,9 @@
13597
13661
  }
13598
13662
  if (e.key === 'ArrowDown') {
13599
13663
  var _listRef$value;
13600
- e.preventDefault();
13601
13664
  (_listRef$value = listRef.value) == null ? void 0 : _listRef$value.focus('next');
13602
13665
  } else if (e.key === 'ArrowUp') {
13603
13666
  var _listRef$value2;
13604
- e.preventDefault();
13605
13667
  (_listRef$value2 = listRef.value) == null ? void 0 : _listRef$value2.focus('prev');
13606
13668
  }
13607
13669
  if (!props.multiple) return;
@@ -13896,6 +13958,10 @@
13896
13958
  });
13897
13959
  }
13898
13960
  });
13961
+ const activatorProps = vue.computed(() => vue.mergeProps({
13962
+ 'aria-haspopup': 'dialog',
13963
+ 'aria-expanded': String(isActive.value)
13964
+ }, props.activatorProps));
13899
13965
  useRender(() => {
13900
13966
  const [overlayProps] = filterVOverlayProps(props);
13901
13967
  return vue.createVNode(VOverlay, vue.mergeProps({
@@ -13909,10 +13975,7 @@
13909
13975
  "onUpdate:modelValue": $event => isActive.value = $event,
13910
13976
  "aria-role": "dialog",
13911
13977
  "aria-modal": "true",
13912
- "activatorProps": vue.mergeProps({
13913
- 'aria-haspopup': 'dialog',
13914
- 'aria-expanded': String(isActive.value)
13915
- }, props.activatorProps)
13978
+ "activatorProps": activatorProps.value
13916
13979
  }, scopeId), {
13917
13980
  activator: slots.activator,
13918
13981
  default: function () {
@@ -14261,12 +14324,15 @@
14261
14324
  onFocus();
14262
14325
  vue.nextTick(() => {
14263
14326
  model.value = [];
14264
- if (inputRef != null && inputRef.value) {
14265
- inputRef.value.value = '';
14266
- }
14267
14327
  callEvent(props['onClick:clear'], e);
14268
14328
  });
14269
14329
  }
14330
+ vue.watch(model, newValue => {
14331
+ const hasModelReset = !Array.isArray(newValue) || !newValue.length;
14332
+ if (hasModelReset && inputRef.value) {
14333
+ inputRef.value.value = '';
14334
+ }
14335
+ });
14270
14336
  useRender(() => {
14271
14337
  const hasCounter = !!(slots.counter || props.counter);
14272
14338
  const hasDetails = !!(hasCounter || slots.details);
@@ -15257,7 +15323,7 @@
15257
15323
  window.removeEventListener('touchmove', onTouchmove);
15258
15324
  window.removeEventListener('touchend', onTouchend);
15259
15325
  });
15260
- const isHorizontal = vue.computed(() => position.value !== 'bottom');
15326
+ const isHorizontal = vue.computed(() => ['left', 'right'].includes(position.value));
15261
15327
  const {
15262
15328
  addMovement,
15263
15329
  endTouch,
@@ -15269,11 +15335,11 @@
15269
15335
  const offset = vue.ref(0);
15270
15336
  let start;
15271
15337
  function getOffset(pos, active) {
15272
- return (position.value === 'left' ? pos : position.value === 'right' ? document.documentElement.clientWidth - pos : position.value === 'bottom' ? document.documentElement.clientHeight - pos : oops()) - (active ? width.value : 0);
15338
+ 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);
15273
15339
  }
15274
15340
  function getProgress(pos) {
15275
15341
  let limit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
15276
- 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();
15342
+ 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();
15277
15343
  return limit ? Math.max(0, Math.min(1, progress)) : progress;
15278
15344
  }
15279
15345
  function onTouchstart(e) {
@@ -15281,8 +15347,8 @@
15281
15347
  const touchX = e.changedTouches[0].clientX;
15282
15348
  const touchY = e.changedTouches[0].clientY;
15283
15349
  const touchZone = 25;
15284
- const inTouchZone = position.value === 'left' ? touchX < touchZone : position.value === 'right' ? touchX > document.documentElement.clientWidth - touchZone : position.value === 'bottom' ? touchY > document.documentElement.clientHeight - touchZone : oops();
15285
- 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());
15350
+ 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();
15351
+ 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());
15286
15352
  if (inTouchZone || inElement || isActive.value && isTemporary.value) {
15287
15353
  maybeDragging = true;
15288
15354
  start = [touchX, touchY];
@@ -15334,6 +15400,7 @@
15334
15400
  isActive.value = velocity.direction === ({
15335
15401
  left: 'right',
15336
15402
  right: 'left',
15403
+ top: 'down',
15337
15404
  bottom: 'up'
15338
15405
  }[position.value] || oops());
15339
15406
  } else {
@@ -15342,7 +15409,7 @@
15342
15409
  }
15343
15410
  const dragStyles = vue.computed(() => {
15344
15411
  return isDragging.value ? {
15345
- 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(),
15412
+ 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(),
15346
15413
  transition: 'none'
15347
15414
  } : undefined;
15348
15415
  });
@@ -15358,7 +15425,7 @@
15358
15425
 
15359
15426
  // Types
15360
15427
 
15361
- const locations = ['start', 'end', 'left', 'right', 'bottom'];
15428
+ const locations = ['start', 'end', 'left', 'right', 'top', 'bottom'];
15362
15429
  const VNavigationDrawer = defineComponent({
15363
15430
  name: 'VNavigationDrawer',
15364
15431
  props: {
@@ -15815,7 +15882,7 @@
15815
15882
  disabled: !!props.disabled || props.length < 2,
15816
15883
  color: isActive ? props.activeColor : props.color,
15817
15884
  ariaCurrent: isActive,
15818
- ariaLabel: t(isActive ? props.currentPageAriaLabel : props.pageAriaLabel, index + 1),
15885
+ ariaLabel: t(isActive ? props.currentPageAriaLabel : props.pageAriaLabel, item),
15819
15886
  onClick: e => setValue(e, item)
15820
15887
  }
15821
15888
  };
@@ -17994,6 +18061,9 @@
17994
18061
  if (props.transition) return props.transition;
17995
18062
  return isActive.value ? 'scale-transition' : 'fade-transition';
17996
18063
  });
18064
+ const activatorProps = vue.computed(() => vue.mergeProps({
18065
+ 'aria-describedby': id.value
18066
+ }, props.activatorProps));
17997
18067
  useRender(() => {
17998
18068
  const [overlayProps] = filterVOverlayProps(props);
17999
18069
  return vue.createVNode(VOverlay, vue.mergeProps({
@@ -18010,9 +18080,7 @@
18010
18080
  "persistent": true,
18011
18081
  "role": "tooltip",
18012
18082
  "eager": true,
18013
- "activatorProps": vue.mergeProps({
18014
- 'aria-describedby': id.value
18015
- }, props.activatorProps),
18083
+ "activatorProps": activatorProps.value,
18016
18084
  "_disableGlobalStack": true
18017
18085
  }, scopeId), {
18018
18086
  activator: slots.activator,
@@ -18961,7 +19029,7 @@
18961
19029
  });
18962
19030
  },
18963
19031
  "item": item
18964
- }, slots), isExpanded(item.value) && ((_slots$expandedRow = slots['expanded-row']) == null ? void 0 : _slots$expandedRow.call(slots, {
19032
+ }, slots), isExpanded(item) && ((_slots$expandedRow = slots['expanded-row']) == null ? void 0 : _slots$expandedRow.call(slots, {
18965
19033
  item,
18966
19034
  columns: columns.value
18967
19035
  }))]);
@@ -18999,7 +19067,7 @@
18999
19067
  return Math.min(itemsLength.value, startIndex.value + itemsPerPage.value);
19000
19068
  });
19001
19069
  const pageCount = vue.computed(() => {
19002
- if (itemsPerPage.value === -1) return 1;
19070
+ if (itemsPerPage.value === -1 || itemsLength.value === 0) return 1;
19003
19071
  return Math.ceil(itemsLength.value / itemsPerPage.value);
19004
19072
  });
19005
19073
  vue.watchEffect(() => {
@@ -19102,7 +19170,7 @@
19102
19170
  "hide-details": true
19103
19171
  }, null)]), vue.createVNode("div", {
19104
19172
  "class": "v-data-table-footer__info"
19105
- }, [vue.createVNode("div", null, [(startIndex.value ?? -1) + 1, vue.createTextVNode(" - "), stopIndex.value ?? 0, vue.createTextVNode(" of "), itemsLength.value ?? 0])]), vue.createVNode("div", {
19173
+ }, [vue.createVNode("div", null, [!itemsLength.value ? 0 : startIndex.value + 1, vue.createTextVNode(" - "), stopIndex.value, vue.createTextVNode(" of "), itemsLength.value])]), vue.createVNode("div", {
19106
19174
  "class": "v-data-table-footer__pagination"
19107
19175
  }, [vue.createVNode(VBtn, {
19108
19176
  "icon": props.firstIcon,
@@ -19170,18 +19238,14 @@
19170
19238
  page,
19171
19239
  itemsPerPage,
19172
19240
  sortBy,
19173
- startIndex,
19174
- stopIndex,
19175
- pageCount
19241
+ groupBy
19176
19242
  } = _ref;
19177
19243
  const vm = getCurrentInstance('VDataTable');
19178
19244
  const options = vue.computed(() => ({
19179
19245
  page: page.value,
19180
19246
  itemsPerPage: itemsPerPage.value,
19181
- startIndex: startIndex.value,
19182
- stopIndex: stopIndex.value,
19183
- pageCount: pageCount.value,
19184
- sortBy: sortBy.value
19247
+ sortBy: sortBy.value,
19248
+ groupBy: groupBy.value
19185
19249
  }));
19186
19250
 
19187
19251
  // Reset page when sorting changes
@@ -19283,8 +19347,7 @@
19283
19347
  page,
19284
19348
  itemsPerPage,
19285
19349
  startIndex,
19286
- stopIndex,
19287
- pageCount
19350
+ stopIndex
19288
19351
  } = createPagination(props, flatItems);
19289
19352
  const {
19290
19353
  paginatedItems
@@ -19296,9 +19359,7 @@
19296
19359
  page,
19297
19360
  itemsPerPage,
19298
19361
  sortBy,
19299
- pageCount,
19300
- startIndex,
19301
- stopIndex
19362
+ groupBy
19302
19363
  });
19303
19364
  provideDefaults({
19304
19365
  VDataTableRows: {
@@ -19492,10 +19553,8 @@
19492
19553
  useOptions({
19493
19554
  sortBy,
19494
19555
  page: vue.ref(1),
19495
- startIndex: vue.ref(0),
19496
- stopIndex: vue.computed(() => flatItems.value.length - 1),
19497
- pageCount: vue.ref(1),
19498
- itemsPerPage: vue.ref(-1)
19556
+ itemsPerPage: vue.ref(-1),
19557
+ groupBy
19499
19558
  });
19500
19559
  provideDefaults({
19501
19560
  VDataTableRows: {
@@ -19571,7 +19630,8 @@
19571
19630
  ...makeDataTableItemProps(),
19572
19631
  ...makeDataTableSelectProps(),
19573
19632
  ...makeDataTableSortProps(),
19574
- ...makeDataTablePaginateProps()
19633
+ ...makeDataTablePaginateProps(),
19634
+ ...makeDataTableGroupProps()
19575
19635
  },
19576
19636
  emits: {
19577
19637
  'update:modelValue': value => true,
@@ -19580,6 +19640,7 @@
19580
19640
  'update:sortBy': sortBy => true,
19581
19641
  'update:options': options => true,
19582
19642
  'update:expanded': options => true,
19643
+ 'update:groupBy': value => true,
19583
19644
  'click:row': (event, value) => true
19584
19645
  },
19585
19646
  setup(props, _ref) {
@@ -19587,10 +19648,12 @@
19587
19648
  emit,
19588
19649
  slots
19589
19650
  } = _ref;
19651
+ const groupBy = useProxiedModel(props, 'groupBy');
19590
19652
  createExpanded(props);
19591
19653
  const {
19592
19654
  columns
19593
19655
  } = createHeaders(props, {
19656
+ groupBy,
19594
19657
  showSelect: vue.toRef(props, 'showSelect'),
19595
19658
  showExpand: vue.toRef(props, 'showExpand')
19596
19659
  });
@@ -19601,21 +19664,22 @@
19601
19664
  sortBy,
19602
19665
  toggleSort
19603
19666
  } = createSort(props);
19667
+ const {
19668
+ opened
19669
+ } = createGroupBy(props, groupBy, sortBy);
19604
19670
  const {
19605
19671
  page,
19606
- itemsPerPage,
19607
- startIndex,
19608
- stopIndex,
19609
- pageCount
19672
+ itemsPerPage
19610
19673
  } = createPagination(props, items);
19674
+ const {
19675
+ flatItems
19676
+ } = useGroupedItems(items, groupBy, opened);
19611
19677
  createSelection(props, items);
19612
19678
  useOptions({
19613
19679
  page,
19614
19680
  itemsPerPage,
19615
19681
  sortBy,
19616
- startIndex,
19617
- stopIndex,
19618
- pageCount
19682
+ groupBy
19619
19683
  });
19620
19684
  vue.provide('v-data-table', {
19621
19685
  toggleSort,
@@ -19651,7 +19715,7 @@
19651
19715
  "class": "v-data-table__tbody",
19652
19716
  "role": "rowgroup"
19653
19717
  }, [slots.body ? slots.body() : vue.createVNode(VDataTableRows, {
19654
- "items": items.value,
19718
+ "items": flatItems.value,
19655
19719
  "onClick:row": (event, value) => emit('click:row', event, value)
19656
19720
  }, slots)]), (_slots$tbody = slots.tbody) == null ? void 0 : _slots$tbody.call(slots), (_slots$tfoot = slots.tfoot) == null ? void 0 : _slots$tfoot.call(slots)]);
19657
19721
  }),
@@ -19676,12 +19740,23 @@
19676
19740
  slots
19677
19741
  } = _ref;
19678
19742
  const {
19679
- resizeRef
19680
- } = useResizeObserver(entries => {
19681
- if (!entries.length) return;
19682
- const contentRect = entries[0].contentRect;
19683
- emit('update:height', contentRect.height);
19743
+ resizeRef,
19744
+ contentRect
19745
+ } = useResizeObserver();
19746
+ useToggleScope(() => props.dynamicHeight, () => {
19747
+ vue.watch(() => {
19748
+ var _contentRect$value;
19749
+ return (_contentRect$value = contentRect.value) == null ? void 0 : _contentRect$value.height;
19750
+ }, height => {
19751
+ if (height != null) emit('update:height', height);
19752
+ });
19684
19753
  });
19754
+ function updateHeight() {
19755
+ if (props.dynamicHeight && contentRect.value) {
19756
+ emit('update:height', contentRect.value.height);
19757
+ }
19758
+ }
19759
+ vue.onUpdated(updateHeight);
19685
19760
  useRender(() => {
19686
19761
  var _slots$default;
19687
19762
  return vue.createVNode("div", {
@@ -19703,15 +19778,8 @@
19703
19778
  type: Array,
19704
19779
  default: () => []
19705
19780
  },
19706
- itemKey: {
19707
- type: String,
19708
- default: 'value'
19709
- },
19710
19781
  itemHeight: [Number, String],
19711
- visibleItems: {
19712
- type: [Number, String],
19713
- default: 30
19714
- },
19782
+ visibleItems: [Number, String],
19715
19783
  ...makeDimensionProps()
19716
19784
  },
19717
19785
  setup(props, _ref) {
@@ -19726,15 +19794,23 @@
19726
19794
  baseItemHeight.value = val;
19727
19795
  }
19728
19796
  });
19729
- const visibleItems = vue.computed(() => parseInt(props.visibleItems, 10));
19730
19797
  const rootEl = vue.ref();
19731
- const ids = new Map(props.items.map((item, index) => [getPropertyFromItem(item, props.itemKey, item), index]));
19798
+ const {
19799
+ resizeRef,
19800
+ contentRect
19801
+ } = useResizeObserver();
19802
+ vue.watchEffect(() => {
19803
+ resizeRef.value = rootEl.value;
19804
+ });
19805
+ const display = useDisplay();
19732
19806
  const sizes = createRange(props.items.length).map(() => itemHeight.value);
19733
- function handleItemResize(item, height) {
19734
- const index = ids.get(getPropertyFromItem(item, props.itemKey, item));
19735
- if (!index) return;
19807
+ const visibleItems = vue.computed(() => {
19808
+ var _contentRect$value;
19809
+ return props.visibleItems ? parseInt(props.visibleItems, 10) : Math.max(12, Math.ceil((((_contentRect$value = contentRect.value) == null ? void 0 : _contentRect$value.height) ?? display.height.value) / itemHeight.value * 1.7 + 1));
19810
+ });
19811
+ function handleItemResize(index, height) {
19812
+ itemHeight.value = Math.max(itemHeight.value, height);
19736
19813
  sizes[index] = height;
19737
- if (!itemHeight.value) itemHeight.value = height;
19738
19814
  }
19739
19815
  function calculateOffset(index) {
19740
19816
  return sizes.slice(0, index).reduce((curr, value) => curr + (value || itemHeight.value), 0);
@@ -19757,18 +19833,24 @@
19757
19833
  }
19758
19834
  let lastScrollTop = 0;
19759
19835
  function handleScroll() {
19760
- if (!rootEl.value) return;
19836
+ if (!rootEl.value || !contentRect.value) return;
19837
+ const height = contentRect.value.height;
19761
19838
  const scrollTop = rootEl.value.scrollTop;
19762
19839
  const direction = scrollTop < lastScrollTop ? UP : DOWN;
19763
- const midPointIndex = calculateMidPointIndex(scrollTop);
19840
+ const midPointIndex = calculateMidPointIndex(scrollTop + height / 2);
19764
19841
  const buffer = Math.round(visibleItems.value / 3);
19765
- if (direction === UP && midPointIndex <= first.value) {
19842
+ if (direction === UP && midPointIndex <= first.value + buffer * 2 - 1) {
19766
19843
  first.value = Math.max(midPointIndex - buffer, 0);
19767
- } else if (direction === DOWN && midPointIndex >= first.value + buffer * 2) {
19844
+ } else if (direction === DOWN && midPointIndex >= first.value + buffer * 2 - 1) {
19768
19845
  first.value = Math.min(Math.max(0, midPointIndex - buffer), props.items.length - visibleItems.value);
19769
19846
  }
19770
19847
  lastScrollTop = rootEl.value.scrollTop;
19771
19848
  }
19849
+ function scrollToIndex(index) {
19850
+ if (!rootEl.value) return;
19851
+ const offset = calculateOffset(index);
19852
+ rootEl.value.scrollTop = offset;
19853
+ }
19772
19854
  const last = vue.computed(() => Math.min(props.items.length, first.value + visibleItems.value));
19773
19855
  const computedItems = vue.computed(() => props.items.slice(first.value, last.value));
19774
19856
  const paddingTop = vue.computed(() => calculateOffset(first.value));
@@ -19776,6 +19858,12 @@
19776
19858
  const {
19777
19859
  dimensionStyles
19778
19860
  } = useDimension(props);
19861
+ vue.onMounted(() => {
19862
+ if (!itemHeight.value) {
19863
+ // If itemHeight prop is not set, then calculate an estimated height from the average of inital items
19864
+ itemHeight.value = sizes.slice(first.value, last.value).reduce((curr, height) => curr + height, 0) / visibleItems.value;
19865
+ }
19866
+ });
19779
19867
  useRender(() => vue.createVNode("div", {
19780
19868
  "ref": rootEl,
19781
19869
  "class": "v-virtual-scroll",
@@ -19792,7 +19880,7 @@
19792
19880
  return vue.createVNode(VVirtualScrollItem, {
19793
19881
  "key": index,
19794
19882
  "dynamicHeight": !props.itemHeight,
19795
- "onUpdate:height": height => handleItemResize(item, height)
19883
+ "onUpdate:height": height => handleItemResize(index + first.value, height)
19796
19884
  }, {
19797
19885
  default: () => [(_slots$default = slots.default) == null ? void 0 : _slots$default.call(slots, {
19798
19886
  item,
@@ -19800,6 +19888,9 @@
19800
19888
  })]
19801
19889
  });
19802
19890
  })])]));
19891
+ return {
19892
+ scrollToIndex
19893
+ };
19803
19894
  }
19804
19895
  });
19805
19896
 
@@ -19942,6 +20033,7 @@
19942
20033
  VDataTableRow: VDataTableRow,
19943
20034
  VDataTableVirtual: VDataTableVirtual,
19944
20035
  VDataTableServer: VDataTableServer,
20036
+ VDataTableFooter: VDataTableFooter,
19945
20037
  VVirtualScroll: VVirtualScroll
19946
20038
  });
19947
20039
 
@@ -20157,7 +20249,7 @@
20157
20249
  locale
20158
20250
  };
20159
20251
  }
20160
- const version$1 = "3.1.2";
20252
+ const version$1 = "3.1.4";
20161
20253
  createVuetify$1.version = version$1;
20162
20254
 
20163
20255
  // Vue's inject() can only be used in setup
@@ -20170,7 +20262,7 @@
20170
20262
  }
20171
20263
  }
20172
20264
 
20173
- const version = "3.1.2";
20265
+ const version = "3.1.4";
20174
20266
 
20175
20267
  const createVuetify = function () {
20176
20268
  let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};