vuetify 3.1.2 → 3.1.4
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/LICENSE.md +1 -1
- package/dist/json/attributes.json +1125 -1085
- package/dist/json/importMap-labs.json +4 -0
- package/dist/json/importMap.json +74 -74
- package/dist/json/tags.json +19 -4
- package/dist/json/web-types.json +1750 -1627
- package/dist/vuetify-labs.css +4451 -4445
- package/dist/vuetify-labs.d.ts +416 -224
- package/dist/vuetify-labs.esm.js +334 -242
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +333 -241
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +71 -64
- package/dist/vuetify.d.ts +349 -198
- package/dist/vuetify.esm.js +258 -190
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +257 -189
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +475 -464
- package/dist/vuetify.min.js.map +1 -1
- package/lib/blueprints/index.d.ts +2 -2
- package/lib/blueprints/md1.d.ts +2 -2
- package/lib/blueprints/md2.d.ts +2 -2
- package/lib/blueprints/md3.d.ts +2 -2
- package/lib/components/VAppBar/VAppBarTitle.mjs +3 -4
- package/lib/components/VAppBar/VAppBarTitle.mjs.map +1 -1
- package/lib/components/VAppBar/index.d.ts +14 -2
- package/lib/components/VAutocomplete/VAutocomplete.mjs +3 -2
- package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
- package/lib/components/VAutocomplete/index.d.ts +43 -20
- package/lib/components/VBottomSheet/VBottomSheet.mjs +1 -4
- package/lib/components/VBottomSheet/VBottomSheet.mjs.map +1 -1
- package/lib/components/VBtn/VBtn.css +7 -7
- package/lib/components/VBtn/VBtn.mjs +8 -3
- package/lib/components/VBtn/VBtn.mjs.map +1 -1
- package/lib/components/VBtnGroup/VBtnGroup.mjs +15 -11
- package/lib/components/VBtnGroup/VBtnGroup.mjs.map +1 -1
- package/lib/components/VBtnGroup/index.d.ts +2 -1
- package/lib/components/VBtnToggle/VBtnToggle.mjs +9 -5
- package/lib/components/VBtnToggle/VBtnToggle.mjs.map +1 -1
- package/lib/components/VBtnToggle/index.d.ts +122 -1
- package/lib/components/VCalendar/VCalendar.mjs +3 -0
- package/lib/components/VCalendar/VCalendar.mjs.map +1 -1
- package/lib/components/VCalendar/VCalendarCategory.sass +9 -3
- package/lib/components/VCalendar/VCalendarDaily.mjs +20 -8
- package/lib/components/VCalendar/VCalendarDaily.mjs.map +1 -1
- package/lib/components/VCalendar/VCalendarWeekly.mjs +25 -5
- package/lib/components/VCalendar/VCalendarWeekly.mjs.map +1 -1
- package/lib/components/VCalendar/mixins/calendar-with-events.mjs +20 -16
- package/lib/components/VCalendar/mixins/calendar-with-events.mjs.map +1 -1
- package/lib/components/VCalendar/mixins/mouse.mjs +16 -30
- package/lib/components/VCalendar/mixins/mouse.mjs.map +1 -1
- package/lib/components/VCard/VCard.css +7 -7
- package/lib/components/VChip/VChip.css +7 -7
- package/lib/components/VChip/VChip.mjs +6 -1
- package/lib/components/VChip/VChip.mjs.map +1 -1
- package/lib/components/VCombobox/VCombobox.mjs +3 -3
- package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
- package/lib/components/VCombobox/index.d.ts +43 -20
- package/lib/components/VData/VData.mjs +2 -4
- package/lib/components/VData/VData.mjs.map +1 -1
- package/lib/components/VDatePicker/VDatePicker.mjs +7 -5
- package/lib/components/VDatePicker/VDatePicker.mjs.map +1 -1
- package/lib/components/VDefaultsProvider/index.d.ts +5 -4
- package/lib/components/VDialog/VDialog.mjs +6 -5
- package/lib/components/VDialog/VDialog.mjs.map +1 -1
- package/lib/components/VDialog/index.d.ts +57 -34
- package/lib/components/VDivider/VDivider.mjs +6 -6
- package/lib/components/VDivider/VDivider.mjs.map +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanel.css +7 -7
- package/lib/components/VField/VField.css +2 -2
- package/lib/components/VField/VField.mjs +28 -26
- package/lib/components/VField/VField.mjs.map +1 -1
- package/lib/components/VField/VField.sass +2 -2
- package/lib/components/VFileInput/VFileInput.mjs +7 -4
- package/lib/components/VFileInput/VFileInput.mjs.map +1 -1
- package/lib/components/VForm/index.d.ts +0 -3
- package/lib/components/VList/VList.mjs +4 -1
- package/lib/components/VList/VList.mjs.map +1 -1
- package/lib/components/VList/VListItem.css +7 -7
- package/lib/components/VList/VListItem.mjs +29 -19
- package/lib/components/VList/VListItem.mjs.map +1 -1
- package/lib/components/VMenu/VMenu.mjs +6 -5
- package/lib/components/VMenu/VMenu.mjs.map +1 -1
- package/lib/components/VMenu/index.d.ts +57 -34
- package/lib/components/VNavigationDrawer/VNavigationDrawer.css +4 -0
- package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs +1 -1
- package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs.map +1 -1
- package/lib/components/VNavigationDrawer/VNavigationDrawer.sass +4 -0
- package/lib/components/VNavigationDrawer/index.d.ts +3 -3
- package/lib/components/VNavigationDrawer/touch.mjs +7 -6
- package/lib/components/VNavigationDrawer/touch.mjs.map +1 -1
- package/lib/components/VOtpInput/VOtpInput.mjs +22 -46
- package/lib/components/VOtpInput/VOtpInput.mjs.map +1 -1
- package/lib/components/VOverflowBtn/VOverflowBtn.mjs +3 -0
- package/lib/components/VOverflowBtn/VOverflowBtn.mjs.map +1 -1
- package/lib/components/VOverlay/index.d.ts +34 -11
- package/lib/components/VOverlay/locationStrategies.mjs +40 -29
- package/lib/components/VOverlay/locationStrategies.mjs.map +1 -1
- package/lib/components/VOverlay/scrollStrategies.mjs +25 -16
- package/lib/components/VOverlay/scrollStrategies.mjs.map +1 -1
- package/lib/components/VPagination/VPagination.mjs +1 -1
- package/lib/components/VPagination/VPagination.mjs.map +1 -1
- package/lib/components/VSelect/VSelect.mjs +3 -4
- package/lib/components/VSelect/VSelect.mjs.map +1 -1
- package/lib/components/VSelect/index.d.ts +43 -20
- package/lib/components/VSelectionControl/VSelectionControl.css +2 -2
- package/lib/components/VSkeletonLoader/VSkeletonLoader.sass +1 -1
- package/lib/components/VSnackbar/index.d.ts +42 -19
- package/lib/components/VStepper/VStepper.sass +6 -6
- package/lib/components/VStepper/VStepperStep.mjs +12 -2
- package/lib/components/VStepper/VStepperStep.mjs.map +1 -1
- package/lib/components/VTable/VTable.css +4 -4
- package/lib/components/VTable/VTable.sass +2 -2
- package/lib/components/VTimePicker/VTimePicker.mjs.map +1 -1
- package/lib/components/VTimeline/_mixins.sass +1 -1
- package/lib/components/VToolbar/VToolbarTitle.mjs +6 -5
- package/lib/components/VToolbar/VToolbarTitle.mjs.map +1 -1
- package/lib/components/VTooltip/VTooltip.mjs +4 -3
- package/lib/components/VTooltip/VTooltip.mjs.map +1 -1
- package/lib/components/VTooltip/index.d.ts +57 -34
- package/lib/components/VTreeview/VTreeview.mjs +1 -1
- package/lib/components/VTreeview/VTreeview.mjs.map +1 -1
- package/lib/components/index.d.ts +330 -178
- package/lib/composables/defaults.mjs +1 -1
- package/lib/composables/defaults.mjs.map +1 -1
- package/lib/composables/form.mjs +0 -1
- package/lib/composables/form.mjs.map +1 -1
- package/lib/composables/nested/nested.mjs +2 -1
- package/lib/composables/nested/nested.mjs.map +1 -1
- package/lib/composables/toggleScope.mjs +14 -7
- package/lib/composables/toggleScope.mjs.map +1 -1
- package/lib/directives/ripple/VRipple.css +3 -0
- package/lib/directives/ripple/VRipple.sass +3 -0
- package/lib/directives/ripple/_variables.scss +1 -1
- package/lib/directives/ripple/index.mjs +2 -7
- package/lib/directives/ripple/index.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/framework.mjs +1 -1
- package/lib/index.d.ts +22 -22
- package/lib/labs/VDataTable/VDataTable.mjs +2 -5
- package/lib/labs/VDataTable/VDataTable.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableFooter.mjs +1 -1
- package/lib/labs/VDataTable/VDataTableFooter.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableRows.mjs +1 -1
- package/lib/labs/VDataTable/VDataTableRows.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableServer.mjs +19 -12
- package/lib/labs/VDataTable/VDataTableServer.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableVirtual.mjs +2 -4
- package/lib/labs/VDataTable/VDataTableVirtual.mjs.map +1 -1
- package/lib/labs/VDataTable/composables/options.mjs +3 -7
- package/lib/labs/VDataTable/composables/options.mjs.map +1 -1
- package/lib/labs/VDataTable/composables/paginate.mjs +1 -1
- package/lib/labs/VDataTable/composables/paginate.mjs.map +1 -1
- package/lib/labs/VDataTable/index.d.ts +71 -1
- package/lib/labs/VDataTable/index.mjs +1 -0
- package/lib/labs/VDataTable/index.mjs.map +1 -1
- package/lib/labs/VVirtualScroll/VVirtualScroll.css +0 -1
- package/lib/labs/VVirtualScroll/VVirtualScroll.mjs +40 -22
- package/lib/labs/VVirtualScroll/VVirtualScroll.mjs.map +1 -1
- package/lib/labs/VVirtualScroll/VVirtualScroll.sass +0 -1
- package/lib/labs/VVirtualScroll/VVirtualScrollItem.mjs +20 -8
- package/lib/labs/VVirtualScroll/VVirtualScrollItem.mjs.map +1 -1
- package/lib/labs/VVirtualScroll/index.d.ts +15 -46
- package/lib/labs/components.d.ts +86 -47
- package/lib/locale/adapters/vue-i18n.mjs +12 -2
- package/lib/locale/adapters/vue-i18n.mjs.map +1 -1
- package/lib/locale/ar.mjs +20 -20
- package/lib/locale/ar.mjs.map +1 -1
- package/lib/locale/en.mjs +2 -2
- package/lib/locale/en.mjs.map +1 -1
- package/lib/locale/es.mjs +3 -3
- package/lib/locale/es.mjs.map +1 -1
- package/lib/locale/fi.mjs +5 -5
- package/lib/locale/fi.mjs.map +1 -1
- package/lib/locale/it.mjs +6 -6
- package/lib/locale/it.mjs.map +1 -1
- package/lib/locale/sv.mjs +13 -13
- package/lib/locale/sv.mjs.map +1 -1
- package/lib/styles/settings/_variables.scss +6 -6
- package/lib/styles/tools/_states.sass +3 -3
- package/lib/util/defineComponent.mjs +21 -18
- package/lib/util/defineComponent.mjs.map +1 -1
- package/lib/util/helpers.mjs +5 -19
- package/lib/util/helpers.mjs.map +1 -1
- package/package.json +2 -2
package/dist/vuetify-labs.esm.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Vuetify v3.1.
|
|
2
|
+
* Vuetify v3.1.4
|
|
3
3
|
* Forged by John Leider
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { ref, onBeforeUnmount, watch, readonly, reactive, computed, watchEffect, toRefs, capitalize, getCurrentInstance as getCurrentInstance$1, unref, provide, inject as inject$1,
|
|
7
|
+
import { ref, onBeforeUnmount, watch, readonly, reactive, computed, watchEffect, toRefs, capitalize, getCurrentInstance as getCurrentInstance$1, unref, provide, inject as inject$1, onScopeDispose, effectScope, shallowRef, defineComponent as defineComponent$1, camelize, h, onDeactivated, onActivated, onMounted, createVNode, TransitionGroup, Transition, mergeProps, onBeforeMount, nextTick, withDirectives, Fragment, resolveDirective, vShow, isRef, toRef, Text, resolveDynamicComponent, cloneVNode, warn, toHandlers, Teleport, createTextVNode, onBeforeUpdate, vModelText, onUpdated } from 'vue';
|
|
8
8
|
|
|
9
9
|
const IN_BROWSER = typeof window !== 'undefined';
|
|
10
10
|
const SUPPORTS_INTERSECTION = IN_BROWSER && 'IntersectionObserver' in window;
|
|
@@ -258,8 +258,12 @@ function mergeDeep() {
|
|
|
258
258
|
}
|
|
259
259
|
function toKebabCase() {
|
|
260
260
|
let str = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
261
|
-
|
|
261
|
+
if (toKebabCase.cache.has(str)) return toKebabCase.cache.get(str);
|
|
262
|
+
const kebab = str.replace(/[^a-z]/gi, '-').replace(/\B([A-Z])/g, '-$1').toLowerCase();
|
|
263
|
+
toKebabCase.cache.set(str, kebab);
|
|
264
|
+
return kebab;
|
|
262
265
|
}
|
|
266
|
+
toKebabCase.cache = new Map();
|
|
263
267
|
function findChildrenWithProvide(key, vnode) {
|
|
264
268
|
if (!vnode || typeof vnode !== 'object') return [];
|
|
265
269
|
if (Array.isArray(vnode)) {
|
|
@@ -886,7 +890,7 @@ function injectSelf(key) {
|
|
|
886
890
|
|
|
887
891
|
const DefaultsSymbol = Symbol.for('vuetify:defaults');
|
|
888
892
|
function createDefaults(options) {
|
|
889
|
-
return ref(options
|
|
893
|
+
return ref(options);
|
|
890
894
|
}
|
|
891
895
|
function useDefaults() {
|
|
892
896
|
const defaults = inject$1(DefaultsSymbol);
|
|
@@ -918,23 +922,30 @@ function provideDefaults(defaults, options) {
|
|
|
918
922
|
return newDefaults;
|
|
919
923
|
}
|
|
920
924
|
|
|
921
|
-
function useToggleScope(source,
|
|
925
|
+
function useToggleScope(source, fn) {
|
|
922
926
|
let scope;
|
|
927
|
+
function start() {
|
|
928
|
+
scope = effectScope();
|
|
929
|
+
scope.run(() => fn.length ? fn(() => {
|
|
930
|
+
var _scope;
|
|
931
|
+
(_scope = scope) == null ? void 0 : _scope.stop();
|
|
932
|
+
start();
|
|
933
|
+
}) : fn());
|
|
934
|
+
}
|
|
923
935
|
watch(source, active => {
|
|
924
936
|
if (active && !scope) {
|
|
925
|
-
|
|
926
|
-
scope.run(cb);
|
|
937
|
+
start();
|
|
927
938
|
} else if (!active) {
|
|
928
|
-
var
|
|
929
|
-
(
|
|
939
|
+
var _scope2;
|
|
940
|
+
(_scope2 = scope) == null ? void 0 : _scope2.stop();
|
|
930
941
|
scope = undefined;
|
|
931
942
|
}
|
|
932
943
|
}, {
|
|
933
944
|
immediate: true
|
|
934
945
|
});
|
|
935
946
|
onScopeDispose(() => {
|
|
936
|
-
var
|
|
937
|
-
(
|
|
947
|
+
var _scope3;
|
|
948
|
+
(_scope3 = scope) == null ? void 0 : _scope3.stop();
|
|
938
949
|
});
|
|
939
950
|
}
|
|
940
951
|
|
|
@@ -1003,33 +1014,36 @@ const defineComponent = function defineComponent(options) {
|
|
|
1003
1014
|
options.props = propsFactory(options.props, toKebabCase(options.name))();
|
|
1004
1015
|
options.props._as = String;
|
|
1005
1016
|
options.setup = function setup(props, ctx) {
|
|
1006
|
-
const vm = getCurrentInstance$1();
|
|
1007
1017
|
const defaults = useDefaults();
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1018
|
+
|
|
1019
|
+
// Skip props proxy if defaults are not provided
|
|
1020
|
+
if (!defaults.value) return options._setup(props, ctx);
|
|
1021
|
+
const vm = getCurrentInstance$1();
|
|
1022
|
+
const componentDefaults = computed(() => defaults.value[props._as ?? options.name]);
|
|
1023
|
+
const _props = new Proxy(props, {
|
|
1024
|
+
get(target, prop) {
|
|
1025
|
+
if (!propIsDefined(vm.vnode, prop)) {
|
|
1026
|
+
var _componentDefaults$va, _global;
|
|
1027
|
+
return ((_componentDefaults$va = componentDefaults.value) == null ? void 0 : _componentDefaults$va[prop]) ?? ((_global = defaults.value.global) == null ? void 0 : _global[prop]) ?? target[prop];
|
|
1028
|
+
}
|
|
1029
|
+
return Reflect.get(target, prop);
|
|
1030
|
+
}
|
|
1011
1031
|
});
|
|
1032
|
+
const _subcomponentDefaults = shallowRef();
|
|
1012
1033
|
watchEffect(() => {
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
if (componentDefaults) {
|
|
1016
|
-
const subComponents = Object.entries(componentDefaults).filter(_ref => {
|
|
1034
|
+
if (componentDefaults.value) {
|
|
1035
|
+
const subComponents = Object.entries(componentDefaults.value).filter(_ref => {
|
|
1017
1036
|
let [key] = _ref;
|
|
1018
1037
|
return key.startsWith(key[0].toUpperCase());
|
|
1019
1038
|
});
|
|
1020
1039
|
if (subComponents.length) _subcomponentDefaults.value = Object.fromEntries(subComponents);
|
|
1021
1040
|
}
|
|
1022
|
-
for (const prop of Object.keys(props)) {
|
|
1023
|
-
let newVal = props[prop];
|
|
1024
|
-
if (!propIsDefined(vm.vnode, prop)) {
|
|
1025
|
-
newVal = (componentDefaults == null ? void 0 : componentDefaults[prop]) ?? (globalDefaults == null ? void 0 : globalDefaults[prop]) ?? props[prop];
|
|
1026
|
-
}
|
|
1027
|
-
if (_props[prop] !== newVal) {
|
|
1028
|
-
_props[prop] = newVal;
|
|
1029
|
-
}
|
|
1030
|
-
}
|
|
1031
1041
|
});
|
|
1032
1042
|
const setupBindings = options._setup(_props, ctx);
|
|
1043
|
+
|
|
1044
|
+
// If subcomponent defaults are provided, override any
|
|
1045
|
+
// subcomponents provided by the component's setup function.
|
|
1046
|
+
// This uses injectSelf so must be done after the original setup to work.
|
|
1033
1047
|
useToggleScope(_subcomponentDefaults, () => {
|
|
1034
1048
|
var _injectSelf;
|
|
1035
1049
|
provideDefaults(mergeDeep(((_injectSelf = injectSelf(DefaultsSymbol)) == null ? void 0 : _injectSelf.value) ?? {}, _subcomponentDefaults.value));
|
|
@@ -1892,8 +1906,8 @@ var en = {
|
|
|
1892
1906
|
root: 'Pagination Navigation',
|
|
1893
1907
|
next: 'Next page',
|
|
1894
1908
|
previous: 'Previous page',
|
|
1895
|
-
page: '
|
|
1896
|
-
currentPage: 'Page {0}, Current
|
|
1909
|
+
page: 'Go to page {0}',
|
|
1910
|
+
currentPage: 'Page {0}, Current page',
|
|
1897
1911
|
first: 'First page',
|
|
1898
1912
|
last: 'Last page'
|
|
1899
1913
|
}
|
|
@@ -2911,12 +2925,13 @@ const makeTagProps = propsFactory({
|
|
|
2911
2925
|
|
|
2912
2926
|
// Types
|
|
2913
2927
|
|
|
2928
|
+
const makeVToolbarTitleProps = propsFactory({
|
|
2929
|
+
text: String,
|
|
2930
|
+
...makeTagProps()
|
|
2931
|
+
}, 'v-toolbar-title');
|
|
2914
2932
|
const VToolbarTitle = genericComponent()({
|
|
2915
2933
|
name: 'VToolbarTitle',
|
|
2916
|
-
props:
|
|
2917
|
-
text: String,
|
|
2918
|
-
...makeTagProps()
|
|
2919
|
-
},
|
|
2934
|
+
props: makeVToolbarTitleProps(),
|
|
2920
2935
|
setup(props, _ref) {
|
|
2921
2936
|
let {
|
|
2922
2937
|
slots
|
|
@@ -3368,18 +3383,21 @@ function useVariant(props) {
|
|
|
3368
3383
|
};
|
|
3369
3384
|
}
|
|
3370
3385
|
|
|
3386
|
+
// Types
|
|
3387
|
+
|
|
3388
|
+
const makeVBtnGroupProps = propsFactory({
|
|
3389
|
+
divided: Boolean,
|
|
3390
|
+
...makeBorderProps(),
|
|
3391
|
+
...makeDensityProps(),
|
|
3392
|
+
...makeElevationProps(),
|
|
3393
|
+
...makeRoundedProps(),
|
|
3394
|
+
...makeTagProps(),
|
|
3395
|
+
...makeThemeProps(),
|
|
3396
|
+
...makeVariantProps()
|
|
3397
|
+
}, 'v-btn-group');
|
|
3371
3398
|
const VBtnGroup = defineComponent({
|
|
3372
3399
|
name: 'VBtnGroup',
|
|
3373
|
-
props:
|
|
3374
|
-
divided: Boolean,
|
|
3375
|
-
...makeBorderProps(),
|
|
3376
|
-
...makeDensityProps(),
|
|
3377
|
-
...makeElevationProps(),
|
|
3378
|
-
...makeRoundedProps(),
|
|
3379
|
-
...makeTagProps(),
|
|
3380
|
-
...makeThemeProps(),
|
|
3381
|
-
...makeVariantProps()
|
|
3382
|
-
},
|
|
3400
|
+
props: makeVBtnGroupProps(),
|
|
3383
3401
|
setup(props, _ref) {
|
|
3384
3402
|
let {
|
|
3385
3403
|
slots
|
|
@@ -3417,6 +3435,9 @@ const VBtnGroup = defineComponent({
|
|
|
3417
3435
|
});
|
|
3418
3436
|
}
|
|
3419
3437
|
});
|
|
3438
|
+
function filterVBtnGroupProps(props) {
|
|
3439
|
+
return pick(props, Object.keys(VBtnGroup.props));
|
|
3440
|
+
}
|
|
3420
3441
|
|
|
3421
3442
|
// Composables
|
|
3422
3443
|
|
|
@@ -3624,7 +3645,10 @@ function getValues(items, ids) {
|
|
|
3624
3645
|
const VBtnToggleSymbol = Symbol.for('vuetify:v-btn-toggle');
|
|
3625
3646
|
const VBtnToggle = genericComponent()({
|
|
3626
3647
|
name: 'VBtnToggle',
|
|
3627
|
-
props:
|
|
3648
|
+
props: {
|
|
3649
|
+
...makeVBtnGroupProps(),
|
|
3650
|
+
...makeGroupProps()
|
|
3651
|
+
},
|
|
3628
3652
|
emits: {
|
|
3629
3653
|
'update:modelValue': value => true
|
|
3630
3654
|
},
|
|
@@ -3641,9 +3665,10 @@ const VBtnToggle = genericComponent()({
|
|
|
3641
3665
|
} = useGroup(props, VBtnToggleSymbol);
|
|
3642
3666
|
useRender(() => {
|
|
3643
3667
|
var _slots$default;
|
|
3644
|
-
|
|
3668
|
+
const [btnGroupProps] = filterVBtnGroupProps(props);
|
|
3669
|
+
return createVNode(VBtnGroup, mergeProps({
|
|
3645
3670
|
"class": "v-btn-toggle"
|
|
3646
|
-
}, {
|
|
3671
|
+
}, btnGroupProps), {
|
|
3647
3672
|
default: () => [(_slots$default = slots.default) == null ? void 0 : _slots$default.call(slots, {
|
|
3648
3673
|
isSelected,
|
|
3649
3674
|
next,
|
|
@@ -4098,9 +4123,6 @@ function transform(el, value) {
|
|
|
4098
4123
|
el.style.transform = value;
|
|
4099
4124
|
el.style.webkitTransform = value;
|
|
4100
4125
|
}
|
|
4101
|
-
function opacity(el, value) {
|
|
4102
|
-
el.style.opacity = `calc(${value} * var(--v-theme-overlay-multiplier))`;
|
|
4103
|
-
}
|
|
4104
4126
|
function isTouchEvent(e) {
|
|
4105
4127
|
return e.constructor.name === 'TouchEvent';
|
|
4106
4128
|
}
|
|
@@ -4176,13 +4198,11 @@ const ripples = {
|
|
|
4176
4198
|
animation.classList.add('v-ripple__animation--enter');
|
|
4177
4199
|
animation.classList.add('v-ripple__animation--visible');
|
|
4178
4200
|
transform(animation, `translate(${x}, ${y}) scale3d(${scale},${scale},${scale})`);
|
|
4179
|
-
opacity(animation, 0);
|
|
4180
4201
|
animation.dataset.activated = String(performance.now());
|
|
4181
4202
|
setTimeout(() => {
|
|
4182
4203
|
animation.classList.remove('v-ripple__animation--enter');
|
|
4183
4204
|
animation.classList.add('v-ripple__animation--in');
|
|
4184
4205
|
transform(animation, `translate(${centerX}, ${centerY}) scale3d(1,1,1)`);
|
|
4185
|
-
opacity(animation, 0.08);
|
|
4186
4206
|
}, 0);
|
|
4187
4207
|
},
|
|
4188
4208
|
hide(el) {
|
|
@@ -4197,14 +4217,14 @@ const ripples = {
|
|
|
4197
4217
|
setTimeout(() => {
|
|
4198
4218
|
animation.classList.remove('v-ripple__animation--in');
|
|
4199
4219
|
animation.classList.add('v-ripple__animation--out');
|
|
4200
|
-
opacity(animation, 0);
|
|
4201
4220
|
setTimeout(() => {
|
|
4221
|
+
var _animation$parentNode;
|
|
4202
4222
|
const ripples = el.getElementsByClassName('v-ripple__animation');
|
|
4203
4223
|
if (ripples.length === 1 && el.dataset.previousPosition) {
|
|
4204
4224
|
el.style.position = el.dataset.previousPosition;
|
|
4205
4225
|
delete el.dataset.previousPosition;
|
|
4206
4226
|
}
|
|
4207
|
-
animation.parentNode
|
|
4227
|
+
if (((_animation$parentNode = animation.parentNode) == null ? void 0 : _animation$parentNode.parentNode) === el) el.removeChild(animation.parentNode);
|
|
4208
4228
|
}, 300);
|
|
4209
4229
|
}, delay);
|
|
4210
4230
|
}
|
|
@@ -4857,14 +4877,18 @@ const VBtn = defineComponent({
|
|
|
4857
4877
|
const isElevated = computed(() => {
|
|
4858
4878
|
return props.variant === 'elevated' && !(props.disabled || props.flat || props.border);
|
|
4859
4879
|
});
|
|
4880
|
+
const valueAttr = computed(() => {
|
|
4881
|
+
if (props.value === undefined) return undefined;
|
|
4882
|
+
return Object(props.value) === props.value ? JSON.stringify(props.value, null, 0) : props.value;
|
|
4883
|
+
});
|
|
4860
4884
|
useSelectLink(link, group == null ? void 0 : group.select);
|
|
4861
4885
|
useRender(() => {
|
|
4862
|
-
var _slots$prepend, _slots$default, _slots$append, _slots$loader;
|
|
4886
|
+
var _link$isActive2, _link$isActive3, _slots$prepend, _slots$default, _slots$append, _slots$loader;
|
|
4863
4887
|
const Tag = link.isLink.value ? 'a' : props.tag;
|
|
4864
|
-
const hasColor = !group || isActive.value;
|
|
4865
4888
|
const hasPrepend = !!(props.prependIcon || slots.prepend);
|
|
4866
4889
|
const hasAppend = !!(props.appendIcon || slots.append);
|
|
4867
4890
|
const hasIcon = !!(props.icon && props.icon !== true);
|
|
4891
|
+
const hasColor = (group == null ? void 0 : group.isSelected.value) && (!link.isLink.value || ((_link$isActive2 = link.isActive) == null ? void 0 : _link$isActive2.value)) || !group || ((_link$isActive3 = link.isActive) == null ? void 0 : _link$isActive3.value);
|
|
4868
4892
|
return withDirectives(createVNode(Tag, {
|
|
4869
4893
|
"type": Tag === 'a' ? undefined : 'button',
|
|
4870
4894
|
"class": ['v-btn', group == null ? void 0 : group.selectedClass.value, {
|
|
@@ -4885,7 +4909,8 @@ const VBtn = defineComponent({
|
|
|
4885
4909
|
if (isDisabled.value) return;
|
|
4886
4910
|
(_link$navigate = link.navigate) == null ? void 0 : _link$navigate.call(link, e);
|
|
4887
4911
|
group == null ? void 0 : group.toggle();
|
|
4888
|
-
}
|
|
4912
|
+
},
|
|
4913
|
+
"value": valueAttr.value
|
|
4889
4914
|
}, {
|
|
4890
4915
|
default: () => [genOverlays(true, 'v-btn'), !props.icon && hasPrepend && createVNode(VDefaultsProvider, {
|
|
4891
4916
|
"key": "prepend",
|
|
@@ -4986,9 +5011,7 @@ const VToolbarItems = defineComponent({
|
|
|
4986
5011
|
|
|
4987
5012
|
const VAppBarTitle = defineComponent({
|
|
4988
5013
|
name: 'VAppBarTitle',
|
|
4989
|
-
props:
|
|
4990
|
-
...VToolbarTitle.props
|
|
4991
|
-
},
|
|
5014
|
+
props: makeVToolbarTitleProps(),
|
|
4992
5015
|
setup(props, _ref) {
|
|
4993
5016
|
let {
|
|
4994
5017
|
slots
|
|
@@ -5359,32 +5382,34 @@ const VField = genericComponent()({
|
|
|
5359
5382
|
if (hasLabel.value) {
|
|
5360
5383
|
const el = labelRef.value.$el;
|
|
5361
5384
|
const targetEl = floatingLabelRef.value.$el;
|
|
5362
|
-
|
|
5363
|
-
|
|
5364
|
-
|
|
5365
|
-
|
|
5366
|
-
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
|
-
|
|
5370
|
-
|
|
5371
|
-
|
|
5372
|
-
|
|
5373
|
-
|
|
5374
|
-
|
|
5375
|
-
|
|
5376
|
-
|
|
5377
|
-
|
|
5378
|
-
|
|
5379
|
-
|
|
5380
|
-
|
|
5381
|
-
|
|
5382
|
-
|
|
5383
|
-
|
|
5384
|
-
|
|
5385
|
-
|
|
5386
|
-
|
|
5387
|
-
|
|
5385
|
+
requestAnimationFrame(() => {
|
|
5386
|
+
const rect = nullifyTransforms(el);
|
|
5387
|
+
const targetRect = targetEl.getBoundingClientRect();
|
|
5388
|
+
const x = targetRect.x - rect.x;
|
|
5389
|
+
const y = targetRect.y - rect.y - (rect.height / 2 - targetRect.height / 2);
|
|
5390
|
+
const targetWidth = targetRect.width / 0.75;
|
|
5391
|
+
const width = Math.abs(targetWidth - rect.width) > 1 ? {
|
|
5392
|
+
maxWidth: convertToUnit(targetWidth)
|
|
5393
|
+
} : undefined;
|
|
5394
|
+
const style = getComputedStyle(el);
|
|
5395
|
+
const targetStyle = getComputedStyle(targetEl);
|
|
5396
|
+
const duration = parseFloat(style.transitionDuration) * 1000 || 150;
|
|
5397
|
+
const scale = parseFloat(targetStyle.getPropertyValue('--v-field-label-scale'));
|
|
5398
|
+
const color = targetStyle.getPropertyValue('color');
|
|
5399
|
+
el.style.visibility = 'visible';
|
|
5400
|
+
targetEl.style.visibility = 'hidden';
|
|
5401
|
+
animate(el, {
|
|
5402
|
+
transform: `translate(${x}px, ${y}px) scale(${scale})`,
|
|
5403
|
+
color,
|
|
5404
|
+
...width
|
|
5405
|
+
}, {
|
|
5406
|
+
duration,
|
|
5407
|
+
easing: standardEasing,
|
|
5408
|
+
direction: val ? 'normal' : 'reverse'
|
|
5409
|
+
}).finished.then(() => {
|
|
5410
|
+
el.style.removeProperty('visibility');
|
|
5411
|
+
targetEl.style.removeProperty('visibility');
|
|
5412
|
+
});
|
|
5388
5413
|
});
|
|
5389
5414
|
}
|
|
5390
5415
|
}, {
|
|
@@ -5573,7 +5598,6 @@ const FormKey = Symbol.for('vuetify:form');
|
|
|
5573
5598
|
const makeFormProps = propsFactory({
|
|
5574
5599
|
disabled: Boolean,
|
|
5575
5600
|
fastFail: Boolean,
|
|
5576
|
-
lazyValidation: Boolean,
|
|
5577
5601
|
readonly: Boolean,
|
|
5578
5602
|
modelValue: {
|
|
5579
5603
|
type: Boolean,
|
|
@@ -6813,6 +6837,9 @@ const VChip = defineComponent({
|
|
|
6813
6837
|
emit,
|
|
6814
6838
|
slots
|
|
6815
6839
|
} = _ref;
|
|
6840
|
+
const {
|
|
6841
|
+
t
|
|
6842
|
+
} = useLocale();
|
|
6816
6843
|
const {
|
|
6817
6844
|
borderClasses
|
|
6818
6845
|
} = useBorder(props);
|
|
@@ -6949,6 +6976,7 @@ const VChip = defineComponent({
|
|
|
6949
6976
|
}, {
|
|
6950
6977
|
default: () => [createVNode("div", {
|
|
6951
6978
|
"class": "v-chip__close",
|
|
6979
|
+
"aria-label": t(props.closeLabel),
|
|
6952
6980
|
"onClick": onCloseClick
|
|
6953
6981
|
}, [slots.close ? slots.close() : createVNode(VIcon, null, null)])]
|
|
6954
6982
|
})]
|
|
@@ -6977,9 +7005,9 @@ const VDivider = defineComponent({
|
|
|
6977
7005
|
themeClasses
|
|
6978
7006
|
} = provideTheme(props);
|
|
6979
7007
|
const {
|
|
6980
|
-
|
|
6981
|
-
|
|
6982
|
-
} =
|
|
7008
|
+
textColorClasses,
|
|
7009
|
+
textColorStyles
|
|
7010
|
+
} = useTextColor(toRef(props, 'color'));
|
|
6983
7011
|
const dividerStyles = computed(() => {
|
|
6984
7012
|
const styles = {};
|
|
6985
7013
|
if (props.length) {
|
|
@@ -6995,8 +7023,8 @@ const VDivider = defineComponent({
|
|
|
6995
7023
|
'v-divider': true,
|
|
6996
7024
|
'v-divider--inset': props.inset,
|
|
6997
7025
|
'v-divider--vertical': props.vertical
|
|
6998
|
-
}, themeClasses.value,
|
|
6999
|
-
"style": [dividerStyles.value,
|
|
7026
|
+
}, themeClasses.value, textColorClasses.value],
|
|
7027
|
+
"style": [dividerStyles.value, textColorStyles.value],
|
|
7000
7028
|
"aria-orientation": !attrs.role || attrs.role === 'separator' ? props.vertical ? 'vertical' : 'horizontal' : undefined,
|
|
7001
7029
|
"role": `${attrs.role || 'separator'}`
|
|
7002
7030
|
}, null));
|
|
@@ -7434,7 +7462,8 @@ const useNested = props => {
|
|
|
7434
7462
|
};
|
|
7435
7463
|
const useNestedItem = (id, isGroup) => {
|
|
7436
7464
|
const parent = inject$1(VNestedSymbol, emptyNested);
|
|
7437
|
-
const
|
|
7465
|
+
const uidSymbol = Symbol(getUid());
|
|
7466
|
+
const computedId = computed(() => id.value ?? uidSymbol);
|
|
7438
7467
|
const item = {
|
|
7439
7468
|
...parent,
|
|
7440
7469
|
id: computedId,
|
|
@@ -7706,7 +7735,7 @@ const VListItem = genericComponent()({
|
|
|
7706
7735
|
}
|
|
7707
7736
|
}
|
|
7708
7737
|
useRender(() => {
|
|
7709
|
-
var _slots$
|
|
7738
|
+
var _slots$title, _slots$subtitle, _slots$default;
|
|
7710
7739
|
const Tag = isLink.value ? 'a' : props.tag;
|
|
7711
7740
|
const hasColor = !list || isSelected.value || isActive.value;
|
|
7712
7741
|
const hasTitle = slots.title || props.title;
|
|
@@ -7729,7 +7758,18 @@ const VListItem = genericComponent()({
|
|
|
7729
7758
|
"onClick": onClick,
|
|
7730
7759
|
"onKeydown": isClickable.value && !isLink.value && onKeyDown
|
|
7731
7760
|
}, {
|
|
7732
|
-
default: () => [genOverlays(isClickable.value || isActive.value, 'v-list-item'), hasPrepend && createVNode(
|
|
7761
|
+
default: () => [genOverlays(isClickable.value || isActive.value, 'v-list-item'), hasPrepend && createVNode("div", {
|
|
7762
|
+
"key": "prepend",
|
|
7763
|
+
"class": "v-list-item__prepend"
|
|
7764
|
+
}, [props.prependAvatar && createVNode(VAvatar, {
|
|
7765
|
+
"key": "prepend-avatar",
|
|
7766
|
+
"density": props.density,
|
|
7767
|
+
"image": props.prependAvatar
|
|
7768
|
+
}, null), props.prependIcon && createVNode(VIcon, {
|
|
7769
|
+
"key": "prepend-icon",
|
|
7770
|
+
"density": props.density,
|
|
7771
|
+
"icon": props.prependIcon
|
|
7772
|
+
}, null), slots.prepend && createVNode(VDefaultsProvider, {
|
|
7733
7773
|
"key": "prepend",
|
|
7734
7774
|
"defaults": {
|
|
7735
7775
|
VAvatar: {
|
|
@@ -7745,14 +7785,8 @@ const VListItem = genericComponent()({
|
|
|
7745
7785
|
}
|
|
7746
7786
|
}
|
|
7747
7787
|
}, {
|
|
7748
|
-
default: () => [
|
|
7749
|
-
|
|
7750
|
-
}, [props.prependAvatar && createVNode(VAvatar, {
|
|
7751
|
-
"key": "prepend-avatar"
|
|
7752
|
-
}, null), props.prependIcon && createVNode(VIcon, {
|
|
7753
|
-
"key": "prepend-icon"
|
|
7754
|
-
}, null), (_slots$prepend = slots.prepend) == null ? void 0 : _slots$prepend.call(slots, slotProps.value)])]
|
|
7755
|
-
}), createVNode("div", {
|
|
7788
|
+
default: () => [slots.prepend(slotProps.value)]
|
|
7789
|
+
})]), createVNode("div", {
|
|
7756
7790
|
"class": "v-list-item__content",
|
|
7757
7791
|
"data-no-activator": ""
|
|
7758
7792
|
}, [hasTitle && createVNode(VListItemTitle, {
|
|
@@ -7767,7 +7801,10 @@ const VListItem = genericComponent()({
|
|
|
7767
7801
|
default: () => [((_slots$subtitle = slots.subtitle) == null ? void 0 : _slots$subtitle.call(slots, {
|
|
7768
7802
|
subtitle: props.subtitle
|
|
7769
7803
|
})) ?? props.subtitle]
|
|
7770
|
-
}), (_slots$default = slots.default) == null ? void 0 : _slots$default.call(slots, slotProps.value)]), hasAppend && createVNode(
|
|
7804
|
+
}), (_slots$default = slots.default) == null ? void 0 : _slots$default.call(slots, slotProps.value)]), hasAppend && createVNode("div", {
|
|
7805
|
+
"key": "append",
|
|
7806
|
+
"class": "v-list-item__append"
|
|
7807
|
+
}, [slots.append && createVNode(VDefaultsProvider, {
|
|
7771
7808
|
"key": "append",
|
|
7772
7809
|
"defaults": {
|
|
7773
7810
|
VAvatar: {
|
|
@@ -7783,14 +7820,16 @@ const VListItem = genericComponent()({
|
|
|
7783
7820
|
}
|
|
7784
7821
|
}
|
|
7785
7822
|
}, {
|
|
7786
|
-
default: () => [
|
|
7787
|
-
|
|
7788
|
-
|
|
7789
|
-
|
|
7790
|
-
|
|
7791
|
-
|
|
7792
|
-
|
|
7793
|
-
|
|
7823
|
+
default: () => [slots.append(slotProps.value)]
|
|
7824
|
+
}), props.appendIcon && createVNode(VIcon, {
|
|
7825
|
+
"key": "append-icon",
|
|
7826
|
+
"density": props.density,
|
|
7827
|
+
"icon": props.appendIcon
|
|
7828
|
+
}, null), props.appendAvatar && createVNode(VAvatar, {
|
|
7829
|
+
"key": "append-avatar",
|
|
7830
|
+
"density": props.density,
|
|
7831
|
+
"image": props.appendAvatar
|
|
7832
|
+
}, null)])]
|
|
7794
7833
|
}), [[resolveDirective("ripple"), isClickable.value && props.ripple]]);
|
|
7795
7834
|
});
|
|
7796
7835
|
return {};
|
|
@@ -8004,9 +8043,12 @@ function useItems(props) {
|
|
|
8004
8043
|
|
|
8005
8044
|
// Types
|
|
8006
8045
|
|
|
8046
|
+
function isPrimitive(value) {
|
|
8047
|
+
return typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean';
|
|
8048
|
+
}
|
|
8007
8049
|
function transformItem(props, item) {
|
|
8008
8050
|
const type = getPropertyFromItem(item, props.itemType, 'item');
|
|
8009
|
-
const title =
|
|
8051
|
+
const title = isPrimitive(item) ? item : getPropertyFromItem(item, props.itemTitle);
|
|
8010
8052
|
const value = getPropertyFromItem(item, props.itemValue, undefined);
|
|
8011
8053
|
const children = getPropertyFromItem(item, props.itemChildren);
|
|
8012
8054
|
const itemProps = props.itemProps === true ? pick(item, ['children'])[1] : getPropertyFromItem(item, props.itemProps);
|
|
@@ -8632,17 +8674,12 @@ const makeLocationStrategyProps = propsFactory({
|
|
|
8632
8674
|
function useLocationStrategies(props, data) {
|
|
8633
8675
|
const contentStyles = ref({});
|
|
8634
8676
|
const updateLocation = ref();
|
|
8635
|
-
|
|
8636
|
-
|
|
8637
|
-
|
|
8638
|
-
|
|
8639
|
-
|
|
8640
|
-
|
|
8641
|
-
scope = effectScope();
|
|
8642
|
-
if (!(props.locationStrategy === 'connected')) {
|
|
8643
|
-
await nextTick();
|
|
8644
|
-
}
|
|
8645
|
-
scope.run(() => {
|
|
8677
|
+
if (IN_BROWSER) {
|
|
8678
|
+
useToggleScope(() => !!(data.isActive.value && props.locationStrategy), reset => {
|
|
8679
|
+
watch(() => props.locationStrategy, reset);
|
|
8680
|
+
onScopeDispose(() => {
|
|
8681
|
+
updateLocation.value = undefined;
|
|
8682
|
+
});
|
|
8646
8683
|
if (typeof props.locationStrategy === 'function') {
|
|
8647
8684
|
var _props$locationStrate;
|
|
8648
8685
|
updateLocation.value = (_props$locationStrate = props.locationStrategy(data, props, contentStyles)) == null ? void 0 : _props$locationStrate.updateLocation;
|
|
@@ -8651,16 +8688,14 @@ function useLocationStrategies(props, data) {
|
|
|
8651
8688
|
updateLocation.value = (_locationStrategies$p = locationStrategies[props.locationStrategy](data, props, contentStyles)) == null ? void 0 : _locationStrategies$p.updateLocation;
|
|
8652
8689
|
}
|
|
8653
8690
|
});
|
|
8654
|
-
|
|
8655
|
-
|
|
8656
|
-
|
|
8657
|
-
|
|
8658
|
-
|
|
8659
|
-
|
|
8660
|
-
|
|
8661
|
-
|
|
8662
|
-
(_scope2 = scope) == null ? void 0 : _scope2.stop();
|
|
8663
|
-
});
|
|
8691
|
+
window.addEventListener('resize', onResize, {
|
|
8692
|
+
passive: true
|
|
8693
|
+
});
|
|
8694
|
+
onScopeDispose(() => {
|
|
8695
|
+
window.removeEventListener('resize', onResize);
|
|
8696
|
+
updateLocation.value = undefined;
|
|
8697
|
+
});
|
|
8698
|
+
}
|
|
8664
8699
|
function onResize(e) {
|
|
8665
8700
|
var _updateLocation$value;
|
|
8666
8701
|
(_updateLocation$value = updateLocation.value) == null ? void 0 : _updateLocation$value.call(updateLocation, e);
|
|
@@ -8954,13 +8989,30 @@ function connectedLocationStrategy(data, props, contentStyles) {
|
|
|
8954
8989
|
maxWidth: convertToUnit(pixelCeil(clamp(available.x, minWidth.value === Infinity ? 0 : minWidth.value, maxWidth.value))),
|
|
8955
8990
|
maxHeight: convertToUnit(pixelCeil(clamp(available.y, minHeight.value === Infinity ? 0 : minHeight.value, maxHeight.value)))
|
|
8956
8991
|
});
|
|
8992
|
+
return {
|
|
8993
|
+
available,
|
|
8994
|
+
contentBox
|
|
8995
|
+
};
|
|
8957
8996
|
}
|
|
8958
|
-
watch(() => [preferredAnchor.value, preferredOrigin.value, props.offset, props.minWidth, props.minHeight, props.maxWidth, props.maxHeight], () => updateLocation()
|
|
8959
|
-
|
|
8960
|
-
|
|
8961
|
-
|
|
8962
|
-
|
|
8963
|
-
|
|
8997
|
+
watch(() => [preferredAnchor.value, preferredOrigin.value, props.offset, props.minWidth, props.minHeight, props.maxWidth, props.maxHeight], () => updateLocation());
|
|
8998
|
+
nextTick(() => {
|
|
8999
|
+
const result = updateLocation();
|
|
9000
|
+
|
|
9001
|
+
// TODO: overflowing content should only require a single updateLocation call
|
|
9002
|
+
// Icky hack to make sure the content is positioned consistently
|
|
9003
|
+
if (!result) return;
|
|
9004
|
+
const {
|
|
9005
|
+
available,
|
|
9006
|
+
contentBox
|
|
9007
|
+
} = result;
|
|
9008
|
+
if (contentBox.height > available.y) {
|
|
9009
|
+
requestAnimationFrame(() => {
|
|
9010
|
+
updateLocation();
|
|
9011
|
+
requestAnimationFrame(() => {
|
|
9012
|
+
updateLocation();
|
|
9013
|
+
});
|
|
9014
|
+
});
|
|
9015
|
+
}
|
|
8964
9016
|
});
|
|
8965
9017
|
return {
|
|
8966
9018
|
updateLocation
|
|
@@ -9028,10 +9080,10 @@ function useScrollStrategies(props, data) {
|
|
|
9028
9080
|
await nextTick();
|
|
9029
9081
|
scope.run(() => {
|
|
9030
9082
|
if (typeof props.scrollStrategy === 'function') {
|
|
9031
|
-
props.scrollStrategy(data, props);
|
|
9083
|
+
props.scrollStrategy(data, props, scope);
|
|
9032
9084
|
} else {
|
|
9033
9085
|
var _scrollStrategies$pro;
|
|
9034
|
-
(_scrollStrategies$pro = scrollStrategies[props.scrollStrategy]) == null ? void 0 : _scrollStrategies$pro.call(scrollStrategies, data, props);
|
|
9086
|
+
(_scrollStrategies$pro = scrollStrategies[props.scrollStrategy]) == null ? void 0 : _scrollStrategies$pro.call(scrollStrategies, data, props, scope);
|
|
9035
9087
|
}
|
|
9036
9088
|
});
|
|
9037
9089
|
});
|
|
@@ -9077,9 +9129,10 @@ function blockScrollStrategy(data, props) {
|
|
|
9077
9129
|
}
|
|
9078
9130
|
});
|
|
9079
9131
|
}
|
|
9080
|
-
function repositionScrollStrategy(data) {
|
|
9132
|
+
function repositionScrollStrategy(data, props, scope) {
|
|
9081
9133
|
let slow = false;
|
|
9082
9134
|
let raf = -1;
|
|
9135
|
+
let ric = -1;
|
|
9083
9136
|
function update(e) {
|
|
9084
9137
|
requestNewFrame(() => {
|
|
9085
9138
|
var _data$updateLocation$, _data$updateLocation;
|
|
@@ -9089,21 +9142,29 @@ function repositionScrollStrategy(data) {
|
|
|
9089
9142
|
slow = time / (1000 / 60) > 2;
|
|
9090
9143
|
});
|
|
9091
9144
|
}
|
|
9092
|
-
|
|
9093
|
-
|
|
9094
|
-
|
|
9095
|
-
|
|
9096
|
-
|
|
9097
|
-
|
|
9098
|
-
|
|
9099
|
-
|
|
9100
|
-
|
|
9145
|
+
ric = requestIdleCallback(() => {
|
|
9146
|
+
scope.run(() => {
|
|
9147
|
+
bindScroll(data.activatorEl.value ?? data.contentEl.value, e => {
|
|
9148
|
+
if (slow) {
|
|
9149
|
+
// If the position calculation is slow,
|
|
9150
|
+
// defer updates until scrolling is finished.
|
|
9151
|
+
// Browsers usually fire one scroll event per frame so
|
|
9152
|
+
// we just wait until we've got two frames without an event
|
|
9153
|
+
cancelAnimationFrame(raf);
|
|
9154
|
+
raf = requestAnimationFrame(() => {
|
|
9155
|
+
raf = requestAnimationFrame(() => {
|
|
9156
|
+
update(e);
|
|
9157
|
+
});
|
|
9158
|
+
});
|
|
9159
|
+
} else {
|
|
9101
9160
|
update(e);
|
|
9102
|
-
}
|
|
9161
|
+
}
|
|
9103
9162
|
});
|
|
9104
|
-
}
|
|
9105
|
-
|
|
9106
|
-
|
|
9163
|
+
});
|
|
9164
|
+
});
|
|
9165
|
+
onScopeDispose(() => {
|
|
9166
|
+
cancelIdleCallback(ric);
|
|
9167
|
+
cancelAnimationFrame(raf);
|
|
9107
9168
|
});
|
|
9108
9169
|
}
|
|
9109
9170
|
|
|
@@ -9746,6 +9807,11 @@ const VMenu = genericComponent()({
|
|
|
9746
9807
|
function onClickOutside() {
|
|
9747
9808
|
parent == null ? void 0 : parent.closeParents();
|
|
9748
9809
|
}
|
|
9810
|
+
const activatorProps = computed(() => mergeProps({
|
|
9811
|
+
'aria-haspopup': 'menu',
|
|
9812
|
+
'aria-expanded': String(isActive.value),
|
|
9813
|
+
'aria-owns': id.value
|
|
9814
|
+
}, props.activatorProps));
|
|
9749
9815
|
useRender(() => {
|
|
9750
9816
|
const [overlayProps] = filterVOverlayProps(props);
|
|
9751
9817
|
return createVNode(VOverlay, mergeProps({
|
|
@@ -9755,11 +9821,7 @@ const VMenu = genericComponent()({
|
|
|
9755
9821
|
"modelValue": isActive.value,
|
|
9756
9822
|
"onUpdate:modelValue": $event => isActive.value = $event,
|
|
9757
9823
|
"absolute": true,
|
|
9758
|
-
"activatorProps":
|
|
9759
|
-
'aria-haspopup': 'menu',
|
|
9760
|
-
'aria-expanded': String(isActive.value),
|
|
9761
|
-
'aria-owns': id.value
|
|
9762
|
-
}, props.activatorProps),
|
|
9824
|
+
"activatorProps": activatorProps.value,
|
|
9763
9825
|
"onClick:outside": onClickOutside
|
|
9764
9826
|
}, scopeId), {
|
|
9765
9827
|
activator: slots.activator,
|
|
@@ -9873,8 +9935,10 @@ const VSelect = genericComponent()({
|
|
|
9873
9935
|
}
|
|
9874
9936
|
function onKeydown(e) {
|
|
9875
9937
|
if (props.readonly || form != null && form.isReadonly.value) return;
|
|
9876
|
-
if (['Enter', 'ArrowDown', ' '].includes(e.key)) {
|
|
9938
|
+
if (['Enter', ' ', 'ArrowDown', 'ArrowUp', 'Home', 'End'].includes(e.key)) {
|
|
9877
9939
|
e.preventDefault();
|
|
9940
|
+
}
|
|
9941
|
+
if (['Enter', 'ArrowDown', ' '].includes(e.key)) {
|
|
9878
9942
|
menu.value = true;
|
|
9879
9943
|
}
|
|
9880
9944
|
if (['Escape', 'Tab'].includes(e.key)) {
|
|
@@ -9885,15 +9949,12 @@ const VSelect = genericComponent()({
|
|
|
9885
9949
|
(_listRef$value = listRef.value) == null ? void 0 : _listRef$value.focus('next');
|
|
9886
9950
|
} else if (e.key === 'ArrowUp') {
|
|
9887
9951
|
var _listRef$value2;
|
|
9888
|
-
e.preventDefault();
|
|
9889
9952
|
(_listRef$value2 = listRef.value) == null ? void 0 : _listRef$value2.focus('prev');
|
|
9890
9953
|
} else if (e.key === 'Home') {
|
|
9891
9954
|
var _listRef$value3;
|
|
9892
|
-
e.preventDefault();
|
|
9893
9955
|
(_listRef$value3 = listRef.value) == null ? void 0 : _listRef$value3.focus('first');
|
|
9894
9956
|
} else if (e.key === 'End') {
|
|
9895
9957
|
var _listRef$value4;
|
|
9896
|
-
e.preventDefault();
|
|
9897
9958
|
(_listRef$value4 = listRef.value) == null ? void 0 : _listRef$value4.focus('last');
|
|
9898
9959
|
}
|
|
9899
9960
|
}
|
|
@@ -10237,6 +10298,9 @@ const VAutocomplete = genericComponent()({
|
|
|
10237
10298
|
}
|
|
10238
10299
|
function onKeydown(e) {
|
|
10239
10300
|
if (props.readonly || form != null && form.isReadonly.value) return;
|
|
10301
|
+
if (['Enter', 'ArrowDown', 'ArrowUp'].includes(e.key)) {
|
|
10302
|
+
e.preventDefault();
|
|
10303
|
+
}
|
|
10240
10304
|
if (['Enter', 'ArrowDown'].includes(e.key)) {
|
|
10241
10305
|
menu.value = true;
|
|
10242
10306
|
}
|
|
@@ -10248,11 +10312,9 @@ const VAutocomplete = genericComponent()({
|
|
|
10248
10312
|
}
|
|
10249
10313
|
if (e.key === 'ArrowDown') {
|
|
10250
10314
|
var _listRef$value;
|
|
10251
|
-
e.preventDefault();
|
|
10252
10315
|
(_listRef$value = listRef.value) == null ? void 0 : _listRef$value.focus('next');
|
|
10253
10316
|
} else if (e.key === 'ArrowUp') {
|
|
10254
10317
|
var _listRef$value2;
|
|
10255
|
-
e.preventDefault();
|
|
10256
10318
|
(_listRef$value2 = listRef.value) == null ? void 0 : _listRef$value2.focus('prev');
|
|
10257
10319
|
}
|
|
10258
10320
|
}
|
|
@@ -13581,7 +13643,9 @@ const VCombobox = genericComponent()({
|
|
|
13581
13643
|
if (props.readonly || form != null && form.isReadonly.value) return;
|
|
13582
13644
|
const selectionStart = vTextFieldRef.value.selectionStart;
|
|
13583
13645
|
const length = selected.value.length;
|
|
13584
|
-
if (selectionIndex.value > -1
|
|
13646
|
+
if (selectionIndex.value > -1 || ['Enter', 'ArrowDown', 'ArrowUp'].includes(e.key)) {
|
|
13647
|
+
e.preventDefault();
|
|
13648
|
+
}
|
|
13585
13649
|
if (['Enter', 'ArrowDown'].includes(e.key)) {
|
|
13586
13650
|
menu.value = true;
|
|
13587
13651
|
}
|
|
@@ -13593,11 +13657,9 @@ const VCombobox = genericComponent()({
|
|
|
13593
13657
|
}
|
|
13594
13658
|
if (e.key === 'ArrowDown') {
|
|
13595
13659
|
var _listRef$value;
|
|
13596
|
-
e.preventDefault();
|
|
13597
13660
|
(_listRef$value = listRef.value) == null ? void 0 : _listRef$value.focus('next');
|
|
13598
13661
|
} else if (e.key === 'ArrowUp') {
|
|
13599
13662
|
var _listRef$value2;
|
|
13600
|
-
e.preventDefault();
|
|
13601
13663
|
(_listRef$value2 = listRef.value) == null ? void 0 : _listRef$value2.focus('prev');
|
|
13602
13664
|
}
|
|
13603
13665
|
if (!props.multiple) return;
|
|
@@ -13892,6 +13954,10 @@ const VDialog = genericComponent()({
|
|
|
13892
13954
|
});
|
|
13893
13955
|
}
|
|
13894
13956
|
});
|
|
13957
|
+
const activatorProps = computed(() => mergeProps({
|
|
13958
|
+
'aria-haspopup': 'dialog',
|
|
13959
|
+
'aria-expanded': String(isActive.value)
|
|
13960
|
+
}, props.activatorProps));
|
|
13895
13961
|
useRender(() => {
|
|
13896
13962
|
const [overlayProps] = filterVOverlayProps(props);
|
|
13897
13963
|
return createVNode(VOverlay, mergeProps({
|
|
@@ -13905,10 +13971,7 @@ const VDialog = genericComponent()({
|
|
|
13905
13971
|
"onUpdate:modelValue": $event => isActive.value = $event,
|
|
13906
13972
|
"aria-role": "dialog",
|
|
13907
13973
|
"aria-modal": "true",
|
|
13908
|
-
"activatorProps":
|
|
13909
|
-
'aria-haspopup': 'dialog',
|
|
13910
|
-
'aria-expanded': String(isActive.value)
|
|
13911
|
-
}, props.activatorProps)
|
|
13974
|
+
"activatorProps": activatorProps.value
|
|
13912
13975
|
}, scopeId), {
|
|
13913
13976
|
activator: slots.activator,
|
|
13914
13977
|
default: function () {
|
|
@@ -14257,12 +14320,15 @@ const VFileInput = defineComponent({
|
|
|
14257
14320
|
onFocus();
|
|
14258
14321
|
nextTick(() => {
|
|
14259
14322
|
model.value = [];
|
|
14260
|
-
if (inputRef != null && inputRef.value) {
|
|
14261
|
-
inputRef.value.value = '';
|
|
14262
|
-
}
|
|
14263
14323
|
callEvent(props['onClick:clear'], e);
|
|
14264
14324
|
});
|
|
14265
14325
|
}
|
|
14326
|
+
watch(model, newValue => {
|
|
14327
|
+
const hasModelReset = !Array.isArray(newValue) || !newValue.length;
|
|
14328
|
+
if (hasModelReset && inputRef.value) {
|
|
14329
|
+
inputRef.value.value = '';
|
|
14330
|
+
}
|
|
14331
|
+
});
|
|
14266
14332
|
useRender(() => {
|
|
14267
14333
|
const hasCounter = !!(slots.counter || props.counter);
|
|
14268
14334
|
const hasDetails = !!(hasCounter || slots.details);
|
|
@@ -15253,7 +15319,7 @@ function useTouch(_ref) {
|
|
|
15253
15319
|
window.removeEventListener('touchmove', onTouchmove);
|
|
15254
15320
|
window.removeEventListener('touchend', onTouchend);
|
|
15255
15321
|
});
|
|
15256
|
-
const isHorizontal = computed(() => position.value
|
|
15322
|
+
const isHorizontal = computed(() => ['left', 'right'].includes(position.value));
|
|
15257
15323
|
const {
|
|
15258
15324
|
addMovement,
|
|
15259
15325
|
endTouch,
|
|
@@ -15265,11 +15331,11 @@ function useTouch(_ref) {
|
|
|
15265
15331
|
const offset = ref(0);
|
|
15266
15332
|
let start;
|
|
15267
15333
|
function getOffset(pos, active) {
|
|
15268
|
-
return (position.value === 'left' ? pos : position.value === 'right' ? document.documentElement.clientWidth - pos : position.value === 'bottom' ? document.documentElement.clientHeight - pos : oops()) - (active ? width.value : 0);
|
|
15334
|
+
return (position.value === 'left' ? pos : position.value === 'right' ? document.documentElement.clientWidth - pos : position.value === 'top' ? pos : position.value === 'bottom' ? document.documentElement.clientHeight - pos : oops()) - (active ? width.value : 0);
|
|
15269
15335
|
}
|
|
15270
15336
|
function getProgress(pos) {
|
|
15271
15337
|
let limit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
15272
|
-
const progress = position.value === 'left' ? (pos - offset.value) / width.value : position.value === 'right' ? (document.documentElement.clientWidth - pos - offset.value) / width.value : position.value === 'bottom' ? (document.documentElement.clientHeight - pos - offset.value) / width.value : oops();
|
|
15338
|
+
const progress = position.value === 'left' ? (pos - offset.value) / width.value : position.value === 'right' ? (document.documentElement.clientWidth - pos - offset.value) / width.value : position.value === 'top' ? (pos - offset.value) / width.value : position.value === 'bottom' ? (document.documentElement.clientHeight - pos - offset.value) / width.value : oops();
|
|
15273
15339
|
return limit ? Math.max(0, Math.min(1, progress)) : progress;
|
|
15274
15340
|
}
|
|
15275
15341
|
function onTouchstart(e) {
|
|
@@ -15277,8 +15343,8 @@ function useTouch(_ref) {
|
|
|
15277
15343
|
const touchX = e.changedTouches[0].clientX;
|
|
15278
15344
|
const touchY = e.changedTouches[0].clientY;
|
|
15279
15345
|
const touchZone = 25;
|
|
15280
|
-
const inTouchZone = position.value === 'left' ? touchX < touchZone : position.value === 'right' ? touchX > document.documentElement.clientWidth - touchZone : position.value === 'bottom' ? touchY > document.documentElement.clientHeight - touchZone : oops();
|
|
15281
|
-
const inElement = isActive.value && (position.value === 'left' ? touchX < width.value : position.value === 'right' ? touchX > document.documentElement.clientWidth - width.value : position.value === 'bottom' ? touchY > document.documentElement.clientHeight - width.value : oops());
|
|
15346
|
+
const inTouchZone = position.value === 'left' ? touchX < touchZone : position.value === 'right' ? touchX > document.documentElement.clientWidth - touchZone : position.value === 'top' ? touchY < touchZone : position.value === 'bottom' ? touchY > document.documentElement.clientHeight - touchZone : oops();
|
|
15347
|
+
const inElement = isActive.value && (position.value === 'left' ? touchX < width.value : position.value === 'right' ? touchX > document.documentElement.clientWidth - width.value : position.value === 'top' ? touchY < width.value : position.value === 'bottom' ? touchY > document.documentElement.clientHeight - width.value : oops());
|
|
15282
15348
|
if (inTouchZone || inElement || isActive.value && isTemporary.value) {
|
|
15283
15349
|
maybeDragging = true;
|
|
15284
15350
|
start = [touchX, touchY];
|
|
@@ -15330,6 +15396,7 @@ function useTouch(_ref) {
|
|
|
15330
15396
|
isActive.value = velocity.direction === ({
|
|
15331
15397
|
left: 'right',
|
|
15332
15398
|
right: 'left',
|
|
15399
|
+
top: 'down',
|
|
15333
15400
|
bottom: 'up'
|
|
15334
15401
|
}[position.value] || oops());
|
|
15335
15402
|
} else {
|
|
@@ -15338,7 +15405,7 @@ function useTouch(_ref) {
|
|
|
15338
15405
|
}
|
|
15339
15406
|
const dragStyles = computed(() => {
|
|
15340
15407
|
return isDragging.value ? {
|
|
15341
|
-
transform: position.value === 'left' ? `translateX(calc(-100% + ${dragProgress.value * width.value}px))` : position.value === 'right' ? `translateX(calc(100% - ${dragProgress.value * width.value}px))` : position.value === 'bottom' ? `translateY(calc(100% - ${dragProgress.value * width.value}px))` : oops(),
|
|
15408
|
+
transform: position.value === 'left' ? `translateX(calc(-100% + ${dragProgress.value * width.value}px))` : position.value === 'right' ? `translateX(calc(100% - ${dragProgress.value * width.value}px))` : position.value === 'top' ? `translateY(calc(-100% + ${dragProgress.value * width.value}px))` : position.value === 'bottom' ? `translateY(calc(100% - ${dragProgress.value * width.value}px))` : oops(),
|
|
15342
15409
|
transition: 'none'
|
|
15343
15410
|
} : undefined;
|
|
15344
15411
|
});
|
|
@@ -15354,7 +15421,7 @@ function oops() {
|
|
|
15354
15421
|
|
|
15355
15422
|
// Types
|
|
15356
15423
|
|
|
15357
|
-
const locations = ['start', 'end', 'left', 'right', 'bottom'];
|
|
15424
|
+
const locations = ['start', 'end', 'left', 'right', 'top', 'bottom'];
|
|
15358
15425
|
const VNavigationDrawer = defineComponent({
|
|
15359
15426
|
name: 'VNavigationDrawer',
|
|
15360
15427
|
props: {
|
|
@@ -15811,7 +15878,7 @@ const VPagination = defineComponent({
|
|
|
15811
15878
|
disabled: !!props.disabled || props.length < 2,
|
|
15812
15879
|
color: isActive ? props.activeColor : props.color,
|
|
15813
15880
|
ariaCurrent: isActive,
|
|
15814
|
-
ariaLabel: t(isActive ? props.currentPageAriaLabel : props.pageAriaLabel,
|
|
15881
|
+
ariaLabel: t(isActive ? props.currentPageAriaLabel : props.pageAriaLabel, item),
|
|
15815
15882
|
onClick: e => setValue(e, item)
|
|
15816
15883
|
}
|
|
15817
15884
|
};
|
|
@@ -17990,6 +18057,9 @@ const VTooltip = genericComponent()({
|
|
|
17990
18057
|
if (props.transition) return props.transition;
|
|
17991
18058
|
return isActive.value ? 'scale-transition' : 'fade-transition';
|
|
17992
18059
|
});
|
|
18060
|
+
const activatorProps = computed(() => mergeProps({
|
|
18061
|
+
'aria-describedby': id.value
|
|
18062
|
+
}, props.activatorProps));
|
|
17993
18063
|
useRender(() => {
|
|
17994
18064
|
const [overlayProps] = filterVOverlayProps(props);
|
|
17995
18065
|
return createVNode(VOverlay, mergeProps({
|
|
@@ -18006,9 +18076,7 @@ const VTooltip = genericComponent()({
|
|
|
18006
18076
|
"persistent": true,
|
|
18007
18077
|
"role": "tooltip",
|
|
18008
18078
|
"eager": true,
|
|
18009
|
-
"activatorProps":
|
|
18010
|
-
'aria-describedby': id.value
|
|
18011
|
-
}, props.activatorProps),
|
|
18079
|
+
"activatorProps": activatorProps.value,
|
|
18012
18080
|
"_disableGlobalStack": true
|
|
18013
18081
|
}, scopeId), {
|
|
18014
18082
|
activator: slots.activator,
|
|
@@ -18957,7 +19025,7 @@ const VDataTableRows = defineComponent({
|
|
|
18957
19025
|
});
|
|
18958
19026
|
},
|
|
18959
19027
|
"item": item
|
|
18960
|
-
}, slots), isExpanded(item
|
|
19028
|
+
}, slots), isExpanded(item) && ((_slots$expandedRow = slots['expanded-row']) == null ? void 0 : _slots$expandedRow.call(slots, {
|
|
18961
19029
|
item,
|
|
18962
19030
|
columns: columns.value
|
|
18963
19031
|
}))]);
|
|
@@ -18995,7 +19063,7 @@ function createPagination(props, items) {
|
|
|
18995
19063
|
return Math.min(itemsLength.value, startIndex.value + itemsPerPage.value);
|
|
18996
19064
|
});
|
|
18997
19065
|
const pageCount = computed(() => {
|
|
18998
|
-
if (itemsPerPage.value === -1) return 1;
|
|
19066
|
+
if (itemsPerPage.value === -1 || itemsLength.value === 0) return 1;
|
|
18999
19067
|
return Math.ceil(itemsLength.value / itemsPerPage.value);
|
|
19000
19068
|
});
|
|
19001
19069
|
watchEffect(() => {
|
|
@@ -19098,7 +19166,7 @@ const VDataTableFooter = defineComponent({
|
|
|
19098
19166
|
"hide-details": true
|
|
19099
19167
|
}, null)]), createVNode("div", {
|
|
19100
19168
|
"class": "v-data-table-footer__info"
|
|
19101
|
-
}, [createVNode("div", null, [
|
|
19169
|
+
}, [createVNode("div", null, [!itemsLength.value ? 0 : startIndex.value + 1, createTextVNode(" - "), stopIndex.value, createTextVNode(" of "), itemsLength.value])]), createVNode("div", {
|
|
19102
19170
|
"class": "v-data-table-footer__pagination"
|
|
19103
19171
|
}, [createVNode(VBtn, {
|
|
19104
19172
|
"icon": props.firstIcon,
|
|
@@ -19166,18 +19234,14 @@ function useOptions(_ref) {
|
|
|
19166
19234
|
page,
|
|
19167
19235
|
itemsPerPage,
|
|
19168
19236
|
sortBy,
|
|
19169
|
-
|
|
19170
|
-
stopIndex,
|
|
19171
|
-
pageCount
|
|
19237
|
+
groupBy
|
|
19172
19238
|
} = _ref;
|
|
19173
19239
|
const vm = getCurrentInstance('VDataTable');
|
|
19174
19240
|
const options = computed(() => ({
|
|
19175
19241
|
page: page.value,
|
|
19176
19242
|
itemsPerPage: itemsPerPage.value,
|
|
19177
|
-
|
|
19178
|
-
|
|
19179
|
-
pageCount: pageCount.value,
|
|
19180
|
-
sortBy: sortBy.value
|
|
19243
|
+
sortBy: sortBy.value,
|
|
19244
|
+
groupBy: groupBy.value
|
|
19181
19245
|
}));
|
|
19182
19246
|
|
|
19183
19247
|
// Reset page when sorting changes
|
|
@@ -19279,8 +19343,7 @@ const VDataTable = defineComponent({
|
|
|
19279
19343
|
page,
|
|
19280
19344
|
itemsPerPage,
|
|
19281
19345
|
startIndex,
|
|
19282
|
-
stopIndex
|
|
19283
|
-
pageCount
|
|
19346
|
+
stopIndex
|
|
19284
19347
|
} = createPagination(props, flatItems);
|
|
19285
19348
|
const {
|
|
19286
19349
|
paginatedItems
|
|
@@ -19292,9 +19355,7 @@ const VDataTable = defineComponent({
|
|
|
19292
19355
|
page,
|
|
19293
19356
|
itemsPerPage,
|
|
19294
19357
|
sortBy,
|
|
19295
|
-
|
|
19296
|
-
startIndex,
|
|
19297
|
-
stopIndex
|
|
19358
|
+
groupBy
|
|
19298
19359
|
});
|
|
19299
19360
|
provideDefaults({
|
|
19300
19361
|
VDataTableRows: {
|
|
@@ -19488,10 +19549,8 @@ const VDataTableVirtual = defineComponent({
|
|
|
19488
19549
|
useOptions({
|
|
19489
19550
|
sortBy,
|
|
19490
19551
|
page: ref(1),
|
|
19491
|
-
|
|
19492
|
-
|
|
19493
|
-
pageCount: ref(1),
|
|
19494
|
-
itemsPerPage: ref(-1)
|
|
19552
|
+
itemsPerPage: ref(-1),
|
|
19553
|
+
groupBy
|
|
19495
19554
|
});
|
|
19496
19555
|
provideDefaults({
|
|
19497
19556
|
VDataTableRows: {
|
|
@@ -19567,7 +19626,8 @@ const VDataTableServer = defineComponent({
|
|
|
19567
19626
|
...makeDataTableItemProps(),
|
|
19568
19627
|
...makeDataTableSelectProps(),
|
|
19569
19628
|
...makeDataTableSortProps(),
|
|
19570
|
-
...makeDataTablePaginateProps()
|
|
19629
|
+
...makeDataTablePaginateProps(),
|
|
19630
|
+
...makeDataTableGroupProps()
|
|
19571
19631
|
},
|
|
19572
19632
|
emits: {
|
|
19573
19633
|
'update:modelValue': value => true,
|
|
@@ -19576,6 +19636,7 @@ const VDataTableServer = defineComponent({
|
|
|
19576
19636
|
'update:sortBy': sortBy => true,
|
|
19577
19637
|
'update:options': options => true,
|
|
19578
19638
|
'update:expanded': options => true,
|
|
19639
|
+
'update:groupBy': value => true,
|
|
19579
19640
|
'click:row': (event, value) => true
|
|
19580
19641
|
},
|
|
19581
19642
|
setup(props, _ref) {
|
|
@@ -19583,10 +19644,12 @@ const VDataTableServer = defineComponent({
|
|
|
19583
19644
|
emit,
|
|
19584
19645
|
slots
|
|
19585
19646
|
} = _ref;
|
|
19647
|
+
const groupBy = useProxiedModel(props, 'groupBy');
|
|
19586
19648
|
createExpanded(props);
|
|
19587
19649
|
const {
|
|
19588
19650
|
columns
|
|
19589
19651
|
} = createHeaders(props, {
|
|
19652
|
+
groupBy,
|
|
19590
19653
|
showSelect: toRef(props, 'showSelect'),
|
|
19591
19654
|
showExpand: toRef(props, 'showExpand')
|
|
19592
19655
|
});
|
|
@@ -19597,21 +19660,22 @@ const VDataTableServer = defineComponent({
|
|
|
19597
19660
|
sortBy,
|
|
19598
19661
|
toggleSort
|
|
19599
19662
|
} = createSort(props);
|
|
19663
|
+
const {
|
|
19664
|
+
opened
|
|
19665
|
+
} = createGroupBy(props, groupBy, sortBy);
|
|
19600
19666
|
const {
|
|
19601
19667
|
page,
|
|
19602
|
-
itemsPerPage
|
|
19603
|
-
startIndex,
|
|
19604
|
-
stopIndex,
|
|
19605
|
-
pageCount
|
|
19668
|
+
itemsPerPage
|
|
19606
19669
|
} = createPagination(props, items);
|
|
19670
|
+
const {
|
|
19671
|
+
flatItems
|
|
19672
|
+
} = useGroupedItems(items, groupBy, opened);
|
|
19607
19673
|
createSelection(props, items);
|
|
19608
19674
|
useOptions({
|
|
19609
19675
|
page,
|
|
19610
19676
|
itemsPerPage,
|
|
19611
19677
|
sortBy,
|
|
19612
|
-
|
|
19613
|
-
stopIndex,
|
|
19614
|
-
pageCount
|
|
19678
|
+
groupBy
|
|
19615
19679
|
});
|
|
19616
19680
|
provide('v-data-table', {
|
|
19617
19681
|
toggleSort,
|
|
@@ -19647,7 +19711,7 @@ const VDataTableServer = defineComponent({
|
|
|
19647
19711
|
"class": "v-data-table__tbody",
|
|
19648
19712
|
"role": "rowgroup"
|
|
19649
19713
|
}, [slots.body ? slots.body() : createVNode(VDataTableRows, {
|
|
19650
|
-
"items":
|
|
19714
|
+
"items": flatItems.value,
|
|
19651
19715
|
"onClick:row": (event, value) => emit('click:row', event, value)
|
|
19652
19716
|
}, slots)]), (_slots$tbody = slots.tbody) == null ? void 0 : _slots$tbody.call(slots), (_slots$tfoot = slots.tfoot) == null ? void 0 : _slots$tfoot.call(slots)]);
|
|
19653
19717
|
}),
|
|
@@ -19672,12 +19736,23 @@ const VVirtualScrollItem = defineComponent({
|
|
|
19672
19736
|
slots
|
|
19673
19737
|
} = _ref;
|
|
19674
19738
|
const {
|
|
19675
|
-
resizeRef
|
|
19676
|
-
|
|
19677
|
-
|
|
19678
|
-
|
|
19679
|
-
|
|
19739
|
+
resizeRef,
|
|
19740
|
+
contentRect
|
|
19741
|
+
} = useResizeObserver();
|
|
19742
|
+
useToggleScope(() => props.dynamicHeight, () => {
|
|
19743
|
+
watch(() => {
|
|
19744
|
+
var _contentRect$value;
|
|
19745
|
+
return (_contentRect$value = contentRect.value) == null ? void 0 : _contentRect$value.height;
|
|
19746
|
+
}, height => {
|
|
19747
|
+
if (height != null) emit('update:height', height);
|
|
19748
|
+
});
|
|
19680
19749
|
});
|
|
19750
|
+
function updateHeight() {
|
|
19751
|
+
if (props.dynamicHeight && contentRect.value) {
|
|
19752
|
+
emit('update:height', contentRect.value.height);
|
|
19753
|
+
}
|
|
19754
|
+
}
|
|
19755
|
+
onUpdated(updateHeight);
|
|
19681
19756
|
useRender(() => {
|
|
19682
19757
|
var _slots$default;
|
|
19683
19758
|
return createVNode("div", {
|
|
@@ -19699,15 +19774,8 @@ const VVirtualScroll = genericComponent()({
|
|
|
19699
19774
|
type: Array,
|
|
19700
19775
|
default: () => []
|
|
19701
19776
|
},
|
|
19702
|
-
itemKey: {
|
|
19703
|
-
type: String,
|
|
19704
|
-
default: 'value'
|
|
19705
|
-
},
|
|
19706
19777
|
itemHeight: [Number, String],
|
|
19707
|
-
visibleItems:
|
|
19708
|
-
type: [Number, String],
|
|
19709
|
-
default: 30
|
|
19710
|
-
},
|
|
19778
|
+
visibleItems: [Number, String],
|
|
19711
19779
|
...makeDimensionProps()
|
|
19712
19780
|
},
|
|
19713
19781
|
setup(props, _ref) {
|
|
@@ -19722,15 +19790,23 @@ const VVirtualScroll = genericComponent()({
|
|
|
19722
19790
|
baseItemHeight.value = val;
|
|
19723
19791
|
}
|
|
19724
19792
|
});
|
|
19725
|
-
const visibleItems = computed(() => parseInt(props.visibleItems, 10));
|
|
19726
19793
|
const rootEl = ref();
|
|
19727
|
-
const
|
|
19794
|
+
const {
|
|
19795
|
+
resizeRef,
|
|
19796
|
+
contentRect
|
|
19797
|
+
} = useResizeObserver();
|
|
19798
|
+
watchEffect(() => {
|
|
19799
|
+
resizeRef.value = rootEl.value;
|
|
19800
|
+
});
|
|
19801
|
+
const display = useDisplay();
|
|
19728
19802
|
const sizes = createRange(props.items.length).map(() => itemHeight.value);
|
|
19729
|
-
|
|
19730
|
-
|
|
19731
|
-
|
|
19803
|
+
const visibleItems = computed(() => {
|
|
19804
|
+
var _contentRect$value;
|
|
19805
|
+
return props.visibleItems ? parseInt(props.visibleItems, 10) : Math.max(12, Math.ceil((((_contentRect$value = contentRect.value) == null ? void 0 : _contentRect$value.height) ?? display.height.value) / itemHeight.value * 1.7 + 1));
|
|
19806
|
+
});
|
|
19807
|
+
function handleItemResize(index, height) {
|
|
19808
|
+
itemHeight.value = Math.max(itemHeight.value, height);
|
|
19732
19809
|
sizes[index] = height;
|
|
19733
|
-
if (!itemHeight.value) itemHeight.value = height;
|
|
19734
19810
|
}
|
|
19735
19811
|
function calculateOffset(index) {
|
|
19736
19812
|
return sizes.slice(0, index).reduce((curr, value) => curr + (value || itemHeight.value), 0);
|
|
@@ -19753,18 +19829,24 @@ const VVirtualScroll = genericComponent()({
|
|
|
19753
19829
|
}
|
|
19754
19830
|
let lastScrollTop = 0;
|
|
19755
19831
|
function handleScroll() {
|
|
19756
|
-
if (!rootEl.value) return;
|
|
19832
|
+
if (!rootEl.value || !contentRect.value) return;
|
|
19833
|
+
const height = contentRect.value.height;
|
|
19757
19834
|
const scrollTop = rootEl.value.scrollTop;
|
|
19758
19835
|
const direction = scrollTop < lastScrollTop ? UP : DOWN;
|
|
19759
|
-
const midPointIndex = calculateMidPointIndex(scrollTop);
|
|
19836
|
+
const midPointIndex = calculateMidPointIndex(scrollTop + height / 2);
|
|
19760
19837
|
const buffer = Math.round(visibleItems.value / 3);
|
|
19761
|
-
if (direction === UP && midPointIndex <= first.value) {
|
|
19838
|
+
if (direction === UP && midPointIndex <= first.value + buffer * 2 - 1) {
|
|
19762
19839
|
first.value = Math.max(midPointIndex - buffer, 0);
|
|
19763
|
-
} else if (direction === DOWN && midPointIndex >= first.value + buffer * 2) {
|
|
19840
|
+
} else if (direction === DOWN && midPointIndex >= first.value + buffer * 2 - 1) {
|
|
19764
19841
|
first.value = Math.min(Math.max(0, midPointIndex - buffer), props.items.length - visibleItems.value);
|
|
19765
19842
|
}
|
|
19766
19843
|
lastScrollTop = rootEl.value.scrollTop;
|
|
19767
19844
|
}
|
|
19845
|
+
function scrollToIndex(index) {
|
|
19846
|
+
if (!rootEl.value) return;
|
|
19847
|
+
const offset = calculateOffset(index);
|
|
19848
|
+
rootEl.value.scrollTop = offset;
|
|
19849
|
+
}
|
|
19768
19850
|
const last = computed(() => Math.min(props.items.length, first.value + visibleItems.value));
|
|
19769
19851
|
const computedItems = computed(() => props.items.slice(first.value, last.value));
|
|
19770
19852
|
const paddingTop = computed(() => calculateOffset(first.value));
|
|
@@ -19772,6 +19854,12 @@ const VVirtualScroll = genericComponent()({
|
|
|
19772
19854
|
const {
|
|
19773
19855
|
dimensionStyles
|
|
19774
19856
|
} = useDimension(props);
|
|
19857
|
+
onMounted(() => {
|
|
19858
|
+
if (!itemHeight.value) {
|
|
19859
|
+
// If itemHeight prop is not set, then calculate an estimated height from the average of inital items
|
|
19860
|
+
itemHeight.value = sizes.slice(first.value, last.value).reduce((curr, height) => curr + height, 0) / visibleItems.value;
|
|
19861
|
+
}
|
|
19862
|
+
});
|
|
19775
19863
|
useRender(() => createVNode("div", {
|
|
19776
19864
|
"ref": rootEl,
|
|
19777
19865
|
"class": "v-virtual-scroll",
|
|
@@ -19788,7 +19876,7 @@ const VVirtualScroll = genericComponent()({
|
|
|
19788
19876
|
return createVNode(VVirtualScrollItem, {
|
|
19789
19877
|
"key": index,
|
|
19790
19878
|
"dynamicHeight": !props.itemHeight,
|
|
19791
|
-
"onUpdate:height": height => handleItemResize(
|
|
19879
|
+
"onUpdate:height": height => handleItemResize(index + first.value, height)
|
|
19792
19880
|
}, {
|
|
19793
19881
|
default: () => [(_slots$default = slots.default) == null ? void 0 : _slots$default.call(slots, {
|
|
19794
19882
|
item,
|
|
@@ -19796,6 +19884,9 @@ const VVirtualScroll = genericComponent()({
|
|
|
19796
19884
|
})]
|
|
19797
19885
|
});
|
|
19798
19886
|
})])]));
|
|
19887
|
+
return {
|
|
19888
|
+
scrollToIndex
|
|
19889
|
+
};
|
|
19799
19890
|
}
|
|
19800
19891
|
});
|
|
19801
19892
|
|
|
@@ -19938,6 +20029,7 @@ var components = /*#__PURE__*/Object.freeze({
|
|
|
19938
20029
|
VDataTableRow: VDataTableRow,
|
|
19939
20030
|
VDataTableVirtual: VDataTableVirtual,
|
|
19940
20031
|
VDataTableServer: VDataTableServer,
|
|
20032
|
+
VDataTableFooter: VDataTableFooter,
|
|
19941
20033
|
VVirtualScroll: VVirtualScroll
|
|
19942
20034
|
});
|
|
19943
20035
|
|
|
@@ -20153,7 +20245,7 @@ function createVuetify$1() {
|
|
|
20153
20245
|
locale
|
|
20154
20246
|
};
|
|
20155
20247
|
}
|
|
20156
|
-
const version$1 = "3.1.
|
|
20248
|
+
const version$1 = "3.1.4";
|
|
20157
20249
|
createVuetify$1.version = version$1;
|
|
20158
20250
|
|
|
20159
20251
|
// Vue's inject() can only be used in setup
|
|
@@ -20166,7 +20258,7 @@ function inject(key) {
|
|
|
20166
20258
|
}
|
|
20167
20259
|
}
|
|
20168
20260
|
|
|
20169
|
-
const version = "3.1.
|
|
20261
|
+
const version = "3.1.4";
|
|
20170
20262
|
|
|
20171
20263
|
const createVuetify = function () {
|
|
20172
20264
|
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|