@vuetify/nightly 3.7.0-beta.1-dev.2024-07-29 → 3.7.0-beta.1-dev.2024-08-01

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 (135) hide show
  1. package/dist/json/attributes.json +17 -5
  2. package/dist/json/importMap-labs.json +12 -12
  3. package/dist/json/importMap.json +112 -112
  4. package/dist/json/tags.json +3 -0
  5. package/dist/json/web-types.json +44 -14
  6. package/dist/vuetify-labs.css +4400 -3677
  7. package/dist/vuetify-labs.d.ts +219 -117
  8. package/dist/vuetify-labs.esm.js +125 -77
  9. package/dist/vuetify-labs.esm.js.map +1 -1
  10. package/dist/vuetify-labs.js +125 -77
  11. package/dist/vuetify-labs.min.css +2 -2
  12. package/dist/vuetify.css +3534 -2811
  13. package/dist/vuetify.d.ts +230 -146
  14. package/dist/vuetify.esm.js +62 -39
  15. package/dist/vuetify.esm.js.map +1 -1
  16. package/dist/vuetify.js +62 -39
  17. package/dist/vuetify.js.map +1 -1
  18. package/dist/vuetify.min.css +2 -2
  19. package/dist/vuetify.min.js +52 -51
  20. package/dist/vuetify.min.js.map +1 -1
  21. package/lib/components/VAlert/VAlert.css +5 -1
  22. package/lib/components/VAutocomplete/VAutocomplete.css +4 -0
  23. package/lib/components/VAutocomplete/index.d.mts +42 -24
  24. package/lib/components/VAvatar/VAvatar.css +8 -4
  25. package/lib/components/VAvatar/VAvatar.mjs +1 -1
  26. package/lib/components/VAvatar/VAvatar.mjs.map +1 -1
  27. package/lib/components/VBadge/VBadge.css +2 -0
  28. package/lib/components/VBanner/VBanner.css +12 -4
  29. package/lib/components/VBottomNavigation/VBottomNavigation.css +11 -3
  30. package/lib/components/VBottomSheet/VBottomSheet.css +2 -0
  31. package/lib/components/VBtn/VBtn.css +16 -9
  32. package/lib/components/VBtn/VBtn.mjs +1 -1
  33. package/lib/components/VBtn/VBtn.mjs.map +1 -1
  34. package/lib/components/VBtn/VBtn.sass +4 -4
  35. package/lib/components/VBtnGroup/VBtnGroup.css +12 -4
  36. package/lib/components/VCard/VCard.css +9 -1
  37. package/lib/components/VCarousel/VCarousel.css +2 -0
  38. package/lib/components/VChip/VChip.css +15 -9
  39. package/lib/components/VChip/VChip.sass +1 -1
  40. package/lib/components/VColorPicker/VColorPicker.css +2 -0
  41. package/lib/components/VColorPicker/VColorPicker.sass +4 -4
  42. package/lib/components/VColorPicker/VColorPickerPreview.sass +4 -4
  43. package/lib/components/VCombobox/VCombobox.css +4 -0
  44. package/lib/components/VCombobox/index.d.mts +42 -24
  45. package/lib/components/VDialog/VDialog.css +5 -0
  46. package/lib/components/VDialog/index.d.mts +3 -3
  47. package/lib/components/VDivider/VDivider.css +2 -0
  48. package/lib/components/VExpansionPanel/VExpansionPanel.css +11 -5
  49. package/lib/components/VExpansionPanel/VExpansionPanel.sass +3 -3
  50. package/lib/components/VField/VField.css +13 -1
  51. package/lib/components/VField/VField.sass +5 -8
  52. package/lib/components/VFooter/VFooter.css +12 -4
  53. package/lib/components/VFooter/VFooter.mjs +20 -14
  54. package/lib/components/VFooter/VFooter.mjs.map +1 -1
  55. package/lib/components/VFooter/index.d.mts +3 -3
  56. package/lib/components/VGrid/VGrid.sass +1 -1
  57. package/lib/components/VGrid/_mixins.sass +4 -4
  58. package/lib/components/VImg/VImg.css +6 -0
  59. package/lib/components/VKbd/VKbd.css +2 -0
  60. package/lib/components/VList/VList.css +12 -4
  61. package/lib/components/VList/VListItem.css +21 -11
  62. package/lib/components/VList/VListItem.mjs +1 -1
  63. package/lib/components/VList/VListItem.mjs.map +1 -1
  64. package/lib/components/VList/VListItem.sass +1 -1
  65. package/lib/components/VMain/VMain.css +2 -0
  66. package/lib/components/VMenu/VMenu.css +6 -0
  67. package/lib/components/VMenu/VMenu.mjs +20 -4
  68. package/lib/components/VMenu/VMenu.mjs.map +1 -1
  69. package/lib/components/VMenu/index.d.mts +27 -12
  70. package/lib/components/VNavigationDrawer/VNavigationDrawer.css +9 -3
  71. package/lib/components/VOtpInput/VOtpInput.css +3 -1
  72. package/lib/components/VOtpInput/VOtpInput.sass +1 -2
  73. package/lib/components/VOverflowBtn/VOverflowBtn.sass +1 -1
  74. package/lib/components/VOverlay/VOverlay.mjs +5 -4
  75. package/lib/components/VOverlay/VOverlay.mjs.map +1 -1
  76. package/lib/components/VOverlay/useActivator.mjs +3 -2
  77. package/lib/components/VOverlay/useActivator.mjs.map +1 -1
  78. package/lib/components/VSelect/VSelect.css +4 -0
  79. package/lib/components/VSelect/index.d.mts +42 -24
  80. package/lib/components/VSelectionControl/VSelectionControl.css +6 -4
  81. package/lib/components/VSelectionControl/VSelectionControl.sass +1 -1
  82. package/lib/components/VSheet/VSheet.css +12 -4
  83. package/lib/components/VSkeletonLoader/VSkeletonLoader.css +6 -4
  84. package/lib/components/VSkeletonLoader/VSkeletonLoader.mjs +9 -8
  85. package/lib/components/VSkeletonLoader/VSkeletonLoader.mjs.map +1 -1
  86. package/lib/components/VSkeletonLoader/VSkeletonLoader.sass +1 -2
  87. package/lib/components/VSlider/VSliderThumb.sass +2 -2
  88. package/lib/components/VSnackbar/VSnackbar.css +2 -0
  89. package/lib/components/VSnackbar/VSnackbar.mjs +4 -4
  90. package/lib/components/VSnackbar/VSnackbar.mjs.map +1 -1
  91. package/lib/components/VSnackbar/index.d.mts +3 -3
  92. package/lib/components/VSpeedDial/index.d.mts +28 -13
  93. package/lib/components/VStepper/VStepper.css +8 -2
  94. package/lib/components/VStepper/VStepper.sass +2 -4
  95. package/lib/components/VStepper/VStepperItem.css +4 -1
  96. package/lib/components/VStepper/VStepperItem.sass +1 -1
  97. package/lib/components/VSwitch/VSwitch.css +2 -0
  98. package/lib/components/VSwitch/VSwitch.sass +10 -10
  99. package/lib/components/VSystemBar/VSystemBar.css +14 -8
  100. package/lib/components/VTable/VTable.css +8 -4
  101. package/lib/components/VTable/VTable.sass +2 -3
  102. package/lib/components/VTimeline/VTimeline.css +2 -0
  103. package/lib/components/VToolbar/VToolbar.css +21 -7
  104. package/lib/components/VToolbar/VToolbar.sass +1 -2
  105. package/lib/components/VTooltip/index.d.mts +3 -3
  106. package/lib/components/VTreeview/VTreeview.sass +9 -9
  107. package/lib/components/index.d.mts +193 -109
  108. package/lib/entry-bundler.mjs +1 -1
  109. package/lib/framework.mjs +1 -1
  110. package/lib/index.d.mts +37 -37
  111. package/lib/labs/VNumberInput/VNumberInput.mjs +60 -36
  112. package/lib/labs/VNumberInput/VNumberInput.mjs.map +1 -1
  113. package/lib/labs/VNumberInput/index.d.mts +17 -8
  114. package/lib/labs/VPicker/VPicker.css +6 -2
  115. package/lib/labs/VPicker/VPicker.sass +2 -3
  116. package/lib/labs/VPullToRefresh/VPullToRefresh.mjs +4 -3
  117. package/lib/labs/VPullToRefresh/VPullToRefresh.mjs.map +1 -1
  118. package/lib/labs/VPullToRefresh/index.d.mts +9 -0
  119. package/lib/labs/VSnackbarQueue/index.d.mts +3 -3
  120. package/lib/labs/components.d.mts +29 -11
  121. package/lib/styles/generic/_colors.scss +9 -3
  122. package/lib/styles/main.css +520 -0
  123. package/lib/styles/tools/_absolute.sass +8 -7
  124. package/lib/styles/tools/_border.sass +4 -3
  125. package/lib/styles/tools/_display.sass +8 -7
  126. package/lib/styles/tools/_elevation.sass +4 -2
  127. package/lib/styles/tools/_index.sass +0 -1
  128. package/lib/styles/tools/_radius.sass +6 -5
  129. package/lib/styles/tools/_rounded.sass +2 -1
  130. package/lib/styles/tools/_theme.sass +3 -2
  131. package/lib/styles/tools/_typography.sass +6 -5
  132. package/lib/styles/tools/_utilities.sass +5 -5
  133. package/lib/styles/utilities/_index.sass +7 -7
  134. package/package.json +1 -1
  135. package/lib/styles/tools/_sheet.sass +0 -14
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Vuetify v3.7.0-beta.1-dev.2024-07-29
2
+ * Vuetify v3.7.0-beta.1-dev.2024-08-01
3
3
  * Forged by John Leider
