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
  */
@@ -158,7 +158,7 @@ function has(obj, key) {
158
158
  function pick(obj, paths) {
159
159
  const found = {};
160
160
  for (const key of paths) {
161
- if (Object.hasOwn(obj, key)) {
161
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
162
162
  found[key] = obj[key];
163
163
  }
164
164
  }
@@ -4928,6 +4928,7 @@ const makeVIconProps = propsFactory({
4928
4928
  start: Boolean,
4929
4929
  end: Boolean,
4930
4930
  icon: IconValue,
4931
+ opacity: [String, Number],
4931
4932
  ...makeComponentProps(),
4932
4933
  ...makeSizeProps(),
4933
4934
  ...makeTagProps({
@@ -4946,7 +4947,7 @@ const VIcon = genericComponent()({
4946
4947
  const slotIcon = ref();
4947
4948
  const {
4948
4949
  themeClasses
4949
- } = provideTheme(props);
4950
+ } = useTheme();
4950
4951
  const {
4951
4952
  iconData
4952
4953
  } = useIcon(computed(() => slotIcon.value || props.icon));
@@ -4972,7 +4973,9 @@ const VIcon = genericComponent()({
4972
4973
  'v-icon--start': props.start,
4973
4974
  'v-icon--end': props.end
4974
4975
  }, props.class],
4975
- "style": [!sizeClasses.value ? {
4976
+ "style": [{
4977
+ '--v-icon-opacity': props.opacity
4978
+ }, !sizeClasses.value ? {
4976
4979
  fontSize: convertToUnit(props.size),
4977
4980
  height: convertToUnit(props.size),
4978
4981
  width: convertToUnit(props.size)
@@ -12128,7 +12131,11 @@ const VField = genericComponent()({
12128
12131
  },
12129
12132
  focus,
12130
12133
  blur
12131
- })]), hasClear && createVNode(VExpandXTransition, {
12134
+ }) ?? createVNode("div", {
12135
+ "id": id.value,
12136
+ "class": "v-field__input",
12137
+ "aria-describedby": messagesId.value
12138
+ }, null)]), hasClear && createVNode(VExpandXTransition, {
12132
12139
  "key": "clear"
12133
12140
  }, {
12134
12141
  default: () => [withDirectives(createVNode("div", {
@@ -13660,12 +13667,7 @@ const VAutocomplete = genericComponent()({
13660
13667
  } else {
13661
13668
  if (!props.multiple && search.value == null) model.value = [];
13662
13669
  menu.value = false;
13663
- if (!model.value.some(_ref3 => {
13664
- let {
13665
- title
13666
- } = _ref3;
13667
- return title === search.value;
13668
- })) search.value = '';
13670
+ if (props.multiple || hasSelectionSlot.value) search.value = '';
13669
13671
  selectionIndex.value = -1;
13670
13672
  }
13671
13673
  });
@@ -13753,12 +13755,12 @@ const VAutocomplete = genericComponent()({
13753
13755
  "items": displayItems.value,
13754
13756
  "itemKey": "value"
13755
13757
  }, {
13756
- default: _ref4 => {
13758
+ default: _ref3 => {
13757
13759
  let {
13758
13760
  item,
13759
13761
  index,
13760
13762
  itemRef
13761
- } = _ref4;
13763
+ } = _ref3;
13762
13764
  const itemProps = mergeProps(item.props, {
13763
13765
  ref: itemRef,
13764
13766
  key: item.value,
@@ -13772,10 +13774,10 @@ const VAutocomplete = genericComponent()({
13772
13774
  }) ?? createVNode(VListItem, mergeProps(itemProps, {
13773
13775
  "role": "option"
13774
13776
  }), {
13775
- prepend: _ref5 => {
13777
+ prepend: _ref4 => {
13776
13778
  let {
13777
13779
  isSelected
13778
- } = _ref5;
13780
+ } = _ref4;
13779
13781
  return createVNode(Fragment, null, [props.multiple && !props.hideSelected ? createVNode(VCheckboxBtn, {
13780
13782
  "key": item.value,
13781
13783
  "modelValue": isSelected,
@@ -16644,7 +16646,7 @@ const VColorPickerPreview = defineComponent({
16644
16646
  const abortController = new AbortController();
16645
16647
  onUnmounted(() => abortController.abort());
16646
16648
  async function openEyeDropper() {
16647
- if (!SUPPORTS_EYE_DROPPER) return;
16649
+ if (!SUPPORTS_EYE_DROPPER || props.disabled) return;
16648
16650
  const eyeDropper = new window.EyeDropper();
16649
16651
  try {
16650
16652
  const result = await eyeDropper.open({
@@ -16666,10 +16668,11 @@ const VColorPickerPreview = defineComponent({
16666
16668
  "class": "v-color-picker-preview__eye-dropper",
16667
16669
  "key": "eyeDropper"
16668
16670
  }, [createVNode(VBtn, {
16669
- "onClick": openEyeDropper,
16671
+ "density": "comfortable",
16672
+ "disabled": props.disabled,
16670
16673
  "icon": "$eyeDropper",
16671
16674
  "variant": "plain",
16672
- "density": "comfortable"
16675
+ "onClick": openEyeDropper
16673
16676
  }, null)]), createVNode("div", {
16674
16677
  "class": "v-color-picker-preview__dot"
16675
16678
  }, [createVNode("div", {
@@ -18697,6 +18700,10 @@ const makeVConfirmEditProps = propsFactory({
18697
18700
  type: String,
18698
18701
  default: '$vuetify.confirmEdit.ok'
18699
18702
  },
18703
+ disabled: {
18704
+ type: [Boolean, Array],
18705
+ default: undefined
18706
+ },
18700
18707
  hideActions: Boolean
18701
18708
  }, 'VConfirmEdit');
18702
18709
  const VConfirmEdit = genericComponent()({
@@ -18723,6 +18730,17 @@ const VConfirmEdit = genericComponent()({
18723
18730
  const isPristine = computed(() => {
18724
18731
  return deepEqual(model.value, internalModel.value);
18725
18732
  });
18733
+ function isActionDisabled(action) {
18734
+ if (typeof props.disabled === 'boolean') {
18735
+ return props.disabled;
18736
+ }
18737
+ if (Array.isArray(props.disabled)) {
18738
+ return props.disabled.includes(action);
18739
+ }
18740
+ return isPristine.value;
18741
+ }
18742
+ const isSaveDisabled = computed(() => isActionDisabled('save'));
18743
+ const isCancelDisabled = computed(() => isActionDisabled('cancel'));
18726
18744
  function save() {
18727
18745
  model.value = internalModel.value;
18728
18746
  emit('save', internalModel.value);
@@ -18733,13 +18751,13 @@ const VConfirmEdit = genericComponent()({
18733
18751
  }
18734
18752
  function actions(actionsProps) {
18735
18753
  return createVNode(Fragment, null, [createVNode(VBtn, mergeProps({
18736
- "disabled": isPristine.value,
18754
+ "disabled": isCancelDisabled.value,
18737
18755
  "variant": "text",
18738
18756
  "color": props.color,
18739
18757
  "onClick": cancel,
18740
18758
  "text": t(props.cancelText)
18741
18759
  }, actionsProps), null), createVNode(VBtn, mergeProps({
18742
- "disabled": isPristine.value,
18760
+ "disabled": isSaveDisabled.value,
18743
18761
  "variant": "text",
18744
18762
  "color": props.color,
18745
18763
  "onClick": save,
@@ -20825,22 +20843,37 @@ const VDataTableRow = genericComponent()({
20825
20843
  "width": !mobile.value ? column.width : undefined
20826
20844
  }, cellProps, columnCellProps), {
20827
20845
  default: () => {
20828
- if (slots[slotName] && !mobile.value) return slots[slotName]?.(slotProps);
20829
20846
  if (column.key === 'data-table-select') {
20830
- return slots['item.data-table-select']?.(slotProps) ?? createVNode(VCheckboxBtn, {
20847
+ return slots['item.data-table-select']?.({
20848
+ ...slotProps,
20849
+ props: {
20850
+ disabled: !item.selectable,
20851
+ modelValue: isSelected([item]),
20852
+ onClick: withModifiers(() => toggleSelect(item), ['stop'])
20853
+ }
20854
+ }) ?? createVNode(VCheckboxBtn, {
20831
20855
  "disabled": !item.selectable,
20832
20856
  "modelValue": isSelected([item]),
20833
20857
  "onClick": withModifiers(event => toggleSelect(item, props.index, event), ['stop'])
20834
20858
  }, null);
20835
20859
  }
20836
20860
  if (column.key === 'data-table-expand') {
20837
- return slots['item.data-table-expand']?.(slotProps) ?? createVNode(VBtn, {
20861
+ return slots['item.data-table-expand']?.({
20862
+ ...slotProps,
20863
+ props: {
20864
+ icon: isExpanded(item) ? '$collapse' : '$expand',
20865
+ size: 'small',
20866
+ variant: 'text',
20867
+ onClick: withModifiers(() => toggleExpand(item), ['stop'])
20868
+ }
20869
+ }) ?? createVNode(VBtn, {
20838
20870
  "icon": isExpanded(item) ? '$collapse' : '$expand',
20839
20871
  "size": "small",
20840
20872
  "variant": "text",
20841
20873
  "onClick": withModifiers(() => toggleExpand(item), ['stop'])
20842
20874
  }, null);
20843
20875
  }
20876
+ if (slots[slotName] && !mobile.value) return slots[slotName](slotProps);
20844
20877
  const displayValue = toDisplayString(slotProps.value);
20845
20878
  return !mobile.value ? displayValue : createVNode(Fragment, null, [createVNode("div", {
20846
20879
  "class": "v-data-table__td-title"
@@ -22179,11 +22212,14 @@ const makeCalendarProps = propsFactory({
22179
22212
  type: String,
22180
22213
  default: 'dynamic'
22181
22214
  },
22182
- firstDayOfWeek: [Number, String]
22215
+ firstDayOfWeek: {
22216
+ type: [Number, String],
22217
+ default: 0
22218
+ }
22183
22219
  }, 'calendar');
22184
22220
  function useCalendar(props) {
22185
22221
  const adapter = useDate();
22186
- const model = useProxiedModel(props, 'modelValue', [], v => wrapInArray(v));
22222
+ const model = useProxiedModel(props, 'modelValue', [], v => wrapInArray(v).map(i => adapter.date(i)));
22187
22223
  const displayValue = computed(() => {
22188
22224
  if (props.displayValue) return adapter.date(props.displayValue);
22189
22225
  if (model.value.length > 0) return adapter.date(model.value[0]);
@@ -22200,15 +22236,15 @@ function useCalendar(props) {
22200
22236
  const date = adapter.setYear(adapter.startOfMonth(adapter.date()), adapter.getYear(year.value));
22201
22237
  return adapter.setMonth(date, value);
22202
22238
  }, v => adapter.getMonth(v));
22203
- const defaultFirstDayOfWeek = computed(() => {
22204
- return props.firstDayOfWeek ?? props.weekdays[0];
22205
- });
22206
22239
  const weekDays = computed(() => {
22207
- const firstDayOfWeek = Number(props.firstDayOfWeek ?? 0);
22208
- return props.weekdays.map(day => (day + firstDayOfWeek) % 7);
22240
+ const firstDayOfWeek = Number(props.firstDayOfWeek);
22241
+
22242
+ // Always generate all days, regardless of props.weekdays
22243
+ return [0, 1, 2, 3, 4, 5, 6].map(day => (day + firstDayOfWeek) % 7);
22209
22244
  });
22210
22245
  const weeksInMonth = computed(() => {
22211
- const weeks = adapter.getWeekArray(month.value, defaultFirstDayOfWeek.value);
22246
+ const firstDayOfWeek = Number(props.firstDayOfWeek);
22247
+ const weeks = adapter.getWeekArray(month.value, firstDayOfWeek);
22212
22248
  const days = weeks.flat();
22213
22249
 
22214
22250
  // Make sure there's always 6 weeks in month (6 * 7 days)
@@ -22286,7 +22322,7 @@ function useCalendar(props) {
22286
22322
  if (typeof props.allowedDates === 'function') {
22287
22323
  return !props.allowedDates(date);
22288
22324
  }
22289
- return false;
22325
+ return !props.weekdays.includes(adapter.toJsDate(date).getDay());
22290
22326
  }
22291
22327
  return {
22292
22328
  displayValue,
@@ -22696,7 +22732,7 @@ const VDatePicker = genericComponent()({
22696
22732
  const {
22697
22733
  rtlClasses
22698
22734
  } = useRtl();
22699
- const model = useProxiedModel(props, 'modelValue', undefined, v => wrapInArray(v), v => props.multiple ? v : v[0]);
22735
+ const model = useProxiedModel(props, 'modelValue', undefined, v => wrapInArray(v).map(i => adapter.date(i)), v => props.multiple ? v : v[0]);
22700
22736
  const viewMode = useProxiedModel(props, 'viewMode');
22701
22737
  // const inputMode = useProxiedModel(props, 'inputMode')
22702
22738
 
@@ -23021,7 +23057,9 @@ const VEmptyState = genericComponent()({
23021
23057
  VBtn: {
23022
23058
  class: 'v-empty-state__action-btn',
23023
23059
  color: props.color ?? 'surface-variant',
23024
- text: props.actionText
23060
+ href: props.href,
23061
+ text: props.actionText,
23062
+ to: props.to
23025
23063
  }
23026
23064
  }
23027
23065
  }, {
@@ -29168,7 +29206,7 @@ function createVuetify$1() {
29168
29206
  };
29169
29207
  });
29170
29208
  }
29171
- const version$1 = "3.8.0-beta.0";
29209
+ const version$1 = "3.8.0";
29172
29210
  createVuetify$1.version = version$1;
29173
29211
 
29174
29212
  // Vue's inject() can only be used in setup
@@ -29193,7 +29231,7 @@ const createVuetify = function () {
29193
29231
  ...options
29194
29232
  });
29195
29233
  };
29196
- const version = "3.8.0-beta.0";
29234
+ const version = "3.8.0";
29197
29235
  createVuetify.version = version;
29198
29236
 
29199
29237
  export { index as blueprints, components, createVuetify, directives, useDate, useDefaults, useDisplay, useGoTo, useLayout, useLocale, useRtl, useTheme, version };