vuetify 3.7.10 → 3.7.11

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.
package/dist/vuetify.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Vuetify v3.7.10
2
+ * Vuetify v3.7.11
3
3
  * Forged by John Leider
4
4
  * Released under the MIT License.
5
5
  */
@@ -12637,34 +12637,6 @@
12637
12637
  }; // typescript doesn't know about vue's event merging
12638
12638
  }
12639
12639
 
12640
- // https://github.com/vuetifyjs/vuetify/issues/20003
12641
- /**
12642
- * This composable is designed to track whether the mouse is in a mousedown state at any given time. The original motivation is that
12643
- * it is impossible to distinguish whether a blur event is triggered by mousedown, keydown, or via JavaScript.
12644
- * This composable allows for conditional logic when a blur is triggered by mousedown.
12645
- */
12646
-
12647
- function useIsMousedown() {
12648
- const isMousedown = vue.shallowRef(false);
12649
- function mousedown() {
12650
- isMousedown.value = true;
12651
- }
12652
- function mouseup() {
12653
- isMousedown.value = false;
12654
- }
12655
- vue.onMounted(() => {
12656
- document.body.addEventListener('mousedown', mousedown);
12657
- document.body.addEventListener('mouseup', mouseup);
12658
- });
12659
- vue.onUnmounted(() => {
12660
- document.body.removeEventListener('mousedown', mousedown);
12661
- document.body.removeEventListener('mouseup', mouseup);
12662
- });
12663
- return {
12664
- isMousedown
12665
- };
12666
- }
12667
-
12668
12640
  // Types
12669
12641
 
12670
12642
  const makeSelectProps = propsFactory({
@@ -12754,9 +12726,6 @@
12754
12726
  return typeof props.counterValue === 'function' ? props.counterValue(model.value) : typeof props.counterValue === 'number' ? props.counterValue : model.value.length;
12755
12727
  });
12756
12728
  const form = useForm(props);
12757
- const {
12758
- isMousedown
12759
- } = useIsMousedown();
12760
12729
  const selectedValues = vue.computed(() => model.value.map(selection => selection.value));
12761
12730
  const isFocused = vue.shallowRef(false);
12762
12731
  const label = vue.computed(() => menu.value ? props.closeText : props.openText);
@@ -12854,7 +12823,7 @@
12854
12823
  }
12855
12824
  }
12856
12825
  function onBlur(e) {
12857
- if (!listRef.value?.$el.contains(e.relatedTarget) && !isMousedown.value) {
12826
+ if (!listRef.value?.$el.contains(e.relatedTarget)) {
12858
12827
  menu.value = false;
12859
12828
  }
12860
12829
  }
@@ -13266,9 +13235,6 @@
13266
13235
  textColorClasses,
13267
13236
  textColorStyles
13268
13237
  } = useTextColor(color);
13269
- const {
13270
- isMousedown
13271
- } = useIsMousedown();
13272
13238
  const search = useProxiedModel(props, 'search', '');
13273
13239
  const model = useProxiedModel(props, 'modelValue', [], v => transformIn(v === null ? [null] : wrapInArray(v)), v => {
13274
13240
  const transformed = transformOut(v);
@@ -13442,11 +13408,6 @@
13442
13408
  });
13443
13409
  }
13444
13410
  }
13445
- function onBlur(e) {
13446
- if (!isMousedown.value) {
13447
- menu.value = false;
13448
- }
13449
- }
13450
13411
  vue.watch(isFocused, (val, oldVal) => {
13451
13412
  if (val === oldVal) return;
13452
13413
  if (val) {
@@ -13456,6 +13417,7 @@
13456
13417
  vue.nextTick(() => isSelecting.value = false);
13457
13418
  } else {
13458
13419
  if (!props.multiple && search.value == null) model.value = [];
13420
+ menu.value = false;
13459
13421
  if (!model.value.some(_ref3 => {
13460
13422
  let {
13461
13423
  title
@@ -13509,7 +13471,6 @@
13509
13471
  "readonly": form.isReadonly.value,
13510
13472
  "placeholder": isDirty ? undefined : props.placeholder,
13511
13473
  "onClick:clear": onClear,
13512
- "onBlur": onBlur,
13513
13474
  "onMousedown:control": onMousedownControl,
13514
13475
  "onKeydown": onKeydown
13515
13476
  }), {
@@ -17129,9 +17090,6 @@
17129
17090
  return props.multiple ? transformed : transformed[0] ?? null;
17130
17091
  });
17131
17092
  const form = useForm(props);
17132
- const {
17133
- isMousedown
17134
- } = useIsMousedown();
17135
17093
  const hasChips = vue.computed(() => !!(props.chips || slots.chip));
17136
17094
  const hasSelectionSlot = vue.computed(() => hasChips.value || !!slots.selection);
17137
17095
  const _search = vue.shallowRef(!props.multiple && !hasSelectionSlot.value ? model.value[0]?.title ?? '' : '');
@@ -17295,12 +17253,6 @@
17295
17253
  vTextFieldRef.value?.focus();
17296
17254
  }
17297
17255
  }
17298
- function onBlur(e) {
17299
- if (!isMousedown.value) {
17300
- menu.value = false;
17301
- }
17302
- }
17303
-
17304
17256
  /** @param set - null means toggle */
17305
17257
  function select(item) {
17306
17258
  let set = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
@@ -17345,6 +17297,7 @@
17345
17297
  vue.watch(isFocused, (val, oldVal) => {
17346
17298
  if (val || val === oldVal) return;
17347
17299
  selectionIndex.value = -1;
17300
+ menu.value = false;
17348
17301
  if (search.value) {
17349
17302
  if (props.multiple) {
17350
17303
  select(transformItem$3(props, search.value));
@@ -17402,7 +17355,6 @@
17402
17355
  "readonly": form.isReadonly.value,
17403
17356
  "placeholder": isDirty ? undefined : props.placeholder,
17404
17357
  "onClick:clear": onClear,
17405
- "onBlur": onBlur,
17406
17358
  "onMousedown:control": onMousedownControl,
17407
17359
  "onKeydown": onKeydown
17408
17360
  }), {
@@ -28381,7 +28333,7 @@
28381
28333
  goTo
28382
28334
  };
28383
28335
  }
28384
- const version$1 = "3.7.10";
28336
+ const version$1 = "3.7.11";
28385
28337
  createVuetify$1.version = version$1;
28386
28338
 
28387
28339
  // Vue's inject() can only be used in setup
@@ -28406,7 +28358,7 @@
28406
28358
  ...options
28407
28359
  });
28408
28360
  };
28409
- const version = "3.7.10";
28361
+ const version = "3.7.11";
28410
28362
  createVuetify.version = version;
28411
28363
 
28412
28364
  exports.blueprints = index;