@vuetify/nightly 3.8.1-dev.2025-04-07 → 3.8.1-master.2025-04-08

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 (47) hide show
  1. package/CHANGELOG.md +9 -5
  2. package/dist/json/attributes.json +2967 -2967
  3. package/dist/json/importMap-labs.json +36 -36
  4. package/dist/json/importMap.json +172 -172
  5. package/dist/json/web-types.json +5714 -5714
  6. package/dist/vuetify-labs.cjs +108 -191
  7. package/dist/vuetify-labs.css +3534 -3534
  8. package/dist/vuetify-labs.d.ts +67 -65
  9. package/dist/vuetify-labs.esm.js +108 -191
  10. package/dist/vuetify-labs.esm.js.map +1 -1
  11. package/dist/vuetify-labs.js +108 -191
  12. package/dist/vuetify-labs.min.css +2 -2
  13. package/dist/vuetify.cjs +108 -191
  14. package/dist/vuetify.cjs.map +1 -1
  15. package/dist/vuetify.css +5837 -5837
  16. package/dist/vuetify.d.ts +67 -65
  17. package/dist/vuetify.esm.js +108 -191
  18. package/dist/vuetify.esm.js.map +1 -1
  19. package/dist/vuetify.js +108 -191
  20. package/dist/vuetify.js.map +1 -1
  21. package/dist/vuetify.min.css +2 -2
  22. package/dist/vuetify.min.js +278 -266
  23. package/dist/vuetify.min.js.map +1 -1
  24. package/lib/components/VDataTable/VDataTable.css +1 -1
  25. package/lib/components/VDataTable/VDataTable.sass +1 -1
  26. package/lib/composables/calendar.js +2 -2
  27. package/lib/composables/calendar.js.map +1 -1
  28. package/lib/composables/date/DateAdapter.d.ts +1 -0
  29. package/lib/composables/date/DateAdapter.js.map +1 -1
  30. package/lib/composables/date/adapters/vuetify.d.ts +1 -0
  31. package/lib/composables/date/adapters/vuetify.js +101 -160
  32. package/lib/composables/date/adapters/vuetify.js.map +1 -1
  33. package/lib/composables/date/date.d.ts +1 -1
  34. package/lib/composables/date/date.js +0 -20
  35. package/lib/composables/date/date.js.map +1 -1
  36. package/lib/composables/filter.js +2 -1
  37. package/lib/composables/filter.js.map +1 -1
  38. package/lib/composables/virtual.js +1 -6
  39. package/lib/composables/virtual.js.map +1 -1
  40. package/lib/entry-bundler.d.ts +1 -0
  41. package/lib/entry-bundler.js +1 -1
  42. package/lib/entry-bundler.js.map +1 -1
  43. package/lib/framework.d.ts +67 -65
  44. package/lib/framework.js +1 -1
  45. package/lib/framework.js.map +1 -1
  46. package/lib/labs/entry-bundler.d.ts +1 -0
  47. package/package.json +4 -4
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Vuetify v3.8.1-dev.2025-04-07
2
+ * Vuetify v3.8.1-master.2025-04-08
3
3
  * Forged by John Leider
4
4
  * Released under the MIT License.
5
5
  */
@@ -12307,12 +12307,7 @@
12307
12307
  }
12308
12308
  function calculateOffset(index) {
12309
12309
  index = clamp(index, 0, items.value.length - 1);
12310
- const whole = Math.floor(index);
12311
- const fraction = index % 1;
12312
- const next = whole + 1;
12313
- const wholeOffset = offsets[whole] || 0;
12314
- const nextOffset = offsets[next] || wholeOffset;
12315
- return wholeOffset + (nextOffset - wholeOffset) * fraction;
12310
+ return offsets[index] || 0;
12316
12311
  }
