@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
  */
@@ -5716,7 +5716,7 @@ const VBtn = genericComponent()({
5716
5716
  "indeterminate": true,
5717
5717
  "width": "2"
5718
5718
  }, null)])]
5719
- }), [[Ripple, !isDisabled.value && !!props.ripple, '', {
5719
+ }), [[Ripple, !isDisabled.value && props.ripple, '', {
5720
5720
  center: !!props.icon
5721
5721
  }]]);
5722
5722
  });
@@ -6014,7 +6014,7 @@ const VAvatar = genericComponent()({
6014
6014
  "defaults": {
6015
6015
  VImg: {
6016
6016
  cover: true,
6017
- image: props.image
6017
+ src: props.image
6018
6018
  },
6019
6019
  VIcon: {
6020
6020
  icon: props.icon
@@ -8958,7 +8958,7 @@ const VListItem = genericComponent()({
8958
8958
  function onKeyDown(e) {
8959
8959
  if (e.key === 'Enter' || e.key === ' ') {
8960
8960
  e.preventDefault();
8961
- onClick(e);
8961
+ e.target.dispatchEvent(new MouseEvent('click', e));
8962
8962
  }
8963
8963
  }
8964
8964
  useRender(() => {
@@ -10275,7 +10275,8 @@ const makeActivatorProps = propsFactory({
10275
10275
  function useActivator(props, _ref) {
10276
10276
  let {
10277
10277
  isActive,
10278
- isTop
10278
+ isTop,
10279
+ contentEl
10279
10280
  } = _ref;
10280
10281
  const vm = getCurrentInstance('useActivator');
10281
10282
  const activatorEl = ref();
@@ -10392,7 +10393,7 @@ function useActivator(props, _ref) {
10392
10393
  return events;
10393
10394
  });
10394
10395
  watch(isTop, val => {
10395
- if (val && (props.openOnHover && !isHovered && (!openOnFocus.value || !isFocused) || openOnFocus.value && !isFocused && (!props.openOnHover || !isHovered))) {
10396
+ if (val && (props.openOnHover && !isHovered && (!openOnFocus.value || !isFocused) || openOnFocus.value && !isFocused && (!props.openOnHover || !isHovered)) && !contentEl.value?.contains(document.activeElement)) {
10396
10397
  isActive.value = false;
10397
10398
  }
10398
10399
  });
@@ -10798,6 +10799,9 @@ const VOverlay = genericComponent()({
10798
10799
  attrs,
10799
10800
  emit
10800
10801
  } = _ref;
10802
+ const root = ref();
10803
+ const scrimEl = ref();
10804
+ const contentEl = ref();
10801
10805
  const model = useProxiedModel(props, 'modelValue');
10802
10806
  const isActive = computed({
10803
10807
  get: () => model.value,
@@ -10835,7 +10839,8 @@ const VOverlay = genericComponent()({
10835
10839
  scrimEvents
10836
10840
  } = useActivator(props, {
10837
10841
  isActive,
10838
- isTop: localTop
10842
+ isTop: localTop,
10843
+ contentEl
10839
10844
  });
10840
10845
  const {
10841
10846
  teleportTarget
@@ -10856,9 +10861,6 @@ const VOverlay = genericComponent()({
10856
10861
  watch(() => props.disabled, v => {
10857
10862
  if (v) isActive.value = false;
10858
10863
  });
10859
- const root = ref();
10860
- const scrimEl = ref();
10861
- const contentEl = ref();
10862
10864
  const {
10863
10865
  contentStyles,
10864
10866
  updateLocation
@@ -11109,10 +11111,12 @@ const makeVMenuProps = propsFactory({
11109
11111
  // TODO
11110
11112
  // disableKeys: Boolean,
11111
11113
  id: String,
11114
+ submenu: Boolean,
11112
11115
  ...omit(makeVOverlayProps({
11113
11116
  closeDelay: 250,
11114
11117
  closeOnContentClick: true,
11115
11118
  locationStrategy: 'connected',
11119
+ location: undefined,
11116
11120
  openDelay: 300,
11117
11121
  scrim: false,
11118
11122
  scrollStrategy: 'reposition',
@@ -11135,6 +11139,9 @@ const VMenu = genericComponent()({
11135
11139
  const {
11136
11140
  scopeId
11137
11141
  } = useScopeId();
11142
+ const {
11143
+ isRtl
11144
+ } = useRtl();
11138
11145
  const uid = getUid();
11139
11146
  const id = computed(() => props.id || `v-menu-${uid}`);
11140
11147
  const overlay = ref();
@@ -11149,7 +11156,7 @@ const VMenu = genericComponent()({
11149
11156
  },
11150
11157
  closeParents(e) {
11151
11158
  setTimeout(() => {
11152
- if (!openChildren.value.size && !props.persistent && (e == null || e && !isClickInsideElement(e, overlay.value.contentEl))) {
11159
+ if (!openChildren.value.size && !props.persistent && (e == null || overlay.value?.contentEl && !isClickInsideElement(e, overlay.value.contentEl))) {
11153
11160
  isActive.value = false;
11154
11161
  parent?.closeParents();
11155
11162
  }
@@ -11197,9 +11204,9 @@ const VMenu = genericComponent()({
11197
11204
  isActive.value = false;
11198
11205
  overlay.value?.activatorEl?.focus();
11199
11206
  }
11200
- } else if (['Enter', ' '].includes(e.key) && props.closeOnContentClick) {
11207
+ } else if (props.submenu && e.key === (isRtl.value ? 'ArrowRight' : 'ArrowLeft')) {
11201
11208
  isActive.value = false;
11202
- parent?.closeParents();
11209
+ overlay.value?.activatorEl?.focus();
11203
11210
  }
11204
11211
  }
11205
11212
  function onActivatorKeydown(e) {
@@ -11208,12 +11215,21 @@ const VMenu = genericComponent()({
11208
11215
  if (el && isActive.value) {
11209
11216
  if (e.key === 'ArrowDown') {
11210
11217
  e.preventDefault();
11218
+ e.stopImmediatePropagation();
11211
11219
  focusChild(el, 'next');
11212
11220
  } else if (e.key === 'ArrowUp') {
11213
11221
  e.preventDefault();
11222
+ e.stopImmediatePropagation();
11214
11223
  focusChild(el, 'prev');
11224
+ } else if (props.submenu) {
11225
+ if (e.key === (isRtl.value ? 'ArrowRight' : 'ArrowLeft')) {
11226
+ isActive.value = false;
11227
+ } else if (e.key === (isRtl.value ? 'ArrowLeft' : 'ArrowRight')) {
11228
+ e.preventDefault();
11229
+ focusChild(el, 'first');
11230
+ }
11215
11231
  }
11216
- } else if (['ArrowDown', 'ArrowUp'].includes(e.key)) {
11232
+ } else if (props.submenu ? e.key === (isRtl.value ? 'ArrowLeft' : 'ArrowRight') : ['ArrowDown', 'ArrowUp'].includes(e.key)) {
11217
11233
  isActive.value = true;
11218
11234
  e.preventDefault();
11219
11235
  setTimeout(() => setTimeout(() => onActivatorKeydown(e)));
@@ -11237,6 +11253,7 @@ const VMenu = genericComponent()({
11237
11253
  "onUpdate:modelValue": $event => isActive.value = $event,
11238
11254
  "absolute": true,
11239
11255
  "activatorProps": activatorProps.value,
11256
+ "location": props.location ?? (props.submenu ? 'end' : 'bottom'),
11240
11257
  "onClick:outside": onClickOutside,
11241
11258
  "onKeydown": onKeydown
11242
11259
  }, scopeId), {
@@ -22958,6 +22975,8 @@ const VFooter = genericComponent()({
22958
22975
  let {
22959
22976
  slots
22960
22977
  } = _ref;
22978
+ const layoutItemStyles = ref();
22979
+ const layoutIsReady = shallowRef();
22961
22980
  const {
22962
22981
  themeClasses
22963
22982
  } = provideTheme(props);
@@ -22982,17 +23001,20 @@ const VFooter = genericComponent()({
22982
23001
  autoHeight.value = entries[0].target.clientHeight;
22983
23002
  });
22984
23003
  const height = computed(() => props.height === 'auto' ? autoHeight.value : parseInt(props.height, 10));
22985
- const {
22986
- layoutItemStyles,
22987
- layoutIsReady
22988
- } = useLayoutItem({
22989
- id: props.name,
22990
- order: computed(() => parseInt(props.order, 10)),
22991
- position: computed(() => 'bottom'),
22992
- layoutSize: height,
22993
- elementSize: computed(() => props.height === 'auto' ? undefined : height.value),
22994
- active: computed(() => props.app),
22995
- absolute: toRef(props, 'absolute')
23004
+ useToggleScope(() => props.app, () => {
23005
+ const layout = useLayoutItem({
23006
+ id: props.name,
23007
+ order: computed(() => parseInt(props.order, 10)),
23008
+ position: computed(() => 'bottom'),
23009
+ layoutSize: height,
23010
+ elementSize: computed(() => props.height === 'auto' ? undefined : height.value),
23011
+ active: computed(() => props.app),
23012
+ absolute: toRef(props, 'absolute')
23013
+ });
23014
+ watchEffect(() => {
23015
+ layoutItemStyles.value = layout.layoutItemStyles.value;
23016
+ layoutIsReady.value = layout.layoutIsReady;
23017
+ });
22996
23018
  });
22997
23019
  useRender(() => createVNode(props.tag, {
22998
23020
  "ref": resizeRef,
@@ -23001,7 +23023,7 @@ const VFooter = genericComponent()({
23001
23023
  height: convertToUnit(props.height)
23002
23024
  }, props.style]
23003
23025
  }, slots));
23004
- return props.app ? layoutIsReady : {};
23026
+ return props.app ? layoutIsReady.value : {};
23005
23027
  }
23006
23028
  });
23007
23029
 
@@ -25142,16 +25164,17 @@ const VSkeletonLoader = genericComponent()({
25142
25164
  const items = computed(() => genStructure(wrapInArray(props.type).join(',')));
25143
25165
  useRender(() => {
25144
25166
  const isLoading = !slots.default || props.loading;
25145
- return createVNode("div", {
25167
+ const loadingProps = props.boilerplate || !isLoading ? {} : {
25168
+ ariaLive: 'polite',
25169
+ ariaLabel: t(props.loadingText),
25170
+ role: 'alert'
25171
+ };
25172
+ return createVNode("div", mergeProps({
25146
25173
  "class": ['v-skeleton-loader', {
25147
25174
  'v-skeleton-loader--boilerplate': props.boilerplate
25148
25175
  }, themeClasses.value, backgroundColorClasses.value, elevationClasses.value],
25149
- "style": [backgroundColorStyles.value, isLoading ? dimensionStyles.value : {}],
25150
- "aria-busy": !props.boilerplate ? isLoading : undefined,
25151
- "aria-live": !props.boilerplate ? 'polite' : undefined,
25152
- "aria-label": !props.boilerplate ? t(props.loadingText) : undefined,
25153
- "role": !props.boilerplate ? 'alert' : undefined
25154
- }, [isLoading ? items.value : slots.default?.()]);
25176
+ "style": [backgroundColorStyles.value, isLoading ? dimensionStyles.value : {}]
25177
+ }, loadingProps), [isLoading ? items.value : slots.default?.()]);
25155
25178
  });
25156
25179
  return {};
25157
25180
  }
@@ -25184,14 +25207,14 @@ const VSlideGroupItem = genericComponent()({
25184
25207
  // Types
25185
25208
 
25186
25209
  function useCountdown(milliseconds) {
25187
- const time = shallowRef(milliseconds);
25210
+ const time = shallowRef(milliseconds());
25188
25211
  let timer = -1;
25189
25212
  function clear() {
25190
25213
  clearInterval(timer);
25191
25214
  }
25192
25215
  function reset() {
25193
25216
  clear();
25194
- nextTick(() => time.value = milliseconds);
25217
+ nextTick(() => time.value = milliseconds());
25195
25218
  }
25196
25219
  function start(el) {
25197
25220
  const style = el ? getComputedStyle(el) : {
@@ -25203,7 +25226,7 @@ function useCountdown(milliseconds) {
25203
25226
  const startTime = performance.now();
25204
25227
  timer = window.setInterval(() => {
25205
25228
  const elapsed = performance.now() - startTime + interval;
25206
- time.value = Math.max(milliseconds - elapsed, 0);
25229
+ time.value = Math.max(milliseconds() - elapsed, 0);
25207
25230
  if (time.value <= 0) clear();
25208
25231
  }, interval);
25209
25232
  }
@@ -25263,7 +25286,7 @@ const VSnackbar = genericComponent()({
25263
25286
  const {
25264
25287
  roundedClasses
25265
25288
  } = useRounded(props);
25266
- const countdown = useCountdown(Number(props.timeout));
25289
+ const countdown = useCountdown(() => Number(props.timeout));
25267
25290
  const overlay = ref();
25268
25291
  const timerRef = ref();
25269
25292
  const isHovering = shallowRef(false);
@@ -28083,19 +28106,23 @@ const makeVNumberInputProps = propsFactory({
28083
28106
  },
28084
28107
  inset: Boolean,
28085
28108
  hideInput: Boolean,
28109
+ modelValue: {
28110
+ type: Number,
28111
+ default: null
28112
+ },
28086
28113
  min: {
28087
28114
  type: Number,
28088
- default: -Infinity
28115
+ default: Number.MIN_SAFE_INTEGER
28089
28116
  },
28090
28117
  max: {
28091
28118
  type: Number,
28092
- default: Infinity
28119
+ default: Number.MAX_SAFE_INTEGER
28093
28120
  },
28094
28121
  step: {
28095
28122
  type: Number,
28096
28123
  default: 1
28097
28124
  },
28098
- ...omit(makeVTextFieldProps(), ['appendInnerIcon', 'prependInnerIcon'])
28125
+ ...omit(makeVTextFieldProps({}), ['appendInnerIcon', 'modelValue', 'prependInnerIcon'])
28099
28126
  }, 'VNumberInput');
28100
28127
  const VNumberInput = genericComponent()({
28101
28128
  name: 'VNumberInput',
@@ -28107,30 +28134,27 @@ const VNumberInput = genericComponent()({
28107
28134
  },
28108
28135
  setup(props, _ref) {
28109
28136
  let {
28110
- attrs,
28111
- emit,
28112
28137
  slots
28113
28138
  } = _ref;
28114
- const model = useProxiedModel(props, 'modelValue');
28139
+ const _model = useProxiedModel(props, 'modelValue');
28140
+ const model = computed({
28141
+ get: () => _model.value,
28142
+ set(val) {
28143
+ if (typeof val !== 'string') _model.value = val;
28144
+ }
28145
+ });
28146
+ const vTextFieldRef = ref();
28115
28147
  const stepDecimals = computed(() => getDecimals(props.step));
28116
- const modelDecimals = computed(() => model.value != null ? getDecimals(model.value) : 0);
28148
+ const modelDecimals = computed(() => typeof model.value === 'number' ? getDecimals(model.value) : 0);
28117
28149
  const form = useForm();
28118
28150
  const controlsDisabled = computed(() => props.disabled || props.readonly || form?.isReadonly.value);
28119
28151
  const canIncrease = computed(() => {
28120
28152
  if (controlsDisabled.value) return false;
28121
- if (model.value == null) return true;
28122
- return model.value + props.step <= props.max;
28153
+ return (model.value ?? 0) + props.step <= props.max;
28123
28154
  });
28124
28155
  const canDecrease = computed(() => {
28125
28156
  if (controlsDisabled.value) return false;
28126
- if (model.value == null) return true;
28127
- return model.value - props.step >= props.min;
28128
- });
28129
- watchEffect(() => {
28130
- if (controlsDisabled.value) return;
28131
- if (model.value != null && (model.value < props.min || model.value > props.max)) {
28132
- model.value = clamp(model.value, props.min, props.max);
28133
- }
28157
+ return (model.value ?? 0) - props.step >= props.min;
28134
28158
  });
28135
28159
  const controlVariant = computed(() => {
28136
28160
  return props.hideInput ? 'stacked' : props.controlVariant;
@@ -28145,11 +28169,16 @@ const VNumberInput = genericComponent()({
28145
28169
  const decrementSlotProps = computed(() => ({
28146
28170
  click: onClickDown
28147
28171
  }));
28172
+ onMounted(() => {
28173
+ if (!props.readonly && !props.disabled) {
28174
+ clampModel();
28175
+ }
28176
+ });
28148
28177
  function toggleUpDown() {
28149
28178
  let increment = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
28150
28179
  if (controlsDisabled.value) return;
28151
28180
  if (model.value == null) {
28152
- model.value = 0;
28181
+ model.value = clamp(0, props.min, props.max);
28153
28182
  return;
28154
28183
  }
28155
28184
  const decimals = Math.max(modelDecimals.value, stepDecimals.value);
@@ -28167,30 +28196,45 @@ const VNumberInput = genericComponent()({
28167
28196
  e.stopPropagation();
28168
28197
  toggleUpDown(false);
28169
28198
  }
28170
- function onKeydown(e) {
28171
- if (['Enter', 'ArrowLeft', 'ArrowRight', 'Backspace', 'Delete', 'Tab'].includes(e.key) || e.ctrlKey) return;
28172
- if (['ArrowDown'].includes(e.key)) {
28199
+ function onBeforeinput(e) {
28200
+ if (!e.data) return;
28201
+ const existingTxt = e.target?.value;
28202
+ const selectionStart = e.target?.selectionStart;
28203
+ const selectionEnd = e.target?.selectionEnd;
28204
+ const potentialNewInputVal = existingTxt ? existingTxt.slice(0, selectionStart) + e.data + existingTxt.slice(selectionEnd) : e.data;
28205
+ // Only numbers, "-", "." are allowed
28206
+ // AND "-", "." are allowed only once
28207
+ // AND "-" is only allowed at the start
28208
+ if (!/^-?(\d+(\.\d*)?|(\.\d+)|\d*|\.)$/.test(potentialNewInputVal)) {
28173
28209
  e.preventDefault();
28174
- toggleUpDown(false);
28175
- return;
28176
28210
  }
28177
- if (['ArrowUp'].includes(e.key)) {
28178
- e.preventDefault();
28179
- toggleUpDown();
28180
- return;
28181
- }
28182
-
28183
- // Only numbers, +, - & . are allowed
28184
- if (!/^[0-9\-+.]+$/.test(e.key)) {
28211
+ }
28212
+ async function onKeydown(e) {
28213
+ if (['Enter', 'ArrowLeft', 'ArrowRight', 'Backspace', 'Delete', 'Tab'].includes(e.key) || e.ctrlKey) return;
28214
+ if (['ArrowDown', 'ArrowUp'].includes(e.key)) {
28185
28215
  e.preventDefault();
28216
+ clampModel();
28217
+ // _model is controlled, so need to wait until props['modelValue'] is updated
28218
+ await nextTick();
28219
+ if (e.key === 'ArrowDown') {
28220
+ toggleUpDown(false);
28221
+ } else {
28222
+ toggleUpDown();
28223
+ }
28186
28224
  }
28187
28225
  }
28188
- function onModelUpdate(v) {
28189
- model.value = v ? +v : undefined;
28190
- }
28191
28226
  function onControlMousedown(e) {
28192
28227
  e.stopPropagation();
28193
28228
  }
28229
+ function clampModel() {
28230
+ if (!vTextFieldRef.value) return;
28231
+ const inputText = vTextFieldRef.value.value;
28232
+ if (inputText && !isNaN(+inputText)) {
28233
+ model.value = clamp(+inputText, props.min, props.max);
28234
+ } else {
28235
+ model.value = null;
28236
+ }
28237
+ }
28194
28238
  useRender(() => {
28195
28239
  const {
28196
28240
  modelValue: _,
@@ -28275,8 +28319,11 @@ const VNumberInput = genericComponent()({
28275
28319
  }, null)]) : props.reverse ? createVNode(Fragment, null, [controlNode(), dividerNode()]) : undefined;
28276
28320
  const hasPrependInner = slots['prepend-inner'] || prependInnerControl;
28277
28321
  return createVNode(VTextField, mergeProps({
28322
+ "ref": vTextFieldRef,
28278
28323
  "modelValue": model.value,
28279
- "onUpdate:modelValue": onModelUpdate,
28324
+ "onUpdate:modelValue": $event => model.value = $event,
28325
+ "onBeforeinput": onBeforeinput,
28326
+ "onChange": clampModel,
28280
28327
  "onKeydown": onKeydown,
28281
28328
  "class": ['v-number-input', {
28282
28329
  'v-number-input--default': controlVariant.value === 'default',
@@ -28570,6 +28617,7 @@ const VStepperVertical = genericComponent()({
28570
28617
  const VPullToRefresh = genericComponent()({
28571
28618
  name: 'VPullToRefresh',
28572
28619
  props: {
28620
+ disabled: Boolean,
28573
28621
  pullDownThreshold: {
28574
28622
  type: Number,
28575
28623
  default: 64
@@ -28593,19 +28641,19 @@ const VPullToRefresh = genericComponent()({
28593
28641
  const canRefresh = computed(() => touchDiff.value >= props.pullDownThreshold && !refreshing.value);
28594
28642
  const topOffset = computed(() => clamp(touchDiff.value, 0, props.pullDownThreshold));
28595
28643
  function onTouchstart(e) {
28596
- if (refreshing.value) return;
28644
+ if (refreshing.value || props.disabled) return;
28597
28645
  touching.value = true;
28598
28646
  touchstartY = 'clientY' in e ? e.clientY : e.touches[0].clientY;
28599
28647
  }
28600
28648
  function onTouchmove(e) {
28601
- if (refreshing.value || !touching.value) return;
28649
+ if (refreshing.value || !touching.value || props.disabled) return;
28602
28650
  const touchY = 'clientY' in e ? e.clientY : e.touches[0].clientY;
28603
28651
  if (scrollParents.length && !scrollParents[0].scrollTop) {
28604
28652
  touchDiff.value = touchY - touchstartY;
28605
28653
  }
28606
28654
  }
28607
28655
  function onTouchend(e) {
28608
- if (refreshing.value) return;
28656
+ if (refreshing.value || props.disabled) return;
28609
28657
  touching.value = false;
28610
28658
  if (canRefresh.value) {
28611
28659
  function done() {
@@ -30308,7 +30356,7 @@ function createVuetify$1() {
30308
30356
  goTo
30309
30357
  };
30310
30358
  }
30311
- const version$1 = "3.7.0-beta.1-dev.2024-07-29";
30359
+ const version$1 = "3.7.0-beta.1-dev.2024-08-01";
30312
30360
  createVuetify$1.version = version$1;
30313
30361
 
30314
30362
  // Vue's inject() can only be used in setup
@@ -30561,7 +30609,7 @@ var index = /*#__PURE__*/Object.freeze({
30561
30609
 
30562
30610
  /* eslint-disable local-rules/sort-imports */
30563
30611
 
30564
- const version = "3.7.0-beta.1-dev.2024-07-29";
30612
+ const version = "3.7.0-beta.1-dev.2024-08-01";
30565
30613
 
30566
30614
  /* eslint-disable local-rules/sort-imports */
30567
30615