@vuetify/nightly 3.2.0-dev-20230405.0 → 3.2.0-dev-20230415.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 (110) hide show
  1. package/CHANGELOG.md +3 -2
  2. package/dist/json/attributes.json +24 -8
  3. package/dist/json/importMap-labs.json +0 -4
  4. package/dist/json/importMap.json +56 -52
  5. package/dist/json/tags.json +5 -1
  6. package/dist/json/web-types.json +83 -47
  7. package/dist/vuetify-labs.css +2296 -2277
  8. package/dist/vuetify-labs.d.ts +712 -662
  9. package/dist/vuetify-labs.esm.js +269 -227
  10. package/dist/vuetify-labs.esm.js.map +1 -1
  11. package/dist/vuetify-labs.js +268 -226
  12. package/dist/vuetify-labs.min.css +2 -2
  13. package/dist/vuetify.css +32 -4
  14. package/dist/vuetify.d.ts +593 -417
  15. package/dist/vuetify.esm.js +247 -34
  16. package/dist/vuetify.esm.js.map +1 -1
  17. package/dist/vuetify.js +246 -33
  18. package/dist/vuetify.js.map +1 -1
  19. package/dist/vuetify.min.css +2 -2
  20. package/dist/vuetify.min.js +319 -293
  21. package/dist/vuetify.min.js.map +1 -1
  22. package/lib/components/VAutocomplete/VAutocomplete.mjs +5 -2
  23. package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
  24. package/lib/components/VAutocomplete/index.d.ts +38 -32
  25. package/lib/components/VCheckbox/index.d.ts +14 -14
  26. package/lib/components/VChip/VChip.mjs +2 -2
  27. package/lib/components/VChip/VChip.mjs.map +1 -1
  28. package/lib/components/VChip/index.d.ts +14 -14
  29. package/lib/components/VCombobox/VCombobox.mjs +6 -3
  30. package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
  31. package/lib/components/VCombobox/index.d.ts +38 -32
  32. package/lib/components/VField/VField.mjs +3 -3
  33. package/lib/components/VField/VField.mjs.map +1 -1
  34. package/lib/components/VField/index.d.ts +20 -20
  35. package/lib/components/VFileInput/VFileInput.mjs +0 -1
  36. package/lib/components/VFileInput/VFileInput.mjs.map +1 -1
  37. package/lib/components/VFileInput/index.d.ts +50 -56
  38. package/lib/components/VImg/VImg.mjs +3 -3
  39. package/lib/components/VImg/VImg.mjs.map +1 -1
  40. package/lib/components/VImg/index.d.ts +19 -19
  41. package/lib/components/VInput/VInput.mjs +2 -2
  42. package/lib/components/VInput/VInput.mjs.map +1 -1
  43. package/lib/components/VInput/index.d.ts +14 -14
  44. package/lib/components/VList/VList.mjs +2 -1
  45. package/lib/components/VList/VList.mjs.map +1 -1
  46. package/lib/components/VList/VListItem.css +12 -0
  47. package/lib/components/VList/VListItem.mjs +2 -2
  48. package/lib/components/VList/VListItem.mjs.map +1 -1
  49. package/lib/components/VList/VListItem.sass +5 -0
  50. package/lib/components/VList/index.d.ts +14 -14
  51. package/lib/components/VOverlay/useActivator.mjs +1 -0
  52. package/lib/components/VOverlay/useActivator.mjs.map +1 -1
  53. package/lib/components/VProgressCircular/VProgressCircular.css +3 -1
  54. package/lib/components/VProgressCircular/VProgressCircular.sass +3 -1
  55. package/lib/components/VProgressCircular/_variables.scss +1 -0
  56. package/lib/components/VProgressLinear/VProgressLinear.css +5 -2
  57. package/lib/components/VProgressLinear/VProgressLinear.sass +3 -0
  58. package/lib/components/VProgressLinear/_variables.scss +1 -1
  59. package/lib/components/VRadioGroup/index.d.ts +14 -14
  60. package/lib/components/VRangeSlider/index.d.ts +14 -14
  61. package/lib/components/VSelect/VSelect.mjs +31 -2
  62. package/lib/components/VSelect/VSelect.mjs.map +1 -1
  63. package/lib/components/VSelect/index.d.ts +38 -32
  64. package/lib/components/VSlider/index.d.ts +14 -14
  65. package/lib/components/VSwitch/index.d.ts +14 -14
  66. package/lib/components/VTextField/VTextField.mjs +2 -2
  67. package/lib/components/VTextField/VTextField.mjs.map +1 -1
  68. package/lib/components/VTextField/index.d.ts +83 -77
  69. package/lib/components/VTextarea/VTextarea.mjs +8 -5
  70. package/lib/components/VTextarea/VTextarea.mjs.map +1 -1
  71. package/lib/components/VTextarea/index.d.ts +56 -50
  72. package/lib/components/VToolbar/VToolbar.css +2 -0
  73. package/lib/components/VToolbar/VToolbar.sass +2 -0
  74. package/lib/components/VVirtualScroll/VVirtualScroll.mjs.map +1 -0
  75. package/lib/components/VVirtualScroll/VVirtualScrollItem.mjs.map +1 -0
  76. package/lib/components/VVirtualScroll/index.mjs.map +1 -0
  77. package/lib/components/index.d.ts +576 -403
  78. package/lib/components/index.mjs +2 -1
  79. package/lib/components/index.mjs.map +1 -1
  80. package/lib/composables/proxiedModel.mjs +2 -1
  81. package/lib/composables/proxiedModel.mjs.map +1 -1
  82. package/lib/composables/theme.mjs +1 -1
  83. package/lib/composables/theme.mjs.map +1 -1
  84. package/lib/entry-bundler.mjs +1 -1
  85. package/lib/framework.mjs +1 -1
  86. package/lib/index.d.ts +16 -15
  87. package/lib/labs/VDataTable/VDataTable.mjs +4 -4
  88. package/lib/labs/VDataTable/VDataTable.mjs.map +1 -1
  89. package/lib/labs/VDataTable/VDataTableRows.mjs +5 -7
  90. package/lib/labs/VDataTable/VDataTableRows.mjs.map +1 -1
  91. package/lib/labs/VDataTable/VDataTableServer.mjs +4 -3
  92. package/lib/labs/VDataTable/VDataTableServer.mjs.map +1 -1
  93. package/lib/labs/VDataTable/VDataTableVirtual.mjs +5 -3
  94. package/lib/labs/VDataTable/VDataTableVirtual.mjs.map +1 -1
  95. package/lib/labs/VDataTable/index.d.ts +137 -111
  96. package/lib/labs/components.d.ts +138 -261
  97. package/lib/labs/components.mjs +0 -1
  98. package/lib/labs/components.mjs.map +1 -1
  99. package/lib/util/helpers.mjs +1 -1
  100. package/lib/util/helpers.mjs.map +1 -1
  101. package/package.json +2 -2
  102. package/lib/labs/VVirtualScroll/VVirtualScroll.mjs.map +0 -1
  103. package/lib/labs/VVirtualScroll/VVirtualScrollItem.mjs.map +0 -1
  104. package/lib/labs/VVirtualScroll/index.mjs.map +0 -1
  105. /package/lib/{labs → components}/VVirtualScroll/VVirtualScroll.css +0 -0
  106. /package/lib/{labs → components}/VVirtualScroll/VVirtualScroll.mjs +0 -0
  107. /package/lib/{labs → components}/VVirtualScroll/VVirtualScroll.sass +0 -0
  108. /package/lib/{labs → components}/VVirtualScroll/VVirtualScrollItem.mjs +0 -0
  109. /package/lib/{labs → components}/VVirtualScroll/index.d.ts +0 -0
  110. /package/lib/{labs → components}/VVirtualScroll/index.mjs +0 -0
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Vuetify v3.2.0-dev-20230405.0
2
+ * Vuetify v3.2.0-dev-20230415.0
3
3
  * Forged by John Leider