12317
12312
  function calculateIndex(scrollTop) {
12318
12313
  return binaryClosest(offsets, scrollTop);
@@ -13059,6 +13054,7 @@
13059
13054
  // Composables
13060
13055
  const defaultFilter = (value, query, item) => {
13061
13056
  if (value == null || query == null) return -1;
13057
+ if (!query.length) return 0;
13062
13058
  value = value.toString().toLocaleLowerCase();
13063
13059
  query = query.toString().toLocaleLowerCase();
13064
13060
  const result = [];
@@ -13071,7 +13067,7 @@
13071
13067
  };
13072
13068
  function normaliseMatch(match, query) {
13073
13069
  if (match == null || typeof match === 'boolean' || match === -1) return;
13074
- if (typeof match === 'number') return [[match, query.length]];
13070
+ if (typeof match === 'number') return [[match, match + query.length]];
13075
13071
  if (Array.isArray(match[0])) return match;
13076
13072
  return [match];
13077
13073
  }
@@ -16986,165 +16982,81 @@
16986
16982
 
16987
16983
  // Types
16988
16984
 
16989
- const firstDay = {
16990
- '001': 1,
16991
- AD: 1,
16992
- AE: 6,
16993
- AF: 6,
16994
- AG: 0,
16995
- AI: 1,
16996
- AL: 1,
16997
- AM: 1,
16998
- AN: 1,
16999
- AR: 1,
17000
- AS: 0,
17001
- AT: 1,
17002
- AU: 1,
17003
- AX: 1,
17004
- AZ: 1,
17005
- BA: 1,
17006
- BD: 0,
17007
- BE: 1,
17008
- BG: 1,
17009
- BH: 6,
17010
- BM: 1,
17011
- BN: 1,
17012
- BR: 0,
17013
- BS: 0,
17014
- BT: 0,
17015
- BW: 0,
17016
- BY: 1,
17017
- BZ: 0,
17018
- CA: 0,
17019
- CH: 1,
17020
- CL: 1,
17021
- CM: 1,
17022
- CN: 1,
17023
- CO: 0,
17024
- CR: 1,
17025
- CY: 1,
17026
- CZ: 1,
17027
- DE: 1,
17028
- DJ: 6,
17029
- DK: 1,
17030
- DM: 0,
17031
- DO: 0,
17032
- DZ: 6,
17033
- EC: 1,
17034
- EE: 1,
17035
- EG: 6,
17036
- ES: 1,
17037
- ET: 0,
17038
- FI: 1,
17039
- FJ: 1,
17040
- FO: 1,
17041
- FR: 1,
17042
- GB: 1,
17043
- 'GB-alt-variant': 0,
17044
- GE: 1,
17045
- GF: 1,
17046
- GP: 1,
17047
- GR: 1,
17048
- GT: 0,
17049
- GU: 0,
17050
- HK: 0,
17051
- HN: 0,
17052
- HR: 1,
17053
- HU: 1,
17054
- ID: 0,
17055
- IE: 1,
17056
- IL: 0,
17057
- IN: 0,
17058
- IQ: 6,
17059
- IR: 6,
17060
- IS: 1,
17061
- IT: 1,
17062
- JM: 0,
17063
- JO: 6,
17064
- JP: 0,
17065
- KE: 0,
17066
- KG: 1,
17067
- KH: 0,
17068
- KR: 0,
17069
- KW: 6,
17070
- KZ: 1,
17071
- LA: 0,
17072
- LB: 1,
17073
- LI: 1,
17074
- LK: 1,
17075
- LT: 1,
17076
- LU: 1,
17077
- LV: 1,
17078
- LY: 6,
17079
- MC: 1,
17080
- MD: 1,
17081
- ME: 1,
17082
- MH: 0,
17083
- MK: 1,
17084
- MM: 0,
17085
- MN: 1,
17086
- MO: 0,
17087
- MQ: 1,
17088
- MT: 0,
17089
- MV: 5,
17090
- MX: 0,
17091
- MY: 1,
17092
- MZ: 0,
17093
- NI: 0,
17094
- NL: 1,
17095
- NO: 1,
17096
- NP: 0,
17097
- NZ: 1,
17098
- OM: 6,
17099
- PA: 0,
17100
- PE: 0,
17101
- PH: 0,
17102
- PK: 0,
17103
- PL: 1,
17104
- PR: 0,
17105
- PT: 0,
17106
- PY: 0,
17107
- QA: 6,
17108
- RE: 1,
17109
- RO: 1,
17110
- RS: 1,
17111
- RU: 1,
17112
- SA: 0,
17113
- SD: 6,
17114
- SE: 1,
17115
- SG: 0,
17116
- SI: 1,
17117
- SK: 1,
17118
- SM: 1,
17119
- SV: 0,
17120
- SY: 6,
17121
- TH: 0,
17122
- TJ: 1,
17123
- TM: 1,
17124
- TR: 1,
17125
- TT: 0,
17126
- TW: 0,
17127
- UA: 1,
17128
- UM: 0,
17129
- US: 0,
17130
- UY: 1,
17131
- UZ: 1,
17132
- VA: 1,
17133
- VE: 0,
17134
- VI: 0,
17135
- VN: 1,
17136
- WS: 0,
17137
- XK: 1,
17138
- YE: 0,
17139
- ZA: 0,
17140
- ZW: 0
17141
- };
16985
+ function weekInfo(locale) {
16986
+ // https://simplelocalize.io/data/locales/
16987
+ // then `new Intl.Locale(...).getWeekInfo()`
16988
+ const code = locale.slice(-2).toUpperCase();
16989
+ switch (true) {
16990
+ case locale === 'GB-alt-variant':
16991
+ {
16992
+ return {
16993
+ firstDay: 0,
16994
+ firstWeekSize: 4
16995
+ };
16996
+ }
16997
+ case locale === '001':
16998
+ {
16999
+ return {
17000
+ firstDay: 1,
17001
+ firstWeekSize: 1
17002
+ };
17003
+ }
17004
+ case `AG AS BD BR BS BT BW BZ CA CO DM DO ET GT GU HK HN ID IL IN JM JP KE
17005
+ KH KR LA MH MM MO MT MX MZ NI NP PA PE PH PK PR PY SA SG SV TH TT TW UM US
17006
+ VE VI WS YE ZA ZW`.includes(code):
17007
+ {
17008
+ return {
17009
+ firstDay: 0,
17010
+ firstWeekSize: 1
17011
+ };
17012
+ }
17013
+ case `AI AL AM AR AU AZ BA BM BN BY CL CM CN CR CY EC GE HR KG KZ LB LK LV
17014
+ MD ME MK MN MY NZ RO RS SI TJ TM TR UA UY UZ VN XK`.includes(code):
17015
+ {
17016
+ return {
17017
+ firstDay: 1,
17018
+ firstWeekSize: 1
17019
+ };
17020
+ }
17021
+ case `AD AN AT AX BE BG CH CZ DE DK EE ES FI FJ FO FR GB GF GP GR HU IE IS
17022
+ IT LI LT LU MC MQ NL NO PL RE RU SE SK SM VA`.includes(code):
17023
+ {
17024
+ return {
17025
+ firstDay: 1,
17026
+ firstWeekSize: 4
17027
+ };
17028
+ }
17029
+ case `AE AF BH DJ DZ EG IQ IR JO KW LY OM QA SD SY`.includes(code):
17030
+ {
17031
+ return {
17032
+ firstDay: 6,
17033
+ firstWeekSize: 1
17034
+ };
17035
+ }
17036
+ case code === 'MV':
17037
+ {
17038
+ return {
17039
+ firstDay: 5,
17040
+ firstWeekSize: 1
17041
+ };
17042
+ }
17043
+ case code === 'PT':
17044
+ {
17045
+ return {
17046
+ firstDay: 0,
17047
+ firstWeekSize: 4
17048
+ };
17049
+ }
17050
+ default:
17051
+ return null;
17052
+ }
17053
+ }
17142
17054
  function getWeekArray(date, locale, firstDayOfWeek) {
17143
17055
  const weeks = [];
17144
17056
  let currentWeek = [];
17145
17057
  const firstDayOfMonth = startOfMonth(date);
17146
17058
  const lastDayOfMonth = endOfMonth(date);
17147
- const first = firstDayOfWeek ?? firstDay[locale.slice(-2).toUpperCase()] ?? 0;
17059
+ const first = firstDayOfWeek ?? weekInfo(locale)?.firstDay ?? 0;
17148
17060
  const firstDayWeekIndex = (firstDayOfMonth.getDay() - first + 7) % 7;
17149
17061
  const lastDayWeekIndex = (lastDayOfMonth.getDay() - first + 7) % 7;
17150
17062
  for (let i = 0; i < firstDayWeekIndex; i++) {
@@ -17175,7 +17087,7 @@
17175
17087
  return weeks;
17176
17088
  }
17177
17089
  function startOfWeek(date, locale, firstDayOfWeek) {
17178
- const day = firstDayOfWeek ?? firstDay[locale.slice(-2).toUpperCase()] ?? 0;
17090
+ const day = firstDayOfWeek ?? weekInfo(locale)?.firstDay ?? 0;
17179
17091
  const d = new Date(date);
17180
17092
  while (d.getDay() !== day) {
17181
17093
  d.setDate(d.getDate() - 1);
@@ -17184,7 +17096,7 @@
17184
17096
  }
17185
17097
  function endOfWeek(date, locale) {
17186
17098
  const d = new Date(date);
17187
- const lastDay = ((firstDay[locale.slice(-2).toUpperCase()] ?? 0) + 6) % 7;
17099
+ const lastDay = ((weekInfo(locale)?.firstDay ?? 0) + 6) % 7;
17188
17100
  while (d.getDay() !== lastDay) {
17189
17101
  d.setDate(d.getDate() + 1);
17190
17102
  }
@@ -17219,7 +17131,7 @@
17219
17131
  }
17220
17132
  const sundayJanuarySecond2000 = new Date(2000, 0, 2);
17221
17133
  function getWeekdays(locale, firstDayOfWeek) {
17222
- const daysFromSunday = firstDayOfWeek ?? firstDay[locale.slice(-2).toUpperCase()] ?? 0;
17134
+ const daysFromSunday = firstDayOfWeek ?? weekInfo(locale)?.firstDay ?? 0;
17223
17135
  return createRange(7).map(i => {
17224
17136
  const weekday = new Date(sundayJanuarySecond2000);
17225
17137
  weekday.setDate(sundayJanuarySecond2000.getDate() + daysFromSunday + i);
@@ -17467,6 +17379,24 @@
17467
17379
  function getMonth(date) {
17468
17380
  return date.getMonth();
17469
17381
  }
17382
+ function getWeek(date, locale, firstDayOfWeek, firstWeekMinSize) {
17383
+ const weekInfoFromLocale = weekInfo(locale);
17384
+ const weekStart = firstDayOfWeek ?? weekInfoFromLocale?.firstDay ?? 0;
17385
+ const minWeekSize = firstWeekMinSize ?? weekInfoFromLocale?.firstWeekSize ?? 1;
17386
+ function firstWeekSize(year) {
17387
+ const yearStart = new Date(year, 0, 1);
17388
+ return 7 - getDiff(yearStart, startOfWeek(yearStart, locale, weekStart), 'days');
17389
+ }
17390
+ let year = getYear(date);
17391
+ const currentWeekEnd = addDays(startOfWeek(date, locale, weekStart), 6);
17392
+ if (year < getYear(currentWeekEnd) && firstWeekSize(year + 1) >= minWeekSize) {
17393
+ year++;
17394
+ }
17395
+ const yearStart = new Date(year, 0, 1);
17396
+ const size = firstWeekSize(year);
17397
+ const d1w1 = size >= minWeekSize ? addDays(yearStart, size - 7) : addDays(yearStart, size);
17398
+ return 1 + getDiff(date, d1w1, 'weeks');
17399
+ }
17470
17400
  function getDate(date) {
17471
17401
  return date.getDate();
17472
17402
  }
@@ -17606,10 +17536,12 @@
17606
17536
  return addMonths(date, amount);
17607
17537
  }
17608
17538
  getWeekArray(date, firstDayOfWeek) {
17609
- return getWeekArray(date, this.locale, firstDayOfWeek ? Number(firstDayOfWeek) : undefined);
17539
+ const firstDay = firstDayOfWeek !== undefined ? Number(firstDayOfWeek) : undefined;
17540
+ return getWeekArray(date, this.locale, firstDay);
17610
17541
  }
17611
17542
  startOfWeek(date, firstDayOfWeek) {
17612
- return startOfWeek(date, this.locale, firstDayOfWeek ? Number(firstDayOfWeek) : undefined);
17543
+ const firstDay = firstDayOfWeek !== undefined ? Number(firstDayOfWeek) : undefined;
17544
+ return startOfWeek(date, this.locale, firstDay);
17613
17545
  }
17614
17546
  endOfWeek(date) {
17615
17547
  return endOfWeek(date, this.locale);
@@ -17669,7 +17601,8 @@
17669
17601
  return getDiff(date, comparing, unit);
17670
17602
  }
17671
17603
  getWeekdays(firstDayOfWeek) {
17672
- return getWeekdays(this.locale, firstDayOfWeek ? Number(firstDayOfWeek) : undefined);
17604
+ const firstDay = firstDayOfWeek !== undefined ? Number(firstDayOfWeek) : undefined;
17605
+ return getWeekdays(this.locale, firstDay);
17673
17606
  }
17674
17607
  getYear(date) {
17675
17608
  return getYear(date);
@@ -17677,6 +17610,10 @@
17677
17610
  getMonth(date) {
17678
17611
  return getMonth(date);
17679
17612
  }
17613
+ getWeek(date, firstDayOfWeek, firstWeekMinSize) {
17614
+ const firstDay = firstDayOfWeek !== undefined ? Number(firstDayOfWeek) : undefined;
17615
+ return getWeek(date, this.locale, firstDay, firstWeekMinSize);
17616
+ }
17680
17617
  getDate(date) {
17681
17618
  return getDate(date);
17682
17619
  }
@@ -17780,26 +17717,6 @@
17780
17717
  return createInstance(options, locale);
17781
17718
  }
17782
17719
 
17783
- // https://stackoverflow.com/questions/274861/how-do-i-calculate-the-week-number-given-a-date/275024#275024
17784
- function getWeek(adapter, value) {
17785
- const date = adapter.toJsDate(value);
17786
- let year = date.getFullYear();
17787
- let d1w1 = new Date(year, 0, 1);
17788
- if (date < d1w1) {
17789
- year = year - 1;
17790
- d1w1 = new Date(year, 0, 1);
17791
- } else {
17792
- const tv = new Date(year + 1, 0, 1);
17793
- if (date >= tv) {
17794
- year = year + 1;
17795
- d1w1 = tv;
17796
- }
17797
- }
17798
- const diffTime = Math.abs(date.getTime() - d1w1.getTime());
17799
- const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
17800
- return Math.floor(diffDays / 7) + 1;
17801
- }
17802
-
17803
17720
  // Types
17804
17721
 
17805
17722
  const makeVColorPickerProps = propsFactory({
@@ -22082,7 +21999,7 @@
22082
21999
  });
22083
22000
  const weekNumbers = vue.computed(() => {
22084
22001
  return weeksInMonth.value.map(week => {
22085
- return week.length ? getWeek(adapter, week[0]) : null;
22002
+ return week.length ? adapter.getWeek(week[0], props.firstDayOfWeek) : null;
22086
22003
  });
22087
22004
  });
22088
22005
  function isDisabled(value) {
@@ -31569,7 +31486,7 @@
31569
31486
  };
31570
31487
  });
31571
31488
  }
31572
- const version$1 = "3.8.1-dev.2025-04-07";
31489
+ const version$1 = "3.8.1-master.2025-04-08";
31573
31490
  createVuetify$1.version = version$1;
31574
31491
 
31575
31492
  // Vue's inject() can only be used in setup
@@ -31854,7 +31771,7 @@
31854
31771
 
31855
31772
  /* eslint-disable local-rules/sort-imports */
31856
31773
 
31857
- const version = "3.8.1-dev.2025-04-07";
31774
+ const version = "3.8.1-master.2025-04-08";
31858
31775
 
31859
31776
  /* eslint-disable local-rules/sort-imports */
31860
31777