@vuetify/nightly 3.8.0-beta.0-dev.2025-03-24 → 3.8.0-beta.0-dev.2025-03-26

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 (46) hide show
  1. package/CHANGELOG.md +83 -3
  2. package/dist/json/attributes.json +1534 -1522
  3. package/dist/json/importMap-labs.json +30 -30
  4. package/dist/json/importMap.json +138 -138
  5. package/dist/json/tags.json +3 -0
  6. package/dist/json/web-types.json +3219 -3169
  7. package/dist/vuetify-labs.cjs +101 -28
  8. package/dist/vuetify-labs.css +3682 -3682
  9. package/dist/vuetify-labs.d.ts +124 -81
  10. package/dist/vuetify-labs.esm.js +101 -28
  11. package/dist/vuetify-labs.esm.js.map +1 -1
  12. package/dist/vuetify-labs.js +101 -28
  13. package/dist/vuetify-labs.min.css +2 -2
  14. package/dist/vuetify.cjs +25 -10
  15. package/dist/vuetify.cjs.map +1 -1
  16. package/dist/vuetify.css +5460 -5460
  17. package/dist/vuetify.d.ts +82 -79
  18. package/dist/vuetify.esm.js +25 -10
  19. package/dist/vuetify.esm.js.map +1 -1
  20. package/dist/vuetify.js +25 -10
  21. package/dist/vuetify.js.map +1 -1
  22. package/dist/vuetify.min.css +2 -2
  23. package/dist/vuetify.min.js +10 -10
  24. package/dist/vuetify.min.js.map +1 -1
  25. package/lib/components/VDataTable/VDataTable.d.ts +4 -4
  26. package/lib/components/VDataTable/VDataTableRow.d.ts +9 -6
  27. package/lib/components/VDataTable/VDataTableRow.js +18 -3
  28. package/lib/components/VDataTable/VDataTableRow.js.map +1 -1
  29. package/lib/components/VDataTable/VDataTableRows.d.ts +4 -4
  30. package/lib/components/VDataTable/VDataTableServer.d.ts +4 -4
  31. package/lib/components/VDataTable/VDataTableVirtual.d.ts +4 -4
  32. package/lib/components/VDatePicker/VDatePicker.js +1 -1
  33. package/lib/components/VDatePicker/VDatePicker.js.map +1 -1
  34. package/lib/components/VIcon/VIcon.js +2 -2
  35. package/lib/components/VIcon/VIcon.js.map +1 -1
  36. package/lib/composables/calendar.js +1 -1
  37. package/lib/composables/calendar.js.map +1 -1
  38. package/lib/entry-bundler.js +1 -1
  39. package/lib/framework.d.ts +47 -47
  40. package/lib/framework.js +1 -1
  41. package/lib/labs/VDateInput/VDateInput.d.ts +70 -3
  42. package/lib/labs/VDateInput/VDateInput.js +78 -19
  43. package/lib/labs/VDateInput/VDateInput.js.map +1 -1
  44. package/lib/util/helpers.js +1 -1
  45. package/lib/util/helpers.js.map +1 -1
  46. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Vuetify v3.8.0-beta.0-dev.2025-03-24
2
+ * Vuetify v3.8.0-beta.0-dev.2025-03-26
3
3
  * Forged by John Leider
4
4
  * Released under the MIT License.
5
5
  */