4
4
  * Released under the MIT License.
5
5
  */
@@ -343,7 +343,7 @@
343
343
  }
344
344
  const onRE = /^on[^a-z]/;
345
345
  const isOn = key => onRE.test(key);
346
- const EventProp = [Function, Array];
346
+ const EventProp = () => [Function, Array];
347
347
  function hasEvent(props, name) {
348
348
  name = 'on' + vue.capitalize(name);
349
349
  return !!(props[name] || props[`${name}Once`] || props[`${name}Capture`] || props[`${name}OnceCapture`] || props[`${name}CaptureOnce`]);
@@ -1707,7 +1707,7 @@
1707
1707
  if (/^on-[a-z]/.test(key)) {
1708
1708
  createCssClass(fgLines, `.${key}`, [`color: rgb(var(--v-theme-${key})) !important`]);
1709
1709
  } else {
1710
- createCssClass(bgLines, `.bg-${key}`, [`--v-theme-overlay-multiplier: var(--v-theme-${key}-overlay-multiplier)`, `background: rgb(var(--v-theme-${key})) !important`, `color: rgb(var(--v-theme-on-${key})) !important`]);
1710
+ createCssClass(bgLines, `.bg-${key}`, [`--v-theme-overlay-multiplier: var(--v-theme-${key}-overlay-multiplier)`, `background-color: rgb(var(--v-theme-${key})) !important`, `color: rgb(var(--v-theme-on-${key})) !important`]);
1711
1711
  createCssClass(fgLines, `.text-${key}`, [`color: rgb(var(--v-theme-${key})) !important`]);
1712
1712
  createCssClass(fgLines, `.border-${key}`, [`--v-border-color: var(--v-theme-${key})`]);
1713
1713
  }
@@ -1845,7 +1845,8 @@
1845
1845
  });
1846
1846
  const model = vue.computed({
1847
1847
  get() {
1848
- return transformIn(isControlled.value ? props[prop] : internal.value);
1848
+ const externalValue = props[prop];
1849
+ return transformIn(isControlled.value ? externalValue : internal.value);
1849
1850
  },
1850
1851
  set(internalValue) {
1851
1852
  const newValue = transformOut(internalValue);
@@ -2719,9 +2720,9 @@
2719
2720
  ...makeTransitionProps()
2720
2721
  },
2721
2722
  emits: {
2722
- loadstart: event => true,
2723
- load: event => true,
2724
- error: event => true
2723
+ loadstart: value => true,
2724
+ load: value => true,
2725
+ error: value => true
2725
2726
  },
2726
2727
  setup(props, _ref) {
2727
2728
  let {
@@ -5346,9 +5347,9 @@
5346
5347
  default: 'filled',
5347
5348
  validator: v => allowedVariants$1.includes(v)
5348
5349
  },
5349
- 'onClick:clear': EventProp,
5350
- 'onClick:appendInner': EventProp,
5351
- 'onClick:prependInner': EventProp,
5350
+ 'onClick:clear': EventProp(),
5351
+ 'onClick:appendInner': EventProp(),
5352
+ 'onClick:prependInner': EventProp(),
5352
5353
  ...makeThemeProps(),
5353
5354
  ...makeLoaderProps()
5354
5355
  }, 'v-field');
@@ -5894,8 +5895,8 @@
5894
5895
  default: 'horizontal',
5895
5896
  validator: v => ['horizontal', 'vertical'].includes(v)
5896
5897
  },
5897
- 'onClick:prepend': EventProp,
5898
- 'onClick:append': EventProp,
5898
+ 'onClick:prepend': EventProp(),
5899
+ 'onClick:append': EventProp(),
5899
5900
  ...makeDensityProps(),
5900
5901
  ...makeValidationProps()
5901
5902
  }, 'v-input');
@@ -6126,6 +6127,7 @@
6126
6127
  type: String,
6127
6128
  default: 'text'
6128
6129
  },
