vuetify 3.8.0-beta.0 → 3.8.0

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 (87) hide show
  1. package/dist/_component-variables-labs.sass +1 -0
  2. package/dist/json/attributes.json +3162 -3030
  3. package/dist/json/importMap-labs.json +32 -28
  4. package/dist/json/importMap.json +166 -166
  5. package/dist/json/tags.json +38 -0
  6. package/dist/json/web-types.json +6016 -5639
  7. package/dist/vuetify-labs.cjs +320 -55
  8. package/dist/vuetify-labs.css +5453 -5271
  9. package/dist/vuetify-labs.d.ts +612 -267
  10. package/dist/vuetify-labs.esm.js +320 -55
  11. package/dist/vuetify-labs.esm.js.map +1 -1
  12. package/dist/vuetify-labs.js +320 -55
  13. package/dist/vuetify-labs.min.css +2 -2
  14. package/dist/vuetify.cjs +74 -36
  15. package/dist/vuetify.cjs.map +1 -1
  16. package/dist/vuetify.css +3042 -3037
  17. package/dist/vuetify.d.ts +161 -178
  18. package/dist/vuetify.esm.js +74 -36
  19. package/dist/vuetify.esm.js.map +1 -1
  20. package/dist/vuetify.js +74 -36
  21. package/dist/vuetify.js.map +1 -1
  22. package/dist/vuetify.min.css +2 -2
  23. package/dist/vuetify.min.js +32 -32
  24. package/dist/vuetify.min.js.map +1 -1
  25. package/lib/components/VAutocomplete/VAutocomplete.js +5 -10
  26. package/lib/components/VAutocomplete/VAutocomplete.js.map +1 -1
  27. package/lib/components/VColorPicker/VColorPickerPreview.js +4 -3
  28. package/lib/components/VColorPicker/VColorPickerPreview.js.map +1 -1
  29. package/lib/components/VConfirmEdit/VConfirmEdit.d.ts +31 -6
  30. package/lib/components/VConfirmEdit/VConfirmEdit.js +17 -2
  31. package/lib/components/VConfirmEdit/VConfirmEdit.js.map +1 -1
  32. package/lib/components/VDataTable/VDataTable.d.ts +4 -4
  33. package/lib/components/VDataTable/VDataTableRow.d.ts +9 -6
  34. package/lib/components/VDataTable/VDataTableRow.js +18 -3
  35. package/lib/components/VDataTable/VDataTableRow.js.map +1 -1
  36. package/lib/components/VDataTable/VDataTableRows.d.ts +4 -4
  37. package/lib/components/VDataTable/VDataTableServer.d.ts +4 -4
  38. package/lib/components/VDataTable/VDataTableVirtual.d.ts +4 -4
  39. package/lib/components/VDatePicker/VDatePicker.d.ts +33 -78
  40. package/lib/components/VDatePicker/VDatePicker.js +1 -1
  41. package/lib/components/VDatePicker/VDatePicker.js.map +1 -1
  42. package/lib/components/VDatePicker/VDatePickerMonth.d.ts +33 -78
  43. package/lib/components/VEmptyState/VEmptyState.js +3 -1
  44. package/lib/components/VEmptyState/VEmptyState.js.map +1 -1
  45. package/lib/components/VField/VField.css +2 -2
  46. package/lib/components/VField/VField.js +5 -1
  47. package/lib/components/VField/VField.js.map +1 -1
  48. package/lib/components/VField/_variables.scss +1 -1
  49. package/lib/components/VIcon/VIcon.css +1 -0
  50. package/lib/components/VIcon/VIcon.d.ts +10 -0
  51. package/lib/components/VIcon/VIcon.js +6 -3
  52. package/lib/components/VIcon/VIcon.js.map +1 -1
  53. package/lib/components/VIcon/VIcon.sass +1 -0
  54. package/lib/components/VInput/VInput.css +7 -7
  55. package/lib/components/VInput/VInput.sass +5 -2
  56. package/lib/composables/calendar.d.ts +12 -35
  57. package/lib/composables/calendar.js +12 -9
  58. package/lib/composables/calendar.js.map +1 -1
  59. package/lib/entry-bundler.js +1 -1
  60. package/lib/entry-bundler.js.map +1 -1
  61. package/lib/framework.d.ts +61 -60
  62. package/lib/framework.js +1 -1
  63. package/lib/framework.js.map +1 -1
  64. package/lib/labs/VCalendar/VCalendar.d.ts +33 -78
  65. package/lib/labs/VDateInput/VDateInput.d.ts +103 -81
  66. package/lib/labs/VDateInput/VDateInput.js +77 -19
  67. package/lib/labs/VDateInput/VDateInput.js.map +1 -1
  68. package/lib/labs/VFileUpload/VFileUpload.js +2 -1
  69. package/lib/labs/VFileUpload/VFileUpload.js.map +1 -1
  70. package/lib/labs/VIconBtn/VIconBtn.css +178 -0
  71. package/lib/labs/VIconBtn/VIconBtn.d.ts +608 -0
  72. package/lib/labs/VIconBtn/VIconBtn.js +184 -0
  73. package/lib/labs/VIconBtn/VIconBtn.js.map +1 -0
  74. package/lib/labs/VIconBtn/VIconBtn.scss +110 -0
  75. package/lib/labs/VIconBtn/_variables.scss +36 -0
  76. package/lib/labs/VIconBtn/index.d.ts +1 -0
  77. package/lib/labs/VIconBtn/index.js +2 -0
  78. package/lib/labs/VIconBtn/index.js.map +1 -0
  79. package/lib/labs/components.d.ts +1 -0
  80. package/lib/labs/components.js +1 -0
  81. package/lib/labs/components.js.map +1 -1
  82. package/lib/styles/main.css +4 -0
  83. package/lib/styles/settings/_utilities.scss +5 -0
  84. package/lib/util/helpers.d.ts +1 -2
  85. package/lib/util/helpers.js +2 -12
  86. package/lib/util/helpers.js.map +1 -1
  87. package/package.json +2 -2
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Vuetify v3.8.0-beta.0
2
+ * Vuetify v3.8.0
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
  }
