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.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
|
*/
|
|
@@ -360,6 +360,32 @@
|
|
|
360
360
|
handler(...args);
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
|
+
function focusableChildren(el) {
|
|
364
|
+
const targets = ['button', '[href]', 'input:not([type="hidden"])', 'select', 'textarea', '[tabindex]'].map(s => `${s}:not([tabindex="-1"]):not([disabled])`).join(', ');
|
|
365
|
+
return [...el.querySelectorAll(targets)];
|
|
366
|
+
}
|
|
367
|
+
function focusChild(el, location) {
|
|
368
|
+
const focusable = focusableChildren(el);
|
|
369
|
+
const idx = focusable.indexOf(document.activeElement);
|
|
370
|
+
if (!location) {
|
|
371
|
+
if (!el.contains(document.activeElement)) {
|
|
372
|
+
focusable[0]?.focus();
|
|
373
|
+
}
|
|
374
|
+
} else if (location === 'first') {
|
|
375
|
+
focusable[0]?.focus();
|
|
376
|
+
} else if (location === 'last') {
|
|
377
|
+
focusable.at(-1)?.focus();
|
|
378
|
+
} else {
|
|
379
|
+
let _el;
|
|
380
|
+
let idxx = idx;
|
|
381
|
+
const inc = location === 'next' ? 1 : -1;
|
|
382
|
+
do {
|
|
383
|
+
idxx += inc;
|
|
384
|
+
_el = focusable[idxx];
|
|
385
|
+
} while ((!_el || _el.offsetParent == null) && idxx < focusable.length && idxx >= 0);
|
|
386
|
+
if (_el) _el.focus();else focusChild(el, location === 'next' ? 'first' : 'last');
|
|
387
|
+
}
|
|
388
|
+
}
|
|
363
389
|
|
|
364
390
|
const block = ['top', 'bottom'];
|
|
365
391
|
const inline = ['start', 'end', 'left', 'right'];
|
|
@@ -5293,7 +5319,8 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
5945
5974
|
resetValidation,
|
|
5946
5975
|
validate
|
|
5947
5976
|
}));
|
|
5977
|
+
const messages = vue.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 vue.createVNode("div", {
|
|
5954
5992
|
"class": ['v-input', `v-input--${props.direction}`, densityClasses.value, validationClasses.value]
|
|
@@ -5971,7 +6009,7 @@
|
|
|
5971
6009
|
}, [vue.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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
6168
6200
|
const vFieldRef = vue.ref();
|
|
6169
6201
|
const inputRef = vue.ref();
|
|
6170
6202
|
const isActive = vue.computed(() => activeTypes.includes(props.type) || props.persistentPlaceholder || isFocused.value);
|
|
6171
|
-
const messages = vue.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 @@
|
|
|
6213
6242
|
const [{
|
|
6214
6243
|
modelValue: _,
|
|
6215
6244
|
...inputProps
|
|
6216
|
-
}] =
|
|
6245
|
+
}] = VInput.filterProps(props);
|
|
6217
6246
|
const [fieldProps] = filterFieldProps(props);
|
|
6218
6247
|
return vue.createVNode(VInput, vue.mergeProps({
|
|
6219
6248
|
"ref": vInputRef,
|
|
@@ -6223,12 +6252,9 @@
|
|
|
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 @@
|
|
|
6637
6663
|
const id = vue.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 vue.createVNode(VInput, vue.mergeProps({
|
|
6643
6669
|
"class": "v-checkbox"
|
|
@@ -8049,7 +8075,12 @@
|
|
|
8049
8075
|
function useItems(props) {
|
|
8050
8076
|
const items = vue.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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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']?.() ?? vue.createVNode(VListItem, {
|
|
@@ -10144,6 +10166,7 @@
|
|
|
10144
10166
|
});
|
|
10145
10167
|
});
|
|
10146
10168
|
return forwardRefs({
|
|
10169
|
+
isFocused,
|
|
10147
10170
|
menu,
|
|
10148
10171
|
select
|
|
10149
10172
|
}, vTextFieldRef);
|
|
@@ -10282,6 +10305,7 @@
|
|
|
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 @@
|
|
|
10305
10329
|
_menu.value = v;
|
|
10306
10330
|
}
|
|
10307
10331
|
});
|
|
10332
|
+
const selectionIndex = vue.ref(-1);
|
|
10333
|
+
const color = vue.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 @@
|
|
|
10332
10362
|
return filteredItems.value;
|
|
10333
10363
|
});
|
|
10334
10364
|
const selected = vue.computed(() => selections.value.map(selection => selection.props.value));
|
|
10365
|
+
const selection = vue.computed(() => selections.value[selectionIndex.value]);
|
|
10335
10366
|
const listRef = vue.ref();
|
|
10336
10367
|
function onClear(e) {
|
|
10337
10368
|
if (props.openOnClear) {
|
|
@@ -10345,7 +10376,9 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
10508
10573
|
};
|
|
10509
10574
|
return vue.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 ? vue.createVNode(VChip, vue.mergeProps({
|
|
10513
10579
|
"key": "chip",
|
|
10514
10580
|
"closable": props.closableChips,
|
|
@@ -10999,6 +11065,17 @@
|
|
|
10999
11065
|
disabled: vue.toRef(props, 'disabled')
|
|
11000
11066
|
}
|
|
11001
11067
|
});
|
|
11068
|
+
const items = vue.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 vue.createVNode(props.tag, {
|
|
@@ -11021,22 +11098,26 @@
|
|
|
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 && vue.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 vue.createVNode(vue.Fragment, null, [vue.createVNode(VBreadcrumbsItem, vue.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 && vue.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 @@
|
|
|
12903
12984
|
} = useFocus(props);
|
|
12904
12985
|
const trackStop = vue.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 vue.createVNode(VInput, vue.mergeProps({
|
|
12909
12990
|
"class": ['v-slider', {
|
|
@@ -13567,6 +13648,7 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 = vue.computed(() => typeof props.showSize !== 'boolean' ? props.showSize : undefined);
|
|
14298
14385
|
const totalBytes = vue.computed(() => (model.value ?? []).reduce((bytes, _ref2) => {
|
|
14299
14386
|
let {
|
|
@@ -14315,21 +14402,14 @@
|
|
|
14315
14402
|
});
|
|
14316
14403
|
const vInputRef = vue.ref();
|
|
14317
14404
|
const vFieldRef = vue.ref();
|
|
14318
|
-
const isFocused = vue.ref(false);
|
|
14319
14405
|
const inputRef = vue.ref();
|
|
14320
|
-
const messages = vue.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 @@
|
|
|
14360
14440
|
const [{
|
|
14361
14441
|
modelValue: _,
|
|
14362
14442
|
...inputProps
|
|
14363
|
-
}] =
|
|
14443
|
+
}] = VInput.filterProps(props);
|
|
14364
14444
|
const [fieldProps] = filterFieldProps(props);
|
|
14365
14445
|
return vue.createVNode(VInput, vue.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 @@
|
|
|
14423
14501
|
model.value = [...(target.files ?? [])];
|
|
14424
14502
|
},
|
|
14425
14503
|
"onFocus": onFocus,
|
|
14426
|
-
"onBlur":
|
|
14504
|
+
"onBlur": blur
|
|
14427
14505
|
}, slotProps, inputAttrs), null), vue.createVNode("div", {
|
|
14428
14506
|
"class": fieldClass
|
|
14429
14507
|
}, [!!model.value?.length && (slots.selection ? slots.selection({
|
|
@@ -16118,7 +16196,7 @@
|
|
|
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 @@
|
|
|
16246
16324
|
const trackStart = vue.computed(() => position(model.value[0]));
|
|
16247
16325
|
const trackStop = vue.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 vue.createVNode(VInput, vue.mergeProps({
|
|
16252
16330
|
"class": ['v-slider', 'v-range-slider', {
|
|
@@ -16806,7 +16884,7 @@
|
|
|
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 @@
|
|
|
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 = vue.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 vue.createVNode(VInput, vue.mergeProps({
|
|
@@ -17485,8 +17565,6 @@
|
|
|
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 @@
|
|
|
17541
17619
|
const controlHeight = vue.ref('');
|
|
17542
17620
|
const textareaRef = vue.ref();
|
|
17543
17621
|
const isActive = vue.computed(() => isFocused.value || props.persistentPlaceholder);
|
|
17544
|
-
const messages = vue.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 @@
|
|
|
17615
17690
|
const [{
|
|
17616
17691
|
modelValue: _,
|
|
17617
17692
|
...inputProps
|
|
17618
|
-
}] =
|
|
17693
|
+
}] = VInput.filterProps(props);
|
|
17619
17694
|
const [fieldProps] = filterFieldProps(props);
|
|
17620
17695
|
return vue.createVNode(VInput, vue.mergeProps({
|
|
17621
17696
|
"ref": vInputRef,
|
|
@@ -17629,12 +17704,9 @@
|
|
|
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 => {
|
|
@@ -18407,7 +18479,7 @@
|
|
|
18407
18479
|
locale
|
|
18408
18480
|
};
|
|
18409
18481
|
}
|
|
18410
|
-
const version$1 = "3.1.
|
|
18482
|
+
const version$1 = "3.1.16";
|
|
18411
18483
|
createVuetify$1.version = version$1;
|
|
18412
18484
|
|
|
18413
18485
|
// Vue's inject() can only be used in setup
|
|
@@ -18427,7 +18499,7 @@
|
|
|
18427
18499
|
...options
|
|
18428
18500
|
});
|
|
18429
18501
|
};
|
|
18430
|
-
const version = "3.1.
|
|
18502
|
+
const version = "3.1.16";
|
|
18431
18503
|
createVuetify.version = version;
|
|
18432
18504
|
|
|
18433
18505
|
exports.components = components;
|