@@ -229,7 +229,7 @@ function has(obj, key) {
229
229
  function pick(obj, paths) {
230
230
  const found = {};
231
231
  for (const key of paths) {
232
- if (Object.hasOwn(obj, key)) {
232
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
233
233
  found[key] = obj[key];
234
234
  }
235
235
  }
@@ -4682,7 +4682,7 @@ const VIcon = genericComponent()({
4682
4682
  const slotIcon = ref();
4683
4683
  const {
4684
4684
  themeClasses
4685
- } = provideTheme(props);
4685
+ } = useTheme();
4686
4686
  const {
4687
4687
  iconData
4688
4688
  } = useIcon(computed(() => slotIcon.value || props.icon));
@@ -20567,22 +20567,37 @@ const VDataTableRow = genericComponent()({
20567
20567
  "width": !mobile.value ? column.width : undefined
20568
20568
  }, cellProps, columnCellProps), {
20569
20569
  default: () => {
20570
- if (slots[slotName] && !mobile.value) return slots[slotName]?.(slotProps);
20571
20570
  if (column.key === 'data-table-select') {
20572
- return slots['item.data-table-select']?.(slotProps) ?? createVNode(VCheckboxBtn, {
20571
+ return slots['item.data-table-select']?.({
20572
+ ...slotProps,
20573
+ props: {
20574
+ disabled: !item.selectable,
20575
+ modelValue: isSelected([item]),
20576
+ onClick: withModifiers(() => toggleSelect(item), ['stop'])
20577
+ }
20578
+ }) ?? createVNode(VCheckboxBtn, {
20573
20579
  "disabled": !item.selectable,
20574
20580
  "modelValue": isSelected([item]),
20575
20581
  "onClick": withModifiers(event => toggleSelect(item, props.index, event), ['stop'])
20576
20582
  }, null);
20577
20583
  }
20578
20584
  if (column.key === 'data-table-expand') {
20579
- return slots['item.data-table-expand']?.(slotProps) ?? createVNode(VBtn, {
20585
+ return slots['item.data-table-expand']?.({
20586
+ ...slotProps,
20587
+ props: {
20588
+ icon: isExpanded(item) ? '$collapse' : '$expand',
20589
+ size: 'small',
20590
+ variant: 'text',
20591
+ onClick: withModifiers(() => toggleExpand(item), ['stop'])
20592
+ }
20593
+ }) ?? createVNode(VBtn, {
20580
20594
  "icon": isExpanded(item) ? '$collapse' : '$expand',
20581
20595
  "size": "small",
20582
20596
  "variant": "text",
20583
20597
  "onClick": withModifiers(() => toggleExpand(item), ['stop'])
20584
20598
  }, null);
20585
20599
  }
20600
+ if (slots[slotName] && !mobile.value) return slots[slotName](slotProps);
20586
20601
  const displayValue = toDisplayString(slotProps.value);
20587
20602
  return !mobile.value ? displayValue : createVNode(Fragment, null, [createVNode("div", {
20588
20603
  "class": "v-data-table__td-title"
@@ -21925,7 +21940,7 @@ const makeCalendarProps = propsFactory({
21925
21940
  }, 'calendar');
21926
21941
  function useCalendar(props) {
21927
21942
  const adapter = useDate();
21928
- const model = useProxiedModel(props, 'modelValue', [], v => wrapInArray(v));
21943
+ const model = useProxiedModel(props, 'modelValue', [], v => wrapInArray(v).map(i => adapter.date(i)));
21929
21944
  const displayValue = computed(() => {
21930
21945
  if (props.displayValue) return adapter.date(props.displayValue);
21931
21946
  if (model.value.length > 0) return adapter.date(model.value[0]);
@@ -22438,7 +22453,7 @@ const VDatePicker = genericComponent()({
22438
22453
  const {
22439
22454
  rtlClasses
22440
22455
  } = useRtl();
22441
- const model = useProxiedModel(props, 'modelValue', undefined, v => wrapInArray(v), v => props.multiple ? v : v[0]);
22456
+ const model = useProxiedModel(props, 'modelValue', undefined, v => wrapInArray(v).map(i => adapter.date(i)), v => props.multiple ? v : v[0]);
22442
22457
  const viewMode = useProxiedModel(props, 'viewMode');
22443
22458
  // const inputMode = useProxiedModel(props, 'inputMode')
22444
22459
 
@@ -28916,12 +28931,16 @@ const VCalendar = genericComponent()({
28916
28931
  // Types
28917
28932
 
28918
28933
  const makeVDateInputProps = propsFactory({
28934
+ displayFormat: [Function, String],
28919
28935
  location: {
28920
28936
  type: String,
28921
28937
  default: 'bottom start'
28922
28938
  },
28939
+ ...makeDisplayProps(),
28923
28940
  ...makeFocusProps(),
28924
- ...makeVConfirmEditProps(),
28941
+ ...makeVConfirmEditProps({
28942
+ hideActions: true
28943
+ }),
28925
28944
  ...makeVTextFieldProps({
28926
28945
  placeholder: 'mm/dd/yyyy',
28927
28946
  prependIcon: '$calendar'
@@ -28935,16 +28954,22 @@ const VDateInput = genericComponent()({
28935
28954
  name: 'VDateInput',
28936
28955
  props: makeVDateInputProps(),
28937
28956
  emits: {
28957
+ save: value => true,
28958
+ cancel: () => true,
28938
28959
  'update:modelValue': val => true
28939
28960
  },
28940
28961
  setup(props, _ref) {
28941
28962
  let {
28963
+ emit,
28942
28964
  slots
28943
28965
  } = _ref;
28944
28966
  const {
28945
28967
  t
28946
28968
  } = useLocale();
28947
28969
  const adapter = useDate();
28970
+ const {
28971
+ mobile
28972
+ } = useDisplay();
28948
28973
  const {
28949
28974
  isFocused,
28950
28975
  focus,
@@ -28952,7 +28977,14 @@ const VDateInput = genericComponent()({
28952
28977
  } = useFocus(props);
28953
28978
  const model = useProxiedModel(props, 'modelValue', props.multiple ? [] : null, val => Array.isArray(val) ? val.map(item => adapter.toJsDate(item)) : val ? adapter.toJsDate(val) : val, val => Array.isArray(val) ? val.map(item => adapter.date(item)) : val ? adapter.date(val) : val);
28954
28979
  const menu = shallowRef(false);
28980
+ const isEditingInput = shallowRef(false);
28955
28981
  const vDateInputRef = ref();
28982
+ function format(date) {
28983
+ if (typeof props.displayFormat === 'function') {
28984
+ return props.displayFormat(date);
28985
+ }
28986
+ return adapter.format(date, props.displayFormat ?? 'keyboardDate');
28987
+ }
28956
28988
  const display = computed(() => {
28957
28989
  const value = wrapInArray(model.value);
28958
28990
  if (!value.length) return null;
@@ -28962,11 +28994,22 @@ const VDateInput = genericComponent()({
28962
28994
  if (props.multiple === 'range') {
28963
28995
  const start = value[0];
28964
28996
  const end = value[value.length - 1];
28965
- return adapter.isValid(start) && adapter.isValid(end) ? `${adapter.format(adapter.date(start), 'keyboardDate')} - ${adapter.format(adapter.date(end), 'keyboardDate')}` : '';
28997
+ if (!adapter.isValid(start) || !adapter.isValid(end)) return '';
28998
+ return `${format(adapter.date(start))} - ${format(adapter.date(end))}`;
28966
28999
  }
28967
- return adapter.isValid(model.value) ? adapter.format(adapter.date(model.value), 'keyboardDate') : '';
29000
+ return adapter.isValid(model.value) ? format(adapter.date(model.value)) : '';
29001
+ });
29002
+ const inputmode = computed(() => {
29003
+ if (!mobile.value) return undefined;
29004
+ if (isEditingInput.value) return 'text';
29005
+ return 'none';
28968
29006
  });
28969
29007
  const isInteractive = computed(() => !props.disabled && !props.readonly);
29008
+ const isReadonly = computed(() => !(mobile.value && isEditingInput.value) && props.readonly);
29009
+ watch(menu, val => {
29010
+ if (val) return;
29011
+ isEditingInput.value = false;
29012
+ });
28970
29013
  function onKeydown(e) {
28971
29014
  if (e.key !== 'Enter') return;
28972
29015
  if (!menu.value || !isFocused.value) {
@@ -28979,15 +29022,38 @@ const VDateInput = genericComponent()({
28979
29022
  function onClick(e) {
28980
29023
  e.preventDefault();
28981
29024
  e.stopPropagation();
28982
- menu.value = true;
29025
+ if (menu.value && mobile.value) {
29026
+ isEditingInput.value = true;
29027
+ } else {
29028
+ menu.value = true;
29029
+ }
29030
+ }
29031
+ function onCancel() {
29032
+ emit('cancel');
29033
+ menu.value = false;
29034
+ isEditingInput.value = false;
28983
29035
  }
28984
- function onSave() {
29036
+ function onSave(value) {
29037
+ emit('save', value);
28985
29038
  menu.value = false;
28986
29039
  }
28987
- function onUpdateModel(value) {
29040
+ function onUpdateDisplayModel(value) {
28988
29041
  if (value != null) return;
28989
29042
  model.value = null;
28990
29043
  }
29044
+ function onUpdateMenuModel(isMenuOpen) {
29045
+ if (isMenuOpen) return;
29046
+ isEditingInput.value = false;
29047
+ }
29048
+ function onBlur() {
29049
+ blur();
29050
+
29051
+ // When in mobile mode and editing is done (due to keyboard dismissal), close the menu
29052
+ if (mobile.value && isEditingInput.value && !isFocused.value) {
29053
+ menu.value = false;
29054
+ isEditingInput.value = false;
29055
+ }
29056
+ }
28991
29057
  useRender(() => {
28992
29058
  const confirmEditProps = VConfirmEdit.filterProps(props);
28993
29059
  const datePickerProps = VDatePicker.filterProps(omit(props, ['active', 'location', 'rounded']));
@@ -28998,18 +29064,20 @@ const VDateInput = genericComponent()({
28998
29064
  "class": props.class,
28999
29065
  "style": props.style,
29000
29066
  "modelValue": display.value,
29067
+ "inputmode": inputmode.value,
29068
+ "readonly": isReadonly.value,
29001
29069
  "onKeydown": isInteractive.value ? onKeydown : undefined,
29002
29070
  "focused": menu.value || isFocused.value,
29003
29071
  "onFocus": focus,
29004
- "onBlur": blur,
29072
+ "onBlur": onBlur,
29005
29073
  "onClick:control": isInteractive.value ? onClick : undefined,
29006
29074
  "onClick:prepend": isInteractive.value ? onClick : undefined,
29007
- "onUpdate:modelValue": onUpdateModel
29075
+ "onUpdate:modelValue": onUpdateDisplayModel
29008
29076
  }), {
29009
29077
  ...slots,
29010
29078
  default: () => createVNode(Fragment, null, [createVNode(VMenu, {
29011
29079
  "modelValue": menu.value,
29012
- "onUpdate:modelValue": $event => menu.value = $event,
29080
+ "onUpdate:modelValue": [$event => menu.value = $event, onUpdateMenuModel],
29013
29081
  "activator": "parent",
29014
29082
  "min-width": "0",
29015
29083
  "eager": isFocused.value,
@@ -29021,7 +29089,7 @@ const VDateInput = genericComponent()({
29021
29089
  "modelValue": model.value,
29022
29090
  "onUpdate:modelValue": $event => model.value = $event,
29023
29091
  "onSave": onSave,
29024
- "onCancel": () => menu.value = false
29092
+ "onCancel": onCancel
29025
29093
  }), {
29026
29094
  default: _ref2 => {
29027
29095
  let {
@@ -29031,16 +29099,21 @@ const VDateInput = genericComponent()({
29031
29099
  cancel,
29032
29100
  isPristine
29033
29101
  } = _ref2;
29102
+ function onUpdateModel(value) {
29103
+ if (!props.hideActions) {
29104
+ proxyModel.value = value;
29105
+ } else {
29106
+ model.value = value;
29107
+ if (!props.multiple) {
29108
+ menu.value = false;
29109
+ }
29110
+ }
29111
+ emit('save', value);
29112
+ vDateInputRef.value?.blur();
29113
+ }
29034
29114
  return createVNode(VDatePicker, mergeProps(datePickerProps, {
29035
29115
  "modelValue": props.hideActions ? model.value : proxyModel.value,
29036
- "onUpdate:modelValue": val => {
29037
- if (!props.hideActions) {
29038
- proxyModel.value = val;
29039
- } else {
29040
- model.value = val;
29041
- if (!props.multiple) menu.value = false;
29042
- }
29043
- },
29116
+ "onUpdate:modelValue": value => onUpdateModel(value),
29044
29117
  "onMousedown": e => e.preventDefault()
29045
29118
  }), {
29046
29119
  actions: !props.hideActions ? () => slots.actions?.({
@@ -31272,7 +31345,7 @@ function createVuetify$1() {
31272
31345
  };
31273
31346
  });
31274
31347
  }
31275
- const version$1 = "3.8.0-beta.0-dev.2025-03-24";
31348
+ const version$1 = "3.8.0-beta.0-dev.2025-03-26";
31276
31349
  createVuetify$1.version = version$1;
31277
31350
 
31278
31351
  // Vue's inject() can only be used in setup
@@ -31557,7 +31630,7 @@ var index = /*#__PURE__*/Object.freeze({
31557
31630
 
31558
31631
  /* eslint-disable local-rules/sort-imports */
31559
31632
 
31560
- const version = "3.8.0-beta.0-dev.2025-03-24";
31633
+ const version = "3.8.0-beta.0-dev.2025-03-26";
31561
31634
 
31562
31635
  /* eslint-disable local-rules/sort-imports */
31563
31636