vuetify 3.8.0-beta.0 → 3.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_component-variables-labs.sass +1 -0
- package/dist/json/attributes.json +3162 -3030
- package/dist/json/importMap-labs.json +32 -28
- package/dist/json/importMap.json +166 -166
- package/dist/json/tags.json +38 -0
- package/dist/json/web-types.json +6016 -5639
- package/dist/vuetify-labs.cjs +320 -55
- package/dist/vuetify-labs.css +5453 -5271
- package/dist/vuetify-labs.d.ts +612 -267
- package/dist/vuetify-labs.esm.js +320 -55
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +320 -55
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.cjs +74 -36
- package/dist/vuetify.cjs.map +1 -1
- package/dist/vuetify.css +3042 -3037
- package/dist/vuetify.d.ts +161 -178
- package/dist/vuetify.esm.js +74 -36
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +74 -36
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +32 -32
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.js +5 -10
- package/lib/components/VAutocomplete/VAutocomplete.js.map +1 -1
- package/lib/components/VColorPicker/VColorPickerPreview.js +4 -3
- package/lib/components/VColorPicker/VColorPickerPreview.js.map +1 -1
- package/lib/components/VConfirmEdit/VConfirmEdit.d.ts +31 -6
- package/lib/components/VConfirmEdit/VConfirmEdit.js +17 -2
- package/lib/components/VConfirmEdit/VConfirmEdit.js.map +1 -1
- package/lib/components/VDataTable/VDataTable.d.ts +4 -4
- package/lib/components/VDataTable/VDataTableRow.d.ts +9 -6
- package/lib/components/VDataTable/VDataTableRow.js +18 -3
- package/lib/components/VDataTable/VDataTableRow.js.map +1 -1
- package/lib/components/VDataTable/VDataTableRows.d.ts +4 -4
- package/lib/components/VDataTable/VDataTableServer.d.ts +4 -4
- package/lib/components/VDataTable/VDataTableVirtual.d.ts +4 -4
- package/lib/components/VDatePicker/VDatePicker.d.ts +33 -78
- package/lib/components/VDatePicker/VDatePicker.js +1 -1
- package/lib/components/VDatePicker/VDatePicker.js.map +1 -1
- package/lib/components/VDatePicker/VDatePickerMonth.d.ts +33 -78
- package/lib/components/VEmptyState/VEmptyState.js +3 -1
- package/lib/components/VEmptyState/VEmptyState.js.map +1 -1
- package/lib/components/VField/VField.css +2 -2
- package/lib/components/VField/VField.js +5 -1
- package/lib/components/VField/VField.js.map +1 -1
- package/lib/components/VField/_variables.scss +1 -1
- package/lib/components/VIcon/VIcon.css +1 -0
- package/lib/components/VIcon/VIcon.d.ts +10 -0
- package/lib/components/VIcon/VIcon.js +6 -3
- package/lib/components/VIcon/VIcon.js.map +1 -1
- package/lib/components/VIcon/VIcon.sass +1 -0
- package/lib/components/VInput/VInput.css +7 -7
- package/lib/components/VInput/VInput.sass +5 -2
- package/lib/composables/calendar.d.ts +12 -35
- package/lib/composables/calendar.js +12 -9
- package/lib/composables/calendar.js.map +1 -1
- package/lib/entry-bundler.js +1 -1
- package/lib/entry-bundler.js.map +1 -1
- package/lib/framework.d.ts +61 -60
- package/lib/framework.js +1 -1
- package/lib/framework.js.map +1 -1
- package/lib/labs/VCalendar/VCalendar.d.ts +33 -78
- package/lib/labs/VDateInput/VDateInput.d.ts +103 -81
- package/lib/labs/VDateInput/VDateInput.js +77 -19
- package/lib/labs/VDateInput/VDateInput.js.map +1 -1
- package/lib/labs/VFileUpload/VFileUpload.js +2 -1
- package/lib/labs/VFileUpload/VFileUpload.js.map +1 -1
- package/lib/labs/VIconBtn/VIconBtn.css +178 -0
- package/lib/labs/VIconBtn/VIconBtn.d.ts +608 -0
- package/lib/labs/VIconBtn/VIconBtn.js +184 -0
- package/lib/labs/VIconBtn/VIconBtn.js.map +1 -0
- package/lib/labs/VIconBtn/VIconBtn.scss +110 -0
- package/lib/labs/VIconBtn/_variables.scss +36 -0
- package/lib/labs/VIconBtn/index.d.ts +1 -0
- package/lib/labs/VIconBtn/index.js +2 -0
- package/lib/labs/VIconBtn/index.js.map +1 -0
- package/lib/labs/components.d.ts +1 -0
- package/lib/labs/components.js +1 -0
- package/lib/labs/components.js.map +1 -1
- package/lib/styles/main.css +4 -0
- package/lib/styles/settings/_utilities.scss +5 -0
- package/lib/util/helpers.d.ts +1 -2
- package/lib/util/helpers.js +2 -12
- package/lib/util/helpers.js.map +1 -1
- package/package.json +2 -2
package/dist/vuetify-labs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Vuetify v3.8.0
|
|
2
|
+
* Vuetify v3.8.0
|
|
3
3
|
* Forged by John Leider
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -233,7 +233,7 @@
|
|
|
233
233
|
function pick(obj, paths) {
|
|
234
234
|
const found = {};
|
|
235
235
|
for (const key of paths) {
|
|
236
|
-
if (Object.
|
|
236
|
+
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
237
237
|
found[key] = obj[key];
|
|
238
238
|
}
|
|
239
239
|
}
|
|
@@ -4667,6 +4667,7 @@
|
|
|
4667
4667
|
start: Boolean,
|
|
4668
4668
|
end: Boolean,
|
|
4669
4669
|
icon: IconValue,
|
|
4670
|
+
opacity: [String, Number],
|
|
4670
4671
|
...makeComponentProps(),
|
|
4671
4672
|
...makeSizeProps(),
|
|
4672
4673
|
...makeTagProps({
|
|
@@ -4685,7 +4686,7 @@
|
|
|
4685
4686
|
const slotIcon = vue.ref();
|
|
4686
4687
|
const {
|
|
4687
4688
|
themeClasses
|
|
4688
|
-
} =
|
|
4689
|
+
} = useTheme();
|
|
4689
4690
|
const {
|
|
4690
4691
|
iconData
|
|
4691
4692
|
} = useIcon(vue.computed(() => slotIcon.value || props.icon));
|
|
@@ -4711,7 +4712,9 @@
|
|
|
4711
4712
|
'v-icon--start': props.start,
|
|
4712
4713
|
'v-icon--end': props.end
|
|
4713
4714
|
}, props.class],
|
|
4714
|
-
"style": [
|
|
4715
|
+
"style": [{
|
|
4716
|
+
'--v-icon-opacity': props.opacity
|
|
4717
|
+
}, !sizeClasses.value ? {
|
|
4715
4718
|
fontSize: convertToUnit(props.size),
|
|
4716
4719
|
height: convertToUnit(props.size),
|
|
4717
4720
|
width: convertToUnit(props.size)
|
|
@@ -11867,7 +11870,11 @@
|
|
|
11867
11870
|
},
|
|
11868
11871
|
focus,
|
|
11869
11872
|
blur
|
|
11870
|
-
})
|
|
11873
|
+
}) ?? vue.createVNode("div", {
|
|
11874
|
+
"id": id.value,
|
|
11875
|
+
"class": "v-field__input",
|
|
11876
|
+
"aria-describedby": messagesId.value
|
|
11877
|
+
}, null)]), hasClear && vue.createVNode(VExpandXTransition, {
|
|
11871
11878
|
"key": "clear"
|
|
11872
11879
|
}, {
|
|
11873
11880
|
default: () => [vue.withDirectives(vue.createVNode("div", {
|
|
@@ -13399,12 +13406,7 @@
|
|
|
13399
13406
|
} else {
|
|
13400
13407
|
if (!props.multiple && search.value == null) model.value = [];
|
|
13401
13408
|
menu.value = false;
|
|
13402
|
-
if (
|
|
13403
|
-
let {
|
|
13404
|
-
title
|
|
13405
|
-
} = _ref3;
|
|
13406
|
-
return title === search.value;
|
|
13407
|
-
})) search.value = '';
|
|
13409
|
+
if (props.multiple || hasSelectionSlot.value) search.value = '';
|
|
13408
13410
|
selectionIndex.value = -1;
|
|
13409
13411
|
}
|
|
13410
13412
|
});
|
|
@@ -13492,12 +13494,12 @@
|
|
|
13492
13494
|
"items": displayItems.value,
|
|
13493
13495
|
"itemKey": "value"
|
|
13494
13496
|
}, {
|
|
13495
|
-
default:
|
|
13497
|
+
default: _ref3 => {
|
|
13496
13498
|
let {
|
|
13497
13499
|
item,
|
|
13498
13500
|
index,
|
|
13499
13501
|
itemRef
|
|
13500
|
-
} =
|
|
13502
|
+
} = _ref3;
|
|
13501
13503
|
const itemProps = vue.mergeProps(item.props, {
|
|
13502
13504
|
ref: itemRef,
|
|
13503
13505
|
key: item.value,
|
|
@@ -13511,10 +13513,10 @@
|
|
|
13511
13513
|
}) ?? vue.createVNode(VListItem, vue.mergeProps(itemProps, {
|
|
13512
13514
|
"role": "option"
|
|
13513
13515
|
}), {
|
|
13514
|
-
prepend:
|
|
13516
|
+
prepend: _ref4 => {
|
|
13515
13517
|
let {
|
|
13516
13518
|
isSelected
|
|
13517
|
-
} =
|
|
13519
|
+
} = _ref4;
|
|
13518
13520
|
return vue.createVNode(vue.Fragment, null, [props.multiple && !props.hideSelected ? vue.createVNode(VCheckboxBtn, {
|
|
13519
13521
|
"key": item.value,
|
|
13520
13522
|
"modelValue": isSelected,
|
|
@@ -16383,7 +16385,7 @@
|
|
|
16383
16385
|
const abortController = new AbortController();
|
|
16384
16386
|
vue.onUnmounted(() => abortController.abort());
|
|
16385
16387
|
async function openEyeDropper() {
|
|
16386
|
-
if (!SUPPORTS_EYE_DROPPER) return;
|
|
16388
|
+
if (!SUPPORTS_EYE_DROPPER || props.disabled) return;
|
|
16387
16389
|
const eyeDropper = new window.EyeDropper();
|
|
16388
16390
|
try {
|
|
16389
16391
|
const result = await eyeDropper.open({
|
|
@@ -16405,10 +16407,11 @@
|
|
|
16405
16407
|
"class": "v-color-picker-preview__eye-dropper",
|
|
16406
16408
|
"key": "eyeDropper"
|
|
16407
16409
|
}, [vue.createVNode(VBtn, {
|
|
16408
|
-
"
|
|
16410
|
+
"density": "comfortable",
|
|
16411
|
+
"disabled": props.disabled,
|
|
16409
16412
|
"icon": "$eyeDropper",
|
|
16410
16413
|
"variant": "plain",
|
|
16411
|
-
"
|
|
16414
|
+
"onClick": openEyeDropper
|
|
16412
16415
|
}, null)]), vue.createVNode("div", {
|
|
16413
16416
|
"class": "v-color-picker-preview__dot"
|
|
16414
16417
|
}, [vue.createVNode("div", {
|
|
@@ -18436,6 +18439,10 @@
|
|
|
18436
18439
|
type: String,
|
|
18437
18440
|
default: '$vuetify.confirmEdit.ok'
|
|
18438
18441
|
},
|
|
18442
|
+
disabled: {
|
|
18443
|
+
type: [Boolean, Array],
|
|
18444
|
+
default: undefined
|
|
18445
|
+
},
|
|
18439
18446
|
hideActions: Boolean
|
|
18440
18447
|
}, 'VConfirmEdit');
|
|
18441
18448
|
const VConfirmEdit = genericComponent()({
|
|
@@ -18462,6 +18469,17 @@
|
|
|
18462
18469
|
const isPristine = vue.computed(() => {
|
|
18463
18470
|
return deepEqual(model.value, internalModel.value);
|
|
18464
18471
|
});
|
|
18472
|
+
function isActionDisabled(action) {
|
|
18473
|
+
if (typeof props.disabled === 'boolean') {
|
|
18474
|
+
return props.disabled;
|
|
18475
|
+
}
|
|
18476
|
+
if (Array.isArray(props.disabled)) {
|
|
18477
|
+
return props.disabled.includes(action);
|
|
18478
|
+
}
|
|
18479
|
+
return isPristine.value;
|
|
18480
|
+
}
|
|
18481
|
+
const isSaveDisabled = vue.computed(() => isActionDisabled('save'));
|
|
18482
|
+
const isCancelDisabled = vue.computed(() => isActionDisabled('cancel'));
|
|
18465
18483
|
function save() {
|
|
18466
18484
|
model.value = internalModel.value;
|
|
18467
18485
|
emit('save', internalModel.value);
|
|
@@ -18472,13 +18490,13 @@
|
|
|
18472
18490
|
}
|
|
18473
18491
|
function actions(actionsProps) {
|
|
18474
18492
|
return vue.createVNode(vue.Fragment, null, [vue.createVNode(VBtn, vue.mergeProps({
|
|
18475
|
-
"disabled":
|
|
18493
|
+
"disabled": isCancelDisabled.value,
|
|
18476
18494
|
"variant": "text",
|
|
18477
18495
|
"color": props.color,
|
|
18478
18496
|
"onClick": cancel,
|
|
18479
18497
|
"text": t(props.cancelText)
|
|
18480
18498
|
}, actionsProps), null), vue.createVNode(VBtn, vue.mergeProps({
|
|
18481
|
-
"disabled":
|
|
18499
|
+
"disabled": isSaveDisabled.value,
|
|
18482
18500
|
"variant": "text",
|
|
18483
18501
|
"color": props.color,
|
|
18484
18502
|
"onClick": save,
|
|
@@ -20564,22 +20582,37 @@
|
|
|
20564
20582
|
"width": !mobile.value ? column.width : undefined
|
|
20565
20583
|
}, cellProps, columnCellProps), {
|
|
20566
20584
|
default: () => {
|
|
20567
|
-
if (slots[slotName] && !mobile.value) return slots[slotName]?.(slotProps);
|
|
20568
20585
|
if (column.key === 'data-table-select') {
|
|
20569
|
-
return slots['item.data-table-select']?.(
|
|
20586
|
+
return slots['item.data-table-select']?.({
|
|
20587
|
+
...slotProps,
|
|
20588
|
+
props: {
|
|
20589
|
+
disabled: !item.selectable,
|
|
20590
|
+
modelValue: isSelected([item]),
|
|
20591
|
+
onClick: vue.withModifiers(() => toggleSelect(item), ['stop'])
|
|
20592
|
+
}
|
|
20593
|
+
}) ?? vue.createVNode(VCheckboxBtn, {
|
|
20570
20594
|
"disabled": !item.selectable,
|
|
20571
20595
|
"modelValue": isSelected([item]),
|
|
20572
20596
|
"onClick": vue.withModifiers(event => toggleSelect(item, props.index, event), ['stop'])
|
|
20573
20597
|
}, null);
|
|
20574
20598
|
}
|
|
20575
20599
|
if (column.key === 'data-table-expand') {
|
|
20576
|
-
return slots['item.data-table-expand']?.(
|
|
20600
|
+
return slots['item.data-table-expand']?.({
|
|
20601
|
+
...slotProps,
|
|
20602
|
+
props: {
|
|
20603
|
+
icon: isExpanded(item) ? '$collapse' : '$expand',
|
|
20604
|
+
size: 'small',
|
|
20605
|
+
variant: 'text',
|
|
20606
|
+
onClick: vue.withModifiers(() => toggleExpand(item), ['stop'])
|
|
20607
|
+
}
|
|
20608
|
+
}) ?? vue.createVNode(VBtn, {
|
|
20577
20609
|
"icon": isExpanded(item) ? '$collapse' : '$expand',
|
|
20578
20610
|
"size": "small",
|
|
20579
20611
|
"variant": "text",
|
|
20580
20612
|
"onClick": vue.withModifiers(() => toggleExpand(item), ['stop'])
|
|
20581
20613
|
}, null);
|
|
20582
20614
|
}
|
|
20615
|
+
if (slots[slotName] && !mobile.value) return slots[slotName](slotProps);
|
|
20583
20616
|
const displayValue = vue.toDisplayString(slotProps.value);
|
|
20584
20617
|
return !mobile.value ? displayValue : vue.createVNode(vue.Fragment, null, [vue.createVNode("div", {
|
|
20585
20618
|
"class": "v-data-table__td-title"
|
|
@@ -21918,11 +21951,14 @@
|
|
|
21918
21951
|
type: String,
|
|
21919
21952
|
default: 'dynamic'
|
|
21920
21953
|
},
|
|
21921
|
-
firstDayOfWeek:
|
|
21954
|
+
firstDayOfWeek: {
|
|
21955
|
+
type: [Number, String],
|
|
21956
|
+
default: 0
|
|
21957
|
+
}
|
|
21922
21958
|
}, 'calendar');
|
|
21923
21959
|
function useCalendar(props) {
|
|
21924
21960
|
const adapter = useDate();
|
|
21925
|
-
const model = useProxiedModel(props, 'modelValue', [], v => wrapInArray(v));
|
|
21961
|
+
const model = useProxiedModel(props, 'modelValue', [], v => wrapInArray(v).map(i => adapter.date(i)));
|
|
21926
21962
|
const displayValue = vue.computed(() => {
|
|
21927
21963
|
if (props.displayValue) return adapter.date(props.displayValue);
|
|
21928
21964
|
if (model.value.length > 0) return adapter.date(model.value[0]);
|
|
@@ -21939,15 +21975,15 @@
|
|
|
21939
21975
|
const date = adapter.setYear(adapter.startOfMonth(adapter.date()), adapter.getYear(year.value));
|
|
21940
21976
|
return adapter.setMonth(date, value);
|
|
21941
21977
|
}, v => adapter.getMonth(v));
|
|
21942
|
-
const defaultFirstDayOfWeek = vue.computed(() => {
|
|
21943
|
-
return props.firstDayOfWeek ?? props.weekdays[0];
|
|
21944
|
-
});
|
|
21945
21978
|
const weekDays = vue.computed(() => {
|
|
21946
|
-
const firstDayOfWeek = Number(props.firstDayOfWeek
|
|
21947
|
-
|
|
21979
|
+
const firstDayOfWeek = Number(props.firstDayOfWeek);
|
|
21980
|
+
|
|
21981
|
+
// Always generate all days, regardless of props.weekdays
|
|
21982
|
+
return [0, 1, 2, 3, 4, 5, 6].map(day => (day + firstDayOfWeek) % 7);
|
|
21948
21983
|
});
|
|
21949
21984
|
const weeksInMonth = vue.computed(() => {
|
|
21950
|
-
const
|
|
21985
|
+
const firstDayOfWeek = Number(props.firstDayOfWeek);
|
|
21986
|
+
const weeks = adapter.getWeekArray(month.value, firstDayOfWeek);
|
|
21951
21987
|
const days = weeks.flat();
|
|
21952
21988
|
|
|
21953
21989
|
// Make sure there's always 6 weeks in month (6 * 7 days)
|
|
@@ -22025,7 +22061,7 @@
|
|
|
22025
22061
|
if (typeof props.allowedDates === 'function') {
|
|
22026
22062
|
return !props.allowedDates(date);
|
|
22027
22063
|
}
|
|
22028
|
-
return
|
|
22064
|
+
return !props.weekdays.includes(adapter.toJsDate(date).getDay());
|
|
22029
22065
|
}
|
|
22030
22066
|
return {
|
|
22031
22067
|
displayValue,
|
|
@@ -22435,7 +22471,7 @@
|
|
|
22435
22471
|
const {
|
|
22436
22472
|
rtlClasses
|
|
22437
22473
|
} = useRtl();
|
|
22438
|
-
const model = useProxiedModel(props, 'modelValue', undefined, v => wrapInArray(v), v => props.multiple ? v : v[0]);
|
|
22474
|
+
const model = useProxiedModel(props, 'modelValue', undefined, v => wrapInArray(v).map(i => adapter.date(i)), v => props.multiple ? v : v[0]);
|
|
22439
22475
|
const viewMode = useProxiedModel(props, 'viewMode');
|
|
22440
22476
|
// const inputMode = useProxiedModel(props, 'inputMode')
|
|
22441
22477
|
|
|
@@ -22760,7 +22796,9 @@
|
|
|
22760
22796
|
VBtn: {
|
|
22761
22797
|
class: 'v-empty-state__action-btn',
|
|
22762
22798
|
color: props.color ?? 'surface-variant',
|
|
22763
|
-
|
|
22799
|
+
href: props.href,
|
|
22800
|
+
text: props.actionText,
|
|
22801
|
+
to: props.to
|
|
22764
22802
|
}
|
|
22765
22803
|
}
|
|
22766
22804
|
}, {
|
|
@@ -28913,12 +28951,16 @@
|
|
|
28913
28951
|
// Types
|
|
28914
28952
|
|
|
28915
28953
|
const makeVDateInputProps = propsFactory({
|
|
28954
|
+
displayFormat: [Function, String],
|
|
28916
28955
|
location: {
|
|
28917
28956
|
type: String,
|
|
28918
28957
|
default: 'bottom start'
|
|
28919
28958
|
},
|
|
28959
|
+
...makeDisplayProps(),
|
|
28920
28960
|
...makeFocusProps(),
|
|
28921
|
-
...makeVConfirmEditProps(
|
|
28961
|
+
...makeVConfirmEditProps({
|
|
28962
|
+
hideActions: true
|
|
28963
|
+
}),
|
|
28922
28964
|
...makeVTextFieldProps({
|
|
28923
28965
|
placeholder: 'mm/dd/yyyy',
|
|
28924
28966
|
prependIcon: '$calendar'
|
|
@@ -28932,16 +28974,22 @@
|
|
|
28932
28974
|
name: 'VDateInput',
|
|
28933
28975
|
props: makeVDateInputProps(),
|
|
28934
28976
|
emits: {
|
|
28977
|
+
save: value => true,
|
|
28978
|
+
cancel: () => true,
|
|
28935
28979
|
'update:modelValue': val => true
|
|
28936
28980
|
},
|
|
28937
28981
|
setup(props, _ref) {
|
|
28938
28982
|
let {
|
|
28983
|
+
emit,
|
|
28939
28984
|
slots
|
|
28940
28985
|
} = _ref;
|
|
28941
28986
|
const {
|
|
28942
28987
|
t
|
|
28943
28988
|
} = useLocale();
|
|
28944
28989
|
const adapter = useDate();
|
|
28990
|
+
const {
|
|
28991
|
+
mobile
|
|
28992
|
+
} = useDisplay(props);
|
|
28945
28993
|
const {
|
|
28946
28994
|
isFocused,
|
|
28947
28995
|
focus,
|
|
@@ -28949,7 +28997,15 @@
|
|
|
28949
28997
|
} = useFocus(props);
|
|
28950
28998
|
const model = useProxiedModel(props, 'modelValue', props.multiple ? [] : null, 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);
|
|
28951
28999
|
const menu = vue.shallowRef(false);
|
|
29000
|
+
const isEditingInput = vue.shallowRef(false);
|
|
28952
29001
|
const vDateInputRef = vue.ref();
|
|
29002
|
+
const disabledActions = vue.ref(['save']);
|
|
29003
|
+
function format(date) {
|
|
29004
|
+
if (typeof props.displayFormat === 'function') {
|
|
29005
|
+
return props.displayFormat(date);
|
|
29006
|
+
}
|
|
29007
|
+
return adapter.format(date, props.displayFormat ?? 'keyboardDate');
|
|
29008
|
+
}
|
|
28953
29009
|
const display = vue.computed(() => {
|
|
28954
29010
|
const value = wrapInArray(model.value);
|
|
28955
29011
|
if (!value.length) return null;
|
|
@@ -28959,11 +29015,23 @@
|
|
|
28959
29015
|
if (props.multiple === 'range') {
|
|
28960
29016
|
const start = value[0];
|
|
28961
29017
|
const end = value[value.length - 1];
|
|
28962
|
-
|
|
29018
|
+
if (!adapter.isValid(start) || !adapter.isValid(end)) return '';
|
|
29019
|
+
return `${format(adapter.date(start))} - ${format(adapter.date(end))}`;
|
|
28963
29020
|
}
|
|
28964
|
-
return adapter.isValid(model.value) ?
|
|
29021
|
+
return adapter.isValid(model.value) ? format(adapter.date(model.value)) : '';
|
|
29022
|
+
});
|
|
29023
|
+
const inputmode = vue.computed(() => {
|
|
29024
|
+
if (!mobile.value) return undefined;
|
|
29025
|
+
if (isEditingInput.value) return 'text';
|
|
29026
|
+
return 'none';
|
|
28965
29027
|
});
|
|
28966
29028
|
const isInteractive = vue.computed(() => !props.disabled && !props.readonly);
|
|
29029
|
+
const isReadonly = vue.computed(() => !(mobile.value && isEditingInput.value) && props.readonly);
|
|
29030
|
+
vue.watch(menu, val => {
|
|
29031
|
+
if (val) return;
|
|
29032
|
+
isEditingInput.value = false;
|
|
29033
|
+
disabledActions.value = ['save'];
|
|
29034
|
+
});
|
|
28967
29035
|
function onKeydown(e) {
|
|
28968
29036
|
if (e.key !== 'Enter') return;
|
|
28969
29037
|
if (!menu.value || !isFocused.value) {
|
|
@@ -28971,20 +29039,39 @@
|
|
|
28971
29039
|
return;
|
|
28972
29040
|
}
|
|
28973
29041
|
const target = e.target;
|
|
28974
|
-
model.value = target.value
|
|
29042
|
+
model.value = adapter.isValid(target.value) ? target.value : null;
|
|
28975
29043
|
}
|
|
28976
29044
|
function onClick(e) {
|
|
28977
29045
|
e.preventDefault();
|
|
28978
29046
|
e.stopPropagation();
|
|
28979
|
-
menu.value
|
|
29047
|
+
if (menu.value && mobile.value) {
|
|
29048
|
+
isEditingInput.value = true;
|
|
29049
|
+
} else {
|
|
29050
|
+
menu.value = true;
|
|
29051
|
+
}
|
|
28980
29052
|
}
|
|
28981
|
-
function
|
|
29053
|
+
function onCancel() {
|
|
29054
|
+
emit('cancel');
|
|
28982
29055
|
menu.value = false;
|
|
29056
|
+
isEditingInput.value = false;
|
|
28983
29057
|
}
|
|
28984
|
-
function
|
|
29058
|
+
function onSave(value) {
|
|
29059
|
+
emit('save', value);
|
|
29060
|
+
menu.value = false;
|
|
29061
|
+
}
|
|
29062
|
+
function onUpdateDisplayModel(value) {
|
|
28985
29063
|
if (value != null) return;
|
|
28986
29064
|
model.value = null;
|
|
28987
29065
|
}
|
|
29066
|
+
function onBlur() {
|
|
29067
|
+
blur();
|
|
29068
|
+
|
|
29069
|
+
// When in mobile mode and editing is done (due to keyboard dismissal), close the menu
|
|
29070
|
+
if (mobile.value && isEditingInput.value && !isFocused.value) {
|
|
29071
|
+
menu.value = false;
|
|
29072
|
+
isEditingInput.value = false;
|
|
29073
|
+
}
|
|
29074
|
+
}
|
|
28988
29075
|
useRender(() => {
|
|
28989
29076
|
const confirmEditProps = VConfirmEdit.filterProps(props);
|
|
28990
29077
|
const datePickerProps = VDatePicker.filterProps(omit(props, ['active', 'location', 'rounded']));
|
|
@@ -28995,13 +29082,15 @@
|
|
|
28995
29082
|
"class": props.class,
|
|
28996
29083
|
"style": props.style,
|
|
28997
29084
|
"modelValue": display.value,
|
|
29085
|
+
"inputmode": inputmode.value,
|
|
29086
|
+
"readonly": isReadonly.value,
|
|
28998
29087
|
"onKeydown": isInteractive.value ? onKeydown : undefined,
|
|
28999
29088
|
"focused": menu.value || isFocused.value,
|
|
29000
29089
|
"onFocus": focus,
|
|
29001
|
-
"onBlur":
|
|
29090
|
+
"onBlur": onBlur,
|
|
29002
29091
|
"onClick:control": isInteractive.value ? onClick : undefined,
|
|
29003
29092
|
"onClick:prepend": isInteractive.value ? onClick : undefined,
|
|
29004
|
-
"onUpdate:modelValue":
|
|
29093
|
+
"onUpdate:modelValue": onUpdateDisplayModel
|
|
29005
29094
|
}), {
|
|
29006
29095
|
...slots,
|
|
29007
29096
|
default: () => vue.createVNode(vue.Fragment, null, [vue.createVNode(VMenu, {
|
|
@@ -29017,8 +29106,9 @@
|
|
|
29017
29106
|
default: () => [vue.createVNode(VConfirmEdit, vue.mergeProps(confirmEditProps, {
|
|
29018
29107
|
"modelValue": model.value,
|
|
29019
29108
|
"onUpdate:modelValue": $event => model.value = $event,
|
|
29109
|
+
"disabled": disabledActions.value,
|
|
29020
29110
|
"onSave": onSave,
|
|
29021
|
-
"onCancel":
|
|
29111
|
+
"onCancel": onCancel
|
|
29022
29112
|
}), {
|
|
29023
29113
|
default: _ref2 => {
|
|
29024
29114
|
let {
|
|
@@ -29028,16 +29118,21 @@
|
|
|
29028
29118
|
cancel,
|
|
29029
29119
|
isPristine
|
|
29030
29120
|
} = _ref2;
|
|
29121
|
+
function onUpdateModel(value) {
|
|
29122
|
+
if (!props.hideActions) {
|
|
29123
|
+
proxyModel.value = value;
|
|
29124
|
+
} else {
|
|
29125
|
+
model.value = value;
|
|
29126
|
+
if (!props.multiple) {
|
|
29127
|
+
menu.value = false;
|
|
29128
|
+
}
|
|
29129
|
+
}
|
|
29130
|
+
emit('save', value);
|
|
29131
|
+
disabledActions.value = [];
|
|
29132
|
+
}
|
|
29031
29133
|
return vue.createVNode(VDatePicker, vue.mergeProps(datePickerProps, {
|
|
29032
29134
|
"modelValue": props.hideActions ? model.value : proxyModel.value,
|
|
29033
|
-
"onUpdate:modelValue":
|
|
29034
|
-
if (!props.hideActions) {
|
|
29035
|
-
proxyModel.value = val;
|
|
29036
|
-
} else {
|
|
29037
|
-
model.value = val;
|
|
29038
|
-
if (!props.multiple) menu.value = false;
|
|
29039
|
-
}
|
|
29040
|
-
},
|
|
29135
|
+
"onUpdate:modelValue": value => onUpdateModel(value),
|
|
29041
29136
|
"onMousedown": e => e.preventDefault()
|
|
29042
29137
|
}), {
|
|
29043
29138
|
actions: !props.hideActions ? () => slots.actions?.({
|
|
@@ -29280,7 +29375,8 @@
|
|
|
29280
29375
|
'v-file-upload--clickable': !hasBrowse,
|
|
29281
29376
|
'v-file-upload--disabled': props.disabled,
|
|
29282
29377
|
'v-file-upload--dragging': dragOver.value
|
|
29283
|
-
}, densityClasses.value],
|
|
29378
|
+
}, densityClasses.value, props.class],
|
|
29379
|
+
"style": [props.style],
|
|
29284
29380
|
"onDragleave": onDragLeave,
|
|
29285
29381
|
"onDragover": onDragOver,
|
|
29286
29382
|
"onDrop": onDrop,
|
|
@@ -29371,6 +29467,174 @@
|
|
|
29371
29467
|
|
|
29372
29468
|
// Types
|
|
29373
29469
|
|
|
29470
|
+
const makeVIconBtnProps = propsFactory({
|
|
29471
|
+
active: {
|
|
29472
|
+
type: Boolean,
|
|
29473
|
+
default: undefined
|
|
29474
|
+
},
|
|
29475
|
+
activeColor: String,
|
|
29476
|
+
activeIcon: [String, Function, Object],
|
|
29477
|
+
activeVariant: String,
|
|
29478
|
+
baseVariant: {
|
|
29479
|
+
type: String,
|
|
29480
|
+
default: 'tonal'
|
|
29481
|
+
},
|
|
29482
|
+
disabled: Boolean,
|
|
29483
|
+
height: [Number, String],
|
|
29484
|
+
width: [Number, String],
|
|
29485
|
+
hideOverlay: Boolean,
|
|
29486
|
+
icon: [String, Function, Object],
|
|
29487
|
+
iconColor: String,
|
|
29488
|
+
iconSize: {
|
|
29489
|
+
type: [Number, String],
|
|
29490
|
+
default: 'default'
|
|
29491
|
+
},
|
|
29492
|
+
iconSizes: {
|
|
29493
|
+
type: Array,
|
|
29494
|
+
default: () => [['x-small', 10], ['small', 16], ['default', 24], ['large', 28], ['x-large', 32]]
|
|
29495
|
+
},
|
|
29496
|
+
loading: Boolean,
|
|
29497
|
+
opacity: [Number, String],
|
|
29498
|
+
readonly: Boolean,
|
|
29499
|
+
rotate: [Number, String],
|
|
29500
|
+
size: {
|
|
29501
|
+
type: [Number, String],
|
|
29502
|
+
default: 'default'
|
|
29503
|
+
},
|
|
29504
|
+
sizes: {
|
|
29505
|
+
type: Array,
|
|
29506
|
+
default: () => [['x-small', 16], ['small', 24], ['default', 40], ['large', 48], ['x-large', 56]]
|
|
29507
|
+
},
|
|
29508
|
+
text: {
|
|
29509
|
+
type: [String, Number, Boolean],
|
|
29510
|
+
default: undefined
|
|
29511
|
+
},
|
|
29512
|
+
...makeBorderProps(),
|
|
29513
|
+
...makeComponentProps(),
|
|
29514
|
+
...makeElevationProps(),
|
|
29515
|
+
...makeRoundedProps(),
|
|
29516
|
+
...makeTagProps({
|
|
29517
|
+
tag: 'button'
|
|
29518
|
+
}),
|
|
29519
|
+
...makeThemeProps(),
|
|
29520
|
+
...makeVariantProps({
|
|
29521
|
+
variant: 'flat'
|
|
29522
|
+
})
|
|
29523
|
+
}, 'VIconBtn');
|
|
29524
|
+
const VIconBtn = genericComponent()({
|
|
29525
|
+
name: 'VIconBtn',
|
|
29526
|
+
props: makeVIconBtnProps(),
|
|
29527
|
+
emits: {
|
|
29528
|
+
'update:active': value => true
|
|
29529
|
+
},
|
|
29530
|
+
setup(props, _ref) {
|
|
29531
|
+
let {
|
|
29532
|
+
attrs,
|
|
29533
|
+
slots
|
|
29534
|
+
} = _ref;
|
|
29535
|
+
const isActive = useProxiedModel(props, 'active');
|
|
29536
|
+
const {
|
|
29537
|
+
themeClasses
|
|
29538
|
+
} = provideTheme(props);
|
|
29539
|
+
const {
|
|
29540
|
+
borderClasses
|
|
29541
|
+
} = useBorder(props);
|
|
29542
|
+
const {
|
|
29543
|
+
elevationClasses
|
|
29544
|
+
} = useElevation(props);
|
|
29545
|
+
const {
|
|
29546
|
+
roundedClasses
|
|
29547
|
+
} = useRounded(props);
|
|
29548
|
+
const {
|
|
29549
|
+
colorClasses,
|
|
29550
|
+
colorStyles,
|
|
29551
|
+
variantClasses
|
|
29552
|
+
} = useVariant(vue.toRef(() => ({
|
|
29553
|
+
color: (() => {
|
|
29554
|
+
if (props.disabled) return undefined;
|
|
29555
|
+
if (!isActive.value) return props.color;
|
|
29556
|
+
// Use an inline fallback as opposed to setting a default color
|
|
29557
|
+
// because non-toggle buttons are default flat whereas toggle
|
|
29558
|
+
// buttons are default tonal and active flat. The exact use
|
|
29559
|
+
// case for this is a toggle button with no active color.
|
|
29560
|
+
return props.activeColor ?? props.color ?? 'surface-variant';
|
|
29561
|
+
})(),
|
|
29562
|
+
variant: (() => {
|
|
29563
|
+
if (isActive.value === undefined) return props.variant;
|
|
29564
|
+
if (isActive.value) return props.activeVariant ?? props.variant;
|
|
29565
|
+
return props.baseVariant ?? props.variant;
|
|
29566
|
+
})()
|
|
29567
|
+
})));
|
|
29568
|
+
const btnSizeMap = new Map(props.sizes);
|
|
29569
|
+
const iconSizeMap = new Map(props.iconSizes);
|
|
29570
|
+
function onClick() {
|
|
29571
|
+
if (props.disabled || props.readonly || isActive.value === undefined || props.tag === 'a' && attrs.href) return;
|
|
29572
|
+
isActive.value = !isActive.value;
|
|
29573
|
+
}
|
|
29574
|
+
useRender(() => {
|
|
29575
|
+
const icon = isActive.value ? props.activeIcon ?? props.icon : props.icon;
|
|
29576
|
+
const size = props.size;
|
|
29577
|
+
const hasNamedSize = btnSizeMap.has(size);
|
|
29578
|
+
const btnSize = hasNamedSize ? btnSizeMap.get(size) : size;
|
|
29579
|
+
const btnHeight = props.height ?? btnSize;
|
|
29580
|
+
const btnWidth = props.width ?? btnSize;
|
|
29581
|
+
const _iconSize = hasNamedSize ? size : props.iconSize ?? size;
|
|
29582
|
+
const iconSize = iconSizeMap.get(_iconSize) ?? _iconSize;
|
|
29583
|
+
const iconProps = {
|
|
29584
|
+
icon,
|
|
29585
|
+
size: iconSize,
|
|
29586
|
+
iconColor: props.iconColor,
|
|
29587
|
+
opacity: props.opacity
|
|
29588
|
+
};
|
|
29589
|
+
return vue.createVNode(props.tag, {
|
|
29590
|
+
"class": [{
|
|
29591
|
+
'v-icon-btn': true,
|
|
29592
|
+
'v-icon-btn--active': isActive.value,
|
|
29593
|
+
'v-icon-btn--disabled': props.disabled,
|
|
29594
|
+
'v-icon-btn--loading': props.loading,
|
|
29595
|
+
'v-icon-btn--readonly': props.readonly,
|
|
29596
|
+
[`v-icon-btn--${props.size}`]: true
|
|
29597
|
+
}, themeClasses.value, colorClasses.value, borderClasses.value, elevationClasses.value, roundedClasses.value, variantClasses.value, props.class],
|
|
29598
|
+
"style": [{
|
|
29599
|
+
'--v-icon-btn-rotate': convertToUnit(props.rotate, 'deg'),
|
|
29600
|
+
'--v-icon-btn-height': convertToUnit(btnHeight),
|
|
29601
|
+
'--v-icon-btn-width': convertToUnit(btnWidth)
|
|
29602
|
+
}, colorStyles.value, props.style],
|
|
29603
|
+
"tabindex": props.disabled || props.readonly ? -1 : 0,
|
|
29604
|
+
"onClick": onClick
|
|
29605
|
+
}, {
|
|
29606
|
+
default: () => [genOverlays(!props.hideOverlay, 'v-icon-btn'), vue.createVNode("div", {
|
|
29607
|
+
"class": "v-icon-btn__content",
|
|
29608
|
+
"data-no-activator": ""
|
|
29609
|
+
}, [!slots.default && icon ? vue.createVNode(VIcon, vue.mergeProps({
|
|
29610
|
+
"key": "content-icon"
|
|
29611
|
+
}, iconProps), null) : vue.createVNode(VDefaultsProvider, {
|
|
29612
|
+
"key": "content-defaults",
|
|
29613
|
+
"disabled": !icon,
|
|
29614
|
+
"defaults": {
|
|
29615
|
+
VIcon: {
|
|
29616
|
+
...iconProps
|
|
29617
|
+
}
|
|
29618
|
+
}
|
|
29619
|
+
}, {
|
|
29620
|
+
default: () => slots.default?.() ?? vue.toDisplayString(props.text)
|
|
29621
|
+
})]), !!props.loading && vue.createVNode("span", {
|
|
29622
|
+
"key": "loader",
|
|
29623
|
+
"class": "v-icon-btn__loader"
|
|
29624
|
+
}, [slots.loader?.() ?? vue.createVNode(VProgressCircular, {
|
|
29625
|
+
"color": typeof props.loading === 'boolean' ? undefined : props.loading,
|
|
29626
|
+
"indeterminate": "disable-shrink",
|
|
29627
|
+
"width": "2",
|
|
29628
|
+
"size": iconSize
|
|
29629
|
+
}, null)])]
|
|
29630
|
+
});
|
|
29631
|
+
});
|
|
29632
|
+
return {};
|
|
29633
|
+
}
|
|
29634
|
+
});
|
|
29635
|
+
|
|
29636
|
+
// Types
|
|
29637
|
+
|
|
29374
29638
|
const makeVStepperVerticalActionsProps = propsFactory({
|
|
29375
29639
|
...makeVStepperActionsProps()
|
|
29376
29640
|
}, 'VStepperActions');
|
|
@@ -30850,6 +31114,7 @@
|
|
|
30850
31114
|
VForm: VForm,
|
|
30851
31115
|
VHover: VHover,
|
|
30852
31116
|
VIcon: VIcon,
|
|
31117
|
+
VIconBtn: VIconBtn,
|
|
30853
31118
|
VImg: VImg,
|
|
30854
31119
|
VInfiniteScroll: VInfiniteScroll,
|
|
30855
31120
|
VInput: VInput,
|
|
@@ -31269,7 +31534,7 @@
|
|
|
31269
31534
|
};
|
|
31270
31535
|
});
|
|
31271
31536
|
}
|
|
31272
|
-
const version$1 = "3.8.0
|
|
31537
|
+
const version$1 = "3.8.0";
|
|
31273
31538
|
createVuetify$1.version = version$1;
|
|
31274
31539
|
|
|
31275
31540
|
// Vue's inject() can only be used in setup
|
|
@@ -31554,7 +31819,7 @@
|
|
|
31554
31819
|
|
|
31555
31820
|
/* eslint-disable local-rules/sort-imports */
|
|
31556
31821
|
|
|
31557
|
-
const version = "3.8.0
|
|
31822
|
+
const version = "3.8.0";
|
|
31558
31823
|
|
|
31559
31824
|
/* eslint-disable local-rules/sort-imports */
|
|
31560
31825
|
|