vuetify 3.8.8 → 3.8.10

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 (130) hide show
  1. package/LICENSE.md +1 -1
  2. package/dist/json/attributes.json +3413 -3405
  3. package/dist/json/importMap-labs.json +38 -38
  4. package/dist/json/importMap.json +146 -146
  5. package/dist/json/tags.json +2 -0
  6. package/dist/json/web-types.json +6357 -6339
  7. package/dist/vuetify-labs.cjs +210 -103
  8. package/dist/vuetify-labs.css +3832 -3823
  9. package/dist/vuetify-labs.d.ts +80 -58
  10. package/dist/vuetify-labs.esm.js +211 -104
  11. package/dist/vuetify-labs.esm.js.map +1 -1
  12. package/dist/vuetify-labs.js +210 -103
  13. package/dist/vuetify-labs.min.css +2 -2
  14. package/dist/vuetify.cjs +191 -83
  15. package/dist/vuetify.cjs.map +1 -1
  16. package/dist/vuetify.css +3244 -3235
  17. package/dist/vuetify.d.ts +70 -58
  18. package/dist/vuetify.esm.js +192 -84
  19. package/dist/vuetify.esm.js.map +1 -1
  20. package/dist/vuetify.js +191 -83
  21. package/dist/vuetify.js.map +1 -1
  22. package/dist/vuetify.min.css +2 -2
  23. package/dist/vuetify.min.js +1002 -993
  24. package/dist/vuetify.min.js.map +1 -1
  25. package/lib/components/VBtn/VBtn.css +3 -0
  26. package/lib/components/VBtn/VBtn.sass +3 -0
  27. package/lib/components/VBtnGroup/VBtnGroup.css +2 -1
  28. package/lib/components/VBtnGroup/VBtnGroup.sass +2 -1
  29. package/lib/components/VDataTable/VDataTable.css +6 -3
  30. package/lib/components/VDataTable/VDataTable.sass +4 -2
  31. package/lib/components/VDataTable/VDataTableColumn.js +1 -0
  32. package/lib/components/VDataTable/VDataTableColumn.js.map +1 -1
  33. package/lib/components/VDataTable/VDataTableFooter.js +3 -1
  34. package/lib/components/VDataTable/VDataTableFooter.js.map +1 -1
  35. package/lib/components/VDataTable/VDataTableHeaders.js +8 -1
  36. package/lib/components/VDataTable/VDataTableHeaders.js.map +1 -1
  37. package/lib/components/VDatePicker/VDatePicker.js +19 -13
  38. package/lib/components/VDatePicker/VDatePicker.js.map +1 -1
  39. package/lib/components/VDatePicker/VDatePickerMonth.js +2 -2
  40. package/lib/components/VDatePicker/VDatePickerMonth.js.map +1 -1
  41. package/lib/components/VDatePicker/VDatePickerYears.js +1 -3
  42. package/lib/components/VDatePicker/VDatePickerYears.js.map +1 -1
  43. package/lib/components/VField/VField.js +10 -2
  44. package/lib/components/VField/VField.js.map +1 -1
  45. package/lib/components/VFileInput/VFileInput.js +8 -3
  46. package/lib/components/VFileInput/VFileInput.js.map +1 -1
  47. package/lib/components/VList/VListChildren.js +4 -3
  48. package/lib/components/VList/VListChildren.js.map +1 -1
  49. package/lib/components/VList/VListGroup.d.ts +10 -0
  50. package/lib/components/VList/VListGroup.js +2 -2
  51. package/lib/components/VList/VListGroup.js.map +1 -1
  52. package/lib/components/VList/VListItem.css +2 -0
  53. package/lib/components/VList/VListItem.sass +2 -0
  54. package/lib/components/VList/_variables.scss +1 -0
  55. package/lib/components/VNumberInput/VNumberInput.d.ts +5 -0
  56. package/lib/components/VNumberInput/VNumberInput.js +7 -11
  57. package/lib/components/VNumberInput/VNumberInput.js.map +1 -1
  58. package/lib/components/VOtpInput/VOtpInput.js +22 -3
  59. package/lib/components/VOtpInput/VOtpInput.js.map +1 -1
  60. package/lib/components/VSelect/VSelect.js +6 -5
  61. package/lib/components/VSelect/VSelect.js.map +1 -1
  62. package/lib/components/VSlider/VSliderThumb.js +1 -1
  63. package/lib/components/VSlider/VSliderThumb.js.map +1 -1
  64. package/lib/components/VSpeedDial/VSpeedDial.css +1 -1
  65. package/lib/components/VSpeedDial/VSpeedDial.sass +3 -1
  66. package/lib/components/VTextField/VTextField.js +9 -8
  67. package/lib/components/VTextField/VTextField.js.map +1 -1
  68. package/lib/components/VTextarea/VTextarea.js +4 -4
  69. package/lib/components/VTextarea/VTextarea.js.map +1 -1
  70. package/lib/composables/autofocus.d.ts +7 -0
  71. package/lib/composables/autofocus.js +10 -0
  72. package/lib/composables/autofocus.js.map +1 -0
  73. package/lib/composables/date/adapters/vuetify.js +1 -1
  74. package/lib/composables/date/adapters/vuetify.js.map +1 -1
  75. package/lib/composables/date/date.d.ts +1 -4
  76. package/lib/composables/date/date.js +13 -14
  77. package/lib/composables/date/date.js.map +1 -1
  78. package/lib/composables/fileDrop.d.ts +4 -0
  79. package/lib/composables/fileDrop.js +50 -0
  80. package/lib/composables/fileDrop.js.map +1 -0
  81. package/lib/composables/group.js +1 -0
  82. package/lib/composables/group.js.map +1 -1
  83. package/lib/composables/hotkey.d.ts +9 -0
  84. package/lib/composables/hotkey.js +131 -0
  85. package/lib/composables/hotkey.js.map +1 -0
  86. package/lib/composables/icons.d.ts +6 -0
  87. package/lib/composables/icons.js.map +1 -1
  88. package/lib/composables/intersectionObserver.js +2 -2
  89. package/lib/composables/intersectionObserver.js.map +1 -1
  90. package/lib/composables/list-items.js +2 -2
  91. package/lib/composables/list-items.js.map +1 -1
  92. package/lib/composables/selectLink.js +2 -2
  93. package/lib/composables/selectLink.js.map +1 -1
  94. package/lib/composables/transition.js +3 -3
  95. package/lib/composables/transition.js.map +1 -1
  96. package/lib/entry-bundler.d.ts +0 -3
  97. package/lib/entry-bundler.js +1 -1
  98. package/lib/entry-bundler.js.map +1 -1
  99. package/lib/framework.d.ts +60 -58
  100. package/lib/framework.js +1 -1
  101. package/lib/framework.js.map +1 -1
  102. package/lib/iconsets/fa.js +3 -1
  103. package/lib/iconsets/fa.js.map +1 -1
  104. package/lib/iconsets/fa4.js +3 -1
  105. package/lib/iconsets/fa4.js.map +1 -1
  106. package/lib/iconsets/md.js +3 -1
  107. package/lib/iconsets/md.js.map +1 -1
  108. package/lib/iconsets/mdi-svg.js +3 -1
  109. package/lib/iconsets/mdi-svg.js.map +1 -1
  110. package/lib/labs/VColorInput/VColorInput.js +3 -8
  111. package/lib/labs/VColorInput/VColorInput.js.map +1 -1
  112. package/lib/labs/VDateInput/VDateInput.d.ts +5 -0
  113. package/lib/labs/VDateInput/VDateInput.js +7 -10
  114. package/lib/labs/VDateInput/VDateInput.js.map +1 -1
  115. package/lib/labs/VFileUpload/VFileUpload.js +7 -3
  116. package/lib/labs/VFileUpload/VFileUpload.js.map +1 -1
  117. package/lib/labs/VFileUpload/VFileUploadItem.js +1 -0
  118. package/lib/labs/VFileUpload/VFileUploadItem.js.map +1 -1
  119. package/lib/labs/VTimePicker/VTimePickerClock.js +3 -1
  120. package/lib/labs/VTimePicker/VTimePickerClock.js.map +1 -1
  121. package/lib/labs/VTreeview/VTreeviewChildren.js +2 -1
  122. package/lib/labs/VTreeview/VTreeviewChildren.js.map +1 -1
  123. package/lib/labs/VTreeview/VTreeviewGroup.d.ts +10 -0
  124. package/lib/labs/VTreeview/VTreeviewItem.js +1 -0
  125. package/lib/labs/VTreeview/VTreeviewItem.js.map +1 -1
  126. package/lib/labs/entry-bundler.d.ts +0 -3
  127. package/lib/util/helpers.d.ts +4 -1
  128. package/lib/util/helpers.js +7 -1
  129. package/lib/util/helpers.js.map +1 -1
  130. package/package.json +8 -8
