@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
package/dist/vuetify.js CHANGED
@@ -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
  */
@@ -12572,12 +12572,7 @@
12572
12572
  }
12573
12573
  function calculateOffset(index) {
12574
12574
  index = clamp(index, 0, items.value.length - 1);
12575
- const whole = Math.floor(index);
12576
- const fraction = index % 1;
12577
- const next = whole + 1;
12578
- const wholeOffset = offsets[whole] || 0;
12579
- const nextOffset = offsets[next] || wholeOffset;
12580
- return wholeOffset + (nextOffset - wholeOffset) * fraction;
12575
+ return offsets[index] || 0;
12581
12576
  }
12582
12577
  function calculateIndex(scrollTop) {
12583
12578
  return binaryClosest(offsets, scrollTop);
@@ -13324,6 +13319,7 @@
13324
13319
  // Composables
13325
13320
  const defaultFilter = (value, query, item) => {
13326
13321
  if (value == null || query == null) return -1;
13322
+ if (!query.length) return 0;
13327
13323
  value = value.toString().toLocaleLowerCase();
13328
13324
  query = query.toString().toLocaleLowerCase();
13329
13325
  const result = [];
@@ -13336,7 +13332,7 @@
13336
13332
  };
13337
13333
  function normaliseMatch(match, query) {
13338
13334
  if (match == null || typeof match === 'boolean' || match === -1) return;
13339
- if (typeof match === 'number') return [[match, query.length]];
13335
+ if (typeof match === 'number') return [[match, match + query.length]];
13340
13336
  if (Array.isArray(match[0])) return match;
13341
13337
  return [match];
13342
13338
  }
@@ -17251,165 +17247,81 @@
17251
17247
 
17252
17248
  // Types
17253
17249
 
17254
- const firstDay = {
17255
- '001': 1,
17256
- AD: 1,
17257
- AE: 6,
17258
- AF: 6,
17259
- AG: 0,
17260
- AI: 1,
17261
- AL: 1,
17262
- AM: 1,
17263
- AN: 1,
17264
- AR: 1,
17265
- AS: 0,
17266
- AT: 1,
17267
- AU: 1,
17268
- AX: 1,
17269
- AZ: 1,
17270
- BA: 1,
17271
- BD: 0,
17272
- BE: 1,
17273
- BG: 1,
17274
- BH: 6,
17275
- BM: 1,
17276
- BN: 1,
17277
- BR: 0,
17278
- BS: 0,
17279
- BT: 0,
17280
- BW: 0,
17281
- BY: 1,
17282
- BZ: 0,
17283
- CA: 0,
17284
- CH: 1,
17285
- CL: 1,
17286
- CM: 1,
17287
- CN: 1,
17288
- CO: 0,
17289
- CR: 1,
17290
- CY: 1,
17291
- CZ: 1,
17292
- DE: 1,
17293
- DJ: 6,
17294
- DK: 1,
17295
- DM: 0,
17296
- DO: 0,
17297
- DZ: 6,
17298
- EC: 1,
17299
- EE: 1,
17300
- EG: 6,
17301
- ES: 1,
17302
- ET: 0,
17303
- FI: 1,
17304
- FJ: 1,
17305
- FO: 1,
17306
- FR: 1,
17307
- GB: 1,
17308
- 'GB-alt-variant': 0,
17309
- GE: 1,
17310
- GF: 1,
17311
- GP: 1,
17312
- GR: 1,
17313
- GT: 0,
17314
- GU: 0,
17315
- HK: 0,
17316
- HN: 0,
17317
- HR: 1,
17318
- HU: 1,
17319
- ID: 0,
17320
- IE: 1,
17321
- IL: 0,
17322
- IN: 0,
17323
- IQ: 6,
17324
- IR: 6,
17325
- IS: 1,
17326
- IT: 1,
17327
- JM: 0,
17328
- JO: 6,
17329
- JP: 0,
17330
- KE: 0,
17331
- KG: 1,
17332
- KH: 0,
17333
- KR: 0,
17334
- KW: 6,
17335
- KZ: 1,
17336
- LA: 0,
17337
- LB: 1,
17338
- LI: 1,
17339
- LK: 1,
17340
- LT: 1,
17341
- LU: 1,
17342
- LV: 1,
17343
- LY: 6,
17344
- MC: 1,
17345
- MD: 1,
17346
- ME: 1,
17347
- MH: 0,
17348
- MK: 1,
17349
- MM: 0,
17350
- MN: 1,
17351
- MO: 0,
17352
- MQ: 1,
17353
- MT: 0,
17354
- MV: 5,
17355
- MX: 0,
17356
- MY: 1,
17357
- MZ: 0,
17358
- NI: 0,
17359
- NL: 1,
17360
- NO: 1,
17361
- NP: 0,
17362
- NZ: 1,
17363
- OM: 6,
17364
- PA: 0,
17365
- PE: 0,
17366
- PH: 0,
17367
- PK: 0,
17368
- PL: 1,
17369
- PR: 0,
17370
- PT: 0,
17371
- PY: 0,
17372
- QA: 6,
17373
- RE: 1,
17374
- RO: 1,
17375
- RS: 1,
17376
- RU: 1,
17377
- SA: 0,
17378
- SD: 6,
17379
- SE: 1,
17380
- SG: 0,
17381
- SI: 1,
17382
- SK: 1,
17383
- SM: 1,
17384
- SV: 0,
17385
- SY: 6,
17386
- TH: 0,
17387
- TJ: 1,
17388
- TM: 1,
17389
- TR: 1,
17390
- TT: 0,
17391
- TW: 0,
17392
- UA: 1,
17393
- UM: 0,
17394
- US: 0,
17395
- UY: 1,
17396
- UZ: 1,
17397
- VA: 1,
17398
- VE: 0,
17399
- VI: 0,
17400
- VN: 1,
17401
- WS: 0,
17402
- XK: 1,
17403
- YE: 0,
17404
- ZA: 0,
17405
- ZW: 0
17406
- };
17250
+ function weekInfo(locale) {
17251
+ // https://simplelocalize.io/data/locales/
17252
+ // then `new Intl.Locale(...).getWeekInfo()`
17253
+ const code = locale.slice(-2).toUpperCase();
17254
+ switch (true) {
17255
+ case locale === 'GB-alt-variant':
17256
+ {
17257
+ return {
17258
+ firstDay: 0,
17259
+ firstWeekSize: 4
17260
+ };
17261
+ }
17262
+ case locale === '001':
17263
+ {
17264
+ return {
17265
+ firstDay: 1,
17266
+ firstWeekSize: 1
17267
+ };
17268
+ }
17269
+ case `AG AS BD BR BS BT BW BZ CA CO DM DO ET GT GU HK HN ID IL IN JM JP KE
17270
+ 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
17271
+ VE VI WS YE ZA ZW`.includes(code):
17272
+ {
17273
+ return {
17274
+ firstDay: 0,
17275
+ firstWeekSize: 1
17276
+ };
17277
+ }
17278
+ case `AI AL AM AR AU AZ BA BM BN BY CL CM CN CR CY EC GE HR KG KZ LB LK LV
17279
+ MD ME MK MN MY NZ RO RS SI TJ TM TR UA UY UZ VN XK`.includes(code):
17280
+ {
17281
+ return {
17282
+ firstDay: 1,
17283
+ firstWeekSize: 1
17284
+ };
17285
+ }
17286
+ case `AD AN AT AX BE BG CH CZ DE DK EE ES FI FJ FO FR GB GF GP GR HU IE IS
17287
+ IT LI LT LU MC MQ NL NO PL RE RU SE SK SM VA`.includes(code):
17288
+ {
17289
+ return {
17290
+ firstDay: 1,
17291
+ firstWeekSize: 4
17292
+ };
17293
+ }
17294
+ case `AE AF BH DJ DZ EG IQ IR JO KW LY OM QA SD SY`.includes(code):
17295
+ {
17296
+ return {
17297
+ firstDay: 6,
17298
+ firstWeekSize: 1
17299
+ };
17300
+ }
17301
+ case code === 'MV':
17302
+ {
17303
+ return {
17304
+ firstDay: 5,
17305
+ firstWeekSize: 1
17306
+ };
17307
+ }
17308
+ case code === 'PT':
17309
+ {
17310
+ return {
17311
+ firstDay: 0,
17312
+ firstWeekSize: 4
17313
+ };
17314
+ }
17315
+ default:
17316
+ return null;
17317
+ }
17318
+ }
17407
17319
  function getWeekArray(date, locale, firstDayOfWeek) {
17408
17320
  const weeks = [];
17409
17321
  let currentWeek = [];
17410
17322
  const firstDayOfMonth = startOfMonth(date);
17411
17323
  const lastDayOfMonth = endOfMonth(date);
17412
- const first = firstDayOfWeek ?? firstDay[locale.slice(-2).toUpperCase()] ?? 0;
17324
+ const first = firstDayOfWeek ?? weekInfo(locale)?.firstDay ?? 0;
17413
17325
  const firstDayWeekIndex = (firstDayOfMonth.getDay() - first + 7) % 7;
17414
17326
  const lastDayWeekIndex = (lastDayOfMonth.getDay() - first + 7) % 7;
17415
17327
  for (let i = 0; i < firstDayWeekIndex; i++) {
@@ -17440,7 +17352,7 @@
17440
17352
  return weeks;
17441
17353
  }
17442
17354
  function startOfWeek(date, locale, firstDayOfWeek) {
17443
- const day = firstDayOfWeek ?? firstDay[locale.slice(-2).toUpperCase()] ?? 0;
17355
+ const day = firstDayOfWeek ?? weekInfo(locale)?.firstDay ?? 0;
17444
17356
  const d = new Date(date);
17445
17357
  while (d.getDay() !== day) {
17446
17358
  d.setDate(d.getDate() - 1);
@@ -17449,7 +17361,7 @@
17449
17361
  }
17450
17362
  function endOfWeek(date, locale) {
17451
17363
  const d = new Date(date);
17452
- const lastDay = ((firstDay[locale.slice(-2).toUpperCase()] ?? 0) + 6) % 7;
17364
+ const lastDay = ((weekInfo(locale)?.firstDay ?? 0) + 6) % 7;
17453
17365
  while (d.getDay() !== lastDay) {
17454
17366
  d.setDate(d.getDate() + 1);
17455
17367
  }
@@ -17484,7 +17396,7 @@
17484
17396
  }
17485
17397
  const sundayJanuarySecond2000 = new Date(2000, 0, 2);
17486
17398
  function getWeekdays(locale, firstDayOfWeek) {
17487
- const daysFromSunday = firstDayOfWeek ?? firstDay[locale.slice(-2).toUpperCase()] ?? 0;
17399
+ const daysFromSunday = firstDayOfWeek ?? weekInfo(locale)?.firstDay ?? 0;
17488
17400
  return createRange(7).map(i => {
17489
17401
  const weekday = new Date(sundayJanuarySecond2000);
17490
17402
  weekday.setDate(sundayJanuarySecond2000.getDate() + daysFromSunday + i);
@@ -17732,6 +17644,24 @@
17732
17644
  function getMonth(date) {
17733
17645
  return date.getMonth();
17734
17646
  }
17647
+ function getWeek(date, locale, firstDayOfWeek, firstWeekMinSize) {
17648
+ const weekInfoFromLocale = weekInfo(locale);
17649
+ const weekStart = firstDayOfWeek ?? weekInfoFromLocale?.firstDay ?? 0;
17650
+ const minWeekSize = firstWeekMinSize ?? weekInfoFromLocale?.firstWeekSize ?? 1;
17651
+ function firstWeekSize(year) {
17652
+ const yearStart = new Date(year, 0, 1);
17653
+ return 7 - getDiff(yearStart, startOfWeek(yearStart, locale, weekStart), 'days');
17654
+ }
17655
+ let year = getYear(date);
17656
+ const currentWeekEnd = addDays(startOfWeek(date, locale, weekStart), 6);
17657
+ if (year < getYear(currentWeekEnd) && firstWeekSize(year + 1) >= minWeekSize) {
17658
+ year++;
17659
+ }
17660
+ const yearStart = new Date(year, 0, 1);
17661
+ const size = firstWeekSize(year);
17662
+ const d1w1 = size >= minWeekSize ? addDays(yearStart, size - 7) : addDays(yearStart, size);
17663
+ return 1 + getDiff(date, d1w1, 'weeks');
17664
+ }
17735
17665
  function getDate(date) {
17736
17666
  return date.getDate();
17737
17667
  }
@@ -17871,10 +17801,12 @@
17871
17801
  return addMonths(date, amount);
17872
17802
  }
17873
17803
  getWeekArray(date, firstDayOfWeek) {
17874
- return getWeekArray(date, this.locale, firstDayOfWeek ? Number(firstDayOfWeek) : undefined);
17804
+ const firstDay = firstDayOfWeek !== undefined ? Number(firstDayOfWeek) : undefined;
17805
+ return getWeekArray(date, this.locale, firstDay);
17875
17806
  }
17876
17807
  startOfWeek(date, firstDayOfWeek) {
17877
- return startOfWeek(date, this.locale, firstDayOfWeek ? Number(firstDayOfWeek) : undefined);
17808
+ const firstDay = firstDayOfWeek !== undefined ? Number(firstDayOfWeek) : undefined;
17809
+ return startOfWeek(date, this.locale, firstDay);
17878
17810
  }
17879
17811
  endOfWeek(date) {
17880
17812
  return endOfWeek(date, this.locale);
@@ -17934,7 +17866,8 @@
17934
17866
  return getDiff(date, comparing, unit);
17935
17867
  }
17936
17868
  getWeekdays(firstDayOfWeek) {
17937
- return getWeekdays(this.locale, firstDayOfWeek ? Number(firstDayOfWeek) : undefined);
17869
+ const firstDay = firstDayOfWeek !== undefined ? Number(firstDayOfWeek) : undefined;
17870
+ return getWeekdays(this.locale, firstDay);
17938
17871
  }
17939
17872
  getYear(date) {
17940
17873
  return getYear(date);
@@ -17942,6 +17875,10 @@
17942
17875
  getMonth(date) {
17943
17876
  return getMonth(date);
17944
17877
  }
17878
+ getWeek(date, firstDayOfWeek, firstWeekMinSize) {
17879
+ const firstDay = firstDayOfWeek !== undefined ? Number(firstDayOfWeek) : undefined;
17880
+ return getWeek(date, this.locale, firstDay, firstWeekMinSize);
17881
+ }
17945
17882
  getDate(date) {
17946
17883
  return getDate(date);
17947
17884
  }
@@ -18045,26 +17982,6 @@
18045
17982
  return createInstance(options, locale);
18046
17983
  }
18047
17984
 
18048
- // https://stackoverflow.com/questions/274861/how-do-i-calculate-the-week-number-given-a-date/275024#275024
18049
- function getWeek(adapter, value) {
18050
- const date = adapter.toJsDate(value);
18051
- let year = date.getFullYear();
18052
- let d1w1 = new Date(year, 0, 1);
18053
- if (date < d1w1) {
18054
- year = year - 1;
18055
- d1w1 = new Date(year, 0, 1);
18056
- } else {
18057
- const tv = new Date(year + 1, 0, 1);
18058
- if (date >= tv) {
18059
- year = year + 1;
18060
- d1w1 = tv;
18061
- }
18062
- }
18063
- const diffTime = Math.abs(date.getTime() - d1w1.getTime());
18064
- const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
18065
- return Math.floor(diffDays / 7) + 1;
18066
- }
18067
-
18068
17985
  // Types
18069
17986
 
18070
17987
  const makeVColorPickerProps = propsFactory({
@@ -22347,7 +22264,7 @@
22347
22264
  });
22348
22265
  const weekNumbers = vue.computed(() => {
22349
22266
  return weeksInMonth.value.map(week => {
22350
- return week.length ? getWeek(adapter, week[0]) : null;
22267
+ return week.length ? adapter.getWeek(week[0], props.firstDayOfWeek) : null;
22351
22268
  });
22352
22269
  });
22353
22270
  function isDisabled(value) {
@@ -29245,7 +29162,7 @@
29245
29162
  };
29246
29163
  });
29247
29164
  }
29248
- const version$1 = "3.8.1-dev.2025-04-07";
29165
+ const version$1 = "3.8.1-master.2025-04-08";
29249
29166
  createVuetify$1.version = version$1;
29250
29167
 
29251
29168
  // Vue's inject() can only be used in setup
@@ -29270,7 +29187,7 @@
29270
29187
  ...options
29271
29188
  });
29272
29189
  };
29273
- const version = "3.8.1-dev.2025-04-07";
29190
+ const version = "3.8.1-master.2025-04-08";
29274
29191
  createVuetify.version = version;
29275
29192
 
29276
29193
  exports.blueprints = index;