6130
+ modelModifiers: Object,
6129
6131
  ...makeVInputProps(),
6130
6132
  ...makeVFieldProps()
6131
6133
  }, 'v-text-field');
@@ -6200,7 +6202,7 @@
6200
6202
  function onInput(e) {
6201
6203
  const el = e.target;
6202
6204
  model.value = el.value;
6203
- if (['text', 'search', 'password', 'tel', 'url'].includes(props.type)) {
6205
+ if (props.modelModifiers?.trim && ['text', 'search', 'password', 'tel', 'url'].includes(props.type)) {
6204
6206
  const caretPosition = [el.selectionStart, el.selectionEnd];
6205
6207
  vue.nextTick(() => {
6206
6208
  el.selectionStart = caretPosition[0];
@@ -6837,8 +6839,8 @@
6837
6839
  type: Boolean,
6838
6840
  default: true
6839
6841
  },
6840
- onClick: EventProp,
6841
- onClickOnce: EventProp,
6842
+ onClick: EventProp(),
6843
+ onClickOnce: EventProp(),
6842
6844
  ...makeBorderProps(),
6843
6845
  ...makeDensityProps(),
6844
6846
  ...makeElevationProps(),
@@ -7682,8 +7684,8 @@
7682
7684
  subtitle: [String, Number, Boolean],
7683
7685
  title: [String, Number, Boolean],
7684
7686
  value: null,
7685
- onClick: EventProp,
7686
- onClickOnce: EventProp,
7687
+ onClick: EventProp(),
7688
+ onClickOnce: EventProp(),
7687
7689
  ...makeBorderProps(),
7688
7690
  ...makeDensityProps(),
7689
7691
  ...makeDimensionProps(),
@@ -8225,7 +8227,8 @@
8225
8227
  }
8226
8228
  function focus(location) {
8227
8229
  if (!contentRef.value) return;
8228
- const focusable = [...contentRef.value.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')].filter(el => !el.hasAttribute('disabled'));
8230
+ const targets = ['button', '[href]', 'input', 'select', 'textarea', '[tabindex]'].map(s => `${s}:not([tabindex="-1"])`).join(', ');
8231
+ const focusable = [...contentRef.value.querySelectorAll(targets)].filter(el => !el.hasAttribute('disabled'));
8229
8232
  const idx = focusable.indexOf(document.activeElement);
8230
8233
  if (!location) {
8231
8234
  if (!contentRef.value.contains(document.activeElement)) {
@@ -8406,6 +8409,7 @@
8406
8409
  isActive.value = !isActive.value;
8407
8410
  },
8408
8411
  mouseenter: e => {
8412
+ if (e.sourceCapabilities?.firesTouchEvents) return;
8409
8413
  isHovered = true;
8410
8414
  activatorEl.value = e.currentTarget || e.target;
8411
8415
  runOpenDelay();
@@ -9932,6 +9936,9 @@
9932
9936
  });
9933
9937
  });
9934
9938
  const selected = vue.computed(() => selections.value.map(selection => selection.props.value));
9939
+ const isFocused = vue.ref(false);
9940
+ let keyboardLookupPrefix = '';
9941
+ let keyboardLookupLastTime;
9935
9942
  const displayItems = vue.computed(() => {
9936
9943
  if (props.hideSelected) {
9937
9944
  return items.value.filter(item => !selections.value.some(s => s === item));
@@ -9968,6 +9975,26 @@
9968
9975
  } else if (e.key === 'End') {
9969
9976
  listRef.value?.focus('last');
9970
9977
  }
9978
+
9979
+ // html select hotkeys
9980
+ const KEYBOARD_LOOKUP_THRESHOLD = 1000; // milliseconds
9981
+
9982
+ function checkPrintable(e) {
9983
+ const isPrintableChar = e.key.length === 1;
9984
+ const noModifier = !e.ctrlKey && !e.metaKey && !e.altKey;
9985
+ return isPrintableChar && noModifier;
9986
+ }
9987
+ if (props.multiple || !checkPrintable(e)) return;
9988
+ const now = performance.now();
9989
+ if (now - keyboardLookupLastTime > KEYBOARD_LOOKUP_THRESHOLD) {
9990
+ keyboardLookupPrefix = '';
9991
+ }
9992
+ keyboardLookupPrefix += e.key.toLowerCase();
9993
+ keyboardLookupLastTime = now;
9994
+ const item = items.value.find(item => item.title.toLowerCase().startsWith(keyboardLookupPrefix));
9995
+ if (item !== undefined) {
9996
+ model.value = [item];
9997
+ }
9971
9998
  }
9972
9999
  function select(item) {
9973
10000
  if (props.multiple) {
@@ -9997,7 +10024,9 @@
9997
10024
  useRender(() => {
9998
10025
  const hasChips = !!(props.chips || slots.chip);
9999
10026
  const hasList = !!(!props.hideNoData || displayItems.value.length || slots.prepend || slots.append || slots['no-data']);
10027
+ const isDirty = model.value.length > 0;
10000
10028
  const [textFieldProps] = VTextField.filterProps(props);
10029
+ const placeholder = isDirty || !isFocused.value && props.label && !props.persistentPlaceholder ? undefined : props.placeholder;
10001
10030
  return vue.createVNode(VTextField, vue.mergeProps({
10002
10031
  "ref": vTextFieldRef
10003
10032
  }, textFieldProps, {
@@ -10005,8 +10034,10 @@
10005
10034
  "onUpdate:modelValue": v => {
10006
10035
  if (v == null) model.value = [];
10007
10036
  },
10037
+ "focused": isFocused.value,
10038
+ "onUpdate:focused": $event => isFocused.value = $event,
10008
10039
  "validationValue": model.externalValue,
10009
- "dirty": model.value.length > 0,
10040
+ "dirty": isDirty,
10010
10041
  "class": ['v-select', {
10011
10042
  'v-select--active-menu': menu.value,
10012
10043
  'v-select--chips': !!props.chips,
@@ -10015,6 +10046,7 @@
10015
10046
  }],
10016
10047
  "appendInnerIcon": props.menuIcon,
10017
10048
  "readonly": true,
10049
+ "placeholder": placeholder,
10018
10050
  "onClick:clear": onClear,
10019
10051
  "onMousedown:control": onMousedownControl,
10020
10052
  "onBlur": onBlur,
@@ -10063,7 +10095,8 @@
10063
10095
  } = _ref2;
10064
10096
  return props.multiple && !props.hideSelected ? vue.createVNode(VCheckboxBtn, {
10065
10097
  "modelValue": isSelected,
10066
- "ripple": false
10098
+ "ripple": false,
10099
+ "tabindex": "-1"
10067
10100
  }, null) : undefined;
10068
10101
  }
10069
10102
  });
@@ -10390,6 +10423,7 @@
10390
10423
  useRender(() => {
10391
10424
  const hasChips = !!(props.chips || slots.chip);
10392
10425
  const hasList = !!(!props.hideNoData || displayItems.value.length || slots.prepend || slots.append || slots['no-data']);
10426
+ const isDirty = model.value.length > 0;
10393
10427
  const [textFieldProps] = VTextField.filterProps(props);
10394
10428
  return vue.createVNode(VTextField, vue.mergeProps({
10395
10429
  "ref": vTextFieldRef
@@ -10399,7 +10433,7 @@
10399
10433
  if (v == null) model.value = [];
10400
10434
  },
10401
10435
  "validationValue": model.externalValue,
10402
- "dirty": model.value.length > 0,
10436
+ "dirty": isDirty,
10403
10437
  "onInput": onInput,
10404
10438
  "class": ['v-autocomplete', {
10405
10439
  'v-autocomplete--active-menu': menu.value,
@@ -10409,6 +10443,7 @@
10409
10443
  }],
10410
10444
  "appendInnerIcon": props.menuIcon,
10411
10445
  "readonly": props.readonly,
10446
+ "placeholder": isDirty ? undefined : props.placeholder,
10412
10447
  "onClick:clear": onClear,
10413
10448
  "onMousedown:control": onMousedownControl,
10414
10449
  "onFocus": () => isFocused.value = true,
@@ -10455,7 +10490,8 @@
10455
10490
  } = _ref2;
10456
10491
  return props.multiple && !props.hideSelected ? vue.createVNode(VCheckboxBtn, {
10457
10492
  "modelValue": isSelected,
10458
- "ripple": false
10493
+ "ripple": false,
10494
+ "tabindex": "-1"
10459
10495
  }, null) : undefined;
10460
10496
  },
10461
10497
  title: () => {
@@ -13571,7 +13607,7 @@
13571
13607
  textColorClasses,
13572
13608
  textColorStyles
13573
13609
  } = useTextColor(color);
13574
- const model = useProxiedModel(props, 'modelValue', [], v => transformIn(wrapInArray(v || [])), v => {
13610
+ const model = useProxiedModel(props, 'modelValue', [], v => transformIn(wrapInArray(v)), v => {
13575
13611
  const transformed = transformOut(v);
13576
13612
  return props.multiple ? transformed : transformed[0] ?? null;
13577
13613
  });
@@ -13749,6 +13785,7 @@
13749
13785
  useRender(() => {
13750
13786
  const hasChips = !!(props.chips || slots.chip);
13751
13787
  const hasList = !!(!props.hideNoData || displayItems.value.length || slots.prepend || slots.append || slots['no-data']);
13788
+ const isDirty = model.value.length > 0;
13752
13789
  const [textFieldProps] = VTextField.filterProps(props);
13753
13790
  return vue.createVNode(VTextField, vue.mergeProps({
13754
13791
  "ref": vTextFieldRef
@@ -13758,7 +13795,7 @@
13758
13795
  if (v == null) model.value = [];
13759
13796
  }],
13760
13797
  "validationValue": model.externalValue,
13761
- "dirty": model.value.length > 0,
13798
+ "dirty": isDirty,
13762
13799
  "class": ['v-combobox', {
13763
13800
  'v-combobox--active-menu': menu.value,
13764
13801
  'v-combobox--chips': !!props.chips,
@@ -13767,6 +13804,7 @@
13767
13804
  }],
13768
13805
  "appendInnerIcon": props.items.length ? props.menuIcon : undefined,
13769
13806
  "readonly": props.readonly,
13807
+ "placeholder": isDirty ? undefined : props.placeholder,
13770
13808
  "onClick:clear": onClear,
13771
13809
  "onMousedown:control": onMousedownControl,
13772
13810
  "onFocus": () => isFocused.value = true,
@@ -13813,7 +13851,8 @@
13813
13851
  } = _ref2;
13814
13852
  return props.multiple && !props.hideSelected ? vue.createVNode(VCheckboxBtn, {
13815
13853
  "modelValue": isSelected,
13816
- "ripple": false
13854
+ "ripple": false,
13855
+ "tabindex": "-1"
13817
13856
  }, null) : undefined;
13818
13857
  },
13819
13858
  title: () => {
@@ -14223,7 +14262,6 @@
14223
14262
  multiple: Boolean,
14224
14263
  hint: String,
14225
14264
  persistentHint: Boolean,
14226
- placeholder: String,
14227
14265
  showSize: {
14228
14266
  type: [Boolean, Number],
14229
14267
  default: false,
@@ -17439,6 +17477,7 @@
17439
17477
  validator: v => !isNaN(parseFloat(v))
17440
17478
  },
17441
17479
  suffix: String,
17480
+ modelModifiers: Object,
17442
17481
  ...makeVInputProps(),
17443
17482
  ...makeVFieldProps()
17444
17483
  },
@@ -17503,12 +17542,14 @@
17503
17542
  }
17504
17543
  function onInput(e) {
17505
17544
  const el = e.target;
17506
- const caretPosition = [el.selectionStart, el.selectionEnd];
17507
17545
  model.value = el.value;
17508
- vue.nextTick(() => {
17509
- el.selectionStart = caretPosition[0];
17510
- el.selectionEnd = caretPosition[1];
17511
- });
17546
+ if (props.modelModifiers?.trim) {
17547
+ const caretPosition = [el.selectionStart, el.selectionEnd];
17548
+ vue.nextTick(() => {
17549
+ el.selectionStart = caretPosition[0];
17550
+ el.selectionEnd = caretPosition[1];
17551
+ });
17552
+ }
17512
17553
  }
17513
17554
  const sizerRef = vue.ref();
17514
17555
  function calculateInputHeight() {
@@ -17997,6 +18038,177 @@
17997
18038
  }
17998
18039
  });
17999
18040
 
18041
+ const VVirtualScrollItem = genericComponent()({
18042
+ name: 'VVirtualScrollItem',
18043
+ props: {
18044
+ dynamicHeight: Boolean
18045
+ },
18046
+ emits: {
18047
+ 'update:height': height => true
18048
+ },
18049
+ setup(props, _ref) {
18050
+ let {
18051
+ emit,
18052
+ slots
18053
+ } = _ref;
18054
+ const {
18055
+ resizeRef,
18056
+ contentRect
18057
+ } = useResizeObserver();
18058
+ useToggleScope(() => props.dynamicHeight, () => {
18059
+ vue.watch(() => contentRect.value?.height, height => {
18060
+ if (height != null) emit('update:height', height);
18061
+ });
18062
+ });
18063
+ function updateHeight() {
18064
+ if (props.dynamicHeight && contentRect.value) {
18065
+ emit('update:height', contentRect.value.height);
18066
+ }
18067
+ }
18068
+ vue.onUpdated(updateHeight);
18069
+ useRender(() => vue.createVNode("div", {
18070
+ "ref": props.dynamicHeight ? resizeRef : undefined,
18071
+ "class": "v-virtual-scroll__item"
18072
+ }, [slots.default?.()]));
18073
+ }
18074
+ });
18075
+
18076
+ // Types
18077
+
18078
+ const UP$1 = -1;
18079
+ const DOWN$1 = 1;
18080
+ const VVirtualScroll = genericComponent()({
18081
+ name: 'VVirtualScroll',
18082
+ props: {
18083
+ items: {
18084
+ type: Array,
18085
+ default: () => []
18086
+ },
18087
+ itemHeight: [Number, String],
18088
+ visibleItems: [Number, String],
18089
+ ...makeDimensionProps()
18090
+ },
18091
+ setup(props, _ref) {
18092
+ let {
18093
+ slots
18094
+ } = _ref;
18095
+ const first = vue.ref(0);
18096
+ const baseItemHeight = vue.ref(props.itemHeight);
18097
+ const itemHeight = vue.computed({
18098
+ get: () => parseInt(baseItemHeight.value ?? 0, 10),
18099
+ set(val) {
18100
+ baseItemHeight.value = val;
18101
+ }
18102
+ });
18103
+ const rootEl = vue.ref();
18104
+ const {
18105
+ resizeRef,
18106
+ contentRect
18107
+ } = useResizeObserver();
18108
+ vue.watchEffect(() => {
18109
+ resizeRef.value = rootEl.value;
18110
+ });
18111
+ const display = useDisplay();
18112
+ const sizeMap = new Map();
18113
+ let sizes = createRange(props.items.length).map(() => itemHeight.value);
18114
+ const visibleItems = vue.computed(() => {
18115
+ return props.visibleItems ? parseInt(props.visibleItems, 10) : Math.max(12, Math.ceil((contentRect.value?.height ?? display.height.value) / itemHeight.value * 1.7 + 1));
18116
+ });
18117
+ function handleItemResize(index, height) {
18118
+ itemHeight.value = Math.max(itemHeight.value, height);
18119
+ sizes[index] = height;
18120
+ sizeMap.set(props.items[index], height);
18121
+ }
18122
+ function calculateOffset(index) {
18123
+ return sizes.slice(0, index).reduce((curr, value) => curr + (value || itemHeight.value), 0);
18124
+ }
18125
+ function calculateMidPointIndex(scrollTop) {
18126
+ let start = 0;
18127
+ let end = props.items.length;
18128
+ while (start <= end) {
18129
+ const middle = start + Math.floor((end - start) / 2);
18130
+ const middleOffset = calculateOffset(middle);
18131
+ if (middleOffset === scrollTop) {
18132
+ return middle;
18133
+ } else if (middleOffset < scrollTop) {
18134
+ start = middle + 1;
18135
+ } else if (middleOffset > scrollTop) {
18136
+ end = middle - 1;
18137
+ }
18138
+ }
18139
+ return start;
18140
+ }
18141
+ let lastScrollTop = 0;
18142
+ function handleScroll() {
18143
+ if (!rootEl.value || !contentRect.value) return;
18144
+ const height = contentRect.value.height;
18145
+ const scrollTop = rootEl.value.scrollTop;
18146
+ const direction = scrollTop < lastScrollTop ? UP$1 : DOWN$1;
18147
+ const midPointIndex = calculateMidPointIndex(scrollTop + height / 2);
18148
+ const buffer = Math.round(visibleItems.value / 3);
18149
+ if (direction === UP$1 && midPointIndex <= first.value + buffer * 2 - 1) {
18150
+ first.value = clamp(midPointIndex - buffer, 0, props.items.length);
18151
+ } else if (direction === DOWN$1 && midPointIndex >= first.value + buffer * 2 - 1) {
18152
+ first.value = clamp(midPointIndex - buffer, 0, props.items.length - visibleItems.value);
18153
+ }
18154
+ lastScrollTop = rootEl.value.scrollTop;
18155
+ }
18156
+ function scrollToIndex(index) {
18157
+ if (!rootEl.value) return;
18158
+ const offset = calculateOffset(index);
18159
+ rootEl.value.scrollTop = offset;
18160
+ }
18161
+ const last = vue.computed(() => Math.min(props.items.length, first.value + visibleItems.value));
18162
+ const computedItems = vue.computed(() => props.items.slice(first.value, last.value));
18163
+ const paddingTop = vue.computed(() => calculateOffset(first.value));
18164
+ const paddingBottom = vue.computed(() => calculateOffset(props.items.length) - calculateOffset(last.value));
18165
+ const {
18166
+ dimensionStyles
18167
+ } = useDimension(props);
18168
+ vue.onMounted(() => {
18169
+ if (!itemHeight.value) {
18170
+ // If itemHeight prop is not set, then calculate an estimated height from the average of inital items
18171
+ itemHeight.value = sizes.slice(first.value, last.value).reduce((curr, height) => curr + height, 0) / visibleItems.value;
18172
+ }
18173
+ });
18174
+ vue.watch(() => props.items.length, () => {
18175
+ sizes = createRange(props.items.length).map(() => itemHeight.value);
18176
+ sizeMap.forEach((height, item) => {
18177
+ const index = props.items.indexOf(item);
18178
+ if (index === -1) {
18179
+ sizeMap.delete(item);
18180
+ } else {
18181
+ sizes[index] = height;
18182
+ }
18183
+ });
18184
+ });
18185
+ useRender(() => vue.createVNode("div", {
18186
+ "ref": rootEl,
18187
+ "class": "v-virtual-scroll",
18188
+ "onScroll": handleScroll,
18189
+ "style": dimensionStyles.value
18190
+ }, [vue.createVNode("div", {
18191
+ "class": "v-virtual-scroll__container",
18192
+ "style": {
18193
+ paddingTop: convertToUnit(paddingTop.value),
18194
+ paddingBottom: convertToUnit(paddingBottom.value)
18195
+ }
18196
+ }, [computedItems.value.map((item, index) => vue.createVNode(VVirtualScrollItem, {
18197
+ "key": index,
18198
+ "dynamicHeight": !props.itemHeight,
18199
+ "onUpdate:height": height => handleItemResize(index + first.value, height)
18200
+ }, {
18201
+ default: () => [slots.default?.({
18202
+ item,
18203
+ index: index + first.value
18204
+ })]
18205
+ }))])]));
18206
+ return {
18207
+ scrollToIndex
18208
+ };
18209
+ }
18210
+ });
18211
+
18000
18212
  const VDataTableColumn = defineFunctionalComponent({
18001
18213
  align: {
18002
18214
  type: String,
@@ -18852,10 +19064,8 @@
18852
19064
  type: String,
18853
19065
  default: '$vuetify.noDataText'
18854
19066
  },
18855
- rowHeight: Number
18856
- },
18857
- emits: {
18858
- 'click:row': (event, value) => true
19067
+ rowHeight: Number,
19068
+ 'onClick:row': Function
18859
19069
  },
18860
19070
  setup(props, _ref) {
18861
19071
  let {
@@ -18919,14 +19129,14 @@
18919
19129
  };
18920
19130
  return vue.createVNode(vue.Fragment, null, [slots.item ? slots.item(slotProps) : vue.createVNode(VDataTableRow, {
18921
19131
  "key": `item_${item.value}`,
18922
- "onClick": event => {
19132
+ "onClick": expandOnClick.value || props['onClick:row'] ? event => {
18923
19133
  if (expandOnClick.value) {
18924
19134
  toggleExpand(item);
18925
19135
  }
18926
- emit('click:row', event, {
19136
+ props['onClick:row']?.(event, {
18927
19137
  item
18928
19138
  });
18929
- },
19139
+ } : undefined,
18930
19140
  "index": index,
18931
19141
  "item": item
18932
19142
  }, slots), isExpanded(item) && slots['expanded-row']?.(slotProps)]);
@@ -19237,7 +19447,8 @@
19237
19447
  height: [String, Number],
19238
19448
  width: [String, Number],
19239
19449
  fixedHeader: Boolean,
19240
- fixedFooter: Boolean
19450
+ fixedFooter: Boolean,
19451
+ 'onClick:row': Function
19241
19452
  }, 'v-data-table');
19242
19453
  const VDataTable = genericComponent()({
19243
19454
  name: 'VDataTable',
@@ -19258,8 +19469,7 @@
19258
19469
  'update:sortBy': value => true,
19259
19470
  'update:options': value => true,
19260
19471
  'update:groupBy': value => true,
19261
- 'update:expanded': value => true,
19262
- 'click:row': (event, value) => true
19472
+ 'update:expanded': value => true
19263
19473
  },
19264
19474
  setup(props, _ref) {
19265
19475
  let {
@@ -19365,7 +19575,7 @@
19365
19575
  "multiSort": props.multiSort
19366
19576
  }, slots)]), slots.thead?.(), vue.createVNode("tbody", null, [slots.body ? slots.body() : vue.createVNode(VDataTableRows, {
19367
19577
  "items": paginatedItems.value,
19368
- "onClick:row": (event, value) => emit('click:row', event, value)
19578
+ "onClick:row": props['onClick:row']
19369
19579
  }, slots)]), slots.tbody?.(), slots.tfoot?.()])),
19370
19580
  bottom: slots.bottom ?? (() => vue.createVNode(VDataTableFooter, null, {
19371
19581
  prepend: slots['footer.prepend']
@@ -19389,8 +19599,8 @@
19389
19599
  default: 52
19390
19600
  }
19391
19601
  }, 'virtual');
19392
- const UP$1 = -1;
19393
- const DOWN$1 = 1;
19602
+ const UP = -1;
19603
+ const DOWN = 1;
19394
19604
 
19395
19605
  // TODO: Replace this with composable from v-virtual-scroll
19396
19606
  function useVirtual(props, items) {
@@ -19428,12 +19638,12 @@
19428
19638
  isScrolling.value = false;
19429
19639
  }, 100);
19430
19640
  const scrollTop = containerRef.value.scrollTop;
19431
- const direction = scrollTop < lastScrollTop ? UP$1 : DOWN$1;
19641
+ const direction = scrollTop < lastScrollTop ? UP : DOWN;
19432
19642
  const midPointIndex = calculateMidPointIndex(scrollTop);
19433
19643
  const buffer = Math.round(visibleItems.value / 3);
19434
- if (direction === UP$1 && midPointIndex <= startIndex.value) {
19644
+ if (direction === UP && midPointIndex <= startIndex.value) {
19435
19645
  startIndex.value = Math.max(midPointIndex - buffer, 0);
19436
- } else if (direction === DOWN$1 && midPointIndex >= startIndex.value + buffer * 2) {
19646
+ } else if (direction === DOWN && midPointIndex >= startIndex.value + buffer * 2) {
19437
19647
  startIndex.value = Math.min(Math.max(0, midPointIndex - buffer), items.value.length - visibleItems.value);
19438
19648
  }
19439
19649
  lastScrollTop = containerRef.value.scrollTop;
@@ -19476,7 +19686,7 @@
19476
19686
  'update:options': value => true,
19477
19687
  'update:groupBy': value => true,
19478
19688
  'update:expanded': value => true,
19479
- 'click:row': (event, value) => true
19689
+ 'click:row': (e, value) => true
19480
19690
  },
19481
19691
  setup(props, _ref) {
19482
19692
  let {
@@ -19560,8 +19770,10 @@
19560
19770
  "style": {
19561
19771
  '--v-table-row-height': convertToUnit(itemHeight.value)
19562
19772
  },
19773
+ "fixedHeader": props.fixedHeader,
19774
+ "fixedFooter": props.fixedFooter,
19563
19775
  "height": props.height,
19564
- "fixedHeader": props.fixedHeader
19776
+ "hover": props.hover
19565
19777
  }, {
19566
19778
  top: slots.top,
19567
19779
  wrapper: () => vue.createVNode("div", {
@@ -19587,7 +19799,7 @@
19587
19799
  }
19588
19800
  }, null)]), vue.createVNode(VDataTableRows, {
19589
19801
  "items": visibleItems.value,
19590
- "onClick:row": (event, value) => emit('click:row', event, value)
19802
+ "onClick:row": props['onClick:row']
19591
19803
  }, slots), vue.createVNode("tr", {
19592
19804
  "style": {
19593
19805
  height: convertToUnit(paddingBottom.value),
@@ -19637,7 +19849,7 @@
19637
19849
  'update:options': options => true,
19638
19850
  'update:expanded': options => true,
19639
19851
  'update:groupBy': value => true,
19640
- 'click:row': (event, value) => true
19852
+ 'click:row': (e, value) => true
19641
19853
  },
19642
19854
  setup(props, _ref) {
19643
19855
  let {
@@ -19715,7 +19927,8 @@
19715
19927
  }],
19716
19928
  "fixedHeader": props.fixedHeader,
19717
19929
  "fixedFooter": props.fixedFooter,
19718
- "height": props.height
19930
+ "height": props.height,
19931
+ "hover": props.hover
19719
19932
  }, {
19720
19933
  top: slots.top,
19721
19934
  default: slots.default ?? (() => vue.createVNode(vue.Fragment, null, [slots.colgroup?.({
@@ -19732,7 +19945,7 @@
19732
19945
  "role": "rowgroup"
19733
19946
  }, [slots.body ? slots.body() : vue.createVNode(VDataTableRows, {
19734
19947
  "items": flatItems.value,
19735
- "onClick:row": (event, value) => emit('click:row', event, value)
19948
+ "onClick:row": props['onClick:row']
19736
19949
  }, slots)]), slots.tbody?.(), slots.tfoot?.()])),
19737
19950
  bottom: slots.bottom ?? (() => vue.createVNode(VDataTableFooter, null, {
19738
19951
  prepend: slots['footer.prepend']
@@ -19872,177 +20085,6 @@
19872
20085
  }
19873
20086
  });
19874
20087
 
19875
- const VVirtualScrollItem = genericComponent()({
19876
- name: 'VVirtualScrollItem',
19877
- props: {
19878
- dynamicHeight: Boolean
19879
- },
19880
- emits: {
19881
- 'update:height': height => true
19882
- },
19883
- setup(props, _ref) {
19884
- let {
19885
- emit,
19886
- slots
19887
- } = _ref;
19888
- const {
19889
- resizeRef,
19890
- contentRect
19891
- } = useResizeObserver();
19892
- useToggleScope(() => props.dynamicHeight, () => {
19893
- vue.watch(() => contentRect.value?.height, height => {
19894
- if (height != null) emit('update:height', height);
19895
- });
19896
- });
19897
- function updateHeight() {
19898
- if (props.dynamicHeight && contentRect.value) {
19899
- emit('update:height', contentRect.value.height);
19900
- }
19901
- }
19902
- vue.onUpdated(updateHeight);
19903
- useRender(() => vue.createVNode("div", {
19904
- "ref": props.dynamicHeight ? resizeRef : undefined,
19905
- "class": "v-virtual-scroll__item"
19906
- }, [slots.default?.()]));
19907
- }
19908
- });
19909
-
19910
- // Types
19911
-
19912
- const UP = -1;
19913
- const DOWN = 1;
19914
- const VVirtualScroll = genericComponent()({
19915
- name: 'VVirtualScroll',
19916
- props: {
19917
- items: {
19918
- type: Array,
19919
- default: () => []
19920
- },
19921
- itemHeight: [Number, String],
19922
- visibleItems: [Number, String],
19923
- ...makeDimensionProps()
19924
- },
19925
- setup(props, _ref) {
19926
- let {
19927
- slots
19928
- } = _ref;
19929
- const first = vue.ref(0);
19930
- const baseItemHeight = vue.ref(props.itemHeight);
19931
- const itemHeight = vue.computed({
19932
- get: () => parseInt(baseItemHeight.value ?? 0, 10),
19933
- set(val) {
19934
- baseItemHeight.value = val;
19935
- }
19936
- });
19937
- const rootEl = vue.ref();
19938
- const {
19939
- resizeRef,
19940
- contentRect
19941
- } = useResizeObserver();
19942
- vue.watchEffect(() => {
19943
- resizeRef.value = rootEl.value;
19944
- });
19945
- const display = useDisplay();
19946
- const sizeMap = new Map();
19947
- let sizes = createRange(props.items.length).map(() => itemHeight.value);
19948
- const visibleItems = vue.computed(() => {
19949
- return props.visibleItems ? parseInt(props.visibleItems, 10) : Math.max(12, Math.ceil((contentRect.value?.height ?? display.height.value) / itemHeight.value * 1.7 + 1));
19950
- });
19951
- function handleItemResize(index, height) {
19952
- itemHeight.value = Math.max(itemHeight.value, height);
19953
- sizes[index] = height;
19954
- sizeMap.set(props.items[index], height);
19955
- }
19956
- function calculateOffset(index) {
19957
- return sizes.slice(0, index).reduce((curr, value) => curr + (value || itemHeight.value), 0);
19958
- }
19959
- function calculateMidPointIndex(scrollTop) {
19960
- let start = 0;
19961
- let end = props.items.length;
19962
- while (start <= end) {
19963
- const middle = start + Math.floor((end - start) / 2);
19964
- const middleOffset = calculateOffset(middle);
19965
- if (middleOffset === scrollTop) {
19966
- return middle;
19967
- } else if (middleOffset < scrollTop) {
19968
- start = middle + 1;
19969
- } else if (middleOffset > scrollTop) {
19970
- end = middle - 1;
19971
- }
19972
- }
19973
- return start;
19974
- }
19975
- let lastScrollTop = 0;
19976
- function handleScroll() {
19977
- if (!rootEl.value || !contentRect.value) return;
19978
- const height = contentRect.value.height;
19979
- const scrollTop = rootEl.value.scrollTop;
19980
- const direction = scrollTop < lastScrollTop ? UP : DOWN;
19981
- const midPointIndex = calculateMidPointIndex(scrollTop + height / 2);
19982
- const buffer = Math.round(visibleItems.value / 3);
19983
- if (direction === UP && midPointIndex <= first.value + buffer * 2 - 1) {
19984
- first.value = clamp(midPointIndex - buffer, 0, props.items.length);
19985
- } else if (direction === DOWN && midPointIndex >= first.value + buffer * 2 - 1) {
19986
- first.value = clamp(midPointIndex - buffer, 0, props.items.length - visibleItems.value);
19987
- }
19988
- lastScrollTop = rootEl.value.scrollTop;
19989
- }
19990
- function scrollToIndex(index) {
19991
- if (!rootEl.value) return;
19992
- const offset = calculateOffset(index);
19993
- rootEl.value.scrollTop = offset;
19994
- }
19995
- const last = vue.computed(() => Math.min(props.items.length, first.value + visibleItems.value));
19996
- const computedItems = vue.computed(() => props.items.slice(first.value, last.value));
19997
- const paddingTop = vue.computed(() => calculateOffset(first.value));
19998
- const paddingBottom = vue.computed(() => calculateOffset(props.items.length) - calculateOffset(last.value));
19999
- const {
20000
- dimensionStyles
20001
- } = useDimension(props);
20002
- vue.onMounted(() => {
20003
- if (!itemHeight.value) {
20004
- // If itemHeight prop is not set, then calculate an estimated height from the average of inital items
20005
- itemHeight.value = sizes.slice(first.value, last.value).reduce((curr, height) => curr + height, 0) / visibleItems.value;
20006
- }
20007
- });
20008
- vue.watch(() => props.items.length, () => {
20009
- sizes = createRange(props.items.length).map(() => itemHeight.value);
20010
- sizeMap.forEach((height, item) => {
20011
- const index = props.items.indexOf(item);
20012
- if (index === -1) {
20013
- sizeMap.delete(item);
20014
- } else {
20015
- sizes[index] = height;
20016
- }
20017
- });
20018
- });
20019
- useRender(() => vue.createVNode("div", {
20020
- "ref": rootEl,
20021
- "class": "v-virtual-scroll",
20022
- "onScroll": handleScroll,
20023
- "style": dimensionStyles.value
20024
- }, [vue.createVNode("div", {
20025
- "class": "v-virtual-scroll__container",
20026
- "style": {
20027
- paddingTop: convertToUnit(paddingTop.value),
20028
- paddingBottom: convertToUnit(paddingBottom.value)
20029
- }
20030
- }, [computedItems.value.map((item, index) => vue.createVNode(VVirtualScrollItem, {
20031
- "key": index,
20032
- "dynamicHeight": !props.itemHeight,
20033
- "onUpdate:height": height => handleItemResize(index + first.value, height)
20034
- }, {
20035
- default: () => [slots.default?.({
20036
- item,
20037
- index: index + first.value
20038
- })]
20039
- }))])]));
20040
- return {
20041
- scrollToIndex
20042
- };
20043
- }
20044
- });
20045
-
20046
20088
  var components = /*#__PURE__*/Object.freeze({
20047
20089
  __proto__: null,
20048
20090
  VAlert: VAlert,
@@ -20395,7 +20437,7 @@
20395
20437
  locale
20396
20438
  };
20397
20439
  }
20398
- const version$1 = "3.2.0-dev-20230405.0";
20440
+ const version$1 = "3.2.0-dev-20230415.0";
20399
20441
  createVuetify$1.version = version$1;
20400
20442
 
20401
20443
  // Vue's inject() can only be used in setup
@@ -20407,7 +20449,7 @@
20407
20449
  }
20408
20450
  }
20409
20451
 
20410
- const version = "3.2.0-dev-20230405.0";
20452
+ const version = "3.2.0-dev-20230415.0";
20411
20453
 
20412
20454
  const createVuetify = function () {
20413
20455
  let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};