@vuetify/nightly 3.8.4-master.2025-05-13 → 3.8.5-master.2025-05-14

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 (56) hide show
  1. package/CHANGELOG.md +3 -27
  2. package/dist/_component-variables-labs.sass +1 -0
  3. package/dist/json/attributes.json +3177 -2841
  4. package/dist/json/importMap-labs.json +36 -32
  5. package/dist/json/importMap.json +180 -180
  6. package/dist/json/tags.json +89 -0
  7. package/dist/json/web-types.json +6734 -5547
  8. package/dist/vuetify-labs.cjs +272 -82
  9. package/dist/vuetify-labs.css +5164 -5136
  10. package/dist/vuetify-labs.d.ts +1371 -309
  11. package/dist/vuetify-labs.esm.js +272 -82
  12. package/dist/vuetify-labs.esm.js.map +1 -1
  13. package/dist/vuetify-labs.js +272 -82
  14. package/dist/vuetify-labs.min.css +2 -2
  15. package/dist/vuetify.cjs +5 -4
  16. package/dist/vuetify.cjs.map +1 -1
  17. package/dist/vuetify.css +3047 -3022
  18. package/dist/vuetify.d.ts +70 -67
  19. package/dist/vuetify.esm.js +5 -4
  20. package/dist/vuetify.esm.js.map +1 -1
  21. package/dist/vuetify.js +5 -4
  22. package/dist/vuetify.js.map +1 -1
  23. package/dist/vuetify.min.css +2 -2
  24. package/dist/vuetify.min.js +4 -4
  25. package/dist/vuetify.min.js.map +1 -1
  26. package/lib/components/VBottomSheet/VBottomSheet.css +1 -1
  27. package/lib/components/VBottomSheet/VBottomSheet.sass +1 -1
  28. package/lib/components/VBtn/VBtn.css +25 -0
  29. package/lib/components/VBtn/VBtn.sass +9 -0
  30. package/lib/components/VBtn/_variables.scss +1 -0
  31. package/lib/components/VSnackbarQueue/VSnackbarQueue.d.ts +3 -1
  32. package/lib/components/VSnackbarQueue/VSnackbarQueue.js.map +1 -1
  33. package/lib/composables/dateFormat.d.ts +24 -0
  34. package/lib/composables/dateFormat.js +112 -0
  35. package/lib/composables/dateFormat.js.map +1 -0
  36. package/lib/entry-bundler.js +1 -1
  37. package/lib/framework.d.ts +70 -67
  38. package/lib/framework.js +1 -1
  39. package/lib/iconsets/mdi.js +2 -1
  40. package/lib/iconsets/mdi.js.map +1 -1
  41. package/lib/labs/VColorInput/VColorInput.css +4 -0
  42. package/lib/labs/VColorInput/VColorInput.d.ts +1767 -0
  43. package/lib/labs/VColorInput/VColorInput.js +129 -0
  44. package/lib/labs/VColorInput/VColorInput.js.map +1 -0
  45. package/lib/labs/VColorInput/VColorInput.sass +7 -0
  46. package/lib/labs/VColorInput/_variables.scss +2 -0
  47. package/lib/labs/VColorInput/index.d.ts +1 -0
  48. package/lib/labs/VColorInput/index.js +2 -0
  49. package/lib/labs/VColorInput/index.js.map +1 -0
  50. package/lib/labs/VDateInput/VDateInput.d.ts +28 -31
  51. package/lib/labs/VDateInput/VDateInput.js +38 -79
  52. package/lib/labs/VDateInput/VDateInput.js.map +1 -1
  53. package/lib/labs/components.d.ts +1 -0
  54. package/lib/labs/components.js +1 -0
  55. package/lib/labs/components.js.map +1 -1
  56. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Vuetify v3.8.4-master.2025-05-13
2
+ * Vuetify v3.8.5-master.2025-05-14
3
3
  * Forged by John Leider
4
4
  * Released under the MIT License.
5
5
  */
