vuetify 3.8.9 → 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 (83) hide show
  1. package/dist/json/attributes.json +3370 -3362
  2. package/dist/json/importMap-labs.json +24 -24
  3. package/dist/json/importMap.json +160 -160
  4. package/dist/json/tags.json +2 -0
  5. package/dist/json/web-types.json +5992 -5974
  6. package/dist/vuetify-labs.cjs +89 -40
  7. package/dist/vuetify-labs.css +5399 -5390
  8. package/dist/vuetify-labs.d.ts +69 -59
  9. package/dist/vuetify-labs.esm.js +89 -40
  10. package/dist/vuetify-labs.esm.js.map +1 -1
  11. package/dist/vuetify-labs.js +89 -40
  12. package/dist/vuetify-labs.min.css +2 -2
  13. package/dist/vuetify.cjs +83 -39
  14. package/dist/vuetify.cjs.map +1 -1
  15. package/dist/vuetify.css +5526 -5517
  16. package/dist/vuetify.d.ts +64 -59
  17. package/dist/vuetify.esm.js +83 -39
  18. package/dist/vuetify.esm.js.map +1 -1
  19. package/dist/vuetify.js +83 -39
  20. package/dist/vuetify.js.map +1 -1
  21. package/dist/vuetify.min.css +2 -2
  22. package/dist/vuetify.min.js +390 -387
  23. package/dist/vuetify.min.js.map +1 -1
  24. package/lib/components/VBtn/VBtn.css +3 -0
  25. package/lib/components/VBtn/VBtn.sass +3 -0
  26. package/lib/components/VBtnGroup/VBtnGroup.css +2 -1
  27. package/lib/components/VBtnGroup/VBtnGroup.sass +2 -1
  28. package/lib/components/VDataTable/VDataTable.css +6 -3
  29. package/lib/components/VDataTable/VDataTable.sass +4 -2
  30. package/lib/components/VDatePicker/VDatePicker.js +19 -13
  31. package/lib/components/VDatePicker/VDatePicker.js.map +1 -1
  32. package/lib/components/VDatePicker/VDatePickerYears.js +1 -3
  33. package/lib/components/VDatePicker/VDatePickerYears.js.map +1 -1
  34. package/lib/components/VField/VField.js +10 -2
  35. package/lib/components/VField/VField.js.map +1 -1
  36. package/lib/components/VList/VListChildren.js +4 -3
  37. package/lib/components/VList/VListChildren.js.map +1 -1
  38. package/lib/components/VList/VListGroup.d.ts +10 -0
  39. package/lib/components/VList/VListGroup.js +2 -2
  40. package/lib/components/VList/VListGroup.js.map +1 -1
  41. package/lib/components/VList/VListItem.css +2 -0
  42. package/lib/components/VList/VListItem.sass +2 -0
  43. package/lib/components/VList/_variables.scss +1 -0
  44. package/lib/components/VOtpInput/VOtpInput.js +17 -1
  45. package/lib/components/VOtpInput/VOtpInput.js.map +1 -1
  46. package/lib/components/VSpeedDial/VSpeedDial.css +1 -1
  47. package/lib/components/VSpeedDial/VSpeedDial.sass +3 -1
  48. package/lib/components/VTextField/VTextField.js +4 -4
  49. package/lib/components/VTextField/VTextField.js.map +1 -1
  50. package/lib/components/VTextarea/VTextarea.js +4 -4
  51. package/lib/components/VTextarea/VTextarea.js.map +1 -1
  52. package/lib/composables/autofocus.d.ts +7 -0
  53. package/lib/composables/autofocus.js +10 -0
  54. package/lib/composables/autofocus.js.map +1 -0
  55. package/lib/composables/group.js +1 -0
  56. package/lib/composables/group.js.map +1 -1
  57. package/lib/composables/hotkey.d.ts +9 -0
  58. package/lib/composables/hotkey.js +131 -0
  59. package/lib/composables/hotkey.js.map +1 -0
  60. package/lib/composables/intersectionObserver.js +2 -2
  61. package/lib/composables/intersectionObserver.js.map +1 -1
  62. package/lib/composables/selectLink.js +2 -2
  63. package/lib/composables/selectLink.js.map +1 -1
  64. package/lib/composables/transition.js +3 -3
  65. package/lib/composables/transition.js.map +1 -1
  66. package/lib/entry-bundler.js +1 -1
  67. package/lib/entry-bundler.js.map +1 -1
  68. package/lib/framework.d.ts +59 -59
  69. package/lib/framework.js +1 -1
  70. package/lib/framework.js.map +1 -1
  71. package/lib/labs/VFileUpload/VFileUploadItem.js +1 -0
  72. package/lib/labs/VFileUpload/VFileUploadItem.js.map +1 -1
  73. package/lib/labs/VTimePicker/VTimePickerClock.js +3 -1
  74. package/lib/labs/VTimePicker/VTimePickerClock.js.map +1 -1
  75. package/lib/labs/VTreeview/VTreeviewChildren.js +2 -1
  76. package/lib/labs/VTreeview/VTreeviewChildren.js.map +1 -1
  77. package/lib/labs/VTreeview/VTreeviewGroup.d.ts +10 -0
  78. package/lib/labs/VTreeview/VTreeviewItem.js +1 -0
  79. package/lib/labs/VTreeview/VTreeviewItem.js.map +1 -1
  80. package/lib/util/helpers.d.ts +3 -0
  81. package/lib/util/helpers.js +7 -0
  82. package/lib/util/helpers.js.map +1 -1
  83. package/package.json +8 -8
