vuetify 3.1.14 → 3.1.16
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/json/attributes.json +193 -141
- package/dist/json/importMap.json +8 -8
- package/dist/json/tags.json +13 -0
- package/dist/json/web-types.json +513 -282
- package/dist/vuetify-labs.css +465 -457
- package/dist/vuetify-labs.d.ts +521 -163
- package/dist/vuetify-labs.esm.js +272 -179
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +272 -179
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +17 -9
- package/dist/vuetify.d.ts +470 -145
- package/dist/vuetify.esm.js +178 -106
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +178 -106
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +638 -624
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.css +9 -0
- package/lib/components/VAutocomplete/VAutocomplete.mjs +50 -6
- package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.sass +10 -0
- package/lib/components/VAutocomplete/index.d.ts +29 -17
- package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs +31 -16
- package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs.map +1 -1
- package/lib/components/VBreadcrumbs/index.d.ts +3 -3
- package/lib/components/VCard/VCard.mjs.map +1 -1
- package/lib/components/VCard/index.d.ts +21 -16
- package/lib/components/VCheckbox/VCheckbox.mjs +2 -2
- package/lib/components/VCheckbox/VCheckbox.mjs.map +1 -1
- package/lib/components/VCheckbox/index.d.ts +22 -1
- package/lib/components/VCombobox/VCombobox.css +1 -1
- package/lib/components/VCombobox/VCombobox.mjs +6 -4
- package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
- package/lib/components/VCombobox/VCombobox.sass +1 -1
- package/lib/components/VCombobox/index.d.ts +29 -17
- package/lib/components/VDialog/VDialog.mjs +2 -2
- package/lib/components/VDialog/VDialog.mjs.map +1 -1
- package/lib/components/VField/VField.css +0 -1
- package/lib/components/VField/VField.sass +0 -1
- package/lib/components/VField/index.d.ts +6 -0
- package/lib/components/VFileInput/VFileInput.mjs +13 -17
- package/lib/components/VFileInput/VFileInput.mjs.map +1 -1
- package/lib/components/VFileInput/index.d.ts +68 -23
- package/lib/components/VInput/VInput.mjs +14 -7
- package/lib/components/VInput/VInput.mjs.map +1 -1
- package/lib/components/VInput/index.d.ts +22 -1
- package/lib/components/VList/VList.mjs +3 -22
- package/lib/components/VList/VList.mjs.map +1 -1
- package/lib/components/VOverlay/locationStrategies.mjs +9 -4
- package/lib/components/VOverlay/locationStrategies.mjs.map +1 -1
- package/lib/components/VRadioGroup/VRadioGroup.mjs +2 -2
- package/lib/components/VRadioGroup/VRadioGroup.mjs.map +1 -1
- package/lib/components/VRadioGroup/index.d.ts +22 -1
- package/lib/components/VRangeSlider/VRangeSlider.mjs +2 -2
- package/lib/components/VRangeSlider/VRangeSlider.mjs.map +1 -1
- package/lib/components/VRangeSlider/index.d.ts +22 -1
- package/lib/components/VSelect/VSelect.mjs +6 -0
- package/lib/components/VSelect/VSelect.mjs.map +1 -1
- package/lib/components/VSelect/index.d.ts +32 -17
- package/lib/components/VSlideGroup/VSlideGroup.mjs +2 -2
- package/lib/components/VSlideGroup/VSlideGroup.mjs.map +1 -1
- package/lib/components/VSlider/VSlider.mjs +2 -2
- package/lib/components/VSlider/VSlider.mjs.map +1 -1
- package/lib/components/VSlider/index.d.ts +22 -1
- package/lib/components/VSwitch/VSwitch.mjs +5 -3
- package/lib/components/VSwitch/VSwitch.mjs.map +1 -1
- package/lib/components/VSwitch/index.d.ts +43 -1
- package/lib/components/VTextField/VTextField.mjs +4 -12
- package/lib/components/VTextField/VTextField.mjs.map +1 -1
- package/lib/components/VTextField/index.d.ts +70 -22
- package/lib/components/VTextarea/VTextarea.mjs +4 -12
- package/lib/components/VTextarea/VTextarea.mjs.map +1 -1
- package/lib/components/VTextarea/index.d.ts +61 -22
- package/lib/components/VTreeview/_mixins.sass +0 -0
- package/lib/components/VTreeview/util/filterTreeItems.mjs +0 -0
- package/lib/components/VValidation/index.d.ts +10 -1
- package/lib/components/index.d.ts +468 -143
- package/lib/composables/focus.mjs +3 -2
- package/lib/composables/focus.mjs.map +1 -1
- package/lib/composables/items.mjs +7 -2
- package/lib/composables/items.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/framework.mjs +1 -1
- package/lib/iconsets/mdi-svg.mjs +2 -2
- package/lib/iconsets/mdi-svg.mjs.map +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/labs/VDataTable/VDataTable.mjs +3 -3
- package/lib/labs/VDataTable/VDataTable.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableFooter.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableHeaders.mjs +34 -20
- package/lib/labs/VDataTable/VDataTableHeaders.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableRow.mjs +2 -4
- package/lib/labs/VDataTable/VDataTableRow.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableRows.mjs +52 -44
- package/lib/labs/VDataTable/VDataTableRows.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableServer.mjs +3 -2
- package/lib/labs/VDataTable/VDataTableServer.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableVirtual.mjs +0 -1
- package/lib/labs/VDataTable/VDataTableVirtual.mjs.map +1 -1
- package/lib/labs/VDataTable/composables/options.mjs +2 -1
- package/lib/labs/VDataTable/composables/options.mjs.map +1 -1
- package/lib/labs/VDataTable/index.d.ts +44 -11
- package/lib/labs/VSkeletonLoader/VSkeletonLoader.mjs +1 -0
- package/lib/labs/VSkeletonLoader/VSkeletonLoader.mjs.map +1 -1
- package/lib/labs/VSkeletonLoader/index.d.ts +9 -9
- package/lib/labs/components.d.ts +53 -20
- package/lib/locale/el.mjs +0 -0
- package/lib/locale/index.mjs +0 -0
- package/lib/util/helpers.mjs +26 -0
- package/lib/util/helpers.mjs.map +1 -1
- package/package.json +3 -3
package/dist/vuetify-labs.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Vuetify v3.1.
|
|
2
|
+
* Vuetify v3.1.16
|
|
3
3
|
* Forged by John Leider
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -356,6 +356,32 @@ function callEvent(handler) {
|
|
|
356
356
|
handler(...args);
|
|
357
357
|
}
|
|
358
358
|
}
|
|
359
|
+
function focusableChildren(el) {
|
|
360
|
+
const targets = ['button', '[href]', 'input:not([type="hidden"])', 'select', 'textarea', '[tabindex]'].map(s => `${s}:not([tabindex="-1"]):not([disabled])`).join(', ');
|
|
361
|
+
return [...el.querySelectorAll(targets)];
|
|
362
|
+
}
|
|
363
|
+
function focusChild(el, location) {
|
|
364
|
+
const focusable = focusableChildren(el);
|
|
365
|
+
const idx = focusable.indexOf(document.activeElement);
|
|
366
|
+
if (!location) {
|
|
367
|
+
if (!el.contains(document.activeElement)) {
|
|
368
|
+
focusable[0]?.focus();
|
|
369
|
+
}
|
|
370
|
+
} else if (location === 'first') {
|
|
371
|
+
focusable[0]?.focus();
|
|
372
|
+
} else if (location === 'last') {
|
|
373
|
+
focusable.at(-1)?.focus();
|
|
374
|
+
} else {
|
|
375
|
+
let _el;
|
|
376
|
+
let idxx = idx;
|
|
377
|
+
const inc = location === 'next' ? 1 : -1;
|
|
378
|
+
do {
|
|
379
|
+
idxx += inc;
|
|
380
|
+
_el = focusable[idxx];
|
|
381
|
+
} while ((!_el || _el.offsetParent == null) && idxx < focusable.length && idxx >= 0);
|
|
382
|
+
if (_el) _el.focus();else focusChild(el, location === 'next' ? 'first' : 'last');
|
|
383
|
+
}
|
|
384
|
+
}
|
|
359
385
|
|
|
360
386
|
const block = ['top', 'bottom'];
|
|
361
387
|
const inline = ['start', 'end', 'left', 'right'];
|
|
@@ -5293,7 +5319,8 @@ const VFieldLabel = genericComponent()({
|
|
|
5293
5319
|
|
|
5294
5320
|
// Composables
|
|
5295
5321
|
const makeFocusProps = propsFactory({
|
|
5296
|
-
focused: Boolean
|
|
5322
|
+
focused: Boolean,
|
|
5323
|
+
'onUpdate:focused': EventProp()
|
|
5297
5324
|
}, 'focus');
|
|
5298
5325
|
function useFocus(props) {
|
|
5299
5326
|
let name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getCurrentInstanceName();
|
|
@@ -5882,6 +5909,8 @@ const makeVInputProps = propsFactory({
|
|
|
5882
5909
|
appendIcon: IconValue,
|
|
5883
5910
|
prependIcon: IconValue,
|
|
5884
5911
|
hideDetails: [Boolean, String],
|
|
5912
|
+
hint: String,
|
|
5913
|
+
persistentHint: Boolean,
|
|
5885
5914
|
messages: {
|
|
5886
5915
|
type: [Array, String],
|
|
5887
5916
|
default: () => []
|
|
@@ -5945,10 +5974,19 @@ const VInput = genericComponent()({
|
|
|
5945
5974
|
resetValidation,
|
|
5946
5975
|
validate
|
|
5947
5976
|
}));
|
|
5977
|
+
const messages = computed(() => {
|
|
5978
|
+
if (errorMessages.value.length > 0) {
|
|
5979
|
+
return errorMessages.value;
|
|
5980
|
+
} else if (props.hint && (props.persistentHint || props.focused)) {
|
|
5981
|
+
return props.hint;
|
|
5982
|
+
} else {
|
|
5983
|
+
return props.messages;
|
|
5984
|
+
}
|
|
5985
|
+
});
|
|
5948
5986
|
useRender(() => {
|
|
5949
5987
|
const hasPrepend = !!(slots.prepend || props.prependIcon);
|
|
5950
5988
|
const hasAppend = !!(slots.append || props.appendIcon);
|
|
5951
|
-
const hasMessages =
|
|
5989
|
+
const hasMessages = messages.value.length > 0;
|
|
5952
5990
|
const hasDetails = !props.hideDetails || props.hideDetails === 'auto' && (hasMessages || !!slots.details);
|
|
5953
5991
|
return createVNode("div", {
|
|
5954
5992
|
"class": ['v-input', `v-input--${props.direction}`, densityClasses.value, validationClasses.value]
|
|
@@ -5971,7 +6009,7 @@ const VInput = genericComponent()({
|
|
|
5971
6009
|
}, [createVNode(VMessages, {
|
|
5972
6010
|
"id": messagesId.value,
|
|
5973
6011
|
"active": hasMessages,
|
|
5974
|
-
"messages":
|
|
6012
|
+
"messages": messages.value
|
|
5975
6013
|
}, {
|
|
5976
6014
|
message: slots.message
|
|
5977
6015
|
}), slots.details?.(slotProps.value)])]);
|
|
@@ -5983,10 +6021,6 @@ const VInput = genericComponent()({
|
|
|
5983
6021
|
};
|
|
5984
6022
|
}
|
|
5985
6023
|
});
|
|
5986
|
-
function filterInputProps(props) {
|
|
5987
|
-
const keys = Object.keys(VInput.props).filter(k => !isOn(k));
|
|
5988
|
-
return pick(props, keys);
|
|
5989
|
-
}
|
|
5990
6024
|
|
|
5991
6025
|
const VCounter = genericComponent()({
|
|
5992
6026
|
name: 'VCounter',
|
|
@@ -6112,8 +6146,6 @@ const makeVTextFieldProps = propsFactory({
|
|
|
6112
6146
|
autofocus: Boolean,
|
|
6113
6147
|
counter: [Boolean, Number, String],
|
|
6114
6148
|
counterValue: Function,
|
|
6115
|
-
hint: String,
|
|
6116
|
-
persistentHint: Boolean,
|
|
6117
6149
|
prefix: String,
|
|
6118
6150
|
placeholder: String,
|
|
6119
6151
|
persistentPlaceholder: Boolean,
|
|
@@ -6168,9 +6200,6 @@ const VTextField = genericComponent()({
|
|
|
6168
6200
|
const vFieldRef = ref();
|
|
6169
6201
|
const inputRef = ref();
|
|
6170
6202
|
const isActive = computed(() => activeTypes.includes(props.type) || props.persistentPlaceholder || isFocused.value);
|
|
6171
|
-
const messages = computed(() => {
|
|
6172
|
-
return props.messages.length ? props.messages : isFocused.value || props.persistentHint ? props.hint : '';
|
|
6173
|
-
});
|
|
6174
6203
|
function onFocus() {
|
|
6175
6204
|
if (inputRef.value !== document.activeElement) {
|
|
6176
6205
|
inputRef.value?.focus();
|
|
@@ -6213,7 +6242,7 @@ const VTextField = genericComponent()({
|
|
|
6213
6242
|
const [{
|
|
6214
6243
|
modelValue: _,
|
|
6215
6244
|
...inputProps
|
|
6216
|
-
}] =
|
|
6245
|
+
}] = VInput.filterProps(props);
|
|
6217
6246
|
const [fieldProps] = filterFieldProps(props);
|
|
6218
6247
|
return createVNode(VInput, mergeProps({
|
|
6219
6248
|
"ref": vInputRef,
|
|
@@ -6223,12 +6252,9 @@ const VTextField = genericComponent()({
|
|
|
6223
6252
|
'v-text-field--prefixed': props.prefix,
|
|
6224
6253
|
'v-text-field--suffixed': props.suffix,
|
|
6225
6254
|
'v-text-field--flush-details': ['plain', 'underlined'].includes(props.variant)
|
|
6226
|
-
}]
|
|
6227
|
-
"onClick:prepend": props['onClick:prepend'],
|
|
6228
|
-
"onClick:append": props['onClick:append']
|
|
6255
|
+
}]
|
|
6229
6256
|
}, rootAttrs, inputProps, {
|
|
6230
|
-
"focused": isFocused.value
|
|
6231
|
-
"messages": messages.value
|
|
6257
|
+
"focused": isFocused.value
|
|
6232
6258
|
}), {
|
|
6233
6259
|
...slots,
|
|
6234
6260
|
default: _ref2 => {
|
|
@@ -6637,7 +6663,7 @@ const VCheckbox = genericComponent()({
|
|
|
6637
6663
|
const id = computed(() => props.id || `checkbox-${uid}`);
|
|
6638
6664
|
useRender(() => {
|
|
6639
6665
|
const [inputAttrs, controlAttrs] = filterInputAttrs(attrs);
|
|
6640
|
-
const [inputProps, _1] =
|
|
6666
|
+
const [inputProps, _1] = VInput.filterProps(props);
|
|
6641
6667
|
const [checkboxProps, _2] = VCheckboxBtn.filterProps(props);
|
|
6642
6668
|
return createVNode(VInput, mergeProps({
|
|
6643
6669
|
"class": "v-checkbox"
|
|
@@ -8049,7 +8075,12 @@ function transformItems$1(props, items) {
|
|
|
8049
8075
|
function useItems(props) {
|
|
8050
8076
|
const items = computed(() => transformItems$1(props, props.items));
|
|
8051
8077
|
function transformIn(value) {
|
|
8052
|
-
return value.map(
|
|
8078
|
+
return value.map(v => {
|
|
8079
|
+
const existingItem = items.value.find(item => deepEqual(v, item.value));
|
|
8080
|
+
// Nullish existingItem means value is a custom input value from combobox
|
|
8081
|
+
// In this case, use transformItem to create an InternalItem based on value
|
|
8082
|
+
return existingItem ?? transformItem$1(props, v);
|
|
8083
|
+
});
|
|
8053
8084
|
}
|
|
8054
8085
|
function transformOut(value) {
|
|
8055
8086
|
return value.map(_ref => {
|
|
@@ -8222,27 +8253,8 @@ const VList = genericComponent()({
|
|
|
8222
8253
|
e.preventDefault();
|
|
8223
8254
|
}
|
|
8224
8255
|
function focus(location) {
|
|
8225
|
-
if (
|
|
8226
|
-
|
|
8227
|
-
const focusable = [...contentRef.value.querySelectorAll(targets)].filter(el => !el.hasAttribute('disabled'));
|
|
8228
|
-
const idx = focusable.indexOf(document.activeElement);
|
|
8229
|
-
if (!location) {
|
|
8230
|
-
if (!contentRef.value.contains(document.activeElement)) {
|
|
8231
|
-
focusable[0]?.focus();
|
|
8232
|
-
}
|
|
8233
|
-
} else if (location === 'first') {
|
|
8234
|
-
focusable[0]?.focus();
|
|
8235
|
-
} else if (location === 'last') {
|
|
8236
|
-
focusable.at(-1)?.focus();
|
|
8237
|
-
} else {
|
|
8238
|
-
let el;
|
|
8239
|
-
let idxx = idx;
|
|
8240
|
-
const inc = location === 'next' ? 1 : -1;
|
|
8241
|
-
do {
|
|
8242
|
-
idxx += inc;
|
|
8243
|
-
el = focusable[idxx];
|
|
8244
|
-
} while ((!el || el.offsetParent == null) && idxx < focusable.length && idxx >= 0);
|
|
8245
|
-
if (el) el.focus();else focus(location === 'next' ? 'first' : 'last');
|
|
8256
|
+
if (contentRef.value) {
|
|
8257
|
+
return focusChild(contentRef.value, location);
|
|
8246
8258
|
}
|
|
8247
8259
|
}
|
|
8248
8260
|
useRender(() => {
|
|
@@ -8727,7 +8739,7 @@ function staticLocationStrategy() {
|
|
|
8727
8739
|
}
|
|
8728
8740
|
|
|
8729
8741
|
/** Get size of element ignoring max-width/max-height */
|
|
8730
|
-
function getIntrinsicSize(el) {
|
|
8742
|
+
function getIntrinsicSize(el, isRtl) {
|
|
8731
8743
|
// const scrollables = new Map<Element, [number, number]>()
|
|
8732
8744
|
// el.querySelectorAll('*').forEach(el => {
|
|
8733
8745
|
// const x = el.scrollLeft
|
|
@@ -8744,7 +8756,11 @@ function getIntrinsicSize(el) {
|
|
|
8744
8756
|
|
|
8745
8757
|
/* eslint-disable-next-line sonarjs/prefer-immediate-return */
|
|
8746
8758
|
const contentBox = nullifyTransforms(el);
|
|
8747
|
-
|
|
8759
|
+
if (isRtl) {
|
|
8760
|
+
contentBox.x += parseFloat(el.style.right || 0);
|
|
8761
|
+
} else {
|
|
8762
|
+
contentBox.x -= parseFloat(el.style.left || 0);
|
|
8763
|
+
}
|
|
8748
8764
|
contentBox.y -= parseFloat(el.style.top || 0);
|
|
8749
8765
|
|
|
8750
8766
|
// el.style.maxWidth = initialMaxWidth
|
|
@@ -8825,7 +8841,7 @@ function connectedLocationStrategy(data, props, contentStyles) {
|
|
|
8825
8841
|
});
|
|
8826
8842
|
if (!data.activatorEl.value || !data.contentEl.value) return;
|
|
8827
8843
|
const targetBox = data.activatorEl.value.getBoundingClientRect();
|
|
8828
|
-
const contentBox = getIntrinsicSize(data.contentEl.value);
|
|
8844
|
+
const contentBox = getIntrinsicSize(data.contentEl.value, data.isRtl.value);
|
|
8829
8845
|
const scrollParents = getScrollParents(data.contentEl.value);
|
|
8830
8846
|
const viewportMargin = 12;
|
|
8831
8847
|
if (!scrollParents.length) {
|
|
@@ -9001,7 +9017,8 @@ function connectedLocationStrategy(data, props, contentStyles) {
|
|
|
9001
9017
|
transformOrigin: `${placement.origin.side} ${placement.origin.align}`,
|
|
9002
9018
|
// transform: `translate(${pixelRound(x)}px, ${pixelRound(y)}px)`,
|
|
9003
9019
|
top: convertToUnit(pixelRound(y)),
|
|
9004
|
-
left: convertToUnit(pixelRound(x)),
|
|
9020
|
+
left: data.isRtl.value ? undefined : convertToUnit(pixelRound(x)),
|
|
9021
|
+
right: data.isRtl.value ? convertToUnit(pixelRound(-x)) : undefined,
|
|
9005
9022
|
minWidth: convertToUnit(axis === 'y' ? Math.min(minWidth.value, targetBox.width) : minWidth.value),
|
|
9006
9023
|
maxWidth: convertToUnit(pixelCeil(clamp(available.x, minWidth.value === Infinity ? 0 : minWidth.value, maxWidth.value))),
|
|
9007
9024
|
maxHeight: convertToUnit(pixelCeil(clamp(available.y, minHeight.value === Infinity ? 0 : minHeight.value, maxHeight.value)))
|
|
@@ -9896,6 +9913,7 @@ const VSelect = genericComponent()({
|
|
|
9896
9913
|
})
|
|
9897
9914
|
},
|
|
9898
9915
|
emits: {
|
|
9916
|
+
'update:focused': focused => true,
|
|
9899
9917
|
'update:modelValue': val => true,
|
|
9900
9918
|
'update:menu': val => true
|
|
9901
9919
|
},
|
|
@@ -10012,6 +10030,9 @@ const VSelect = genericComponent()({
|
|
|
10012
10030
|
menu.value = false;
|
|
10013
10031
|
}
|
|
10014
10032
|
}
|
|
10033
|
+
function onFocusin(e) {
|
|
10034
|
+
isFocused.value = true;
|
|
10035
|
+
}
|
|
10015
10036
|
function onFocusout(e) {
|
|
10016
10037
|
if (e.relatedTarget == null) {
|
|
10017
10038
|
vTextFieldRef.value?.focus();
|
|
@@ -10066,6 +10087,7 @@ const VSelect = genericComponent()({
|
|
|
10066
10087
|
"selected": selected.value,
|
|
10067
10088
|
"selectStrategy": props.multiple ? 'independent' : 'single-independent',
|
|
10068
10089
|
"onMousedown": e => e.preventDefault(),
|
|
10090
|
+
"onFocusin": onFocusin,
|
|
10069
10091
|
"onFocusout": onFocusout
|
|
10070
10092
|
}, {
|
|
10071
10093
|
default: () => [!displayItems.value.length && !props.hideNoData && (slots['no-data']?.() ?? createVNode(VListItem, {
|
|
@@ -10144,6 +10166,7 @@ const VSelect = genericComponent()({
|
|
|
10144
10166
|
});
|
|
10145
10167
|
});
|
|
10146
10168
|
return forwardRefs({
|
|
10169
|
+
isFocused,
|
|
10147
10170
|
menu,
|
|
10148
10171
|
select
|
|
10149
10172
|
}, vTextFieldRef);
|
|
@@ -10282,6 +10305,7 @@ const VAutocomplete = genericComponent()({
|
|
|
10282
10305
|
})
|
|
10283
10306
|
},
|
|
10284
10307
|
emits: {
|
|
10308
|
+
'update:focused': focused => true,
|
|
10285
10309
|
'update:search': val => true,
|
|
10286
10310
|
'update:modelValue': val => true,
|
|
10287
10311
|
'update:menu': val => true
|
|
@@ -10305,11 +10329,17 @@ const VAutocomplete = genericComponent()({
|
|
|
10305
10329
|
_menu.value = v;
|
|
10306
10330
|
}
|
|
10307
10331
|
});
|
|
10332
|
+
const selectionIndex = ref(-1);
|
|
10333
|
+
const color = computed(() => vTextFieldRef.value?.color);
|
|
10308
10334
|
const {
|
|
10309
10335
|
items,
|
|
10310
10336
|
transformIn,
|
|
10311
10337
|
transformOut
|
|
10312
10338
|
} = useItems(props);
|
|
10339
|
+
const {
|
|
10340
|
+
textColorClasses,
|
|
10341
|
+
textColorStyles
|
|
10342
|
+
} = useTextColor(color);
|
|
10313
10343
|
const search = useProxiedModel(props, 'search', '');
|
|
10314
10344
|
const model = useProxiedModel(props, 'modelValue', [], v => transformIn(wrapInArray(v)), v => {
|
|
10315
10345
|
const transformed = transformOut(v);
|
|
@@ -10332,6 +10362,7 @@ const VAutocomplete = genericComponent()({
|
|
|
10332
10362
|
return filteredItems.value;
|
|
10333
10363
|
});
|
|
10334
10364
|
const selected = computed(() => selections.value.map(selection => selection.props.value));
|
|
10365
|
+
const selection = computed(() => selections.value[selectionIndex.value]);
|
|
10335
10366
|
const listRef = ref();
|
|
10336
10367
|
function onClear(e) {
|
|
10337
10368
|
if (props.openOnClear) {
|
|
@@ -10345,7 +10376,9 @@ const VAutocomplete = genericComponent()({
|
|
|
10345
10376
|
}
|
|
10346
10377
|
function onKeydown(e) {
|
|
10347
10378
|
if (props.readonly || form?.isReadonly.value) return;
|
|
10348
|
-
|
|
10379
|
+
const selectionStart = vTextFieldRef.value.selectionStart;
|
|
10380
|
+
const length = selected.value.length;
|
|
10381
|
+
if (selectionIndex.value > -1 || ['Enter', 'ArrowDown', 'ArrowUp'].includes(e.key)) {
|
|
10349
10382
|
e.preventDefault();
|
|
10350
10383
|
}
|
|
10351
10384
|
if (['Enter', 'ArrowDown'].includes(e.key)) {
|
|
@@ -10362,6 +10395,38 @@ const VAutocomplete = genericComponent()({
|
|
|
10362
10395
|
} else if (e.key === 'ArrowUp') {
|
|
10363
10396
|
listRef.value?.focus('prev');
|
|
10364
10397
|
}
|
|
10398
|
+
if (!props.multiple) return;
|
|
10399
|
+
if (['Backspace', 'Delete'].includes(e.key)) {
|
|
10400
|
+
if (selectionIndex.value < 0) {
|
|
10401
|
+
if (e.key === 'Backspace' && !search.value) {
|
|
10402
|
+
selectionIndex.value = length - 1;
|
|
10403
|
+
}
|
|
10404
|
+
return;
|
|
10405
|
+
}
|
|
10406
|
+
const originalSelectionIndex = selectionIndex.value;
|
|
10407
|
+
if (selection.value) select(selection.value);
|
|
10408
|
+
selectionIndex.value = originalSelectionIndex >= length - 1 ? length - 2 : originalSelectionIndex;
|
|
10409
|
+
}
|
|
10410
|
+
if (e.key === 'ArrowLeft') {
|
|
10411
|
+
if (selectionIndex.value < 0 && selectionStart > 0) return;
|
|
10412
|
+
const prev = selectionIndex.value > -1 ? selectionIndex.value - 1 : length - 1;
|
|
10413
|
+
if (selections.value[prev]) {
|
|
10414
|
+
selectionIndex.value = prev;
|
|
10415
|
+
} else {
|
|
10416
|
+
selectionIndex.value = -1;
|
|
10417
|
+
vTextFieldRef.value.setSelectionRange(search.value?.length, search.value?.length);
|
|
10418
|
+
}
|
|
10419
|
+
}
|
|
10420
|
+
if (e.key === 'ArrowRight') {
|
|
10421
|
+
if (selectionIndex.value < 0) return;
|
|
10422
|
+
const next = selectionIndex.value + 1;
|
|
10423
|
+
if (selections.value[next]) {
|
|
10424
|
+
selectionIndex.value = next;
|
|
10425
|
+
} else {
|
|
10426
|
+
selectionIndex.value = -1;
|
|
10427
|
+
vTextFieldRef.value.setSelectionRange(0, 0);
|
|
10428
|
+
}
|
|
10429
|
+
}
|
|
10365
10430
|
}
|
|
10366
10431
|
function onInput(e) {
|
|
10367
10432
|
search.value = e.target.value;
|
|
@@ -10383,7 +10448,6 @@ const VAutocomplete = genericComponent()({
|
|
|
10383
10448
|
const index = selected.value.findIndex(selection => props.valueComparator(selection, item.value));
|
|
10384
10449
|
if (index === -1) {
|
|
10385
10450
|
model.value = [...model.value, item];
|
|
10386
|
-
search.value = '';
|
|
10387
10451
|
} else {
|
|
10388
10452
|
const value = [...model.value];
|
|
10389
10453
|
value.splice(index, 1);
|
|
@@ -10428,12 +10492,15 @@ const VAutocomplete = genericComponent()({
|
|
|
10428
10492
|
"onUpdate:modelValue": v => {
|
|
10429
10493
|
if (v == null) model.value = [];
|
|
10430
10494
|
},
|
|
10495
|
+
"focused": isFocused.value,
|
|
10496
|
+
"onUpdate:focused": $event => isFocused.value = $event,
|
|
10431
10497
|
"validationValue": model.externalValue,
|
|
10432
10498
|
"dirty": isDirty,
|
|
10433
10499
|
"onInput": onInput,
|
|
10434
10500
|
"class": ['v-autocomplete', {
|
|
10435
10501
|
'v-autocomplete--active-menu': menu.value,
|
|
10436
10502
|
'v-autocomplete--chips': !!props.chips,
|
|
10503
|
+
'v-autocomplete--selecting-index': selectionIndex.value > -1,
|
|
10437
10504
|
[`v-autocomplete--${props.multiple ? 'multiple' : 'single'}`]: true,
|
|
10438
10505
|
'v-autocomplete--selection-slot': !!slots.selection
|
|
10439
10506
|
}],
|
|
@@ -10442,8 +10509,6 @@ const VAutocomplete = genericComponent()({
|
|
|
10442
10509
|
"placeholder": isDirty ? undefined : props.placeholder,
|
|
10443
10510
|
"onClick:clear": onClear,
|
|
10444
10511
|
"onMousedown:control": onMousedownControl,
|
|
10445
|
-
"onFocus": () => isFocused.value = true,
|
|
10446
|
-
"onBlur": () => isFocused.value = false,
|
|
10447
10512
|
"onKeydown": onKeydown
|
|
10448
10513
|
}), {
|
|
10449
10514
|
...slots,
|
|
@@ -10508,7 +10573,8 @@ const VAutocomplete = genericComponent()({
|
|
|
10508
10573
|
};
|
|
10509
10574
|
return createVNode("div", {
|
|
10510
10575
|
"key": item.value,
|
|
10511
|
-
"class":
|
|
10576
|
+
"class": ['v-autocomplete__selection', index === selectionIndex.value && ['v-autocomplete__selection--selected', textColorClasses.value]],
|
|
10577
|
+
"style": index === selectionIndex.value ? textColorStyles.value : {}
|
|
10512
10578
|
}, [hasChips ? !slots.chip ? createVNode(VChip, mergeProps({
|
|
10513
10579
|
"key": "chip",
|
|
10514
10580
|
"closable": props.closableChips,
|
|
@@ -10999,6 +11065,17 @@ const VBreadcrumbs = genericComponent()({
|
|
|
10999
11065
|
disabled: toRef(props, 'disabled')
|
|
11000
11066
|
}
|
|
11001
11067
|
});
|
|
11068
|
+
const items = computed(() => props.items.map(item => {
|
|
11069
|
+
return typeof item === 'string' ? {
|
|
11070
|
+
item: {
|
|
11071
|
+
title: item
|
|
11072
|
+
},
|
|
11073
|
+
raw: item
|
|
11074
|
+
} : {
|
|
11075
|
+
item,
|
|
11076
|
+
raw: item
|
|
11077
|
+
};
|
|
11078
|
+
}));
|
|
11002
11079
|
useRender(() => {
|
|
11003
11080
|
const hasPrepend = !!(slots.prepend || props.icon);
|
|
11004
11081
|
return createVNode(props.tag, {
|
|
@@ -11021,22 +11098,26 @@ const VBreadcrumbs = genericComponent()({
|
|
|
11021
11098
|
start: true
|
|
11022
11099
|
}
|
|
11023
11100
|
}
|
|
11024
|
-
}, slots.prepend)]),
|
|
11025
|
-
|
|
11026
|
-
"disabled": index >= array.length - 1
|
|
11027
|
-
}, typeof item === 'string' ? {
|
|
11028
|
-
title: item
|
|
11029
|
-
} : item), {
|
|
11030
|
-
default: slots.title ? () => slots.title?.({
|
|
11031
|
-
item,
|
|
11032
|
-
index
|
|
11033
|
-
}) : undefined
|
|
11034
|
-
}), index < array.length - 1 && createVNode(VBreadcrumbsDivider, null, {
|
|
11035
|
-
default: slots.divider ? () => slots.divider?.({
|
|
11101
|
+
}, slots.prepend)]), items.value.map((_ref2, index, array) => {
|
|
11102
|
+
let {
|
|
11036
11103
|
item,
|
|
11037
|
-
|
|
11038
|
-
}
|
|
11039
|
-
|
|
11104
|
+
raw
|
|
11105
|
+
} = _ref2;
|
|
11106
|
+
return createVNode(Fragment, null, [createVNode(VBreadcrumbsItem, mergeProps({
|
|
11107
|
+
"key": item.title,
|
|
11108
|
+
"disabled": index >= array.length - 1
|
|
11109
|
+
}, item), {
|
|
11110
|
+
default: slots.title ? () => slots.title?.({
|
|
11111
|
+
item: raw,
|
|
11112
|
+
index
|
|
11113
|
+
}) : undefined
|
|
11114
|
+
}), index < array.length - 1 && createVNode(VBreadcrumbsDivider, null, {
|
|
11115
|
+
default: slots.divider ? () => slots.divider?.({
|
|
11116
|
+
item: raw,
|
|
11117
|
+
index
|
|
11118
|
+
}) : undefined
|
|
11119
|
+
})]);
|
|
11120
|
+
}), slots.default?.()]
|
|
11040
11121
|
});
|
|
11041
11122
|
});
|
|
11042
11123
|
return {};
|
|
@@ -12903,7 +12984,7 @@ const VSlider = genericComponent()({
|
|
|
12903
12984
|
} = useFocus(props);
|
|
12904
12985
|
const trackStop = computed(() => position(model.value));
|
|
12905
12986
|
useRender(() => {
|
|
12906
|
-
const [inputProps, _] =
|
|
12987
|
+
const [inputProps, _] = VInput.filterProps(props);
|
|
12907
12988
|
const hasPrepend = !!(props.label || slots.label || slots.prepend);
|
|
12908
12989
|
return createVNode(VInput, mergeProps({
|
|
12909
12990
|
"class": ['v-slider', {
|
|
@@ -13567,6 +13648,7 @@ const VCombobox = genericComponent()({
|
|
|
13567
13648
|
})
|
|
13568
13649
|
},
|
|
13569
13650
|
emits: {
|
|
13651
|
+
'update:focused': focused => true,
|
|
13570
13652
|
'update:modelValue': val => true,
|
|
13571
13653
|
'update:search': val => true,
|
|
13572
13654
|
'update:menu': val => true
|
|
@@ -13704,8 +13786,9 @@ const VCombobox = genericComponent()({
|
|
|
13704
13786
|
}
|
|
13705
13787
|
return;
|
|
13706
13788
|
}
|
|
13707
|
-
|
|
13708
|
-
|
|
13789
|
+
const originalSelectionIndex = selectionIndex.value;
|
|
13790
|
+
if (selection.value) select(selection.value);
|
|
13791
|
+
selectionIndex.value = originalSelectionIndex >= length - 1 ? length - 2 : originalSelectionIndex;
|
|
13709
13792
|
}
|
|
13710
13793
|
if (e.key === 'ArrowLeft') {
|
|
13711
13794
|
if (selectionIndex.value < 0 && selectionStart > 0) return;
|
|
@@ -13790,6 +13873,8 @@ const VCombobox = genericComponent()({
|
|
|
13790
13873
|
"onUpdate:modelValue": [$event => search.value = $event, v => {
|
|
13791
13874
|
if (v == null) model.value = [];
|
|
13792
13875
|
}],
|
|
13876
|
+
"focused": isFocused.value,
|
|
13877
|
+
"onUpdate:focused": $event => isFocused.value = $event,
|
|
13793
13878
|
"validationValue": model.externalValue,
|
|
13794
13879
|
"dirty": isDirty,
|
|
13795
13880
|
"class": ['v-combobox', {
|
|
@@ -13803,8 +13888,6 @@ const VCombobox = genericComponent()({
|
|
|
13803
13888
|
"placeholder": isDirty ? undefined : props.placeholder,
|
|
13804
13889
|
"onClick:clear": onClear,
|
|
13805
13890
|
"onMousedown:control": onMousedownControl,
|
|
13806
|
-
"onFocus": () => isFocused.value = true,
|
|
13807
|
-
"onBlur": () => isFocused.value = false,
|
|
13808
13891
|
"onKeydown": onKeydown
|
|
13809
13892
|
}), {
|
|
13810
13893
|
...slots,
|
|
@@ -13956,7 +14039,7 @@ const VDialog = genericComponent()({
|
|
|
13956
14039
|
![document, overlay.value.contentEl].includes(after) &&
|
|
13957
14040
|
// It isn't inside the dialog body
|
|
13958
14041
|
!overlay.value.contentEl.contains(after)) {
|
|
13959
|
-
const focusable =
|
|
14042
|
+
const focusable = focusableChildren(overlay.value.contentEl);
|
|
13960
14043
|
if (!focusable.length) return;
|
|
13961
14044
|
const firstElement = focusable[0];
|
|
13962
14045
|
const lastElement = focusable[focusable.length - 1];
|
|
@@ -14256,8 +14339,6 @@ const VFileInput = genericComponent()({
|
|
|
14256
14339
|
default: '$vuetify.fileInput.counter'
|
|
14257
14340
|
},
|
|
14258
14341
|
multiple: Boolean,
|
|
14259
|
-
hint: String,
|
|
14260
|
-
persistentHint: Boolean,
|
|
14261
14342
|
showSize: {
|
|
14262
14343
|
type: [Boolean, Number],
|
|
14263
14344
|
default: false,
|
|
@@ -14282,6 +14363,7 @@ const VFileInput = genericComponent()({
|
|
|
14282
14363
|
emits: {
|
|
14283
14364
|
'click:control': e => true,
|
|
14284
14365
|
'mousedown:control': e => true,
|
|
14366
|
+
'update:focused': focused => true,
|
|
14285
14367
|
'update:modelValue': files => true
|
|
14286
14368
|
},
|
|
14287
14369
|
setup(props, _ref) {
|
|
@@ -14294,6 +14376,11 @@ const VFileInput = genericComponent()({
|
|
|
14294
14376
|
t
|
|
14295
14377
|
} = useLocale();
|
|
14296
14378
|
const model = useProxiedModel(props, 'modelValue');
|
|
14379
|
+
const {
|
|
14380
|
+
isFocused,
|
|
14381
|
+
focus,
|
|
14382
|
+
blur
|
|
14383
|
+
} = useFocus(props);
|
|
14297
14384
|
const base = computed(() => typeof props.showSize !== 'boolean' ? props.showSize : undefined);
|
|
14298
14385
|
const totalBytes = computed(() => (model.value ?? []).reduce((bytes, _ref2) => {
|
|
14299
14386
|
let {
|
|
@@ -14315,21 +14402,14 @@ const VFileInput = genericComponent()({
|
|
|
14315
14402
|
});
|
|
14316
14403
|
const vInputRef = ref();
|
|
14317
14404
|
const vFieldRef = ref();
|
|
14318
|
-
const isFocused = ref(false);
|
|
14319
14405
|
const inputRef = ref();
|
|
14320
|
-
const messages = computed(() => {
|
|
14321
|
-
return props.messages.length ? props.messages : props.persistentHint ? props.hint : '';
|
|
14322
|
-
});
|
|
14323
14406
|
function onFocus() {
|
|
14324
14407
|
if (inputRef.value !== document.activeElement) {
|
|
14325
14408
|
inputRef.value?.focus();
|
|
14326
14409
|
}
|
|
14327
|
-
if (!isFocused.value)
|
|
14328
|
-
isFocused.value = true;
|
|
14329
|
-
}
|
|
14410
|
+
if (!isFocused.value) focus();
|
|
14330
14411
|
}
|
|
14331
14412
|
function onClickPrepend(e) {
|
|
14332
|
-
callEvent(props['onClick:prepend'], e);
|
|
14333
14413
|
onControlClick(e);
|
|
14334
14414
|
}
|
|
14335
14415
|
function onControlMousedown(e) {
|
|
@@ -14360,18 +14440,16 @@ const VFileInput = genericComponent()({
|
|
|
14360
14440
|
const [{
|
|
14361
14441
|
modelValue: _,
|
|
14362
14442
|
...inputProps
|
|
14363
|
-
}] =
|
|
14443
|
+
}] = VInput.filterProps(props);
|
|
14364
14444
|
const [fieldProps] = filterFieldProps(props);
|
|
14365
14445
|
return createVNode(VInput, mergeProps({
|
|
14366
14446
|
"ref": vInputRef,
|
|
14367
14447
|
"modelValue": model.value,
|
|
14368
14448
|
"onUpdate:modelValue": $event => model.value = $event,
|
|
14369
14449
|
"class": "v-file-input",
|
|
14370
|
-
"onClick:prepend": onClickPrepend
|
|
14371
|
-
"onClick:append": props['onClick:append']
|
|
14450
|
+
"onClick:prepend": onClickPrepend
|
|
14372
14451
|
}, rootAttrs, inputProps, {
|
|
14373
|
-
"focused": isFocused.value
|
|
14374
|
-
"messages": messages.value
|
|
14452
|
+
"focused": isFocused.value
|
|
14375
14453
|
}), {
|
|
14376
14454
|
...slots,
|
|
14377
14455
|
default: _ref3 => {
|
|
@@ -14423,7 +14501,7 @@ const VFileInput = genericComponent()({
|
|
|
14423
14501
|
model.value = [...(target.files ?? [])];
|
|
14424
14502
|
},
|
|
14425
14503
|
"onFocus": onFocus,
|
|
14426
|
-
"onBlur":
|
|
14504
|
+
"onBlur": blur
|
|
14427
14505
|
}, slotProps, inputAttrs), null), createVNode("div", {
|
|
14428
14506
|
"class": fieldClass
|
|
14429
14507
|
}, [!!model.value?.length && (slots.selection ? slots.selection({
|
|
@@ -16118,7 +16196,7 @@ const VRadioGroup = genericComponent()({
|
|
|
16118
16196
|
const model = useProxiedModel(props, 'modelValue');
|
|
16119
16197
|
useRender(() => {
|
|
16120
16198
|
const [inputAttrs, controlAttrs] = filterInputAttrs(attrs);
|
|
16121
|
-
const [inputProps, _1] =
|
|
16199
|
+
const [inputProps, _1] = VInput.filterProps(props);
|
|
16122
16200
|
const [controlProps, _2] = VSelectionControl.filterProps(props);
|
|
16123
16201
|
const label = slots.label ? slots.label({
|
|
16124
16202
|
label: props.label,
|
|
@@ -16246,7 +16324,7 @@ const VRangeSlider = genericComponent()({
|
|
|
16246
16324
|
const trackStart = computed(() => position(model.value[0]));
|
|
16247
16325
|
const trackStop = computed(() => position(model.value[1]));
|
|
16248
16326
|
useRender(() => {
|
|
16249
|
-
const [inputProps, _] =
|
|
16327
|
+
const [inputProps, _] = VInput.filterProps(props);
|
|
16250
16328
|
const hasPrepend = !!(props.label || slots.label || slots.prepend);
|
|
16251
16329
|
return createVNode(VInput, mergeProps({
|
|
16252
16330
|
"class": ['v-slider', 'v-range-slider', {
|
|
@@ -16806,7 +16884,7 @@ const VSlideGroup = genericComponent()({
|
|
|
16806
16884
|
function focus(location) {
|
|
16807
16885
|
if (!contentRef.value) return;
|
|
16808
16886
|
if (!location) {
|
|
16809
|
-
const focusable =
|
|
16887
|
+
const focusable = focusableChildren(contentRef.value);
|
|
16810
16888
|
focusable[0]?.focus();
|
|
16811
16889
|
} else if (location === 'next') {
|
|
16812
16890
|
const el = contentRef.value.querySelector(':focus')?.nextElementSibling;
|
|
@@ -17120,10 +17198,12 @@ const VSwitch = genericComponent()({
|
|
|
17120
17198
|
}
|
|
17121
17199
|
useRender(() => {
|
|
17122
17200
|
const [inputAttrs, controlAttrs] = filterInputAttrs(attrs);
|
|
17123
|
-
const [inputProps, _1] =
|
|
17201
|
+
const [inputProps, _1] = VInput.filterProps(props);
|
|
17124
17202
|
const [controlProps, _2] = VSelectionControl.filterProps(props);
|
|
17125
17203
|
const control = ref();
|
|
17126
|
-
function onClick() {
|
|
17204
|
+
function onClick(e) {
|
|
17205
|
+
e.stopPropagation();
|
|
17206
|
+
e.preventDefault();
|
|
17127
17207
|
control.value?.input?.click();
|
|
17128
17208
|
}
|
|
17129
17209
|
return createVNode(VInput, mergeProps({
|
|
@@ -17485,8 +17565,6 @@ const VTextarea = genericComponent()({
|
|
|
17485
17565
|
autofocus: Boolean,
|
|
17486
17566
|
counter: [Boolean, Number, String],
|
|
17487
17567
|
counterValue: Function,
|
|
17488
|
-
hint: String,
|
|
17489
|
-
persistentHint: Boolean,
|
|
17490
17568
|
prefix: String,
|
|
17491
17569
|
placeholder: String,
|
|
17492
17570
|
persistentPlaceholder: Boolean,
|
|
@@ -17541,9 +17619,6 @@ const VTextarea = genericComponent()({
|
|
|
17541
17619
|
const controlHeight = ref('');
|
|
17542
17620
|
const textareaRef = ref();
|
|
17543
17621
|
const isActive = computed(() => isFocused.value || props.persistentPlaceholder);
|
|
17544
|
-
const messages = computed(() => {
|
|
17545
|
-
return props.messages.length ? props.messages : isFocused.value || props.persistentHint ? props.hint : '';
|
|
17546
|
-
});
|
|
17547
17622
|
function onFocus() {
|
|
17548
17623
|
if (textareaRef.value !== document.activeElement) {
|
|
17549
17624
|
textareaRef.value?.focus();
|
|
@@ -17615,7 +17690,7 @@ const VTextarea = genericComponent()({
|
|
|
17615
17690
|
const [{
|
|
17616
17691
|
modelValue: _,
|
|
17617
17692
|
...inputProps
|
|
17618
|
-
}] =
|
|
17693
|
+
}] = VInput.filterProps(props);
|
|
17619
17694
|
const [fieldProps] = filterFieldProps(props);
|
|
17620
17695
|
return createVNode(VInput, mergeProps({
|
|
17621
17696
|
"ref": vInputRef,
|
|
@@ -17629,12 +17704,9 @@ const VTextarea = genericComponent()({
|
|
|
17629
17704
|
'v-textarea--auto-grow': props.autoGrow,
|
|
17630
17705
|
'v-textarea--no-resize': props.noResize || props.autoGrow,
|
|
17631
17706
|
'v-text-field--flush-details': ['plain', 'underlined'].includes(props.variant)
|
|
17632
|
-
}]
|
|
17633
|
-
"onClick:prepend": props['onClick:prepend'],
|
|
17634
|
-
"onClick:append": props['onClick:append']
|
|
17707
|
+
}]
|
|
17635
17708
|
}, rootAttrs, inputProps, {
|
|
17636
|
-
"focused": isFocused.value
|
|
17637
|
-
"messages": messages.value
|
|
17709
|
+
"focused": isFocused.value
|
|
17638
17710
|
}), {
|
|
17639
17711
|
...slots,
|
|
17640
17712
|
default: _ref2 => {
|
|
@@ -18488,6 +18560,17 @@ const VDataTableHeaders = genericComponent()({
|
|
|
18488
18560
|
backgroundColorClasses,
|
|
18489
18561
|
backgroundColorStyles
|
|
18490
18562
|
} = useBackgroundColor(props, 'color');
|
|
18563
|
+
const slotProps = computed(() => ({
|
|
18564
|
+
headers: headers.value,
|
|
18565
|
+
columns: columns.value,
|
|
18566
|
+
toggleSort,
|
|
18567
|
+
sortBy: sortBy.value,
|
|
18568
|
+
someSelected: someSelected.value,
|
|
18569
|
+
allSelected: allSelected.value,
|
|
18570
|
+
selectAll,
|
|
18571
|
+
getSortIcon,
|
|
18572
|
+
getFixedStyles
|
|
18573
|
+
}));
|
|
18491
18574
|
const VDataTableHeaderCell = _ref2 => {
|
|
18492
18575
|
let {
|
|
18493
18576
|
column,
|
|
@@ -18515,14 +18598,14 @@ const VDataTableHeaders = genericComponent()({
|
|
|
18515
18598
|
"noPadding": noPadding
|
|
18516
18599
|
}, {
|
|
18517
18600
|
default: () => {
|
|
18518
|
-
const
|
|
18519
|
-
const
|
|
18601
|
+
const columnSlotName = `column.${column.key}`;
|
|
18602
|
+
const columnSlotProps = {
|
|
18520
18603
|
column,
|
|
18521
18604
|
selectAll
|
|
18522
18605
|
};
|
|
18523
|
-
if (slots[
|
|
18606
|
+
if (slots[columnSlotName]) return slots[columnSlotName](columnSlotProps);
|
|
18524
18607
|
if (column.key === 'data-table-select') {
|
|
18525
|
-
return slots['column.data-table-select']?.(
|
|
18608
|
+
return slots['column.data-table-select']?.(columnSlotProps) ?? createVNode(VCheckboxBtn, {
|
|
18526
18609
|
"modelValue": allSelected.value,
|
|
18527
18610
|
"indeterminate": someSelected.value && !allSelected.value,
|
|
18528
18611
|
"onUpdate:modelValue": selectAll
|
|
@@ -18542,22 +18625,24 @@ const VDataTableHeaders = genericComponent()({
|
|
|
18542
18625
|
}
|
|
18543
18626
|
});
|
|
18544
18627
|
};
|
|
18545
|
-
useRender(() =>
|
|
18546
|
-
"
|
|
18547
|
-
|
|
18548
|
-
|
|
18549
|
-
|
|
18550
|
-
"
|
|
18551
|
-
|
|
18552
|
-
"
|
|
18553
|
-
|
|
18554
|
-
|
|
18555
|
-
|
|
18556
|
-
|
|
18557
|
-
|
|
18558
|
-
|
|
18559
|
-
|
|
18560
|
-
|
|
18628
|
+
useRender(() => {
|
|
18629
|
+
return createVNode(Fragment, null, [slots.headers ? slots.headers(slotProps.value) : headers.value.map((row, y) => createVNode("tr", null, [row.map((column, x) => createVNode(VDataTableHeaderCell, {
|
|
18630
|
+
"column": column,
|
|
18631
|
+
"x": x,
|
|
18632
|
+
"y": y
|
|
18633
|
+
}, null))])), props.loading && createVNode("tr", {
|
|
18634
|
+
"class": "v-data-table__progress"
|
|
18635
|
+
}, [createVNode("th", {
|
|
18636
|
+
"colspan": columns.value.length
|
|
18637
|
+
}, [createVNode(LoaderSlot, {
|
|
18638
|
+
"name": "v-data-table-headers",
|
|
18639
|
+
"active": true,
|
|
18640
|
+
"color": typeof props.loading === 'boolean' ? undefined : props.loading,
|
|
18641
|
+
"indeterminate": true
|
|
18642
|
+
}, {
|
|
18643
|
+
default: slots.loader
|
|
18644
|
+
})])])]);
|
|
18645
|
+
});
|
|
18561
18646
|
}
|
|
18562
18647
|
});
|
|
18563
18648
|
|
|
@@ -18856,9 +18941,7 @@ const VDataTableRow = defineComponent({
|
|
|
18856
18941
|
'v-data-table__tr--clickable': !!props.onClick
|
|
18857
18942
|
}],
|
|
18858
18943
|
"onClick": props.onClick
|
|
18859
|
-
}, [
|
|
18860
|
-
"key": "no-data"
|
|
18861
|
-
}, slots), props.item && columns.value.map((column, i) => createVNode(VDataTableColumn, {
|
|
18944
|
+
}, [props.item && columns.value.map((column, i) => createVNode(VDataTableColumn, {
|
|
18862
18945
|
"align": column.align,
|
|
18863
18946
|
"fixed": column.fixed,
|
|
18864
18947
|
"fixedOffset": column.fixedOffset,
|
|
@@ -18945,56 +19028,64 @@ const VDataTableRows = genericComponent()({
|
|
|
18945
19028
|
const {
|
|
18946
19029
|
t
|
|
18947
19030
|
} = useLocale();
|
|
18948
|
-
useRender(() =>
|
|
18949
|
-
|
|
18950
|
-
|
|
18951
|
-
|
|
18952
|
-
|
|
18953
|
-
|
|
18954
|
-
|
|
18955
|
-
|
|
18956
|
-
|
|
18957
|
-
|
|
18958
|
-
|
|
18959
|
-
|
|
18960
|
-
|
|
19031
|
+
useRender(() => {
|
|
19032
|
+
if (props.loading && slots.loading) {
|
|
19033
|
+
return createVNode("tr", {
|
|
19034
|
+
"class": "v-data-table-rows-loading",
|
|
19035
|
+
"key": "loading"
|
|
19036
|
+
}, [createVNode("td", {
|
|
19037
|
+
"colspan": columns.value.length
|
|
19038
|
+
}, [slots.loading()])]);
|
|
19039
|
+
}
|
|
19040
|
+
if (!props.loading && !props.items.length && !props.hideNoData) {
|
|
19041
|
+
return createVNode("tr", {
|
|
19042
|
+
"class": "v-data-table-rows-no-data",
|
|
19043
|
+
"key": "no-data"
|
|
19044
|
+
}, [createVNode("td", {
|
|
19045
|
+
"colspan": columns.value.length
|
|
19046
|
+
}, [slots['no-data']?.() ?? t(props.noDataText)])]);
|
|
19047
|
+
}
|
|
19048
|
+
return createVNode(Fragment, null, [props.items.map((item, index) => {
|
|
19049
|
+
if (item.type === 'group-header') {
|
|
19050
|
+
return slots['group-header'] ? slots['group-header']({
|
|
19051
|
+
index,
|
|
19052
|
+
item,
|
|
19053
|
+
columns: columns.value,
|
|
19054
|
+
isExpanded,
|
|
19055
|
+
toggleExpand,
|
|
19056
|
+
isSelected,
|
|
19057
|
+
toggleSelect,
|
|
19058
|
+
toggleGroup,
|
|
19059
|
+
isGroupOpen
|
|
19060
|
+
}) : createVNode(VDataTableGroupHeaderRow, {
|
|
19061
|
+
"key": `group-header_${item.id}`,
|
|
19062
|
+
"item": item
|
|
19063
|
+
}, slots);
|
|
19064
|
+
}
|
|
19065
|
+
const slotProps = {
|
|
18961
19066
|
index,
|
|
18962
19067
|
item,
|
|
18963
19068
|
columns: columns.value,
|
|
18964
19069
|
isExpanded,
|
|
18965
19070
|
toggleExpand,
|
|
18966
19071
|
isSelected,
|
|
18967
|
-
toggleSelect
|
|
18968
|
-
|
|
18969
|
-
|
|
18970
|
-
|
|
18971
|
-
"
|
|
19072
|
+
toggleSelect
|
|
19073
|
+
};
|
|
19074
|
+
return createVNode(Fragment, null, [slots.item ? slots.item(slotProps) : createVNode(VDataTableRow, {
|
|
19075
|
+
"key": `item_${item.value}`,
|
|
19076
|
+
"onClick": expandOnClick.value || props['onClick:row'] ? event => {
|
|
19077
|
+
if (expandOnClick.value) {
|
|
19078
|
+
toggleExpand(item);
|
|
19079
|
+
}
|
|
19080
|
+
props['onClick:row']?.(event, {
|
|
19081
|
+
item
|
|
19082
|
+
});
|
|
19083
|
+
} : undefined,
|
|
19084
|
+
"index": index,
|
|
18972
19085
|
"item": item
|
|
18973
|
-
}, slots);
|
|
18974
|
-
}
|
|
18975
|
-
|
|
18976
|
-
index,
|
|
18977
|
-
item,
|
|
18978
|
-
columns: columns.value,
|
|
18979
|
-
isExpanded,
|
|
18980
|
-
toggleExpand,
|
|
18981
|
-
isSelected,
|
|
18982
|
-
toggleSelect
|
|
18983
|
-
};
|
|
18984
|
-
return createVNode(Fragment, null, [slots.item ? slots.item(slotProps) : createVNode(VDataTableRow, {
|
|
18985
|
-
"key": `item_${item.value}`,
|
|
18986
|
-
"onClick": expandOnClick.value || props['onClick:row'] ? event => {
|
|
18987
|
-
if (expandOnClick.value) {
|
|
18988
|
-
toggleExpand(item);
|
|
18989
|
-
}
|
|
18990
|
-
props['onClick:row']?.(event, {
|
|
18991
|
-
item
|
|
18992
|
-
});
|
|
18993
|
-
} : undefined,
|
|
18994
|
-
"index": index,
|
|
18995
|
-
"item": item
|
|
18996
|
-
}, slots), isExpanded(item) && slots['expanded-row']?.(slotProps)]);
|
|
18997
|
-
})]));
|
|
19086
|
+
}, slots), isExpanded(item) && slots['expanded-row']?.(slotProps)]);
|
|
19087
|
+
})]);
|
|
19088
|
+
});
|
|
18998
19089
|
return {};
|
|
18999
19090
|
}
|
|
19000
19091
|
});
|
|
@@ -19269,7 +19360,8 @@ function useOptions(_ref) {
|
|
|
19269
19360
|
page: page.value,
|
|
19270
19361
|
itemsPerPage: itemsPerPage.value,
|
|
19271
19362
|
sortBy: sortBy.value,
|
|
19272
|
-
groupBy: groupBy.value
|
|
19363
|
+
groupBy: groupBy.value,
|
|
19364
|
+
search: search.value
|
|
19273
19365
|
}));
|
|
19274
19366
|
|
|
19275
19367
|
// Reset page when searching
|
|
@@ -19302,12 +19394,12 @@ const makeVDataTableProps = propsFactory({
|
|
|
19302
19394
|
width: [String, Number],
|
|
19303
19395
|
fixedHeader: Boolean,
|
|
19304
19396
|
fixedFooter: Boolean,
|
|
19305
|
-
'onClick:row': Function
|
|
19397
|
+
'onClick:row': Function,
|
|
19398
|
+
search: String
|
|
19306
19399
|
}, 'v-data-table');
|
|
19307
19400
|
const VDataTable = genericComponent()({
|
|
19308
19401
|
name: 'VDataTable',
|
|
19309
19402
|
props: {
|
|
19310
|
-
search: String,
|
|
19311
19403
|
...makeVDataTableProps(),
|
|
19312
19404
|
...makeDataTableExpandProps(),
|
|
19313
19405
|
...makeDataTableGroupProps(),
|
|
@@ -19424,7 +19516,7 @@ const VDataTable = genericComponent()({
|
|
|
19424
19516
|
top: slots.top,
|
|
19425
19517
|
default: slots.default ?? (() => createVNode(Fragment, null, [slots.colgroup?.({
|
|
19426
19518
|
columns
|
|
19427
|
-
}), createVNode("thead", null, [
|
|
19519
|
+
}), createVNode("thead", null, [createVNode(VDataTableHeaders, {
|
|
19428
19520
|
"sticky": props.fixedHeader,
|
|
19429
19521
|
"multiSort": props.multiSort
|
|
19430
19522
|
}, slots)]), slots.thead?.(), createVNode("tbody", null, [slots.body ? slots.body() : createVNode(VDataTableRows, {
|
|
@@ -19522,7 +19614,6 @@ function useVirtual(props, items) {
|
|
|
19522
19614
|
const VDataTableVirtual = genericComponent()({
|
|
19523
19615
|
name: 'VDataTableVirtual',
|
|
19524
19616
|
props: {
|
|
19525
|
-
search: String,
|
|
19526
19617
|
...makeVDataTableProps(),
|
|
19527
19618
|
...makeVDataTableProps(),
|
|
19528
19619
|
...makeDataTableGroupProps(),
|
|
@@ -19761,7 +19852,8 @@ const VDataTableServer = genericComponent()({
|
|
|
19761
19852
|
page,
|
|
19762
19853
|
itemsPerPage,
|
|
19763
19854
|
sortBy,
|
|
19764
|
-
groupBy
|
|
19855
|
+
groupBy,
|
|
19856
|
+
search: toRef(props, 'search')
|
|
19765
19857
|
});
|
|
19766
19858
|
provide('v-data-table', {
|
|
19767
19859
|
toggleSort,
|
|
@@ -19790,7 +19882,7 @@ const VDataTableServer = genericComponent()({
|
|
|
19790
19882
|
}), createVNode("thead", {
|
|
19791
19883
|
"class": "v-data-table__thead",
|
|
19792
19884
|
"role": "rowgroup"
|
|
19793
|
-
}, [
|
|
19885
|
+
}, [createVNode(VDataTableHeaders, {
|
|
19794
19886
|
"sticky": props.fixedHeader,
|
|
19795
19887
|
"loading": props.loading,
|
|
19796
19888
|
"color": props.color
|
|
@@ -19821,6 +19913,7 @@ const rootTypes = {
|
|
|
19821
19913
|
'date-picker': 'list-item, heading, divider, date-picker-options, date-picker-days, actions',
|
|
19822
19914
|
'date-picker-options': 'text, avatar@2',
|
|
19823
19915
|
'date-picker-days': 'avatar@28',
|
|
19916
|
+
divider: 'divider',
|
|
19824
19917
|
heading: 'heading',
|
|
19825
19918
|
image: 'image',
|
|
19826
19919
|
'list-item': 'text',
|
|
@@ -20462,7 +20555,7 @@ function createVuetify$1() {
|
|
|
20462
20555
|
locale
|
|
20463
20556
|
};
|
|
20464
20557
|
}
|
|
20465
|
-
const version$1 = "3.1.
|
|
20558
|
+
const version$1 = "3.1.16";
|
|
20466
20559
|
createVuetify$1.version = version$1;
|
|
20467
20560
|
|
|
20468
20561
|
// Vue's inject() can only be used in setup
|
|
@@ -20474,7 +20567,7 @@ function inject(key) {
|
|
|
20474
20567
|
}
|
|
20475
20568
|
}
|
|
20476
20569
|
|
|
20477
|
-
const version = "3.1.
|
|
20570
|
+
const version = "3.1.16";
|
|
20478
20571
|
|
|
20479
20572
|
const createVuetify = function () {
|
|
20480
20573
|
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|