vuetify 3.4.7 → 3.4.9

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 (210) hide show
  1. package/dist/_component-variables-labs.sass +1 -0
  2. package/dist/json/attributes.json +300 -40
  3. package/dist/json/importMap-labs.json +24 -0
  4. package/dist/json/importMap.json +134 -134
  5. package/dist/json/tags.json +95 -0
  6. package/dist/json/web-types.json +910 -59
  7. package/dist/vuetify-labs.css +2402 -2052
  8. package/dist/vuetify-labs.d.ts +1660 -31
  9. package/dist/vuetify-labs.esm.js +733 -106
  10. package/dist/vuetify-labs.esm.js.map +1 -1
  11. package/dist/vuetify-labs.js +733 -106
  12. package/dist/vuetify-labs.min.css +2 -2
  13. package/dist/vuetify.css +810 -807
  14. package/dist/vuetify.d.ts +119 -74
  15. package/dist/vuetify.esm.js +242 -106
  16. package/dist/vuetify.esm.js.map +1 -1
  17. package/dist/vuetify.js +242 -106
  18. package/dist/vuetify.js.map +1 -1
  19. package/dist/vuetify.min.css +2 -2
  20. package/dist/vuetify.min.js +235 -215
  21. package/dist/vuetify.min.js.map +1 -1
  22. package/lib/blueprints/index.d.mts +9 -0
  23. package/lib/blueprints/md1.d.mts +9 -0
  24. package/lib/blueprints/md2.d.mts +9 -0
  25. package/lib/blueprints/md3.d.mts +9 -0
  26. package/lib/components/VDataTable/VDataTableFooter.mjs +1 -1
  27. package/lib/components/VDataTable/VDataTableFooter.mjs.map +1 -1
  28. package/lib/components/VDatePicker/VDatePicker.mjs +4 -1
  29. package/lib/components/VDatePicker/VDatePicker.mjs.map +1 -1
  30. package/lib/components/VDatePicker/VDatePickerMonth.mjs +12 -99
  31. package/lib/components/VDatePicker/VDatePickerMonth.mjs.map +1 -1
  32. package/lib/components/VDatePicker/index.d.mts +42 -30
  33. package/lib/components/VOtpInput/VOtpInput.css +3 -0
  34. package/lib/components/VOtpInput/VOtpInput.mjs +1 -0
  35. package/lib/components/VOtpInput/VOtpInput.mjs.map +1 -1
  36. package/lib/components/VOtpInput/VOtpInput.sass +3 -0
  37. package/lib/components/VOverlay/VOverlay.mjs +11 -6
  38. package/lib/components/VOverlay/VOverlay.mjs.map +1 -1
  39. package/lib/components/index.d.mts +42 -30
  40. package/lib/composables/calendar.mjs +128 -0
  41. package/lib/composables/calendar.mjs.map +1 -0
  42. package/lib/composables/date/DateAdapter.mjs.map +1 -1
  43. package/lib/composables/date/adapters/vuetify.mjs +89 -2
  44. package/lib/composables/date/adapters/vuetify.mjs.map +1 -1
  45. package/lib/composables/date/date.mjs +4 -0
  46. package/lib/composables/date/date.mjs.map +1 -1
  47. package/lib/entry-bundler.mjs +1 -1
  48. package/lib/framework.mjs +1 -1
  49. package/lib/index.d.mts +77 -44
  50. package/lib/labs/VCalendar/VCalendar.css +220 -0
  51. package/lib/labs/VCalendar/VCalendar.mjs +128 -0
  52. package/lib/labs/VCalendar/VCalendar.mjs.map +1 -0
  53. package/lib/labs/VCalendar/VCalendar.sass +168 -0
  54. package/lib/labs/VCalendar/VCalendarDay.css +10 -0
  55. package/lib/labs/VCalendar/VCalendarDay.mjs +47 -0
  56. package/lib/labs/VCalendar/VCalendarDay.mjs.map +1 -0
  57. package/lib/labs/VCalendar/VCalendarDay.sass +9 -0
  58. package/lib/labs/VCalendar/VCalendarEvent.mjs +30 -0
  59. package/lib/labs/VCalendar/VCalendarEvent.mjs.map +1 -0
  60. package/lib/labs/VCalendar/VCalendarHeader.css +14 -0
  61. package/lib/labs/VCalendar/VCalendarHeader.mjs +76 -0
  62. package/lib/labs/VCalendar/VCalendarHeader.mjs.map +1 -0
  63. package/lib/labs/VCalendar/VCalendarHeader.sass +13 -0
  64. package/lib/labs/VCalendar/VCalendarInterval.css +42 -0
  65. package/lib/labs/VCalendar/VCalendarInterval.mjs +113 -0
  66. package/lib/labs/VCalendar/VCalendarInterval.mjs.map +1 -0
  67. package/lib/labs/VCalendar/VCalendarInterval.sass +39 -0
  68. package/lib/labs/VCalendar/VCalendarIntervalEvent.mjs +76 -0
  69. package/lib/labs/VCalendar/VCalendarIntervalEvent.mjs.map +1 -0
  70. package/lib/labs/VCalendar/VCalendarMonthDay.css +61 -0
  71. package/lib/labs/VCalendar/VCalendarMonthDay.mjs +64 -0
  72. package/lib/labs/VCalendar/VCalendarMonthDay.mjs.map +1 -0
  73. package/lib/labs/VCalendar/VCalendarMonthDay.sass +65 -0
  74. package/lib/{components → labs}/VCalendar/_variables.scss +14 -6
  75. package/lib/labs/VCalendar/index.d.mts +1592 -0
  76. package/lib/labs/VCalendar/index.mjs +7 -0
  77. package/lib/labs/VCalendar/index.mjs.map +1 -0
  78. package/lib/labs/components.d.mts +1586 -2
  79. package/lib/labs/components.mjs +1 -0
  80. package/lib/labs/components.mjs.map +1 -1
  81. package/lib/locale/af.mjs +2 -1
  82. package/lib/locale/af.mjs.map +1 -1
  83. package/lib/locale/ar.mjs +2 -1
  84. package/lib/locale/ar.mjs.map +1 -1
  85. package/lib/locale/az.mjs +2 -1
  86. package/lib/locale/az.mjs.map +1 -1
  87. package/lib/locale/bg.mjs +2 -1
  88. package/lib/locale/bg.mjs.map +1 -1
  89. package/lib/locale/ca.mjs +2 -1
  90. package/lib/locale/ca.mjs.map +1 -1
  91. package/lib/locale/ckb.mjs +2 -1
  92. package/lib/locale/ckb.mjs.map +1 -1
  93. package/lib/locale/cs.mjs +21 -20
  94. package/lib/locale/cs.mjs.map +1 -1
  95. package/lib/locale/da.mjs +2 -1
  96. package/lib/locale/da.mjs.map +1 -1
  97. package/lib/locale/de.mjs +2 -1
  98. package/lib/locale/de.mjs.map +1 -1
  99. package/lib/locale/el.mjs +2 -1
  100. package/lib/locale/el.mjs.map +1 -1
  101. package/lib/locale/en.mjs +2 -1
  102. package/lib/locale/en.mjs.map +1 -1
  103. package/lib/locale/es.mjs +2 -1
  104. package/lib/locale/es.mjs.map +1 -1
  105. package/lib/locale/et.mjs +2 -1
  106. package/lib/locale/et.mjs.map +1 -1
  107. package/lib/locale/fa.mjs +2 -1
  108. package/lib/locale/fa.mjs.map +1 -1
  109. package/lib/locale/fi.mjs +2 -1
  110. package/lib/locale/fi.mjs.map +1 -1
  111. package/lib/locale/fr.mjs +2 -1
  112. package/lib/locale/fr.mjs.map +1 -1
  113. package/lib/locale/he.mjs +2 -1
  114. package/lib/locale/he.mjs.map +1 -1
  115. package/lib/locale/hr.mjs +2 -1
  116. package/lib/locale/hr.mjs.map +1 -1
  117. package/lib/locale/hu.mjs +2 -1
  118. package/lib/locale/hu.mjs.map +1 -1
  119. package/lib/locale/id.mjs +2 -1
  120. package/lib/locale/id.mjs.map +1 -1
  121. package/lib/locale/index.d.mts +42 -0
  122. package/lib/locale/it.mjs +2 -1
  123. package/lib/locale/it.mjs.map +1 -1
  124. package/lib/locale/ja.mjs +2 -1
  125. package/lib/locale/ja.mjs.map +1 -1
  126. package/lib/locale/ko.mjs +2 -1
  127. package/lib/locale/ko.mjs.map +1 -1
  128. package/lib/locale/lt.mjs +2 -1
  129. package/lib/locale/lt.mjs.map +1 -1
  130. package/lib/locale/lv.mjs +2 -1
  131. package/lib/locale/lv.mjs.map +1 -1
  132. package/lib/locale/nl.mjs +2 -1
  133. package/lib/locale/nl.mjs.map +1 -1
  134. package/lib/locale/no.mjs +2 -1
  135. package/lib/locale/no.mjs.map +1 -1
  136. package/lib/locale/pl.mjs +2 -1
  137. package/lib/locale/pl.mjs.map +1 -1
  138. package/lib/locale/pt.mjs +2 -1
  139. package/lib/locale/pt.mjs.map +1 -1
  140. package/lib/locale/ro.mjs +2 -1
  141. package/lib/locale/ro.mjs.map +1 -1
  142. package/lib/locale/ru.mjs +2 -1
  143. package/lib/locale/ru.mjs.map +1 -1
  144. package/lib/locale/sk.mjs +2 -1
  145. package/lib/locale/sk.mjs.map +1 -1
  146. package/lib/locale/sl.mjs +2 -1
  147. package/lib/locale/sl.mjs.map +1 -1
  148. package/lib/locale/sr-Cyrl.mjs +2 -1
  149. package/lib/locale/sr-Cyrl.mjs.map +1 -1
  150. package/lib/locale/sr-Latn.mjs +2 -1
  151. package/lib/locale/sr-Latn.mjs.map +1 -1
  152. package/lib/locale/sv.mjs +2 -1
  153. package/lib/locale/sv.mjs.map +1 -1
  154. package/lib/locale/th.mjs +2 -1
  155. package/lib/locale/th.mjs.map +1 -1
  156. package/lib/locale/tr.mjs +2 -1
  157. package/lib/locale/tr.mjs.map +1 -1
  158. package/lib/locale/uk.mjs +2 -1
  159. package/lib/locale/uk.mjs.map +1 -1
  160. package/lib/locale/vi.mjs +2 -1
  161. package/lib/locale/vi.mjs.map +1 -1
  162. package/lib/locale/zh-Hans.mjs +2 -1
  163. package/lib/locale/zh-Hans.mjs.map +1 -1
  164. package/lib/locale/zh-Hant.mjs +2 -1
  165. package/lib/locale/zh-Hant.mjs.map +1 -1
  166. package/lib/util/helpers.mjs +6 -0
  167. package/lib/util/helpers.mjs.map +1 -1
  168. package/package.json +2 -2
  169. package/lib/components/VCalendar/VCalendar.mjs +0 -352
  170. package/lib/components/VCalendar/VCalendar.mjs.map +0 -1
  171. package/lib/components/VCalendar/VCalendarCategory.mjs +0 -124
  172. package/lib/components/VCalendar/VCalendarCategory.mjs.map +0 -1
  173. package/lib/components/VCalendar/VCalendarCategory.sass +0 -100
  174. package/lib/components/VCalendar/VCalendarDaily.mjs +0 -239
  175. package/lib/components/VCalendar/VCalendarDaily.mjs.map +0 -1
  176. package/lib/components/VCalendar/VCalendarDaily.sass +0 -140
  177. package/lib/components/VCalendar/VCalendarMonthly.mjs +0 -25
  178. package/lib/components/VCalendar/VCalendarMonthly.mjs.map +0 -1
  179. package/lib/components/VCalendar/VCalendarWeekly.mjs +0 -193
  180. package/lib/components/VCalendar/VCalendarWeekly.mjs.map +0 -1
  181. package/lib/components/VCalendar/VCalendarWeekly.sass +0 -118
  182. package/lib/components/VCalendar/index.mjs +0 -16
  183. package/lib/components/VCalendar/index.mjs.map +0 -1
  184. package/lib/components/VCalendar/mixins/calendar-base.mjs +0 -89
  185. package/lib/components/VCalendar/mixins/calendar-base.mjs.map +0 -1
  186. package/lib/components/VCalendar/mixins/calendar-with-events.mjs +0 -416
  187. package/lib/components/VCalendar/mixins/calendar-with-events.mjs.map +0 -1
  188. package/lib/components/VCalendar/mixins/calendar-with-events.sass +0 -67
  189. package/lib/components/VCalendar/mixins/calendar-with-intervals.mjs +0 -135
  190. package/lib/components/VCalendar/mixins/calendar-with-intervals.mjs.map +0 -1
  191. package/lib/components/VCalendar/mixins/mouse.mjs +0 -85
  192. package/lib/components/VCalendar/mixins/mouse.mjs.map +0 -1
  193. package/lib/components/VCalendar/mixins/times.mjs +0 -65
  194. package/lib/components/VCalendar/mixins/times.mjs.map +0 -1
  195. package/lib/components/VCalendar/modes/column.mjs +0 -18
  196. package/lib/components/VCalendar/modes/column.mjs.map +0 -1
  197. package/lib/components/VCalendar/modes/common.mjs +0 -112
  198. package/lib/components/VCalendar/modes/common.mjs.map +0 -1
  199. package/lib/components/VCalendar/modes/index.mjs +0 -9
  200. package/lib/components/VCalendar/modes/index.mjs.map +0 -1
  201. package/lib/components/VCalendar/modes/stack.mjs +0 -204
  202. package/lib/components/VCalendar/modes/stack.mjs.map +0 -1
  203. package/lib/components/VCalendar/util/events.mjs +0 -44
  204. package/lib/components/VCalendar/util/events.mjs.map +0 -1
  205. package/lib/components/VCalendar/util/parser.mjs +0 -21
  206. package/lib/components/VCalendar/util/parser.mjs.map +0 -1
  207. package/lib/components/VCalendar/util/props.mjs +0 -248
  208. package/lib/components/VCalendar/util/props.mjs.map +0 -1
  209. package/lib/components/VCalendar/util/timestamp.mjs +0 -407
  210. package/lib/components/VCalendar/util/timestamp.mjs.map +0 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Vuetify v3.4.7
