@vuetify/nightly 3.3.10-master.2023-08-01 → 3.3.11-dev.2023-08-07
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 +18 -10
- package/dist/_component-variables-labs.sass +3 -1
- package/dist/json/attributes.json +244 -8
- package/dist/json/importMap-labs.json +28 -0
- package/dist/json/importMap.json +8 -8
- package/dist/json/tags.json +91 -0
- package/dist/json/web-types.json +793 -9
- package/dist/vuetify-labs.css +1403 -200
- package/dist/vuetify-labs.d.ts +2962 -356
- package/dist/vuetify-labs.esm.js +712 -48
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +712 -48
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +1055 -11
- package/dist/vuetify.d.ts +232 -83
- package/dist/vuetify.esm.js +131 -47
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +131 -47
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +774 -767
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.mjs +11 -8
- package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
- package/lib/components/VAutocomplete/index.d.mts +12 -6
- package/lib/components/VAvatar/VAvatar.mjs +2 -1
- package/lib/components/VAvatar/VAvatar.mjs.map +1 -1
- package/lib/components/VAvatar/index.d.mts +6 -0
- package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs +9 -4
- package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs.map +1 -1
- package/lib/components/VBreadcrumbs/index.d.mts +28 -2
- package/lib/components/VCarousel/index.d.mts +24 -10
- package/lib/components/VCheckbox/index.d.mts +12 -0
- package/lib/components/VCombobox/VCombobox.mjs +9 -3
- package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
- package/lib/components/VCombobox/index.d.mts +12 -6
- package/lib/components/VDialog/VDialog.css +15 -6
- package/lib/components/VDialog/VDialog.sass +41 -35
- package/lib/components/VField/VField.css +6 -2
- package/lib/components/VField/VField.sass +6 -2
- package/lib/components/VField/index.d.mts +4 -4
- package/lib/components/VFileInput/index.d.mts +4 -4
- package/lib/components/VImg/VImg.mjs +7 -1
- package/lib/components/VImg/VImg.mjs.map +1 -1
- package/lib/components/VImg/index.d.mts +12 -0
- package/lib/components/VList/index.d.mts +12 -12
- package/lib/components/VMenu/VMenu.mjs +29 -4
- package/lib/components/VMenu/VMenu.mjs.map +1 -1
- package/lib/components/VRadio/index.d.mts +6 -0
- package/lib/components/VRangeSlider/VRangeSlider.mjs +4 -2
- package/lib/components/VRangeSlider/VRangeSlider.mjs.map +1 -1
- package/lib/components/VRangeSlider/index.d.mts +14 -0
- package/lib/components/VRating/VRating.mjs +4 -2
- package/lib/components/VRating/VRating.mjs.map +1 -1
- package/lib/components/VSelect/VSelect.mjs +10 -3
- package/lib/components/VSelect/VSelect.mjs.map +1 -1
- package/lib/components/VSelect/index.d.mts +12 -6
- package/lib/components/VSelectionControl/VSelectionControl.mjs +3 -1
- package/lib/components/VSelectionControl/VSelectionControl.mjs.map +1 -1
- package/lib/components/VSelectionControl/index.d.mts +6 -0
- package/lib/components/VSlider/VSlider.mjs +2 -1
- package/lib/components/VSlider/VSlider.mjs.map +1 -1
- package/lib/components/VSlider/index.d.mts +14 -0
- package/lib/components/VSlider/slider.mjs +5 -1
- package/lib/components/VSlider/slider.mjs.map +1 -1
- package/lib/components/VSwitch/VSwitch.css +3 -0
- package/lib/components/VSwitch/VSwitch.sass +3 -0
- package/lib/components/VSwitch/_variables.scss +1 -0
- package/lib/components/VSwitch/index.d.mts +6 -0
- package/lib/components/VTable/VTable.css +2 -0
- package/lib/components/VTable/VTable.sass +2 -0
- package/lib/components/VTextField/index.d.mts +16 -16
- package/lib/components/VTextarea/index.d.mts +4 -4
- package/lib/components/VTimeline/VTimeline.css +2 -2
- package/lib/components/VTimeline/VTimeline.sass +2 -2
- package/lib/components/VWindow/VWindow.mjs +1 -0
- package/lib/components/VWindow/VWindow.mjs.map +1 -1
- package/lib/components/VWindow/VWindowItem.mjs +3 -1
- package/lib/components/VWindow/VWindowItem.mjs.map +1 -1
- package/lib/components/VWindow/index.d.mts +29 -11
- package/lib/components/index.d.mts +223 -81
- package/lib/composables/group.mjs +1 -1
- package/lib/composables/group.mjs.map +1 -1
- package/lib/composables/theme.mjs +12 -6
- package/lib/composables/theme.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.mts +9 -2
- package/lib/labs/VDateInput/index.d.mts +4 -4
- package/lib/labs/VDateRangePicker/VDateRangePickerHeader.mjs +2 -2
- package/lib/labs/VDateRangePicker/VDateRangePickerHeader.mjs.map +1 -1
- package/lib/labs/VInfiniteScroll/VInfiniteScroll.mjs +0 -1
- package/lib/labs/VInfiniteScroll/VInfiniteScroll.mjs.map +1 -1
- package/lib/labs/VOtpInput/VOtpInput.css +53 -0
- package/lib/labs/VOtpInput/VOtpInput.mjs +215 -0
- package/lib/labs/VOtpInput/VOtpInput.mjs.map +1 -0
- package/lib/labs/VOtpInput/VOtpInput.sass +55 -0
- package/lib/labs/VOtpInput/_variables.scss +2 -0
- package/lib/labs/VOtpInput/index.d.mts +459 -0
- package/lib/labs/VOtpInput/index.mjs +2 -0
- package/lib/labs/VOtpInput/index.mjs.map +1 -0
- package/lib/labs/VStepper/VStepper.css +42 -0
- package/lib/labs/VStepper/VStepper.mjs +150 -0
- package/lib/labs/VStepper/VStepper.mjs.map +1 -0
- package/lib/labs/VStepper/VStepper.sass +44 -0
- package/lib/labs/VStepper/VStepperActions.mjs +61 -0
- package/lib/labs/VStepper/VStepperActions.mjs.map +1 -0
- package/lib/labs/VStepper/VStepperHeader.mjs +4 -0
- package/lib/labs/VStepper/VStepperHeader.mjs.map +1 -0
- package/lib/labs/VStepper/VStepperItem.css +67 -0
- package/lib/labs/VStepper/VStepperItem.mjs +114 -0
- package/lib/labs/VStepper/VStepperItem.mjs.map +1 -0
- package/lib/labs/VStepper/VStepperItem.sass +71 -0
- package/lib/labs/VStepper/VStepperWindow.mjs +50 -0
- package/lib/labs/VStepper/VStepperWindow.mjs.map +1 -0
- package/lib/labs/VStepper/VStepperWindowItem.mjs +24 -0
- package/lib/labs/VStepper/VStepperWindowItem.mjs.map +1 -0
- package/lib/labs/VStepper/_variables.scss +4 -0
- package/lib/labs/VStepper/index.d.mts +2045 -0
- package/lib/labs/VStepper/index.mjs +7 -0
- package/lib/labs/VStepper/index.mjs.map +1 -0
- package/lib/labs/components.d.mts +2745 -267
- package/lib/labs/components.mjs +2 -0
- package/lib/labs/components.mjs.map +1 -1
- package/lib/locale/af.mjs +6 -1
- package/lib/locale/af.mjs.map +1 -1
- package/lib/locale/ar.mjs +6 -1
- package/lib/locale/ar.mjs.map +1 -1
- package/lib/locale/az.mjs +6 -1
- package/lib/locale/az.mjs.map +1 -1
- package/lib/locale/bg.mjs +6 -1
- package/lib/locale/bg.mjs.map +1 -1
- package/lib/locale/ca.mjs +6 -1
- package/lib/locale/ca.mjs.map +1 -1
- package/lib/locale/ckb.mjs +6 -1
- package/lib/locale/ckb.mjs.map +1 -1
- package/lib/locale/cs.mjs +6 -1
- package/lib/locale/cs.mjs.map +1 -1
- package/lib/locale/da.mjs +6 -1
- package/lib/locale/da.mjs.map +1 -1
- package/lib/locale/de.mjs +6 -1
- package/lib/locale/de.mjs.map +1 -1
- package/lib/locale/el.mjs +6 -1
- package/lib/locale/el.mjs.map +1 -1
- package/lib/locale/en.mjs +6 -1
- package/lib/locale/en.mjs.map +1 -1
- package/lib/locale/es.mjs +6 -1
- package/lib/locale/es.mjs.map +1 -1
- package/lib/locale/et.mjs +6 -1
- package/lib/locale/et.mjs.map +1 -1
- package/lib/locale/fa.mjs +6 -1
- package/lib/locale/fa.mjs.map +1 -1
- package/lib/locale/fi.mjs +6 -1
- package/lib/locale/fi.mjs.map +1 -1
- package/lib/locale/fr.mjs +6 -1
- package/lib/locale/fr.mjs.map +1 -1
- package/lib/locale/he.mjs +6 -1
- package/lib/locale/he.mjs.map +1 -1
- package/lib/locale/hr.mjs +6 -1
- package/lib/locale/hr.mjs.map +1 -1
- package/lib/locale/hu.mjs +6 -1
- package/lib/locale/hu.mjs.map +1 -1
- package/lib/locale/id.mjs +6 -1
- package/lib/locale/id.mjs.map +1 -1
- package/lib/locale/index.d.mts +210 -0
- package/lib/locale/it.mjs +6 -1
- package/lib/locale/it.mjs.map +1 -1
- package/lib/locale/ja.mjs +6 -1
- package/lib/locale/ja.mjs.map +1 -1
- package/lib/locale/ko.mjs +6 -1
- package/lib/locale/ko.mjs.map +1 -1
- package/lib/locale/lt.mjs +6 -1
- package/lib/locale/lt.mjs.map +1 -1
- package/lib/locale/lv.mjs +6 -1
- package/lib/locale/lv.mjs.map +1 -1
- package/lib/locale/nl.mjs +6 -1
- package/lib/locale/nl.mjs.map +1 -1
- package/lib/locale/no.mjs +6 -1
- package/lib/locale/no.mjs.map +1 -1
- package/lib/locale/pl.mjs +6 -1
- package/lib/locale/pl.mjs.map +1 -1
- package/lib/locale/pt.mjs +6 -1
- package/lib/locale/pt.mjs.map +1 -1
- package/lib/locale/ro.mjs +23 -18
- package/lib/locale/ro.mjs.map +1 -1
- package/lib/locale/ru.mjs +6 -1
- package/lib/locale/ru.mjs.map +1 -1
- package/lib/locale/sk.mjs +6 -1
- package/lib/locale/sk.mjs.map +1 -1
- package/lib/locale/sl.mjs +6 -1
- package/lib/locale/sl.mjs.map +1 -1
- package/lib/locale/sr-Cyrl.mjs +6 -1
- package/lib/locale/sr-Cyrl.mjs.map +1 -1
- package/lib/locale/sr-Latn.mjs +6 -1
- package/lib/locale/sr-Latn.mjs.map +1 -1
- package/lib/locale/sv.mjs +6 -1
- package/lib/locale/sv.mjs.map +1 -1
- package/lib/locale/th.mjs +6 -1
- package/lib/locale/th.mjs.map +1 -1
- package/lib/locale/tr.mjs +6 -1
- package/lib/locale/tr.mjs.map +1 -1
- package/lib/locale/uk.mjs +6 -1
- package/lib/locale/uk.mjs.map +1 -1
- package/lib/locale/vi.mjs +6 -1
- package/lib/locale/vi.mjs.map +1 -1
- package/lib/locale/zh-Hans.mjs +6 -1
- package/lib/locale/zh-Hans.mjs.map +1 -1
- package/lib/locale/zh-Hant.mjs +6 -1
- package/lib/locale/zh-Hant.mjs.map +1 -1
- package/lib/styles/main.css +1026 -0
- package/lib/styles/settings/_utilities.scss +20 -0
- package/lib/util/helpers.mjs +20 -9
- package/lib/util/helpers.mjs.map +1 -1
- package/package.json +1 -1
package/dist/vuetify-labs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Vuetify v3.3.
|
|
2
|
+
* Vuetify v3.3.11-dev.2023-08-07
|
|
3
3
|
* Forged by John Leider
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -228,6 +228,11 @@
|
|
|
228
228
|
exclude.forEach(prop => delete clone[prop]);
|
|
229
229
|
return clone;
|
|
230
230
|
}
|
|
231
|
+
function only(obj, include) {
|
|
232
|
+
const clone = {};
|
|
233
|
+
include.forEach(prop => clone[prop] = obj[prop]);
|
|
234
|
+
return clone;
|
|
235
|
+
}
|
|
231
236
|
|
|
232
237
|
/**
|
|
233
238
|
* Filter attributes that should be applied to
|
|
@@ -411,12 +416,22 @@
|
|
|
411
416
|
}
|
|
412
417
|
}
|
|
413
418
|
function focusableChildren(el) {
|
|
414
|
-
|
|
419
|
+
let filterByTabIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
420
|
+
const targets = ['button', '[href]', 'input:not([type="hidden"])', 'select', 'textarea', '[tabindex]'].map(s => `${s}${filterByTabIndex ? ':not([tabindex="-1"])' : ''}:not([disabled])`).join(', ');
|
|
415
421
|
return [...el.querySelectorAll(targets)];
|
|
416
422
|
}
|
|
423
|
+
function getNextElement(elements, location, condition) {
|
|
424
|
+
let _el;
|
|
425
|
+
let idx = elements.indexOf(document.activeElement);
|
|
426
|
+
const inc = location === 'next' ? 1 : -1;
|
|
427
|
+
do {
|
|
428
|
+
idx += inc;
|
|
429
|
+
_el = elements[idx];
|
|
430
|
+
} while ((!_el || _el.offsetParent == null || !(condition?.(_el) ?? true)) && idx < elements.length && idx >= 0);
|
|
431
|
+
return _el;
|
|
432
|
+
}
|
|
417
433
|
function focusChild(el, location) {
|
|
418
434
|
const focusable = focusableChildren(el);
|
|
419
|
-
const idx = focusable.indexOf(document.activeElement);
|
|
420
435
|
if (!location) {
|
|
421
436
|
if (el === document.activeElement || !el.contains(document.activeElement)) {
|
|
422
437
|
focusable[0]?.focus();
|
|
@@ -425,14 +440,10 @@
|
|
|
425
440
|
focusable[0]?.focus();
|
|
426
441
|
} else if (location === 'last') {
|
|
427
442
|
focusable.at(-1)?.focus();
|
|
443
|
+
} else if (typeof location === 'number') {
|
|
444
|
+
focusable[location]?.focus();
|
|
428
445
|
} else {
|
|
429
|
-
|
|
430
|
-
let idxx = idx;
|
|
431
|
-
const inc = location === 'next' ? 1 : -1;
|
|
432
|
-
do {
|
|
433
|
-
idxx += inc;
|
|
434
|
-
_el = focusable[idxx];
|
|
435
|
-
} while ((!_el || _el.offsetParent == null) && idxx < focusable.length && idxx >= 0);
|
|
446
|
+
const _el = getNextElement(focusable, location);
|
|
436
447
|
if (_el) _el.focus();else focusChild(el, location === 'next' ? 'first' : 'last');
|
|
437
448
|
}
|
|
438
449
|
}
|
|
@@ -1702,7 +1713,8 @@
|
|
|
1702
1713
|
input: {
|
|
1703
1714
|
clear: 'Clear {0}',
|
|
1704
1715
|
prependAction: '{0} prepended action',
|
|
1705
|
-
appendAction: '{0} appended action'
|
|
1716
|
+
appendAction: '{0} appended action',
|
|
1717
|
+
otp: 'Please enter OTP character {0}'
|
|
1706
1718
|
},
|
|
1707
1719
|
fileInput: {
|
|
1708
1720
|
counter: '{0} files',
|
|
@@ -1723,6 +1735,10 @@
|
|
|
1723
1735
|
last: 'Last page'
|
|
1724
1736
|
}
|
|
1725
1737
|
},
|
|
1738
|
+
stepper: {
|
|
1739
|
+
next: 'Next',
|
|
1740
|
+
prev: 'Previous'
|
|
1741
|
+
},
|
|
1726
1742
|
rating: {
|
|
1727
1743
|
ariaLabel: {
|
|
1728
1744
|
item: 'Rating {0} of {1}'
|
|
@@ -2261,9 +2277,11 @@
|
|
|
2261
2277
|
if (head) {
|
|
2262
2278
|
if (head.push) {
|
|
2263
2279
|
const entry = head.push(getHead);
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2280
|
+
if (IN_BROWSER) {
|
|
2281
|
+
vue.watch(styles, () => {
|
|
2282
|
+
entry.patch(getHead);
|
|
2283
|
+
});
|
|
2284
|
+
}
|
|
2267
2285
|
} else {
|
|
2268
2286
|
if (IN_BROWSER) {
|
|
2269
2287
|
head.addHeadObjs(vue.computed(getHead));
|
|
@@ -2274,9 +2292,13 @@
|
|
|
2274
2292
|
}
|
|
2275
2293
|
} else {
|
|
2276
2294
|
let styleEl = IN_BROWSER ? document.getElementById('vuetify-theme-stylesheet') : null;
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2295
|
+
if (IN_BROWSER) {
|
|
2296
|
+
vue.watch(styles, updateStyles, {
|
|
2297
|
+
immediate: true
|
|
2298
|
+
});
|
|
2299
|
+
} else {
|
|
2300
|
+
updateStyles();
|
|
2301
|
+
}
|
|
2280
2302
|
function updateStyles() {
|
|
2281
2303
|
if (typeof document !== 'undefined' && !styleEl) {
|
|
2282
2304
|
const el = document.createElement('style');
|
|
@@ -2974,6 +2996,8 @@
|
|
|
2974
2996
|
type: [String, Object],
|
|
2975
2997
|
default: ''
|
|
2976
2998
|
},
|
|
2999
|
+
crossorigin: String,
|
|
3000
|
+
referrerpolicy: String,
|
|
2977
3001
|
srcset: String,
|
|
2978
3002
|
...makeVResponsiveProps(),
|
|
2979
3003
|
...makeComponentProps(),
|
|
@@ -3098,6 +3122,8 @@
|
|
|
3098
3122
|
"src": normalisedSrc.value.src,
|
|
3099
3123
|
"srcset": normalisedSrc.value.srcset,
|
|
3100
3124
|
"alt": props.alt,
|
|
3125
|
+
"crossorigin": props.crossorigin,
|
|
3126
|
+
"referrerpolicy": props.referrerpolicy,
|
|
3101
3127
|
"sizes": props.sizes,
|
|
3102
3128
|
"ref": image,
|
|
3103
3129
|
"onLoad": onLoad,
|
|
@@ -3119,7 +3145,9 @@
|
|
|
3119
3145
|
default: () => [normalisedSrc.value.lazySrc && state.value !== 'loaded' && vue.createVNode("img", {
|
|
3120
3146
|
"class": ['v-img__img', 'v-img__img--preload', containClasses.value],
|
|
3121
3147
|
"src": normalisedSrc.value.lazySrc,
|
|
3122
|
-
"alt": props.alt
|
|
3148
|
+
"alt": props.alt,
|
|
3149
|
+
"crossorigin": props.crossorigin,
|
|
3150
|
+
"referrerpolicy": props.referrerpolicy
|
|
3123
3151
|
}, null)]
|
|
3124
3152
|
});
|
|
3125
3153
|
const __placeholder = () => {
|
|
@@ -3881,7 +3909,7 @@
|
|
|
3881
3909
|
throw new Error(`[Vuetify] Could not find useGroup injection with symbol ${injectKey.description}`);
|
|
3882
3910
|
}
|
|
3883
3911
|
const value = vue.toRef(props, 'value');
|
|
3884
|
-
const disabled = vue.computed(() => group.disabled.value || props.disabled);
|
|
3912
|
+
const disabled = vue.computed(() => !!(group.disabled.value || props.disabled));
|
|
3885
3913
|
group.register({
|
|
3886
3914
|
id,
|
|
3887
3915
|
value,
|
|
@@ -5728,6 +5756,7 @@
|
|
|
5728
5756
|
|
|
5729
5757
|
const makeVSelectionControlProps = propsFactory({
|
|
5730
5758
|
label: String,
|
|
5759
|
+
baseColor: String,
|
|
5731
5760
|
trueValue: null,
|
|
5732
5761
|
falseValue: null,
|
|
5733
5762
|
value: null,
|
|
@@ -5766,7 +5795,8 @@
|
|
|
5766
5795
|
textColorClasses,
|
|
5767
5796
|
textColorStyles
|
|
5768
5797
|
} = useTextColor(vue.computed(() => {
|
|
5769
|
-
|
|
5798
|
+
if (props.error || props.disabled) return undefined;
|
|
5799
|
+
return model.value ? props.color : props.baseColor;
|
|
5770
5800
|
}));
|
|
5771
5801
|
const icon = vue.computed(() => model.value ? props.trueIcon : props.falseIcon);
|
|
5772
5802
|
return {
|
|
@@ -6546,6 +6576,7 @@
|
|
|
6546
6576
|
end: Boolean,
|
|
6547
6577
|
icon: IconValue,
|
|
6548
6578
|
image: String,
|
|
6579
|
+
text: String,
|
|
6549
6580
|
...makeComponentProps(),
|
|
6550
6581
|
...makeDensityProps(),
|
|
6551
6582
|
...makeRoundedProps(),
|
|
@@ -6596,7 +6627,7 @@
|
|
|
6596
6627
|
}, null) : props.icon ? vue.createVNode(VIcon, {
|
|
6597
6628
|
"key": "icon",
|
|
6598
6629
|
"icon": props.icon
|
|
6599
|
-
}, null) : slots.default?.(), genOverlays(false, 'v-avatar')]
|
|
6630
|
+
}, null) : slots.default?.() ?? props.text, genOverlays(false, 'v-avatar')]
|
|
6600
6631
|
}));
|
|
6601
6632
|
return {};
|
|
6602
6633
|
}
|
|
@@ -9834,8 +9865,30 @@
|
|
|
9834
9865
|
}, 40);
|
|
9835
9866
|
}
|
|
9836
9867
|
});
|
|
9868
|
+
function onFocusIn(e) {
|
|
9869
|
+
const before = e.relatedTarget;
|
|
9870
|
+
const after = e.target;
|
|
9871
|
+
if (before !== after && overlay.value?.contentEl &&
|
|
9872
|
+
// We're the topmost menu
|
|
9873
|
+
overlay.value?.globalTop &&
|
|
9874
|
+
// It isn't the document or the menu body
|
|
9875
|
+
![document, overlay.value.contentEl].includes(after) &&
|
|
9876
|
+
// It isn't inside the menu body
|
|
9877
|
+
!overlay.value.contentEl.contains(after)) {
|
|
9878
|
+
const focusable = focusableChildren(overlay.value.contentEl);
|
|
9879
|
+
focusable[0]?.focus();
|
|
9880
|
+
}
|
|
9881
|
+
}
|
|
9837
9882
|
vue.watch(isActive, val => {
|
|
9838
|
-
|
|
9883
|
+
if (val) {
|
|
9884
|
+
parent?.register();
|
|
9885
|
+
document.addEventListener('focusin', onFocusIn, {
|
|
9886
|
+
once: true
|
|
9887
|
+
});
|
|
9888
|
+
} else {
|
|
9889
|
+
parent?.unregister();
|
|
9890
|
+
document.removeEventListener('focusin', onFocusIn);
|
|
9891
|
+
}
|
|
9839
9892
|
});
|
|
9840
9893
|
function onClickOutside() {
|
|
9841
9894
|
parent?.closeParents();
|
|
@@ -9843,8 +9896,11 @@
|
|
|
9843
9896
|
function onKeydown(e) {
|
|
9844
9897
|
if (props.disabled) return;
|
|
9845
9898
|
if (e.key === 'Tab') {
|
|
9846
|
-
|
|
9847
|
-
|
|
9899
|
+
const nextElement = getNextElement(focusableChildren(overlay.value?.contentEl, false), e.shiftKey ? 'prev' : 'next', el => el.tabIndex >= 0);
|
|
9900
|
+
if (!nextElement) {
|
|
9901
|
+
isActive.value = false;
|
|
9902
|
+
overlay.value?.activatorEl?.focus();
|
|
9903
|
+
}
|
|
9848
9904
|
}
|
|
9849
9905
|
}
|
|
9850
9906
|
function onActivatorKeydown(e) {
|
|
@@ -10758,6 +10814,7 @@
|
|
|
10758
10814
|
type: Function,
|
|
10759
10815
|
default: deepEqual
|
|
10760
10816
|
},
|
|
10817
|
+
itemColor: String,
|
|
10761
10818
|
...makeItemsProps({
|
|
10762
10819
|
itemChildren: false
|
|
10763
10820
|
})
|
|
@@ -10810,7 +10867,12 @@
|
|
|
10810
10867
|
const form = useForm();
|
|
10811
10868
|
const selections = vue.computed(() => {
|
|
10812
10869
|
return model.value.map(v => {
|
|
10813
|
-
return items.value.find(item =>
|
|
10870
|
+
return items.value.find(item => {
|
|
10871
|
+
const itemRawValue = getPropertyFromItem(item.raw, props.itemValue);
|
|
10872
|
+
const modelRawValue = getPropertyFromItem(v.raw, props.itemValue);
|
|
10873
|
+
if (itemRawValue === undefined || modelRawValue === undefined) return false;
|
|
10874
|
+
return props.returnObject ? props.valueComparator(itemRawValue, modelRawValue) : props.valueComparator(item.value, v.value);
|
|
10875
|
+
}) || v;
|
|
10814
10876
|
});
|
|
10815
10877
|
});
|
|
10816
10878
|
const selected = vue.computed(() => selections.value.map(selection => selection.props.value));
|
|
@@ -10966,7 +11028,8 @@
|
|
|
10966
11028
|
"onKeydown": onListKeydown,
|
|
10967
11029
|
"onFocusin": onFocusin,
|
|
10968
11030
|
"onScrollPassive": onListScroll,
|
|
10969
|
-
"tabindex": "-1"
|
|
11031
|
+
"tabindex": "-1",
|
|
11032
|
+
"color": props.itemColor ?? props.color
|
|
10970
11033
|
}, {
|
|
10971
11034
|
default: () => [slots['prepend-item']?.(), !displayItems.value.length && !props.hideNoData && (slots['no-data']?.() ?? vue.createVNode(VListItem, {
|
|
10972
11035
|
"title": t(props.noDataText)
|
|
@@ -11261,7 +11324,12 @@
|
|
|
11261
11324
|
} = useFilter(props, items, () => isPristine.value ? '' : search.value);
|
|
11262
11325
|
const selections = vue.computed(() => {
|
|
11263
11326
|
return model.value.map(v => {
|
|
11264
|
-
return items.value.find(item =>
|
|
11327
|
+
return items.value.find(item => {
|
|
11328
|
+
const itemRawValue = getPropertyFromItem(item.raw, props.itemValue);
|
|
11329
|
+
const modelRawValue = getPropertyFromItem(v.raw, props.itemValue);
|
|
11330
|
+
if (itemRawValue === undefined || modelRawValue === undefined) return false;
|
|
11331
|
+
return props.returnObject ? props.valueComparator(itemRawValue, modelRawValue) : props.valueComparator(item.value, v.value);
|
|
11332
|
+
}) || v;
|
|
11265
11333
|
});
|
|
11266
11334
|
});
|
|
11267
11335
|
const displayItems = vue.computed(() => {
|
|
@@ -11313,11 +11381,8 @@
|
|
|
11313
11381
|
if (['Escape'].includes(e.key)) {
|
|
11314
11382
|
menu.value = false;
|
|
11315
11383
|
}
|
|
11316
|
-
if (['Enter', '
|
|
11317
|
-
|
|
11318
|
-
select(filteredItems.value[0]);
|
|
11319
|
-
}
|
|
11320
|
-
isPristine.value = true;
|
|
11384
|
+
if (highlightFirst.value && ['Enter', 'Tab'].includes(e.key)) {
|
|
11385
|
+
select(filteredItems.value[0]);
|
|
11321
11386
|
}
|
|
11322
11387
|
if (e.key === 'ArrowDown' && highlightFirst.value) {
|
|
11323
11388
|
listRef.value?.focus('next');
|
|
@@ -11483,7 +11548,8 @@
|
|
|
11483
11548
|
"onFocusin": onFocusin,
|
|
11484
11549
|
"onFocusout": onFocusout,
|
|
11485
11550
|
"onScrollPassive": onListScroll,
|
|
11486
|
-
"tabindex": "-1"
|
|
11551
|
+
"tabindex": "-1",
|
|
11552
|
+
"color": props.itemColor ?? props.color
|
|
11487
11553
|
}, {
|
|
11488
11554
|
default: () => [slots['prepend-item']?.(), !displayItems.value.length && !props.hideNoData && (slots['no-data']?.() ?? vue.createVNode(VListItem, {
|
|
11489
11555
|
"title": t(props.noDataText)
|
|
@@ -12104,12 +12170,17 @@
|
|
|
12104
12170
|
item,
|
|
12105
12171
|
raw
|
|
12106
12172
|
} = _ref2;
|
|
12107
|
-
return vue.createVNode(vue.Fragment, null, [
|
|
12108
|
-
|
|
12173
|
+
return vue.createVNode(vue.Fragment, null, [slots.item?.({
|
|
12174
|
+
item,
|
|
12175
|
+
index
|
|
12176
|
+
}) ?? vue.createVNode(VBreadcrumbsItem, vue.mergeProps({
|
|
12177
|
+
"key": index,
|
|
12109
12178
|
"disabled": index >= array.length - 1
|
|
12110
|
-
}, item
|
|
12179
|
+
}, typeof item === 'string' ? {
|
|
12180
|
+
title: item
|
|
12181
|
+
} : item), {
|
|
12111
12182
|
default: slots.title ? () => slots.title?.({
|
|
12112
|
-
item
|
|
12183
|
+
item,
|
|
12113
12184
|
index
|
|
12114
12185
|
}) : undefined
|
|
12115
12186
|
}), index < array.length - 1 && vue.createVNode(VBreadcrumbsDivider, null, {
|
|
@@ -12531,6 +12602,7 @@
|
|
|
12531
12602
|
},
|
|
12532
12603
|
// TODO: mandatory should probably not be exposed but do this for now
|
|
12533
12604
|
mandatory: {
|
|
12605
|
+
type: [Boolean, String],
|
|
12534
12606
|
default: 'force'
|
|
12535
12607
|
},
|
|
12536
12608
|
...makeComponentProps(),
|
|
@@ -12898,7 +12970,9 @@
|
|
|
12898
12970
|
"style": props.style
|
|
12899
12971
|
}, [hasContent.value && slots.default?.()]), [[vue.vShow, groupItem.isSelected.value]])]
|
|
12900
12972
|
}));
|
|
12901
|
-
return {
|
|
12973
|
+
return {
|
|
12974
|
+
groupItem
|
|
12975
|
+
};
|
|
12902
12976
|
}
|
|
12903
12977
|
});
|
|
12904
12978
|
|
|
@@ -13444,7 +13518,11 @@
|
|
|
13444
13518
|
...makeRoundedProps(),
|
|
13445
13519
|
...makeElevationProps({
|
|
13446
13520
|
elevation: 2
|
|
13447
|
-
})
|
|
13521
|
+
}),
|
|
13522
|
+
ripple: {
|
|
13523
|
+
type: Boolean,
|
|
13524
|
+
default: true
|
|
13525
|
+
}
|
|
13448
13526
|
}, 'Slider');
|
|
13449
13527
|
const useSteps = props => {
|
|
13450
13528
|
const min = vue.computed(() => parseFloat(props.min));
|
|
@@ -14051,7 +14129,8 @@
|
|
|
14051
14129
|
"position": trackStop.value,
|
|
14052
14130
|
"elevation": props.elevation,
|
|
14053
14131
|
"onFocus": focus,
|
|
14054
|
-
"onBlur": blur
|
|
14132
|
+
"onBlur": blur,
|
|
14133
|
+
"ripple": props.ripple
|
|
14055
14134
|
}, {
|
|
14056
14135
|
'thumb-label': slots['thumb-label']
|
|
14057
14136
|
})]);
|
|
@@ -14823,7 +14902,12 @@
|
|
|
14823
14902
|
} = useFilter(props, items, () => isPristine.value ? '' : search.value);
|
|
14824
14903
|
const selections = vue.computed(() => {
|
|
14825
14904
|
return model.value.map(v => {
|
|
14826
|
-
return items.value.find(item =>
|
|
14905
|
+
return items.value.find(item => {
|
|
14906
|
+
const itemRawValue = getPropertyFromItem(item.raw, props.itemValue);
|
|
14907
|
+
const modelRawValue = getPropertyFromItem(v.raw, props.itemValue);
|
|
14908
|
+
if (itemRawValue === undefined || modelRawValue === undefined) return false;
|
|
14909
|
+
return props.returnObject ? props.valueComparator(itemRawValue, modelRawValue) : props.valueComparator(item.value, v.value);
|
|
14910
|
+
}) || v;
|
|
14827
14911
|
});
|
|
14828
14912
|
});
|
|
14829
14913
|
const displayItems = vue.computed(() => {
|
|
@@ -15032,7 +15116,8 @@
|
|
|
15032
15116
|
"onFocusin": onFocusin,
|
|
15033
15117
|
"onFocusout": onFocusout,
|
|
15034
15118
|
"onScrollPassive": onListScroll,
|
|
15035
|
-
"tabindex": "-1"
|
|
15119
|
+
"tabindex": "-1",
|
|
15120
|
+
"color": props.itemColor ?? props.color
|
|
15036
15121
|
}, {
|
|
15037
15122
|
default: () => [slots['prepend-item']?.(), !displayItems.value.length && !props.hideNoData && (slots['no-data']?.() ?? vue.createVNode(VListItem, {
|
|
15038
15123
|
"title": t(props.noDataText)
|
|
@@ -17646,7 +17731,8 @@
|
|
|
17646
17731
|
},
|
|
17647
17732
|
"min": min.value,
|
|
17648
17733
|
"max": model.value[1],
|
|
17649
|
-
"position": trackStart.value
|
|
17734
|
+
"position": trackStart.value,
|
|
17735
|
+
"ripple": props.ripple
|
|
17650
17736
|
}, {
|
|
17651
17737
|
'thumb-label': slots['thumb-label']
|
|
17652
17738
|
}), vue.createVNode(VSliderThumb, {
|
|
@@ -17674,7 +17760,8 @@
|
|
|
17674
17760
|
},
|
|
17675
17761
|
"min": model.value[0],
|
|
17676
17762
|
"max": max.value,
|
|
17677
|
-
"position": trackStop.value
|
|
17763
|
+
"position": trackStop.value,
|
|
17764
|
+
"ripple": props.ripple
|
|
17678
17765
|
}, {
|
|
17679
17766
|
'thumb-label': slots['thumb-label']
|
|
17680
17767
|
})]);
|
|
@@ -17821,7 +17908,9 @@
|
|
|
17821
17908
|
value,
|
|
17822
17909
|
index,
|
|
17823
17910
|
rating: normalizedValue.value
|
|
17824
|
-
}) : vue.createVNode(VBtn,
|
|
17911
|
+
}) : vue.createVNode(VBtn, vue.mergeProps({
|
|
17912
|
+
"aria-label": t(props.itemAriaLabel, value, props.length)
|
|
17913
|
+
}, btnProps), null)]), vue.createVNode("input", {
|
|
17825
17914
|
"class": "v-rating__hidden",
|
|
17826
17915
|
"name": name.value,
|
|
17827
17916
|
"id": id,
|
|
@@ -23030,7 +23119,6 @@
|
|
|
23030
23119
|
intersectionRef,
|
|
23031
23120
|
isIntersecting
|
|
23032
23121
|
} = useIntersectionObserver(entries => {}, props.rootMargin ? {
|
|
23033
|
-
root: props.rootRef,
|
|
23034
23122
|
rootMargin: props.rootMargin
|
|
23035
23123
|
} : undefined);
|
|
23036
23124
|
vue.watch(isIntersecting, async val => {
|
|
@@ -23210,6 +23298,208 @@
|
|
|
23210
23298
|
|
|
23211
23299
|
// Types
|
|
23212
23300
|
|
|
23301
|
+
const makeVOtpInputProps = propsFactory({
|
|
23302
|
+
autofocus: Boolean,
|
|
23303
|
+
divider: String,
|
|
23304
|
+
focusAll: Boolean,
|
|
23305
|
+
label: {
|
|
23306
|
+
type: String,
|
|
23307
|
+
default: '$vuetify.input.otp'
|
|
23308
|
+
},
|
|
23309
|
+
length: {
|
|
23310
|
+
type: [Number, String],
|
|
23311
|
+
default: 6
|
|
23312
|
+
},
|
|
23313
|
+
modelValue: {
|
|
23314
|
+
type: [Number, String],
|
|
23315
|
+
default: undefined
|
|
23316
|
+
},
|
|
23317
|
+
placeholder: String,
|
|
23318
|
+
type: {
|
|
23319
|
+
type: String,
|
|
23320
|
+
default: 'text'
|
|
23321
|
+
},
|
|
23322
|
+
...makeDimensionProps(),
|
|
23323
|
+
...makeFocusProps(),
|
|
23324
|
+
...only(makeVFieldProps({
|
|
23325
|
+
variant: 'outlined'
|
|
23326
|
+
}), ['baseColor', 'bgColor', 'class', 'color', 'disabled', 'error', 'loading', 'rounded', 'style', 'theme', 'variant'])
|
|
23327
|
+
}, 'VOtpInput');
|
|
23328
|
+
const VOtpInput = genericComponent()({
|
|
23329
|
+
name: 'VOtpInput',
|
|
23330
|
+
props: makeVOtpInputProps(),
|
|
23331
|
+
emits: {
|
|
23332
|
+
finish: val => true,
|
|
23333
|
+
'update:focused': val => true,
|
|
23334
|
+
'update:modelValue': val => true
|
|
23335
|
+
},
|
|
23336
|
+
setup(props, _ref) {
|
|
23337
|
+
let {
|
|
23338
|
+
emit,
|
|
23339
|
+
slots
|
|
23340
|
+
} = _ref;
|
|
23341
|
+
const {
|
|
23342
|
+
dimensionStyles
|
|
23343
|
+
} = useDimension(props);
|
|
23344
|
+
const {
|
|
23345
|
+
isFocused,
|
|
23346
|
+
focus,
|
|
23347
|
+
blur
|
|
23348
|
+
} = useFocus(props);
|
|
23349
|
+
const model = useProxiedModel(props, 'modelValue', '', val => String(val).split(''), val => val.join(''));
|
|
23350
|
+
const {
|
|
23351
|
+
t
|
|
23352
|
+
} = useLocale();
|
|
23353
|
+
const fields = vue.computed(() => Array(Number(props.length)).fill(0));
|
|
23354
|
+
const focusIndex = vue.ref(-1);
|
|
23355
|
+
const contentRef = vue.ref();
|
|
23356
|
+
const inputRef = vue.ref([]);
|
|
23357
|
+
const current = vue.computed(() => inputRef.value[focusIndex.value]);
|
|
23358
|
+
function onInput() {
|
|
23359
|
+
const array = model.value.slice();
|
|
23360
|
+
const value = current.value.value;
|
|
23361
|
+
array[focusIndex.value] = value;
|
|
23362
|
+
model.value = array;
|
|
23363
|
+
let target = null;
|
|
23364
|
+
if (focusIndex.value > model.value.length) {
|
|
23365
|
+
target = model.value.length + 1;
|
|
23366
|
+
} else if (focusIndex.value + 1 !== Number(props.length)) {
|
|
23367
|
+
target = 'next';
|
|
23368
|
+
} else {
|
|
23369
|
+
requestAnimationFrame(() => current.value?.blur());
|
|
23370
|
+
}
|
|
23371
|
+
if (target) focusChild(contentRef.value, target);
|
|
23372
|
+
}
|
|
23373
|
+
function onKeydown(e) {
|
|
23374
|
+
const array = model.value.slice();
|
|
23375
|
+
const index = focusIndex.value;
|
|
23376
|
+
let target = null;
|
|
23377
|
+
if (!['ArrowLeft', 'ArrowRight', 'Backspace', 'Delete'].includes(e.key)) return;
|
|
23378
|
+
e.preventDefault();
|
|
23379
|
+
if (e.key === 'ArrowLeft') {
|
|
23380
|
+
target = 'prev';
|
|
23381
|
+
} else if (e.key === 'ArrowRight') {
|
|
23382
|
+
target = 'next';
|
|
23383
|
+
} else if (['Backspace', 'Delete'].includes(e.key)) {
|
|
23384
|
+
array[focusIndex.value] = '';
|
|
23385
|
+
model.value = array;
|
|
23386
|
+
if (focusIndex.value > 0 && e.key === 'Backspace') {
|
|
23387
|
+
target = 'prev';
|
|
23388
|
+
} else {
|
|
23389
|
+
requestAnimationFrame(() => {
|
|
23390
|
+
inputRef.value[index].select();
|
|
23391
|
+
});
|
|
23392
|
+
}
|
|
23393
|
+
}
|
|
23394
|
+
requestAnimationFrame(() => {
|
|
23395
|
+
if (target != null) {
|
|
23396
|
+
focusChild(contentRef.value, target);
|
|
23397
|
+
}
|
|
23398
|
+
});
|
|
23399
|
+
}
|
|
23400
|
+
function onPaste(index, e) {
|
|
23401
|
+
e.preventDefault();
|
|
23402
|
+
e.stopPropagation();
|
|
23403
|
+
model.value = (e?.clipboardData?.getData('Text') ?? '').split('');
|
|
23404
|
+
inputRef.value?.[index].blur();
|
|
23405
|
+
}
|
|
23406
|
+
function reset() {
|
|
23407
|
+
model.value = [];
|
|
23408
|
+
}
|
|
23409
|
+
function onFocus(e, index) {
|
|
23410
|
+
focus();
|
|
23411
|
+
focusIndex.value = index;
|
|
23412
|
+
}
|
|
23413
|
+
function onBlur() {
|
|
23414
|
+
blur();
|
|
23415
|
+
focusIndex.value = -1;
|
|
23416
|
+
}
|
|
23417
|
+
provideDefaults({
|
|
23418
|
+
VField: {
|
|
23419
|
+
disabled: vue.computed(() => props.disabled),
|
|
23420
|
+
error: vue.computed(() => props.error),
|
|
23421
|
+
variant: vue.computed(() => props.variant)
|
|
23422
|
+
}
|
|
23423
|
+
}, {
|
|
23424
|
+
scoped: true
|
|
23425
|
+
});
|
|
23426
|
+
vue.watch(model, val => {
|
|
23427
|
+
if (val.length === props.length) emit('finish', val.join(''));
|
|
23428
|
+
}, {
|
|
23429
|
+
deep: true
|
|
23430
|
+
});
|
|
23431
|
+
vue.watch(focusIndex, val => {
|
|
23432
|
+
if (val < 0) return;
|
|
23433
|
+
IN_BROWSER && window.requestAnimationFrame(() => {
|
|
23434
|
+
inputRef.value[val].select();
|
|
23435
|
+
});
|
|
23436
|
+
});
|
|
23437
|
+
useRender(() => {
|
|
23438
|
+
return vue.createVNode("div", {
|
|
23439
|
+
"class": ['v-otp-input', {
|
|
23440
|
+
'v-otp-input--divided': !!props.divider
|
|
23441
|
+
}, props.class],
|
|
23442
|
+
"style": [props.style]
|
|
23443
|
+
}, [vue.createVNode("div", {
|
|
23444
|
+
"ref": contentRef,
|
|
23445
|
+
"class": "v-otp-input__content",
|
|
23446
|
+
"style": [dimensionStyles.value]
|
|
23447
|
+
}, [fields.value.map((_, i) => vue.createVNode(vue.Fragment, null, [props.divider && i !== 0 && vue.createVNode("span", {
|
|
23448
|
+
"class": "v-otp-input__divider"
|
|
23449
|
+
}, [props.divider]), vue.createVNode(VField, {
|
|
23450
|
+
"focused": isFocused.value && props.focusAll || focusIndex.value === i,
|
|
23451
|
+
"key": i
|
|
23452
|
+
}, {
|
|
23453
|
+
...slots,
|
|
23454
|
+
default: () => {
|
|
23455
|
+
return vue.createVNode("input", {
|
|
23456
|
+
"ref": val => inputRef.value[i] = val,
|
|
23457
|
+
"aria-label": t(props.label, i + 1),
|
|
23458
|
+
"autofocus": i === 0 && props.autofocus,
|
|
23459
|
+
"autocomplete": "one-time-code",
|
|
23460
|
+
"class": ['v-otp-input__field'],
|
|
23461
|
+
"inputmode": "text",
|
|
23462
|
+
"min": props.type === 'number' ? 0 : undefined,
|
|
23463
|
+
"maxlength": "1",
|
|
23464
|
+
"placeholder": props.placeholder,
|
|
23465
|
+
"type": props.type,
|
|
23466
|
+
"value": model.value[i],
|
|
23467
|
+
"onInput": onInput,
|
|
23468
|
+
"onFocus": e => onFocus(e, i),
|
|
23469
|
+
"onBlur": onBlur,
|
|
23470
|
+
"onKeydown": onKeydown,
|
|
23471
|
+
"onPaste": event => onPaste(i, event)
|
|
23472
|
+
}, null);
|
|
23473
|
+
}
|
|
23474
|
+
})])), vue.createVNode(VOverlay, {
|
|
23475
|
+
"contained": true,
|
|
23476
|
+
"content-class": "v-otp-input__loader",
|
|
23477
|
+
"model-value": !!props.loading,
|
|
23478
|
+
"persistent": true
|
|
23479
|
+
}, {
|
|
23480
|
+
default: () => [slots.loader?.() ?? vue.createVNode(VProgressCircular, {
|
|
23481
|
+
"color": typeof props.loading === 'boolean' ? undefined : props.loading,
|
|
23482
|
+
"indeterminate": true,
|
|
23483
|
+
"size": "24",
|
|
23484
|
+
"width": "2"
|
|
23485
|
+
}, null)]
|
|
23486
|
+
}), slots.default?.()])]);
|
|
23487
|
+
});
|
|
23488
|
+
return {
|
|
23489
|
+
blur: () => {
|
|
23490
|
+
inputRef.value?.some(input => input.blur());
|
|
23491
|
+
},
|
|
23492
|
+
focus: () => {
|
|
23493
|
+
inputRef.value?.[0].focus();
|
|
23494
|
+
},
|
|
23495
|
+
reset,
|
|
23496
|
+
isFocused
|
|
23497
|
+
};
|
|
23498
|
+
}
|
|
23499
|
+
});
|
|
23500
|
+
|
|
23501
|
+
// Types
|
|
23502
|
+
|
|
23213
23503
|
const rootTypes = {
|
|
23214
23504
|
actions: 'button@2',
|
|
23215
23505
|
article: 'heading, paragraph',
|
|
@@ -23341,6 +23631,373 @@
|
|
|
23341
23631
|
}
|
|
23342
23632
|
});
|
|
23343
23633
|
|
|
23634
|
+
// Types
|
|
23635
|
+
|
|
23636
|
+
const makeVStepperActionsProps = propsFactory({
|
|
23637
|
+
color: String,
|
|
23638
|
+
disabled: {
|
|
23639
|
+
type: [Boolean, String],
|
|
23640
|
+
default: false
|
|
23641
|
+
},
|
|
23642
|
+
prevText: {
|
|
23643
|
+
type: String,
|
|
23644
|
+
default: '$vuetify.stepper.prev'
|
|
23645
|
+
},
|
|
23646
|
+
nextText: {
|
|
23647
|
+
type: String,
|
|
23648
|
+
default: '$vuetify.stepper.next'
|
|
23649
|
+
}
|
|
23650
|
+
}, 'VStepperActions');
|
|
23651
|
+
const VStepperActions = genericComponent()({
|
|
23652
|
+
name: 'VStepperActions',
|
|
23653
|
+
props: makeVStepperActionsProps(),
|
|
23654
|
+
emits: {
|
|
23655
|
+
'click:prev': () => true,
|
|
23656
|
+
'click:next': () => true
|
|
23657
|
+
},
|
|
23658
|
+
setup(props, _ref) {
|
|
23659
|
+
let {
|
|
23660
|
+
emit,
|
|
23661
|
+
slots
|
|
23662
|
+
} = _ref;
|
|
23663
|
+
const {
|
|
23664
|
+
t
|
|
23665
|
+
} = useLocale();
|
|
23666
|
+
function onClickPrev() {
|
|
23667
|
+
emit('click:prev');
|
|
23668
|
+
}
|
|
23669
|
+
function onClickNext() {
|
|
23670
|
+
emit('click:next');
|
|
23671
|
+
}
|
|
23672
|
+
useRender(() => {
|
|
23673
|
+
return vue.createVNode("div", {
|
|
23674
|
+
"class": "v-stepper-actions"
|
|
23675
|
+
}, [vue.createVNode(VBtn, {
|
|
23676
|
+
"disabled": ['prev', true].includes(props.disabled),
|
|
23677
|
+
"text": t(props.prevText),
|
|
23678
|
+
"variant": "text",
|
|
23679
|
+
"onClick": onClickPrev
|
|
23680
|
+
}, null), vue.createVNode(VBtn, {
|
|
23681
|
+
"disabled": ['next', true].includes(props.disabled),
|
|
23682
|
+
"color": props.color,
|
|
23683
|
+
"text": t(props.nextText),
|
|
23684
|
+
"variant": "tonal",
|
|
23685
|
+
"onClick": onClickNext
|
|
23686
|
+
}, null)]);
|
|
23687
|
+
});
|
|
23688
|
+
return {};
|
|
23689
|
+
}
|
|
23690
|
+
});
|
|
23691
|
+
|
|
23692
|
+
// Utilities
|
|
23693
|
+
const VStepperHeader = createSimpleFunctional('v-stepper-header');
|
|
23694
|
+
|
|
23695
|
+
// Types
|
|
23696
|
+
|
|
23697
|
+
const makeVStepperItemProps = propsFactory({
|
|
23698
|
+
color: String,
|
|
23699
|
+
title: String,
|
|
23700
|
+
subtitle: String,
|
|
23701
|
+
complete: Boolean,
|
|
23702
|
+
completeIcon: {
|
|
23703
|
+
type: String,
|
|
23704
|
+
default: '$complete'
|
|
23705
|
+
},
|
|
23706
|
+
editable: Boolean,
|
|
23707
|
+
editIcon: {
|
|
23708
|
+
type: String,
|
|
23709
|
+
default: '$edit'
|
|
23710
|
+
},
|
|
23711
|
+
error: Boolean,
|
|
23712
|
+
errorIcon: {
|
|
23713
|
+
type: String,
|
|
23714
|
+
default: '$error'
|
|
23715
|
+
},
|
|
23716
|
+
icon: String,
|
|
23717
|
+
ripple: {
|
|
23718
|
+
type: [Boolean, Object],
|
|
23719
|
+
default: true
|
|
23720
|
+
},
|
|
23721
|
+
rules: {
|
|
23722
|
+
type: Array,
|
|
23723
|
+
default: () => []
|
|
23724
|
+
},
|
|
23725
|
+
...makeGroupItemProps()
|
|
23726
|
+
}, 'VStepperItem');
|
|
23727
|
+
const VStepperItem = genericComponent()({
|
|
23728
|
+
name: 'VStepperItem',
|
|
23729
|
+
directives: {
|
|
23730
|
+
Ripple
|
|
23731
|
+
},
|
|
23732
|
+
props: makeVStepperItemProps(),
|
|
23733
|
+
emits: {
|
|
23734
|
+
'group:selected': val => true
|
|
23735
|
+
},
|
|
23736
|
+
setup(props, _ref) {
|
|
23737
|
+
let {
|
|
23738
|
+
slots
|
|
23739
|
+
} = _ref;
|
|
23740
|
+
const group = useGroupItem(props, VStepperSymbol, true);
|
|
23741
|
+
const step = vue.computed(() => group?.value.value ?? props.value);
|
|
23742
|
+
const isValid = vue.computed(() => props.rules.every(handler => handler() === true));
|
|
23743
|
+
const canEdit = vue.computed(() => !props.disabled && props.editable);
|
|
23744
|
+
const hasError = vue.computed(() => props.error || !isValid.value);
|
|
23745
|
+
const hasCompleted = vue.computed(() => props.complete || props.rules.length > 0 && isValid.value);
|
|
23746
|
+
const icon = vue.computed(() => {
|
|
23747
|
+
if (hasError.value) return props.errorIcon;
|
|
23748
|
+
if (hasCompleted.value) return props.completeIcon;
|
|
23749
|
+
if (props.editable) return props.editIcon;
|
|
23750
|
+
return props.icon;
|
|
23751
|
+
});
|
|
23752
|
+
const slotProps = vue.computed(() => ({
|
|
23753
|
+
canEdit: canEdit.value,
|
|
23754
|
+
hasError: hasError.value,
|
|
23755
|
+
hasCompleted: hasCompleted.value,
|
|
23756
|
+
title: props.title,
|
|
23757
|
+
subtitle: props.subtitle,
|
|
23758
|
+
step: step.value,
|
|
23759
|
+
value: props.value
|
|
23760
|
+
}));
|
|
23761
|
+
useRender(() => {
|
|
23762
|
+
const hasColor = (!group || group.isSelected.value || hasCompleted.value || canEdit.value) && !hasError.value && !props.disabled;
|
|
23763
|
+
const hasTitle = !!(props.title || slots.title);
|
|
23764
|
+
const hasSubtitle = !!(props.subtitle || slots.subtitle);
|
|
23765
|
+
function onClick() {
|
|
23766
|
+
group?.toggle();
|
|
23767
|
+
}
|
|
23768
|
+
return vue.withDirectives(vue.createVNode("button", {
|
|
23769
|
+
"class": ['v-stepper-item', {
|
|
23770
|
+
'v-stepper-item--complete': hasCompleted.value,
|
|
23771
|
+
'v-stepper-item--disabled': props.disabled,
|
|
23772
|
+
'v-stepper-item--error': hasError.value
|
|
23773
|
+
}, group?.selectedClass.value],
|
|
23774
|
+
"disabled": !props.editable,
|
|
23775
|
+
"onClick": onClick
|
|
23776
|
+
}, [vue.createVNode(VAvatar, {
|
|
23777
|
+
"key": "stepper-avatar",
|
|
23778
|
+
"class": "v-stepper-item__avatar",
|
|
23779
|
+
"color": hasColor ? props.color : undefined,
|
|
23780
|
+
"size": 24
|
|
23781
|
+
}, {
|
|
23782
|
+
default: () => [slots.icon?.(slotProps.value) ?? (icon.value ? vue.createVNode(VIcon, {
|
|
23783
|
+
"icon": icon.value
|
|
23784
|
+
}, null) : step.value)]
|
|
23785
|
+
}), vue.createVNode("div", {
|
|
23786
|
+
"class": "v-stepper-item__content"
|
|
23787
|
+
}, [hasTitle && vue.createVNode("div", {
|
|
23788
|
+
"key": "title",
|
|
23789
|
+
"class": "v-stepper-item__title"
|
|
23790
|
+
}, [slots.title?.(slotProps.value) ?? props.title]), hasSubtitle && vue.createVNode("div", {
|
|
23791
|
+
"key": "subtitle",
|
|
23792
|
+
"class": "v-stepper-item__subtitle"
|
|
23793
|
+
}, [slots.subtitle?.(slotProps.value) ?? props.subtitle]), slots.default?.(slotProps.value)])]), [[vue.resolveDirective("ripple"), props.ripple && props.editable, null]]);
|
|
23794
|
+
});
|
|
23795
|
+
return {};
|
|
23796
|
+
}
|
|
23797
|
+
});
|
|
23798
|
+
|
|
23799
|
+
// Types
|
|
23800
|
+
|
|
23801
|
+
const VStepperSymbol$1 = Symbol.for('vuetify:v-stepper');
|
|
23802
|
+
const makeVStepperWindowProps = propsFactory({
|
|
23803
|
+
...makeVWindowProps({
|
|
23804
|
+
mandatory: false
|
|
23805
|
+
})
|
|
23806
|
+
}, 'VStepperWindow');
|
|
23807
|
+
const VStepperWindow = genericComponent()({
|
|
23808
|
+
name: 'VStepperWindow',
|
|
23809
|
+
props: makeVStepperWindowProps(),
|
|
23810
|
+
emits: {
|
|
23811
|
+
'update:modelValue': v => true
|
|
23812
|
+
},
|
|
23813
|
+
setup(props, _ref) {
|
|
23814
|
+
let {
|
|
23815
|
+
slots
|
|
23816
|
+
} = _ref;
|
|
23817
|
+
const group = vue.inject(VStepperSymbol$1, null);
|
|
23818
|
+
const _model = useProxiedModel(props, 'modelValue');
|
|
23819
|
+
const model = vue.computed({
|
|
23820
|
+
get() {
|
|
23821
|
+
// Always return modelValue if defined
|
|
23822
|
+
// or if not within a VStepper group
|
|
23823
|
+
if (_model.value != null || !group) return _model.value;
|
|
23824
|
+
|
|
23825
|
+
// If inside of a VStepper, find the currently selected
|
|
23826
|
+
// item by id. Item value may be assigned by its index
|
|
23827
|
+
return group.items.value.find(item => group.selected.value.includes(item.id))?.value;
|
|
23828
|
+
},
|
|
23829
|
+
set(val) {
|
|
23830
|
+
_model.value = val;
|
|
23831
|
+
}
|
|
23832
|
+
});
|
|
23833
|
+
useRender(() => {
|
|
23834
|
+
const [windowProps] = VWindow.filterProps(props);
|
|
23835
|
+
return vue.createVNode(VWindow, vue.mergeProps(windowProps, {
|
|
23836
|
+
"modelValue": model.value,
|
|
23837
|
+
"onUpdate:modelValue": $event => model.value = $event,
|
|
23838
|
+
"class": "v-stepper-window"
|
|
23839
|
+
}), slots);
|
|
23840
|
+
});
|
|
23841
|
+
return {};
|
|
23842
|
+
}
|
|
23843
|
+
});
|
|
23844
|
+
|
|
23845
|
+
const makeVStepperWindowItemProps = propsFactory({
|
|
23846
|
+
...makeVWindowItemProps()
|
|
23847
|
+
}, 'VStepperWindowItem');
|
|
23848
|
+
const VStepperWindowItem = genericComponent()({
|
|
23849
|
+
name: 'VStepperWindowItem',
|
|
23850
|
+
props: makeVStepperWindowItemProps(),
|
|
23851
|
+
setup(props, _ref) {
|
|
23852
|
+
let {
|
|
23853
|
+
slots
|
|
23854
|
+
} = _ref;
|
|
23855
|
+
useRender(() => {
|
|
23856
|
+
const [windowItemProps] = VWindowItem.filterProps(props);
|
|
23857
|
+
return vue.createVNode(VWindowItem, vue.mergeProps(windowItemProps, {
|
|
23858
|
+
"class": "v-stepper-window-item"
|
|
23859
|
+
}), slots);
|
|
23860
|
+
});
|
|
23861
|
+
return {};
|
|
23862
|
+
}
|
|
23863
|
+
});
|
|
23864
|
+
|
|
23865
|
+
// Types
|
|
23866
|
+
|
|
23867
|
+
const VStepperSymbol = Symbol.for('vuetify:v-stepper');
|
|
23868
|
+
const makeVStepperProps = propsFactory({
|
|
23869
|
+
altLabels: Boolean,
|
|
23870
|
+
bgColor: String,
|
|
23871
|
+
editable: Boolean,
|
|
23872
|
+
hideActions: Boolean,
|
|
23873
|
+
items: {
|
|
23874
|
+
type: Array,
|
|
23875
|
+
default: () => []
|
|
23876
|
+
},
|
|
23877
|
+
itemTitle: {
|
|
23878
|
+
type: String,
|
|
23879
|
+
default: 'title'
|
|
23880
|
+
},
|
|
23881
|
+
itemValue: {
|
|
23882
|
+
type: String,
|
|
23883
|
+
default: 'value'
|
|
23884
|
+
},
|
|
23885
|
+
mobile: Boolean,
|
|
23886
|
+
nonLinear: Boolean,
|
|
23887
|
+
flat: Boolean,
|
|
23888
|
+
...makeGroupProps({
|
|
23889
|
+
mandatory: 'force',
|
|
23890
|
+
selectedClass: 'v-stepper-item--selected'
|
|
23891
|
+
}),
|
|
23892
|
+
...makeVSheetProps(),
|
|
23893
|
+
...only(makeVStepperActionsProps(), ['prevText', 'nextText'])
|
|
23894
|
+
}, 'VStepper');
|
|
23895
|
+
const VStepper = genericComponent()({
|
|
23896
|
+
name: 'VStepper',
|
|
23897
|
+
props: makeVStepperProps(),
|
|
23898
|
+
emits: {
|
|
23899
|
+
'update:modelValue': v => true
|
|
23900
|
+
},
|
|
23901
|
+
setup(props, _ref) {
|
|
23902
|
+
let {
|
|
23903
|
+
slots
|
|
23904
|
+
} = _ref;
|
|
23905
|
+
// TODO: fix typing
|
|
23906
|
+
const {
|
|
23907
|
+
items: _items,
|
|
23908
|
+
next,
|
|
23909
|
+
prev,
|
|
23910
|
+
selected
|
|
23911
|
+
} = useGroup(props, VStepperSymbol);
|
|
23912
|
+
const {
|
|
23913
|
+
color,
|
|
23914
|
+
editable,
|
|
23915
|
+
prevText,
|
|
23916
|
+
nextText
|
|
23917
|
+
} = vue.toRefs(props);
|
|
23918
|
+
const items = vue.computed(() => props.items.map((item, index) => {
|
|
23919
|
+
const title = getPropertyFromItem(item, props.itemTitle, item);
|
|
23920
|
+
const value = getPropertyFromItem(item, props.itemValue, index + 1);
|
|
23921
|
+
return {
|
|
23922
|
+
title,
|
|
23923
|
+
value,
|
|
23924
|
+
raw: item
|
|
23925
|
+
};
|
|
23926
|
+
}));
|
|
23927
|
+
const activeIndex = vue.computed(() => {
|
|
23928
|
+
return _items.value.findIndex(item => selected.value.includes(item.id));
|
|
23929
|
+
});
|
|
23930
|
+
const disabled = vue.computed(() => {
|
|
23931
|
+
if (props.disabled) return props.disabled;
|
|
23932
|
+
if (activeIndex.value === 0) return 'prev';
|
|
23933
|
+
if (activeIndex.value === _items.value.length - 1) return 'next';
|
|
23934
|
+
return false;
|
|
23935
|
+
});
|
|
23936
|
+
provideDefaults({
|
|
23937
|
+
VStepperItem: {
|
|
23938
|
+
editable,
|
|
23939
|
+
prevText,
|
|
23940
|
+
nextText
|
|
23941
|
+
},
|
|
23942
|
+
VStepperActions: {
|
|
23943
|
+
color,
|
|
23944
|
+
disabled,
|
|
23945
|
+
prevText,
|
|
23946
|
+
nextText
|
|
23947
|
+
}
|
|
23948
|
+
});
|
|
23949
|
+
useRender(() => {
|
|
23950
|
+
const [sheetProps] = VSheet.filterProps(props);
|
|
23951
|
+
const hasHeader = !!(slots.header || props.items.length);
|
|
23952
|
+
const hasWindow = props.items.length > 0;
|
|
23953
|
+
const hasActions = !props.hideActions && !!(hasWindow || slots.actions);
|
|
23954
|
+
return vue.createVNode(VSheet, vue.mergeProps(sheetProps, {
|
|
23955
|
+
"color": props.bgColor,
|
|
23956
|
+
"class": ['v-stepper', {
|
|
23957
|
+
'v-stepper--alt-labels': props.altLabels,
|
|
23958
|
+
'v-stepper--flat': props.flat,
|
|
23959
|
+
'v-stepper--non-linear': props.nonLinear,
|
|
23960
|
+
'v-stepper--mobile': props.mobile
|
|
23961
|
+
}, props.class],
|
|
23962
|
+
"style": props.style
|
|
23963
|
+
}), {
|
|
23964
|
+
default: () => [hasHeader && vue.createVNode(VStepperHeader, {
|
|
23965
|
+
"key": "stepper-header"
|
|
23966
|
+
}, {
|
|
23967
|
+
default: () => [items.value.map((item, index) => vue.createVNode(vue.Fragment, null, [!!index && vue.createVNode(VDivider, null, null), vue.createVNode(VStepperItem, item, {
|
|
23968
|
+
default: slots[`header-item.${item.value}`] ?? slots.header,
|
|
23969
|
+
icon: slots.icon,
|
|
23970
|
+
title: slots.title,
|
|
23971
|
+
subtitle: slots.subtitle
|
|
23972
|
+
})]))]
|
|
23973
|
+
}), hasWindow && vue.createVNode(VStepperWindow, {
|
|
23974
|
+
"key": "stepper-window"
|
|
23975
|
+
}, {
|
|
23976
|
+
default: () => [items.value.map(item => vue.createVNode(VStepperWindowItem, {
|
|
23977
|
+
"value": item.value
|
|
23978
|
+
}, {
|
|
23979
|
+
default: () => slots[`item.${item.value}`]?.(item) ?? slots.item?.(item)
|
|
23980
|
+
}))]
|
|
23981
|
+
}), slots.default?.({
|
|
23982
|
+
prev,
|
|
23983
|
+
next
|
|
23984
|
+
}), hasActions && (slots.actions?.({
|
|
23985
|
+
next,
|
|
23986
|
+
prev
|
|
23987
|
+
}) ?? vue.createVNode(VStepperActions, {
|
|
23988
|
+
"key": "stepper-actions",
|
|
23989
|
+
"onClick:prev": prev,
|
|
23990
|
+
"onClick:next": next
|
|
23991
|
+
}, null))]
|
|
23992
|
+
});
|
|
23993
|
+
});
|
|
23994
|
+
return {
|
|
23995
|
+
prev,
|
|
23996
|
+
next
|
|
23997
|
+
};
|
|
23998
|
+
}
|
|
23999
|
+
});
|
|
24000
|
+
|
|
23344
24001
|
var components = /*#__PURE__*/Object.freeze({
|
|
23345
24002
|
__proto__: null,
|
|
23346
24003
|
VAlert: VAlert,
|
|
@@ -23443,6 +24100,7 @@
|
|
|
23443
24100
|
VMessages: VMessages,
|
|
23444
24101
|
VNavigationDrawer: VNavigationDrawer,
|
|
23445
24102
|
VNoSsr: VNoSsr,
|
|
24103
|
+
VOtpInput: VOtpInput,
|
|
23446
24104
|
VOverlay: VOverlay,
|
|
23447
24105
|
VPagination: VPagination,
|
|
23448
24106
|
VParallax: VParallax,
|
|
@@ -23475,6 +24133,12 @@
|
|
|
23475
24133
|
VSlider: VSlider,
|
|
23476
24134
|
VSnackbar: VSnackbar,
|
|
23477
24135
|
VSpacer: VSpacer,
|
|
24136
|
+
VStepper: VStepper,
|
|
24137
|
+
VStepperActions: VStepperActions,
|
|
24138
|
+
VStepperHeader: VStepperHeader,
|
|
24139
|
+
VStepperItem: VStepperItem,
|
|
24140
|
+
VStepperWindow: VStepperWindow,
|
|
24141
|
+
VStepperWindowItem: VStepperWindowItem,
|
|
23478
24142
|
VSvgIcon: VSvgIcon,
|
|
23479
24143
|
VSwitch: VSwitch,
|
|
23480
24144
|
VSystemBar: VSystemBar,
|
|
@@ -23712,7 +24376,7 @@
|
|
|
23712
24376
|
date
|
|
23713
24377
|
};
|
|
23714
24378
|
}
|
|
23715
|
-
const version$1 = "3.3.
|
|
24379
|
+
const version$1 = "3.3.11-dev.2023-08-07";
|
|
23716
24380
|
createVuetify$1.version = version$1;
|
|
23717
24381
|
|
|
23718
24382
|
// Vue's inject() can only be used in setup
|
|
@@ -23726,7 +24390,7 @@
|
|
|
23726
24390
|
|
|
23727
24391
|
/* eslint-disable local-rules/sort-imports */
|
|
23728
24392
|
|
|
23729
|
-
const version = "3.3.
|
|
24393
|
+
const version = "3.3.11-dev.2023-08-07";
|
|
23730
24394
|
|
|
23731
24395
|
/* eslint-disable local-rules/sort-imports */
|
|
23732
24396
|
|