package/dist/vuetify.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Vuetify v3.8.8
2
+ * Vuetify v3.8.10
3
3
  * Forged by John Leider
4
4
  * Released under the MIT License.
5
5
  */
@@ -530,13 +530,19 @@
530
530
  return cleanText;
531
531
  }
532
532
  function camelizeProps(props) {
533
- if (!props) return;
534
533
  const out = {};
535
534
  for (const prop in props) {
536
535
  out[vue.camelize(prop)] = props[prop];
537
536
  }
538
537
  return out;
539
538
  }
539
+ function onlyDefinedProps(props) {
540
+ const booleanAttributes = ['checked', 'disabled'];
541
+ return Object.fromEntries(Object.entries(props).filter(_ref => {
542
+ let [key, v] = _ref;
543
+ return booleanAttributes.includes(key) ? !!v : v !== undefined;
544
+ }));
545
+ }
540
546
 
541
547
  // Utilities
542
548
  const block = ['top', 'bottom'];
@@ -861,7 +867,7 @@
861
867
  // WoB should always return negative value.
862
868
 
863
869
  const SAPC = (Ybg ** revBG - Ytxt ** revTXT) * scaleWoB;
864
- outputContrast = SAPC > -1e-3 ? 0.0 : SAPC > -0.078 ? SAPC - SAPC * loConFactor * loConOffset : SAPC + loConOffset;
870
+ outputContrast = SAPC > -loClip ? 0.0 : SAPC > -loConThresh ? SAPC - SAPC * loConFactor * loConOffset : SAPC + loConOffset;
865
871
  }
