vuetify 3.0.1 → 3.0.3

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 (71) hide show
  1. package/dist/json/attributes.json +24 -24
  2. package/dist/json/importMap.json +34 -30
  3. package/dist/json/web-types.json +93 -62
  4. package/dist/vuetify.css +204 -205
  5. package/dist/vuetify.d.ts +334 -142
  6. package/dist/vuetify.esm.js +57 -47
  7. package/dist/vuetify.esm.js.map +1 -1
  8. package/dist/vuetify.js +56 -46
  9. package/dist/vuetify.js.map +1 -1
  10. package/dist/vuetify.min.css +2 -2
  11. package/dist/vuetify.min.js +333 -330
  12. package/dist/vuetify.min.js.map +1 -1
  13. package/lib/components/VAppBar/VAppBar.mjs +2 -2
  14. package/lib/components/VAppBar/VAppBar.mjs.map +1 -1
  15. package/lib/components/VAppBar/index.d.ts +275 -62
  16. package/lib/components/VAutocomplete/index.d.ts +6 -6
  17. package/lib/components/VCard/VCard.css +0 -3
  18. package/lib/components/VCard/VCard.mjs +2 -1
  19. package/lib/components/VCard/VCard.mjs.map +1 -1
  20. package/lib/components/VCard/VCard.sass +0 -3
  21. package/lib/components/VCard/VCardItem.mjs +1 -2
  22. package/lib/components/VCard/VCardItem.mjs.map +1 -1
  23. package/lib/components/VCombobox/index.d.ts +6 -6
  24. package/lib/components/VDefaultsProvider/VDefaultsProvider.mjs +1 -1
  25. package/lib/components/VDefaultsProvider/VDefaultsProvider.mjs.map +1 -1
  26. package/lib/components/VField/index.d.ts +6 -6
  27. package/lib/components/VFileInput/index.d.ts +1 -1
  28. package/lib/components/VFooter/VFooter.mjs +1 -1
  29. package/lib/components/VFooter/VFooter.mjs.map +1 -1
  30. package/lib/components/VLazy/VLazy.mjs +2 -1
  31. package/lib/components/VLazy/VLazy.mjs.map +1 -1
  32. package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs +2 -2
  33. package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs.map +1 -1
  34. package/lib/components/VOverlay/locationStrategies.mjs +3 -1
  35. package/lib/components/VOverlay/locationStrategies.mjs.map +1 -1
  36. package/lib/components/VOverlay/scrollStrategies.mjs +4 -0
  37. package/lib/components/VOverlay/scrollStrategies.mjs.map +1 -1
  38. package/lib/components/VOverlay/useActivator.mjs +4 -0
  39. package/lib/components/VOverlay/useActivator.mjs.map +1 -1
  40. package/lib/components/VProgressLinear/VProgressLinear.mjs +1 -0
  41. package/lib/components/VProgressLinear/VProgressLinear.mjs.map +1 -1
  42. package/lib/components/VProgressLinear/VProgressLinear.sass +1 -1
  43. package/lib/components/VProgressLinear/_variables.scss +1 -1
  44. package/lib/components/VRating/VRating.mjs +7 -6
  45. package/lib/components/VRating/VRating.mjs.map +1 -1
  46. package/lib/components/VRating/index.d.ts +14 -14
  47. package/lib/components/VSelect/index.d.ts +6 -6
  48. package/lib/components/VSelectionControl/index.d.ts +6 -6
  49. package/lib/components/VSlideGroup/VSlideGroup.css +1 -0
  50. package/lib/components/VSlideGroup/VSlideGroup.sass +1 -0
  51. package/lib/components/VTextField/index.d.ts +18 -18
  52. package/lib/components/VTextarea/index.d.ts +1 -1
  53. package/lib/components/VToolbar/VToolbar.css +1 -0
  54. package/lib/components/VToolbar/VToolbar.mjs.map +1 -1
  55. package/lib/components/VToolbar/VToolbar.sass +1 -0
  56. package/lib/components/VToolbar/index.d.ts +9 -8
  57. package/lib/components/index.d.ts +324 -133
  58. package/lib/components/transitions/dialog-transition.mjs +2 -2
  59. package/lib/components/transitions/dialog-transition.mjs.map +1 -1
  60. package/lib/components/transitions/index.mjs +1 -1
  61. package/lib/components/transitions/index.mjs.map +1 -1
  62. package/lib/composables/nested/nested.mjs +2 -2
  63. package/lib/composables/nested/nested.mjs.map +1 -1
  64. package/lib/composables/toggleScope.mjs +6 -2
  65. package/lib/composables/toggleScope.mjs.map +1 -1
  66. package/lib/entry-bundler.mjs +1 -1
  67. package/lib/framework.mjs +1 -1
  68. package/lib/index.d.ts +10 -9
  69. package/lib/util/defineComponent.mjs +8 -13
  70. package/lib/util/defineComponent.mjs.map +1 -1
  71. package/package.json +2 -2
