vuetify 3.4.6 → 3.4.8

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 (51) hide show
  1. package/dist/json/attributes.json +3821 -3813
  2. package/dist/json/importMap.json +126 -126
  3. package/dist/json/tags.json +2 -0
  4. package/dist/json/web-types.json +7092 -7074
  5. package/dist/vuetify-labs.css +1747 -1744
  6. package/dist/vuetify-labs.d.ts +42 -30
  7. package/dist/vuetify-labs.esm.js +151 -113
  8. package/dist/vuetify-labs.esm.js.map +1 -1
  9. package/dist/vuetify-labs.js +151 -113
  10. package/dist/vuetify-labs.min.css +2 -2
  11. package/dist/vuetify.css +627 -624
  12. package/dist/vuetify.d.ts +82 -70
  13. package/dist/vuetify.esm.js +151 -113
  14. package/dist/vuetify.esm.js.map +1 -1
  15. package/dist/vuetify.js +151 -113
  16. package/dist/vuetify.js.map +1 -1
  17. package/dist/vuetify.min.css +2 -2
  18. package/dist/vuetify.min.js +150 -147
  19. package/dist/vuetify.min.js.map +1 -1
  20. package/lib/components/VAutocomplete/VAutocomplete.css +1 -1
  21. package/lib/components/VAutocomplete/VAutocomplete.mjs +6 -8
  22. package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
  23. package/lib/components/VAutocomplete/VAutocomplete.sass +1 -1
  24. package/lib/components/VChip/VChip.mjs +1 -1
  25. package/lib/components/VChip/VChip.mjs.map +1 -1
  26. package/lib/components/VCombobox/VCombobox.css +1 -1
  27. package/lib/components/VCombobox/VCombobox.mjs +1 -1
  28. package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
  29. package/lib/components/VCombobox/VCombobox.sass +1 -1
  30. package/lib/components/VDataTable/VDataTableFooter.mjs +1 -1
  31. package/lib/components/VDataTable/VDataTableFooter.mjs.map +1 -1
  32. package/lib/components/VDatePicker/VDatePickerMonth.mjs +11 -98
  33. package/lib/components/VDatePicker/VDatePickerMonth.mjs.map +1 -1
  34. package/lib/components/VDatePicker/index.d.mts +42 -30
  35. package/lib/components/VOtpInput/VOtpInput.css +3 -0
  36. package/lib/components/VOtpInput/VOtpInput.mjs +1 -0
  37. package/lib/components/VOtpInput/VOtpInput.mjs.map +1 -1
  38. package/lib/components/VOtpInput/VOtpInput.sass +3 -0
  39. package/lib/components/VOverlay/VOverlay.mjs +11 -6
  40. package/lib/components/VOverlay/VOverlay.mjs.map +1 -1
  41. package/lib/components/VSelect/VSelect.mjs +12 -2
  42. package/lib/components/VSelect/VSelect.mjs.map +1 -1
  43. package/lib/components/index.d.mts +42 -30
  44. package/lib/composables/calendar.mjs +113 -0
  45. package/lib/composables/calendar.mjs.map +1 -0
  46. package/lib/entry-bundler.mjs +1 -1
  47. package/lib/framework.mjs +1 -1
  48. package/lib/index.d.mts +40 -40
  49. package/lib/locale/cs.mjs +19 -19
  50. package/lib/locale/cs.mjs.map +1 -1
  51. package/package.json +4 -4
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Vuetify v3.4.6
2
+ * Vuetify v3.4.8
3
3
  * Forged by John Leider
4
4
  * Released under the MIT License.
5
5
  */
@@ -7128,7 +7128,7 @@
7128
7128
  icon: props.appendIcon
7129
7129
  }
7130
7130
  }