866
872
  return outputContrast * 100;
867
873
  }
@@ -3813,10 +3819,10 @@
3813
3819
  } = isObject(transition) ? transition : {};
3814
3820
  let transitionProps;
3815
3821
  if (isObject(transition)) {
3816
- transitionProps = vue.mergeProps(customProps, JSON.parse(JSON.stringify({
3822
+ transitionProps = vue.mergeProps(customProps, onlyDefinedProps({
3817
3823
  disabled,
3818
3824
  group
3819
- })), rest);
3825
+ }), rest);
3820
3826
  } else {
3821
3827
  transitionProps = vue.mergeProps({
3822
3828
  name: disabled || !transition ? '' : transition
@@ -4885,6 +4891,7 @@
4885
4891
  } else {
4886
4892
  const isSelected = selected.value.includes(id);
4887
4893
  if (props.mandatory && isSelected) return;
4894
+ if (!isSelected && !value) return;
4888
4895
  selected.value = value ?? !isSelected ? [id] : [];
4889
4896
  }
4890
4897
  }
@@ -5110,7 +5117,7 @@
5110
5117
  const observer = new IntersectionObserver(entries => {
5111
5118
  isIntersecting.value = !!entries.find(entry => entry.isIntersecting);
5112
5119
  }, options);
5113
- vue.onBeforeUnmount(() => {
5120
+ vue.onScopeDispose(() => {
5114
5121
  observer.disconnect();
5115
5122
  });
5116
5123
  vue.watch(intersectionRef, (newValue, oldValue) => {
@@ -5641,9 +5648,9 @@
5641
5648
 
5642
5649
  function useSelectLink(link, select) {
5643
5650
  vue.watch(() => link.isActive?.value, isActive => {
5644
- if (link.isLink.value && isActive && select) {
5651
+ if (link.isLink.value && isActive != null && select) {
5645
5652
  vue.nextTick(() => {
5646
- select(true);
5653
+ select(isActive);
5647
5654
  });
5648
5655
  }
5649
5656
  }, {
@@ -9257,6 +9264,7 @@
9257
9264
  type: IconValue,
9258
9265
  default: '$expand'
9259
9266
  },
9267
+ rawId: [String, Number],
9260
9268
  prependIcon: IconValue,
9261
9269
  appendIcon: IconValue,
9262
9270
  fluid: Boolean,
@@ -9278,13 +9286,12 @@
9278
9286
  open,
9279
9287
  id: _id
9280
9288
  } = useNestedItem(() => props.value, true);
9281
- const id = vue.computed(() => `v-list-group--id-${String(_id.value)}`);
9289
+ const id = vue.computed(() => `v-list-group--id-${String(props.rawId ?? _id.value)}`);
9282
9290
  const list = useList();
9283
9291
  const {
9284
9292
  isBooted
9285
9293
  } = useSsrBoot();
9286
9294
  function onClick(e) {
9287
- e.stopPropagation();
9288
9295
  if (['INPUT', 'TEXTAREA'].includes(e.target?.tagName)) return;
9289
9296
  open(!isOpen.value, e);
9290
9297
  }
@@ -9802,9 +9809,10 @@
9802
9809
  }) : undefined
9803
9810
  };
9804
9811
  const listGroupProps = VListGroup.filterProps(itemProps);
9805
- return children ? vue.createVNode(VListGroup, vue.mergeProps({
9806
- "value": itemProps?.value
9807
- }, listGroupProps), {
9812
+ return children ? vue.createVNode(VListGroup, vue.mergeProps(listGroupProps, {
9813
+ "value": props.returnObject ? item : itemProps?.value,
9814
+ "rawId": itemProps?.value
9815
+ }), {
9808
9816
  activator: _ref3 => {
9809
9817
  let {
9810
9818
  props: activatorProps
@@ -9868,7 +9876,7 @@
9868
9876
  const _props = {
9869
9877
  title,
9870
9878
  value,
9871
- ...camelizeProps(itemProps)
9879
+ ...itemProps
9872
9880
  };
9873
9881
  return {
9874
9882
  title: String(_props.title ?? ''),
@@ -12228,7 +12236,11 @@
12228
12236
  default: slots.loader
12229
12237
  }), hasPrepend && vue.createElementVNode("div", {
12230
12238
  "key": "prepend",
12231
- "class": "v-field__prepend-inner"
12239
+ "class": "v-field__prepend-inner",
12240
+ "onMousedown": e => {
12241
+ e.preventDefault();
12242
+ e.stopPropagation();
12243
+ }
12232
12244
  }, [props.prependInnerIcon && vue.createVNode(InputIcon, {
12233
12245
  "key": "prepend-icon",
12234
12246
  "name": "prependInner",
@@ -12297,7 +12309,11 @@
12297
12309
  })]), [[vue.vShow, props.dirty]])]
12298
12310
  }), hasAppend && vue.createElementVNode("div", {
12299
12311
  "key": "append",
12300
- "class": "v-field__append-inner"
12312
+ "class": "v-field__append-inner",
12313
+ "onMousedown": e => {
12314
+ e.preventDefault();
12315
+ e.stopPropagation();
12316
+ }
12301
12317
  }, [slots['append-inner']?.(slotProps.value), props.appendInnerIcon && vue.createVNode(InputIcon, {
12302
12318
  "key": "append-icon",
12303
12319
  "name": "appendInner",
@@ -12332,6 +12348,16 @@
12332
12348
  }
12333
12349
  });
12334
12350
 
12351
+ function useAutofocus(props) {
12352
+ function onIntersect(isIntersecting, entries) {
12353
+ if (!props.autofocus || !isIntersecting) return;
12354
+ entries[0].target?.focus?.();
12355
+ }
12356
+ return {
12357
+ onIntersect
12358
+ };
12359
+ }
12360
+
12335
12361
  // Types
12336
12362
 
12337
12363
  const activeTypes = ['color', 'file', 'time', 'date', 'datetime-local', 'week', 'month'];
@@ -12378,6 +12404,9 @@
12378
12404
  focus,
12379
12405
  blur
12380
12406
  } = useFocus(props);
12407
+ const {
12408
+ onIntersect
12409
+ } = useAutofocus(props);
12381
12410
  const counterValue = vue.computed(() => {
12382
12411
  return typeof props.counterValue === 'function' ? props.counterValue(model.value) : typeof props.counterValue === 'number' ? props.counterValue : (model.value ?? '').toString().length;
12383
12412
  });
@@ -12387,19 +12416,17 @@
12387
12416
  return props.counter;
12388
12417
  });
12389
12418
  const isPlainOrUnderlined = vue.computed(() => ['plain', 'underlined'].includes(props.variant));
12390
- function onIntersect(isIntersecting, entries) {
12391
- if (!props.autofocus || !isIntersecting) return;
12392
- entries[0].target?.focus?.();
12393
- }
12394
12419
  const vInputRef = vue.ref();
12395
12420
  const vFieldRef = vue.ref();
12396
12421
  const inputRef = vue.ref();
12397
12422
  const isActive = vue.computed(() => activeTypes.includes(props.type) || props.persistentPlaceholder || isFocused.value || props.active);
12398
12423
  function onFocus() {
12399
- if (inputRef.value !== document.activeElement) {
12400
- inputRef.value?.focus();
12401
- }
12402
12424
  if (!isFocused.value) focus();
12425
+ vue.nextTick(() => {
12426
+ if (inputRef.value !== document.activeElement) {
12427
+ inputRef.value?.focus();
12428
+ }
12429
+ });
12403
12430
  }
12404
12431
  function onControlMousedown(e) {
12405
12432
  emit('mousedown:control', e);
@@ -12408,7 +12435,6 @@
12408
12435
  e.preventDefault();
12409
12436
  }
12410
12437
  function onControlClick(e) {
12411
- onFocus();
12412
12438
  emit('click:control', e);
12413
12439
  }
12414
12440
  function onClear(e, reset) {
@@ -13334,6 +13360,7 @@
13334
13360
  index,
13335
13361
  itemRef
13336
13362
  } = _ref2;
13363
+ const camelizedProps = camelizeProps(item.props);
13337
13364
  const itemProps = vue.mergeProps(item.props, {
13338
13365
  ref: itemRef,
13339
13366
  key: item.value,
@@ -13355,10 +13382,10 @@
13355
13382
  "modelValue": isSelected,
13356
13383
  "ripple": false,
13357
13384
  "tabindex": "-1"
13358
- }, null) : undefined, item.props.prependAvatar && vue.createVNode(VAvatar, {
13359
- "image": item.props.prependAvatar
13360
- }, null), item.props.prependIcon && vue.createVNode(VIcon, {
13361
- "icon": item.props.prependIcon
13385
+ }, null) : undefined, camelizedProps.prependAvatar && vue.createVNode(VAvatar, {
13386
+ "image": camelizedProps.prependAvatar
13387
+ }, null), camelizedProps.prependIcon && vue.createVNode(VIcon, {
13388
+ "icon": camelizedProps.prependIcon
13362
13389
  }, null)]);
13363
13390
  }