4
4
  * Released under the MIT License.
5
5
  */
@@ -5720,7 +5720,7 @@
5720
5720
  "indeterminate": true,
5721
5721
  "width": "2"
5722
5722
  }, null)])]
5723
- }), [[Ripple, !isDisabled.value && !!props.ripple, '', {
5723
+ }), [[Ripple, !isDisabled.value && props.ripple, '', {
5724
5724
  center: !!props.icon
5725
5725
  }]]);
5726
5726
  });
@@ -6018,7 +6018,7 @@
6018
6018
  "defaults": {
6019
6019
  VImg: {
6020
6020
  cover: true,
6021
- image: props.image
6021
+ src: props.image
6022
6022
  },
6023
6023
  VIcon: {
6024
6024
  icon: props.icon
@@ -8962,7 +8962,7 @@
8962
8962
  function onKeyDown(e) {
8963
8963
  if (e.key === 'Enter' || e.key === ' ') {
8964
8964
  e.preventDefault();
8965
- onClick(e);
8965
+ e.target.dispatchEvent(new MouseEvent('click', e));
8966
8966
  }
8967
8967
  }
8968
8968
  useRender(() => {
@@ -10279,7 +10279,8 @@
10279
10279
  function useActivator(props, _ref) {
10280
10280
  let {
10281
10281
  isActive,
10282
- isTop
10282
+ isTop,
10283
+ contentEl
10283
10284
  } = _ref;
10284
10285
  const vm = getCurrentInstance('useActivator');
10285
10286
  const activatorEl = vue.ref();
@@ -10396,7 +10397,7 @@
10396
10397
  return events;
10397
10398
  });
10398
10399
  vue.watch(isTop, val => {
10399
- if (val && (props.openOnHover && !isHovered && (!openOnFocus.value || !isFocused) || openOnFocus.value && !isFocused && (!props.openOnHover || !isHovered))) {
10400
+ if (val && (props.openOnHover && !isHovered && (!openOnFocus.value || !isFocused) || openOnFocus.value && !isFocused && (!props.openOnHover || !isHovered)) && !contentEl.value?.contains(document.activeElement)) {
10400
10401
  isActive.value = false;
10401
10402
  }
10402
10403
  });
@@ -10802,6 +10803,9 @@
10802
10803
  attrs,
10803
10804
  emit
10804
10805
  } = _ref;
10806
+ const root = vue.ref();
10807
+ const scrimEl = vue.ref();
10808
+ const contentEl = vue.ref();
10805
10809
  const model = useProxiedModel(props, 'modelValue');
10806
10810
  const isActive = vue.computed({
10807
10811
  get: () => model.value,
@@ -10839,7 +10843,8 @@
10839
10843
  scrimEvents
10840
10844
  } = useActivator(props, {
10841
10845
  isActive,
10842
- isTop: localTop
10846
+ isTop: localTop,
10847
+ contentEl
10843
10848
  });
10844
10849
  const {
10845
10850
  teleportTarget
@@ -10860,9 +10865,6 @@
10860
10865
  vue.watch(() => props.disabled, v => {
10861
10866
  if (v) isActive.value = false;
10862
10867
  });
10863
- const root = vue.ref();
10864
- const scrimEl = vue.ref();
10865
- const contentEl = vue.ref();
10866
10868
  const {
10867
10869
  contentStyles,
10868
10870
  updateLocation
@@ -11113,10 +11115,12 @@
11113
11115
  // TODO
11114
11116
  // disableKeys: Boolean,
11115
11117
  id: String,
11118
+ submenu: Boolean,
11116
11119
  ...omit(makeVOverlayProps({
11117
11120
  closeDelay: 250,
11118
11121
  closeOnContentClick: true,
11119
11122
  locationStrategy: 'connected',
11123
+ location: undefined,
11120
11124
  openDelay: 300,
11121
11125
  scrim: false,
11122
11126
  scrollStrategy: 'reposition',
@@ -11139,6 +11143,9 @@
11139
11143
  const {
11140
11144
  scopeId
11141
11145
  } = useScopeId();
11146
+ const {
11147
+ isRtl
11148
+ } = useRtl();
11142
11149
  const uid = getUid();
11143
11150
  const id = vue.computed(() => props.id || `v-menu-${uid}`);
11144
11151
  const overlay = vue.ref();
@@ -11153,7 +11160,7 @@
11153
11160
  },
11154
11161
  closeParents(e) {
11155
11162
  setTimeout(() => {
11156
- if (!openChildren.value.size && !props.persistent && (e == null || e && !isClickInsideElement(e, overlay.value.contentEl))) {
11163
+ if (!openChildren.value.size && !props.persistent && (e == null || overlay.value?.contentEl && !isClickInsideElement(e, overlay.value.contentEl))) {
11157
11164
  isActive.value = false;
11158
11165
  parent?.closeParents();
11159
11166
  }
@@ -11201,9 +11208,9 @@
11201
11208
  isActive.value = false;
11202
11209
  overlay.value?.activatorEl?.focus();
11203
11210
  }
11204
- } else if (['Enter', ' '].includes(e.key) && props.closeOnContentClick) {
11211
+ } else if (props.submenu && e.key === (isRtl.value ? 'ArrowRight' : 'ArrowLeft')) {
11205
11212
  isActive.value = false;
11206
- parent?.closeParents();
11213
+ overlay.value?.activatorEl?.focus();
11207
11214
  }
11208
11215
  }
11209
11216
  function onActivatorKeydown(e) {
@@ -11212,12 +11219,21 @@
11212
11219
  if (el && isActive.value) {
11213
11220
  if (e.key === 'ArrowDown') {
11214
11221
  e.preventDefault();
11222
+ e.stopImmediatePropagation();
11215
11223
  focusChild(el, 'next');
11216
11224
  } else if (e.key === 'ArrowUp') {
11217
11225
  e.preventDefault();
11226
+ e.stopImmediatePropagation();
11218
11227
  focusChild(el, 'prev');
11228
+ } else if (props.submenu) {
11229
+ if (e.key === (isRtl.value ? 'ArrowRight' : 'ArrowLeft')) {
11230
+ isActive.value = false;
11231
+ } else if (e.key === (isRtl.value ? 'ArrowLeft' : 'ArrowRight')) {
11232
+ e.preventDefault();
11233
+ focusChild(el, 'first');
11234
+ }
11219
11235
  }
11220
- } else if (['ArrowDown', 'ArrowUp'].includes(e.key)) {
11236
+ } else if (props.submenu ? e.key === (isRtl.value ? 'ArrowLeft' : 'ArrowRight') : ['ArrowDown', 'ArrowUp'].includes(e.key)) {
11221
11237
  isActive.value = true;
11222
11238
  e.preventDefault();
11223
11239
  setTimeout(() => setTimeout(() => onActivatorKeydown(e)));
@@ -11241,6 +11257,7 @@
11241
11257
  "onUpdate:modelValue": $event => isActive.value = $event,
11242
11258
  "absolute": true,
11243
11259
  "activatorProps": activatorProps.value,
11260
+ "location": props.location ?? (props.submenu ? 'end' : 'bottom'),
11244
11261
  "onClick:outside": onClickOutside,
11245
11262
  "onKeydown": onKeydown
11246
11263
  }, scopeId), {
@@ -22962,6 +22979,8 @@
22962
22979
  let {
22963
22980
  slots
22964
22981
  } = _ref;
22982
+ const layoutItemStyles = vue.ref();
22983
+ const layoutIsReady = vue.shallowRef();
22965
22984
  const {
22966
22985
  themeClasses
22967
22986
  } = provideTheme(props);
@@ -22986,17 +23005,20 @@
22986
23005
  autoHeight.value = entries[0].target.clientHeight;
22987
23006
  });
22988
23007
  const height = vue.computed(() => props.height === 'auto' ? autoHeight.value : parseInt(props.height, 10));
22989
- const {
22990
- layoutItemStyles,
22991
- layoutIsReady
22992
- } = useLayoutItem({
22993
- id: props.name,
22994
- order: vue.computed(() => parseInt(props.order, 10)),
22995
- position: vue.computed(() => 'bottom'),
22996
- layoutSize: height,
22997
- elementSize: vue.computed(() => props.height === 'auto' ? undefined : height.value),
22998
- active: vue.computed(() => props.app),
22999
- absolute: vue.toRef(props, 'absolute')
23008
+ useToggleScope(() => props.app, () => {
23009
+ const layout = useLayoutItem({
23010
+ id: props.name,
23011
+ order: vue.computed(() => parseInt(props.order, 10)),
23012
+ position: vue.computed(() => 'bottom'),
23013
+ layoutSize: height,
23014
+ elementSize: vue.computed(() => props.height === 'auto' ? undefined : height.value),
23015
+ active: vue.computed(() => props.app),
23016
+ absolute: vue.toRef(props, 'absolute')
23017
+ });
23018
+ vue.watchEffect(() => {
23019
+ layoutItemStyles.value = layout.layoutItemStyles.value;
23020
+ layoutIsReady.value = layout.layoutIsReady;
23021
+ });
23000
23022
  });
23001
23023
  useRender(() => vue.createVNode(props.tag, {
23002
23024
  "ref": resizeRef,
@@ -23005,7 +23027,7 @@
23005
23027
  height: convertToUnit(props.height)
23006
23028
  }, props.style]
23007
23029
  }, slots));
23008
- return props.app ? layoutIsReady : {};
23030
+ return props.app ? layoutIsReady.value : {};
23009
23031
  }
23010
23032
  });
23011
23033
 
@@ -25146,16 +25168,17 @@
25146
25168
  const items = vue.computed(() => genStructure(wrapInArray(props.type).join(',')));
25147
25169
  useRender(() => {
25148
25170
  const isLoading = !slots.default || props.loading;
25149
- return vue.createVNode("div", {
25171
+ const loadingProps = props.boilerplate || !isLoading ? {} : {
25172
+ ariaLive: 'polite',
25173
+ ariaLabel: t(props.loadingText),
25174
+ role: 'alert'
25175
+ };
25176
+ return vue.createVNode("div", vue.mergeProps({
25150
25177
  "class": ['v-skeleton-loader', {
25151
25178
  'v-skeleton-loader--boilerplate': props.boilerplate
25152
25179
  }, themeClasses.value, backgroundColorClasses.value, elevationClasses.value],
25153
- "style": [backgroundColorStyles.value, isLoading ? dimensionStyles.value : {}],
25154
- "aria-busy": !props.boilerplate ? isLoading : undefined,
25155
- "aria-live": !props.boilerplate ? 'polite' : undefined,
25156
- "aria-label": !props.boilerplate ? t(props.loadingText) : undefined,
25157
- "role": !props.boilerplate ? 'alert' : undefined
25158
- }, [isLoading ? items.value : slots.default?.()]);
25180
+ "style": [backgroundColorStyles.value, isLoading ? dimensionStyles.value : {}]
25181
+ }, loadingProps), [isLoading ? items.value : slots.default?.()]);
25159
25182
  });
25160
25183
  return {};
25161
25184
  }
@@ -25188,14 +25211,14 @@
25188
25211
  // Types
25189
25212
 
25190
25213
  function useCountdown(milliseconds) {
25191
- const time = vue.shallowRef(milliseconds);
25214
+ const time = vue.shallowRef(milliseconds());
25192
25215
  let timer = -1;
25193
25216
  function clear() {
25194
25217
  clearInterval(timer);
25195
25218
  }
25196
25219
  function reset() {
25197
25220
  clear();
25198
- vue.nextTick(() => time.value = milliseconds);
25221
+ vue.nextTick(() => time.value = milliseconds());
25199
25222
  }
25200
25223
  function start(el) {
25201
25224
  const style = el ? getComputedStyle(el) : {
@@ -25207,7 +25230,7 @@
25207
25230
  const startTime = performance.now();
25208
25231
  timer = window.setInterval(() => {
25209
25232
  const elapsed = performance.now() - startTime + interval;
25210
- time.value = Math.max(milliseconds - elapsed, 0);
25233
+ time.value = Math.max(milliseconds() - elapsed, 0);
25211
25234
  if (time.value <= 0) clear();
25212
25235
  }, interval);
25213
25236
  }
@@ -25267,7 +25290,7 @@
25267
25290
  const {
25268
25291
  roundedClasses
25269
25292
  } = useRounded(props);
25270
- const countdown = useCountdown(Number(props.timeout));
25293
+ const countdown = useCountdown(() => Number(props.timeout));
25271
25294
  const overlay = vue.ref();
25272
25295
  const timerRef = vue.ref();
25273
25296
  const isHovering = vue.shallowRef(false);
@@ -28087,19 +28110,23 @@
28087
28110
  },
28088
28111
  inset: Boolean,
28089
28112
  hideInput: Boolean,
28113
+ modelValue: {
28114
+ type: Number,
28115
+ default: null
28116
+ },
28090
28117
  min: {
28091
28118
  type: Number,
28092
- default: -Infinity
28119
+ default: Number.MIN_SAFE_INTEGER
28093
28120
  },
28094
28121
  max: {
28095
28122
  type: Number,
28096
- default: Infinity
28123
+ default: Number.MAX_SAFE_INTEGER
28097
28124
  },
28098
28125
  step: {
28099
28126
  type: Number,
28100
28127
  default: 1
28101
28128
  },
28102
- ...omit(makeVTextFieldProps(), ['appendInnerIcon', 'prependInnerIcon'])
28129
+ ...omit(makeVTextFieldProps({}), ['appendInnerIcon', 'modelValue', 'prependInnerIcon'])
28103
28130
  }, 'VNumberInput');
28104
28131
  const VNumberInput = genericComponent()({
28105
28132
  name: 'VNumberInput',
@@ -28111,30 +28138,27 @@
28111
28138
  },
28112
28139
  setup(props, _ref) {
28113
28140
  let {
28114
- attrs,
28115
- emit,
28116
28141
  slots
28117
28142
  } = _ref;
28118
- const model = useProxiedModel(props, 'modelValue');
28143
+ const _model = useProxiedModel(props, 'modelValue');
28144
+ const model = vue.computed({
28145
+ get: () => _model.value,
28146
+ set(val) {
28147
+ if (typeof val !== 'string') _model.value = val;
28148
+ }
28149
+ });
28150
+ const vTextFieldRef = vue.ref();
28119
28151
  const stepDecimals = vue.computed(() => getDecimals(props.step));
28120
- const modelDecimals = vue.computed(() => model.value != null ? getDecimals(model.value) : 0);
28152
+ const modelDecimals = vue.computed(() => typeof model.value === 'number' ? getDecimals(model.value) : 0);
28121
28153
  const form = useForm();
28122
28154
  const controlsDisabled = vue.computed(() => props.disabled || props.readonly || form?.isReadonly.value);
28123
28155
  const canIncrease = vue.computed(() => {
28124
28156
  if (controlsDisabled.value) return false;
28125
- if (model.value == null) return true;
28126
- return model.value + props.step <= props.max;
28157
+ return (model.value ?? 0) + props.step <= props.max;
28127
28158
  });
28128
28159
  const canDecrease = vue.computed(() => {
28129
28160
  if (controlsDisabled.value) return false;
28130
- if (model.value == null) return true;
28131
- return model.value - props.step >= props.min;
28132
- });
28133
- vue.watchEffect(() => {
28134
- if (controlsDisabled.value) return;
28135
- if (model.value != null && (model.value < props.min || model.value > props.max)) {
28136
- model.value = clamp(model.value, props.min, props.max);
28137
- }
28161
+ return (model.value ?? 0) - props.step >= props.min;
28138
28162
  });
28139
28163
  const controlVariant = vue.computed(() => {
28140
28164
  return props.hideInput ? 'stacked' : props.controlVariant;
@@ -28149,11 +28173,16 @@
28149
28173
  const decrementSlotProps = vue.computed(() => ({
28150
28174
  click: onClickDown
28151
28175
  }));
28176
+ vue.onMounted(() => {
28177
+ if (!props.readonly && !props.disabled) {
28178
+ clampModel();
28179
+ }
28180
+ });
28152
28181
  function toggleUpDown() {
28153
28182
  let increment = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
28154
28183
  if (controlsDisabled.value) return;
28155
28184
  if (model.value == null) {
28156
- model.value = 0;
28185
+ model.value = clamp(0, props.min, props.max);
28157
28186
  return;
28158
28187
  }
28159
28188
  const decimals = Math.max(modelDecimals.value, stepDecimals.value);
@@ -28171,30 +28200,45 @@
28171
28200
  e.stopPropagation();
28172
28201
  toggleUpDown(false);
28173
28202
  }
28174
- function onKeydown(e) {
28175
- if (['Enter', 'ArrowLeft', 'ArrowRight', 'Backspace', 'Delete', 'Tab'].includes(e.key) || e.ctrlKey) return;
28176
- if (['ArrowDown'].includes(e.key)) {
28203
+ function onBeforeinput(e) {
28204
+ if (!e.data) return;
28205
+ const existingTxt = e.target?.value;
28206
+ const selectionStart = e.target?.selectionStart;
28207
+ const selectionEnd = e.target?.selectionEnd;
28208
+ const potentialNewInputVal = existingTxt ? existingTxt.slice(0, selectionStart) + e.data + existingTxt.slice(selectionEnd) : e.data;
28209
+ // Only numbers, "-", "." are allowed
28210
+ // AND "-", "." are allowed only once
28211
+ // AND "-" is only allowed at the start
28212
+ if (!/^-?(\d+(\.\d*)?|(\.\d+)|\d*|\.)$/.test(potentialNewInputVal)) {
28177
28213
  e.preventDefault();
28178
- toggleUpDown(false);
28179
- return;
28180
28214
  }
28181
- if (['ArrowUp'].includes(e.key)) {
28182
- e.preventDefault();
28183
- toggleUpDown();
28184
- return;
28185
- }
28186
-
28187
- // Only numbers, +, - & . are allowed
28188
- if (!/^[0-9\-+.]+$/.test(e.key)) {
28215
+ }
28216
+ async function onKeydown(e) {
28217
+ if (['Enter', 'ArrowLeft', 'ArrowRight', 'Backspace', 'Delete', 'Tab'].includes(e.key) || e.ctrlKey) return;
28218
+ if (['ArrowDown', 'ArrowUp'].includes(e.key)) {
28189
28219
  e.preventDefault();
28220
+ clampModel();
28221
+ // _model is controlled, so need to wait until props['modelValue'] is updated
28222
+ await vue.nextTick();
28223
+ if (e.key === 'ArrowDown') {
28224
+ toggleUpDown(false);
28225
+ } else {
28226
+ toggleUpDown();
28227
+ }
28190
28228
  }
28191
28229
  }
28192
- function onModelUpdate(v) {
28193
- model.value = v ? +v : undefined;
28194
- }
28195
28230
  function onControlMousedown(e) {
28196
28231
  e.stopPropagation();
28197
28232
  }
28233
+ function clampModel() {
28234
+ if (!vTextFieldRef.value) return;
28235
+ const inputText = vTextFieldRef.value.value;
28236
+ if (inputText && !isNaN(+inputText)) {
28237
+ model.value = clamp(+inputText, props.min, props.max);
28238
+ } else {
28239
+ model.value = null;
28240
+ }
28241
+ }
28198
28242
  useRender(() => {
28199
28243
  const {
28200
28244
  modelValue: _,
@@ -28279,8 +28323,11 @@
28279
28323
  }, null)]) : props.reverse ? vue.createVNode(vue.Fragment, null, [controlNode(), dividerNode()]) : undefined;
28280
28324
  const hasPrependInner = slots['prepend-inner'] || prependInnerControl;
28281
28325
  return vue.createVNode(VTextField, vue.mergeProps({
28326
+ "ref": vTextFieldRef,
28282
28327
  "modelValue": model.value,
28283
- "onUpdate:modelValue": onModelUpdate,
28328
+ "onUpdate:modelValue": $event => model.value = $event,
28329
+ "onBeforeinput": onBeforeinput,
28330
+ "onChange": clampModel,
28284
28331
  "onKeydown": onKeydown,
28285
28332
  "class": ['v-number-input', {
28286
28333
  'v-number-input--default': controlVariant.value === 'default',
@@ -28574,6 +28621,7 @@
28574
28621
  const VPullToRefresh = genericComponent()({
28575
28622
  name: 'VPullToRefresh',
28576
28623
  props: {
28624
+ disabled: Boolean,
28577
28625
  pullDownThreshold: {
28578
28626
  type: Number,
28579
28627
  default: 64
@@ -28597,19 +28645,19 @@
28597
28645
  const canRefresh = vue.computed(() => touchDiff.value >= props.pullDownThreshold && !refreshing.value);
28598
28646
  const topOffset = vue.computed(() => clamp(touchDiff.value, 0, props.pullDownThreshold));
28599
28647
  function onTouchstart(e) {
28600
- if (refreshing.value) return;
28648
+ if (refreshing.value || props.disabled) return;
28601
28649
  touching.value = true;
28602
28650
  touchstartY = 'clientY' in e ? e.clientY : e.touches[0].clientY;
28603
28651
  }
28604
28652
  function onTouchmove(e) {
28605
- if (refreshing.value || !touching.value) return;
28653
+ if (refreshing.value || !touching.value || props.disabled) return;
28606
28654
  const touchY = 'clientY' in e ? e.clientY : e.touches[0].clientY;
28607
28655
  if (scrollParents.length && !scrollParents[0].scrollTop) {
28608
28656
  touchDiff.value = touchY - touchstartY;
28609
28657
  }
28610
28658
  }
28611
28659
  function onTouchend(e) {
28612
- if (refreshing.value) return;
28660
+ if (refreshing.value || props.disabled) return;
28613
28661
  touching.value = false;
28614
28662
  if (canRefresh.value) {
28615
28663
  function done() {
@@ -30312,7 +30360,7 @@
30312
30360
  goTo
30313
30361
  };
30314
30362
  }
30315
- const version$1 = "3.7.0-beta.1-dev.2024-07-29";
30363
+ const version$1 = "3.7.0-beta.1-dev.2024-08-01";
30316
30364
  createVuetify$1.version = version$1;
30317
30365
 
30318
30366
  // Vue's inject() can only be used in setup
@@ -30565,7 +30613,7 @@
30565
30613
 
30566
30614
  /* eslint-disable local-rules/sort-imports */
30567
30615
 
30568
- const version = "3.7.0-beta.1-dev.2024-07-29";
30616
+ const version = "3.7.0-beta.1-dev.2024-08-01";
30569
30617
 
30570
30618
  /* eslint-disable local-rules/sort-imports */
30571
30619