7131
- }, slots.append)]), hasClose && vue.createVNode("div", vue.mergeProps({
7131
+ }, slots.append)]), hasClose && vue.createVNode("button", vue.mergeProps({
7132
7132
  "key": "close",
7133
7133
  "class": "v-chip__close"
7134
7134
  }, closeProps.value), [!slots.close ? vue.createVNode(VIcon, {
@@ -9829,7 +9829,7 @@
9829
9829
  } = useRtl();
9830
9830
  const {
9831
9831
  hasContent,
9832
- onAfterLeave
9832
+ onAfterLeave: _onAfterLeave
9833
9833
  } = useLazy(props, isActive);
9834
9834
  const scrimColor = useBackgroundColor(vue.computed(() => {
9835
9835
  return typeof props.scrim === 'string' ? props.scrim : null;
@@ -9896,6 +9896,10 @@
9896
9896
  }, {
9897
9897
  immediate: true
9898
9898
  });
9899
+ vue.onBeforeUnmount(() => {
9900
+ if (!IN_BROWSER) return;
9901
+ window.removeEventListener('keydown', onKeydown);
9902
+ });
9899
9903
  function onKeydown(e) {
9900
9904
  if (e.key === 'Escape' && globalTop.value) {
9901
9905
  if (!props.persistent) {
@@ -9941,6 +9945,10 @@
9941
9945
  easing: standardEasing
9942
9946
  });
9943
9947
  }
9948
+ function onAfterLeave() {
9949
+ _onAfterLeave();
9950
+ emit('afterLeave');
9951
+ }
9944
9952
  useRender(() => vue.createVNode(vue.Fragment, null, [slots.activator?.({
9945
9953
  isActive: isActive.value,
9946
9954
  props: vue.mergeProps({
@@ -9969,10 +9977,7 @@
9969
9977
  "persisted": true,
9970
9978
  "transition": props.transition,
9971
9979
  "target": target.value,
9972
- "onAfterLeave": () => {
9973
- onAfterLeave();
9974
- emit('afterLeave');
9975
- }
9980
+ "onAfterLeave": onAfterLeave
9976
9981
  }, {
9977
9982
  default: () => [vue.withDirectives(vue.createVNode("div", vue.mergeProps({
9978
9983
  "ref": contentEl,
@@ -11261,7 +11266,7 @@
11261
11266
  ...makeSelectProps(),
11262
11267
  ...omit(makeVTextFieldProps({
11263
11268
  modelValue: null,
11264
- role: 'button'
11269
+ role: 'combobox'
11265
11270
  }), ['validationValue', 'dirty', 'appendInnerIcon']),
11266
11271
  ...makeTransitionProps({
11267
11272
  transition: {
@@ -11320,6 +11325,16 @@
11320
11325
  return items.value;
11321
11326
  });
11322
11327
  const menuDisabled = vue.computed(() => props.hideNoData && !items.value.length || props.readonly || form?.isReadonly.value);
11328
+ const computedMenuProps = vue.computed(() => {
11329
+ return {
11330
+ ...props.menuProps,
11331
+ activatorProps: {
11332
+ ...(props.menuProps?.activatorProps || {}),
11333
+ 'aria-haspopup': 'listbox' // Set aria-haspopup to 'listbox'
11334
+ }
11335
+ };
11336
+ });
11337
+
11323
11338
  const listRef = vue.ref();
11324
11339
  const {
11325
11340
  onListScroll,
@@ -11464,7 +11479,7 @@
11464
11479
  "closeOnContentClick": false,
11465
11480
  "transition": props.transition,
11466
11481
  "onAfterLeave": onAfterLeave
11467
- }, props.menuProps), {
11482
+ }, computedMenuProps.value), {
11468
11483
  default: () => [hasList && vue.createVNode(VList, {
11469
11484
  "ref": listRef,
11470
11485
  "selected": selectedValues.value,
@@ -11878,9 +11893,6 @@
11878
11893
  }
11879
11894
  }
11880
11895
  }
11881
- function onInput(e) {
11882
- search.value = e.target.value;
11883
- }
11884
11896
  function onChange(e) {
11885
11897
  if (matchesSelector(vTextFieldRef.value, ':autofill') || matchesSelector(vTextFieldRef.value, ':-webkit-autofill')) {
11886
11898
  const item = items.value.find(item => item.title === e.target.value);
@@ -11909,6 +11921,8 @@
11909
11921
  }
11910
11922
  const isSelecting = vue.shallowRef(false);
11911
11923
  function select(item) {
11924
+ let add = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
11925
+ if (item.props.disabled) return;
11912
11926
  if (props.multiple) {
11913
11927
  const index = model.value.findIndex(selection => props.valueComparator(selection.value, item.value));
11914
11928
  if (index === -1) {
@@ -11919,9 +11933,9 @@
11919
11933
  model.value = value;
11920
11934
  }
11921
11935
  } else {
11922
- model.value = [item];
11936
+ model.value = add ? [item] : [];
11923
11937
  isSelecting.value = true;
11924
- search.value = item.title;
11938
+ search.value = add ? item.title : '';
11925
11939
  menu.value = false;
11926
11940
  isPristine.value = true;
11927
11941
  vue.nextTick(() => isSelecting.value = false);
@@ -11970,13 +11984,12 @@
11970
11984
  "ref": vTextFieldRef
11971
11985
  }, textFieldProps, {
11972
11986
  "modelValue": search.value,
11973
- "onUpdate:modelValue": onUpdateModelValue,
11987
+ "onUpdate:modelValue": [$event => search.value = $event, onUpdateModelValue],
11974
11988
  "focused": isFocused.value,
11975
11989
  "onUpdate:focused": $event => isFocused.value = $event,
11976
11990
  "validationValue": model.externalValue,
11977
11991
  "counterValue": counterValue.value,
11978
11992
  "dirty": isDirty,
11979
- "onInput": onInput,
11980
11993
  "onChange": onChange,
11981
11994
  "class": ['v-autocomplete', `v-autocomplete--${props.multiple ? 'multiple' : 'single'}`, {
11982
11995
  'v-autocomplete--active-menu': menu.value,
@@ -12066,7 +12079,7 @@
12066
12079
  function onChipClose(e) {
12067
12080
  e.stopPropagation();
12068
12081
  e.preventDefault();
12069
- select(item);
12082
+ select(item, false);
12070
12083
  }
12071
12084
  const slotProps = {
12072
12085
  'onClick:close': onChipClose,
@@ -15615,7 +15628,7 @@
15615
15628
  }
15616
15629
  const originalSelectionIndex = selectionIndex.value;
15617
15630
  const selectedItem = model.value[selectionIndex.value];
15618
- if (selectedItem && !selectedItem.props.disabled) select(selectedItem);
15631
+ if (selectedItem && !selectedItem.props.disabled) select(selectedItem, false);
15619
15632
  selectionIndex.value = originalSelectionIndex >= length - 1 ? length - 2 : originalSelectionIndex;
15620
15633
  }
15621
15634
  if (e.key === 'ArrowLeft') {
@@ -17742,7 +17755,7 @@
17742
17755
  "last-aria-label": props.lastPageLabel,
17743
17756
  "length": pageCount.value,
17744
17757
  "next-aria-label": props.nextPageLabel,
17745
- "prev-aria-label": props.prevPageLabel,
17758
+ "previous-aria-label": props.prevPageLabel,
17746
17759
  "rounded": true,
17747
17760
  "show-first-last-page": true,
17748
17761
  "total-visible": props.showCurrentPage ? 1 : 0,
@@ -19609,21 +19622,125 @@
19609
19622
  }
19610
19623
  });
19611
19624
 
19625
+ // Composables
19626
+
19612
19627
  // Types
19613
19628
 
19614
- const makeVDatePickerMonthProps = propsFactory({
19629
+ // Types
19630
+
19631
+ // Composables
19632
+ const makeCalendarProps = propsFactory({
19615
19633
  allowedDates: [Array, Function],
19616
19634
  disabled: Boolean,
19617
- color: String,
19635
+ displayValue: null,
19636
+ modelValue: Array,
19618
19637
  month: [Number, String],
19619
- hideWeekdays: Boolean,
19620
19638
  max: null,
19621
19639
  min: null,
19622
- modelValue: Array,
19623
- multiple: Boolean,
19624
19640
  showAdjacentMonths: Boolean,
19625
- showWeek: Boolean,
19626
19641
  year: [Number, String]
19642
+ }, 'calendar');
19643
+ function useCalendar(props) {
19644
+ const adapter = useDate();
19645
+ const model = useProxiedModel(props, 'modelValue', [], v => wrapInArray(v));
19646
+ const displayValue = vue.computed(() => {
19647
+ if (props.displayValue) return adapter.date(props.displayValue);
19648
+ if (model.value.length > 0) return adapter.date(model.value[0]);
19649
+ if (props.min) return adapter.date(props.min);
19650
+ if (Array.isArray(props.allowedDates)) return adapter.date(props.allowedDates[0]);
19651
+ return adapter.date();
19652
+ });
19653
+ const year = useProxiedModel(props, 'year', undefined, v => {
19654
+ const value = v != null ? Number(v) : adapter.getYear(displayValue.value);
19655
+ return adapter.startOfYear(adapter.setYear(adapter.date(), value));
19656
+ }, v => adapter.getYear(v));
19657
+ const month = useProxiedModel(props, 'month', undefined, v => {
19658
+ const value = v != null ? Number(v) : adapter.getMonth(displayValue.value);
19659
+ const date = adapter.setYear(adapter.date(), adapter.getYear(year.value));
19660
+ return adapter.setMonth(date, value);
19661
+ }, v => adapter.getMonth(v));
19662
+ const weeksInMonth = vue.computed(() => {
19663
+ const weeks = adapter.getWeekArray(month.value);
19664
+ const days = weeks.flat();
19665
+
19666
+ // Make sure there's always 6 weeks in month (6 * 7 days)
19667
+ // But only do it if we're not hiding adjacent months?
19668
+ const daysInMonth = 6 * 7;
19669
+ if (days.length < daysInMonth) {
19670
+ const lastDay = days[days.length - 1];
19671
+ let week = [];
19672
+ for (let day = 1; day <= daysInMonth - days.length; day++) {
19673
+ week.push(adapter.addDays(lastDay, day));
19674
+ if (day % 7 === 0) {
19675
+ weeks.push(week);
19676
+ week = [];
19677
+ }
19678
+ }
19679
+ }
19680
+ return weeks;
19681
+ });
19682
+ const daysInMonth = vue.computed(() => {
19683
+ const days = weeksInMonth.value.flat();
19684
+ const today = adapter.date();
19685
+ return days.map((date, index) => {
19686
+ const isoDate = adapter.toISO(date);
19687
+ const isAdjacent = !adapter.isSameMonth(date, month.value);
19688
+ const isStart = adapter.isSameDay(date, adapter.startOfMonth(month.value));
19689
+ const isEnd = adapter.isSameDay(date, adapter.endOfMonth(month.value));
19690
+ const isSame = adapter.isSameDay(date, month.value);
19691
+ return {
19692
+ date,
19693
+ isoDate,
19694
+ formatted: adapter.format(date, 'keyboardDate'),
19695
+ year: adapter.getYear(date),
19696
+ month: adapter.getMonth(date),
19697
+ isDisabled: isDisabled(date),
19698
+ isWeekStart: index % 7 === 0,
19699
+ isWeekEnd: index % 7 === 6,
19700
+ isToday: adapter.isSameDay(date, today),
19701
+ isAdjacent,
19702
+ isHidden: isAdjacent && !props.showAdjacentMonths,
19703
+ isStart,
19704
+ isSelected: model.value.some(value => adapter.isSameDay(date, value)),
19705
+ isEnd,
19706
+ isSame,
19707
+ localized: adapter.format(date, 'dayOfMonth')
19708
+ };
19709
+ });
19710
+ });
19711
+ const weekNumbers = vue.computed(() => {
19712
+ return weeksInMonth.value.map(week => {
19713
+ return week.length ? getWeek(adapter, week[0]) : null;
19714
+ });
19715
+ });
19716
+ function isDisabled(value) {
19717
+ if (props.disabled) return true;
19718
+ const date = adapter.date(value);
19719
+ if (props.min && adapter.isAfter(adapter.date(props.min), date)) return true;
19720
+ if (props.max && adapter.isAfter(date, adapter.date(props.max))) return true;
19721
+ if (Array.isArray(props.allowedDates) && props.allowedDates.length > 0) {
19722
+ return !props.allowedDates.some(d => adapter.isSameDay(adapter.date(d), date));
19723
+ }
19724
+ if (typeof props.allowedDates === 'function') {
19725
+ return !props.allowedDates(date);
19726
+ }
19727
+ return false;
19728
+ }
19729
+ return {
19730
+ displayValue,
19731
+ daysInMonth,
19732
+ model,
19733
+ weeksInMonth,
19734
+ weekNumbers
19735
+ };
19736
+ }
19737
+
19738
+ const makeVDatePickerMonthProps = propsFactory({
19739
+ color: String,
19740
+ hideWeekdays: Boolean,
19741
+ multiple: Boolean,
19742
+ showWeek: Boolean,
19743
+ ...makeCalendarProps()
19627
19744
  }, 'VDatePickerMonth');
19628
19745
  const VDatePickerMonth = genericComponent()({
19629
19746
  name: 'VDatePickerMonth',
@@ -19639,87 +19756,12 @@
19639
19756
  slots
19640
19757
  } = _ref;
19641
19758
  const daysRef = vue.ref();
19759
+ const {
19760
+ daysInMonth,
19761
+ model,
19762
+ weekNumbers
19763
+ } = useCalendar(props); // TODO: fix typing
19642
19764
  const adapter = useDate();
19643
- // model comes in always as array
19644
- // leaves as array if multiple
19645
- const model = useProxiedModel(props, 'modelValue', [], v => wrapInArray(v));
19646
- const displayValue = vue.computed(() => {
19647
- if (model.value.length > 0) return adapter.date(model.value[0]);
19648
- if (props.min) return adapter.date(props.min);
19649
- if (Array.isArray(props.allowedDates)) return adapter.date(props.allowedDates[0]);
19650
- return adapter.date();
19651
- });
19652
- const year = useProxiedModel(props, 'year', undefined, v => {
19653
- const value = v != null ? Number(v) : adapter.getYear(displayValue.value);
19654
- return adapter.startOfYear(adapter.setYear(adapter.date(), value));
19655
- }, v => adapter.getYear(v));
19656
- const month = useProxiedModel(props, 'month', undefined, v => {
19657
- const value = v != null ? Number(v) : adapter.getMonth(displayValue.value);
19658
- const date = adapter.setYear(adapter.date(), adapter.getYear(year.value));
19659
- return adapter.setMonth(date, value);
19660
- }, v => adapter.getMonth(v));
19661
- const weeksInMonth = vue.computed(() => {
19662
- const weeks = adapter.getWeekArray(month.value);
19663
- const days = weeks.flat();
19664
-
19665
- // Make sure there's always 6 weeks in month (6 * 7 days)
19666
- // But only do it if we're not hiding adjacent months?
19667
- const daysInMonth = 6 * 7;
19668
- if (days.length < daysInMonth) {
19669
- const lastDay = days[days.length - 1];
19670
- let week = [];
19671
- for (let day = 1; day <= daysInMonth - days.length; day++) {
19672
- week.push(adapter.addDays(lastDay, day));
19673
- if (day % 7 === 0) {
19674
- weeks.push(week);
19675
- week = [];
19676
- }
19677
- }
19678
- }
19679
- return weeks;
19680
- });
19681
- const daysInMonth = vue.computed(() => {
19682
- const days = weeksInMonth.value.flat();
19683
- const today = adapter.date();
19684
- return days.map((date, index) => {
19685
- const isoDate = adapter.toISO(date);
19686
- const isAdjacent = !adapter.isSameMonth(date, month.value);
19687
- return {
19688
- date,
19689
- isoDate,
19690
- formatted: adapter.format(date, 'keyboardDate'),
19691
- year: adapter.getYear(date),
19692
- month: adapter.getMonth(date),
19693
- isDisabled: isDisabled(date),
19694
- isWeekStart: index % 7 === 0,
19695
- isWeekEnd: index % 7 === 6,
19696
- isSelected: model.value.some(value => adapter.isSameDay(date, value)),
19697
- isToday: adapter.isSameDay(date, today),
19698
- isAdjacent,
19699
- isHidden: isAdjacent && !props.showAdjacentMonths,
19700
- isHovered: false,
19701
- localized: adapter.format(date, 'dayOfMonth')
19702
- };
19703
- });
19704
- });
19705
- const weeks = vue.computed(() => {
19706
- return weeksInMonth.value.map(week => {
19707
- return getWeek(adapter, week[0]);
19708
- });
19709
- });
19710
- function isDisabled(value) {
19711
- if (props.disabled) return true;
19712
- const date = adapter.date(value);
19713
- if (props.min && adapter.isAfter(adapter.date(props.min), date)) return true;
19714
- if (props.max && adapter.isAfter(date, adapter.date(props.max))) return true;
19715
- if (Array.isArray(props.allowedDates) && props.allowedDates.length > 0) {
19716
- return !props.allowedDates.some(d => adapter.isSameDay(adapter.date(d), date));
19717
- }
19718
- if (typeof props.allowedDates === 'function') {
19719
- return !props.allowedDates(date);
19720
- }
19721
- return false;
19722
- }
19723
19765
  function onClick(value) {
19724
19766
  if (props.multiple) {
19725
19767
  const index = model.value.findIndex(selection => adapter.isSameDay(selection, value));
@@ -19734,10 +19776,6 @@
19734
19776
  model.value = [value];
19735
19777
  }
19736
19778
  }
19737
- vue.watch(displayValue, val => {
19738
- month.value = val;
19739
- year.value = val;
19740
- });
19741
19779
  return () => vue.createVNode("div", {
19742
19780
  "class": "v-date-picker-month"
19743
19781
  }, [props.showWeek && vue.createVNode("div", {
@@ -19746,7 +19784,7 @@
19746
19784
  }, [!props.hideWeekdays && vue.createVNode("div", {
19747
19785
  "key": "hide-week-days",
19748
19786
  "class": "v-date-picker-month__day"
19749
- }, [vue.createTextVNode("\xA0")]), weeks.value.map(week => vue.createVNode("div", {
19787
+ }, [vue.createTextVNode("\xA0")]), weekNumbers.value.map(week => vue.createVNode("div", {
19750
19788
  "class": ['v-date-picker-month__day', 'v-date-picker-month__day--adjacent']
19751
19789
  }, [week]))]), vue.createVNode("div", {
19752
19790
  "ref": daysRef,
@@ -19765,7 +19803,6 @@
19765
19803
  "class": ['v-date-picker-month__day', {
19766
19804
  'v-date-picker-month__day--adjacent': item.isAdjacent,
19767
19805
  'v-date-picker-month__day--hide-adjacent': item.isHidden,
19768
- 'v-date-picker-month__day--hovered': item.isHovered,
19769
19806
  'v-date-picker-month__day--selected': item.isSelected,
19770
19807
  'v-date-picker-month__day--week-end': item.isWeekEnd,
19771
19808
  'v-date-picker-month__day--week-start': item.isWeekStart
@@ -22046,6 +22083,7 @@
22046
22083
  "key": i
22047
22084
  }, {
22048
22085
  ...slots,
22086
+ loader: undefined,
22049
22087
  default: () => {
22050
22088
  return vue.createVNode("input", {
22051
22089
  "ref": val => inputRef.value[i] = val,
@@ -25271,7 +25309,7 @@
25271
25309
  date
25272
25310
  };
25273
25311
  }
25274
- const version$1 = "3.4.6";
25312
+ const version$1 = "3.4.8";
25275
25313
  createVuetify$1.version = version$1;
25276
25314
 
25277
25315
  // Vue's inject() can only be used in setup
@@ -25285,7 +25323,7 @@
25285
25323
 
25286
25324
  /* eslint-disable local-rules/sort-imports */
25287
25325
 
25288
- const version = "3.4.6";
25326
+ const version = "3.4.8";
25289
25327
 
25290
25328
  /* eslint-disable local-rules/sort-imports */
25291
25329