13364
13391
  });
@@ -16537,7 +16564,7 @@
16537
16564
  default: () => [vue.withDirectives(vue.createElementVNode("div", {
16538
16565
  "class": "v-slider-thumb__label-container"
16539
16566
  }, [vue.createElementVNode("div", {
16540
- "class": vue.normalizeClass(['v-slider-thumb__label'])
16567
+ "class": vue.normalizeClass(['v-slider-thumb__label', textColorClasses.value])
16541
16568
  }, [vue.createElementVNode("div", null, [slots['thumb-label']?.({
16542
16569
  modelValue: props.modelValue
16543
16570
  }) ?? props.modelValue.toFixed(step.value ? decimals.value : 1)])])]), [[vue.vShow, thumbLabel.value && props.focused || thumbLabel.value === 'always']])]
@@ -17806,7 +17833,7 @@
17806
17833
  const yearStart = new Date(year, 0, 1);
17807
17834
  const size = firstWeekSize(year);
17808
17835
  const d1w1 = size >= minWeekSize ? addDays(yearStart, size - 7) : addDays(yearStart, size);
17809
- return 1 + getDiff(date, d1w1, 'weeks');
17836
+ return 1 + getDiff(endOfDay(date), startOfDay(d1w1), 'weeks');
17810
17837
  }