@@ -4506,7 +4506,8 @@ const aliases = {
4506
4506
  treeviewCollapse: 'mdi-menu-down',
4507
4507
  treeviewExpand: 'mdi-menu-right',
4508
4508
  eyeDropper: 'mdi-eyedropper',
4509
- upload: 'mdi-cloud-upload'
4509
+ upload: 'mdi-cloud-upload',
4510
+ color: 'mdi-palette'
4510
4511
  };
4511
4512
  const mdi = {
4512
4513
  // Not using mergeProps here, functional components merge props by default (?)
@@ -29072,11 +29073,240 @@ const VCalendar = genericComponent()({
29072
29073
 
29073
29074
  // Types
29074
29075
 
29076
+ const makeVColorInputProps = propsFactory({
29077
+ pip: Boolean,
29078
+ pipIcon: {
29079
+ type: String,
29080
+ default: '$color'
29081
+ },
29082
+ ...makeFocusProps(),
29083
+ ...makeVConfirmEditProps(),
29084
+ ...makeVTextFieldProps(),
29085
+ ...omit(makeVColorPickerProps(), ['width'])
29086
+ }, 'VColorInput');
29087
+ const VColorInput = genericComponent()({
29088
+ name: 'VColorInput',
29089
+ props: makeVColorInputProps(),
29090
+ emits: {
29091
+ 'update:modelValue': val => true
29092
+ },
29093
+ setup(props, _ref) {
29094
+ let {
29095
+ slots
29096
+ } = _ref;
29097
+ const {
29098
+ isFocused,
29099
+ focus,
29100
+ blur
29101
+ } = useFocus(props);
29102
+ const model = useProxiedModel(props, 'modelValue');
29103
+ const menu = shallowRef(false);
29104
+ const isInteractive = computed(() => !props.disabled && !props.readonly);
29105
+ const display = computed(() => model.value || null);
29106
+ function onKeydown(e) {
29107
+ if (e.key !== 'Enter') return;
29108
+ if (!menu.value || !isFocused.value) {
29109
+ menu.value = true;
29110
+ return;
29111
+ }
29112
+ const target = e.target;
29113
+ model.value = target.value;
29114
+ }
29115
+ function onClick(e) {
29116
+ e.preventDefault();
29117
+ e.stopPropagation();
29118
+ menu.value = true;
29119
+ }
29120
+ function onSave() {
29121
+ menu.value = false;
29122
+ }
29123
+ useRender(() => {
29124
+ const confirmEditProps = VConfirmEdit.filterProps(props);
29125
+ const colorPickerProps = VColorPicker.filterProps(omit(props, ['active', 'color']));
29126
+ const textFieldProps = VTextField.filterProps(omit(props, ['prependInnerIcon']));
29127
+ const hasPrepend = !!(slots.prepend || props.pipIcon);
29128
+ return createVNode(VTextField, mergeProps(textFieldProps, {
29129
+ "class": ['v-color-input', props.class],
29130
+ "style": props.style,
29131
+ "modelValue": display.value,
29132
+ "onKeydown": isInteractive.value ? onKeydown : undefined,
29133
+ "focused": menu.value || isFocused.value,
29134
+ "onFocus": focus,
29135
+ "onBlur": blur,
29136
+ "onClick:control": isInteractive.value ? onClick : undefined,
29137
+ "onClick:prependInner": isInteractive.value ? onClick : undefined,
29138
+ "onClick:appendInner": isInteractive.value ? onClick : undefined,
29139
+ "onUpdate:modelValue": val => {
29140
+ model.value = val;
29141
+ }
29142
+ }), {
29143
+ ...slots,
29144
+ prepend: props.pipIcon ? arg => createVNode(Fragment, null, [hasPrepend && createVNode(VIcon, {
29145
+ "color": props.pip ? model.value : undefined,
29146
+ "icon": props.pipIcon
29147
+ }, null), slots.prepend?.(arg)]) : undefined,
29148
+ default: () => createVNode(Fragment, null, [createVNode(VMenu, {
29149
+ "modelValue": menu.value,
29150
+ "onUpdate:modelValue": $event => menu.value = $event,
29151
+ "activator": "parent",
29152
+ "min-width": "0",
29153
+ "closeOnContentClick": false,
29154
+ "openOnClick": false
29155
+ }, {
29156
+ default: () => [createVNode(VConfirmEdit, mergeProps(confirmEditProps, {
29157
+ "modelValue": model.value,
29158
+ "onUpdate:modelValue": $event => model.value = $event,
29159
+ "onSave": onSave
29160
+ }), {
29161
+ default: _ref2 => {
29162
+ let {
29163
+ actions,
29164
+ model: proxyModel,
29165
+ save,
29166
+ cancel,
29167
+ isPristine
29168
+ } = _ref2;
29169
+ return createVNode(VColorPicker, mergeProps(colorPickerProps, {
29170
+ "modelValue": proxyModel.value,
29171
+ "onUpdate:modelValue": val => {
29172
+ proxyModel.value = val;
29173
+ model.value = val;
29174
+ },
29175
+ "onMousedown": e => e.preventDefault()
29176
+ }), {
29177
+ actions: !props.hideActions ? () => slots.actions?.({
29178
+ save,
29179
+ cancel,
29180
+ isPristine
29181
+ }) ?? actions() : undefined
29182
+ });
29183
+ }
29184
+ })]
29185
+ }), slots.default?.()])
29186
+ });
29187
+ });
29188
+ }
29189
+ });
29190
+
29191
+ // Composables
29192
+
29193
+ // Types
29194
+
29195
+ // Types
29196
+
29197
+ class DateFormatSpec {
29198
+ constructor(order,
29199
+ // mdy | dmy | ymd
29200
+ separator // / | - | .
29201
+ ) {
29202
+ this.order = order;
29203
+ this.separator = separator;
29204
+ }
29205
+ get format() {
29206
+ return this.order.split('').map(sign => `${sign}${sign}`).join(this.separator).replace('yy', 'yyyy');
29207
+ }
29208
+ static canBeParsed(v) {
29209
+ if (typeof v !== 'string') return false;
29210
+ const lowercase = v.toLowerCase();
29211
+ return ['y', 'm', 'd'].every(sign => lowercase.includes(sign)) && ['/', '-', '.'].some(sign => v.includes(sign));
29212
+ }
29213
+ static parse(v) {
29214
+ if (!DateFormatSpec.canBeParsed(v)) {
29215
+ throw new Error(`[${v}] cannot be parsed into date format specification`);
29216
+ }
29217
+ const order = v.toLowerCase().split('').filter((c, i, all) => 'dmy'.includes(c) && all.indexOf(c) === i).join('');
29218
+ const separator = ['/', '-', '.'].find(sign => v.includes(sign));
29219
+ return new DateFormatSpec(order, separator);
29220
+ }
29221
+ }
29222
+ const makeDateFormatProps = propsFactory({
29223
+ inputFormat: {
29224
+ type: String,
29225
+ validator: v => !v || DateFormatSpec.canBeParsed(v)
29226
+ }
29227
+ }, 'date-format');
29228
+ function useDateFormat(props, locale) {
29229
+ const adapter = useDate();
29230
+ function inferFromLocale() {
29231
+ const localeForDateFormat = locale.value ?? 'en-US';
29232
+ const formatFromLocale = Intl.DateTimeFormat(localeForDateFormat, {
29233
+ year: 'numeric',
29234
+ month: '2-digit',
29235
+ day: '2-digit'
29236
+ }).format(adapter.toJsDate(adapter.parseISO('1999-12-07'))).replace(/(07)|(٠٧)|(٢٩)|(۱۶)|(০৭)/, 'dd').replace(/(12)|(١٢)|(٠٨)|(۰۹)|(১২)/, 'mm').replace(/(1999)|(2542)|(١٩٩٩)|(١٤٢٠)|(۱۳۷۸)|(১৯৯৯)/, 'yyyy').replace(/[^ymd\-/.]/g, '').replace(/\.$/, '');
29237
+ if (!DateFormatSpec.canBeParsed(formatFromLocale)) {
29238
+ consoleWarn(`Date format inferred from locale [${localeForDateFormat}] is invalid: [${formatFromLocale}]`);
29239
+ return 'mm/dd/yyyy';
29240
+ }
29241
+ return formatFromLocale;
29242
+ }
29243
+ const currentFormat = toRef(() => {
29244
+ return DateFormatSpec.canBeParsed(props.inputFormat) ? DateFormatSpec.parse(props.inputFormat) : DateFormatSpec.parse(inferFromLocale());
29245
+ });
29246
+ function parseDate(dateString) {
29247
+ function parseDateParts(text) {
29248
+ const parts = text.trim().split(currentFormat.value.separator);
29249
+ return {
29250
+ y: Number(parts[currentFormat.value.order.indexOf('y')]),
29251
+ m: Number(parts[currentFormat.value.order.indexOf('m')]),
29252
+ d: Number(parts[currentFormat.value.order.indexOf('d')])
29253
+ };
29254
+ }
29255
+ function validateDateParts(dateParts) {
29256
+ const {
29257
+ y: year,
29258
+ m: month,
29259
+ d: day
29260
+ } = dateParts;
29261
+ if (!year || !month || !day) return null;
29262
+ if (month < 1 || month > 12) return null;
29263
+ if (day < 1 || day > 31) return null;
29264
+ return {
29265
+ year: autoFixYear(year),
29266
+ month,
29267
+ day
29268
+ };
29269
+ }
29270
+ function autoFixYear(year) {
29271
+ const currentYear = adapter.getYear(adapter.date());
29272
+ if (year > 100 || currentYear % 100 >= 50) {
29273
+ return year;
29274
+ }
29275
+ const currentCentury = ~~(currentYear / 100) * 100;
29276
+ return year < 50 ? currentCentury + year : currentCentury - 100 + year;
29277
+ }
29278
+ const dateParts = parseDateParts(dateString);
29279
+ const validatedParts = validateDateParts(dateParts);
29280
+ if (!validatedParts) return null;
29281
+ const {
29282
+ year,
29283
+ month,
29284
+ day
29285
+ } = validatedParts;
29286
+ const pad = v => String(v).padStart(2, '0');
29287
+ return adapter.parseISO(`${year}-${pad(month)}-${pad(day)}`);
29288
+ }
29289
+ function isValid(text) {
29290
+ return !!parseDate(text);
29291
+ }
29292
+ function formatDate(value) {
29293
+ const parts = adapter.toISO(value).split('-');
29294
+ return currentFormat.value.order.split('').map(sign => parts['ymd'.indexOf(sign)]).join(currentFormat.value.separator);
29295
+ }
29296
+ return {
29297
+ isValid,
29298
+ parseDate,
29299
+ formatDate,
29300
+ parserFormat: toRef(() => currentFormat.value.format)
29301
+ };
29302
+ }
29303
+
29304
+ // Types
29305
+
29075
29306
  // Types
29076
29307
 
29077
29308
  const makeVDateInputProps = propsFactory({
29078
29309
  displayFormat: [Function, String],
29079
- inputFormat: [Function, String],
29080
29310
  location: {
29081
29311
  type: String,
29082
29312
  default: 'bottom start'
@@ -29086,6 +29316,7 @@ const makeVDateInputProps = propsFactory({
29086
29316
  type: Array,
29087
29317
  default: () => ['blur', 'enter']
29088
29318
  },
29319
+ ...makeDateFormatProps(),
29089
29320
  ...makeDisplayProps({
29090
29321
  mobile: null
29091
29322
  }),
@@ -29094,7 +29325,6 @@ const makeVDateInputProps = propsFactory({
29094
29325
  hideActions: true
29095
29326
  }),
29096
29327
  ...makeVTextFieldProps({
29097
- placeholder: 'mm/dd/yyyy',
29098
29328
  prependIcon: '$calendar'
29099
29329
  }),
29100
29330
  ...omit(makeVDatePickerProps({
@@ -29117,9 +29347,16 @@ const VDateInput = genericComponent()({
29117
29347
  slots
29118
29348
  } = _ref;
29119
29349
  const {
29120
- t
29350
+ t,
29351
+ current: currentLocale
29121
29352
  } = useLocale();
29122
29353
  const adapter = useDate();
29354
+ const {
29355
+ isValid,
29356
+ parseDate,
29357
+ formatDate,
29358
+ parserFormat
29359
+ } = useDateFormat(props, currentLocale);
29123
29360
  const {
29124
29361
  mobile
29125
29362
  } = useDisplay(props);
@@ -29138,80 +29375,10 @@ const VDateInput = genericComponent()({
29138
29375
  if (typeof props.displayFormat === 'function') {
29139
29376
  return props.displayFormat(date);
29140
29377
  }
29141
- return adapter.format(date, props.displayFormat ?? 'keyboardDate');
29142
- }
29143
- function parseDateString(dateString, format) {
29144
- function countConsecutiveChars(str, startIndex) {
29145
- const char = str[startIndex];
29146
- let count = 0;
29147
- while (str[startIndex + count] === char) count++;
29148
- return count;
29149
- }
29150
- function parseDateParts(dateString, format) {
29151
- const dateParts = {};
29152
- let stringIndex = 0;
29153
- const upperFormat = format.toUpperCase();
29154
- for (let formatIndex = 0; formatIndex < upperFormat.length;) {
29155
- const formatChar = upperFormat[formatIndex];
29156
- const charCount = countConsecutiveChars(upperFormat, formatIndex);
29157
- const dateValue = dateString.slice(stringIndex, stringIndex + charCount);
29158
- if (['Y', 'M', 'D'].includes(formatChar)) {
29159
- const numValue = parseInt(dateValue);
29160
- if (isNaN(numValue)) return null;
29161
- dateParts[formatChar] = numValue;
29162
- }
29163
- formatIndex += charCount;
29164
- stringIndex += charCount;
29165
- }
29166
- return dateParts;
29378
+ if (props.displayFormat) {
29379
+ return adapter.format(date, props.displayFormat ?? 'keyboardDate');
29167
29380
  }
29168
- function validateDateParts(dateParts) {
29169
- const {
29170
- Y: year,
29171
- M: month,
29172
- D: day
29173
- } = dateParts;
29174
- if (!year || !month || !day) return null;
29175
- if (month < 1 || month > 12) return null;
29176
- if (day < 1 || day > 31) return null;
29177
- return {
29178
- year,
29179
- month,
29180
- day
29181
- };
29182
- }
29183
- const dateParts = parseDateParts(dateString, format);
29184
- if (!dateParts) return null;
29185
- const validatedParts = validateDateParts(dateParts);
29186
- if (!validatedParts) return null;
29187
- const {
29188
- year,
29189
- month,
29190
- day
29191
- } = validatedParts;
29192
- return {
29193
- year,
29194
- month,
29195
- day
29196
- };
29197
- }
29198
- function parseUserInput(value) {
29199
- if (typeof props.inputFormat === 'function') {
29200
- return props.inputFormat(value);
29201
- }
29202
- if (typeof props.inputFormat === 'string') {
29203
- const formattedDate = parseDateString(value, props.inputFormat);
29204
- if (!formattedDate) {
29205
- return model.value;
29206
- }
29207
- const {
29208
- year,
29209
- month,
29210
- day
29211
- } = formattedDate;
29212
- return adapter.parseISO(`${year}-${String(month).padStart(2, '0')}-${String(day).padStart(2, '0')}`);
29213
- }
29214
- return adapter.isValid(value) ? adapter.date(value) : model.value;
29381
+ return formatDate(date);
29215
29382
  }
29216
29383
  const display = computed(() => {
29217
29384
  const value = wrapInArray(model.value);
@@ -29289,12 +29456,32 @@ const VDateInput = genericComponent()({
29289
29456
  let {
29290
29457
  value
29291
29458
  } = _ref2;
29292
- model.value = !value ? emptyModelValue() : parseUserInput(value);
29459
+ if (!value.trim()) {
29460
+ model.value = emptyModelValue();
29461
+ } else if (!props.multiple) {
29462
+ if (isValid(value)) {
29463
+ model.value = parseDate(value);
29464
+ }
29465
+ } else {
29466
+ const parts = value.trim().split(/\D+-\D+|[^\d\-/.]+/);
29467
+ if (parts.every(isValid)) {
29468
+ if (props.multiple === 'range') {
29469
+ model.value = getRange(parts);
29470
+ } else {
29471
+ model.value = parts.map(parseDate);
29472
+ }
29473
+ }
29474
+ }
29475
+ }
29476
+ function getRange(inputDates) {
29477
+ const [start, stop] = inputDates.map(parseDate).toSorted((a, b) => adapter.isAfter(a, b) ? 1 : -1);
29478
+ const diff = adapter.getDiff(stop ?? start, start, 'days');
29479
+ return [start, ...createRange(diff, 1).map(i => adapter.addDays(start, i))];
29293
29480
  }
29294
29481
  useRender(() => {
29295
29482
  const confirmEditProps = VConfirmEdit.filterProps(props);
29296
29483
  const datePickerProps = VDatePicker.filterProps(omit(props, ['active', 'location', 'rounded']));
29297
- const textFieldProps = VTextField.filterProps(props);
29484
+ const textFieldProps = VTextField.filterProps(omit(props, ['placeholder']));
29298
29485
  return createVNode(VTextField, mergeProps({
29299
29486
  "ref": vTextFieldRef
29300
29487
  }, textFieldProps, {
@@ -29302,11 +29489,13 @@ const VDateInput = genericComponent()({
29302
29489
  "style": props.style,
29303
29490
  "modelValue": display.value,
29304
29491
  "inputmode": inputmode.value,
29492
+ "placeholder": props.placeholder ?? parserFormat.value,
29305
29493
  "readonly": isReadonly.value,
29306
29494
  "onKeydown": isInteractive.value ? onKeydown : undefined,
29307
29495
  "focused": menu.value || isFocused.value,
29308
29496
  "onFocus": focus,
29309
29497
  "onBlur": onBlur,
29498
+ "validationValue": model.value,
29310
29499
  "onClick:control": isInteractive.value ? onClick : undefined,
29311
29500
  "onClick:prepend": isInteractive.value ? onClick : undefined,
29312
29501
  "onUpdate:modelValue": onUpdateDisplayModel
@@ -31273,6 +31462,7 @@ var components = /*#__PURE__*/Object.freeze({
31273
31462
  VClassIcon: VClassIcon,
31274
31463
  VCode: VCode,
31275
31464
  VCol: VCol,
31465
+ VColorInput: VColorInput,
31276
31466
  VColorPicker: VColorPicker,
31277
31467
  VCombobox: VCombobox,
31278
31468
  VComponentIcon: VComponentIcon,
@@ -31739,7 +31929,7 @@ function createVuetify$1() {
31739
31929
  };
31740
31930
  });
31741
31931
  }
31742
- const version$1 = "3.8.4-master.2025-05-13";
31932
+ const version$1 = "3.8.5-master.2025-05-14";
31743
31933
  createVuetify$1.version = version$1;
31744
31934
 
31745
31935
  // Vue's inject() can only be used in setup
@@ -32037,7 +32227,7 @@ var index = /*#__PURE__*/Object.freeze({
32037
32227
 
32038
32228
  /* eslint-disable local-rules/sort-imports */
32039
32229
 
32040
- const version = "3.8.4-master.2025-05-13";
32230
+ const version = "3.8.5-master.2025-05-14";
32041
32231
 
32042
32232
  /* eslint-disable local-rules/sort-imports */
32043
32233