@@ -1,10 +1,10 @@
1
1
  /*!
2
- * Vuetify v3.0.1
2
+ * Vuetify v3.0.3
3
3
  * Forged by John Leider
4
4
  * Released under the MIT License.
5
5
  */
6
6
 
7
- import { ref, onBeforeUnmount, watch, readonly, Fragment, reactive, computed, watchEffect, toRefs, capitalize, getCurrentInstance as getCurrentInstance$1, unref, provide, inject as inject$1, shallowRef, shallowReactive, toRaw, effectScope, defineComponent as defineComponent$1, camelize, h, onDeactivated, onActivated, onMounted, createVNode, TransitionGroup, Transition, mergeProps, onBeforeMount, nextTick, withDirectives, resolveDirective, vShow, isRef, toRef, resolveDynamicComponent, onScopeDispose, cloneVNode, warn, toHandlers, Teleport, createTextVNode, onBeforeUpdate, vModelText } from 'vue';
7
+ import { ref, onBeforeUnmount, watch, readonly, Fragment, reactive, computed, watchEffect, toRefs, capitalize, getCurrentInstance as getCurrentInstance$1, unref, provide, inject as inject$1, effectScope, onScopeDispose, shallowRef, shallowReactive, toRaw, defineComponent as defineComponent$1, camelize, h, onDeactivated, onActivated, onMounted, createVNode, TransitionGroup, Transition, mergeProps, onBeforeMount, nextTick, withDirectives, resolveDirective, vShow, isRef, toRef, resolveDynamicComponent, cloneVNode, warn, toHandlers, Teleport, createTextVNode, onBeforeUpdate, vModelText } from 'vue';
8
8
 
9
9
  const IN_BROWSER = typeof window !== 'undefined';
10
10
  const SUPPORTS_INTERSECTION = IN_BROWSER && 'IntersectionObserver' in window;
@@ -927,6 +927,26 @@ function provideDefaults(defaults, options) {
927
927
  return newDefaults;
928
928
  }
929
929
 