17811
17838
  function getDate(date) {
17812
17839
  return date.getDate();
@@ -18109,6 +18136,18 @@
18109
18136
  instance: createInstance(_options, locale)
18110
18137
  };
18111
18138
  }
18139
+ function createDateRange(adapter, start, stop) {
18140
+ const diff = adapter.getDiff(adapter.endOfDay(stop ?? start), adapter.startOfDay(start), 'days');
18141
+ const datesInRange = [start];
18142
+ for (let i = 1; i < diff; i++) {
18143
+ const nextDate = adapter.addDays(start, i);
18144
+ datesInRange.push(nextDate);
18145
+ }
18146
+ if (stop) {
18147
+ datesInRange.push(adapter.endOfDay(stop));
18148
+ }
18149
+ return datesInRange;
18150
+ }
18112
18151
  function createInstance(options, locale) {
18113
18152
  const instance = vue.reactive(typeof options.adapter === 'function'
18114
18153
  // eslint-disable-next-line new-cap
@@ -18119,20 +18158,7 @@
18119
18158
  vue.watch(locale.current, value => {
18120
18159
  instance.locale = options.locale[value] ?? value ?? instance.locale;
18121
18160
  });
18122
- return Object.assign(instance, {
18123
- createDateRange(start, stop) {
18124
- const diff = instance.getDiff(stop ?? start, start, 'days');
18125
- const datesInRange = [start];
18126
- for (let i = 1; i < diff; i++) {
18127
- const nextDate = instance.addDays(start, i);
18128
- datesInRange.push(nextDate);
18129
- }
18130
- if (stop) {
18131
- datesInRange.push(instance.endOfDay(stop));
18132
- }
18133
- return datesInRange;
18134
- }
18135
- });
18161
+ return instance;
18136
18162
  }
18137
18163
  function useDate() {
18138
18164
  const options = vue.inject(DateOptionsSymbol);
@@ -20221,7 +20247,9 @@
20221
20247
  "class": "v-data-table-footer"
20222
20248
  }, [slots.prepend?.(), vue.createElementVNode("div", {
20223
20249
  "class": "v-data-table-footer__items-per-page"
20224
- }, [vue.createElementVNode("span", null, [t(props.itemsPerPageText)]), vue.createVNode(VSelect, {
20250
+ }, [vue.createElementVNode("span", {
20251
+ "aria-label": t(props.itemsPerPageText)
20252
+ }, [t(props.itemsPerPageText)]), vue.createVNode(VSelect, {
20225
20253
  "items": itemsPerPageOptions.value,
20226
20254
  "modelValue": itemsPerPage.value,
20227
20255
  "onUpdate:modelValue": v => setItemsPerPage(Number(v)),
@@ -20273,6 +20301,7 @@
20273
20301
  } = _ref;
20274
20302
  const Tag = props.tag ?? 'td';
20275
20303
  return vue.createVNode(Tag, {
20304
+ "tabindex": "0",
20276
20305
  "class": vue.normalizeClass(['v-data-table__td', {
20277
20306
  'v-data-table-column--fixed': props.fixed,
20278
20307
  'v-data-table-column--last-fixed': props.lastFixed,
@@ -20617,6 +20646,11 @@
20617
20646
  top: props.sticky || props.fixedHeader ? `calc(var(--v-table-header-height) * ${y})` : undefined
20618
20647
  };
20619
20648
  }
20649
+ function handleEnterKeyPress(event, column) {
20650
+ if (event.key === 'Enter' && !props.disableSort) {
20651
+ toggleSort(column);
20652
+ }
20653
+ }
20620
20654
  function getSortIcon(column) {
20621
20655
  const item = sortBy.value.find(item => item.key === column.key);
20622
20656
  if (!item) return props.sortAscIcon;
@@ -20673,7 +20707,9 @@
20673
20707
  "nowrap": column.nowrap,
20674
20708
  "lastFixed": column.lastFixed,
20675
20709
  "noPadding": noPadding
20676
- }, headerProps), {
20710
+ }, headerProps, {
20711
+ "onKeydown": event => column.sortable && handleEnterKeyPress(event, column)
20712
+ }), {
20677
20713
  default: () => {
20678
20714
  const columnSlotName = `header.${column.key}`;
20679
20715
  const columnSlotProps = {
@@ -22526,7 +22562,7 @@
22526
22562
  } else {
22527
22563
  rangeStop.value = adapter.endOfDay(_value);
22528
22564
  }
22529
- model.value = adapter.createDateRange(rangeStart.value, rangeStop.value);
22565
+ model.value = createDateRange(adapter, rangeStart.value, rangeStop.value);
22530
22566
  } else {
22531
22567
  rangeStart.value = value;
22532
22568
  rangeStop.value = undefined;
@@ -22745,9 +22781,7 @@
22745
22781
  const yearRef = templateRef();
22746
22782
  vue.onMounted(async () => {
22747
22783
  await vue.nextTick();
22748
- yearRef.el?.scrollIntoView({
22749
- block: 'center'
22750
- });
22784
+ yearRef.el?.focus();
22751
22785
  });
22752
22786
  function isYearAllowed(year) {
22753
22787
  if (Array.isArray(props.allowedYears) && props.allowedYears.length) {
@@ -22883,8 +22917,16 @@
22883
22917
  return value && adapter.isValid(value) ? value : today;
22884
22918
  });
22885
22919
  const headerColor = vue.toRef(() => props.headerColor ?? props.color);
22886
- const month = vue.ref(Number(props.month ?? adapter.getMonth(adapter.startOfMonth(internal.value))));
22887
- const year = vue.ref(Number(props.year ?? adapter.getYear(adapter.startOfYear(adapter.setMonth(internal.value, month.value)))));
22920
+ const _month = useProxiedModel(props, 'month');
22921
+ const month = vue.computed({
22922
+ get: () => Number(_month.value ?? adapter.getMonth(adapter.startOfMonth(internal.value))),
22923
+ set: v => _month.value = v
22924
+ });
22925
+ const _year = useProxiedModel(props, 'year');
22926
+ const year = vue.computed({
22927
+ get: () => Number(_year.value ?? adapter.getYear(adapter.startOfYear(adapter.setMonth(internal.value, month.value)))),
22928
+ set: v => _year.value = v
22929
+ });
22888
22930
  const isReversing = vue.shallowRef(false);
22889
22931
  const header = vue.computed(() => {
22890
22932
  if (props.multiple && model.value.length > 1) {
@@ -22968,9 +23010,9 @@
22968
23010
  } else {
22969
23011
  year.value++;
22970
23012
  month.value = 0;
22971
- onUpdateYear(year.value);
23013
+ onUpdateYear();
22972
23014
  }
22973
- onUpdateMonth(month.value);
23015
+ onUpdateMonth();
22974
23016
  }
22975
23017
  function onClickPrev() {
22976
23018
  if (month.value > 0) {
@@ -22978,9 +23020,9 @@
22978
23020
  } else {
22979
23021
  year.value--;
22980
23022
  month.value = 11;
22981
- onUpdateYear(year.value);
23023
+ onUpdateYear();
22982
23024
  }
22983
- onUpdateMonth(month.value);
23025
+ onUpdateMonth();
22984
23026
  }
22985
23027
  function onClickDate() {
22986
23028
  viewMode.value = 'month';
@@ -22991,13 +23033,11 @@
22991
23033
  function onClickYear() {
22992
23034
  viewMode.value = viewMode.value === 'year' ? 'month' : 'year';
22993
23035
  }
22994
- function onUpdateMonth(value) {
23036
+ function onUpdateMonth() {
22995
23037
  if (viewMode.value === 'months') onClickMonth();
22996
- emit('update:month', value);
22997
23038
  }
22998
- function onUpdateYear(value) {
23039
+ function onUpdateYear() {
22999
23040
  if (viewMode.value === 'year') onClickYear();
23000
- emit('update:year', value);
23001
23041
  }
23002
23042
  vue.watch(model, (val, oldVal) => {
23003
23043
  const arrBefore = wrapInArray(oldVal);
@@ -23009,11 +23049,11 @@
23009
23049
  const newYear = adapter.getYear(after);
23010
23050
  if (newMonth !== month.value) {
23011
23051
  month.value = newMonth;
23012
- onUpdateMonth(month.value);
23052
+ onUpdateMonth();
23013
23053
  }
23014
23054
  if (newYear !== year.value) {
23015
23055
  year.value = newYear;
23016
- onUpdateYear(year.value);
23056
+ onUpdateYear();
23017
23057
  }
23018
23058
  isReversing.value = adapter.isBefore(before, after);
23019
23059
  });
@@ -23613,6 +23653,56 @@
23613
23653
 
23614
23654
  // Types
23615
23655
 
23656
+ function useFileDrop() {
23657
+ function hasFilesOrFolders(e) {
23658
+ const entries = [...(e.dataTransfer?.items ?? [])].filter(x => x.kind === 'file').map(x => x.webkitGetAsEntry()).filter(Boolean);
23659
+ return entries.length > 0 || [...(e.dataTransfer?.files ?? [])].length > 0;
23660
+ }
23661
+ async function handleDrop(e) {
23662
+ const result = [];
23663
+ const entries = [...(e.dataTransfer?.items ?? [])].filter(x => x.kind === 'file').map(x => x.webkitGetAsEntry()).filter(Boolean);
23664
+ if (entries.length) {
23665
+ for (const entry of entries) {
23666
+ const files = await traverseFileTree(entry, appendIfDirectory('.', entry));
23667
+ result.push(...files.map(x => x.file));
23668
+ }
23669
+ } else {
23670
+ result.push(...[...(e.dataTransfer?.files ?? [])]);
23671
+ }
23672
+ return result;
23673
+ }
23674
+ return {
23675
+ handleDrop,
23676
+ hasFilesOrFolders
23677
+ };
23678
+ }
23679
+ function traverseFileTree(item) {
23680
+ let path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
23681
+ return new Promise((resolve, reject) => {
23682
+ if (item.isFile) {
23683
+ const fileEntry = item;
23684
+ fileEntry.file(file => resolve([{
23685
+ file,
23686
+ path
23687
+ }]), reject);
23688
+ } else if (item.isDirectory) {
23689
+ const directoryReader = item.createReader();
23690
+ directoryReader.readEntries(async entries => {
23691
+ const files = [];
23692
+ for (const entry of entries) {
23693
+ files.push(...(await traverseFileTree(entry, appendIfDirectory(path, entry))));
23694
+ }
23695
+ resolve(files);
23696
+ });
23697
+ }
23698
+ });
23699
+ }
23700
+ function appendIfDirectory(path, item) {
23701
+ return item.isDirectory ? `${path}/${item.name}` : path;
23702
+ }
23703
+
23704
+ // Types
23705
+
23616
23706
  const makeVFileInputProps = propsFactory({
23617
23707
  chips: Boolean,
23618
23708
  counter: Boolean,
@@ -23697,6 +23787,10 @@
23697
23787
  const isActive = vue.toRef(() => isFocused.value || props.active);
23698
23788
  const isPlainOrUnderlined = vue.computed(() => ['plain', 'underlined'].includes(props.variant));
23699
23789
  const isDragging = vue.shallowRef(false);
23790
+ const {
23791
+ handleDrop,
23792
+ hasFilesOrFolders
23793
+ } = useFileDrop();
23700
23794
  function onFocus() {
23701
23795
  if (inputRef.value !== document.activeElement) {
23702
23796
  inputRef.value?.focus();
@@ -23730,13 +23824,13 @@
23730
23824
  e.preventDefault();
23731
23825
  isDragging.value = false;
23732
23826
  }
23733
- function onDrop(e) {
23827
+ async function onDrop(e) {
23734
23828
  e.preventDefault();
23735
23829
  e.stopImmediatePropagation();
23736
23830
  isDragging.value = false;
23737
- if (!e.dataTransfer?.files?.length || !inputRef.value) return;
23831
+ if (!inputRef.value || !hasFilesOrFolders(e)) return;
23738
23832
  const dataTransfer = new DataTransfer();
23739
- for (const file of e.dataTransfer.files) {
23833
+ for (const file of await handleDrop(e)) {
23740
23834
  dataTransfer.items.add(file);
23741
23835
  }
23742
23836
  inputRef.value.files = dataTransfer.files;
@@ -25167,6 +25261,7 @@
25167
25261
  ...makeVNumberInputProps()
25168
25262
  },
25169
25263
  emits: {
25264
+ 'update:focused': val => true,
25170
25265
  'update:modelValue': val => true
25171
25266
  },
25172
25267
  setup(props, _ref) {
@@ -25182,11 +25277,7 @@
25182
25277
  });
25183
25278
  const form = useForm(props);
25184
25279
  const controlsDisabled = vue.computed(() => form.isDisabled.value || form.isReadonly.value);
25185
- const {
25186
- isFocused,
25187
- focus,
25188
- blur
25189
- } = useFocus(props);
25280
+ const isFocused = vue.shallowRef(props.focused);
25190
25281
  function correctPrecision(val) {
25191
25282
  let precision = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : props.precision;
25192
25283
  const fixed = precision == null ? String(val) : val.toFixed(precision);
@@ -25371,11 +25462,9 @@
25371
25462
  inputText.value = model.value.toString();
25372
25463
  }
25373
25464
  function onFocus() {
25374
- focus();
25375
25465
  trimDecimalZeros();
25376
25466
  }
25377
25467
  function onBlur() {
25378
- blur();
25379
25468
  clampModel();
25380
25469
  }
25381
25470
  useRender(() => {
@@ -25468,9 +25557,12 @@
25468
25557
  }, null)]) : props.reverse && controlVariant.value !== 'hidden' ? vue.createElementVNode(vue.Fragment, null, [controlNode(), dividerNode()]) : undefined;
25469
25558
  const hasPrependInner = slots['prepend-inner'] || prependInnerControl;
25470
25559
  return vue.createVNode(VTextField, vue.mergeProps({
25471
- "ref": vTextFieldRef,
25560
+ "ref": vTextFieldRef
25561
+ }, textFieldProps, {
25472
25562
  "modelValue": inputText.value,
25473
25563
  "onUpdate:modelValue": $event => inputText.value = $event,
25564
+ "focused": isFocused.value,
25565
+ "onUpdate:focused": $event => isFocused.value = $event,
25474
25566
  "validationValue": model.value,
25475
25567
  "onBeforeinput": onBeforeinput,
25476
25568
  "onFocus": onFocus,
@@ -25483,8 +25575,7 @@
25483
25575
  'v-number-input--reverse': props.reverse,
25484
25576
  'v-number-input--split': controlVariant.value === 'split',
25485
25577
  'v-number-input--stacked': controlVariant.value === 'stacked'
25486
- }, props.class]
25487
- }, textFieldProps, {
25578
+ }, props.class],
25488
25579
  "style": props.style,
25489
25580
  "inputmode": "decimal"
25490
25581
  }), {
@@ -25570,6 +25661,21 @@
25570
25661
  const contentRef = vue.ref();
25571
25662
  const inputRef = vue.ref([]);
25572
25663
  const current = vue.computed(() => inputRef.value[focusIndex.value]);
25664
+ const intersectScope = vue.effectScope();
25665
+ intersectScope.run(() => {
25666
+ const {
25667
+ intersectionRef,
25668
+ isIntersecting
25669
+ } = useIntersectionObserver();
25670
+ vue.watch(isIntersecting, v => {
25671
+ if (!v) return;
25672
+ intersectionRef.value?.focus();
25673
+ intersectScope.stop();
25674
+ });
25675
+ vue.watchEffect(() => {
25676
+ intersectionRef.value = inputRef.value[0];
25677
+ });
25678
+ });
25573
25679
  function onInput() {
25574
25680
  // The maxlength attribute doesn't work for the number type input, so the text type is used.
25575
25681
  // The following logic simulates the behavior of a number input.
@@ -25619,7 +25725,7 @@
25619
25725
  function onPaste(index, e) {
25620
25726
  e.preventDefault();
25621
25727
  e.stopPropagation();
25622
- const clipboardText = e?.clipboardData?.getData('Text').slice(0, length.value) ?? '';
25728
+ const clipboardText = e?.clipboardData?.getData('Text').trim().slice(0, length.value) ?? '';
25623
25729
  if (isValidNumber(clipboardText)) return;
25624
25730
  model.value = clipboardText.split('');
25625
25731
  inputRef.value?.[index].blur();
@@ -25651,7 +25757,10 @@
25651
25757
  scoped: true
25652
25758
  });
25653
25759
  vue.watch(model, val => {
25654
- if (val.length === length.value) emit('finish', val.join(''));
25760
+ if (val.length === length.value) {
25761
+ focusIndex.value = length.value - 1;
25762
+ emit('finish', val.join(''));
25763
+ }
25655
25764
  }, {
25656
25765
  deep: true
25657
25766
  });
@@ -28313,6 +28422,9 @@
28313
28422
  focus,
28314
28423
  blur
28315
28424
  } = useFocus(props);
28425
+ const {
28426
+ onIntersect
28427
+ } = useAutofocus(props);
28316
28428
  const counterValue = vue.computed(() => {
28317
28429
  return typeof props.counterValue === 'function' ? props.counterValue(model.value) : (model.value || '').toString().length;
28318
28430
  });
@@ -28321,10 +28433,6 @@
28321
28433
  if (!props.counter || typeof props.counter !== 'number' && typeof props.counter !== 'string') return undefined;
28322
28434
  return props.counter;
28323
28435
  });
28324
- function onIntersect(isIntersecting, entries) {
28325
- if (!props.autofocus || !isIntersecting) return;
28326
- entries[0].target?.focus?.();
28327
- }
28328
28436
  const vInputRef = vue.ref();
28329
28437
  const vFieldRef = vue.ref();
28330
28438
  const controlHeight = vue.shallowRef('');
@@ -29404,7 +29512,7 @@
29404
29512
  };
29405
29513
  });
29406
29514
  }
29407
- const version$1 = "3.8.8";
29515
+ const version$1 = "3.8.10";
29408
29516
  createVuetify$1.version = version$1;
29409
29517
 
29410
29518
  // Vue's inject() can only be used in setup
@@ -29429,7 +29537,7 @@
29429
29537
  ...options
29430
29538
  });
29431
29539
  };
29432
- const version = "3.8.8";
29540
+ const version = "3.8.10";
29433
29541
  createVuetify.version = version;
29434
29542
 
29435
29543
  exports.blueprints = index;