package/dist/vuetify.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Vuetify v3.8.9
2
+ * Vuetify v3.8.10
3
3
  * Forged by John Leider
4
4
  * Released under the MIT License.
5
5
  */
@@ -536,6 +536,13 @@
536
536
  }
537
537
  return out;
538
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
+ }
539
546
 
540
547
  // Utilities
541
548
  const block = ['top', 'bottom'];
@@ -860,7 +867,7 @@
860
867
  // WoB should always return negative value.
861
868
 
862
869
  const SAPC = (Ybg ** revBG - Ytxt ** revTXT) * scaleWoB;
863
- 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;
864
871
  }
865
872
  return outputContrast * 100;
866
873
  }
@@ -3812,10 +3819,10 @@
3812
3819
  } = isObject(transition) ? transition : {};
3813
3820
  let transitionProps;
3814
3821
  if (isObject(transition)) {
3815
- transitionProps = vue.mergeProps(customProps, JSON.parse(JSON.stringify({
3822
+ transitionProps = vue.mergeProps(customProps, onlyDefinedProps({
3816
3823
  disabled,
3817
3824
  group
3818
- })), rest);
3825
+ }), rest);
3819
3826
  } else {
3820
3827
  transitionProps = vue.mergeProps({
3821
3828
  name: disabled || !transition ? '' : transition
@@ -4884,6 +4891,7 @@
4884
4891
  } else {
4885
4892
  const isSelected = selected.value.includes(id);
4886
4893
  if (props.mandatory && isSelected) return;
4894
+ if (!isSelected && !value) return;
4887
4895
  selected.value = value ?? !isSelected ? [id] : [];
4888
4896
  }
4889
4897
  }
@@ -5109,7 +5117,7 @@
5109
5117
  const observer = new IntersectionObserver(entries => {
5110
5118
  isIntersecting.value = !!entries.find(entry => entry.isIntersecting);
5111
5119
  }, options);
5112
- vue.onBeforeUnmount(() => {
5120
+ vue.onScopeDispose(() => {
5113
5121
  observer.disconnect();
5114
5122
  });
5115
5123
  vue.watch(intersectionRef, (newValue, oldValue) => {
@@ -5640,9 +5648,9 @@
5640
5648
 
5641
5649
  function useSelectLink(link, select) {
5642
5650
  vue.watch(() => link.isActive?.value, isActive => {
5643
- if (link.isLink.value && isActive && select) {
5651
+ if (link.isLink.value && isActive != null && select) {
5644
5652
  vue.nextTick(() => {
5645
- select(true);
5653
+ select(isActive);
5646
5654
  });
5647
5655
  }
5648
5656
  }, {
@@ -9256,6 +9264,7 @@
9256
9264
  type: IconValue,
9257
9265
  default: '$expand'
9258
9266
  },
9267
+ rawId: [String, Number],
9259
9268
  prependIcon: IconValue,
9260
9269
  appendIcon: IconValue,
9261
9270
  fluid: Boolean,
@@ -9277,13 +9286,12 @@
9277
9286
  open,
9278
9287
  id: _id
9279
9288
  } = useNestedItem(() => props.value, true);
9280
- 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)}`);
9281
9290
  const list = useList();
9282
9291
  const {
9283
9292
  isBooted
9284
9293
  } = useSsrBoot();
9285
9294
  function onClick(e) {
9286
- e.stopPropagation();
9287
9295
  if (['INPUT', 'TEXTAREA'].includes(e.target?.tagName)) return;
9288
9296
  open(!isOpen.value, e);
9289
9297
  }
@@ -9801,9 +9809,10 @@
9801
9809
  }) : undefined
9802
9810
  };
9803
9811
  const listGroupProps = VListGroup.filterProps(itemProps);
9804
- return children ? vue.createVNode(VListGroup, vue.mergeProps({
9805
- "value": itemProps?.value
9806
- }, listGroupProps), {
9812
+ return children ? vue.createVNode(VListGroup, vue.mergeProps(listGroupProps, {
9813
+ "value": props.returnObject ? item : itemProps?.value,
9814
+ "rawId": itemProps?.value
9815
+ }), {
9807
9816
  activator: _ref3 => {
9808
9817
  let {
9809
9818
  props: activatorProps
@@ -12227,7 +12236,11 @@
12227
12236
  default: slots.loader
12228
12237
  }), hasPrepend && vue.createElementVNode("div", {
12229
12238
  "key": "prepend",
12230
- "class": "v-field__prepend-inner"
12239
+ "class": "v-field__prepend-inner",
12240
+ "onMousedown": e => {
12241
+ e.preventDefault();
12242
+ e.stopPropagation();
12243
+ }
12231
12244
  }, [props.prependInnerIcon && vue.createVNode(InputIcon, {
12232
12245
  "key": "prepend-icon",
12233
12246
  "name": "prependInner",
@@ -12296,7 +12309,11 @@
12296
12309
  })]), [[vue.vShow, props.dirty]])]
12297
12310
  }), hasAppend && vue.createElementVNode("div", {
12298
12311
  "key": "append",
12299
- "class": "v-field__append-inner"
12312
+ "class": "v-field__append-inner",
12313
+ "onMousedown": e => {
12314
+ e.preventDefault();
12315
+ e.stopPropagation();
12316
+ }
12300
12317
  }, [slots['append-inner']?.(slotProps.value), props.appendInnerIcon && vue.createVNode(InputIcon, {
12301
12318
  "key": "append-icon",
12302
12319
  "name": "appendInner",
@@ -12331,6 +12348,16 @@
12331
12348
  }
12332
12349
  });
12333
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
+
12334
12361
  // Types
12335
12362
 
12336
12363
  const activeTypes = ['color', 'file', 'time', 'date', 'datetime-local', 'week', 'month'];
@@ -12377,6 +12404,9 @@
12377
12404
  focus,
12378
12405
  blur
12379
12406
  } = useFocus(props);
12407
+ const {
12408
+ onIntersect
12409
+ } = useAutofocus(props);
12380
12410
  const counterValue = vue.computed(() => {
12381
12411
  return typeof props.counterValue === 'function' ? props.counterValue(model.value) : typeof props.counterValue === 'number' ? props.counterValue : (model.value ?? '').toString().length;
12382
12412
  });
@@ -12386,10 +12416,6 @@
12386
12416
  return props.counter;
12387
12417
  });
12388
12418
  const isPlainOrUnderlined = vue.computed(() => ['plain', 'underlined'].includes(props.variant));
12389
- function onIntersect(isIntersecting, entries) {
12390
- if (!props.autofocus || !isIntersecting) return;
12391
- entries[0].target?.focus?.();
12392
- }
12393
12419
  const vInputRef = vue.ref();
12394
12420
  const vFieldRef = vue.ref();
12395
12421
  const inputRef = vue.ref();
@@ -22755,9 +22781,7 @@
22755
22781
  const yearRef = templateRef();
22756
22782
  vue.onMounted(async () => {
22757
22783
  await vue.nextTick();
22758
- yearRef.el?.scrollIntoView({
22759
- block: 'center'
22760
- });
22784
+ yearRef.el?.focus();
22761
22785
  });
22762
22786
  function isYearAllowed(year) {
22763
22787
  if (Array.isArray(props.allowedYears) && props.allowedYears.length) {
@@ -22893,8 +22917,16 @@
22893
22917
  return value && adapter.isValid(value) ? value : today;
22894
22918
  });
22895
22919
  const headerColor = vue.toRef(() => props.headerColor ?? props.color);
22896
- const month = vue.ref(Number(props.month ?? adapter.getMonth(adapter.startOfMonth(internal.value))));
22897
- 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
+ });
22898
22930
  const isReversing = vue.shallowRef(false);
22899
22931
  const header = vue.computed(() => {
22900
22932
  if (props.multiple && model.value.length > 1) {
@@ -22978,9 +23010,9 @@
22978
23010
  } else {
22979
23011
  year.value++;
22980
23012
  month.value = 0;
22981
- onUpdateYear(year.value);
23013
+ onUpdateYear();
22982
23014
  }
22983
- onUpdateMonth(month.value);
23015
+ onUpdateMonth();
22984
23016
  }
22985
23017
  function onClickPrev() {
22986
23018
  if (month.value > 0) {
@@ -22988,9 +23020,9 @@
22988
23020
  } else {
22989
23021
  year.value--;
22990
23022
  month.value = 11;
22991
- onUpdateYear(year.value);
23023
+ onUpdateYear();
22992
23024
  }
22993
- onUpdateMonth(month.value);
23025
+ onUpdateMonth();
22994
23026
  }
22995
23027
  function onClickDate() {
22996
23028
  viewMode.value = 'month';
@@ -23001,13 +23033,11 @@
23001
23033
  function onClickYear() {
23002
23034
  viewMode.value = viewMode.value === 'year' ? 'month' : 'year';
23003
23035
  }
23004
- function onUpdateMonth(value) {
23036
+ function onUpdateMonth() {
23005
23037
  if (viewMode.value === 'months') onClickMonth();
23006
- emit('update:month', value);
23007
23038
  }
23008
- function onUpdateYear(value) {
23039
+ function onUpdateYear() {
23009
23040
  if (viewMode.value === 'year') onClickYear();
23010
- emit('update:year', value);
23011
23041
  }
23012
23042
  vue.watch(model, (val, oldVal) => {
23013
23043
  const arrBefore = wrapInArray(oldVal);
@@ -23019,11 +23049,11 @@
23019
23049
  const newYear = adapter.getYear(after);
23020
23050
  if (newMonth !== month.value) {
23021
23051
  month.value = newMonth;
23022
- onUpdateMonth(month.value);
23052
+ onUpdateMonth();
23023
23053
  }
23024
23054
  if (newYear !== year.value) {
23025
23055
  year.value = newYear;
23026
- onUpdateYear(year.value);
23056
+ onUpdateYear();
23027
23057
  }
23028
23058
  isReversing.value = adapter.isBefore(before, after);
23029
23059
  });
@@ -25631,6 +25661,21 @@
25631
25661
  const contentRef = vue.ref();
25632
25662
  const inputRef = vue.ref([]);
25633
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
+ });
25634
25679
  function onInput() {
25635
25680
  // The maxlength attribute doesn't work for the number type input, so the text type is used.
25636
25681
  // The following logic simulates the behavior of a number input.
@@ -28377,6 +28422,9 @@
28377
28422
  focus,
28378
28423
  blur
28379
28424
  } = useFocus(props);
28425
+ const {
28426
+ onIntersect
28427
+ } = useAutofocus(props);
28380
28428
  const counterValue = vue.computed(() => {
28381
28429
  return typeof props.counterValue === 'function' ? props.counterValue(model.value) : (model.value || '').toString().length;
28382
28430
  });
@@ -28385,10 +28433,6 @@
28385
28433
  if (!props.counter || typeof props.counter !== 'number' && typeof props.counter !== 'string') return undefined;
28386
28434
  return props.counter;
28387
28435
  });
28388
- function onIntersect(isIntersecting, entries) {
28389
- if (!props.autofocus || !isIntersecting) return;
28390
- entries[0].target?.focus?.();
28391
- }
28392
28436
  const vInputRef = vue.ref();
28393
28437
  const vFieldRef = vue.ref();
28394
28438
  const controlHeight = vue.shallowRef('');
@@ -29468,7 +29512,7 @@
29468
29512
  };
29469
29513
  });
29470
29514
  }
29471
- const version$1 = "3.8.9";
29515
+ const version$1 = "3.8.10";
29472
29516
  createVuetify$1.version = version$1;
29473
29517
 
29474
29518
  // Vue's inject() can only be used in setup
@@ -29493,7 +29537,7 @@
29493
29537
  ...options
29494
29538
  });
29495
29539
  };
29496
- const version = "3.8.9";
29540
+ const version = "3.8.10";
29497
29541
  createVuetify.version = version;
29498
29542
 
29499
29543
  exports.blueprints = index;