930
+ function useToggleScope(source, cb) {
931
+ let scope;
932
+ watch(source, active => {
933
+ if (active && !scope) {
934
+ scope = effectScope();
935
+ scope.run(cb);
936
+ } else if (!active) {
937
+ var _scope;
938
+ (_scope = scope) == null ? void 0 : _scope.stop();
939
+ scope = undefined;
940
+ }
941
+ }, {
942
+ immediate: true
943
+ });
944
+ onScopeDispose(() => {
945
+ var _scope2;
946
+ (_scope2 = scope) == null ? void 0 : _scope2.stop();
947
+ });
948
+ }
949
+
930
950
  /**
931
951
  * Creates a factory function for props definitions.
932
952
  * This is used to define props in a composable then override
@@ -1019,17 +1039,9 @@ const defineComponent = function defineComponent(options) {
1019
1039
  }
1020
1040
  });
1021
1041
  const setupBindings = options._setup(_props, ctx);
1022
- let scope;
1023
- watch(_subcomponentDefaults, (val, oldVal) => {
1024
- if (!val && scope) scope.stop();else if (val && !oldVal) {
1025
- scope = effectScope();
1026
- scope.run(() => {
1027
- var _injectSelf;
1028
- provideDefaults(mergeDeep(((_injectSelf = injectSelf(DefaultsSymbol)) == null ? void 0 : _injectSelf.value) ?? {}, val));
1029
- });
1030
- }
1031
- }, {
1032
- immediate: true
1042
+ useToggleScope(_subcomponentDefaults, () => {
1043
+ var _injectSelf;
1044
+ provideDefaults(mergeDeep(((_injectSelf = injectSelf(DefaultsSymbol)) == null ? void 0 : _injectSelf.value) ?? {}, _subcomponentDefaults.value));
1033
1045
  });
1034
1046
  return setupBindings;
1035
1047
  };
@@ -1776,22 +1788,6 @@ function genCssVariables(theme) {
1776
1788
  return variables;
1777
1789
  }
1778
1790
 
1779
- function useToggleScope(source, cb) {
1780
- let scope;
1781
- watch(source, active => {
1782
- if (active && !scope) {
1783
- scope = effectScope();
1784
- scope.run(cb);
1785
- } else {
1786
- var _scope;
1787
- (_scope = scope) == null ? void 0 : _scope.stop();
1788
- scope = undefined;
1789
- }
1790
- }, {
1791
- immediate: true
1792
- });
1793
- }
1794
-
1795
1791
  // Utilities
1796
1792
 
1797
1793
  // Types
@@ -2480,8 +2476,8 @@ function getDimensions(target, el) {
2480
2476
  const tsx = targetBox.width / elBox.width;
2481
2477
  const tsy = targetBox.height / elBox.height;
2482
2478
  const maxs = Math.max(1, tsx, tsy);
2483
- const sx = tsx / maxs;
2484
- const sy = tsy / maxs;
2479
+ const sx = tsx / maxs || 0;
2480
+ const sy = tsy / maxs || 0;
2485
2481
 
2486
2482
  // Animate elements larger than 12% of the screen area up to 1.5x slower
2487
2483
  const asa = elBox.width * elBox.height / (window.innerWidth * window.innerHeight);
@@ -3216,7 +3212,7 @@ function filterToolbarProps(props) {
3216
3212
 
3217
3213
  // Types
3218
3214
 
3219
- const VAppBar = defineComponent({
3215
+ const VAppBar = genericComponent()({
3220
3216
  name: 'VAppBar',
3221
3217
  props: {
3222
3218
  // TODO: Implement scrolling techniques
@@ -4466,6 +4462,7 @@ const VProgressLinear = defineComponent({
4466
4462
  '--v-progress-linear-height': convertToUnit(height.value)
4467
4463
  },
4468
4464
  "role": "progressbar",
4465
+ "aria-hidden": props.active ? 'false' : 'true',
4469
4466
  "aria-valuemin": "0",
4470
4467
  "aria-valuemax": props.max,
4471
4468
  "aria-valuenow": props.indeterminate ? undefined : normalizedValue.value,
@@ -7204,7 +7201,7 @@ const emptyNested = {
7204
7201
  };
7205
7202
  const makeNestedProps = propsFactory({
7206
7203
  selectStrategy: [String, Function],
7207
- openStrategy: [String, Function],
7204
+ openStrategy: [String, Object],
7208
7205
  opened: Array,
7209
7206
  selected: Array,
7210
7207
  mandatory: Boolean
@@ -7231,7 +7228,7 @@ const useNested = props => {
7231
7228
  }
7232
7229
  });
7233
7230
  const openStrategy = computed(() => {
7234
- if (typeof props.openStrategy === 'function') return props.openStrategy;
7231
+ if (typeof props.openStrategy === 'object') return props.openStrategy;
7235
7232
  switch (props.openStrategy) {
7236
7233
  case 'list':
7237
7234
  return listOpenStrategy;
@@ -8346,6 +8343,10 @@ function useActivator(props, _ref) {
8346
8343
  flush: 'post',
8347
8344
  immediate: true
8348
8345
  });
8346
+ onScopeDispose(() => {
8347
+ var _scope;
8348
+ (_scope = scope) == null ? void 0 : _scope.stop();
8349
+ });
8349
8350
  return {
8350
8351
  activatorEl,
8351
8352
  activatorRef,
@@ -8535,7 +8536,9 @@ function useLocationStrategies(props, data) {
8535
8536
  updateLocation.value = undefined;
8536
8537
  if (!(IN_BROWSER && data.isActive.value && props.locationStrategy)) return;
8537
8538
  scope = effectScope();
8538
- await nextTick();
8539
+ if (!(props.locationStrategy === 'connected')) {
8540
+ await nextTick();
8541
+ }
8539
8542
  scope.run(() => {
8540
8543
  if (typeof props.locationStrategy === 'function') {
8541
8544
  var _props$locationStrate;
@@ -8929,6 +8932,10 @@ function useScrollStrategies(props, data) {
8929
8932
  }
8930
8933
  });
8931
8934
  });
8935
+ onScopeDispose(() => {
8936
+ var _scope2;
8937
+ (_scope2 = scope) == null ? void 0 : _scope2.stop();
8938
+ });
8932
8939
  }
8933
8940
  function closeScrollStrategy(data) {
8934
8941
  function onScroll(e) {
@@ -10783,7 +10790,7 @@ const VCardSubtitle = createSimpleFunctional('v-card-subtitle');
10783
10790
 
10784
10791
  const VCardTitle = createSimpleFunctional('v-card-title');
10785
10792
 
10786
- const VCardItem = defineComponent$1({
10793
+ const VCardItem = defineComponent({
10787
10794
  name: 'VCardItem',
10788
10795
  props: {
10789
10796
  appendAvatar: String,
@@ -10955,7 +10962,8 @@ const VCard = defineComponent({
10955
10962
  }, themeClasses.value, borderClasses.value, colorClasses.value, densityClasses.value, elevationClasses.value, loaderClasses.value, positionClasses.value, roundedClasses.value, variantClasses.value],
10956
10963
  "style": [colorStyles.value, dimensionStyles.value, locationStyles.value],
10957
10964
  "href": link.href.value,
10958
- "onClick": isClickable.value && link.navigate
10965
+ "onClick": isClickable.value && link.navigate,
10966
+ "tabindex": props.disabled ? -1 : undefined
10959
10967
  }, {
10960
10968
  default: () => [hasImage && createVNode(VDefaultsProvider, {
10961
10969
  "key": "image",
@@ -14212,7 +14220,7 @@ const VFooter = defineComponent({
14212
14220
  useRender(() => createVNode(props.tag, {
14213
14221
  "ref": resizeRef,
14214
14222
  "class": ['v-footer', themeClasses.value, backgroundColorClasses.value, borderClasses.value, elevationClasses.value, roundedClasses.value],
14215
- "style": [backgroundColorStyles, props.app ? layoutItemStyles.value : undefined]
14223
+ "style": [backgroundColorStyles.value, props.app ? layoutItemStyles.value : undefined]
14216
14224
  }, slots));
14217
14225
  return {};
14218
14226
  }
@@ -14774,7 +14782,8 @@ const VLazy = defineComponent({
14774
14782
  "style": dimensionStyles.value
14775
14783
  }, {
14776
14784
  default: () => [isActive.value && createVNode(MaybeTransition, {
14777
- "transition": props.transition
14785
+ "transition": props.transition,
14786
+ "appear": true
14778
14787
  }, {
14779
14788
  default: () => [(_slots$default = slots.default) == null ? void 0 : _slots$default.call(slots)]
14780
14789
  })]
@@ -15234,7 +15243,7 @@ const VNavigationDrawer = defineComponent({
15234
15243
  const isTemporary = computed(() => !props.permanent && (mobile.value || props.temporary));
15235
15244
  const isSticky = computed(() => props.sticky && !isTemporary.value && location.value !== 'bottom');
15236
15245
  if (!props.disableResizeWatcher) {
15237
- watch(isTemporary, val => !props.permanent && (isActive.value = !val));
15246
+ watch(isTemporary, val => !props.permanent && nextTick(() => isActive.value = !val));
15238
15247
  }
15239
15248
  if (!props.disableRouteWatcher && router) {
15240
15249
  watch(router.currentRoute, () => isTemporary.value && (isActive.value = false));
@@ -16112,7 +16121,7 @@ const VRating = genericComponent()({
16112
16121
  },
16113
16122
  readonly: Boolean,
16114
16123
  modelValue: {
16115
- type: Number,
16124
+ type: [Number, String],
16116
16125
  default: 0
16117
16126
  },
16118
16127
  itemLabels: Array,
@@ -16141,6 +16150,7 @@ const VRating = genericComponent()({
16141
16150
  themeClasses
16142
16151
  } = provideTheme(props);
16143
16152
  const rating = useProxiedModel(props, 'modelValue');
16153
+ const normalizedValue = computed(() => clamp(parseFloat(rating.value), 0, +props.length));
16144
16154
  const range = computed(() => createRange(Number(props.length), 1));
16145
16155
  const increments = computed(() => range.value.flatMap(v => props.halfIncrements ? [v - 0.5, v] : [v]));
16146
16156
  const hoverIndex = ref(-1);
@@ -16149,7 +16159,7 @@ const VRating = genericComponent()({
16149
16159
  let isClicking = false;
16150
16160
  const itemState = computed(() => increments.value.map(value => {
16151
16161
  const isHovering = props.hover && hoverIndex.value > -1;
16152
- const isFilled = rating.value >= value;
16162
+ const isFilled = normalizedValue.value >= value;
16153
16163
  const isHovered = hoverIndex.value >= value;
16154
16164
  const isFullIcon = isHovering ? isHovered : isFilled;
16155
16165
  const icon = isFullIcon ? props.fullIcon : props.emptyIcon;
@@ -16170,7 +16180,7 @@ const VRating = genericComponent()({
16170
16180
  hoverIndex.value = -1;
16171
16181
  }
16172
16182
  function onFocus() {
16173
- if (value === 0 && rating.value === 0) {
16183
+ if (value === 0 && normalizedValue.value === 0) {
16174
16184
  var _firstRef$value;
16175
16185
  (_firstRef$value = firstRef.value) == null ? void 0 : _firstRef$value.focus();
16176
16186
  } else {
@@ -16182,7 +16192,7 @@ const VRating = genericComponent()({
16182
16192
  }
16183
16193
  function onClick() {
16184
16194
  if (props.disabled || props.readonly) return;
16185
- rating.value = rating.value === value && props.clearable ? 0 : value;
16195
+ rating.value = normalizedValue.value === value && props.clearable ? 0 : value;
16186
16196
  }
16187
16197
  return {
16188
16198
  onMouseenter: props.hover ? onMouseenter : undefined,
@@ -16247,7 +16257,7 @@ const VRating = genericComponent()({
16247
16257
  "id": id,
16248
16258
  "type": "radio",
16249
16259
  "value": value,
16250
- "checked": rating.value === value,
16260
+ "checked": normalizedValue.value === value,
16251
16261
  "onClick": onClick,
16252
16262
  "onFocus": onFocus,
16253
16263
  "onBlur": onBlur,
@@ -18156,7 +18166,7 @@ function createVuetify$1() {
18156
18166
  locale
18157
18167
  };
18158
18168
  }
18159
- const version$1 = "3.0.1";
18169
+ const version$1 = "3.0.3";
18160
18170
  createVuetify$1.version = version$1;
18161
18171
 
18162
18172
  // Vue's inject() can only be used in setup
@@ -18177,7 +18187,7 @@ const createVuetify = function () {
18177
18187
  ...options
18178
18188
  });
18179
18189
  };
18180
- const version = "3.0.1";
18190
+ const version = "3.0.3";
18181
18191
  createVuetify.version = version;
18182
18192
 
18183
18193
  export { components, createVuetify, directives, useDisplay, useLayout, useLocale, useRtl, useTheme, version };