2
+ * Vuetify v3.4.9
3
3
  * Forged by John Leider
4
4
  * Released under the MIT License.
5
5
  */
@@ -1895,7 +1895,8 @@ var en = {
1895
1895
  }
1896
1896
  },
1897
1897
  calendar: {
1898
- moreEvents: '{0} more'
1898
+ moreEvents: '{0} more',
1899
+ today: 'Today'
1899
1900
  },
1900
1901
  input: {
1901
1902
  clear: 'Clear {0}',
@@ -9825,7 +9826,7 @@ const VOverlay = genericComponent()({
9825
9826
  } = useRtl();
9826
9827
  const {
9827
9828
  hasContent,
9828
- onAfterLeave
9829
+ onAfterLeave: _onAfterLeave
9829
9830
  } = useLazy(props, isActive);
9830
9831
  const scrimColor = useBackgroundColor(computed(() => {
9831
9832
  return typeof props.scrim === 'string' ? props.scrim : null;
@@ -9892,6 +9893,10 @@ const VOverlay = genericComponent()({
9892
9893
  }, {
9893
9894
  immediate: true
9894
9895
  });
9896
+ onBeforeUnmount(() => {
9897
+ if (!IN_BROWSER) return;
9898
+ window.removeEventListener('keydown', onKeydown);
9899
+ });
9895
9900
  function onKeydown(e) {
9896
9901
  if (e.key === 'Escape' && globalTop.value) {
9897
9902
  if (!props.persistent) {
@@ -9937,6 +9942,10 @@ const VOverlay = genericComponent()({
9937
9942
  easing: standardEasing
9938
9943
  });
9939
9944
  }
9945
+ function onAfterLeave() {
9946
+ _onAfterLeave();
9947
+ emit('afterLeave');
9948
+ }
9940
9949
  useRender(() => createVNode(Fragment, null, [slots.activator?.({
9941
9950
  isActive: isActive.value,
9942
9951
  props: mergeProps({
@@ -9965,10 +9974,7 @@ const VOverlay = genericComponent()({
9965
9974
  "persisted": true,
9966
9975
  "transition": props.transition,
9967
9976
  "target": target.value,
9968
- "onAfterLeave": () => {
9969
- onAfterLeave();
9970
- emit('afterLeave');
9971
- }
9977
+ "onAfterLeave": onAfterLeave
9972
9978
  }, {
9973
9979
  default: () => [withDirectives(createVNode("div", mergeProps({
9974
9980
  "ref": contentEl,
@@ -16591,6 +16597,20 @@ function getWeekArray(date, locale) {
16591
16597
  }
16592
16598
  return weeks;
16593
16599
  }
16600
+ function startOfWeek(date) {
16601
+ const d = new Date(date);
16602
+ while (d.getDay() !== 0) {
16603
+ d.setDate(d.getDate() - 1);
16604
+ }
16605
+ return d;
16606
+ }
16607
+ function endOfWeek(date) {
16608
+ const d = new Date(date);
16609
+ while (d.getDay() !== 6) {
16610
+ d.setDate(d.getDate() + 1);
16611
+ }
16612
+ return d;
16613
+ }
16594
16614
  function startOfMonth(date) {
16595
16615
  return new Date(date.getFullYear(), date.getMonth(), 1);
16596
16616
  }
@@ -16619,14 +16639,18 @@ function date(value) {
16619
16639
  return null;
16620
16640
  }
16621
16641
  const sundayJanuarySecond2000 = new Date(2000, 0, 2);
16642
+
16643
+ // The number of letters returned by getWeekday() varies by date library
16644
+ // So we've opted for 3-letter abbreviations for all locales
16622
16645
  function getWeekdays(locale) {
16623
16646
  const daysFromSunday = firstDay[locale.slice(-2).toUpperCase()];
16624
16647
  return createRange(7).map(i => {
16625
16648
  const weekday = new Date(sundayJanuarySecond2000);
16626
16649
  weekday.setDate(sundayJanuarySecond2000.getDate() + daysFromSunday + i);
16627
- return new Intl.DateTimeFormat(locale, {
16628
- weekday: 'narrow'
16650
+ const formattedDay = new Intl.DateTimeFormat(locale, {
16651
+ weekday: 'short'
16629
16652
  }).format(weekday);
16653
+ return formattedDay.charAt(0).toUpperCase() + formattedDay.slice(1);
16630
16654
  });
16631
16655
  }
16632
16656
  function format(value, formatString, locale, formats) {
@@ -16645,6 +16669,12 @@ function format(value, formatString, locale, formats) {
16645
16669
  year: 'numeric'
16646
16670
  };
16647
16671
  break;
16672
+ case 'hours12h':
16673
+ options = {
16674
+ hour: 'numeric',
16675
+ hour12: true
16676
+ };
16677
+ break;
16648
16678
  case 'normalDateWithWeekday':
16649
16679
  options = {
16650
16680
  weekday: 'short',
@@ -16693,6 +16723,11 @@ function format(value, formatString, locale, formats) {
16693
16723
  day: 'numeric'
16694
16724
  };
16695
16725
  break;
16726
+ case 'weekdayShort':
16727
+ options = {
16728
+ weekday: 'short'
16729
+ };
16730
+ break;
16696
16731
  case 'year':
16697
16732
  options = {
16698
16733
  year: 'numeric'
@@ -16717,11 +16752,26 @@ function parseISO(value) {
16717
16752
  const [year, month, day] = value.split('-').map(Number);
16718
16753
  return new Date(year, month - 1, day);
16719
16754
  }
16755
+ function addMinutes(date, amount) {
16756
+ const d = new Date(date);
16757
+ d.setMinutes(d.getMinutes() + amount);
16758
+ return d;
16759
+ }
16760
+ function addHours(date, amount) {
16761
+ const d = new Date(date);
16762
+ d.setHours(d.getHours() + amount);
16763
+ return d;
16764
+ }
16720
16765
  function addDays(date, amount) {
16721
16766
  const d = new Date(date);
16722
16767
  d.setDate(d.getDate() + amount);
16723
16768
  return d;
16724
16769
  }
16770
+ function addWeeks(date, amount) {
16771
+ const d = new Date(date);
16772
+ d.setDate(d.getDate() + amount * 7);
16773
+ return d;
16774
+ }
16725
16775
  function addMonths(date, amount) {
16726
16776
  const d = new Date(date);
16727
16777
  d.setMonth(d.getMonth() + amount);
@@ -16736,6 +16786,12 @@ function getMonth(date) {
16736
16786
  function getNextMonth(date) {
16737
16787
  return new Date(date.getFullYear(), date.getMonth() + 1, 1);
16738
16788
  }
16789
+ function getHours(date) {
16790
+ return date.getHours();
16791
+ }
16792
+ function getMinutes(date) {
16793
+ return date.getMinutes();
16794
+ }
16739
16795
  function startOfYear(date) {
16740
16796
  return new Date(date.getFullYear(), 0, 1);
16741
16797
  }
@@ -16772,6 +16828,16 @@ function getDiff(date, comparing, unit) {
16772
16828
  }
16773
16829
  return Math.floor((d.getTime() - c.getTime()) / (1000 * 60 * 60 * 24));
16774
16830
  }
16831
+ function setHours(date, count) {
16832
+ const d = new Date(date);
16833
+ d.setHours(count);
16834
+ return d;
16835
+ }
16836
+ function setMinutes(date, count) {
16837
+ const d = new Date(date);
16838
+ d.setMinutes(count);
16839
+ return d;
16840
+ }
16775
16841
  function setMonth(date, count) {
16776
16842
  const d = new Date(date);
16777
16843
  d.setMonth(count);
@@ -16805,15 +16871,30 @@ class VuetifyDateAdapter {
16805
16871
  parseISO(date) {
16806
16872
  return parseISO(date);
16807
16873
  }
16874
+ addMinutes(date, amount) {
16875
+ return addMinutes(date, amount);
16876
+ }
16877
+ addHours(date, amount) {
16878
+ return addHours(date, amount);
16879
+ }
16808
16880
  addDays(date, amount) {
16809
16881
  return addDays(date, amount);
16810
16882
  }
16883
+ addWeeks(date, amount) {
16884
+ return addWeeks(date, amount);
16885
+ }
16811
16886
  addMonths(date, amount) {
16812
16887
  return addMonths(date, amount);
16813
16888
  }
16814
16889
  getWeekArray(date) {
16815
16890
  return getWeekArray(date, this.locale);
16816
16891
  }
16892
+ startOfWeek(date) {
16893
+ return startOfWeek(date);
16894
+ }
16895
+ endOfWeek(date) {
16896
+ return endOfWeek(date);
16897
+ }
16817
16898
  startOfMonth(date) {
16818
16899
  return startOfMonth(date);
16819
16900
  }
@@ -16844,6 +16925,12 @@ class VuetifyDateAdapter {
16844
16925
  isSameMonth(date, comparing) {
16845
16926
  return isSameMonth(date, comparing);
16846
16927
  }
16928
+ setMinutes(date, count) {
16929
+ return setMinutes(date, count);
16930
+ }
16931
+ setHours(date, count) {
16932
+ return setHours(date, count);
16933
+ }
16847
16934
  setMonth(date, count) {
16848
16935
  return setMonth(date, count);
16849
16936
  }
@@ -16865,6 +16952,12 @@ class VuetifyDateAdapter {
16865
16952
  getNextMonth(date) {
16866
16953
  return getNextMonth(date);
16867
16954
  }
16955
+ getHours(date) {
16956
+ return getHours(date);
16957
+ }
16958
+ getMinutes(date) {
16959
+ return getMinutes(date);
16960
+ }
16868
16961
  startOfDay(date) {
16869
16962
  return startOfDay(date);
16870
16963
  }
@@ -17746,7 +17839,7 @@ const VDataTableFooter = genericComponent()({
17746
17839
  "last-aria-label": props.lastPageLabel,
17747
17840
  "length": pageCount.value,
17748
17841
  "next-aria-label": props.nextPageLabel,
17749
- "prev-aria-label": props.prevPageLabel,
17842
+ "previous-aria-label": props.prevPageLabel,
17750
17843
  "rounded": true,
17751
17844
  "show-first-last-page": true,
17752
17845
  "total-visible": props.showCurrentPage ? 1 : 0,
@@ -19613,21 +19706,140 @@ const VDatePickerHeader = genericComponent()({
19613
19706
  }
19614
19707
  });
19615
19708
 
19709
+ // Composables
19710
+
19616
19711
  // Types
19617
19712
 
19618
- const makeVDatePickerMonthProps = propsFactory({
19713
+ // Types
19714
+
19715
+ // Composables
19716
+ const makeCalendarProps = propsFactory({
19619
19717
  allowedDates: [Array, Function],
19620
19718
  disabled: Boolean,
19621
- color: String,
19719
+ displayValue: null,
19720
+ modelValue: Array,
19622
19721
  month: [Number, String],
19623
- hideWeekdays: Boolean,
19624
19722
  max: null,
19625
19723
  min: null,
19626
- modelValue: Array,
19627
- multiple: Boolean,
19628
19724
  showAdjacentMonths: Boolean,
19629
- showWeek: Boolean,
19630
19725
  year: [Number, String]
19726
+ }, 'calendar');
19727
+ function useCalendar(props) {
19728
+ const adapter = useDate();
19729
+ const model = useProxiedModel(props, 'modelValue', [], v => wrapInArray(v));
19730
+ const displayValue = computed(() => {
19731
+ if (props.displayValue) return adapter.date(props.displayValue);
19732
+ if (model.value.length > 0) return adapter.date(model.value[0]);
19733
+ if (props.min) return adapter.date(props.min);
19734
+ if (Array.isArray(props.allowedDates)) return adapter.date(props.allowedDates[0]);
19735
+ return adapter.date();
19736
+ });
19737
+ const year = useProxiedModel(props, 'year', undefined, v => {
19738
+ const value = v != null ? Number(v) : adapter.getYear(displayValue.value);
19739
+ return adapter.startOfYear(adapter.setYear(adapter.date(), value));
19740
+ }, v => adapter.getYear(v));
19741
+ const month = useProxiedModel(props, 'month', undefined, v => {
19742
+ const value = v != null ? Number(v) : adapter.getMonth(displayValue.value);
19743
+ const date = adapter.setYear(adapter.date(), adapter.getYear(year.value));
19744
+ return adapter.setMonth(date, value);
19745
+ }, v => adapter.getMonth(v));
19746
+ const weeksInMonth = computed(() => {
19747
+ const weeks = adapter.getWeekArray(month.value);
19748
+ const days = weeks.flat();
19749
+
19750
+ // Make sure there's always 6 weeks in month (6 * 7 days)
19751
+ // But only do it if we're not hiding adjacent months?
19752
+ const daysInMonth = 6 * 7;
19753
+ if (days.length < daysInMonth) {
19754
+ const lastDay = days[days.length - 1];
19755
+ let week = [];
19756
+ for (let day = 1; day <= daysInMonth - days.length; day++) {
19757
+ week.push(adapter.addDays(lastDay, day));
19758
+ if (day % 7 === 0) {
19759
+ weeks.push(week);
19760
+ week = [];
19761
+ }
19762
+ }
19763
+ }
19764
+ return weeks;
19765
+ });
19766
+ const genDays = (days, today) => {
19767
+ return days.map((date, index) => {
19768
+ const isoDate = adapter.toISO(date);
19769
+ const isAdjacent = !adapter.isSameMonth(date, month.value);
19770
+ const isStart = adapter.isSameDay(date, adapter.startOfMonth(month.value));
19771
+ const isEnd = adapter.isSameDay(date, adapter.endOfMonth(month.value));
19772
+ const isSame = adapter.isSameDay(date, month.value);
19773
+ return {
19774
+ date,
19775
+ isoDate,
19776
+ formatted: adapter.format(date, 'keyboardDate'),
19777
+ year: adapter.getYear(date),
19778
+ month: adapter.getMonth(date),
19779
+ isDisabled: isDisabled(date),
19780
+ isWeekStart: index % 7 === 0,
19781
+ isWeekEnd: index % 7 === 6,
19782
+ isToday: adapter.isSameDay(date, today),
19783
+ isAdjacent,
19784
+ isHidden: isAdjacent && !props.showAdjacentMonths,
19785
+ isStart,
19786
+ isSelected: model.value.some(value => adapter.isSameDay(date, value)),
19787
+ isEnd,
19788
+ isSame,
19789
+ localized: adapter.format(date, 'dayOfMonth')
19790
+ };
19791
+ });
19792
+ };
19793
+ const daysInWeek = computed(() => {
19794
+ const lastDay = adapter.startOfWeek(model.value);
19795
+ const week = [];
19796
+ for (let day = 0; day <= 6; day++) {
19797
+ week.push(adapter.addDays(lastDay, day));
19798
+ }
19799
+ const days = week;
19800
+ const today = adapter.date();
19801
+ return genDays(days, today);
19802
+ });
19803
+ const daysInMonth = computed(() => {
19804
+ const days = weeksInMonth.value.flat();
19805
+ const today = adapter.date();
19806
+ return genDays(days, today);
19807
+ });
19808
+ const weekNumbers = computed(() => {
19809
+ return weeksInMonth.value.map(week => {
19810
+ return week.length ? getWeek(adapter, week[0]) : null;
19811
+ });
19812
+ });
19813
+ function isDisabled(value) {
19814
+ if (props.disabled) return true;
19815
+ const date = adapter.date(value);
19816
+ if (props.min && adapter.isAfter(adapter.date(props.min), date)) return true;
19817
+ if (props.max && adapter.isAfter(date, adapter.date(props.max))) return true;
19818
+ if (Array.isArray(props.allowedDates) && props.allowedDates.length > 0) {
19819
+ return !props.allowedDates.some(d => adapter.isSameDay(adapter.date(d), date));
19820
+ }
19821
+ if (typeof props.allowedDates === 'function') {
19822
+ return !props.allowedDates(date);
19823
+ }
19824
+ return false;
19825
+ }
19826
+ return {
19827
+ displayValue,
19828
+ daysInMonth,
19829
+ daysInWeek,
19830
+ genDays,
19831
+ model,
19832
+ weeksInMonth,
19833
+ weekNumbers
19834
+ };
19835
+ }
19836
+
19837
+ const makeVDatePickerMonthProps = propsFactory({
19838
+ color: String,
19839
+ hideWeekdays: Boolean,
19840
+ multiple: Boolean,
19841
+ showWeek: Boolean,
19842
+ ...makeCalendarProps()
19631
19843
  }, 'VDatePickerMonth');
19632
19844
  const VDatePickerMonth = genericComponent()({
19633
19845
  name: 'VDatePickerMonth',
@@ -19643,87 +19855,12 @@ const VDatePickerMonth = genericComponent()({
19643
19855
  slots
19644
19856
  } = _ref;
19645
19857
  const daysRef = ref();
19858
+ const {
19859
+ daysInMonth,
19860
+ model,
19861
+ weekNumbers
19862
+ } = useCalendar(props); // TODO: fix typing
19646
19863
  const adapter = useDate();
19647
- // model comes in always as array
19648
- // leaves as array if multiple
19649
- const model = useProxiedModel(props, 'modelValue', [], v => wrapInArray(v));
19650
- const displayValue = computed(() => {
19651
- if (model.value.length > 0) return adapter.date(model.value[0]);
19652
- if (props.min) return adapter.date(props.min);
19653
- if (Array.isArray(props.allowedDates)) return adapter.date(props.allowedDates[0]);
19654
- return adapter.date();
19655
- });
19656
- const year = useProxiedModel(props, 'year', undefined, v => {
19657
- const value = v != null ? Number(v) : adapter.getYear(displayValue.value);
19658
- return adapter.startOfYear(adapter.setYear(adapter.date(), value));
19659
- }, v => adapter.getYear(v));
19660
- const month = useProxiedModel(props, 'month', undefined, v => {
19661
- const value = v != null ? Number(v) : adapter.getMonth(displayValue.value);
19662
- const date = adapter.setYear(adapter.date(), adapter.getYear(year.value));
19663
- return adapter.setMonth(date, value);
19664
- }, v => adapter.getMonth(v));
19665
- const weeksInMonth = computed(() => {
19666
- const weeks = adapter.getWeekArray(month.value);
19667
- const days = weeks.flat();
19668
-
19669
- // Make sure there's always 6 weeks in month (6 * 7 days)
19670
- // But only do it if we're not hiding adjacent months?
19671
- const daysInMonth = 6 * 7;
19672
- if (days.length < daysInMonth) {
19673
- const lastDay = days[days.length - 1];
19674
- let week = [];
19675
- for (let day = 1; day <= daysInMonth - days.length; day++) {
19676
- week.push(adapter.addDays(lastDay, day));
19677
- if (day % 7 === 0) {
19678
- weeks.push(week);
19679
- week = [];
19680
- }
19681
- }
19682
- }
19683
- return weeks;
19684
- });
19685
- const daysInMonth = computed(() => {
19686
- const days = weeksInMonth.value.flat();
19687
- const today = adapter.date();
19688
- return days.map((date, index) => {
19689
- const isoDate = adapter.toISO(date);
19690
- const isAdjacent = !adapter.isSameMonth(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
- isSelected: model.value.some(value => adapter.isSameDay(date, value)),
19701
- isToday: adapter.isSameDay(date, today),
19702
- isAdjacent,
19703
- isHidden: isAdjacent && !props.showAdjacentMonths,
19704
- isHovered: false,
19705
- localized: adapter.format(date, 'dayOfMonth')
19706
- };
19707
- });
19708
- });
19709
- const weeks = computed(() => {
19710
- return weeksInMonth.value.map(week => {
19711
- return getWeek(adapter, week[0]);
19712
- });
19713
- });
19714
- function isDisabled(value) {
19715
- if (props.disabled) return true;
19716
- const date = adapter.date(value);
19717
- if (props.min && adapter.isAfter(adapter.date(props.min), date)) return true;
19718
- if (props.max && adapter.isAfter(date, adapter.date(props.max))) return true;
19719
- if (Array.isArray(props.allowedDates) && props.allowedDates.length > 0) {
19720
- return !props.allowedDates.some(d => adapter.isSameDay(adapter.date(d), date));
19721
- }
19722
- if (typeof props.allowedDates === 'function') {
19723
- return !props.allowedDates(date);
19724
- }
19725
- return false;
19726
- }
19727
19864
  function onClick(value) {
19728
19865
  if (props.multiple) {
19729
19866
  const index = model.value.findIndex(selection => adapter.isSameDay(selection, value));
@@ -19738,10 +19875,6 @@ const VDatePickerMonth = genericComponent()({
19738
19875
  model.value = [value];
19739
19876
  }
19740
19877
  }
19741
- watch(displayValue, val => {
19742
- month.value = val;
19743
- year.value = val;
19744
- });
19745
19878
  return () => createVNode("div", {
19746
19879
  "class": "v-date-picker-month"
19747
19880
  }, [props.showWeek && createVNode("div", {
@@ -19750,14 +19883,14 @@ const VDatePickerMonth = genericComponent()({
19750
19883
  }, [!props.hideWeekdays && createVNode("div", {
19751
19884
  "key": "hide-week-days",
19752
19885
  "class": "v-date-picker-month__day"
19753
- }, [createTextVNode("\xA0")]), weeks.value.map(week => createVNode("div", {
19886
+ }, [createTextVNode("\xA0")]), weekNumbers.value.map(week => createVNode("div", {
19754
19887
  "class": ['v-date-picker-month__day', 'v-date-picker-month__day--adjacent']
19755
19888
  }, [week]))]), createVNode("div", {
19756
19889
  "ref": daysRef,
19757
19890
  "class": "v-date-picker-month__days"
19758
19891
  }, [!props.hideWeekdays && adapter.getWeekdays().map(weekDay => createVNode("div", {
19759
19892
  "class": ['v-date-picker-month__day', 'v-date-picker-month__weekday']
19760
- }, [weekDay])), daysInMonth.value.map((item, i) => {
19893
+ }, [weekDay[0]])), daysInMonth.value.map((item, i) => {
19761
19894
  const slotProps = {
19762
19895
  props: {
19763
19896
  onClick: () => onClick(item.date)
@@ -19769,7 +19902,6 @@ const VDatePickerMonth = genericComponent()({
19769
19902
  "class": ['v-date-picker-month__day', {
19770
19903
  'v-date-picker-month__day--adjacent': item.isAdjacent,
19771
19904
  'v-date-picker-month__day--hide-adjacent': item.isHidden,
19772
- 'v-date-picker-month__day--hovered': item.isHovered,
19773
19905
  'v-date-picker-month__day--selected': item.isSelected,
19774
19906
  'v-date-picker-month__day--week-end': item.isWeekEnd,
19775
19907
  'v-date-picker-month__day--week-start': item.isWeekStart
@@ -20186,7 +20318,10 @@ const VDatePicker = genericComponent()({
20186
20318
  "key": "header"
20187
20319
  }, datePickerHeaderProps, headerProps, {
20188
20320
  "onClick": viewMode.value !== 'month' ? onClickDate : undefined
20189
- }), slots),
20321
+ }), {
20322
+ ...slots,
20323
+ default: undefined
20324
+ }),
20190
20325
  default: () => createVNode(Fragment, null, [createVNode(VDatePickerControls, mergeProps(datePickerControlsProps, {
20191
20326
  "disabled": disabled.value,
20192
20327
  "text": text.value,
@@ -22050,6 +22185,7 @@ const VOtpInput = genericComponent()({
22050
22185
  "key": i
22051
22186
  }, {
22052
22187
  ...slots,
22188
+ loader: undefined,
22053
22189
  default: () => {
22054
22190
  return createVNode("input", {
22055
22191
  "ref": val => inputRef.value[i] = val,
@@ -25200,7 +25336,7 @@ function createVuetify$1() {
25200
25336
  date
25201
25337
  };
25202
25338
  }
25203
- const version$1 = "3.4.7";
25339
+ const version$1 = "3.4.9";
25204
25340
  createVuetify$1.version = version$1;
25205
25341
 
25206
25342
  // Vue's inject() can only be used in setup
@@ -25225,7 +25361,7 @@ const createVuetify = function () {
25225
25361
  ...options
25226
25362
  });
25227
25363
  };
25228
- const version = "3.4.7";
25364
+ const version = "3.4.9";
25229
25365
  createVuetify.version = version;
25230
25366
 
25231
25367
  export { components, createVuetify, directives, useDate, useDefaults, useDisplay, useLayout, useLocale, useRtl, useTheme, version };