@vuetify/nightly 3.2.0-next-20230114.0 → 4.0.0-dev-20230206.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/CHANGELOG.md +203 -11
- package/dist/json/attributes.json +7202 -0
- package/dist/json/importMap-labs.json +4 -0
- package/dist/json/importMap.json +8 -8
- package/dist/json/tags.json +2492 -0
- package/dist/json/web-types.json +24081 -0
- package/dist/vuetify-labs.css +270 -262
- package/dist/vuetify-labs.d.ts +399 -176
- package/dist/vuetify-labs.esm.js +362 -278
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +361 -277
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +206 -198
- package/dist/vuetify.d.ts +329 -178
- package/dist/vuetify.esm.js +329 -248
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +328 -247
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +700 -689
- 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/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 +16 -5
- 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/VCombobox/VCombobox.mjs +4 -4
- 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.css +1 -0
- package/lib/components/VFileInput/VFileInput.mjs +7 -4
- package/lib/components/VFileInput/VFileInput.mjs.map +1 -1
- package/lib/components/VFileInput/VFileInput.sass +1 -0
- 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 +8 -8
- package/lib/components/VList/VListItem.mjs +29 -19
- package/lib/components/VList/VListItem.mjs.map +1 -1
- package/lib/components/VList/VListItem.sass +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/VProgressLinear/VProgressLinear.mjs +13 -1
- package/lib/components/VProgressLinear/VProgressLinear.mjs.map +1 -1
- package/lib/components/VProgressLinear/index.d.ts +18 -0
- 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/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 +328 -176
- package/lib/composables/defaults.mjs +1 -1
- package/lib/composables/defaults.mjs.map +1 -1
- package/lib/composables/filter.mjs +3 -3
- package/lib/composables/filter.mjs.map +1 -1
- package/lib/composables/form.mjs +0 -1
- package/lib/composables/form.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/entry-bundler.mjs.map +1 -1
- package/lib/framework.mjs +1 -1
- package/lib/framework.mjs.map +1 -1
- package/lib/index.d.ts +4 -4
- package/lib/labs/VDataTable/VDataTable.mjs +6 -6
- 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 +6 -5
- 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/components.d.ts +71 -1
- 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 +1 -1
package/dist/vuetify-labs.esm.js
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
/*!
|
2
|
-
* Vuetify
|
2
|
+
* Vuetify v4.0.0-dev-20230206.0
|
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 } 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
|
}
|
@@ -3368,18 +3382,21 @@ function useVariant(props) {
|
|
3368
3382
|
};
|
3369
3383
|
}
|
3370
3384
|
|
3385
|
+
// Types
|
3386
|
+
|
3387
|
+
const makeVBtnGroupProps = propsFactory({
|
3388
|
+
divided: Boolean,
|
3389
|
+
...makeBorderProps(),
|
3390
|
+
...makeDensityProps(),
|
3391
|
+
...makeElevationProps(),
|
3392
|
+
...makeRoundedProps(),
|
3393
|
+
...makeTagProps(),
|
3394
|
+
...makeThemeProps(),
|
3395
|
+
...makeVariantProps()
|
3396
|
+
}, 'v-btn-group');
|
3371
3397
|
const VBtnGroup = defineComponent({
|
3372
3398
|
name: 'VBtnGroup',
|
3373
|
-
props:
|
3374
|
-
divided: Boolean,
|
3375
|
-
...makeBorderProps(),
|
3376
|
-
...makeDensityProps(),
|
3377
|
-
...makeElevationProps(),
|
3378
|
-
...makeRoundedProps(),
|
3379
|
-
...makeTagProps(),
|
3380
|
-
...makeThemeProps(),
|
3381
|
-
...makeVariantProps()
|
3382
|
-
},
|
3399
|
+
props: makeVBtnGroupProps(),
|
3383
3400
|
setup(props, _ref) {
|
3384
3401
|
let {
|
3385
3402
|
slots
|
@@ -3417,6 +3434,9 @@ const VBtnGroup = defineComponent({
|
|
3417
3434
|
});
|
3418
3435
|
}
|
3419
3436
|
});
|
3437
|
+
function filterVBtnGroupProps(props) {
|
3438
|
+
return pick(props, Object.keys(VBtnGroup.props));
|
3439
|
+
}
|
3420
3440
|
|
3421
3441
|
// Composables
|
3422
3442
|
|
@@ -3624,7 +3644,10 @@ function getValues(items, ids) {
|
|
3624
3644
|
const VBtnToggleSymbol = Symbol.for('vuetify:v-btn-toggle');
|
3625
3645
|
const VBtnToggle = genericComponent()({
|
3626
3646
|
name: 'VBtnToggle',
|
3627
|
-
props:
|
3647
|
+
props: {
|
3648
|
+
...makeVBtnGroupProps(),
|
3649
|
+
...makeGroupProps()
|
3650
|
+
},
|
3628
3651
|
emits: {
|
3629
3652
|
'update:modelValue': value => true
|
3630
3653
|
},
|
@@ -3641,9 +3664,10 @@ const VBtnToggle = genericComponent()({
|
|
3641
3664
|
} = useGroup(props, VBtnToggleSymbol);
|
3642
3665
|
useRender(() => {
|
3643
3666
|
var _slots$default;
|
3644
|
-
|
3667
|
+
const [btnGroupProps] = filterVBtnGroupProps(props);
|
3668
|
+
return createVNode(VBtnGroup, mergeProps({
|
3645
3669
|
"class": "v-btn-toggle"
|
3646
|
-
}, {
|
3670
|
+
}, btnGroupProps), {
|
3647
3671
|
default: () => [(_slots$default = slots.default) == null ? void 0 : _slots$default.call(slots, {
|
3648
3672
|
isSelected,
|
3649
3673
|
next,
|
@@ -4098,9 +4122,6 @@ function transform(el, value) {
|
|
4098
4122
|
el.style.transform = value;
|
4099
4123
|
el.style.webkitTransform = value;
|
4100
4124
|
}
|
4101
|
-
function opacity(el, value) {
|
4102
|
-
el.style.opacity = `calc(${value} * var(--v-theme-overlay-multiplier))`;
|
4103
|
-
}
|
4104
4125
|
function isTouchEvent(e) {
|
4105
4126
|
return e.constructor.name === 'TouchEvent';
|
4106
4127
|
}
|
@@ -4176,13 +4197,11 @@ const ripples = {
|
|
4176
4197
|
animation.classList.add('v-ripple__animation--enter');
|
4177
4198
|
animation.classList.add('v-ripple__animation--visible');
|
4178
4199
|
transform(animation, `translate(${x}, ${y}) scale3d(${scale},${scale},${scale})`);
|
4179
|
-
opacity(animation, 0);
|
4180
4200
|
animation.dataset.activated = String(performance.now());
|
4181
4201
|
setTimeout(() => {
|
4182
4202
|
animation.classList.remove('v-ripple__animation--enter');
|
4183
4203
|
animation.classList.add('v-ripple__animation--in');
|
4184
4204
|
transform(animation, `translate(${centerX}, ${centerY}) scale3d(1,1,1)`);
|
4185
|
-
opacity(animation, 0.08);
|
4186
4205
|
}, 0);
|
4187
4206
|
},
|
4188
4207
|
hide(el) {
|
@@ -4197,14 +4216,14 @@ const ripples = {
|
|
4197
4216
|
setTimeout(() => {
|
4198
4217
|
animation.classList.remove('v-ripple__animation--in');
|
4199
4218
|
animation.classList.add('v-ripple__animation--out');
|
4200
|
-
opacity(animation, 0);
|
4201
4219
|
setTimeout(() => {
|
4220
|
+
var _animation$parentNode;
|
4202
4221
|
const ripples = el.getElementsByClassName('v-ripple__animation');
|
4203
4222
|
if (ripples.length === 1 && el.dataset.previousPosition) {
|
4204
4223
|
el.style.position = el.dataset.previousPosition;
|
4205
4224
|
delete el.dataset.previousPosition;
|
4206
4225
|
}
|
4207
|
-
animation.parentNode
|
4226
|
+
if (((_animation$parentNode = animation.parentNode) == null ? void 0 : _animation$parentNode.parentNode) === el) el.removeChild(animation.parentNode);
|
4208
4227
|
}, 300);
|
4209
4228
|
}, delay);
|
4210
4229
|
}
|
@@ -4384,9 +4403,69 @@ const Ripple = {
|
|
4384
4403
|
updated: updated$1
|
4385
4404
|
};
|
4386
4405
|
|
4406
|
+
// Composables
|
4407
|
+
|
4408
|
+
// Types
|
4409
|
+
|
4410
|
+
const oppositeMap = {
|
4411
|
+
center: 'center',
|
4412
|
+
top: 'bottom',
|
4413
|
+
bottom: 'top',
|
4414
|
+
left: 'right',
|
4415
|
+
right: 'left'
|
4416
|
+
};
|
4417
|
+
const makeLocationProps = propsFactory({
|
4418
|
+
location: String
|
4419
|
+
}, 'location');
|
4420
|
+
function useLocation(props) {
|
4421
|
+
let opposite = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
4422
|
+
let offset = arguments.length > 2 ? arguments[2] : undefined;
|
4423
|
+
const {
|
4424
|
+
isRtl
|
4425
|
+
} = useRtl();
|
4426
|
+
const locationStyles = computed(() => {
|
4427
|
+
if (!props.location) return {};
|
4428
|
+
const {
|
4429
|
+
side,
|
4430
|
+
align
|
4431
|
+
} = parseAnchor(props.location.split(' ').length > 1 ? props.location : `${props.location} center`, isRtl.value);
|
4432
|
+
function getOffset(side) {
|
4433
|
+
return offset ? offset(side) : 0;
|
4434
|
+
}
|
4435
|
+
const styles = {};
|
4436
|
+
if (side !== 'center') {
|
4437
|
+
if (opposite) styles[oppositeMap[side]] = `calc(100% - ${getOffset(side)}px)`;else styles[side] = 0;
|
4438
|
+
}
|
4439
|
+
if (align !== 'center') {
|
4440
|
+
if (opposite) styles[oppositeMap[align]] = `calc(100% - ${getOffset(align)}px)`;else styles[align] = 0;
|
4441
|
+
} else {
|
4442
|
+
if (side === 'center') styles.top = styles.left = '50%';else {
|
4443
|
+
styles[{
|
4444
|
+
top: 'left',
|
4445
|
+
bottom: 'left',
|
4446
|
+
left: 'top',
|
4447
|
+
right: 'top'
|
4448
|
+
}[side]] = '50%';
|
4449
|
+
}
|
4450
|
+
styles.transform = {
|
4451
|
+
top: 'translateX(-50%)',
|
4452
|
+
bottom: 'translateX(-50%)',
|
4453
|
+
left: 'translateY(-50%)',
|
4454
|
+
right: 'translateY(-50%)',
|
4455
|
+
center: 'translate(-50%, -50%)'
|
4456
|
+
}[side];
|
4457
|
+
}
|
4458
|
+
return styles;
|
4459
|
+
});
|
4460
|
+
return {
|
4461
|
+
locationStyles
|
4462
|
+
};
|
4463
|
+
}
|
4464
|
+
|
4387
4465
|
const VProgressLinear = defineComponent({
|
4388
4466
|
name: 'VProgressLinear',
|
4389
4467
|
props: {
|
4468
|
+
absolute: Boolean,
|
4390
4469
|
active: {
|
4391
4470
|
type: Boolean,
|
4392
4471
|
default: true
|
@@ -4416,6 +4495,9 @@ const VProgressLinear = defineComponent({
|
|
4416
4495
|
stream: Boolean,
|
4417
4496
|
striped: Boolean,
|
4418
4497
|
roundedBar: Boolean,
|
4498
|
+
...makeLocationProps({
|
4499
|
+
location: 'top'
|
4500
|
+
}),
|
4419
4501
|
...makeRoundedProps(),
|
4420
4502
|
...makeTagProps(),
|
4421
4503
|
...makeThemeProps()
|
@@ -4434,6 +4516,9 @@ const VProgressLinear = defineComponent({
|
|
4434
4516
|
const {
|
4435
4517
|
themeClasses
|
4436
4518
|
} = provideTheme(props);
|
4519
|
+
const {
|
4520
|
+
locationStyles
|
4521
|
+
} = useLocation(props);
|
4437
4522
|
const {
|
4438
4523
|
textColorClasses,
|
4439
4524
|
textColorStyles
|
@@ -4475,6 +4560,7 @@ const VProgressLinear = defineComponent({
|
|
4475
4560
|
useRender(() => createVNode(props.tag, {
|
4476
4561
|
"ref": intersectionRef,
|
4477
4562
|
"class": ['v-progress-linear', {
|
4563
|
+
'v-progress-linear--absolute': props.absolute,
|
4478
4564
|
'v-progress-linear--active': props.active && isIntersecting.value,
|
4479
4565
|
'v-progress-linear--reverse': isReversed.value,
|
4480
4566
|
'v-progress-linear--rounded': props.rounded,
|
@@ -4482,8 +4568,11 @@ const VProgressLinear = defineComponent({
|
|
4482
4568
|
'v-progress-linear--striped': props.striped
|
4483
4569
|
}, roundedClasses.value, themeClasses.value],
|
4484
4570
|
"style": {
|
4571
|
+
bottom: props.location === 'bottom' ? 0 : undefined,
|
4572
|
+
top: props.location === 'top' ? 0 : undefined,
|
4485
4573
|
height: props.active ? convertToUnit(height.value) : 0,
|
4486
|
-
'--v-progress-linear-height': convertToUnit(height.value)
|
4574
|
+
'--v-progress-linear-height': convertToUnit(height.value),
|
4575
|
+
...locationStyles.value
|
4487
4576
|
},
|
4488
4577
|
"role": "progressbar",
|
4489
4578
|
"aria-hidden": props.active ? 'false' : 'true',
|
@@ -4569,65 +4658,6 @@ function LoaderSlot(props, _ref) {
|
|
4569
4658
|
}, null)]);
|
4570
4659
|
}
|
4571
4660
|
|
4572
|
-
// Composables
|
4573
|
-
|
4574
|
-
// Types
|
4575
|
-
|
4576
|
-
const oppositeMap = {
|
4577
|
-
center: 'center',
|
4578
|
-
top: 'bottom',
|
4579
|
-
bottom: 'top',
|
4580
|
-
left: 'right',
|
4581
|
-
right: 'left'
|
4582
|
-
};
|
4583
|
-
const makeLocationProps = propsFactory({
|
4584
|
-
location: String
|
4585
|
-
}, 'location');
|
4586
|
-
function useLocation(props) {
|
4587
|
-
let opposite = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
4588
|
-
let offset = arguments.length > 2 ? arguments[2] : undefined;
|
4589
|
-
const {
|
4590
|
-
isRtl
|
4591
|
-
} = useRtl();
|
4592
|
-
const locationStyles = computed(() => {
|
4593
|
-
if (!props.location) return {};
|
4594
|
-
const {
|
4595
|
-
side,
|
4596
|
-
align
|
4597
|
-
} = parseAnchor(props.location.split(' ').length > 1 ? props.location : `${props.location} center`, isRtl.value);
|
4598
|
-
function getOffset(side) {
|
4599
|
-
return offset ? offset(side) : 0;
|
4600
|
-
}
|
4601
|
-
const styles = {};
|
4602
|
-
if (side !== 'center') {
|
4603
|
-
if (opposite) styles[oppositeMap[side]] = `calc(100% - ${getOffset(side)}px)`;else styles[side] = 0;
|
4604
|
-
}
|
4605
|
-
if (align !== 'center') {
|
4606
|
-
if (opposite) styles[oppositeMap[align]] = `calc(100% - ${getOffset(align)}px)`;else styles[align] = 0;
|
4607
|
-
} else {
|
4608
|
-
if (side === 'center') styles.top = styles.left = '50%';else {
|
4609
|
-
styles[{
|
4610
|
-
top: 'left',
|
4611
|
-
bottom: 'left',
|
4612
|
-
left: 'top',
|
4613
|
-
right: 'top'
|
4614
|
-
}[side]] = '50%';
|
4615
|
-
}
|
4616
|
-
styles.transform = {
|
4617
|
-
top: 'translateX(-50%)',
|
4618
|
-
bottom: 'translateX(-50%)',
|
4619
|
-
left: 'translateY(-50%)',
|
4620
|
-
right: 'translateY(-50%)',
|
4621
|
-
center: 'translate(-50%, -50%)'
|
4622
|
-
}[side];
|
4623
|
-
}
|
4624
|
-
return styles;
|
4625
|
-
});
|
4626
|
-
return {
|
4627
|
-
locationStyles
|
4628
|
-
};
|
4629
|
-
}
|
4630
|
-
|
4631
4661
|
// Utilities
|
4632
4662
|
|
4633
4663
|
// Types
|
@@ -4833,21 +4863,31 @@ const VBtn = defineComponent({
|
|
4833
4863
|
const group = useGroupItem(props, props.symbol, false);
|
4834
4864
|
const link = useLink(props, attrs);
|
4835
4865
|
const isActive = computed(() => {
|
4836
|
-
|
4837
|
-
|
4866
|
+
if (props.active !== undefined) {
|
4867
|
+
return props.active;
|
4868
|
+
}
|
4869
|
+
if (link.isLink.value) {
|
4870
|
+
var _link$isActive;
|
4871
|
+
return (_link$isActive = link.isActive) == null ? void 0 : _link$isActive.value;
|
4872
|
+
}
|
4873
|
+
return group == null ? void 0 : group.isSelected.value;
|
4838
4874
|
});
|
4839
4875
|
const isDisabled = computed(() => (group == null ? void 0 : group.disabled.value) || props.disabled);
|
4840
4876
|
const isElevated = computed(() => {
|
4841
4877
|
return props.variant === 'elevated' && !(props.disabled || props.flat || props.border);
|
4842
4878
|
});
|
4879
|
+
const valueAttr = computed(() => {
|
4880
|
+
if (props.value === undefined) return undefined;
|
4881
|
+
return Object(props.value) === props.value ? JSON.stringify(props.value, null, 0) : props.value;
|
4882
|
+
});
|
4843
4883
|
useSelectLink(link, group == null ? void 0 : group.select);
|
4844
4884
|
useRender(() => {
|
4845
|
-
var _slots$prepend, _slots$default, _slots$append, _slots$loader;
|
4885
|
+
var _link$isActive2, _link$isActive3, _slots$prepend, _slots$default, _slots$append, _slots$loader;
|
4846
4886
|
const Tag = link.isLink.value ? 'a' : props.tag;
|
4847
|
-
const hasColor = !group || group.isSelected.value;
|
4848
4887
|
const hasPrepend = !!(props.prependIcon || slots.prepend);
|
4849
4888
|
const hasAppend = !!(props.appendIcon || slots.append);
|
4850
4889
|
const hasIcon = !!(props.icon && props.icon !== true);
|
4890
|
+
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);
|
4851
4891
|
return withDirectives(createVNode(Tag, {
|
4852
4892
|
"type": Tag === 'a' ? undefined : 'button',
|
4853
4893
|
"class": ['v-btn', group == null ? void 0 : group.selectedClass.value, {
|
@@ -4868,7 +4908,8 @@ const VBtn = defineComponent({
|
|
4868
4908
|
if (isDisabled.value) return;
|
4869
4909
|
(_link$navigate = link.navigate) == null ? void 0 : _link$navigate.call(link, e);
|
4870
4910
|
group == null ? void 0 : group.toggle();
|
4871
|
-
}
|
4911
|
+
},
|
4912
|
+
"value": valueAttr.value
|
4872
4913
|
}, {
|
4873
4914
|
default: () => [genOverlays(true, 'v-btn'), !props.icon && hasPrepend && createVNode(VDefaultsProvider, {
|
4874
4915
|
"key": "prepend",
|
@@ -5342,32 +5383,34 @@ const VField = genericComponent()({
|
|
5342
5383
|
if (hasLabel.value) {
|
5343
5384
|
const el = labelRef.value.$el;
|
5344
5385
|
const targetEl = floatingLabelRef.value.$el;
|
5345
|
-
|
5346
|
-
|
5347
|
-
|
5348
|
-
|
5349
|
-
|
5350
|
-
|
5351
|
-
|
5352
|
-
|
5353
|
-
|
5354
|
-
|
5355
|
-
|
5356
|
-
|
5357
|
-
|
5358
|
-
|
5359
|
-
|
5360
|
-
|
5361
|
-
|
5362
|
-
|
5363
|
-
|
5364
|
-
|
5365
|
-
|
5366
|
-
|
5367
|
-
|
5368
|
-
|
5369
|
-
|
5370
|
-
|
5386
|
+
requestAnimationFrame(() => {
|
5387
|
+
const rect = nullifyTransforms(el);
|
5388
|
+
const targetRect = targetEl.getBoundingClientRect();
|
5389
|
+
const x = targetRect.x - rect.x;
|
5390
|
+
const y = targetRect.y - rect.y - (rect.height / 2 - targetRect.height / 2);
|
5391
|
+
const targetWidth = targetRect.width / 0.75;
|
5392
|
+
const width = Math.abs(targetWidth - rect.width) > 1 ? {
|
5393
|
+
maxWidth: convertToUnit(targetWidth)
|
5394
|
+
} : undefined;
|
5395
|
+
const style = getComputedStyle(el);
|
5396
|
+
const targetStyle = getComputedStyle(targetEl);
|
5397
|
+
const duration = parseFloat(style.transitionDuration) * 1000 || 150;
|
5398
|
+
const scale = parseFloat(targetStyle.getPropertyValue('--v-field-label-scale'));
|
5399
|
+
const color = targetStyle.getPropertyValue('color');
|
5400
|
+
el.style.visibility = 'visible';
|
5401
|
+
targetEl.style.visibility = 'hidden';
|
5402
|
+
animate(el, {
|
5403
|
+
transform: `translate(${x}px, ${y}px) scale(${scale})`,
|
5404
|
+
color,
|
5405
|
+
...width
|
5406
|
+
}, {
|
5407
|
+
duration,
|
5408
|
+
easing: standardEasing,
|
5409
|
+
direction: val ? 'normal' : 'reverse'
|
5410
|
+
}).finished.then(() => {
|
5411
|
+
el.style.removeProperty('visibility');
|
5412
|
+
targetEl.style.removeProperty('visibility');
|
5413
|
+
});
|
5371
5414
|
});
|
5372
5415
|
}
|
5373
5416
|
}, {
|
@@ -5556,7 +5599,6 @@ const FormKey = Symbol.for('vuetify:form');
|
|
5556
5599
|
const makeFormProps = propsFactory({
|
5557
5600
|
disabled: Boolean,
|
5558
5601
|
fastFail: Boolean,
|
5559
|
-
lazyValidation: Boolean,
|
5560
5602
|
readonly: Boolean,
|
5561
5603
|
modelValue: {
|
5562
5604
|
type: Boolean,
|
@@ -6960,9 +7002,9 @@ const VDivider = defineComponent({
|
|
6960
7002
|
themeClasses
|
6961
7003
|
} = provideTheme(props);
|
6962
7004
|
const {
|
6963
|
-
|
6964
|
-
|
6965
|
-
} =
|
7005
|
+
textColorClasses,
|
7006
|
+
textColorStyles
|
7007
|
+
} = useTextColor(toRef(props, 'color'));
|
6966
7008
|
const dividerStyles = computed(() => {
|
6967
7009
|
const styles = {};
|
6968
7010
|
if (props.length) {
|
@@ -6978,8 +7020,8 @@ const VDivider = defineComponent({
|
|
6978
7020
|
'v-divider': true,
|
6979
7021
|
'v-divider--inset': props.inset,
|
6980
7022
|
'v-divider--vertical': props.vertical
|
6981
|
-
}, themeClasses.value,
|
6982
|
-
"style": [dividerStyles.value,
|
7023
|
+
}, themeClasses.value, textColorClasses.value],
|
7024
|
+
"style": [dividerStyles.value, textColorStyles.value],
|
6983
7025
|
"aria-orientation": !attrs.role || attrs.role === 'separator' ? props.vertical ? 'vertical' : 'horizontal' : undefined,
|
6984
7026
|
"role": `${attrs.role || 'separator'}`
|
6985
7027
|
}, null));
|
@@ -7689,7 +7731,7 @@ const VListItem = genericComponent()({
|
|
7689
7731
|
}
|
7690
7732
|
}
|
7691
7733
|
useRender(() => {
|
7692
|
-
var _slots$
|
7734
|
+
var _slots$title, _slots$subtitle, _slots$default;
|
7693
7735
|
const Tag = isLink.value ? 'a' : props.tag;
|
7694
7736
|
const hasColor = !list || isSelected.value || isActive.value;
|
7695
7737
|
const hasTitle = slots.title || props.title;
|
@@ -7712,7 +7754,18 @@ const VListItem = genericComponent()({
|
|
7712
7754
|
"onClick": onClick,
|
7713
7755
|
"onKeydown": isClickable.value && !isLink.value && onKeyDown
|
7714
7756
|
}, {
|
7715
|
-
default: () => [genOverlays(isClickable.value || isActive.value, 'v-list-item'), hasPrepend && createVNode(
|
7757
|
+
default: () => [genOverlays(isClickable.value || isActive.value, 'v-list-item'), hasPrepend && createVNode("div", {
|
7758
|
+
"key": "prepend",
|
7759
|
+
"class": "v-list-item__prepend"
|
7760
|
+
}, [props.prependAvatar && createVNode(VAvatar, {
|
7761
|
+
"key": "prepend-avatar",
|
7762
|
+
"density": props.density,
|
7763
|
+
"image": props.prependAvatar
|
7764
|
+
}, null), props.prependIcon && createVNode(VIcon, {
|
7765
|
+
"key": "prepend-icon",
|
7766
|
+
"density": props.density,
|
7767
|
+
"icon": props.prependIcon
|
7768
|
+
}, null), slots.prepend && createVNode(VDefaultsProvider, {
|
7716
7769
|
"key": "prepend",
|
7717
7770
|
"defaults": {
|
7718
7771
|
VAvatar: {
|
@@ -7728,14 +7781,8 @@ const VListItem = genericComponent()({
|
|
7728
7781
|
}
|
7729
7782
|
}
|
7730
7783
|
}, {
|
7731
|
-
default: () => [
|
7732
|
-
|
7733
|
-
}, [props.prependAvatar && createVNode(VAvatar, {
|
7734
|
-
"key": "prepend-avatar"
|
7735
|
-
}, null), props.prependIcon && createVNode(VIcon, {
|
7736
|
-
"key": "prepend-icon"
|
7737
|
-
}, null), (_slots$prepend = slots.prepend) == null ? void 0 : _slots$prepend.call(slots, slotProps.value)])]
|
7738
|
-
}), createVNode("div", {
|
7784
|
+
default: () => [slots.prepend(slotProps.value)]
|
7785
|
+
})]), createVNode("div", {
|
7739
7786
|
"class": "v-list-item__content",
|
7740
7787
|
"data-no-activator": ""
|
7741
7788
|
}, [hasTitle && createVNode(VListItemTitle, {
|
@@ -7750,7 +7797,10 @@ const VListItem = genericComponent()({
|
|
7750
7797
|
default: () => [((_slots$subtitle = slots.subtitle) == null ? void 0 : _slots$subtitle.call(slots, {
|
7751
7798
|
subtitle: props.subtitle
|
7752
7799
|
})) ?? props.subtitle]
|
7753
|
-
}), (_slots$default = slots.default) == null ? void 0 : _slots$default.call(slots, slotProps.value)]), hasAppend && createVNode(
|
7800
|
+
}), (_slots$default = slots.default) == null ? void 0 : _slots$default.call(slots, slotProps.value)]), hasAppend && createVNode("div", {
|
7801
|
+
"key": "append",
|
7802
|
+
"class": "v-list-item__append"
|
7803
|
+
}, [slots.append && createVNode(VDefaultsProvider, {
|
7754
7804
|
"key": "append",
|
7755
7805
|
"defaults": {
|
7756
7806
|
VAvatar: {
|
@@ -7766,14 +7816,16 @@ const VListItem = genericComponent()({
|
|
7766
7816
|
}
|
7767
7817
|
}
|
7768
7818
|
}, {
|
7769
|
-
default: () => [
|
7770
|
-
|
7771
|
-
|
7772
|
-
|
7773
|
-
|
7774
|
-
|
7775
|
-
|
7776
|
-
|
7819
|
+
default: () => [slots.append(slotProps.value)]
|
7820
|
+
}), props.appendIcon && createVNode(VIcon, {
|
7821
|
+
"key": "append-icon",
|
7822
|
+
"density": props.density,
|
7823
|
+
"icon": props.appendIcon
|
7824
|
+
}, null), props.appendAvatar && createVNode(VAvatar, {
|
7825
|
+
"key": "append-avatar",
|
7826
|
+
"density": props.density,
|
7827
|
+
"image": props.appendAvatar
|
7828
|
+
}, null)])]
|
7777
7829
|
}), [[resolveDirective("ripple"), isClickable.value && props.ripple]]);
|
7778
7830
|
});
|
7779
7831
|
return {};
|
@@ -7987,9 +8039,12 @@ function useItems(props) {
|
|
7987
8039
|
|
7988
8040
|
// Types
|
7989
8041
|
|
8042
|
+
function isPrimitive(value) {
|
8043
|
+
return typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean';
|
8044
|
+
}
|
7990
8045
|
function transformItem(props, item) {
|
7991
8046
|
const type = getPropertyFromItem(item, props.itemType, 'item');
|
7992
|
-
const title =
|
8047
|
+
const title = isPrimitive(item) ? item : getPropertyFromItem(item, props.itemTitle);
|
7993
8048
|
const value = getPropertyFromItem(item, props.itemValue, undefined);
|
7994
8049
|
const children = getPropertyFromItem(item, props.itemChildren);
|
7995
8050
|
const itemProps = props.itemProps === true ? pick(item, ['children'])[1] : getPropertyFromItem(item, props.itemProps);
|
@@ -8615,17 +8670,12 @@ const makeLocationStrategyProps = propsFactory({
|
|
8615
8670
|
function useLocationStrategies(props, data) {
|
8616
8671
|
const contentStyles = ref({});
|
8617
8672
|
const updateLocation = ref();
|
8618
|
-
|
8619
|
-
|
8620
|
-
|
8621
|
-
|
8622
|
-
|
8623
|
-
|
8624
|
-
scope = effectScope();
|
8625
|
-
if (!(props.locationStrategy === 'connected')) {
|
8626
|
-
await nextTick();
|
8627
|
-
}
|
8628
|
-
scope.run(() => {
|
8673
|
+
if (IN_BROWSER) {
|
8674
|
+
useToggleScope(() => !!(data.isActive.value && props.locationStrategy), reset => {
|
8675
|
+
watch(() => props.locationStrategy, reset);
|
8676
|
+
onScopeDispose(() => {
|
8677
|
+
updateLocation.value = undefined;
|
8678
|
+
});
|
8629
8679
|
if (typeof props.locationStrategy === 'function') {
|
8630
8680
|
var _props$locationStrate;
|
8631
8681
|
updateLocation.value = (_props$locationStrate = props.locationStrategy(data, props, contentStyles)) == null ? void 0 : _props$locationStrate.updateLocation;
|
@@ -8634,16 +8684,14 @@ function useLocationStrategies(props, data) {
|
|
8634
8684
|
updateLocation.value = (_locationStrategies$p = locationStrategies[props.locationStrategy](data, props, contentStyles)) == null ? void 0 : _locationStrategies$p.updateLocation;
|
8635
8685
|
}
|
8636
8686
|
});
|
8637
|
-
|
8638
|
-
|
8639
|
-
|
8640
|
-
|
8641
|
-
|
8642
|
-
|
8643
|
-
|
8644
|
-
|
8645
|
-
(_scope2 = scope) == null ? void 0 : _scope2.stop();
|
8646
|
-
});
|
8687
|
+
window.addEventListener('resize', onResize, {
|
8688
|
+
passive: true
|
8689
|
+
});
|
8690
|
+
onScopeDispose(() => {
|
8691
|
+
window.removeEventListener('resize', onResize);
|
8692
|
+
updateLocation.value = undefined;
|
8693
|
+
});
|
8694
|
+
}
|
8647
8695
|
function onResize(e) {
|
8648
8696
|
var _updateLocation$value;
|
8649
8697
|
(_updateLocation$value = updateLocation.value) == null ? void 0 : _updateLocation$value.call(updateLocation, e);
|
@@ -8937,13 +8985,30 @@ function connectedLocationStrategy(data, props, contentStyles) {
|
|
8937
8985
|
maxWidth: convertToUnit(pixelCeil(clamp(available.x, minWidth.value === Infinity ? 0 : minWidth.value, maxWidth.value))),
|
8938
8986
|
maxHeight: convertToUnit(pixelCeil(clamp(available.y, minHeight.value === Infinity ? 0 : minHeight.value, maxHeight.value)))
|
8939
8987
|
});
|
8988
|
+
return {
|
8989
|
+
available,
|
8990
|
+
contentBox
|
8991
|
+
};
|
8940
8992
|
}
|
8941
|
-
watch(() => [preferredAnchor.value, preferredOrigin.value, props.offset, props.minWidth, props.minHeight, props.maxWidth, props.maxHeight], () => updateLocation()
|
8942
|
-
|
8943
|
-
|
8944
|
-
|
8945
|
-
|
8946
|
-
|
8993
|
+
watch(() => [preferredAnchor.value, preferredOrigin.value, props.offset, props.minWidth, props.minHeight, props.maxWidth, props.maxHeight], () => updateLocation());
|
8994
|
+
nextTick(() => {
|
8995
|
+
const result = updateLocation();
|
8996
|
+
|
8997
|
+
// TODO: overflowing content should only require a single updateLocation call
|
8998
|
+
// Icky hack to make sure the content is positioned consistently
|
8999
|
+
if (!result) return;
|
9000
|
+
const {
|
9001
|
+
available,
|
9002
|
+
contentBox
|
9003
|
+
} = result;
|
9004
|
+
if (contentBox.height > available.y) {
|
9005
|
+
requestAnimationFrame(() => {
|
9006
|
+
updateLocation();
|
9007
|
+
requestAnimationFrame(() => {
|
9008
|
+
updateLocation();
|
9009
|
+
});
|
9010
|
+
});
|
9011
|
+
}
|
8947
9012
|
});
|
8948
9013
|
return {
|
8949
9014
|
updateLocation
|
@@ -9011,10 +9076,10 @@ function useScrollStrategies(props, data) {
|
|
9011
9076
|
await nextTick();
|
9012
9077
|
scope.run(() => {
|
9013
9078
|
if (typeof props.scrollStrategy === 'function') {
|
9014
|
-
props.scrollStrategy(data, props);
|
9079
|
+
props.scrollStrategy(data, props, scope);
|
9015
9080
|
} else {
|
9016
9081
|
var _scrollStrategies$pro;
|
9017
|
-
(_scrollStrategies$pro = scrollStrategies[props.scrollStrategy]) == null ? void 0 : _scrollStrategies$pro.call(scrollStrategies, data, props);
|
9082
|
+
(_scrollStrategies$pro = scrollStrategies[props.scrollStrategy]) == null ? void 0 : _scrollStrategies$pro.call(scrollStrategies, data, props, scope);
|
9018
9083
|
}
|
9019
9084
|
});
|
9020
9085
|
});
|
@@ -9060,9 +9125,10 @@ function blockScrollStrategy(data, props) {
|
|
9060
9125
|
}
|
9061
9126
|
});
|
9062
9127
|
}
|
9063
|
-
function repositionScrollStrategy(data) {
|
9128
|
+
function repositionScrollStrategy(data, props, scope) {
|
9064
9129
|
let slow = false;
|
9065
9130
|
let raf = -1;
|
9131
|
+
let ric = -1;
|
9066
9132
|
function update(e) {
|
9067
9133
|
requestNewFrame(() => {
|
9068
9134
|
var _data$updateLocation$, _data$updateLocation;
|
@@ -9072,21 +9138,29 @@ function repositionScrollStrategy(data) {
|
|
9072
9138
|
slow = time / (1000 / 60) > 2;
|
9073
9139
|
});
|
9074
9140
|
}
|
9075
|
-
|
9076
|
-
|
9077
|
-
|
9078
|
-
|
9079
|
-
|
9080
|
-
|
9081
|
-
|
9082
|
-
|
9083
|
-
|
9141
|
+
ric = requestIdleCallback(() => {
|
9142
|
+
scope.run(() => {
|
9143
|
+
bindScroll(data.activatorEl.value ?? data.contentEl.value, e => {
|
9144
|
+
if (slow) {
|
9145
|
+
// If the position calculation is slow,
|
9146
|
+
// defer updates until scrolling is finished.
|
9147
|
+
// Browsers usually fire one scroll event per frame so
|
9148
|
+
// we just wait until we've got two frames without an event
|
9149
|
+
cancelAnimationFrame(raf);
|
9150
|
+
raf = requestAnimationFrame(() => {
|
9151
|
+
raf = requestAnimationFrame(() => {
|
9152
|
+
update(e);
|
9153
|
+
});
|
9154
|
+
});
|
9155
|
+
} else {
|
9084
9156
|
update(e);
|
9085
|
-
}
|
9157
|
+
}
|
9086
9158
|
});
|
9087
|
-
}
|
9088
|
-
|
9089
|
-
|
9159
|
+
});
|
9160
|
+
});
|
9161
|
+
onScopeDispose(() => {
|
9162
|
+
cancelIdleCallback(ric);
|
9163
|
+
cancelAnimationFrame(raf);
|
9090
9164
|
});
|
9091
9165
|
}
|
9092
9166
|
|
@@ -9729,6 +9803,11 @@ const VMenu = genericComponent()({
|
|
9729
9803
|
function onClickOutside() {
|
9730
9804
|
parent == null ? void 0 : parent.closeParents();
|
9731
9805
|
}
|
9806
|
+
const activatorProps = computed(() => mergeProps({
|
9807
|
+
'aria-haspopup': 'menu',
|
9808
|
+
'aria-expanded': String(isActive.value),
|
9809
|
+
'aria-owns': id.value
|
9810
|
+
}, props.activatorProps));
|
9732
9811
|
useRender(() => {
|
9733
9812
|
const [overlayProps] = filterVOverlayProps(props);
|
9734
9813
|
return createVNode(VOverlay, mergeProps({
|
@@ -9738,11 +9817,7 @@ const VMenu = genericComponent()({
|
|
9738
9817
|
"modelValue": isActive.value,
|
9739
9818
|
"onUpdate:modelValue": $event => isActive.value = $event,
|
9740
9819
|
"absolute": true,
|
9741
|
-
"activatorProps":
|
9742
|
-
'aria-haspopup': 'menu',
|
9743
|
-
'aria-expanded': String(isActive.value),
|
9744
|
-
'aria-owns': id.value
|
9745
|
-
}, props.activatorProps),
|
9820
|
+
"activatorProps": activatorProps.value,
|
9746
9821
|
"onClick:outside": onClickOutside
|
9747
9822
|
}, scopeId), {
|
9748
9823
|
activator: slots.activator,
|
@@ -9856,8 +9931,10 @@ const VSelect = genericComponent()({
|
|
9856
9931
|
}
|
9857
9932
|
function onKeydown(e) {
|
9858
9933
|
if (props.readonly || form != null && form.isReadonly.value) return;
|
9859
|
-
if (['Enter', 'ArrowDown', ' '].includes(e.key)) {
|
9934
|
+
if (['Enter', ' ', 'ArrowDown', 'ArrowUp', 'Home', 'End'].includes(e.key)) {
|
9860
9935
|
e.preventDefault();
|
9936
|
+
}
|
9937
|
+
if (['Enter', 'ArrowDown', ' '].includes(e.key)) {
|
9861
9938
|
menu.value = true;
|
9862
9939
|
}
|
9863
9940
|
if (['Escape', 'Tab'].includes(e.key)) {
|
@@ -9868,15 +9945,12 @@ const VSelect = genericComponent()({
|
|
9868
9945
|
(_listRef$value = listRef.value) == null ? void 0 : _listRef$value.focus('next');
|
9869
9946
|
} else if (e.key === 'ArrowUp') {
|
9870
9947
|
var _listRef$value2;
|
9871
|
-
e.preventDefault();
|
9872
9948
|
(_listRef$value2 = listRef.value) == null ? void 0 : _listRef$value2.focus('prev');
|
9873
9949
|
} else if (e.key === 'Home') {
|
9874
9950
|
var _listRef$value3;
|
9875
|
-
e.preventDefault();
|
9876
9951
|
(_listRef$value3 = listRef.value) == null ? void 0 : _listRef$value3.focus('first');
|
9877
9952
|
} else if (e.key === 'End') {
|
9878
9953
|
var _listRef$value4;
|
9879
|
-
e.preventDefault();
|
9880
9954
|
(_listRef$value4 = listRef.value) == null ? void 0 : _listRef$value4.focus('last');
|
9881
9955
|
}
|
9882
9956
|
}
|
@@ -10058,7 +10132,7 @@ function filterItems(items, query, options) {
|
|
10058
10132
|
const customFiltersLength = Object.keys((options == null ? void 0 : options.customKeyFilter) ?? {}).length;
|
10059
10133
|
if (!(items != null && items.length)) return array;
|
10060
10134
|
loop: for (let i = 0; i < items.length; i++) {
|
10061
|
-
const item = items[i]
|
10135
|
+
const item = items[i];
|
10062
10136
|
const customMatches = {};
|
10063
10137
|
const defaultMatches = {};
|
10064
10138
|
let match = -1;
|
@@ -10098,7 +10172,7 @@ function filterItems(items, query, options) {
|
|
10098
10172
|
}
|
10099
10173
|
return array;
|
10100
10174
|
}
|
10101
|
-
function useFilter(props, items, query) {
|
10175
|
+
function useFilter(props, items, query, options) {
|
10102
10176
|
const strQuery = computed(() => typeof (query == null ? void 0 : query.value) !== 'string' && typeof (query == null ? void 0 : query.value) !== 'number' ? '' : String(query.value));
|
10103
10177
|
const filteredItems = ref([]);
|
10104
10178
|
const filteredMatches = ref(new Map());
|
@@ -10109,7 +10183,7 @@ function useFilter(props, items, query) {
|
|
10109
10183
|
const results = filterItems(transformedItems, strQuery.value, {
|
10110
10184
|
customKeyFilter: props.customKeyFilter,
|
10111
10185
|
default: props.customFilter,
|
10112
|
-
filterKeys: props.filterKeys,
|
10186
|
+
filterKeys: unref(options == null ? void 0 : options.filterKeys) ?? props.filterKeys,
|
10113
10187
|
filterMode: props.filterMode,
|
10114
10188
|
noFilter: props.noFilter
|
10115
10189
|
});
|
@@ -10220,6 +10294,9 @@ const VAutocomplete = genericComponent()({
|
|
10220
10294
|
}
|
10221
10295
|
function onKeydown(e) {
|
10222
10296
|
if (props.readonly || form != null && form.isReadonly.value) return;
|
10297
|
+
if (['Enter', 'ArrowDown', 'ArrowUp'].includes(e.key)) {
|
10298
|
+
e.preventDefault();
|
10299
|
+
}
|
10223
10300
|
if (['Enter', 'ArrowDown'].includes(e.key)) {
|
10224
10301
|
menu.value = true;
|
10225
10302
|
}
|
@@ -10231,11 +10308,9 @@ const VAutocomplete = genericComponent()({
|
|
10231
10308
|
}
|
10232
10309
|
if (e.key === 'ArrowDown') {
|
10233
10310
|
var _listRef$value;
|
10234
|
-
e.preventDefault();
|
10235
10311
|
(_listRef$value = listRef.value) == null ? void 0 : _listRef$value.focus('next');
|
10236
10312
|
} else if (e.key === 'ArrowUp') {
|
10237
10313
|
var _listRef$value2;
|
10238
|
-
e.preventDefault();
|
10239
10314
|
(_listRef$value2 = listRef.value) == null ? void 0 : _listRef$value2.focus('prev');
|
10240
10315
|
}
|
10241
10316
|
}
|
@@ -13564,7 +13639,9 @@ const VCombobox = genericComponent()({
|
|
13564
13639
|
if (props.readonly || form != null && form.isReadonly.value) return;
|
13565
13640
|
const selectionStart = vTextFieldRef.value.selectionStart;
|
13566
13641
|
const length = selected.value.length;
|
13567
|
-
if (selectionIndex.value > -1
|
13642
|
+
if (selectionIndex.value > -1 || ['Enter', 'ArrowDown', 'ArrowUp'].includes(e.key)) {
|
13643
|
+
e.preventDefault();
|
13644
|
+
}
|
13568
13645
|
if (['Enter', 'ArrowDown'].includes(e.key)) {
|
13569
13646
|
menu.value = true;
|
13570
13647
|
}
|
@@ -13576,11 +13653,9 @@ const VCombobox = genericComponent()({
|
|
13576
13653
|
}
|
13577
13654
|
if (e.key === 'ArrowDown') {
|
13578
13655
|
var _listRef$value;
|
13579
|
-
e.preventDefault();
|
13580
13656
|
(_listRef$value = listRef.value) == null ? void 0 : _listRef$value.focus('next');
|
13581
13657
|
} else if (e.key === 'ArrowUp') {
|
13582
13658
|
var _listRef$value2;
|
13583
|
-
e.preventDefault();
|
13584
13659
|
(_listRef$value2 = listRef.value) == null ? void 0 : _listRef$value2.focus('prev');
|
13585
13660
|
}
|
13586
13661
|
if (!props.multiple) return;
|
@@ -13614,7 +13689,7 @@ const VCombobox = genericComponent()({
|
|
13614
13689
|
vTextFieldRef.value.setSelectionRange(0, 0);
|
13615
13690
|
}
|
13616
13691
|
}
|
13617
|
-
if (e.key === 'Enter') {
|
13692
|
+
if (e.key === 'Enter' && search.value) {
|
13618
13693
|
select(transformItem$1(props, search.value));
|
13619
13694
|
search.value = '';
|
13620
13695
|
}
|
@@ -13875,6 +13950,10 @@ const VDialog = genericComponent()({
|
|
13875
13950
|
});
|
13876
13951
|
}
|
13877
13952
|
});
|
13953
|
+
const activatorProps = computed(() => mergeProps({
|
13954
|
+
'aria-haspopup': 'dialog',
|
13955
|
+
'aria-expanded': String(isActive.value)
|
13956
|
+
}, props.activatorProps));
|
13878
13957
|
useRender(() => {
|
13879
13958
|
const [overlayProps] = filterVOverlayProps(props);
|
13880
13959
|
return createVNode(VOverlay, mergeProps({
|
@@ -13888,10 +13967,7 @@ const VDialog = genericComponent()({
|
|
13888
13967
|
"onUpdate:modelValue": $event => isActive.value = $event,
|
13889
13968
|
"aria-role": "dialog",
|
13890
13969
|
"aria-modal": "true",
|
13891
|
-
"activatorProps":
|
13892
|
-
'aria-haspopup': 'dialog',
|
13893
|
-
'aria-expanded': String(isActive.value)
|
13894
|
-
}, props.activatorProps)
|
13970
|
+
"activatorProps": activatorProps.value
|
13895
13971
|
}, scopeId), {
|
13896
13972
|
activator: slots.activator,
|
13897
13973
|
default: function () {
|
@@ -14240,12 +14316,15 @@ const VFileInput = defineComponent({
|
|
14240
14316
|
onFocus();
|
14241
14317
|
nextTick(() => {
|
14242
14318
|
model.value = [];
|
14243
|
-
if (inputRef != null && inputRef.value) {
|
14244
|
-
inputRef.value.value = '';
|
14245
|
-
}
|
14246
14319
|
callEvent(props['onClick:clear'], e);
|
14247
14320
|
});
|
14248
14321
|
}
|
14322
|
+
watch(model, newValue => {
|
14323
|
+
const hasModelReset = !Array.isArray(newValue) || !newValue.length;
|
14324
|
+
if (hasModelReset && inputRef.value) {
|
14325
|
+
inputRef.value.value = '';
|
14326
|
+
}
|
14327
|
+
});
|
14249
14328
|
useRender(() => {
|
14250
14329
|
const hasCounter = !!(slots.counter || props.counter);
|
14251
14330
|
const hasDetails = !!(hasCounter || slots.details);
|
@@ -15236,7 +15315,7 @@ function useTouch(_ref) {
|
|
15236
15315
|
window.removeEventListener('touchmove', onTouchmove);
|
15237
15316
|
window.removeEventListener('touchend', onTouchend);
|
15238
15317
|
});
|
15239
|
-
const isHorizontal = computed(() => position.value
|
15318
|
+
const isHorizontal = computed(() => ['left', 'right'].includes(position.value));
|
15240
15319
|
const {
|
15241
15320
|
addMovement,
|
15242
15321
|
endTouch,
|
@@ -15248,11 +15327,11 @@ function useTouch(_ref) {
|
|
15248
15327
|
const offset = ref(0);
|
15249
15328
|
let start;
|
15250
15329
|
function getOffset(pos, active) {
|
15251
|
-
return (position.value === 'left' ? pos : position.value === 'right' ? document.documentElement.clientWidth - pos : position.value === 'bottom' ? document.documentElement.clientHeight - pos : oops()) - (active ? width.value : 0);
|
15330
|
+
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);
|
15252
15331
|
}
|
15253
15332
|
function getProgress(pos) {
|
15254
15333
|
let limit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
15255
|
-
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();
|
15334
|
+
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();
|
15256
15335
|
return limit ? Math.max(0, Math.min(1, progress)) : progress;
|
15257
15336
|
}
|
15258
15337
|
function onTouchstart(e) {
|
@@ -15260,8 +15339,8 @@ function useTouch(_ref) {
|
|
15260
15339
|
const touchX = e.changedTouches[0].clientX;
|
15261
15340
|
const touchY = e.changedTouches[0].clientY;
|
15262
15341
|
const touchZone = 25;
|
15263
|
-
const inTouchZone = position.value === 'left' ? touchX < touchZone : position.value === 'right' ? touchX > document.documentElement.clientWidth - touchZone : position.value === 'bottom' ? touchY > document.documentElement.clientHeight - touchZone : oops();
|
15264
|
-
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());
|
15342
|
+
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();
|
15343
|
+
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());
|
15265
15344
|
if (inTouchZone || inElement || isActive.value && isTemporary.value) {
|
15266
15345
|
maybeDragging = true;
|
15267
15346
|
start = [touchX, touchY];
|
@@ -15313,6 +15392,7 @@ function useTouch(_ref) {
|
|
15313
15392
|
isActive.value = velocity.direction === ({
|
15314
15393
|
left: 'right',
|
15315
15394
|
right: 'left',
|
15395
|
+
top: 'down',
|
15316
15396
|
bottom: 'up'
|
15317
15397
|
}[position.value] || oops());
|
15318
15398
|
} else {
|
@@ -15321,7 +15401,7 @@ function useTouch(_ref) {
|
|
15321
15401
|
}
|
15322
15402
|
const dragStyles = computed(() => {
|
15323
15403
|
return isDragging.value ? {
|
15324
|
-
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(),
|
15404
|
+
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(),
|
15325
15405
|
transition: 'none'
|
15326
15406
|
} : undefined;
|
15327
15407
|
});
|
@@ -15337,7 +15417,7 @@ function oops() {
|
|
15337
15417
|
|
15338
15418
|
// Types
|
15339
15419
|
|
15340
|
-
const locations = ['start', 'end', 'left', 'right', 'bottom'];
|
15420
|
+
const locations = ['start', 'end', 'left', 'right', 'top', 'bottom'];
|
15341
15421
|
const VNavigationDrawer = defineComponent({
|
15342
15422
|
name: 'VNavigationDrawer',
|
15343
15423
|
props: {
|
@@ -15794,7 +15874,7 @@ const VPagination = defineComponent({
|
|
15794
15874
|
disabled: !!props.disabled || props.length < 2,
|
15795
15875
|
color: isActive ? props.activeColor : props.color,
|
15796
15876
|
ariaCurrent: isActive,
|
15797
|
-
ariaLabel: t(isActive ? props.currentPageAriaLabel : props.pageAriaLabel,
|
15877
|
+
ariaLabel: t(isActive ? props.currentPageAriaLabel : props.pageAriaLabel, item),
|
15798
15878
|
onClick: e => setValue(e, item)
|
15799
15879
|
}
|
15800
15880
|
};
|
@@ -17973,6 +18053,9 @@ const VTooltip = genericComponent()({
|
|
17973
18053
|
if (props.transition) return props.transition;
|
17974
18054
|
return isActive.value ? 'scale-transition' : 'fade-transition';
|
17975
18055
|
});
|
18056
|
+
const activatorProps = computed(() => mergeProps({
|
18057
|
+
'aria-describedby': id.value
|
18058
|
+
}, props.activatorProps));
|
17976
18059
|
useRender(() => {
|
17977
18060
|
const [overlayProps] = filterVOverlayProps(props);
|
17978
18061
|
return createVNode(VOverlay, mergeProps({
|
@@ -17989,9 +18072,7 @@ const VTooltip = genericComponent()({
|
|
17989
18072
|
"persistent": true,
|
17990
18073
|
"role": "tooltip",
|
17991
18074
|
"eager": true,
|
17992
|
-
"activatorProps":
|
17993
|
-
'aria-describedby': id.value
|
17994
|
-
}, props.activatorProps),
|
18075
|
+
"activatorProps": activatorProps.value,
|
17995
18076
|
"_disableGlobalStack": true
|
17996
18077
|
}, scopeId), {
|
17997
18078
|
activator: slots.activator,
|
@@ -18940,7 +19021,7 @@ const VDataTableRows = defineComponent({
|
|
18940
19021
|
});
|
18941
19022
|
},
|
18942
19023
|
"item": item
|
18943
|
-
}, slots), isExpanded(item
|
19024
|
+
}, slots), isExpanded(item) && ((_slots$expandedRow = slots['expanded-row']) == null ? void 0 : _slots$expandedRow.call(slots, {
|
18944
19025
|
item,
|
18945
19026
|
columns: columns.value
|
18946
19027
|
}))]);
|
@@ -18978,7 +19059,7 @@ function createPagination(props, items) {
|
|
18978
19059
|
return Math.min(itemsLength.value, startIndex.value + itemsPerPage.value);
|
18979
19060
|
});
|
18980
19061
|
const pageCount = computed(() => {
|
18981
|
-
if (itemsPerPage.value === -1) return 1;
|
19062
|
+
if (itemsPerPage.value === -1 || itemsLength.value === 0) return 1;
|
18982
19063
|
return Math.ceil(itemsLength.value / itemsPerPage.value);
|
18983
19064
|
});
|
18984
19065
|
watchEffect(() => {
|
@@ -19081,7 +19162,7 @@ const VDataTableFooter = defineComponent({
|
|
19081
19162
|
"hide-details": true
|
19082
19163
|
}, null)]), createVNode("div", {
|
19083
19164
|
"class": "v-data-table-footer__info"
|
19084
|
-
}, [createVNode("div", null, [
|
19165
|
+
}, [createVNode("div", null, [!itemsLength.value ? 0 : startIndex.value + 1, createTextVNode(" - "), stopIndex.value, createTextVNode(" of "), itemsLength.value])]), createVNode("div", {
|
19085
19166
|
"class": "v-data-table-footer__pagination"
|
19086
19167
|
}, [createVNode(VBtn, {
|
19087
19168
|
"icon": props.firstIcon,
|
@@ -19149,18 +19230,14 @@ function useOptions(_ref) {
|
|
19149
19230
|
page,
|
19150
19231
|
itemsPerPage,
|
19151
19232
|
sortBy,
|
19152
|
-
|
19153
|
-
stopIndex,
|
19154
|
-
pageCount
|
19233
|
+
groupBy
|
19155
19234
|
} = _ref;
|
19156
19235
|
const vm = getCurrentInstance('VDataTable');
|
19157
19236
|
const options = computed(() => ({
|
19158
19237
|
page: page.value,
|
19159
19238
|
itemsPerPage: itemsPerPage.value,
|
19160
|
-
|
19161
|
-
|
19162
|
-
pageCount: pageCount.value,
|
19163
|
-
sortBy: sortBy.value
|
19239
|
+
sortBy: sortBy.value,
|
19240
|
+
groupBy: groupBy.value
|
19164
19241
|
}));
|
19165
19242
|
|
19166
19243
|
// Reset page when sorting changes
|
@@ -19238,9 +19315,12 @@ const VDataTable = defineComponent({
|
|
19238
19315
|
const {
|
19239
19316
|
items
|
19240
19317
|
} = useDataTableItems(props, columns);
|
19318
|
+
const filterKeys = computed(() => columns.value.map(c => 'columns.' + c.key));
|
19241
19319
|
const {
|
19242
19320
|
filteredItems
|
19243
|
-
} = useFilter(props, items, toRef(props, 'search')
|
19321
|
+
} = useFilter(props, items, toRef(props, 'search'), {
|
19322
|
+
filterKeys
|
19323
|
+
});
|
19244
19324
|
const {
|
19245
19325
|
sortBy
|
19246
19326
|
} = createSort(props);
|
@@ -19259,8 +19339,7 @@ const VDataTable = defineComponent({
|
|
19259
19339
|
page,
|
19260
19340
|
itemsPerPage,
|
19261
19341
|
startIndex,
|
19262
|
-
stopIndex
|
19263
|
-
pageCount
|
19342
|
+
stopIndex
|
19264
19343
|
} = createPagination(props, flatItems);
|
19265
19344
|
const {
|
19266
19345
|
paginatedItems
|
@@ -19272,9 +19351,7 @@ const VDataTable = defineComponent({
|
|
19272
19351
|
page,
|
19273
19352
|
itemsPerPage,
|
19274
19353
|
sortBy,
|
19275
|
-
|
19276
|
-
startIndex,
|
19277
|
-
stopIndex
|
19354
|
+
groupBy
|
19278
19355
|
});
|
19279
19356
|
provideDefaults({
|
19280
19357
|
VDataTableRows: {
|
@@ -19430,9 +19507,12 @@ const VDataTableVirtual = defineComponent({
|
|
19430
19507
|
const {
|
19431
19508
|
items
|
19432
19509
|
} = useDataTableItems(props, columns);
|
19510
|
+
const filterKeys = computed(() => columns.value.map(c => 'columns.' + c.key));
|
19433
19511
|
const {
|
19434
19512
|
filteredItems
|
19435
|
-
} = useFilter(props, items, toRef(props, 'search')
|
19513
|
+
} = useFilter(props, items, toRef(props, 'search'), {
|
19514
|
+
filterKeys
|
19515
|
+
});
|
19436
19516
|
const {
|
19437
19517
|
sortBy
|
19438
19518
|
} = createSort(props);
|
@@ -19465,10 +19545,8 @@ const VDataTableVirtual = defineComponent({
|
|
19465
19545
|
useOptions({
|
19466
19546
|
sortBy,
|
19467
19547
|
page: ref(1),
|
19468
|
-
|
19469
|
-
|
19470
|
-
pageCount: ref(1),
|
19471
|
-
itemsPerPage: ref(-1)
|
19548
|
+
itemsPerPage: ref(-1),
|
19549
|
+
groupBy
|
19472
19550
|
});
|
19473
19551
|
provideDefaults({
|
19474
19552
|
VDataTableRows: {
|
@@ -19544,7 +19622,8 @@ const VDataTableServer = defineComponent({
|
|
19544
19622
|
...makeDataTableItemProps(),
|
19545
19623
|
...makeDataTableSelectProps(),
|
19546
19624
|
...makeDataTableSortProps(),
|
19547
|
-
...makeDataTablePaginateProps()
|
19625
|
+
...makeDataTablePaginateProps(),
|
19626
|
+
...makeDataTableGroupProps()
|
19548
19627
|
},
|
19549
19628
|
emits: {
|
19550
19629
|
'update:modelValue': value => true,
|
@@ -19553,6 +19632,7 @@ const VDataTableServer = defineComponent({
|
|
19553
19632
|
'update:sortBy': sortBy => true,
|
19554
19633
|
'update:options': options => true,
|
19555
19634
|
'update:expanded': options => true,
|
19635
|
+
'update:groupBy': value => true,
|
19556
19636
|
'click:row': (event, value) => true
|
19557
19637
|
},
|
19558
19638
|
setup(props, _ref) {
|
@@ -19560,10 +19640,12 @@ const VDataTableServer = defineComponent({
|
|
19560
19640
|
emit,
|
19561
19641
|
slots
|
19562
19642
|
} = _ref;
|
19643
|
+
const groupBy = useProxiedModel(props, 'groupBy');
|
19563
19644
|
createExpanded(props);
|
19564
19645
|
const {
|
19565
19646
|
columns
|
19566
19647
|
} = createHeaders(props, {
|
19648
|
+
groupBy,
|
19567
19649
|
showSelect: toRef(props, 'showSelect'),
|
19568
19650
|
showExpand: toRef(props, 'showExpand')
|
19569
19651
|
});
|
@@ -19574,21 +19656,22 @@ const VDataTableServer = defineComponent({
|
|
19574
19656
|
sortBy,
|
19575
19657
|
toggleSort
|
19576
19658
|
} = createSort(props);
|
19659
|
+
const {
|
19660
|
+
opened
|
19661
|
+
} = createGroupBy(props, groupBy, sortBy);
|
19577
19662
|
const {
|
19578
19663
|
page,
|
19579
|
-
itemsPerPage
|
19580
|
-
startIndex,
|
19581
|
-
stopIndex,
|
19582
|
-
pageCount
|
19664
|
+
itemsPerPage
|
19583
19665
|
} = createPagination(props, items);
|
19666
|
+
const {
|
19667
|
+
flatItems
|
19668
|
+
} = useGroupedItems(items, groupBy, opened);
|
19584
19669
|
createSelection(props, items);
|
19585
19670
|
useOptions({
|
19586
19671
|
page,
|
19587
19672
|
itemsPerPage,
|
19588
19673
|
sortBy,
|
19589
|
-
|
19590
|
-
stopIndex,
|
19591
|
-
pageCount
|
19674
|
+
groupBy
|
19592
19675
|
});
|
19593
19676
|
provide('v-data-table', {
|
19594
19677
|
toggleSort,
|
@@ -19624,7 +19707,7 @@ const VDataTableServer = defineComponent({
|
|
19624
19707
|
"class": "v-data-table__tbody",
|
19625
19708
|
"role": "rowgroup"
|
19626
19709
|
}, [slots.body ? slots.body() : createVNode(VDataTableRows, {
|
19627
|
-
"items":
|
19710
|
+
"items": flatItems.value,
|
19628
19711
|
"onClick:row": (event, value) => emit('click:row', event, value)
|
19629
19712
|
}, slots)]), (_slots$tbody = slots.tbody) == null ? void 0 : _slots$tbody.call(slots), (_slots$tfoot = slots.tfoot) == null ? void 0 : _slots$tfoot.call(slots)]);
|
19630
19713
|
}),
|
@@ -19915,6 +19998,7 @@ var components = /*#__PURE__*/Object.freeze({
|
|
19915
19998
|
VDataTableRow: VDataTableRow,
|
19916
19999
|
VDataTableVirtual: VDataTableVirtual,
|
19917
20000
|
VDataTableServer: VDataTableServer,
|
20001
|
+
VDataTableFooter: VDataTableFooter,
|
19918
20002
|
VVirtualScroll: VVirtualScroll
|
19919
20003
|
});
|
19920
20004
|
|
@@ -20130,7 +20214,7 @@ function createVuetify$1() {
|
|
20130
20214
|
locale
|
20131
20215
|
};
|
20132
20216
|
}
|
20133
|
-
const version$1 = "
|
20217
|
+
const version$1 = "4.0.0-dev-20230206.0";
|
20134
20218
|
createVuetify$1.version = version$1;
|
20135
20219
|
|
20136
20220
|
// Vue's inject() can only be used in setup
|
@@ -20143,7 +20227,7 @@ function inject(key) {
|
|
20143
20227
|
}
|
20144
20228
|
}
|
20145
20229
|
|
20146
|
-
const version = "
|
20230
|
+
const version = "4.0.0-dev-20230206.0";
|
20147
20231
|
|
20148
20232
|
const createVuetify = function () {
|
20149
20233
|
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|