@@ -4663,6 +4663,7 @@ const makeVIconProps = propsFactory({
4663
4663
  start: Boolean,
4664
4664
  end: Boolean,
4665
4665
  icon: IconValue,
4666
+ opacity: [String, Number],
4666
4667
  ...makeComponentProps(),
4667
4668
  ...makeSizeProps(),
4668
4669
  ...makeTagProps({
@@ -4681,7 +4682,7 @@ const VIcon = genericComponent()({
4681
4682
  const slotIcon = ref();
4682
4683
  const {
4683
4684
  themeClasses
4684
- } = provideTheme(props);
4685
+ } = useTheme();
4685
4686
  const {
4686
4687
  iconData
4687
4688
  } = useIcon(computed(() => slotIcon.value || props.icon));
@@ -4707,7 +4708,9 @@ const VIcon = genericComponent()({
4707
4708
  'v-icon--start': props.start,
4708
4709
  'v-icon--end': props.end
4709
4710
  }, props.class],
4710
- "style": [!sizeClasses.value ? {
4711
+ "style": [{
4712
+ '--v-icon-opacity': props.opacity
4713
+ }, !sizeClasses.value ? {
4711
4714
  fontSize: convertToUnit(props.size),
4712
4715
  height: convertToUnit(props.size),
4713
4716
  width: convertToUnit(props.size)
@@ -11863,7 +11866,11 @@ const VField = genericComponent()({
11863
11866
  },
11864
11867
  focus,
11865
11868
  blur
11866
- })]), hasClear && createVNode(VExpandXTransition, {
11869
+ }) ?? createVNode("div", {
11870
+ "id": id.value,
11871
+ "class": "v-field__input",
11872
+ "aria-describedby": messagesId.value
11873
+ }, null)]), hasClear && createVNode(VExpandXTransition, {
11867
11874
  "key": "clear"
11868
11875
  }, {
11869
11876
  default: () => [withDirectives(createVNode("div", {
@@ -13395,12 +13402,7 @@ const VAutocomplete = genericComponent()({
13395
13402
  } else {
13396
13403
  if (!props.multiple && search.value == null) model.value = [];
13397
13404
  menu.value = false;
13398
- if (!model.value.some(_ref3 => {
13399
- let {
13400
- title
13401
- } = _ref3;
13402
- return title === search.value;
13403
- })) search.value = '';
13405
+ if (props.multiple || hasSelectionSlot.value) search.value = '';
13404
13406
  selectionIndex.value = -1;
13405
13407
  }
13406
13408
  });
@@ -13488,12 +13490,12 @@ const VAutocomplete = genericComponent()({
13488
13490
  "items": displayItems.value,
13489
13491
  "itemKey": "value"
13490
13492
  }, {
13491
- default: _ref4 => {
13493
+ default: _ref3 => {
13492
13494
  let {
13493
13495
  item,
13494
13496
  index,
13495
13497
  itemRef
13496
- } = _ref4;
13498
+ } = _ref3;
13497
13499
  const itemProps = mergeProps(item.props, {
13498
13500
  ref: itemRef,
13499
13501
  key: item.value,
@@ -13507,10 +13509,10 @@ const VAutocomplete = genericComponent()({
13507
13509
  }) ?? createVNode(VListItem, mergeProps(itemProps, {
13508
13510
  "role": "option"
13509
13511
  }), {
13510
- prepend: _ref5 => {
13512
+ prepend: _ref4 => {
13511
13513
  let {
13512
13514
  isSelected
13513
- } = _ref5;
13515
+ } = _ref4;
13514
13516
  return createVNode(Fragment, null, [props.multiple && !props.hideSelected ? createVNode(VCheckboxBtn, {
13515
13517
  "key": item.value,
13516
13518
  "modelValue": isSelected,
@@ -16379,7 +16381,7 @@ const VColorPickerPreview = defineComponent({
16379
16381
  const abortController = new AbortController();
16380
16382
  onUnmounted(() => abortController.abort());
16381
16383
  async function openEyeDropper() {
16382
- if (!SUPPORTS_EYE_DROPPER) return;
16384
+ if (!SUPPORTS_EYE_DROPPER || props.disabled) return;
16383
16385
  const eyeDropper = new window.EyeDropper();
16384
16386
  try {
16385
16387
  const result = await eyeDropper.open({
@@ -16401,10 +16403,11 @@ const VColorPickerPreview = defineComponent({
16401
16403
  "class": "v-color-picker-preview__eye-dropper",
16402
16404
  "key": "eyeDropper"
16403
16405
  }, [createVNode(VBtn, {
16404
- "onClick": openEyeDropper,
16406
+ "density": "comfortable",
16407
+ "disabled": props.disabled,
16405
16408
  "icon": "$eyeDropper",
16406
16409
  "variant": "plain",
16407
- "density": "comfortable"
16410
+ "onClick": openEyeDropper
16408
16411
  }, null)]), createVNode("div", {
16409
16412
  "class": "v-color-picker-preview__dot"
16410
16413
  }, [createVNode("div", {
@@ -18432,6 +18435,10 @@ const makeVConfirmEditProps = propsFactory({
18432
18435
  type: String,
18433
18436
  default: '$vuetify.confirmEdit.ok'
18434
18437
  },
18438
+ disabled: {
18439
+ type: [Boolean, Array],
18440
+ default: undefined
18441
+ },
18435
18442
  hideActions: Boolean
18436
18443
  }, 'VConfirmEdit');
18437
18444
  const VConfirmEdit = genericComponent()({
@@ -18458,6 +18465,17 @@ const VConfirmEdit = genericComponent()({
18458
18465
  const isPristine = computed(() => {
18459
18466
  return deepEqual(model.value, internalModel.value);
18460
18467
  });
18468
+ function isActionDisabled(action) {
18469
+ if (typeof props.disabled === 'boolean') {
18470
+ return props.disabled;
18471
+ }
18472
+ if (Array.isArray(props.disabled)) {
18473
+ return props.disabled.includes(action);
18474
+ }
18475
+ return isPristine.value;
18476
+ }
18477
+ const isSaveDisabled = computed(() => isActionDisabled('save'));
18478
+ const isCancelDisabled = computed(() => isActionDisabled('cancel'));
18461
18479
  function save() {
18462
18480
  model.value = internalModel.value;
18463
18481
  emit('save', internalModel.value);
@@ -18468,13 +18486,13 @@ const VConfirmEdit = genericComponent()({
18468
18486
  }
18469
18487
  function actions(actionsProps) {
18470
18488
  return createVNode(Fragment, null, [createVNode(VBtn, mergeProps({
18471
- "disabled": isPristine.value,
18489
+ "disabled": isCancelDisabled.value,
18472
18490
  "variant": "text",
18473
18491
  "color": props.color,
18474
18492
  "onClick": cancel,
18475
18493
  "text": t(props.cancelText)
18476
18494
  }, actionsProps), null), createVNode(VBtn, mergeProps({
18477
- "disabled": isPristine.value,
18495
+ "disabled": isSaveDisabled.value,
18478
18496
  "variant": "text",
18479
18497
  "color": props.color,
18480
18498
  "onClick": save,
@@ -20560,22 +20578,37 @@ const VDataTableRow = genericComponent()({
20560
20578
  "width": !mobile.value ? column.width : undefined
20561
20579
  }, cellProps, columnCellProps), {
20562
20580
  default: () => {
20563
- if (slots[slotName] && !mobile.value) return slots[slotName]?.(slotProps);
20564
20581
  if (column.key === 'data-table-select') {
20565
- return slots['item.data-table-select']?.(slotProps) ?? createVNode(VCheckboxBtn, {
20582
+ return slots['item.data-table-select']?.({
20583
+ ...slotProps,
20584
+ props: {
20585
+ disabled: !item.selectable,
20586
+ modelValue: isSelected([item]),
20587
+ onClick: withModifiers(() => toggleSelect(item), ['stop'])
20588
+ }
20589
+ }) ?? createVNode(VCheckboxBtn, {
20566
20590
  "disabled": !item.selectable,
20567
20591
  "modelValue": isSelected([item]),
20568
20592
  "onClick": withModifiers(event => toggleSelect(item, props.index, event), ['stop'])
20569
20593
  }, null);
20570
20594
  }
20571
20595
  if (column.key === 'data-table-expand') {
20572
- return slots['item.data-table-expand']?.(slotProps) ?? createVNode(VBtn, {
20596
+ return slots['item.data-table-expand']?.({
20597
+ ...slotProps,
20598
+ props: {
20599
+ icon: isExpanded(item) ? '$collapse' : '$expand',
20600
+ size: 'small',
20601
+ variant: 'text',
20602
+ onClick: withModifiers(() => toggleExpand(item), ['stop'])
20603
+ }
20604
+ }) ?? createVNode(VBtn, {
20573
20605
  "icon": isExpanded(item) ? '$collapse' : '$expand',
20574
20606
  "size": "small",
20575
20607
  "variant": "text",
20576
20608
  "onClick": withModifiers(() => toggleExpand(item), ['stop'])
20577
20609
  }, null);
20578
20610
  }
20611
+ if (slots[slotName] && !mobile.value) return slots[slotName](slotProps);
20579
20612
  const displayValue = toDisplayString(slotProps.value);
20580
20613
  return !mobile.value ? displayValue : createVNode(Fragment, null, [createVNode("div", {
20581
20614
  "class": "v-data-table__td-title"
@@ -21914,11 +21947,14 @@ const makeCalendarProps = propsFactory({
21914
21947
  type: String,
21915
21948
  default: 'dynamic'
21916
21949
  },
21917
- firstDayOfWeek: [Number, String]
21950
+ firstDayOfWeek: {
21951
+ type: [Number, String],
21952
+ default: 0
21953
+ }
21918
21954
  }, 'calendar');
21919
21955
  function useCalendar(props) {
21920
21956
  const adapter = useDate();
21921
- const model = useProxiedModel(props, 'modelValue', [], v => wrapInArray(v));
21957
+ const model = useProxiedModel(props, 'modelValue', [], v => wrapInArray(v).map(i => adapter.date(i)));
21922
21958
  const displayValue = computed(() => {
21923
21959
  if (props.displayValue) return adapter.date(props.displayValue);
21924
21960
  if (model.value.length > 0) return adapter.date(model.value[0]);
@@ -21935,15 +21971,15 @@ function useCalendar(props) {
21935
21971
  const date = adapter.setYear(adapter.startOfMonth(adapter.date()), adapter.getYear(year.value));
21936
21972
  return adapter.setMonth(date, value);
21937
21973
  }, v => adapter.getMonth(v));
21938
- const defaultFirstDayOfWeek = computed(() => {
21939
- return props.firstDayOfWeek ?? props.weekdays[0];
21940
- });
21941
21974
  const weekDays = computed(() => {
21942
- const firstDayOfWeek = Number(props.firstDayOfWeek ?? 0);
21943
- return props.weekdays.map(day => (day + firstDayOfWeek) % 7);
21975
+ const firstDayOfWeek = Number(props.firstDayOfWeek);
21976
+
21977
+ // Always generate all days, regardless of props.weekdays
21978
+ return [0, 1, 2, 3, 4, 5, 6].map(day => (day + firstDayOfWeek) % 7);
21944
21979
  });
21945
21980
  const weeksInMonth = computed(() => {
21946
- const weeks = adapter.getWeekArray(month.value, defaultFirstDayOfWeek.value);
21981
+ const firstDayOfWeek = Number(props.firstDayOfWeek);
21982
+ const weeks = adapter.getWeekArray(month.value, firstDayOfWeek);
21947
21983
  const days = weeks.flat();
21948
21984
 
21949
21985
  // Make sure there's always 6 weeks in month (6 * 7 days)
@@ -22021,7 +22057,7 @@ function useCalendar(props) {
22021
22057
  if (typeof props.allowedDates === 'function') {
22022
22058
  return !props.allowedDates(date);
22023
22059
  }
22024
- return false;
22060
+ return !props.weekdays.includes(adapter.toJsDate(date).getDay());
22025
22061
  }
22026
22062
  return {
22027
22063
  displayValue,
@@ -22431,7 +22467,7 @@ const VDatePicker = genericComponent()({
22431
22467
  const {
22432
22468
  rtlClasses
22433
22469
  } = useRtl();
22434
- const model = useProxiedModel(props, 'modelValue', undefined, v => wrapInArray(v), v => props.multiple ? v : v[0]);
22470
+ const model = useProxiedModel(props, 'modelValue', undefined, v => wrapInArray(v).map(i => adapter.date(i)), v => props.multiple ? v : v[0]);
22435
22471
  const viewMode = useProxiedModel(props, 'viewMode');
22436
22472
  // const inputMode = useProxiedModel(props, 'inputMode')
22437
22473
 
@@ -22756,7 +22792,9 @@ const VEmptyState = genericComponent()({
22756
22792
  VBtn: {
22757
22793
  class: 'v-empty-state__action-btn',
22758
22794
  color: props.color ?? 'surface-variant',
22759
- text: props.actionText
22795
+ href: props.href,
22796
+ text: props.actionText,
22797
+ to: props.to
22760
22798
  }
22761
22799
  }
22762
22800
  }, {
@@ -28909,12 +28947,16 @@ const VCalendar = genericComponent()({
28909
28947
  // Types
28910
28948
 
28911
28949
  const makeVDateInputProps = propsFactory({
28950
+ displayFormat: [Function, String],
28912
28951
  location: {
28913
28952
  type: String,
28914
28953
  default: 'bottom start'
28915
28954
  },
28955
+ ...makeDisplayProps(),
28916
28956
  ...makeFocusProps(),
28917
- ...makeVConfirmEditProps(),
28957
+ ...makeVConfirmEditProps({
28958
+ hideActions: true
28959
+ }),
28918
28960
  ...makeVTextFieldProps({
28919
28961
  placeholder: 'mm/dd/yyyy',
28920
28962
  prependIcon: '$calendar'
@@ -28928,16 +28970,22 @@ const VDateInput = genericComponent()({
28928
28970
  name: 'VDateInput',
28929
28971
  props: makeVDateInputProps(),
28930
28972
  emits: {
28973
+ save: value => true,
28974
+ cancel: () => true,
28931
28975
  'update:modelValue': val => true
28932
28976
  },
28933
28977
  setup(props, _ref) {
28934
28978
  let {
28979
+ emit,
28935
28980
  slots
28936
28981
  } = _ref;
28937
28982
  const {
28938
28983
  t
28939
28984
  } = useLocale();
28940
28985
  const adapter = useDate();
28986
+ const {
28987
+ mobile
28988
+ } = useDisplay(props);
28941
28989
  const {
28942
28990
  isFocused,
28943
28991
  focus,
@@ -28945,7 +28993,15 @@ const VDateInput = genericComponent()({
28945
28993
  } = useFocus(props);
28946
28994
  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);
28947
28995
  const menu = shallowRef(false);
28996
+ const isEditingInput = shallowRef(false);
28948
28997
  const vDateInputRef = ref();
28998
+ const disabledActions = ref(['save']);
28999
+ function format(date) {
29000
+ if (typeof props.displayFormat === 'function') {
29001
+ return props.displayFormat(date);
29002
+ }
29003
+ return adapter.format(date, props.displayFormat ?? 'keyboardDate');
29004
+ }
28949
29005
  const display = computed(() => {
28950
29006
  const value = wrapInArray(model.value);
28951
29007
  if (!value.length) return null;
@@ -28955,11 +29011,23 @@ const VDateInput = genericComponent()({
28955
29011
  if (props.multiple === 'range') {
28956
29012
  const start = value[0];
28957
29013
  const end = value[value.length - 1];
28958
- return adapter.isValid(start) && adapter.isValid(end) ? `${adapter.format(adapter.date(start), 'keyboardDate')} - ${adapter.format(adapter.date(end), 'keyboardDate')}` : '';
29014
+ if (!adapter.isValid(start) || !adapter.isValid(end)) return '';
29015
+ return `${format(adapter.date(start))} - ${format(adapter.date(end))}`;
28959
29016
  }
28960
- return adapter.isValid(model.value) ? adapter.format(adapter.date(model.value), 'keyboardDate') : '';
29017
+ return adapter.isValid(model.value) ? format(adapter.date(model.value)) : '';
29018
+ });
29019
+ const inputmode = computed(() => {
29020
+ if (!mobile.value) return undefined;
29021
+ if (isEditingInput.value) return 'text';
29022
+ return 'none';
28961
29023
  });
28962
29024
  const isInteractive = computed(() => !props.disabled && !props.readonly);
29025
+ const isReadonly = computed(() => !(mobile.value && isEditingInput.value) && props.readonly);
29026
+ watch(menu, val => {
29027
+ if (val) return;
29028
+ isEditingInput.value = false;
29029
+ disabledActions.value = ['save'];
29030
+ });
28963
29031
  function onKeydown(e) {
28964
29032
  if (e.key !== 'Enter') return;
28965
29033
  if (!menu.value || !isFocused.value) {
@@ -28967,20 +29035,39 @@ const VDateInput = genericComponent()({
28967
29035
  return;
28968
29036
  }
28969
29037
  const target = e.target;
28970
- model.value = target.value === '' ? null : target.value;
29038
+ model.value = adapter.isValid(target.value) ? target.value : null;
28971
29039
  }
28972
29040
  function onClick(e) {
28973
29041
  e.preventDefault();
28974
29042
  e.stopPropagation();
28975
- menu.value = true;
29043
+ if (menu.value && mobile.value) {
29044
+ isEditingInput.value = true;
29045
+ } else {
29046
+ menu.value = true;
29047
+ }
28976
29048
  }
28977
- function onSave() {
29049
+ function onCancel() {
29050
+ emit('cancel');
28978
29051
  menu.value = false;
29052
+ isEditingInput.value = false;
28979
29053
  }
28980
- function onUpdateModel(value) {
29054
+ function onSave(value) {
29055
+ emit('save', value);
29056
+ menu.value = false;
29057
+ }
29058
+ function onUpdateDisplayModel(value) {
28981
29059
  if (value != null) return;
28982
29060
  model.value = null;
28983
29061
  }
29062
+ function onBlur() {
29063
+ blur();
29064
+
29065
+ // When in mobile mode and editing is done (due to keyboard dismissal), close the menu
29066
+ if (mobile.value && isEditingInput.value && !isFocused.value) {
29067
+ menu.value = false;
29068
+ isEditingInput.value = false;
29069
+ }
29070
+ }
28984
29071
  useRender(() => {
28985
29072
  const confirmEditProps = VConfirmEdit.filterProps(props);
28986
29073
  const datePickerProps = VDatePicker.filterProps(omit(props, ['active', 'location', 'rounded']));
@@ -28991,13 +29078,15 @@ const VDateInput = genericComponent()({
28991
29078
  "class": props.class,
28992
29079
  "style": props.style,
28993
29080
  "modelValue": display.value,
29081
+ "inputmode": inputmode.value,
29082
+ "readonly": isReadonly.value,
28994
29083
  "onKeydown": isInteractive.value ? onKeydown : undefined,
28995
29084
  "focused": menu.value || isFocused.value,
28996
29085
  "onFocus": focus,
28997
- "onBlur": blur,
29086
+ "onBlur": onBlur,
28998
29087
  "onClick:control": isInteractive.value ? onClick : undefined,
28999
29088
  "onClick:prepend": isInteractive.value ? onClick : undefined,
29000
- "onUpdate:modelValue": onUpdateModel
29089
+ "onUpdate:modelValue": onUpdateDisplayModel
29001
29090
  }), {
29002
29091
  ...slots,
29003
29092
  default: () => createVNode(Fragment, null, [createVNode(VMenu, {
@@ -29013,8 +29102,9 @@ const VDateInput = genericComponent()({
29013
29102
  default: () => [createVNode(VConfirmEdit, mergeProps(confirmEditProps, {
29014
29103
  "modelValue": model.value,
29015
29104
  "onUpdate:modelValue": $event => model.value = $event,
29105
+ "disabled": disabledActions.value,
29016
29106
  "onSave": onSave,
29017
- "onCancel": () => menu.value = false
29107
+ "onCancel": onCancel
29018
29108
  }), {
29019
29109
  default: _ref2 => {
29020
29110
  let {
@@ -29024,16 +29114,21 @@ const VDateInput = genericComponent()({
29024
29114
  cancel,
29025
29115
  isPristine
29026
29116
  } = _ref2;
29117
+ function onUpdateModel(value) {
29118
+ if (!props.hideActions) {
29119
+ proxyModel.value = value;
29120
+ } else {
29121
+ model.value = value;
29122
+ if (!props.multiple) {
29123
+ menu.value = false;
29124
+ }
29125
+ }
29126
+ emit('save', value);
29127
+ disabledActions.value = [];
29128
+ }
29027
29129
  return createVNode(VDatePicker, mergeProps(datePickerProps, {
29028
29130
  "modelValue": props.hideActions ? model.value : proxyModel.value,
29029
- "onUpdate:modelValue": val => {
29030
- if (!props.hideActions) {
29031
- proxyModel.value = val;
29032
- } else {
29033
- model.value = val;
29034
- if (!props.multiple) menu.value = false;
29035
- }
29036
- },
29131
+ "onUpdate:modelValue": value => onUpdateModel(value),
29037
29132
  "onMousedown": e => e.preventDefault()
29038
29133
  }), {
29039
29134
  actions: !props.hideActions ? () => slots.actions?.({
@@ -29276,7 +29371,8 @@ const VFileUpload = genericComponent()({
29276
29371
  'v-file-upload--clickable': !hasBrowse,
29277
29372
  'v-file-upload--disabled': props.disabled,
29278
29373
  'v-file-upload--dragging': dragOver.value
29279
- }, densityClasses.value],
29374
+ }, densityClasses.value, props.class],
29375
+ "style": [props.style],
29280
29376
  "onDragleave": onDragLeave,
29281
29377
  "onDragover": onDragOver,
29282
29378
  "onDrop": onDrop,
@@ -29367,6 +29463,174 @@ const VFileUpload = genericComponent()({
29367
29463
 
29368
29464
  // Types
29369
29465
 
29466
+ const makeVIconBtnProps = propsFactory({
29467
+ active: {
29468
+ type: Boolean,
29469
+ default: undefined
29470
+ },
29471
+ activeColor: String,
29472
+ activeIcon: [String, Function, Object],
29473
+ activeVariant: String,
29474
+ baseVariant: {
29475
+ type: String,
29476
+ default: 'tonal'
29477
+ },
29478
+ disabled: Boolean,
29479
+ height: [Number, String],
29480
+ width: [Number, String],
29481
+ hideOverlay: Boolean,
29482
+ icon: [String, Function, Object],
29483
+ iconColor: String,
29484
+ iconSize: {
29485
+ type: [Number, String],
29486
+ default: 'default'
29487
+ },
29488
+ iconSizes: {
29489
+ type: Array,
29490
+ default: () => [['x-small', 10], ['small', 16], ['default', 24], ['large', 28], ['x-large', 32]]
29491
+ },
29492
+ loading: Boolean,
29493
+ opacity: [Number, String],
29494
+ readonly: Boolean,
29495
+ rotate: [Number, String],
29496
+ size: {
29497
+ type: [Number, String],
29498
+ default: 'default'
29499
+ },
29500
+ sizes: {
29501
+ type: Array,
29502
+ default: () => [['x-small', 16], ['small', 24], ['default', 40], ['large', 48], ['x-large', 56]]
29503
+ },
29504
+ text: {
29505
+ type: [String, Number, Boolean],
29506
+ default: undefined
29507
+ },
29508
+ ...makeBorderProps(),
29509
+ ...makeComponentProps(),
29510
+ ...makeElevationProps(),
29511
+ ...makeRoundedProps(),
29512
+ ...makeTagProps({
29513
+ tag: 'button'
29514
+ }),
29515
+ ...makeThemeProps(),
29516
+ ...makeVariantProps({
29517
+ variant: 'flat'
29518
+ })
29519
+ }, 'VIconBtn');
29520
+ const VIconBtn = genericComponent()({
29521
+ name: 'VIconBtn',
29522
+ props: makeVIconBtnProps(),
29523
+ emits: {
29524
+ 'update:active': value => true
29525
+ },
29526
+ setup(props, _ref) {
29527
+ let {
29528
+ attrs,
29529
+ slots
29530
+ } = _ref;
29531
+ const isActive = useProxiedModel(props, 'active');
29532
+ const {
29533
+ themeClasses
29534
+ } = provideTheme(props);
29535
+ const {
29536
+ borderClasses
29537
+ } = useBorder(props);
29538
+ const {
29539
+ elevationClasses
29540
+ } = useElevation(props);
29541
+ const {
29542
+ roundedClasses
29543
+ } = useRounded(props);
29544
+ const {
29545
+ colorClasses,
29546
+ colorStyles,
29547
+ variantClasses
29548
+ } = useVariant(toRef(() => ({
29549
+ color: (() => {
29550
+ if (props.disabled) return undefined;
29551
+ if (!isActive.value) return props.color;
29552
+ // Use an inline fallback as opposed to setting a default color
29553
+ // because non-toggle buttons are default flat whereas toggle
29554
+ // buttons are default tonal and active flat. The exact use
29555
+ // case for this is a toggle button with no active color.
29556
+ return props.activeColor ?? props.color ?? 'surface-variant';
29557
+ })(),
29558
+ variant: (() => {
29559
+ if (isActive.value === undefined) return props.variant;
29560
+ if (isActive.value) return props.activeVariant ?? props.variant;
29561
+ return props.baseVariant ?? props.variant;
29562
+ })()
29563
+ })));
29564
+ const btnSizeMap = new Map(props.sizes);
29565
+ const iconSizeMap = new Map(props.iconSizes);
29566
+ function onClick() {
29567
+ if (props.disabled || props.readonly || isActive.value === undefined || props.tag === 'a' && attrs.href) return;
29568
+ isActive.value = !isActive.value;
29569
+ }
29570
+ useRender(() => {
29571
+ const icon = isActive.value ? props.activeIcon ?? props.icon : props.icon;
29572
+ const size = props.size;
29573
+ const hasNamedSize = btnSizeMap.has(size);
29574
+ const btnSize = hasNamedSize ? btnSizeMap.get(size) : size;
29575
+ const btnHeight = props.height ?? btnSize;
29576
+ const btnWidth = props.width ?? btnSize;
29577
+ const _iconSize = hasNamedSize ? size : props.iconSize ?? size;
29578
+ const iconSize = iconSizeMap.get(_iconSize) ?? _iconSize;
29579
+ const iconProps = {
29580
+ icon,
29581
+ size: iconSize,
29582
+ iconColor: props.iconColor,
29583
+ opacity: props.opacity
29584
+ };
29585
+ return createVNode(props.tag, {
29586
+ "class": [{
29587
+ 'v-icon-btn': true,
29588
+ 'v-icon-btn--active': isActive.value,
29589
+ 'v-icon-btn--disabled': props.disabled,
29590
+ 'v-icon-btn--loading': props.loading,
29591
+ 'v-icon-btn--readonly': props.readonly,
29592
+ [`v-icon-btn--${props.size}`]: true
29593
+ }, themeClasses.value, colorClasses.value, borderClasses.value, elevationClasses.value, roundedClasses.value, variantClasses.value, props.class],
29594
+ "style": [{
29595
+ '--v-icon-btn-rotate': convertToUnit(props.rotate, 'deg'),
29596
+ '--v-icon-btn-height': convertToUnit(btnHeight),
29597
+ '--v-icon-btn-width': convertToUnit(btnWidth)
29598
+ }, colorStyles.value, props.style],
29599
+ "tabindex": props.disabled || props.readonly ? -1 : 0,
29600
+ "onClick": onClick
29601
+ }, {
29602
+ default: () => [genOverlays(!props.hideOverlay, 'v-icon-btn'), createVNode("div", {
29603
+ "class": "v-icon-btn__content",
29604
+ "data-no-activator": ""
29605
+ }, [!slots.default && icon ? createVNode(VIcon, mergeProps({
29606
+ "key": "content-icon"
29607
+ }, iconProps), null) : createVNode(VDefaultsProvider, {
29608
+ "key": "content-defaults",
29609
+ "disabled": !icon,
29610
+ "defaults": {
29611
+ VIcon: {
29612
+ ...iconProps
29613
+ }
29614
+ }
29615
+ }, {
29616
+ default: () => slots.default?.() ?? toDisplayString(props.text)
29617
+ })]), !!props.loading && createVNode("span", {
29618
+ "key": "loader",
29619
+ "class": "v-icon-btn__loader"
29620
+ }, [slots.loader?.() ?? createVNode(VProgressCircular, {
29621
+ "color": typeof props.loading === 'boolean' ? undefined : props.loading,
29622
+ "indeterminate": "disable-shrink",
29623
+ "width": "2",
29624
+ "size": iconSize
29625
+ }, null)])]
29626
+ });
29627
+ });
29628
+ return {};
29629
+ }
29630
+ });
29631
+
29632
+ // Types
29633
+
29370
29634
  const makeVStepperVerticalActionsProps = propsFactory({
29371
29635
  ...makeVStepperActionsProps()
29372
29636
  }, 'VStepperActions');
@@ -30846,6 +31110,7 @@ var components = /*#__PURE__*/Object.freeze({
30846
31110
  VForm: VForm,
30847
31111
  VHover: VHover,
30848
31112
  VIcon: VIcon,
31113
+ VIconBtn: VIconBtn,
30849
31114
  VImg: VImg,
30850
31115
  VInfiniteScroll: VInfiniteScroll,
30851
31116
  VInput: VInput,
@@ -31265,7 +31530,7 @@ function createVuetify$1() {
31265
31530
  };
31266
31531
  });
31267
31532
  }
31268
- const version$1 = "3.8.0-beta.0";
31533
+ const version$1 = "3.8.0";
31269
31534
  createVuetify$1.version = version$1;
31270
31535
 
31271
31536
  // Vue's inject() can only be used in setup
@@ -31550,7 +31815,7 @@ var index = /*#__PURE__*/Object.freeze({
31550
31815
 
31551
31816
  /* eslint-disable local-rules/sort-imports */
31552
31817
 
31553
- const version = "3.8.0-beta.0";
31818
+ const version = "3.8.0";
31554
31819
 
31555
31820
  /* eslint-disable local-rules/sort-imports */
31556
31821