@vuetify/nightly 3.0.0-next-20220107.0 → 3.0.0-next-20220126.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/json/attributes.json +96 -20
- package/dist/json/importMap.json +8 -0
- package/dist/json/tags.json +32 -3
- package/dist/json/web-types.json +338 -41
- package/dist/vuetify.css +77 -20
- package/dist/vuetify.d.ts +204 -48
- package/dist/vuetify.esm.js +707 -387
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +707 -387
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +2 -2
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VBtn/VBtn.css +0 -16
- package/lib/components/VBtn/VBtn.sass +0 -6
- package/lib/components/VBtn/_variables.scss +0 -2
- package/lib/components/VExpansionPanel/VExpansionPanel.mjs +2 -2
- package/lib/components/VExpansionPanel/VExpansionPanel.mjs.map +1 -1
- package/lib/components/VHover/VHover.mjs +3 -3
- package/lib/components/VHover/VHover.mjs.map +1 -1
- package/lib/components/VInput/VInput.mjs +3 -2
- package/lib/components/VInput/VInput.mjs.map +1 -1
- package/lib/components/VList/VList.css +4 -2
- package/lib/components/VList/VList.mjs +34 -35
- package/lib/components/VList/VList.mjs.map +1 -1
- package/lib/components/VList/VList.sass +5 -2
- package/lib/components/VList/VListChildren.mjs +19 -14
- package/lib/components/VList/VListChildren.mjs.map +1 -1
- package/lib/components/VList/VListGroup.mjs +16 -40
- package/lib/components/VList/VListGroup.mjs.map +1 -1
- package/lib/components/VList/VListItem.mjs +3 -3
- package/lib/components/VList/VListItem.mjs.map +1 -1
- package/lib/components/VList/VListSubheader.mjs +20 -12
- package/lib/components/VList/VListSubheader.mjs.map +1 -1
- package/lib/components/VList/list.mjs +31 -0
- package/lib/components/VList/list.mjs.map +1 -0
- package/lib/components/VMessages/VMessages.mjs +12 -4
- package/lib/components/VMessages/VMessages.mjs.map +1 -1
- package/lib/components/VOverlay/VOverlay.mjs +2 -2
- package/lib/components/VOverlay/VOverlay.mjs.map +1 -1
- package/lib/components/VOverlay/useActivator.mjs +12 -2
- package/lib/components/VOverlay/useActivator.mjs.map +1 -1
- package/lib/components/VPagination/VPagination.mjs +23 -31
- package/lib/components/VPagination/VPagination.mjs.map +1 -1
- package/lib/components/VWindow/VWindow.css +70 -0
- package/lib/components/VWindow/VWindow.mjs +158 -233
- package/lib/components/VWindow/VWindow.mjs.map +1 -1
- package/lib/components/VWindow/VWindow.sass +26 -50
- package/lib/components/VWindow/VWindowItem.mjs +72 -98
- package/lib/components/VWindow/VWindowItem.mjs.map +1 -1
- package/lib/components/VWindow/_variables.scss +2 -3
- package/lib/components/VWindow/index.mjs +2 -9
- package/lib/components/VWindow/index.mjs.map +1 -1
- package/lib/components/index.d.ts +200 -47
- package/lib/components/index.mjs +1 -1
- package/lib/components/index.mjs.map +1 -1
- package/lib/composables/group.mjs +1 -6
- package/lib/composables/group.mjs.map +1 -1
- package/lib/composables/nested/nested.mjs +1 -1
- package/lib/composables/nested/nested.mjs.map +1 -1
- package/lib/composables/nested/openStrategies.mjs +1 -1
- package/lib/composables/nested/openStrategies.mjs.map +1 -1
- package/lib/directives/touch/index.mjs +6 -3
- package/lib/directives/touch/index.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/index.d.ts +2 -0
- package/package.json +2 -1
package/dist/vuetify.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Vuetify v3.0.0-next-
|
|
2
|
+
* Vuetify v3.0.0-next-20220126.0
|
|
3
3
|
* Forged by John Leider
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -251,6 +251,9 @@
|
|
|
251
251
|
function isObject(obj) {
|
|
252
252
|
return obj !== null && typeof obj === 'object' && !Array.isArray(obj);
|
|
253
253
|
}
|
|
254
|
+
function isComponentInstance(obj) {
|
|
255
|
+
return obj == null ? void 0 : obj.$el;
|
|
256
|
+
} // KeyboardEvent.keyCode aliases
|
|
254
257
|
|
|
255
258
|
const keyCodes = Object.freeze({
|
|
256
259
|
enter: 13,
|
|
@@ -2608,12 +2611,7 @@
|
|
|
2608
2611
|
next: () => step(1),
|
|
2609
2612
|
isSelected: id => selected.value.includes(id),
|
|
2610
2613
|
selectedClass: vue.computed(() => props.selectedClass),
|
|
2611
|
-
items: vue.computed(() => items
|
|
2612
|
-
let {
|
|
2613
|
-
id
|
|
2614
|
-
} = _ref;
|
|
2615
|
-
return id;
|
|
2616
|
-
}))
|
|
2614
|
+
items: vue.computed(() => items)
|
|
2617
2615
|
};
|
|
2618
2616
|
vue.provide(injectKey, state);
|
|
2619
2617
|
return state;
|
|
@@ -4781,6 +4779,7 @@
|
|
|
4781
4779
|
name: 'VMessages',
|
|
4782
4780
|
props: {
|
|
4783
4781
|
active: Boolean,
|
|
4782
|
+
color: String,
|
|
4784
4783
|
value: {
|
|
4785
4784
|
type: [Array, String],
|
|
4786
4785
|
default: () => []
|
|
@@ -4788,6 +4787,7 @@
|
|
|
4788
4787
|
...makeTransitionProps({
|
|
4789
4788
|
transition: {
|
|
4790
4789
|
component: VSlideYTransition,
|
|
4790
|
+
leaveAbsolute: true,
|
|
4791
4791
|
group: true
|
|
4792
4792
|
}
|
|
4793
4793
|
})
|
|
@@ -4798,20 +4798,25 @@
|
|
|
4798
4798
|
slots
|
|
4799
4799
|
} = _ref;
|
|
4800
4800
|
const messages = vue.computed(() => wrapInArray(props.value));
|
|
4801
|
+
const {
|
|
4802
|
+
textColorClasses,
|
|
4803
|
+
textColorStyles
|
|
4804
|
+
} = useTextColor(vue.computed(() => props.color));
|
|
4801
4805
|
return () => {
|
|
4802
4806
|
var _slots$default;
|
|
4803
4807
|
|
|
4804
4808
|
return vue.createVNode(MaybeTransition, {
|
|
4805
4809
|
"transition": props.transition,
|
|
4806
4810
|
"tag": "div",
|
|
4807
|
-
"class":
|
|
4811
|
+
"class": ['v-messages', textColorClasses.value],
|
|
4812
|
+
"style": textColorStyles.value
|
|
4808
4813
|
}, {
|
|
4809
4814
|
default: () => [messages.value.length > 0 && props.active && messages.value.map((message, i) => vue.createVNode("div", {
|
|
4810
4815
|
"class": "v-messages__message",
|
|
4811
|
-
"key": i
|
|
4816
|
+
"key": `${i}-${messages.value}`
|
|
4812
4817
|
}, [message])), slots == null ? void 0 : (_slots$default = slots.default) == null ? void 0 : _slots$default.call(slots)],
|
|
4813
4818
|
_: 1
|
|
4814
|
-
}, 8, ["transition"]);
|
|
4819
|
+
}, 8, ["transition", "class", "style"]);
|
|
4815
4820
|
};
|
|
4816
4821
|
}
|
|
4817
4822
|
|
|
@@ -5115,10 +5120,11 @@
|
|
|
5115
5120
|
"class": "v-input__details"
|
|
5116
5121
|
}, [vue.createVNode(VMessages, {
|
|
5117
5122
|
"active": showMessages,
|
|
5118
|
-
"
|
|
5123
|
+
"color": isValid.value === false ? 'error' : undefined,
|
|
5124
|
+
"value": errorMessages.value.length > 0 ? errorMessages.value : hasMessages ? props.messages : props.hint
|
|
5119
5125
|
}, {
|
|
5120
5126
|
default: slots.messages
|
|
5121
|
-
}, 8, ["active", "value"]), (_slots$details = slots.details) == null ? void 0 : _slots$details.call(slots, slotProps.value)])], 2);
|
|
5127
|
+
}, 8, ["active", "color", "value"]), (_slots$details = slots.details) == null ? void 0 : _slots$details.call(slots, slotProps.value)])], 2);
|
|
5122
5128
|
});
|
|
5123
5129
|
return {
|
|
5124
5130
|
isValid,
|
|
@@ -5823,6 +5829,14 @@
|
|
|
5823
5829
|
|
|
5824
5830
|
return events;
|
|
5825
5831
|
});
|
|
5832
|
+
const activatorRef = vue.ref();
|
|
5833
|
+
vue.watchEffect(() => {
|
|
5834
|
+
if (!activatorRef.value) return;
|
|
5835
|
+
vue.nextTick(() => {
|
|
5836
|
+
const activator = activatorRef.value;
|
|
5837
|
+
activatorEl.value = isComponentInstance(activator) ? activator.$el : activator;
|
|
5838
|
+
});
|
|
5839
|
+
});
|
|
5826
5840
|
let scope;
|
|
5827
5841
|
vue.watch(() => !!props.activator, val => {
|
|
5828
5842
|
if (val && IN_BROWSER) {
|
|
@@ -5830,6 +5844,7 @@
|
|
|
5830
5844
|
scope.run(() => {
|
|
5831
5845
|
_useActivator(props, {
|
|
5832
5846
|
activatorEl,
|
|
5847
|
+
activatorRef,
|
|
5833
5848
|
activatorEvents
|
|
5834
5849
|
});
|
|
5835
5850
|
});
|
|
@@ -5842,6 +5857,7 @@
|
|
|
5842
5857
|
});
|
|
5843
5858
|
return {
|
|
5844
5859
|
activatorEl,
|
|
5860
|
+
activatorRef,
|
|
5845
5861
|
activatorEvents
|
|
5846
5862
|
};
|
|
5847
5863
|
}
|
|
@@ -6627,6 +6643,7 @@
|
|
|
6627
6643
|
}));
|
|
6628
6644
|
const {
|
|
6629
6645
|
activatorEl,
|
|
6646
|
+
activatorRef,
|
|
6630
6647
|
activatorEvents
|
|
6631
6648
|
} = useActivator(props, isActive);
|
|
6632
6649
|
const {
|
|
@@ -6721,8 +6738,7 @@
|
|
|
6721
6738
|
return vue.createVNode(vue.Fragment, null, [(_slots$activator = slots.activator) == null ? void 0 : _slots$activator.call(slots, {
|
|
6722
6739
|
isActive: isActive.value,
|
|
6723
6740
|
props: vue.mergeProps({
|
|
6724
|
-
|
|
6725
|
-
'onUpdate:modelValue': val => isActive.value = val
|
|
6741
|
+
ref: activatorRef
|
|
6726
6742
|
}, vue.toHandlers(activatorEvents.value), props.activatorProps)
|
|
6727
6743
|
}), vue.createVNode(vue.Teleport, {
|
|
6728
6744
|
"disabled": !teleportTarget.value,
|
|
@@ -7095,11 +7111,11 @@
|
|
|
7095
7111
|
} = useElevation(props);
|
|
7096
7112
|
vue.provide(VExpansionPanelSymbol, groupItem);
|
|
7097
7113
|
const isBeforeSelected = vue.computed(() => {
|
|
7098
|
-
const index = groupItem.group.items.value.
|
|
7114
|
+
const index = groupItem.group.items.value.findIndex(item => item.id === groupItem.id);
|
|
7099
7115
|
return !groupItem.isSelected.value && groupItem.group.selected.value.some(id => groupItem.group.items.value.indexOf(id) - index === 1);
|
|
7100
7116
|
});
|
|
7101
7117
|
const isAfterSelected = vue.computed(() => {
|
|
7102
|
-
const index = groupItem.group.items.value.
|
|
7118
|
+
const index = groupItem.group.items.value.findIndex(item => item.id === groupItem.id);
|
|
7103
7119
|
return !groupItem.isSelected.value && groupItem.group.selected.value.some(id => groupItem.group.items.value.indexOf(id) - index === -1);
|
|
7104
7120
|
});
|
|
7105
7121
|
const {
|
|
@@ -8352,16 +8368,16 @@
|
|
|
8352
8368
|
let {
|
|
8353
8369
|
slots
|
|
8354
8370
|
} = _ref;
|
|
8355
|
-
const
|
|
8371
|
+
const isHovering = useProxiedModel(props, 'modelValue');
|
|
8356
8372
|
const {
|
|
8357
8373
|
runOpenDelay,
|
|
8358
8374
|
runCloseDelay
|
|
8359
|
-
} = useDelay(props, value => !props.disabled && (
|
|
8375
|
+
} = useDelay(props, value => !props.disabled && (isHovering.value = value));
|
|
8360
8376
|
return () => {
|
|
8361
8377
|
var _slots$default;
|
|
8362
8378
|
|
|
8363
8379
|
return (_slots$default = slots.default) == null ? void 0 : _slots$default.call(slots, {
|
|
8364
|
-
|
|
8380
|
+
isHovering: isHovering.value,
|
|
8365
8381
|
props: {
|
|
8366
8382
|
onMouseenter: runOpenDelay,
|
|
8367
8383
|
onMouseleave: runCloseDelay
|
|
@@ -8575,37 +8591,26 @@
|
|
|
8575
8591
|
|
|
8576
8592
|
});
|
|
8577
8593
|
|
|
8578
|
-
|
|
8579
|
-
name: 'VListSubheader',
|
|
8580
|
-
props: {
|
|
8581
|
-
color: String,
|
|
8582
|
-
inset: Boolean,
|
|
8583
|
-
...makeTagProps()
|
|
8584
|
-
},
|
|
8585
|
-
|
|
8586
|
-
setup(props, _ref) {
|
|
8587
|
-
let {
|
|
8588
|
-
slots
|
|
8589
|
-
} = _ref;
|
|
8590
|
-
const {
|
|
8591
|
-
textColorClasses,
|
|
8592
|
-
textColorStyles
|
|
8593
|
-
} = useTextColor(vue.toRef(props, 'color'));
|
|
8594
|
-
return () => vue.createVNode(props.tag, {
|
|
8595
|
-
"class": ['v-list-subheader', {
|
|
8596
|
-
'v-list-subheader--inset': props.inset
|
|
8597
|
-
}, textColorClasses.value],
|
|
8598
|
-
"style": {
|
|
8599
|
-
textColorStyles
|
|
8600
|
-
}
|
|
8601
|
-
}, {
|
|
8602
|
-
default: () => [slots.default && vue.createVNode("div", {
|
|
8603
|
-
"class": "v-list-subheader__text"
|
|
8604
|
-
}, [slots.default()])]
|
|
8605
|
-
}, 8, ["class", "style"]);
|
|
8606
|
-
}
|
|
8594
|
+
// Utilities
|
|
8607
8595
|
|
|
8608
|
-
|
|
8596
|
+
const ListKey = Symbol.for('vuetify:list');
|
|
8597
|
+
function createList() {
|
|
8598
|
+
const parent = vue.inject(ListKey, {
|
|
8599
|
+
hasPrepend: vue.ref(false),
|
|
8600
|
+
updateHasPrepend: () => null
|
|
8601
|
+
});
|
|
8602
|
+
const data = {
|
|
8603
|
+
hasPrepend: vue.ref(false),
|
|
8604
|
+
updateHasPrepend: value => {
|
|
8605
|
+
if (value) data.hasPrepend.value = value;
|
|
8606
|
+
}
|
|
8607
|
+
};
|
|
8608
|
+
vue.provide(ListKey, data);
|
|
8609
|
+
return parent;
|
|
8610
|
+
}
|
|
8611
|
+
function useList() {
|
|
8612
|
+
return vue.inject(ListKey, null);
|
|
8613
|
+
}
|
|
8609
8614
|
|
|
8610
8615
|
const singleOpenStrategy = _ref => {
|
|
8611
8616
|
let {
|
|
@@ -8643,7 +8648,7 @@
|
|
|
8643
8648
|
let parent = parents.get(id);
|
|
8644
8649
|
opened.add(id);
|
|
8645
8650
|
|
|
8646
|
-
while (parent != null) {
|
|
8651
|
+
while (parent != null && parent !== id) {
|
|
8647
8652
|
opened.add(parent);
|
|
8648
8653
|
parent = parents.get(parent);
|
|
8649
8654
|
}
|
|
@@ -8895,7 +8900,7 @@
|
|
|
8895
8900
|
return arr;
|
|
8896
8901
|
}),
|
|
8897
8902
|
register: (id, parentId, isGroup) => {
|
|
8898
|
-
parentId && parents.value.set(id, parentId);
|
|
8903
|
+
parentId && id !== parentId && parents.value.set(id, parentId);
|
|
8899
8904
|
isGroup && children.value.set(id, []);
|
|
8900
8905
|
|
|
8901
8906
|
if (parentId != null) {
|
|
@@ -9002,30 +9007,6 @@
|
|
|
9002
9007
|
return group;
|
|
9003
9008
|
};
|
|
9004
9009
|
|
|
9005
|
-
const VListGroupItems = defineComponent({
|
|
9006
|
-
name: 'VListGroupItems',
|
|
9007
|
-
props: {
|
|
9008
|
-
open: Boolean,
|
|
9009
|
-
items: Array
|
|
9010
|
-
},
|
|
9011
|
-
|
|
9012
|
-
setup(props, _ref) {
|
|
9013
|
-
let {
|
|
9014
|
-
slots
|
|
9015
|
-
} = _ref;
|
|
9016
|
-
createList();
|
|
9017
|
-
return () => {
|
|
9018
|
-
return vue.createVNode(VExpandTransition, null, {
|
|
9019
|
-
default: () => [vue.withDirectives(vue.createVNode("div", {
|
|
9020
|
-
"class": "v-list-group__items"
|
|
9021
|
-
}, [vue.createVNode(VListChildren, {
|
|
9022
|
-
"items": props.items
|
|
9023
|
-
}, slots, 8, ["items"])], 512), [[vue.vShow, props.open]])]
|
|
9024
|
-
});
|
|
9025
|
-
};
|
|
9026
|
-
}
|
|
9027
|
-
|
|
9028
|
-
});
|
|
9029
9010
|
const VListGroup = genericComponent()({
|
|
9030
9011
|
name: 'VListGroup',
|
|
9031
9012
|
props: {
|
|
@@ -9038,14 +9019,13 @@
|
|
|
9038
9019
|
type: String,
|
|
9039
9020
|
default: '$expand'
|
|
9040
9021
|
},
|
|
9041
|
-
items: Array,
|
|
9042
9022
|
...makeTagProps()
|
|
9043
9023
|
},
|
|
9044
9024
|
|
|
9045
|
-
setup(props,
|
|
9025
|
+
setup(props, _ref) {
|
|
9046
9026
|
let {
|
|
9047
9027
|
slots
|
|
9048
|
-
} =
|
|
9028
|
+
} = _ref;
|
|
9049
9029
|
const {
|
|
9050
9030
|
isOpen,
|
|
9051
9031
|
open
|
|
@@ -9059,20 +9039,22 @@
|
|
|
9059
9039
|
const headerProps = vue.computed(() => ({
|
|
9060
9040
|
onClick,
|
|
9061
9041
|
appendIcon: isOpen.value ? props.collapseIcon : props.expandIcon,
|
|
9062
|
-
class: 'v-list-group__header'
|
|
9042
|
+
class: 'v-list-group__header',
|
|
9043
|
+
value: `${props.value}_header`
|
|
9063
9044
|
}));
|
|
9064
9045
|
return () => {
|
|
9065
|
-
var _slots$header;
|
|
9046
|
+
var _slots$header, _slots$items;
|
|
9066
9047
|
|
|
9067
9048
|
return vue.createVNode(props.tag, {
|
|
9068
9049
|
"class": ['v-list-group', {
|
|
9069
9050
|
'v-list-group--prepend': list == null ? void 0 : list.hasPrepend.value
|
|
9070
9051
|
}]
|
|
9071
9052
|
}, {
|
|
9072
|
-
default: () => [(_slots$header = slots.header) == null ? void 0 : _slots$header.call(slots, headerProps.value), vue.createVNode(
|
|
9073
|
-
|
|
9074
|
-
|
|
9075
|
-
|
|
9053
|
+
default: () => [(_slots$header = slots.header) == null ? void 0 : _slots$header.call(slots, headerProps.value), vue.createVNode(VExpandTransition, null, {
|
|
9054
|
+
default: () => [vue.withDirectives(vue.createVNode("div", {
|
|
9055
|
+
"class": "v-list-group__items"
|
|
9056
|
+
}, [(_slots$items = slots.items) == null ? void 0 : _slots$items.call(slots)], 512), [[vue.vShow, isOpen.value]])]
|
|
9057
|
+
})],
|
|
9076
9058
|
_: 1
|
|
9077
9059
|
}, 8, ["class"]);
|
|
9078
9060
|
};
|
|
@@ -9270,6 +9252,46 @@
|
|
|
9270
9252
|
|
|
9271
9253
|
});
|
|
9272
9254
|
|
|
9255
|
+
const VListSubheader = defineComponent({
|
|
9256
|
+
name: 'VListSubheader',
|
|
9257
|
+
props: {
|
|
9258
|
+
color: String,
|
|
9259
|
+
inset: Boolean,
|
|
9260
|
+
sticky: Boolean,
|
|
9261
|
+
text: String,
|
|
9262
|
+
...makeTagProps()
|
|
9263
|
+
},
|
|
9264
|
+
|
|
9265
|
+
setup(props, _ref) {
|
|
9266
|
+
let {
|
|
9267
|
+
slots
|
|
9268
|
+
} = _ref;
|
|
9269
|
+
const {
|
|
9270
|
+
textColorClasses,
|
|
9271
|
+
textColorStyles
|
|
9272
|
+
} = useTextColor(vue.toRef(props, 'color'));
|
|
9273
|
+
return () => {
|
|
9274
|
+
var _slots$default, _slots$default2;
|
|
9275
|
+
|
|
9276
|
+
const hasText = !!(slots.default || props.text);
|
|
9277
|
+
return vue.createVNode(props.tag, {
|
|
9278
|
+
"class": ['v-list-subheader', {
|
|
9279
|
+
'v-list-subheader--inset': props.inset,
|
|
9280
|
+
'v-list-subheader--sticky': props.sticky
|
|
9281
|
+
}, textColorClasses.value],
|
|
9282
|
+
"style": {
|
|
9283
|
+
textColorStyles
|
|
9284
|
+
}
|
|
9285
|
+
}, {
|
|
9286
|
+
default: () => [hasText && vue.createVNode("div", {
|
|
9287
|
+
"class": "v-list-subheader__text"
|
|
9288
|
+
}, [(_slots$default = (_slots$default2 = slots.default) == null ? void 0 : _slots$default2.call(slots)) != null ? _slots$default : props.text])]
|
|
9289
|
+
}, 8, ["class", "style"]);
|
|
9290
|
+
};
|
|
9291
|
+
}
|
|
9292
|
+
|
|
9293
|
+
});
|
|
9294
|
+
|
|
9273
9295
|
const VListChildren = genericComponent()({
|
|
9274
9296
|
name: 'VListChildren',
|
|
9275
9297
|
props: {
|
|
@@ -9280,51 +9302,64 @@
|
|
|
9280
9302
|
let {
|
|
9281
9303
|
slots
|
|
9282
9304
|
} = _ref;
|
|
9305
|
+
createList();
|
|
9283
9306
|
return () => {
|
|
9284
9307
|
var _slots$default, _slots$default2, _props$items;
|
|
9285
9308
|
|
|
9286
9309
|
return (_slots$default = (_slots$default2 = slots.default) == null ? void 0 : _slots$default2.call(slots)) != null ? _slots$default : (_props$items = props.items) == null ? void 0 : _props$items.map(_ref2 => {
|
|
9287
9310
|
let {
|
|
9288
9311
|
children,
|
|
9289
|
-
|
|
9312
|
+
props: itemProps,
|
|
9313
|
+
type
|
|
9290
9314
|
} = _ref2;
|
|
9291
|
-
|
|
9292
|
-
|
|
9293
|
-
...rest
|
|
9294
|
-
} = item;
|
|
9315
|
+
if (type === 'divider') return vue.createVNode(VDivider, itemProps, null, 16);
|
|
9316
|
+
if (type === 'subheader') return vue.createVNode(VListSubheader, itemProps, slots, 16);
|
|
9295
9317
|
return children ? vue.createVNode(VListGroup, {
|
|
9296
|
-
"value": value
|
|
9297
|
-
|
|
9298
|
-
|
|
9299
|
-
|
|
9318
|
+
"value": itemProps == null ? void 0 : itemProps.value
|
|
9319
|
+
}, {
|
|
9320
|
+
items: () => vue.createVNode(VListChildren, {
|
|
9321
|
+
"items": children
|
|
9322
|
+
}, slots, 8, ["items"]),
|
|
9323
|
+
header: headerProps => slots.externalHeader ? slots.externalHeader({ ...itemProps,
|
|
9300
9324
|
...headerProps
|
|
9301
|
-
}) : vue.createVNode(VListItem, vue.mergeProps(
|
|
9325
|
+
}) : vue.createVNode(VListItem, vue.mergeProps(itemProps, headerProps), null, 16),
|
|
9302
9326
|
_: 2
|
|
9303
|
-
}, 8, ["value"
|
|
9327
|
+
}, 8, ["value"]) : slots.item ? slots.item(itemProps) : vue.createVNode(VListItem, itemProps, slots, 16);
|
|
9304
9328
|
});
|
|
9305
9329
|
};
|
|
9306
9330
|
}
|
|
9307
9331
|
|
|
9308
9332
|
});
|
|
9309
9333
|
|
|
9310
|
-
const
|
|
9311
|
-
|
|
9312
|
-
|
|
9313
|
-
|
|
9314
|
-
|
|
9334
|
+
const parseItems = items => {
|
|
9335
|
+
if (!items) return undefined;
|
|
9336
|
+
return items.map(item => {
|
|
9337
|
+
if (typeof item === 'string') return {
|
|
9338
|
+
type: 'item',
|
|
9339
|
+
value: item,
|
|
9340
|
+
title: item
|
|
9341
|
+
};
|
|
9342
|
+
const {
|
|
9343
|
+
$type,
|
|
9344
|
+
$children,
|
|
9345
|
+
...props
|
|
9346
|
+
} = item;
|
|
9347
|
+
if ($type === 'subheader') return {
|
|
9348
|
+
type: 'subheader',
|
|
9349
|
+
props
|
|
9350
|
+
};
|
|
9351
|
+
if ($type === 'divider') return {
|
|
9352
|
+
type: 'divider',
|
|
9353
|
+
props
|
|
9354
|
+
};
|
|
9355
|
+
return {
|
|
9356
|
+
type: 'item',
|
|
9357
|
+
props,
|
|
9358
|
+
children: parseItems($children)
|
|
9359
|
+
};
|
|
9315
9360
|
});
|
|
9316
|
-
const data = {
|
|
9317
|
-
hasPrepend: vue.ref(false),
|
|
9318
|
-
updateHasPrepend: value => {
|
|
9319
|
-
if (value) data.hasPrepend.value = value;
|
|
9320
|
-
}
|
|
9321
|
-
};
|
|
9322
|
-
vue.provide(ListKey, data);
|
|
9323
|
-
return parent;
|
|
9324
|
-
};
|
|
9325
|
-
const useList = () => {
|
|
9326
|
-
return vue.inject(ListKey, null);
|
|
9327
9361
|
};
|
|
9362
|
+
|
|
9328
9363
|
const VList = genericComponent()({
|
|
9329
9364
|
name: 'VList',
|
|
9330
9365
|
props: {
|
|
@@ -9335,10 +9370,6 @@
|
|
|
9335
9370
|
default: 'one'
|
|
9336
9371
|
},
|
|
9337
9372
|
nav: Boolean,
|
|
9338
|
-
subheader: {
|
|
9339
|
-
type: [Boolean, String],
|
|
9340
|
-
default: false
|
|
9341
|
-
},
|
|
9342
9373
|
items: Array,
|
|
9343
9374
|
...makeNestedProps({
|
|
9344
9375
|
selectStrategy: 'leaf',
|
|
@@ -9363,6 +9394,7 @@
|
|
|
9363
9394
|
let {
|
|
9364
9395
|
slots
|
|
9365
9396
|
} = _ref;
|
|
9397
|
+
const items = vue.computed(() => parseItems(props.items));
|
|
9366
9398
|
const {
|
|
9367
9399
|
themeClasses
|
|
9368
9400
|
} = provideTheme(props);
|
|
@@ -9392,28 +9424,22 @@
|
|
|
9392
9424
|
} = useNested(props);
|
|
9393
9425
|
createList();
|
|
9394
9426
|
useRender(() => {
|
|
9395
|
-
const hasHeader = typeof props.subheader === 'string' || slots.subheader;
|
|
9396
9427
|
return vue.createVNode(props.tag, {
|
|
9397
9428
|
"class": ['v-list', {
|
|
9398
9429
|
'v-list--disabled': props.disabled,
|
|
9399
9430
|
'v-list--nav': props.nav,
|
|
9400
|
-
'v-list--subheader': props.subheader,
|
|
9401
|
-
'v-list--subheader-sticky': props.subheader === 'sticky',
|
|
9402
9431
|
[`v-list--${props.lines}-line`]: true
|
|
9403
9432
|
}, themeClasses.value, backgroundColorClasses.value, borderClasses.value, densityClasses.value, elevationClasses.value, roundedClasses.value],
|
|
9404
9433
|
"style": [backgroundColorStyles.value, dimensionStyles.value]
|
|
9405
9434
|
}, {
|
|
9406
|
-
default: () => [
|
|
9407
|
-
|
|
9408
|
-
})), vue.createVNode(VListChildren, {
|
|
9409
|
-
"items": props.items
|
|
9435
|
+
default: () => [vue.createVNode(VListChildren, {
|
|
9436
|
+
"items": items.value
|
|
9410
9437
|
}, {
|
|
9411
9438
|
default: slots.default,
|
|
9412
9439
|
item: slots.item,
|
|
9413
9440
|
externalHeader: slots.header,
|
|
9414
9441
|
_: 1
|
|
9415
|
-
}, 8, ["items"])]
|
|
9416
|
-
_: 1
|
|
9442
|
+
}, 8, ["items"])]
|
|
9417
9443
|
}, 8, ["class", "style"]);
|
|
9418
9444
|
});
|
|
9419
9445
|
return {
|
|
@@ -10155,14 +10181,14 @@
|
|
|
10155
10181
|
default: '...'
|
|
10156
10182
|
},
|
|
10157
10183
|
showFirstLastPage: Boolean,
|
|
10184
|
+
...makeRoundedProps(),
|
|
10185
|
+
...makeBorderProps(),
|
|
10186
|
+
...makeDensityProps(),
|
|
10187
|
+
...makeElevationProps(),
|
|
10188
|
+
...makeSizeProps(),
|
|
10158
10189
|
...makeTagProps({
|
|
10159
10190
|
tag: 'nav'
|
|
10160
10191
|
}),
|
|
10161
|
-
...makeElevationProps(),
|
|
10162
|
-
...makeDensityProps(),
|
|
10163
|
-
...makeRoundedProps(),
|
|
10164
|
-
...makeSizeProps(),
|
|
10165
|
-
...makeBorderProps(),
|
|
10166
10192
|
...makeThemeProps(),
|
|
10167
10193
|
...makeVariantProps({
|
|
10168
10194
|
variant: 'text'
|
|
@@ -10256,12 +10282,15 @@
|
|
|
10256
10282
|
refs,
|
|
10257
10283
|
updateRef
|
|
10258
10284
|
} = useRefs();
|
|
10285
|
+
provideDefaults({
|
|
10286
|
+
VBtn: {
|
|
10287
|
+
border: vue.toRef(props, 'border'),
|
|
10288
|
+
density: vue.toRef(props, 'density'),
|
|
10289
|
+
size: vue.toRef(props, 'size'),
|
|
10290
|
+
variant: vue.toRef(props, 'variant')
|
|
10291
|
+
}
|
|
10292
|
+
});
|
|
10259
10293
|
const items = vue.computed(() => {
|
|
10260
|
-
const sharedProps = {
|
|
10261
|
-
density: props.density,
|
|
10262
|
-
rounded: props.rounded,
|
|
10263
|
-
size: props.size
|
|
10264
|
-
};
|
|
10265
10294
|
return range.value.map((item, index) => {
|
|
10266
10295
|
const ref = e => updateRef(e, index);
|
|
10267
10296
|
|
|
@@ -10269,13 +10298,11 @@
|
|
|
10269
10298
|
return {
|
|
10270
10299
|
isActive: false,
|
|
10271
10300
|
page: item,
|
|
10272
|
-
props: {
|
|
10301
|
+
props: {
|
|
10273
10302
|
ref,
|
|
10274
10303
|
ellipsis: true,
|
|
10275
10304
|
icon: true,
|
|
10276
|
-
disabled: true
|
|
10277
|
-
variant: props.variant,
|
|
10278
|
-
border: props.border
|
|
10305
|
+
disabled: true
|
|
10279
10306
|
}
|
|
10280
10307
|
};
|
|
10281
10308
|
} else {
|
|
@@ -10283,14 +10310,13 @@
|
|
|
10283
10310
|
return {
|
|
10284
10311
|
isActive,
|
|
10285
10312
|
page: n(item),
|
|
10286
|
-
props: {
|
|
10313
|
+
props: {
|
|
10287
10314
|
ref,
|
|
10288
10315
|
ellipsis: false,
|
|
10289
10316
|
icon: true,
|
|
10290
10317
|
disabled: !!props.disabled || props.length < 2,
|
|
10291
10318
|
elevation: props.elevation,
|
|
10292
|
-
|
|
10293
|
-
border: props.border,
|
|
10319
|
+
rounded: props.rounded,
|
|
10294
10320
|
color: isActive ? props.color : undefined,
|
|
10295
10321
|
ariaCurrent: isActive,
|
|
10296
10322
|
ariaLabel: t(isActive ? props.currentPageAriaLabel : props.pageAriaLabel, index + 1),
|
|
@@ -10301,39 +10327,31 @@
|
|
|
10301
10327
|
});
|
|
10302
10328
|
});
|
|
10303
10329
|
const controls = vue.computed(() => {
|
|
10304
|
-
const sharedProps = {
|
|
10305
|
-
color: undefined,
|
|
10306
|
-
density: props.density,
|
|
10307
|
-
rounded: props.rounded,
|
|
10308
|
-
size: props.size,
|
|
10309
|
-
variant: props.variant,
|
|
10310
|
-
border: props.border
|
|
10311
|
-
};
|
|
10312
10330
|
const prevDisabled = !!props.disabled || page.value <= start.value;
|
|
10313
10331
|
const nextDisabled = !!props.disabled || page.value >= start.value + length.value - 1;
|
|
10314
10332
|
return {
|
|
10315
|
-
first: props.showFirstLastPage ? {
|
|
10333
|
+
first: props.showFirstLastPage ? {
|
|
10316
10334
|
icon: isRtl.value ? props.lastIcon : props.firstIcon,
|
|
10317
10335
|
onClick: e => setValue(e, start.value, 'first'),
|
|
10318
10336
|
disabled: prevDisabled,
|
|
10319
10337
|
ariaLabel: t(props.firstAriaLabel),
|
|
10320
10338
|
ariaDisabled: prevDisabled
|
|
10321
10339
|
} : undefined,
|
|
10322
|
-
prev: {
|
|
10340
|
+
prev: {
|
|
10323
10341
|
icon: isRtl.value ? props.nextIcon : props.prevIcon,
|
|
10324
10342
|
onClick: e => setValue(e, page.value - 1, 'prev'),
|
|
10325
10343
|
disabled: prevDisabled,
|
|
10326
10344
|
ariaLabel: t(props.previousAriaLabel),
|
|
10327
10345
|
ariaDisabled: prevDisabled
|
|
10328
10346
|
},
|
|
10329
|
-
next: {
|
|
10347
|
+
next: {
|
|
10330
10348
|
icon: isRtl.value ? props.prevIcon : props.nextIcon,
|
|
10331
10349
|
onClick: e => setValue(e, page.value + 1, 'next'),
|
|
10332
10350
|
disabled: nextDisabled,
|
|
10333
10351
|
ariaLabel: t(props.nextAriaLabel),
|
|
10334
10352
|
ariaDisabled: nextDisabled
|
|
10335
10353
|
},
|
|
10336
|
-
last: props.showFirstLastPage ? {
|
|
10354
|
+
last: props.showFirstLastPage ? {
|
|
10337
10355
|
icon: isRtl.value ? props.firstIcon : props.lastIcon,
|
|
10338
10356
|
onClick: e => setValue(e, start.value + length.value - 1, 'last'),
|
|
10339
10357
|
disabled: nextDisabled,
|
|
@@ -12789,102 +12807,524 @@
|
|
|
12789
12807
|
|
|
12790
12808
|
});
|
|
12791
12809
|
|
|
12792
|
-
|
|
12793
|
-
|
|
12794
|
-
|
|
12795
|
-
|
|
12796
|
-
|
|
12797
|
-
|
|
12798
|
-
|
|
12799
|
-
|
|
12800
|
-
|
|
12801
|
-
|
|
12802
|
-
|
|
12803
|
-
|
|
12804
|
-
|
|
12805
|
-
|
|
12806
|
-
|
|
12807
|
-
|
|
12808
|
-
|
|
12809
|
-
|
|
12810
|
-
|
|
12811
|
-
|
|
12812
|
-
|
|
12813
|
-
|
|
12814
|
-
|
|
12815
|
-
|
|
12816
|
-
|
|
12817
|
-
|
|
12818
|
-
|
|
12819
|
-
|
|
12820
|
-
|
|
12821
|
-
|
|
12822
|
-
|
|
12823
|
-
|
|
12824
|
-
|
|
12825
|
-
|
|
12826
|
-
|
|
12827
|
-
|
|
12828
|
-
|
|
12829
|
-
|
|
12830
|
-
|
|
12831
|
-
|
|
12832
|
-
|
|
12833
|
-
|
|
12834
|
-
|
|
12835
|
-
|
|
12836
|
-
|
|
12837
|
-
|
|
12838
|
-
|
|
12839
|
-
|
|
12840
|
-
|
|
12841
|
-
|
|
12842
|
-
|
|
12843
|
-
|
|
12844
|
-
|
|
12845
|
-
|
|
12846
|
-
|
|
12847
|
-
|
|
12848
|
-
|
|
12849
|
-
|
|
12850
|
-
|
|
12851
|
-
|
|
12852
|
-
|
|
12853
|
-
|
|
12854
|
-
|
|
12855
|
-
|
|
12856
|
-
|
|
12857
|
-
|
|
12858
|
-
|
|
12859
|
-
|
|
12860
|
-
|
|
12861
|
-
|
|
12862
|
-
|
|
12863
|
-
|
|
12864
|
-
|
|
12865
|
-
|
|
12866
|
-
|
|
12867
|
-
|
|
12868
|
-
|
|
12869
|
-
|
|
12870
|
-
|
|
12871
|
-
|
|
12872
|
-
|
|
12873
|
-
|
|
12874
|
-
|
|
12875
|
-
|
|
12876
|
-
|
|
12877
|
-
|
|
12878
|
-
|
|
12879
|
-
|
|
12880
|
-
|
|
12881
|
-
|
|
12882
|
-
|
|
12883
|
-
|
|
12884
|
-
|
|
12885
|
-
|
|
12886
|
-
|
|
12887
|
-
|
|
12810
|
+
// Types
|
|
12811
|
+
|
|
12812
|
+
const handleGesture = wrapper => {
|
|
12813
|
+
const {
|
|
12814
|
+
touchstartX,
|
|
12815
|
+
touchendX,
|
|
12816
|
+
touchstartY,
|
|
12817
|
+
touchendY
|
|
12818
|
+
} = wrapper;
|
|
12819
|
+
const dirRatio = 0.5;
|
|
12820
|
+
const minDistance = 16;
|
|
12821
|
+
wrapper.offsetX = touchendX - touchstartX;
|
|
12822
|
+
wrapper.offsetY = touchendY - touchstartY;
|
|
12823
|
+
|
|
12824
|
+
if (Math.abs(wrapper.offsetY) < dirRatio * Math.abs(wrapper.offsetX)) {
|
|
12825
|
+
wrapper.left && touchendX < touchstartX - minDistance && wrapper.left(wrapper);
|
|
12826
|
+
wrapper.right && touchendX > touchstartX + minDistance && wrapper.right(wrapper);
|
|
12827
|
+
}
|
|
12828
|
+
|
|
12829
|
+
if (Math.abs(wrapper.offsetX) < dirRatio * Math.abs(wrapper.offsetY)) {
|
|
12830
|
+
wrapper.up && touchendY < touchstartY - minDistance && wrapper.up(wrapper);
|
|
12831
|
+
wrapper.down && touchendY > touchstartY + minDistance && wrapper.down(wrapper);
|
|
12832
|
+
}
|
|
12833
|
+
};
|
|
12834
|
+
|
|
12835
|
+
function touchstart(event, wrapper) {
|
|
12836
|
+
var _wrapper$start;
|
|
12837
|
+
|
|
12838
|
+
const touch = event.changedTouches[0];
|
|
12839
|
+
wrapper.touchstartX = touch.clientX;
|
|
12840
|
+
wrapper.touchstartY = touch.clientY;
|
|
12841
|
+
(_wrapper$start = wrapper.start) == null ? void 0 : _wrapper$start.call(wrapper, {
|
|
12842
|
+
originalEvent: event,
|
|
12843
|
+
...wrapper
|
|
12844
|
+
});
|
|
12845
|
+
}
|
|
12846
|
+
|
|
12847
|
+
function touchend(event, wrapper) {
|
|
12848
|
+
var _wrapper$end;
|
|
12849
|
+
|
|
12850
|
+
const touch = event.changedTouches[0];
|
|
12851
|
+
wrapper.touchendX = touch.clientX;
|
|
12852
|
+
wrapper.touchendY = touch.clientY;
|
|
12853
|
+
(_wrapper$end = wrapper.end) == null ? void 0 : _wrapper$end.call(wrapper, {
|
|
12854
|
+
originalEvent: event,
|
|
12855
|
+
...wrapper
|
|
12856
|
+
});
|
|
12857
|
+
handleGesture(wrapper);
|
|
12858
|
+
}
|
|
12859
|
+
|
|
12860
|
+
function touchmove(event, wrapper) {
|
|
12861
|
+
var _wrapper$move;
|
|
12862
|
+
|
|
12863
|
+
const touch = event.changedTouches[0];
|
|
12864
|
+
wrapper.touchmoveX = touch.clientX;
|
|
12865
|
+
wrapper.touchmoveY = touch.clientY;
|
|
12866
|
+
(_wrapper$move = wrapper.move) == null ? void 0 : _wrapper$move.call(wrapper, {
|
|
12867
|
+
originalEvent: event,
|
|
12868
|
+
...wrapper
|
|
12869
|
+
});
|
|
12870
|
+
}
|
|
12871
|
+
|
|
12872
|
+
function createHandlers() {
|
|
12873
|
+
let value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
12874
|
+
const wrapper = {
|
|
12875
|
+
touchstartX: 0,
|
|
12876
|
+
touchstartY: 0,
|
|
12877
|
+
touchendX: 0,
|
|
12878
|
+
touchendY: 0,
|
|
12879
|
+
touchmoveX: 0,
|
|
12880
|
+
touchmoveY: 0,
|
|
12881
|
+
offsetX: 0,
|
|
12882
|
+
offsetY: 0,
|
|
12883
|
+
left: value.left,
|
|
12884
|
+
right: value.right,
|
|
12885
|
+
up: value.up,
|
|
12886
|
+
down: value.down,
|
|
12887
|
+
start: value.start,
|
|
12888
|
+
move: value.move,
|
|
12889
|
+
end: value.end
|
|
12890
|
+
};
|
|
12891
|
+
return {
|
|
12892
|
+
touchstart: e => touchstart(e, wrapper),
|
|
12893
|
+
touchend: e => touchend(e, wrapper),
|
|
12894
|
+
touchmove: e => touchmove(e, wrapper)
|
|
12895
|
+
};
|
|
12896
|
+
}
|
|
12897
|
+
|
|
12898
|
+
function mounted$3(el, binding) {
|
|
12899
|
+
var _value$options, _binding$instance, _target$_touchHandler;
|
|
12900
|
+
|
|
12901
|
+
const value = binding.value;
|
|
12902
|
+
const target = value != null && value.parent ? el.parentElement : el;
|
|
12903
|
+
const options = (_value$options = value == null ? void 0 : value.options) != null ? _value$options : {
|
|
12904
|
+
passive: true
|
|
12905
|
+
};
|
|
12906
|
+
const uid = (_binding$instance = binding.instance) == null ? void 0 : _binding$instance.$.uid; // TODO: use custom uid generator
|
|
12907
|
+
|
|
12908
|
+
if (!target || !uid) return;
|
|
12909
|
+
const handlers = createHandlers(binding.value);
|
|
12910
|
+
target._touchHandlers = (_target$_touchHandler = target._touchHandlers) != null ? _target$_touchHandler : Object.create(null);
|
|
12911
|
+
target._touchHandlers[uid] = handlers;
|
|
12912
|
+
keys(handlers).forEach(eventName => {
|
|
12913
|
+
target.addEventListener(eventName, handlers[eventName], options);
|
|
12914
|
+
});
|
|
12915
|
+
}
|
|
12916
|
+
|
|
12917
|
+
function unmounted$3(el, binding) {
|
|
12918
|
+
var _binding$value, _binding$instance2;
|
|
12919
|
+
|
|
12920
|
+
const target = (_binding$value = binding.value) != null && _binding$value.parent ? el.parentElement : el;
|
|
12921
|
+
const uid = (_binding$instance2 = binding.instance) == null ? void 0 : _binding$instance2.$.uid;
|
|
12922
|
+
if (!(target != null && target._touchHandlers) || !uid) return;
|
|
12923
|
+
const handlers = target._touchHandlers[uid];
|
|
12924
|
+
keys(handlers).forEach(eventName => {
|
|
12925
|
+
target.removeEventListener(eventName, handlers[eventName]);
|
|
12926
|
+
});
|
|
12927
|
+
delete target._touchHandlers[uid];
|
|
12928
|
+
}
|
|
12929
|
+
|
|
12930
|
+
const Touch = {
|
|
12931
|
+
mounted: mounted$3,
|
|
12932
|
+
unmounted: unmounted$3
|
|
12933
|
+
};
|
|
12934
|
+
|
|
12935
|
+
const VWindowSymbol = Symbol.for('vuetify:v-window');
|
|
12936
|
+
const VWindowGroupSymbol = Symbol.for('vuetify:v-window-group');
|
|
12937
|
+
const VWindow = vue.defineComponent({
|
|
12938
|
+
name: 'VWindow',
|
|
12939
|
+
directives: {
|
|
12940
|
+
Touch
|
|
12941
|
+
},
|
|
12942
|
+
props: {
|
|
12943
|
+
continuous: Boolean,
|
|
12944
|
+
nextIcon: {
|
|
12945
|
+
type: [Boolean, String],
|
|
12946
|
+
default: '$next'
|
|
12947
|
+
},
|
|
12948
|
+
prevIcon: {
|
|
12949
|
+
type: [Boolean, String],
|
|
12950
|
+
default: '$prev'
|
|
12951
|
+
},
|
|
12952
|
+
reverse: Boolean,
|
|
12953
|
+
showArrows: {
|
|
12954
|
+
type: [Boolean, String],
|
|
12955
|
+
validator: v => typeof v === 'boolean' || v === 'hover'
|
|
12956
|
+
},
|
|
12957
|
+
touch: {
|
|
12958
|
+
type: [Object, Boolean],
|
|
12959
|
+
default: undefined
|
|
12960
|
+
},
|
|
12961
|
+
direction: {
|
|
12962
|
+
type: String,
|
|
12963
|
+
default: 'horizontal'
|
|
12964
|
+
},
|
|
12965
|
+
modelValue: null,
|
|
12966
|
+
disabled: Boolean,
|
|
12967
|
+
selectedClass: {
|
|
12968
|
+
type: String,
|
|
12969
|
+
default: 'v-window-item--active'
|
|
12970
|
+
},
|
|
12971
|
+
// TODO: mandatory should probably not be exposed but do this for now
|
|
12972
|
+
mandatory: {
|
|
12973
|
+
default: 'force'
|
|
12974
|
+
},
|
|
12975
|
+
...makeTagProps(),
|
|
12976
|
+
...makeThemeProps()
|
|
12977
|
+
},
|
|
12978
|
+
emits: {
|
|
12979
|
+
'update:modelValue': v => true
|
|
12980
|
+
},
|
|
12981
|
+
|
|
12982
|
+
setup(props, _ref) {
|
|
12983
|
+
let {
|
|
12984
|
+
slots
|
|
12985
|
+
} = _ref;
|
|
12986
|
+
const {
|
|
12987
|
+
themeClasses
|
|
12988
|
+
} = provideTheme(props);
|
|
12989
|
+
const {
|
|
12990
|
+
isRtl
|
|
12991
|
+
} = useRtl();
|
|
12992
|
+
const {
|
|
12993
|
+
t
|
|
12994
|
+
} = useLocale();
|
|
12995
|
+
const group = useGroup(props, VWindowGroupSymbol);
|
|
12996
|
+
const rootRef = vue.ref();
|
|
12997
|
+
const isRtlReverse = vue.computed(() => isRtl.value ? !props.reverse : props.reverse);
|
|
12998
|
+
const isReversed = vue.ref(false);
|
|
12999
|
+
const transition = vue.computed(() => {
|
|
13000
|
+
const axis = props.direction === 'vertical' ? 'y' : 'x';
|
|
13001
|
+
const reverse = isRtlReverse.value ? !isReversed.value : isReversed.value;
|
|
13002
|
+
const direction = reverse ? '-reverse' : '';
|
|
13003
|
+
return `v-window-${axis}${direction}-transition`;
|
|
13004
|
+
});
|
|
13005
|
+
const transitionCount = vue.ref(0);
|
|
13006
|
+
const transitionHeight = vue.ref(undefined);
|
|
13007
|
+
const activeIndex = vue.computed(() => {
|
|
13008
|
+
return group.items.value.findIndex(item => group.selected.value.includes(item.id));
|
|
13009
|
+
});
|
|
13010
|
+
vue.watch(activeIndex, (newVal, oldVal) => {
|
|
13011
|
+
const itemsLength = group.items.value.length;
|
|
13012
|
+
const lastIndex = itemsLength - 1;
|
|
13013
|
+
|
|
13014
|
+
if (itemsLength <= 2) {
|
|
13015
|
+
isReversed.value = newVal < oldVal;
|
|
13016
|
+
} else if (newVal === lastIndex && oldVal === 0) {
|
|
13017
|
+
isReversed.value = true;
|
|
13018
|
+
} else if (newVal === 0 && oldVal === lastIndex) {
|
|
13019
|
+
isReversed.value = false;
|
|
13020
|
+
} else {
|
|
13021
|
+
isReversed.value = newVal < oldVal;
|
|
13022
|
+
}
|
|
13023
|
+
});
|
|
13024
|
+
vue.provide(VWindowSymbol, {
|
|
13025
|
+
transition,
|
|
13026
|
+
isReversed,
|
|
13027
|
+
transitionCount,
|
|
13028
|
+
transitionHeight,
|
|
13029
|
+
rootRef
|
|
13030
|
+
});
|
|
13031
|
+
const canMoveBack = vue.computed(() => props.continuous || activeIndex.value !== 0);
|
|
13032
|
+
const canMoveForward = vue.computed(() => props.continuous || activeIndex.value !== group.items.value.length - 1);
|
|
13033
|
+
|
|
13034
|
+
function prev() {
|
|
13035
|
+
canMoveBack.value && group.prev();
|
|
13036
|
+
}
|
|
13037
|
+
|
|
13038
|
+
function next() {
|
|
13039
|
+
canMoveForward.value && group.next();
|
|
13040
|
+
}
|
|
13041
|
+
|
|
13042
|
+
provideDefaults({
|
|
13043
|
+
VBtn: {
|
|
13044
|
+
variant: 'text'
|
|
13045
|
+
}
|
|
13046
|
+
}, {
|
|
13047
|
+
scoped: true
|
|
13048
|
+
});
|
|
13049
|
+
const arrows = vue.computed(() => {
|
|
13050
|
+
const arrows = [];
|
|
13051
|
+
const prevProps = {
|
|
13052
|
+
icon: isRtl.value ? props.nextIcon : props.prevIcon,
|
|
13053
|
+
class: `v-window__${isRtlReverse.value ? 'right' : 'left'}`,
|
|
13054
|
+
onClick: group.prev,
|
|
13055
|
+
ariaLabel: t('$vuetify.carousel.prev')
|
|
13056
|
+
};
|
|
13057
|
+
arrows.push(canMoveBack.value ? slots.prev ? slots.prev({
|
|
13058
|
+
props: prevProps
|
|
13059
|
+
}) : vue.createVNode(VBtn, prevProps, null, 16) : vue.createVNode("div", null, null));
|
|
13060
|
+
const nextProps = {
|
|
13061
|
+
icon: isRtl.value ? props.prevIcon : props.nextIcon,
|
|
13062
|
+
class: `v-window__${isRtlReverse.value ? 'left' : 'right'}`,
|
|
13063
|
+
onClick: group.next,
|
|
13064
|
+
ariaLabel: t('$vuetify.carousel.next')
|
|
13065
|
+
};
|
|
13066
|
+
arrows.push(canMoveForward.value ? slots.next ? slots.next({
|
|
13067
|
+
props: nextProps
|
|
13068
|
+
}) : vue.createVNode(VBtn, nextProps, null, 16) : vue.createVNode("div", null, null));
|
|
13069
|
+
return arrows;
|
|
13070
|
+
});
|
|
13071
|
+
const touchOptions = vue.computed(() => {
|
|
13072
|
+
if (props.touch === false) return props.touch;
|
|
13073
|
+
const options = {
|
|
13074
|
+
left: () => {
|
|
13075
|
+
isRtlReverse.value ? prev() : next();
|
|
13076
|
+
},
|
|
13077
|
+
right: () => {
|
|
13078
|
+
isRtlReverse.value ? next() : prev();
|
|
13079
|
+
},
|
|
13080
|
+
end: _ref2 => {
|
|
13081
|
+
let {
|
|
13082
|
+
originalEvent
|
|
13083
|
+
} = _ref2;
|
|
13084
|
+
originalEvent.stopPropagation();
|
|
13085
|
+
},
|
|
13086
|
+
start: _ref3 => {
|
|
13087
|
+
let {
|
|
13088
|
+
originalEvent
|
|
13089
|
+
} = _ref3;
|
|
13090
|
+
originalEvent.stopPropagation();
|
|
13091
|
+
}
|
|
13092
|
+
};
|
|
13093
|
+
return { ...options,
|
|
13094
|
+
...(props.touch === true ? {} : props.touch)
|
|
13095
|
+
};
|
|
13096
|
+
});
|
|
13097
|
+
return () => {
|
|
13098
|
+
var _slots$default;
|
|
13099
|
+
|
|
13100
|
+
return vue.withDirectives(vue.createVNode(props.tag, {
|
|
13101
|
+
"ref": rootRef,
|
|
13102
|
+
"class": ['v-window', {
|
|
13103
|
+
'v-window--show-arrows-on-hover': props.showArrows === 'hover'
|
|
13104
|
+
}, themeClasses.value]
|
|
13105
|
+
}, {
|
|
13106
|
+
default: () => [vue.createVNode("div", {
|
|
13107
|
+
"class": "v-window__container",
|
|
13108
|
+
"style": {
|
|
13109
|
+
height: transitionHeight.value
|
|
13110
|
+
}
|
|
13111
|
+
}, [(_slots$default = slots.default) == null ? void 0 : _slots$default.call(slots), props.showArrows !== false && vue.createVNode("div", {
|
|
13112
|
+
"class": "v-window__controls"
|
|
13113
|
+
}, [arrows.value])], 4)]
|
|
13114
|
+
}, 8, ["class"]), [[vue.resolveDirective("touch"), touchOptions.value]]);
|
|
13115
|
+
};
|
|
13116
|
+
}
|
|
13117
|
+
|
|
13118
|
+
});
|
|
13119
|
+
|
|
13120
|
+
const VWindowItem = defineComponent({
|
|
13121
|
+
name: 'VWindowItem',
|
|
13122
|
+
directives: {
|
|
13123
|
+
Touch
|
|
13124
|
+
},
|
|
13125
|
+
props: {
|
|
13126
|
+
reverseTransition: {
|
|
13127
|
+
type: [Boolean, String],
|
|
13128
|
+
default: undefined
|
|
13129
|
+
},
|
|
13130
|
+
transition: {
|
|
13131
|
+
type: [Boolean, String],
|
|
13132
|
+
default: undefined
|
|
13133
|
+
},
|
|
13134
|
+
...makeLazyProps(),
|
|
13135
|
+
...makeGroupItemProps()
|
|
13136
|
+
},
|
|
13137
|
+
|
|
13138
|
+
setup(props, _ref) {
|
|
13139
|
+
let {
|
|
13140
|
+
slots
|
|
13141
|
+
} = _ref;
|
|
13142
|
+
const window = vue.inject(VWindowSymbol);
|
|
13143
|
+
const groupItem = useGroupItem(props, VWindowGroupSymbol);
|
|
13144
|
+
if (!window || !groupItem) throw new Error('[Vuetify] VWindowItem must be used inside VWindow');
|
|
13145
|
+
const isTransitioning = vue.ref(false);
|
|
13146
|
+
const hasTransition = vue.computed(() => window.isReversed.value ? props.reverseTransition !== false : props.transition !== false);
|
|
13147
|
+
|
|
13148
|
+
function onAfterTransition() {
|
|
13149
|
+
if (!isTransitioning.value || !window) {
|
|
13150
|
+
return;
|
|
13151
|
+
} // Finalize transition state.
|
|
13152
|
+
|
|
13153
|
+
|
|
13154
|
+
isTransitioning.value = false;
|
|
13155
|
+
|
|
13156
|
+
if (window.transitionCount.value > 0) {
|
|
13157
|
+
window.transitionCount.value -= 1; // Remove container height if we are out of transition.
|
|
13158
|
+
|
|
13159
|
+
if (window.transitionCount.value === 0) {
|
|
13160
|
+
window.transitionHeight.value = undefined;
|
|
13161
|
+
}
|
|
13162
|
+
}
|
|
13163
|
+
}
|
|
13164
|
+
|
|
13165
|
+
function onBeforeTransition() {
|
|
13166
|
+
if (isTransitioning.value || !window) {
|
|
13167
|
+
return;
|
|
13168
|
+
} // Initialize transition state here.
|
|
13169
|
+
|
|
13170
|
+
|
|
13171
|
+
isTransitioning.value = true;
|
|
13172
|
+
|
|
13173
|
+
if (window.transitionCount.value === 0) {
|
|
13174
|
+
var _window$rootRef$value;
|
|
13175
|
+
|
|
13176
|
+
// Set initial height for height transition.
|
|
13177
|
+
window.transitionHeight.value = convertToUnit((_window$rootRef$value = window.rootRef.value) == null ? void 0 : _window$rootRef$value.clientHeight);
|
|
13178
|
+
}
|
|
13179
|
+
|
|
13180
|
+
window.transitionCount.value += 1;
|
|
13181
|
+
}
|
|
13182
|
+
|
|
13183
|
+
function onTransitionCancelled() {
|
|
13184
|
+
onAfterTransition(); // This should have the same path as normal transition end.
|
|
13185
|
+
}
|
|
13186
|
+
|
|
13187
|
+
function onEnterTransition(el) {
|
|
13188
|
+
if (!isTransitioning.value) {
|
|
13189
|
+
return;
|
|
13190
|
+
}
|
|
13191
|
+
|
|
13192
|
+
vue.nextTick(() => {
|
|
13193
|
+
// Do not set height if no transition or cancelled.
|
|
13194
|
+
if (!hasTransition.value || !isTransitioning.value || !window) {
|
|
13195
|
+
return;
|
|
13196
|
+
} // Set transition target height.
|
|
13197
|
+
|
|
13198
|
+
|
|
13199
|
+
window.transitionHeight.value = convertToUnit(el.clientHeight);
|
|
13200
|
+
});
|
|
13201
|
+
}
|
|
13202
|
+
|
|
13203
|
+
const transition = vue.computed(() => {
|
|
13204
|
+
const name = window.isReversed.value ? props.reverseTransition : props.transition;
|
|
13205
|
+
return !hasTransition.value ? false : {
|
|
13206
|
+
name: typeof name !== 'string' ? window.transition.value : name,
|
|
13207
|
+
onBeforeEnter: onBeforeTransition,
|
|
13208
|
+
onAfterEnter: onAfterTransition,
|
|
13209
|
+
onEnterCancelled: onTransitionCancelled,
|
|
13210
|
+
onBeforeLeave: onBeforeTransition,
|
|
13211
|
+
onAfterLeave: onAfterTransition,
|
|
13212
|
+
onLeaveCancelled: onTransitionCancelled,
|
|
13213
|
+
onEnter: onEnterTransition
|
|
13214
|
+
};
|
|
13215
|
+
});
|
|
13216
|
+
const {
|
|
13217
|
+
hasContent
|
|
13218
|
+
} = useLazy(props, groupItem.isSelected);
|
|
13219
|
+
return () => {
|
|
13220
|
+
return vue.createVNode(MaybeTransition, {
|
|
13221
|
+
"transition": transition.value
|
|
13222
|
+
}, {
|
|
13223
|
+
default: () => [vue.withDirectives(vue.createVNode("div", {
|
|
13224
|
+
"class": ['v-window-item', groupItem.selectedClass.value]
|
|
13225
|
+
}, [slots.default && hasContent.value && slots.default()], 2), [[vue.vShow, groupItem.isSelected.value]])]
|
|
13226
|
+
}, 8, ["transition"]);
|
|
13227
|
+
};
|
|
13228
|
+
}
|
|
13229
|
+
|
|
13230
|
+
});
|
|
13231
|
+
|
|
13232
|
+
var components = /*#__PURE__*/Object.freeze({
|
|
13233
|
+
__proto__: null,
|
|
13234
|
+
VApp: VApp,
|
|
13235
|
+
VAppBar: VAppBar,
|
|
13236
|
+
VAppBarNavIcon: VAppBarNavIcon,
|
|
13237
|
+
VAppBarTitle: VAppBarTitle,
|
|
13238
|
+
VAlert: VAlert,
|
|
13239
|
+
VAvatar: VAvatar,
|
|
13240
|
+
VBadge: VBadge,
|
|
13241
|
+
VBanner: VBanner,
|
|
13242
|
+
VBannerActions: VBannerActions,
|
|
13243
|
+
VBannerAvatar: VBannerAvatar,
|
|
13244
|
+
VBannerContent: VBannerContent,
|
|
13245
|
+
VBannerText: VBannerText,
|
|
13246
|
+
VBottomNavigation: VBottomNavigation,
|
|
13247
|
+
VBreadcrumbs: VBreadcrumbs,
|
|
13248
|
+
VBreadcrumbsItem: VBreadcrumbsItem,
|
|
13249
|
+
VBreadcrumbsDivider: VBreadcrumbsDivider,
|
|
13250
|
+
VBtn: VBtn,
|
|
13251
|
+
VBtnGroup: VBtnGroup,
|
|
13252
|
+
VBtnToggle: VBtnToggle,
|
|
13253
|
+
VCard: VCard,
|
|
13254
|
+
VCardActions: VCardActions,
|
|
13255
|
+
VCardAvatar: VCardAvatar,
|
|
13256
|
+
VCardHeader: VCardHeader,
|
|
13257
|
+
VCardHeaderText: VCardHeaderText,
|
|
13258
|
+
VCardImg: VCardImg,
|
|
13259
|
+
VCardSubtitle: VCardSubtitle,
|
|
13260
|
+
VCardText: VCardText,
|
|
13261
|
+
VCardTitle: VCardTitle,
|
|
13262
|
+
VCheckbox: VCheckbox,
|
|
13263
|
+
VChip: VChip,
|
|
13264
|
+
VCode: VCode,
|
|
13265
|
+
VCounter: VCounter,
|
|
13266
|
+
VDefaultsProvider: VDefaultsProvider,
|
|
13267
|
+
VDialog: VDialog,
|
|
13268
|
+
VDivider: VDivider,
|
|
13269
|
+
VExpansionPanels: VExpansionPanels,
|
|
13270
|
+
VExpansionPanel: VExpansionPanel,
|
|
13271
|
+
VExpansionPanelText: VExpansionPanelText,
|
|
13272
|
+
VExpansionPanelTitle: VExpansionPanelTitle,
|
|
13273
|
+
VField: VField,
|
|
13274
|
+
VFieldLabel: VFieldLabel,
|
|
13275
|
+
VFileInput: VFileInput,
|
|
13276
|
+
VFooter: VFooter,
|
|
13277
|
+
VForm: VForm,
|
|
13278
|
+
VContainer: VContainer,
|
|
13279
|
+
VCol: VCol,
|
|
13280
|
+
VRow: VRow,
|
|
13281
|
+
VSpacer: VSpacer,
|
|
13282
|
+
VHover: VHover,
|
|
13283
|
+
VIcon: VIcon,
|
|
13284
|
+
VComponentIcon: VComponentIcon,
|
|
13285
|
+
VSvgIcon: VSvgIcon,
|
|
13286
|
+
VLigatureIcon: VLigatureIcon,
|
|
13287
|
+
VClassIcon: VClassIcon,
|
|
13288
|
+
VImg: VImg,
|
|
13289
|
+
VInput: VInput,
|
|
13290
|
+
VItemGroup: VItemGroup,
|
|
13291
|
+
VItem: VItem,
|
|
13292
|
+
VKbd: VKbd,
|
|
13293
|
+
VLabel: VLabel,
|
|
13294
|
+
VLayout: VLayout,
|
|
13295
|
+
VLayoutItem: VLayoutItem,
|
|
13296
|
+
VLazy: VLazy,
|
|
13297
|
+
VList: VList,
|
|
13298
|
+
VListSubheader: VListSubheader,
|
|
13299
|
+
VListImg: VListImg,
|
|
13300
|
+
VListItem: VListItem,
|
|
13301
|
+
VListItemAvatar: VListItemAvatar,
|
|
13302
|
+
VListItemHeader: VListItemHeader,
|
|
13303
|
+
VListItemMedia: VListItemMedia,
|
|
13304
|
+
VListItemSubtitle: VListItemSubtitle,
|
|
13305
|
+
VListItemTitle: VListItemTitle,
|
|
13306
|
+
VListGroup: VListGroup,
|
|
13307
|
+
VLocaleProvider: VLocaleProvider,
|
|
13308
|
+
VMain: VMain,
|
|
13309
|
+
VMenu: VMenu,
|
|
13310
|
+
VMessages: VMessages,
|
|
13311
|
+
VNavigationDrawer: VNavigationDrawer,
|
|
13312
|
+
VNoSsr: VNoSsr,
|
|
13313
|
+
VOverlay: VOverlay,
|
|
13314
|
+
VPagination: VPagination,
|
|
13315
|
+
VParallax: VParallax,
|
|
13316
|
+
VProgressCircular: VProgressCircular,
|
|
13317
|
+
VProgressLinear: VProgressLinear,
|
|
13318
|
+
VRadio: VRadio,
|
|
13319
|
+
VRadioGroup: VRadioGroup,
|
|
13320
|
+
VRangeSlider: VRangeSlider,
|
|
13321
|
+
VRating: VRating,
|
|
13322
|
+
VResponsive: VResponsive,
|
|
13323
|
+
VSelectionControl: VSelectionControl,
|
|
13324
|
+
VSelectionControlGroup: VSelectionControlGroup,
|
|
13325
|
+
VSheet: VSheet,
|
|
13326
|
+
VSlider: VSlider,
|
|
13327
|
+
VSwitch: VSwitch,
|
|
12888
13328
|
VSystemBar: VSystemBar,
|
|
12889
13329
|
VTable: VTable,
|
|
12890
13330
|
VTextarea: VTextarea,
|
|
@@ -12894,6 +13334,8 @@
|
|
|
12894
13334
|
VTimelineItem: VTimelineItem,
|
|
12895
13335
|
VTooltip: VTooltip,
|
|
12896
13336
|
VValidation: VValidation,
|
|
13337
|
+
VWindow: VWindow,
|
|
13338
|
+
VWindowItem: VWindowItem,
|
|
12897
13339
|
VDialogTransition: VDialogTransition,
|
|
12898
13340
|
VCarouselTransition: VCarouselTransition,
|
|
12899
13341
|
VCarouselReverseTransition: VCarouselReverseTransition,
|
|
@@ -12918,7 +13360,7 @@
|
|
|
12918
13360
|
});
|
|
12919
13361
|
|
|
12920
13362
|
// Types
|
|
12921
|
-
function mounted$
|
|
13363
|
+
function mounted$2(el, binding) {
|
|
12922
13364
|
var _modifierKeys$attr, _modifierKeys$char, _modifierKeys$child, _modifierKeys$sub;
|
|
12923
13365
|
|
|
12924
13366
|
const modifiers = binding.modifiers || {};
|
|
@@ -12945,7 +13387,7 @@
|
|
|
12945
13387
|
let mutations = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
12946
13388
|
let observer = arguments.length > 1 ? arguments[1] : undefined;
|
|
12947
13389
|
handler == null ? void 0 : handler(mutations, observer);
|
|
12948
|
-
if (once) unmounted$
|
|
13390
|
+
if (once) unmounted$2(el, binding);
|
|
12949
13391
|
});
|
|
12950
13392
|
if (immediate) handler == null ? void 0 : handler([], observer);
|
|
12951
13393
|
el._mutate = Object(el._mutate);
|
|
@@ -12955,7 +13397,7 @@
|
|
|
12955
13397
|
observer.observe(el, options);
|
|
12956
13398
|
}
|
|
12957
13399
|
|
|
12958
|
-
function unmounted$
|
|
13400
|
+
function unmounted$2(el, binding) {
|
|
12959
13401
|
var _el$_mutate;
|
|
12960
13402
|
|
|
12961
13403
|
if (!((_el$_mutate = el._mutate) != null && _el$_mutate[binding.instance.$.uid])) return;
|
|
@@ -12966,11 +13408,11 @@
|
|
|
12966
13408
|
}
|
|
12967
13409
|
|
|
12968
13410
|
const Mutate = {
|
|
12969
|
-
mounted: mounted$
|
|
12970
|
-
unmounted: unmounted$
|
|
13411
|
+
mounted: mounted$2,
|
|
13412
|
+
unmounted: unmounted$2
|
|
12971
13413
|
};
|
|
12972
13414
|
|
|
12973
|
-
function mounted$
|
|
13415
|
+
function mounted$1(el, binding) {
|
|
12974
13416
|
var _binding$modifiers, _binding$modifiers2;
|
|
12975
13417
|
|
|
12976
13418
|
const handler = binding.value;
|
|
@@ -12989,7 +13431,7 @@
|
|
|
12989
13431
|
}
|
|
12990
13432
|
}
|
|
12991
13433
|
|
|
12992
|
-
function unmounted$
|
|
13434
|
+
function unmounted$1(el, binding) {
|
|
12993
13435
|
var _el$_onResize;
|
|
12994
13436
|
|
|
12995
13437
|
if (!((_el$_onResize = el._onResize) != null && _el$_onResize[binding.instance.$.uid])) return;
|
|
@@ -13002,11 +13444,11 @@
|
|
|
13002
13444
|
}
|
|
13003
13445
|
|
|
13004
13446
|
const Resize = {
|
|
13005
|
-
mounted: mounted$
|
|
13006
|
-
unmounted: unmounted$
|
|
13447
|
+
mounted: mounted$1,
|
|
13448
|
+
unmounted: unmounted$1
|
|
13007
13449
|
};
|
|
13008
13450
|
|
|
13009
|
-
function mounted
|
|
13451
|
+
function mounted(el, binding) {
|
|
13010
13452
|
var _binding$modifiers;
|
|
13011
13453
|
|
|
13012
13454
|
const {
|
|
@@ -13029,7 +13471,7 @@
|
|
|
13029
13471
|
};
|
|
13030
13472
|
}
|
|
13031
13473
|
|
|
13032
|
-
function unmounted
|
|
13474
|
+
function unmounted(el, binding) {
|
|
13033
13475
|
var _el$_onScroll;
|
|
13034
13476
|
|
|
13035
13477
|
if (!((_el$_onScroll = el._onScroll) != null && _el$_onScroll[binding.instance.$.uid])) return;
|
|
@@ -13044,136 +13486,14 @@
|
|
|
13044
13486
|
|
|
13045
13487
|
function updated(el, binding) {
|
|
13046
13488
|
if (binding.value === binding.oldValue) return;
|
|
13047
|
-
unmounted
|
|
13048
|
-
mounted
|
|
13489
|
+
unmounted(el, binding);
|
|
13490
|
+
mounted(el, binding);
|
|
13049
13491
|
}
|
|
13050
13492
|
|
|
13051
13493
|
const Scroll = {
|
|
13052
|
-
mounted: mounted$1,
|
|
13053
|
-
unmounted: unmounted$1,
|
|
13054
|
-
updated
|
|
13055
|
-
};
|
|
13056
|
-
|
|
13057
|
-
// Types
|
|
13058
|
-
|
|
13059
|
-
const handleGesture = wrapper => {
|
|
13060
|
-
const {
|
|
13061
|
-
touchstartX,
|
|
13062
|
-
touchendX,
|
|
13063
|
-
touchstartY,
|
|
13064
|
-
touchendY
|
|
13065
|
-
} = wrapper;
|
|
13066
|
-
const dirRatio = 0.5;
|
|
13067
|
-
const minDistance = 16;
|
|
13068
|
-
wrapper.offsetX = touchendX - touchstartX;
|
|
13069
|
-
wrapper.offsetY = touchendY - touchstartY;
|
|
13070
|
-
|
|
13071
|
-
if (Math.abs(wrapper.offsetY) < dirRatio * Math.abs(wrapper.offsetX)) {
|
|
13072
|
-
wrapper.left && touchendX < touchstartX - minDistance && wrapper.left(wrapper);
|
|
13073
|
-
wrapper.right && touchendX > touchstartX + minDistance && wrapper.right(wrapper);
|
|
13074
|
-
}
|
|
13075
|
-
|
|
13076
|
-
if (Math.abs(wrapper.offsetX) < dirRatio * Math.abs(wrapper.offsetY)) {
|
|
13077
|
-
wrapper.up && touchendY < touchstartY - minDistance && wrapper.up(wrapper);
|
|
13078
|
-
wrapper.down && touchendY > touchstartY + minDistance && wrapper.down(wrapper);
|
|
13079
|
-
}
|
|
13080
|
-
};
|
|
13081
|
-
|
|
13082
|
-
function touchstart(event, wrapper) {
|
|
13083
|
-
var _wrapper$start;
|
|
13084
|
-
|
|
13085
|
-
const touch = event.changedTouches[0];
|
|
13086
|
-
wrapper.touchstartX = touch.clientX;
|
|
13087
|
-
wrapper.touchstartY = touch.clientY;
|
|
13088
|
-
(_wrapper$start = wrapper.start) == null ? void 0 : _wrapper$start.call(wrapper, { ...event,
|
|
13089
|
-
...wrapper
|
|
13090
|
-
});
|
|
13091
|
-
}
|
|
13092
|
-
|
|
13093
|
-
function touchend(event, wrapper) {
|
|
13094
|
-
var _wrapper$end;
|
|
13095
|
-
|
|
13096
|
-
const touch = event.changedTouches[0];
|
|
13097
|
-
wrapper.touchendX = touch.clientX;
|
|
13098
|
-
wrapper.touchendY = touch.clientY;
|
|
13099
|
-
(_wrapper$end = wrapper.end) == null ? void 0 : _wrapper$end.call(wrapper, { ...event,
|
|
13100
|
-
...wrapper
|
|
13101
|
-
});
|
|
13102
|
-
handleGesture(wrapper);
|
|
13103
|
-
}
|
|
13104
|
-
|
|
13105
|
-
function touchmove(event, wrapper) {
|
|
13106
|
-
var _wrapper$move;
|
|
13107
|
-
|
|
13108
|
-
const touch = event.changedTouches[0];
|
|
13109
|
-
wrapper.touchmoveX = touch.clientX;
|
|
13110
|
-
wrapper.touchmoveY = touch.clientY;
|
|
13111
|
-
(_wrapper$move = wrapper.move) == null ? void 0 : _wrapper$move.call(wrapper, { ...event,
|
|
13112
|
-
...wrapper
|
|
13113
|
-
});
|
|
13114
|
-
}
|
|
13115
|
-
|
|
13116
|
-
function createHandlers() {
|
|
13117
|
-
let value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
13118
|
-
const wrapper = {
|
|
13119
|
-
touchstartX: 0,
|
|
13120
|
-
touchstartY: 0,
|
|
13121
|
-
touchendX: 0,
|
|
13122
|
-
touchendY: 0,
|
|
13123
|
-
touchmoveX: 0,
|
|
13124
|
-
touchmoveY: 0,
|
|
13125
|
-
offsetX: 0,
|
|
13126
|
-
offsetY: 0,
|
|
13127
|
-
left: value.left,
|
|
13128
|
-
right: value.right,
|
|
13129
|
-
up: value.up,
|
|
13130
|
-
down: value.down,
|
|
13131
|
-
start: value.start,
|
|
13132
|
-
move: value.move,
|
|
13133
|
-
end: value.end
|
|
13134
|
-
};
|
|
13135
|
-
return {
|
|
13136
|
-
touchstart: e => touchstart(e, wrapper),
|
|
13137
|
-
touchend: e => touchend(e, wrapper),
|
|
13138
|
-
touchmove: e => touchmove(e, wrapper)
|
|
13139
|
-
};
|
|
13140
|
-
}
|
|
13141
|
-
|
|
13142
|
-
function mounted(el, binding) {
|
|
13143
|
-
var _value$options, _binding$instance, _target$_touchHandler;
|
|
13144
|
-
|
|
13145
|
-
const value = binding.value;
|
|
13146
|
-
const target = value != null && value.parent ? el.parentElement : el;
|
|
13147
|
-
const options = (_value$options = value == null ? void 0 : value.options) != null ? _value$options : {
|
|
13148
|
-
passive: true
|
|
13149
|
-
};
|
|
13150
|
-
const uid = (_binding$instance = binding.instance) == null ? void 0 : _binding$instance.$.uid; // TODO: use custom uid generator
|
|
13151
|
-
|
|
13152
|
-
if (!target || !uid) return;
|
|
13153
|
-
const handlers = createHandlers(binding.value);
|
|
13154
|
-
target._touchHandlers = (_target$_touchHandler = target._touchHandlers) != null ? _target$_touchHandler : Object.create(null);
|
|
13155
|
-
target._touchHandlers[uid] = handlers;
|
|
13156
|
-
keys(handlers).forEach(eventName => {
|
|
13157
|
-
target.addEventListener(eventName, handlers[eventName], options);
|
|
13158
|
-
});
|
|
13159
|
-
}
|
|
13160
|
-
|
|
13161
|
-
function unmounted(el, binding) {
|
|
13162
|
-
var _binding$value, _binding$instance2;
|
|
13163
|
-
|
|
13164
|
-
const target = (_binding$value = binding.value) != null && _binding$value.parent ? el.parentElement : el;
|
|
13165
|
-
const uid = (_binding$instance2 = binding.instance) == null ? void 0 : _binding$instance2.$.uid;
|
|
13166
|
-
if (!(target != null && target._touchHandlers) || !uid) return;
|
|
13167
|
-
const handlers = target._touchHandlers[uid];
|
|
13168
|
-
keys(handlers).forEach(eventName => {
|
|
13169
|
-
target.removeEventListener(eventName, handlers[eventName]);
|
|
13170
|
-
});
|
|
13171
|
-
delete target._touchHandlers[uid];
|
|
13172
|
-
}
|
|
13173
|
-
|
|
13174
|
-
const Touch = {
|
|
13175
13494
|
mounted,
|
|
13176
|
-
unmounted
|
|
13495
|
+
unmounted,
|
|
13496
|
+
updated
|
|
13177
13497
|
};
|
|
13178
13498
|
|
|
13179
13499
|
var directives = /*#__PURE__*/Object.freeze({
|
|
@@ -13312,7 +13632,7 @@
|
|
|
13312
13632
|
...options
|
|
13313
13633
|
});
|
|
13314
13634
|
};
|
|
13315
|
-
const version = "3.0.0-next-
|
|
13635
|
+
const version = "3.0.0-next-20220126.0";
|
|
13316
13636
|
|
|
13317
13637
|
exports.components = components;
|
|
13318
13638
|
exports.createVuetify = createVuetify;
|