vuetify 3.10.9 → 3.10.10
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 +3507 -3507
- package/dist/json/importMap-labs.json +22 -22
- package/dist/json/importMap.json +170 -170
- package/dist/json/web-types.json +6186 -6186
- package/dist/vuetify-labs.cjs +201 -213
- package/dist/vuetify-labs.css +5293 -5301
- package/dist/vuetify-labs.d.ts +79 -79
- package/dist/vuetify-labs.esm.js +201 -213
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +201 -213
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.cjs +133 -96
- package/dist/vuetify.cjs.map +1 -1
- package/dist/vuetify.css +3094 -3090
- package/dist/vuetify.d.ts +63 -63
- package/dist/vuetify.esm.js +133 -96
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +133 -96
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +332 -328
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VAvatar/VAvatar.css +1 -1
- package/lib/components/VAvatar/_variables.scss +1 -1
- package/lib/components/VBtnToggle/VBtnToggle.sass +1 -1
- package/lib/components/VCard/VCard.js +8 -1
- package/lib/components/VCard/VCard.js.map +1 -1
- package/lib/components/VDatePicker/VDatePicker.js +7 -16
- package/lib/components/VDatePicker/VDatePicker.js.map +1 -1
- package/lib/components/VTextField/VTextField.js +17 -7
- package/lib/components/VTextField/VTextField.js.map +1 -1
- package/lib/components/VTextarea/VTextarea.js +17 -7
- package/lib/components/VTextarea/VTextarea.js.map +1 -1
- package/lib/composables/calendar.d.ts +6 -0
- package/lib/composables/calendar.js +37 -2
- package/lib/composables/calendar.js.map +1 -1
- package/lib/composables/delay.js +3 -2
- package/lib/composables/delay.js.map +1 -1
- package/lib/composables/hotkey/hotkey.js +42 -53
- package/lib/composables/hotkey/hotkey.js.map +1 -1
- package/lib/entry-bundler.js +1 -1
- package/lib/entry-bundler.js.map +1 -1
- package/lib/framework.d.ts +63 -63
- package/lib/framework.js +1 -1
- package/lib/framework.js.map +1 -1
- package/lib/labs/VDateInput/VDateInput.js +8 -12
- package/lib/labs/VDateInput/VDateInput.js.map +1 -1
- package/lib/labs/VHotkey/VHotkey.css +4 -16
- package/lib/labs/VHotkey/VHotkey.d.ts +29 -29
- package/lib/labs/VHotkey/VHotkey.js +62 -106
- package/lib/labs/VHotkey/VHotkey.js.map +1 -1
- package/lib/labs/VHotkey/VHotkey.scss +8 -25
- package/lib/styles/main.css +4 -0
- package/lib/styles/settings/_variables.scss +1 -0
- package/lib/util/box.js +3 -8
- package/lib/util/box.js.map +1 -1
- package/package.json +1 -1
package/dist/vuetify-labs.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Vuetify v3.10.
|
|
2
|
+
* Vuetify v3.10.10
|
|
3
3
|
* Forged by John Leider
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -684,7 +684,8 @@
|
|
|
684
684
|
class Box {
|
|
685
685
|
constructor(args) {
|
|
686
686
|
const pageScale = document.body.currentCSSZoom ?? 1;
|
|
687
|
-
const
|
|
687
|
+
const ignoreZoom = args.top === undefined; // detect DOMRect without breaking in jsdom
|
|
688
|
+
const factor = ignoreZoom ? 1 : 1 + (1 - pageScale) / pageScale;
|
|
688
689
|
const {
|
|
689
690
|
x,
|
|
690
691
|
y,
|
|
@@ -754,13 +755,7 @@
|
|
|
754
755
|
});
|
|
755
756
|
}
|
|
756
757
|
} else {
|
|
757
|
-
|
|
758
|
-
return new Box({
|
|
759
|
-
x: rect.x,
|
|
760
|
-
y: rect.y,
|
|
761
|
-
width: el.clientWidth,
|
|
762
|
-
height: el.clientHeight
|
|
763
|
-
});
|
|
758
|
+
return new Box(el.getBoundingClientRect());
|
|
764
759
|
}
|
|
765
760
|
}
|
|
766
761
|
|
|
@@ -11329,9 +11324,10 @@
|
|
|
11329
11324
|
let clearDelay = () => {};
|
|
11330
11325
|
function runDelay(isOpening, options) {
|
|
11331
11326
|
clearDelay?.();
|
|
11332
|
-
const delay =
|
|
11327
|
+
const delay = isOpening ? props.openDelay : props.closeDelay;
|
|
11328
|
+
const normalizedDelay = Math.max(options?.minDelay ?? 0, Number(delay ?? 0));
|
|
11333
11329
|
return new Promise(resolve => {
|
|
11334
|
-
clearDelay = defer(
|
|
11330
|
+
clearDelay = defer(normalizedDelay, () => {
|
|
11335
11331
|
cb?.(isOpening);
|
|
11336
11332
|
resolve(isOpening);
|
|
11337
11333
|
});
|
|
@@ -12838,14 +12834,24 @@
|
|
|
12838
12834
|
}
|
|
12839
12835
|
function onInput(e) {
|
|
12840
12836
|
const el = e.target;
|
|
12841
|
-
|
|
12842
|
-
|
|
12843
|
-
|
|
12844
|
-
vue.nextTick(() => {
|
|
12845
|
-
el.selectionStart = caretPosition[0];
|
|
12846
|
-
el.selectionEnd = caretPosition[1];
|
|
12847
|
-
});
|
|
12837
|
+
if (!(props.modelModifiers?.trim && ['text', 'search', 'password', 'tel', 'url'].includes(props.type))) {
|
|
12838
|
+
model.value = el.value;
|
|
12839
|
+
return;
|
|
12848
12840
|
}
|
|
12841
|
+
const value = el.value;
|
|
12842
|
+
const start = el.selectionStart;
|
|
12843
|
+
const end = el.selectionEnd;
|
|
12844
|
+
model.value = value;
|
|
12845
|
+
vue.nextTick(() => {
|
|
12846
|
+
let offset = 0;
|
|
12847
|
+
if (value.trimStart().length === el.value.length) {
|
|
12848
|
+
// #22307 - Whitespace has been removed from the
|
|
12849
|
+
// start, offset the caret position to compensate
|
|
12850
|
+
offset = value.length - el.value.length;
|
|
12851
|
+
}
|
|
12852
|
+
if (start != null) el.selectionStart = start - offset;
|
|
12853
|
+
if (end != null) el.selectionEnd = end - offset;
|
|
12854
|
+
});
|
|
12849
12855
|
}
|
|
12850
12856
|
useRender(() => {
|
|
12851
12857
|
const hasCounter = !!(slots.counter || props.counter !== false && props.counter != null);
|
|
@@ -15572,6 +15578,12 @@
|
|
|
15572
15578
|
roundedClasses
|
|
15573
15579
|
} = useRounded(props);
|
|
15574
15580
|
const link = useLink(props, attrs);
|
|
15581
|
+
const loadingColor = vue.shallowRef(undefined);
|
|
15582
|
+
vue.watch(() => props.loading, (val, old) => {
|
|
15583
|
+
loadingColor.value = !val && typeof old === 'string' ? old : typeof val === 'boolean' ? undefined : val;
|
|
15584
|
+
}, {
|
|
15585
|
+
immediate: true
|
|
15586
|
+
});
|
|
15575
15587
|
useRender(() => {
|
|
15576
15588
|
const isLink = props.link !== false && link.isLink.value;
|
|
15577
15589
|
const isClickable = !props.disabled && props.link !== false && (props.link || link.isClickable.value);
|
|
@@ -15614,7 +15626,7 @@
|
|
|
15614
15626
|
}, slots.image)]), vue.createVNode(LoaderSlot, {
|
|
15615
15627
|
"name": "v-card",
|
|
15616
15628
|
"active": !!props.loading,
|
|
15617
|
-
"color":
|
|
15629
|
+
"color": loadingColor.value
|
|
15618
15630
|
}, {
|
|
15619
15631
|
default: slots.loader
|
|
15620
15632
|
}), hasCardItem && vue.createVNode(VCardItem, {
|
|
@@ -19037,11 +19049,6 @@
|
|
|
19037
19049
|
let keyGroups;
|
|
19038
19050
|
let isSequence = false;
|
|
19039
19051
|
let groupIndex = 0;
|
|
19040
|
-
function clearTimer() {
|
|
19041
|
-
if (!timeout) return;
|
|
19042
|
-
clearTimeout(timeout);
|
|
19043
|
-
timeout = 0;
|
|
19044
|
-
}
|
|
19045
19052
|
function isInputFocused() {
|
|
19046
19053
|
if (vue.toValue(inputs)) return false;
|
|
19047
19054
|
const activeElement = document.activeElement;
|
|
@@ -19049,12 +19056,12 @@
|
|
|
19049
19056
|
}
|
|
19050
19057
|
function resetSequence() {
|
|
19051
19058
|
groupIndex = 0;
|
|
19052
|
-
|
|
19059
|
+
clearTimeout(timeout);
|
|
19053
19060
|
}
|
|
19054
19061
|
function handler(e) {
|
|
19055
19062
|
const group = keyGroups[groupIndex];
|
|
19056
19063
|
if (!group || isInputFocused()) return;
|
|
19057
|
-
if (!matchesKeyGroup(e, group)) {
|
|
19064
|
+
if (!matchesKeyGroup(e, group, isMac)) {
|
|
19058
19065
|
if (isSequence) resetSequence();
|
|
19059
19066
|
return;
|
|
19060
19067
|
}
|
|
@@ -19063,7 +19070,7 @@
|
|
|
19063
19070
|
callback(e);
|
|
19064
19071
|
return;
|
|
19065
19072
|
}
|
|
19066
|
-
|
|
19073
|
+
clearTimeout(timeout);
|
|
19067
19074
|
groupIndex++;
|
|
19068
19075
|
if (groupIndex === keyGroups.length) {
|
|
19069
19076
|
callback(e);
|
|
@@ -19074,12 +19081,12 @@
|
|
|
19074
19081
|
}
|
|
19075
19082
|
function cleanup() {
|
|
19076
19083
|
window.removeEventListener(vue.toValue(event), handler);
|
|
19077
|
-
|
|
19084
|
+
clearTimeout(timeout);
|
|
19078
19085
|
}
|
|
19079
|
-
vue.watch(() => vue.toValue(keys),
|
|
19086
|
+
vue.watch(() => vue.toValue(keys), newKeys => {
|
|
19080
19087
|
cleanup();
|
|
19081
|
-
if (
|
|
19082
|
-
const groups = splitKeySequence(
|
|
19088
|
+
if (newKeys) {
|
|
19089
|
+
const groups = splitKeySequence(newKeys.toLowerCase());
|
|
19083
19090
|
isSequence = groups.length > 1;
|
|
19084
19091
|
keyGroups = groups;
|
|
19085
19092
|
resetSequence();
|
|
@@ -19090,55 +19097,50 @@
|
|
|
19090
19097
|
});
|
|
19091
19098
|
|
|
19092
19099
|
// Watch for changes in the event type to re-register the listener
|
|
19093
|
-
vue.watch(() => vue.toValue(event),
|
|
19100
|
+
vue.watch(() => vue.toValue(event), (newEvent, oldEvent) => {
|
|
19094
19101
|
if (oldEvent && keyGroups && keyGroups.length > 0) {
|
|
19095
19102
|
window.removeEventListener(oldEvent, handler);
|
|
19096
19103
|
window.addEventListener(newEvent, handler);
|
|
19097
19104
|
}
|
|
19098
19105
|
});
|
|
19099
|
-
|
|
19100
|
-
|
|
19101
|
-
|
|
19102
|
-
|
|
19103
|
-
|
|
19104
|
-
|
|
19105
|
-
|
|
19106
|
-
|
|
19106
|
+
vue.onScopeDispose(cleanup, true);
|
|
19107
|
+
return cleanup;
|
|
19108
|
+
}
|
|
19109
|
+
function matchesKeyGroup(e, group, isMac) {
|
|
19110
|
+
const {
|
|
19111
|
+
modifiers,
|
|
19112
|
+
actualKey
|
|
19113
|
+
} = parseKeyGroup(group);
|
|
19114
|
+
const expectCtrl = modifiers.ctrl || !isMac && (modifiers.cmd || modifiers.meta);
|
|
19115
|
+
const expectMeta = isMac && (modifiers.cmd || modifiers.meta);
|
|
19116
|
+
return e.ctrlKey === expectCtrl && e.metaKey === expectMeta && e.shiftKey === modifiers.shift && e.altKey === modifiers.alt && e.key.toLowerCase() === actualKey?.toLowerCase();
|
|
19117
|
+
}
|
|
19118
|
+
function parseKeyGroup(group) {
|
|
19119
|
+
const MODIFIERS = ['ctrl', 'shift', 'alt', 'meta', 'cmd'];
|
|
19107
19120
|
|
|
19108
|
-
|
|
19109
|
-
|
|
19121
|
+
// Use the shared combination splitting logic
|
|
19122
|
+
const parts = splitKeyCombination(group.toLowerCase());
|
|
19110
19123
|
|
|
19111
|
-
|
|
19112
|
-
|
|
19113
|
-
return {
|
|
19114
|
-
modifiers: Object.fromEntries(MODIFIERS.map(m => [m, false])),
|
|
19115
|
-
actualKey: undefined
|
|
19116
|
-
};
|
|
19117
|
-
}
|
|
19118
|
-
const modifiers = Object.fromEntries(MODIFIERS.map(m => [m, false]));
|
|
19119
|
-
let actualKey;
|
|
19120
|
-
for (const part of parts) {
|
|
19121
|
-
if (MODIFIERS.includes(part)) {
|
|
19122
|
-
modifiers[part] = true;
|
|
19123
|
-
} else {
|
|
19124
|
-
actualKey = part;
|
|
19125
|
-
}
|
|
19126
|
-
}
|
|
19124
|
+
// If the combination is invalid, return empty result
|
|
19125
|
+
if (parts.length === 0) {
|
|
19127
19126
|
return {
|
|
19128
|
-
modifiers,
|
|
19129
|
-
actualKey
|
|
19127
|
+
modifiers: Object.fromEntries(MODIFIERS.map(m => [m, false])),
|
|
19128
|
+
actualKey: undefined
|
|
19130
19129
|
};
|
|
19131
19130
|
}
|
|
19132
|
-
|
|
19133
|
-
|
|
19134
|
-
|
|
19135
|
-
|
|
19136
|
-
|
|
19137
|
-
|
|
19138
|
-
|
|
19139
|
-
|
|
19131
|
+
const modifiers = Object.fromEntries(MODIFIERS.map(m => [m, false]));
|
|
19132
|
+
let actualKey;
|
|
19133
|
+
for (const part of parts) {
|
|
19134
|
+
if (MODIFIERS.includes(part)) {
|
|
19135
|
+
modifiers[part] = true;
|
|
19136
|
+
} else {
|
|
19137
|
+
actualKey = part;
|
|
19138
|
+
}
|
|
19140
19139
|
}
|
|
19141
|
-
return
|
|
19140
|
+
return {
|
|
19141
|
+
modifiers,
|
|
19142
|
+
actualKey
|
|
19143
|
+
};
|
|
19142
19144
|
}
|
|
19143
19145
|
|
|
19144
19146
|
// Utilities
|
|
@@ -23768,11 +23770,15 @@
|
|
|
23768
23770
|
return week.length ? adapter.getWeek(week[0], props.firstDayOfWeek, props.firstDayOfYear) : null;
|
|
23769
23771
|
});
|
|
23770
23772
|
});
|
|
23773
|
+
const {
|
|
23774
|
+
minDate,
|
|
23775
|
+
maxDate
|
|
23776
|
+
} = useCalendarRange(props);
|
|
23771
23777
|
function isDisabled(value) {
|
|
23772
23778
|
if (props.disabled) return true;
|
|
23773
23779
|
const date = adapter.date(value);
|
|
23774
|
-
if (
|
|
23775
|
-
if (
|
|
23780
|
+
if (minDate.value && adapter.isBefore(adapter.endOfDay(date), minDate.value)) return true;
|
|
23781
|
+
if (maxDate.value && adapter.isAfter(date, maxDate.value)) return true;
|
|
23776
23782
|
if (Array.isArray(props.allowedDates) && props.allowedDates.length > 0) {
|
|
23777
23783
|
return !props.allowedDates.some(d => adapter.isSameDay(adapter.date(d), date));
|
|
23778
23784
|
}
|
|
@@ -23792,6 +23798,37 @@
|
|
|
23792
23798
|
weekNumbers
|
|
23793
23799
|
};
|
|
23794
23800
|
}
|
|
23801
|
+
function useCalendarRange(props) {
|
|
23802
|
+
const adapter = useDate();
|
|
23803
|
+
const minDate = vue.computed(() => {
|
|
23804
|
+
if (!props.min) return null;
|
|
23805
|
+
const date = adapter.date(props.min);
|
|
23806
|
+
return adapter.isValid(date) ? date : null;
|
|
23807
|
+
});
|
|
23808
|
+
const maxDate = vue.computed(() => {
|
|
23809
|
+
if (!props.max) return null;
|
|
23810
|
+
const date = adapter.date(props.max);
|
|
23811
|
+
return adapter.isValid(date) ? date : null;
|
|
23812
|
+
});
|
|
23813
|
+
function clampDate(date) {
|
|
23814
|
+
if (minDate.value && adapter.isBefore(date, minDate.value)) {
|
|
23815
|
+
return minDate.value;
|
|
23816
|
+
}
|
|
23817
|
+
if (maxDate.value && adapter.isAfter(date, maxDate.value)) {
|
|
23818
|
+
return maxDate.value;
|
|
23819
|
+
}
|
|
23820
|
+
return date;
|
|
23821
|
+
}
|
|
23822
|
+
function isInAllowedRange(date) {
|
|
23823
|
+
return (!minDate.value || adapter.isAfter(date, minDate.value)) && (!maxDate.value || adapter.isBefore(date, maxDate.value));
|
|
23824
|
+
}
|
|
23825
|
+
return {
|
|
23826
|
+
minDate,
|
|
23827
|
+
maxDate,
|
|
23828
|
+
clampDate,
|
|
23829
|
+
isInAllowedRange
|
|
23830
|
+
};
|
|
23831
|
+
}
|
|
23795
23832
|
|
|
23796
23833
|
// Types
|
|
23797
23834
|
|
|
@@ -24232,24 +24269,14 @@
|
|
|
24232
24269
|
const viewMode = useProxiedModel(props, 'viewMode');
|
|
24233
24270
|
// const inputMode = useProxiedModel(props, 'inputMode')
|
|
24234
24271
|
|
|
24235
|
-
const
|
|
24236
|
-
|
|
24237
|
-
|
|
24238
|
-
|
|
24239
|
-
|
|
24240
|
-
const date = adapter.date(props.max);
|
|
24241
|
-
return props.max && adapter.isValid(date) ? date : null;
|
|
24242
|
-
});
|
|
24272
|
+
const {
|
|
24273
|
+
minDate,
|
|
24274
|
+
maxDate,
|
|
24275
|
+
clampDate
|
|
24276
|
+
} = useCalendarRange(props);
|
|
24243
24277
|
const internal = vue.computed(() => {
|
|
24244
24278
|
const today = adapter.date();
|
|
24245
|
-
|
|
24246
|
-
if (model.value?.[0]) {
|
|
24247
|
-
value = adapter.date(model.value[0]);
|
|
24248
|
-
} else if (minDate.value && adapter.isBefore(today, minDate.value)) {
|
|
24249
|
-
value = minDate.value;
|
|
24250
|
-
} else if (maxDate.value && adapter.isAfter(today, maxDate.value)) {
|
|
24251
|
-
value = maxDate.value;
|
|
24252
|
-
}
|
|
24279
|
+
const value = model.value?.[0] ? adapter.date(model.value[0]) : clampDate(today);
|
|
24253
24280
|
return value && adapter.isValid(value) ? value : today;
|
|
24254
24281
|
});
|
|
24255
24282
|
const headerColor = vue.toRef(() => props.headerColor ?? props.color);
|
|
@@ -30036,14 +30063,24 @@
|
|
|
30036
30063
|
}
|
|
30037
30064
|
function onInput(e) {
|
|
30038
30065
|
const el = e.target;
|
|
30039
|
-
|
|
30040
|
-
|
|
30041
|
-
|
|
30042
|
-
vue.nextTick(() => {
|
|
30043
|
-
el.selectionStart = caretPosition[0];
|
|
30044
|
-
el.selectionEnd = caretPosition[1];
|
|
30045
|
-
});
|
|
30066
|
+
if (!props.modelModifiers?.trim) {
|
|
30067
|
+
model.value = el.value;
|
|
30068
|
+
return;
|
|
30046
30069
|
}
|
|
30070
|
+
const value = el.value;
|
|
30071
|
+
const start = el.selectionStart;
|
|
30072
|
+
const end = el.selectionEnd;
|
|
30073
|
+
model.value = value;
|
|
30074
|
+
vue.nextTick(() => {
|
|
30075
|
+
let offset = 0;
|
|
30076
|
+
if (value.trimStart().length === el.value.length) {
|
|
30077
|
+
// #22307 - Whitespace has been removed from the
|
|
30078
|
+
// start, offset the caret position to compensate
|
|
30079
|
+
offset = value.length - el.value.length;
|
|
30080
|
+
}
|
|
30081
|
+
if (start != null) el.selectionStart = start - offset;
|
|
30082
|
+
if (end != null) el.selectionEnd = end - offset;
|
|
30083
|
+
});
|
|
30047
30084
|
}
|
|
30048
30085
|
const sizerRef = vue.ref();
|
|
30049
30086
|
const rows = vue.ref(Number(props.rows));
|
|
@@ -34842,15 +34879,10 @@
|
|
|
34842
34879
|
const {
|
|
34843
34880
|
mobile
|
|
34844
34881
|
} = useDisplay(props);
|
|
34845
|
-
const
|
|
34846
|
-
|
|
34847
|
-
|
|
34848
|
-
|
|
34849
|
-
if (props.min && adapter.isBefore(date, props.min)) {
|
|
34850
|
-
return props.min;
|
|
34851
|
-
}
|
|
34852
|
-
return date;
|
|
34853
|
-
};
|
|
34882
|
+
const {
|
|
34883
|
+
clampDate,
|
|
34884
|
+
isInAllowedRange
|
|
34885
|
+
} = useCalendarRange(props);
|
|
34854
34886
|
const emptyModelValue = () => props.multiple ? [] : null;
|
|
34855
34887
|
const model = useProxiedModel(props, 'modelValue', emptyModelValue(), val => Array.isArray(val) ? val.map(item => adapter.toJsDate(item)) : val ? adapter.toJsDate(val) : val, val => Array.isArray(val) ? val.map(item => adapter.date(item)) : val ? adapter.date(val) : val);
|
|
34856
34888
|
const menu = useProxiedModel(props, 'menu');
|
|
@@ -34946,16 +34978,16 @@
|
|
|
34946
34978
|
model.value = emptyModelValue();
|
|
34947
34979
|
} else if (!props.multiple) {
|
|
34948
34980
|
if (isValid(value)) {
|
|
34949
|
-
model.value =
|
|
34981
|
+
model.value = clampDate(parseDate(value));
|
|
34950
34982
|
}
|
|
34951
34983
|
} else {
|
|
34952
34984
|
const parts = value.trim().split(/\D+-\D+|[^\d\-/.]+/);
|
|
34953
34985
|
if (parts.every(isValid)) {
|
|
34954
34986
|
if (props.multiple === 'range') {
|
|
34955
|
-
const [start, stop] = parts.map(parseDate).map(
|
|
34987
|
+
const [start, stop] = parts.map(parseDate).map(clampDate).toSorted((a, b) => adapter.isAfter(a, b) ? 1 : -1);
|
|
34956
34988
|
model.value = createDateRange(adapter, start, stop);
|
|
34957
34989
|
} else {
|
|
34958
|
-
model.value = parts.map(parseDate).
|
|
34990
|
+
model.value = parts.map(parseDate).filter(isInAllowedRange);
|
|
34959
34991
|
}
|
|
34960
34992
|
}
|
|
34961
34993
|
}
|
|
@@ -36569,7 +36601,7 @@
|
|
|
36569
36601
|
|
|
36570
36602
|
// Key display tuple: [mode, content] where content is string or IconValue
|
|
36571
36603
|
|
|
36572
|
-
// Key tuple: [mode, content] where content is string or IconValue
|
|
36604
|
+
// Key tuple: [mode, content, keycode] where content is string or IconValue
|
|
36573
36605
|
|
|
36574
36606
|
function processKey(config, requestedMode, isMac) {
|
|
36575
36607
|
const keyCfg = isMac && config.mac ? config.mac : config.default;
|
|
@@ -36708,15 +36740,6 @@
|
|
|
36708
36740
|
}
|
|
36709
36741
|
}
|
|
36710
36742
|
};
|
|
36711
|
-
|
|
36712
|
-
// Create custom variant props that extend the base variant props with our 'contained' option
|
|
36713
|
-
const makeVHotkeyVariantProps = propsFactory({
|
|
36714
|
-
variant: {
|
|
36715
|
-
type: String,
|
|
36716
|
-
default: 'elevated',
|
|
36717
|
-
validator: v => ['elevated', 'flat', 'tonal', 'outlined', 'text', 'plain', 'contained'].includes(v)
|
|
36718
|
-
}
|
|
36719
|
-
}, 'VHotkeyVariant');
|
|
36720
36743
|
const makeVHotkeyProps = propsFactory({
|
|
36721
36744
|
// String representing keyboard shortcuts (e.g., "ctrl+k", "meta+shift+p")
|
|
36722
36745
|
keys: String,
|
|
@@ -36738,30 +36761,21 @@
|
|
|
36738
36761
|
disabled: Boolean,
|
|
36739
36762
|
prefix: String,
|
|
36740
36763
|
suffix: String,
|
|
36764
|
+
variant: {
|
|
36765
|
+
type: String,
|
|
36766
|
+
default: 'elevated',
|
|
36767
|
+
validator: v => ['elevated', 'flat', 'tonal', 'outlined', 'text', 'plain', 'contained'].includes(v)
|
|
36768
|
+
},
|
|
36741
36769
|
...makeComponentProps(),
|
|
36742
36770
|
...makeThemeProps(),
|
|
36743
36771
|
...makeBorderProps(),
|
|
36744
36772
|
...makeRoundedProps(),
|
|
36745
36773
|
...makeElevationProps(),
|
|
36746
|
-
...makeVHotkeyVariantProps(),
|
|
36747
36774
|
color: String
|
|
36748
36775
|
}, 'VHotkey');
|
|
36749
|
-
|
|
36750
|
-
|
|
36751
|
-
|
|
36752
|
-
throw new Error('Not a valid delineator');
|
|
36753
|
-
}
|
|
36754
|
-
}
|
|
36755
|
-
isEqual(d) {
|
|
36756
|
-
return this.val === d.val;
|
|
36757
|
-
}
|
|
36758
|
-
}
|
|
36759
|
-
function isDelineator(value) {
|
|
36760
|
-
return value instanceof Delineator;
|
|
36761
|
-
}
|
|
36762
|
-
function isString(value) {
|
|
36763
|
-
return typeof value === 'string';
|
|
36764
|
-
}
|
|
36776
|
+
const AND_DELINEATOR = Symbol('VHotkey:AND_DELINEATOR'); // For + separators
|
|
36777
|
+
const THEN_DELINEATOR = Symbol('VHotkey:THEN_DELINEATOR'); // For - separators
|
|
36778
|
+
|
|
36765
36779
|
function getKeyText(keyMap, key, isMac) {
|
|
36766
36780
|
const lowerKey = key.toLowerCase();
|
|
36767
36781
|
if (lowerKey in keyMap) {
|
|
@@ -36803,57 +36817,38 @@
|
|
|
36803
36817
|
const {
|
|
36804
36818
|
elevationClasses
|
|
36805
36819
|
} = useElevation(props);
|
|
36806
|
-
const isContainedVariant = vue.computed(() => props.variant === 'contained');
|
|
36807
|
-
const effectiveVariantProps = vue.computed(() => ({
|
|
36808
|
-
...props,
|
|
36809
|
-
variant: isContainedVariant.value ? 'elevated' : props.variant
|
|
36810
|
-
}));
|
|
36811
36820
|
const {
|
|
36812
36821
|
colorClasses,
|
|
36813
36822
|
colorStyles,
|
|
36814
36823
|
variantClasses
|
|
36815
|
-
} = useVariant(
|
|
36824
|
+
} = useVariant(() => ({
|
|
36825
|
+
color: props.color,
|
|
36826
|
+
variant: props.variant === 'contained' ? 'elevated' : props.variant
|
|
36827
|
+
}));
|
|
36816
36828
|
const isMac = vue.computed(() => props.platform === 'auto' ? typeof navigator !== 'undefined' && /macintosh/i.test(navigator.userAgent) : props.platform === 'mac');
|
|
36817
|
-
const effectiveDisplayMode = vue.computed(() => props.displayMode);
|
|
36818
|
-
const AND_DELINEATOR = new Delineator('and'); // For + separators
|
|
36819
|
-
const THEN_DELINEATOR = new Delineator('then'); // For - separators
|
|
36820
|
-
|
|
36821
|
-
const effectiveKeyMap = vue.computed(() => props.keyMap);
|
|
36822
36829
|
const keyCombinations = vue.computed(() => {
|
|
36823
36830
|
if (!props.keys) return [];
|
|
36824
36831
|
|
|
36825
36832
|
// Split by spaces to handle multiple key combinations
|
|
36826
36833
|
// Example: "ctrl+k meta+p" -> ["ctrl+k", "meta+p"]
|
|
36827
36834
|
return props.keys.split(' ').map(combination => {
|
|
36828
|
-
|
|
36835
|
+
const result = [];
|
|
36829
36836
|
const sequenceGroups = splitKeySequence(combination);
|
|
36830
|
-
|
|
36831
|
-
|
|
36832
|
-
return sequenceGroups.flatMap((group, groupIndex) => {
|
|
36833
|
-
// Use the shared key combination splitting logic
|
|
36834
|
-
const keyParts = splitKeyCombination(group);
|
|
36835
|
-
const parts = keyParts.reduce((acc, part, index) => {
|
|
36836
|
-
if (index !== 0) {
|
|
36837
|
-
// Add AND delineator between keys
|
|
36838
|
-
return [...acc, AND_DELINEATOR, part];
|
|
36839
|
-
}
|
|
36840
|
-
return [...acc, part];
|
|
36841
|
-
}, []);
|
|
36837
|
+
for (let i = 0; i < sequenceGroups.length; i++) {
|
|
36838
|
+
const group = sequenceGroups[i];
|
|
36842
36839
|
|
|
36843
36840
|
// Add THEN delineator between sequence groups
|
|
36844
|
-
|
|
36845
|
-
|
|
36846
|
-
|
|
36847
|
-
|
|
36848
|
-
return key;
|
|
36849
|
-
});
|
|
36841
|
+
if (i > 0) result.push(THEN_DELINEATOR);
|
|
36842
|
+
const keyParts = splitKeyCombination(group);
|
|
36843
|
+
for (let j = 0; j < keyParts.length; j++) {
|
|
36844
|
+
const part = keyParts[j];
|
|
36850
36845
|
|
|
36851
|
-
|
|
36852
|
-
|
|
36853
|
-
result.push(
|
|
36846
|
+
// Add AND delineator between keys
|
|
36847
|
+
if (j > 0) result.push(AND_DELINEATOR);
|
|
36848
|
+
result.push(applyDisplayModeToKey(props.keyMap, props.displayMode, part, isMac.value));
|
|
36854
36849
|
}
|
|
36855
|
-
|
|
36856
|
-
|
|
36850
|
+
}
|
|
36851
|
+
return result;
|
|
36857
36852
|
});
|
|
36858
36853
|
});
|
|
36859
36854
|
const accessibleLabel = vue.computed(() => {
|
|
@@ -36863,16 +36858,16 @@
|
|
|
36863
36858
|
const readableShortcuts = keyCombinations.value.map(combination => {
|
|
36864
36859
|
const readableParts = [];
|
|
36865
36860
|
for (const key of combination) {
|
|
36866
|
-
if (
|
|
36867
|
-
if (AND_DELINEATOR.isEqual(key)) {
|
|
36868
|
-
readableParts.push(t('$vuetify.hotkey.plus'));
|
|
36869
|
-
} else if (THEN_DELINEATOR.isEqual(key)) {
|
|
36870
|
-
readableParts.push(t('$vuetify.hotkey.then'));
|
|
36871
|
-
}
|
|
36872
|
-
} else {
|
|
36861
|
+
if (Array.isArray(key)) {
|
|
36873
36862
|
// Always use text representation for screen readers
|
|
36874
36863
|
const textKey = key[0] === 'icon' || key[0] === 'symbol' ? applyDisplayModeToKey(mergeDeep(hotkeyMap, props.keyMap), 'text', String(key[1]), isMac.value)[1] : key[1];
|
|
36875
36864
|
readableParts.push(translateKey(textKey));
|
|
36865
|
+
} else {
|
|
36866
|
+
if (key === AND_DELINEATOR) {
|
|
36867
|
+
readableParts.push(t('$vuetify.hotkey.plus'));
|
|
36868
|
+
} else if (key === THEN_DELINEATOR) {
|
|
36869
|
+
readableParts.push(t('$vuetify.hotkey.then'));
|
|
36870
|
+
}
|
|
36876
36871
|
}
|
|
36877
36872
|
}
|
|
36878
36873
|
return readableParts.join(' ');
|
|
@@ -36884,11 +36879,12 @@
|
|
|
36884
36879
|
return key.startsWith('$vuetify.') ? t(key) : key;
|
|
36885
36880
|
}
|
|
36886
36881
|
function getKeyTooltip(key) {
|
|
36887
|
-
if (
|
|
36888
|
-
const textKey = getKeyText(
|
|
36882
|
+
if (props.displayMode === 'text') return undefined;
|
|
36883
|
+
const textKey = getKeyText(props.keyMap, String(key[2]), isMac.value);
|
|
36889
36884
|
return translateKey(textKey);
|
|
36890
36885
|
}
|
|
36891
|
-
function renderKey(key, keyIndex
|
|
36886
|
+
function renderKey(key, keyIndex) {
|
|
36887
|
+
const isContained = props.variant === 'contained';
|
|
36892
36888
|
const KeyComponent = isContained ? 'kbd' : VKbd;
|
|
36893
36889
|
const keyClasses = ['v-hotkey__key', `v-hotkey__key-${key[0]}`, ...(isContained ? ['v-hotkey__key--nested'] : [borderClasses.value, roundedClasses.value, elevationClasses.value, colorClasses.value])];
|
|
36894
36890
|
return vue.createVNode(KeyComponent, {
|
|
@@ -36909,47 +36905,39 @@
|
|
|
36909
36905
|
"key": keyIndex,
|
|
36910
36906
|
"class": "v-hotkey__divider",
|
|
36911
36907
|
"aria-hidden": "true"
|
|
36912
|
-
}, [
|
|
36908
|
+
}, [key === AND_DELINEATOR ? '+' : t('$vuetify.hotkey.then')]);
|
|
36913
36909
|
}
|
|
36914
|
-
useRender(() =>
|
|
36915
|
-
|
|
36916
|
-
|
|
36917
|
-
'v-hotkey--inline': props.inline,
|
|
36918
|
-
'v-hotkey--contained': isContainedVariant.value
|
|
36919
|
-
}, themeClasses.value, rtlClasses.value, variantClasses.value, props.class]),
|
|
36920
|
-
"style": vue.normalizeStyle(props.style),
|
|
36921
|
-
"role": "img",
|
|
36922
|
-
"aria-label": accessibleLabel.value
|
|
36923
|
-
}, [isContainedVariant.value ? vue.createVNode(VKbd, {
|
|
36924
|
-
"key": "contained",
|
|
36925
|
-
"class": vue.normalizeClass(['v-hotkey__contained-wrapper', borderClasses.value, roundedClasses.value, elevationClasses.value, colorClasses.value]),
|
|
36926
|
-
"style": vue.normalizeStyle(colorStyles.value),
|
|
36927
|
-
"aria-hidden": "true"
|
|
36928
|
-
}, {
|
|
36929
|
-
default: () => [props.prefix && vue.createElementVNode("span", {
|
|
36930
|
-
"key": "contained-prefix",
|
|
36910
|
+
useRender(() => {
|
|
36911
|
+
const content = vue.createElementVNode(vue.Fragment, null, [props.prefix && vue.createElementVNode("span", {
|
|
36912
|
+
"key": "prefix",
|
|
36931
36913
|
"class": "v-hotkey__prefix"
|
|
36932
36914
|
}, [props.prefix]), keyCombinations.value.map((combination, comboIndex) => vue.createElementVNode("span", {
|
|
36933
36915
|
"class": "v-hotkey__combination",
|
|
36934
36916
|
"key": comboIndex
|
|
36935
|
-
}, [combination.map((key, keyIndex) =>
|
|
36917
|
+
}, [combination.map((key, keyIndex) => Array.isArray(key) ? renderKey(key, keyIndex) : renderDivider(key, keyIndex)), comboIndex < keyCombinations.value.length - 1 && vue.createElementVNode("span", {
|
|
36936
36918
|
"aria-hidden": "true"
|
|
36937
36919
|
}, [vue.createTextVNode("\xA0")])])), props.suffix && vue.createElementVNode("span", {
|
|
36938
|
-
"key": "
|
|
36920
|
+
"key": "suffix",
|
|
36939
36921
|
"class": "v-hotkey__suffix"
|
|
36940
|
-
}, [props.suffix])]
|
|
36941
|
-
|
|
36942
|
-
|
|
36943
|
-
|
|
36944
|
-
|
|
36945
|
-
|
|
36946
|
-
|
|
36947
|
-
|
|
36948
|
-
|
|
36949
|
-
|
|
36950
|
-
|
|
36951
|
-
|
|
36952
|
-
|
|
36922
|
+
}, [props.suffix])]);
|
|
36923
|
+
return vue.createElementVNode("div", {
|
|
36924
|
+
"class": vue.normalizeClass(['v-hotkey', {
|
|
36925
|
+
'v-hotkey--disabled': props.disabled,
|
|
36926
|
+
'v-hotkey--inline': props.inline,
|
|
36927
|
+
'v-hotkey--contained': props.variant === 'contained'
|
|
36928
|
+
}, themeClasses.value, rtlClasses.value, variantClasses.value, props.class]),
|
|
36929
|
+
"style": vue.normalizeStyle(props.style),
|
|
36930
|
+
"role": "img",
|
|
36931
|
+
"aria-label": accessibleLabel.value
|
|
36932
|
+
}, [props.variant !== 'contained' ? content : vue.createVNode(VKbd, {
|
|
36933
|
+
"key": "contained",
|
|
36934
|
+
"class": vue.normalizeClass(['v-hotkey__contained-wrapper', borderClasses.value, roundedClasses.value, elevationClasses.value, colorClasses.value]),
|
|
36935
|
+
"style": vue.normalizeStyle(colorStyles.value),
|
|
36936
|
+
"aria-hidden": "true"
|
|
36937
|
+
}, {
|
|
36938
|
+
default: () => [content]
|
|
36939
|
+
})]);
|
|
36940
|
+
});
|
|
36953
36941
|
}
|
|
36954
36942
|
});
|
|
36955
36943
|
|
|
@@ -38155,7 +38143,7 @@
|
|
|
38155
38143
|
};
|
|
38156
38144
|
});
|
|
38157
38145
|
}
|
|
38158
|
-
const version$1 = "3.10.
|
|
38146
|
+
const version$1 = "3.10.10";
|
|
38159
38147
|
createVuetify$1.version = version$1;
|
|
38160
38148
|
|
|
38161
38149
|
// Vue's inject() can only be used in setup
|
|
@@ -38453,7 +38441,7 @@
|
|
|
38453
38441
|
|
|
38454
38442
|
/* eslint-disable local-rules/sort-imports */
|
|
38455
38443
|
|
|
38456
|
-
const version = "3.10.
|
|
38444
|
+
const version = "3.10.10";
|
|
38457
38445
|
|
|
38458
38446
|
/* eslint-disable local-rules/sort-imports */
|
|
38459
38447
|
|