@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.esm.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
|
*/
|
|
@@ -224,6 +224,11 @@ function omit(obj, exclude) {
|
|
|
224
224
|
exclude.forEach(prop => delete clone[prop]);
|
|
225
225
|
return clone;
|
|
226
226
|
}
|
|
227
|
+
function only(obj, include) {
|
|
228
|
+
const clone = {};
|
|
229
|
+
include.forEach(prop => clone[prop] = obj[prop]);
|
|
230
|
+
return clone;
|
|
231
|
+
}
|
|
227
232
|
|
|
228
233
|
/**
|
|
229
234
|
* Filter attributes that should be applied to
|
|
@@ -407,12 +412,22 @@ function callEvent(handler) {
|
|
|
407
412
|
}
|
|
408
413
|
}
|
|
409
414
|
function focusableChildren(el) {
|
|
410
|
-
|
|
415
|
+
let filterByTabIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
416
|
+
const targets = ['button', '[href]', 'input:not([type="hidden"])', 'select', 'textarea', '[tabindex]'].map(s => `${s}${filterByTabIndex ? ':not([tabindex="-1"])' : ''}:not([disabled])`).join(', ');
|
|
411
417
|
return [...el.querySelectorAll(targets)];
|
|
412
418
|
}
|
|
419
|
+
function getNextElement(elements, location, condition) {
|
|
420
|
+
let _el;
|
|
421
|
+
let idx = elements.indexOf(document.activeElement);
|
|
422
|
+
const inc = location === 'next' ? 1 : -1;
|
|
423
|
+
do {
|
|
424
|
+
idx += inc;
|
|
425
|
+
_el = elements[idx];
|
|
426
|
+
} while ((!_el || _el.offsetParent == null || !(condition?.(_el) ?? true)) && idx < elements.length && idx >= 0);
|
|
427
|
+
return _el;
|
|
428
|
+
}
|
|
413
429
|
function focusChild(el, location) {
|
|
414
430
|
const focusable = focusableChildren(el);
|
|
415
|
-
const idx = focusable.indexOf(document.activeElement);
|
|
416
431
|
if (!location) {
|
|
417
432
|
if (el === document.activeElement || !el.contains(document.activeElement)) {
|
|
418
433
|
focusable[0]?.focus();
|
|
@@ -421,14 +436,10 @@ function focusChild(el, location) {
|
|
|
421
436
|
focusable[0]?.focus();
|
|
422
437
|
} else if (location === 'last') {
|
|
423
438
|
focusable.at(-1)?.focus();
|
|
439
|
+
} else if (typeof location === 'number') {
|
|
440
|
+
focusable[location]?.focus();
|
|
424
441
|
} else {
|
|
425
|
-
|
|
426
|
-
let idxx = idx;
|
|
427
|
-
const inc = location === 'next' ? 1 : -1;
|
|
428
|
-
do {
|
|
429
|
-
idxx += inc;
|
|
430
|
-
_el = focusable[idxx];
|
|
431
|
-
} while ((!_el || _el.offsetParent == null) && idxx < focusable.length && idxx >= 0);
|
|
442
|
+
const _el = getNextElement(focusable, location);
|
|
432
443
|
if (_el) _el.focus();else focusChild(el, location === 'next' ? 'first' : 'last');
|
|
433
444
|
}
|
|
434
445
|
}
|
|
@@ -1698,7 +1709,8 @@ var en = {
|
|
|
1698
1709
|
input: {
|
|
1699
1710
|
clear: 'Clear {0}',
|
|
1700
1711
|
prependAction: '{0} prepended action',
|
|
1701
|
-
appendAction: '{0} appended action'
|
|
1712
|
+
appendAction: '{0} appended action',
|
|
1713
|
+
otp: 'Please enter OTP character {0}'
|
|
1702
1714
|
},
|
|
1703
1715
|
fileInput: {
|
|
1704
1716
|
counter: '{0} files',
|
|
@@ -1719,6 +1731,10 @@ var en = {
|
|
|
1719
1731
|
last: 'Last page'
|
|
1720
1732
|
}
|
|
1721
1733
|
},
|
|
1734
|
+
stepper: {
|
|
1735
|
+
next: 'Next',
|
|
1736
|
+
prev: 'Previous'
|
|
1737
|
+
},
|
|
1722
1738
|
rating: {
|
|
1723
1739
|
ariaLabel: {
|
|
1724
1740
|
item: 'Rating {0} of {1}'
|
|
@@ -2257,9 +2273,11 @@ function createTheme(options) {
|
|
|
2257
2273
|
if (head) {
|
|
2258
2274
|
if (head.push) {
|
|
2259
2275
|
const entry = head.push(getHead);
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2276
|
+
if (IN_BROWSER) {
|
|
2277
|
+
watch(styles, () => {
|
|
2278
|
+
entry.patch(getHead);
|
|
2279
|
+
});
|
|
2280
|
+
}
|
|
2263
2281
|
} else {
|
|
2264
2282
|
if (IN_BROWSER) {
|
|
2265
2283
|
head.addHeadObjs(computed(getHead));
|
|
@@ -2270,9 +2288,13 @@ function createTheme(options) {
|
|
|
2270
2288
|
}
|
|
2271
2289
|
} else {
|
|
2272
2290
|
let styleEl = IN_BROWSER ? document.getElementById('vuetify-theme-stylesheet') : null;
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2291
|
+
if (IN_BROWSER) {
|
|
2292
|
+
watch(styles, updateStyles, {
|
|
2293
|
+
immediate: true
|
|
2294
|
+
});
|
|
2295
|
+
} else {
|
|
2296
|
+
updateStyles();
|
|
2297
|
+
}
|
|
2276
2298
|
function updateStyles() {
|
|
2277
2299
|
if (typeof document !== 'undefined' && !styleEl) {
|
|
2278
2300
|
const el = document.createElement('style');
|
|
@@ -2970,6 +2992,8 @@ const makeVImgProps = propsFactory({
|
|
|
2970
2992
|
type: [String, Object],
|
|
2971
2993
|
default: ''
|
|
2972
2994
|
},
|
|
2995
|
+
crossorigin: String,
|
|
2996
|
+
referrerpolicy: String,
|
|
2973
2997
|
srcset: String,
|
|
2974
2998
|
...makeVResponsiveProps(),
|
|
2975
2999
|
...makeComponentProps(),
|
|
@@ -3094,6 +3118,8 @@ const VImg = genericComponent()({
|
|
|
3094
3118
|
"src": normalisedSrc.value.src,
|
|
3095
3119
|
"srcset": normalisedSrc.value.srcset,
|
|
3096
3120
|
"alt": props.alt,
|
|
3121
|
+
"crossorigin": props.crossorigin,
|
|
3122
|
+
"referrerpolicy": props.referrerpolicy,
|
|
3097
3123
|
"sizes": props.sizes,
|
|
3098
3124
|
"ref": image,
|
|
3099
3125
|
"onLoad": onLoad,
|
|
@@ -3115,7 +3141,9 @@ const VImg = genericComponent()({
|
|
|
3115
3141
|
default: () => [normalisedSrc.value.lazySrc && state.value !== 'loaded' && createVNode("img", {
|
|
3116
3142
|
"class": ['v-img__img', 'v-img__img--preload', containClasses.value],
|
|
3117
3143
|
"src": normalisedSrc.value.lazySrc,
|
|
3118
|
-
"alt": props.alt
|
|
3144
|
+
"alt": props.alt,
|
|
3145
|
+
"crossorigin": props.crossorigin,
|
|
3146
|
+
"referrerpolicy": props.referrerpolicy
|
|
3119
3147
|
}, null)]
|
|
3120
3148
|
});
|
|
3121
3149
|
const __placeholder = () => {
|
|
@@ -3877,7 +3905,7 @@ function useGroupItem(props, injectKey) {
|
|
|
3877
3905
|
throw new Error(`[Vuetify] Could not find useGroup injection with symbol ${injectKey.description}`);
|
|
3878
3906
|
}
|
|
3879
3907
|
const value = toRef(props, 'value');
|
|
3880
|
-
const disabled = computed(() => group.disabled.value || props.disabled);
|
|
3908
|
+
const disabled = computed(() => !!(group.disabled.value || props.disabled));
|
|
3881
3909
|
group.register({
|
|
3882
3910
|
id,
|
|
3883
3911
|
value,
|
|
@@ -5724,6 +5752,7 @@ const VSelectionControlGroup = genericComponent()({
|
|
|
5724
5752
|
|
|
5725
5753
|
const makeVSelectionControlProps = propsFactory({
|
|
5726
5754
|
label: String,
|
|
5755
|
+
baseColor: String,
|
|
5727
5756
|
trueValue: null,
|
|
5728
5757
|
falseValue: null,
|
|
5729
5758
|
value: null,
|
|
@@ -5762,7 +5791,8 @@ function useSelectionControl(props) {
|
|
|
5762
5791
|
textColorClasses,
|
|
5763
5792
|
textColorStyles
|
|
5764
5793
|
} = useTextColor(computed(() => {
|
|
5765
|
-
|
|
5794
|
+
if (props.error || props.disabled) return undefined;
|
|
5795
|
+
return model.value ? props.color : props.baseColor;
|
|
5766
5796
|
}));
|
|
5767
5797
|
const icon = computed(() => model.value ? props.trueIcon : props.falseIcon);
|
|
5768
5798
|
return {
|
|
@@ -6542,6 +6572,7 @@ const makeVAvatarProps = propsFactory({
|
|
|
6542
6572
|
end: Boolean,
|
|
6543
6573
|
icon: IconValue,
|
|
6544
6574
|
image: String,
|
|
6575
|
+
text: String,
|
|
6545
6576
|
...makeComponentProps(),
|
|
6546
6577
|
...makeDensityProps(),
|
|
6547
6578
|
...makeRoundedProps(),
|
|
@@ -6592,7 +6623,7 @@ const VAvatar = genericComponent()({
|
|
|
6592
6623
|
}, null) : props.icon ? createVNode(VIcon, {
|
|
6593
6624
|
"key": "icon",
|
|
6594
6625
|
"icon": props.icon
|
|
6595
|
-
}, null) : slots.default?.(), genOverlays(false, 'v-avatar')]
|
|
6626
|
+
}, null) : slots.default?.() ?? props.text, genOverlays(false, 'v-avatar')]
|
|
6596
6627
|
}));
|
|
6597
6628
|
return {};
|
|
6598
6629
|
}
|
|
@@ -9830,8 +9861,30 @@ const VMenu = genericComponent()({
|
|
|
9830
9861
|
}, 40);
|
|
9831
9862
|
}
|
|
9832
9863
|
});
|
|
9864
|
+
function onFocusIn(e) {
|
|
9865
|
+
const before = e.relatedTarget;
|
|
9866
|
+
const after = e.target;
|
|
9867
|
+
if (before !== after && overlay.value?.contentEl &&
|
|
9868
|
+
// We're the topmost menu
|
|
9869
|
+
overlay.value?.globalTop &&
|
|
9870
|
+
// It isn't the document or the menu body
|
|
9871
|
+
![document, overlay.value.contentEl].includes(after) &&
|
|
9872
|
+
// It isn't inside the menu body
|
|
9873
|
+
!overlay.value.contentEl.contains(after)) {
|
|
9874
|
+
const focusable = focusableChildren(overlay.value.contentEl);
|
|
9875
|
+
focusable[0]?.focus();
|
|
9876
|
+
}
|
|
9877
|
+
}
|
|
9833
9878
|
watch(isActive, val => {
|
|
9834
|
-
|
|
9879
|
+
if (val) {
|
|
9880
|
+
parent?.register();
|
|
9881
|
+
document.addEventListener('focusin', onFocusIn, {
|
|
9882
|
+
once: true
|
|
9883
|
+
});
|
|
9884
|
+
} else {
|
|
9885
|
+
parent?.unregister();
|
|
9886
|
+
document.removeEventListener('focusin', onFocusIn);
|
|
9887
|
+
}
|
|
9835
9888
|
});
|
|
9836
9889
|
function onClickOutside() {
|
|
9837
9890
|
parent?.closeParents();
|
|
@@ -9839,8 +9892,11 @@ const VMenu = genericComponent()({
|
|
|
9839
9892
|
function onKeydown(e) {
|
|
9840
9893
|
if (props.disabled) return;
|
|
9841
9894
|
if (e.key === 'Tab') {
|
|
9842
|
-
|
|
9843
|
-
|
|
9895
|
+
const nextElement = getNextElement(focusableChildren(overlay.value?.contentEl, false), e.shiftKey ? 'prev' : 'next', el => el.tabIndex >= 0);
|
|
9896
|
+
if (!nextElement) {
|
|
9897
|
+
isActive.value = false;
|
|
9898
|
+
overlay.value?.activatorEl?.focus();
|
|
9899
|
+
}
|
|
9844
9900
|
}
|
|
9845
9901
|
}
|
|
9846
9902
|
function onActivatorKeydown(e) {
|
|
@@ -10754,6 +10810,7 @@ const makeSelectProps = propsFactory({
|
|
|
10754
10810
|
type: Function,
|
|
10755
10811
|
default: deepEqual
|
|
10756
10812
|
},
|
|
10813
|
+
itemColor: String,
|
|
10757
10814
|
...makeItemsProps({
|
|
10758
10815
|
itemChildren: false
|
|
10759
10816
|
})
|
|
@@ -10806,7 +10863,12 @@ const VSelect = genericComponent()({
|
|
|
10806
10863
|
const form = useForm();
|
|
10807
10864
|
const selections = computed(() => {
|
|
10808
10865
|
return model.value.map(v => {
|
|
10809
|
-
return items.value.find(item =>
|
|
10866
|
+
return items.value.find(item => {
|
|
10867
|
+
const itemRawValue = getPropertyFromItem(item.raw, props.itemValue);
|
|
10868
|
+
const modelRawValue = getPropertyFromItem(v.raw, props.itemValue);
|
|
10869
|
+
if (itemRawValue === undefined || modelRawValue === undefined) return false;
|
|
10870
|
+
return props.returnObject ? props.valueComparator(itemRawValue, modelRawValue) : props.valueComparator(item.value, v.value);
|
|
10871
|
+
}) || v;
|
|
10810
10872
|
});
|
|
10811
10873
|
});
|
|
10812
10874
|
const selected = computed(() => selections.value.map(selection => selection.props.value));
|
|
@@ -10962,7 +11024,8 @@ const VSelect = genericComponent()({
|
|
|
10962
11024
|
"onKeydown": onListKeydown,
|
|
10963
11025
|
"onFocusin": onFocusin,
|
|
10964
11026
|
"onScrollPassive": onListScroll,
|
|
10965
|
-
"tabindex": "-1"
|
|
11027
|
+
"tabindex": "-1",
|
|
11028
|
+
"color": props.itemColor ?? props.color
|
|
10966
11029
|
}, {
|
|
10967
11030
|
default: () => [slots['prepend-item']?.(), !displayItems.value.length && !props.hideNoData && (slots['no-data']?.() ?? createVNode(VListItem, {
|
|
10968
11031
|
"title": t(props.noDataText)
|
|
@@ -11257,7 +11320,12 @@ const VAutocomplete = genericComponent()({
|
|
|
11257
11320
|
} = useFilter(props, items, () => isPristine.value ? '' : search.value);
|
|
11258
11321
|
const selections = computed(() => {
|
|
11259
11322
|
return model.value.map(v => {
|
|
11260
|
-
return items.value.find(item =>
|
|
11323
|
+
return items.value.find(item => {
|
|
11324
|
+
const itemRawValue = getPropertyFromItem(item.raw, props.itemValue);
|
|
11325
|
+
const modelRawValue = getPropertyFromItem(v.raw, props.itemValue);
|
|
11326
|
+
if (itemRawValue === undefined || modelRawValue === undefined) return false;
|
|
11327
|
+
return props.returnObject ? props.valueComparator(itemRawValue, modelRawValue) : props.valueComparator(item.value, v.value);
|
|
11328
|
+
}) || v;
|
|
11261
11329
|
});
|
|
11262
11330
|
});
|
|
11263
11331
|
const displayItems = computed(() => {
|
|
@@ -11309,11 +11377,8 @@ const VAutocomplete = genericComponent()({
|
|
|
11309
11377
|
if (['Escape'].includes(e.key)) {
|
|
11310
11378
|
menu.value = false;
|
|
11311
11379
|
}
|
|
11312
|
-
if (['Enter', '
|
|
11313
|
-
|
|
11314
|
-
select(filteredItems.value[0]);
|
|
11315
|
-
}
|
|
11316
|
-
isPristine.value = true;
|
|
11380
|
+
if (highlightFirst.value && ['Enter', 'Tab'].includes(e.key)) {
|
|
11381
|
+
select(filteredItems.value[0]);
|
|
11317
11382
|
}
|
|
11318
11383
|
if (e.key === 'ArrowDown' && highlightFirst.value) {
|
|
11319
11384
|
listRef.value?.focus('next');
|
|
@@ -11479,7 +11544,8 @@ const VAutocomplete = genericComponent()({
|
|
|
11479
11544
|
"onFocusin": onFocusin,
|
|
11480
11545
|
"onFocusout": onFocusout,
|
|
11481
11546
|
"onScrollPassive": onListScroll,
|
|
11482
|
-
"tabindex": "-1"
|
|
11547
|
+
"tabindex": "-1",
|
|
11548
|
+
"color": props.itemColor ?? props.color
|
|
11483
11549
|
}, {
|
|
11484
11550
|
default: () => [slots['prepend-item']?.(), !displayItems.value.length && !props.hideNoData && (slots['no-data']?.() ?? createVNode(VListItem, {
|
|
11485
11551
|
"title": t(props.noDataText)
|
|
@@ -12100,12 +12166,17 @@ const VBreadcrumbs = genericComponent()({
|
|
|
12100
12166
|
item,
|
|
12101
12167
|
raw
|
|
12102
12168
|
} = _ref2;
|
|
12103
|
-
return createVNode(Fragment, null, [
|
|
12104
|
-
|
|
12169
|
+
return createVNode(Fragment, null, [slots.item?.({
|
|
12170
|
+
item,
|
|
12171
|
+
index
|
|
12172
|
+
}) ?? createVNode(VBreadcrumbsItem, mergeProps({
|
|
12173
|
+
"key": index,
|
|
12105
12174
|
"disabled": index >= array.length - 1
|
|
12106
|
-
}, item
|
|
12175
|
+
}, typeof item === 'string' ? {
|
|
12176
|
+
title: item
|
|
12177
|
+
} : item), {
|
|
12107
12178
|
default: slots.title ? () => slots.title?.({
|
|
12108
|
-
item
|
|
12179
|
+
item,
|
|
12109
12180
|
index
|
|
12110
12181
|
}) : undefined
|
|
12111
12182
|
}), index < array.length - 1 && createVNode(VBreadcrumbsDivider, null, {
|
|
@@ -12527,6 +12598,7 @@ const makeVWindowProps = propsFactory({
|
|
|
12527
12598
|
},
|
|
12528
12599
|
// TODO: mandatory should probably not be exposed but do this for now
|
|
12529
12600
|
mandatory: {
|
|
12601
|
+
type: [Boolean, String],
|
|
12530
12602
|
default: 'force'
|
|
12531
12603
|
},
|
|
12532
12604
|
...makeComponentProps(),
|
|
@@ -12894,7 +12966,9 @@ const VWindowItem = genericComponent()({
|
|
|
12894
12966
|
"style": props.style
|
|
12895
12967
|
}, [hasContent.value && slots.default?.()]), [[vShow, groupItem.isSelected.value]])]
|
|
12896
12968
|
}));
|
|
12897
|
-
return {
|
|
12969
|
+
return {
|
|
12970
|
+
groupItem
|
|
12971
|
+
};
|
|
12898
12972
|
}
|
|
12899
12973
|
});
|
|
12900
12974
|
|
|
@@ -13440,7 +13514,11 @@ const makeSliderProps = propsFactory({
|
|
|
13440
13514
|
...makeRoundedProps(),
|
|
13441
13515
|
...makeElevationProps({
|
|
13442
13516
|
elevation: 2
|
|
13443
|
-
})
|
|
13517
|
+
}),
|
|
13518
|
+
ripple: {
|
|
13519
|
+
type: Boolean,
|
|
13520
|
+
default: true
|
|
13521
|
+
}
|
|
13444
13522
|
}, 'Slider');
|
|
13445
13523
|
const useSteps = props => {
|
|
13446
13524
|
const min = computed(() => parseFloat(props.min));
|
|
@@ -14047,7 +14125,8 @@ const VSlider = genericComponent()({
|
|
|
14047
14125
|
"position": trackStop.value,
|
|
14048
14126
|
"elevation": props.elevation,
|
|
14049
14127
|
"onFocus": focus,
|
|
14050
|
-
"onBlur": blur
|
|
14128
|
+
"onBlur": blur,
|
|
14129
|
+
"ripple": props.ripple
|
|
14051
14130
|
}, {
|
|
14052
14131
|
'thumb-label': slots['thumb-label']
|
|
14053
14132
|
})]);
|
|
@@ -14819,7 +14898,12 @@ const VCombobox = genericComponent()({
|
|
|
14819
14898
|
} = useFilter(props, items, () => isPristine.value ? '' : search.value);
|
|
14820
14899
|
const selections = computed(() => {
|
|
14821
14900
|
return model.value.map(v => {
|
|
14822
|
-
return items.value.find(item =>
|
|
14901
|
+
return items.value.find(item => {
|
|
14902
|
+
const itemRawValue = getPropertyFromItem(item.raw, props.itemValue);
|
|
14903
|
+
const modelRawValue = getPropertyFromItem(v.raw, props.itemValue);
|
|
14904
|
+
if (itemRawValue === undefined || modelRawValue === undefined) return false;
|
|
14905
|
+
return props.returnObject ? props.valueComparator(itemRawValue, modelRawValue) : props.valueComparator(item.value, v.value);
|
|
14906
|
+
}) || v;
|
|
14823
14907
|
});
|
|
14824
14908
|
});
|
|
14825
14909
|
const displayItems = computed(() => {
|
|
@@ -15028,7 +15112,8 @@ const VCombobox = genericComponent()({
|
|
|
15028
15112
|
"onFocusin": onFocusin,
|
|
15029
15113
|
"onFocusout": onFocusout,
|
|
15030
15114
|
"onScrollPassive": onListScroll,
|
|
15031
|
-
"tabindex": "-1"
|
|
15115
|
+
"tabindex": "-1",
|
|
15116
|
+
"color": props.itemColor ?? props.color
|
|
15032
15117
|
}, {
|
|
15033
15118
|
default: () => [slots['prepend-item']?.(), !displayItems.value.length && !props.hideNoData && (slots['no-data']?.() ?? createVNode(VListItem, {
|
|
15034
15119
|
"title": t(props.noDataText)
|
|
@@ -17642,7 +17727,8 @@ const VRangeSlider = genericComponent()({
|
|
|
17642
17727
|
},
|
|
17643
17728
|
"min": min.value,
|
|
17644
17729
|
"max": model.value[1],
|
|
17645
|
-
"position": trackStart.value
|
|
17730
|
+
"position": trackStart.value,
|
|
17731
|
+
"ripple": props.ripple
|
|
17646
17732
|
}, {
|
|
17647
17733
|
'thumb-label': slots['thumb-label']
|
|
17648
17734
|
}), createVNode(VSliderThumb, {
|
|
@@ -17670,7 +17756,8 @@ const VRangeSlider = genericComponent()({
|
|
|
17670
17756
|
},
|
|
17671
17757
|
"min": model.value[0],
|
|
17672
17758
|
"max": max.value,
|
|
17673
|
-
"position": trackStop.value
|
|
17759
|
+
"position": trackStop.value,
|
|
17760
|
+
"ripple": props.ripple
|
|
17674
17761
|
}, {
|
|
17675
17762
|
'thumb-label': slots['thumb-label']
|
|
17676
17763
|
})]);
|
|
@@ -17817,7 +17904,9 @@ const VRating = genericComponent()({
|
|
|
17817
17904
|
value,
|
|
17818
17905
|
index,
|
|
17819
17906
|
rating: normalizedValue.value
|
|
17820
|
-
}) : createVNode(VBtn,
|
|
17907
|
+
}) : createVNode(VBtn, mergeProps({
|
|
17908
|
+
"aria-label": t(props.itemAriaLabel, value, props.length)
|
|
17909
|
+
}, btnProps), null)]), createVNode("input", {
|
|
17821
17910
|
"class": "v-rating__hidden",
|
|
17822
17911
|
"name": name.value,
|
|
17823
17912
|
"id": id,
|
|
@@ -23026,7 +23115,6 @@ const VInfiniteScrollIntersect = defineComponent({
|
|
|
23026
23115
|
intersectionRef,
|
|
23027
23116
|
isIntersecting
|
|
23028
23117
|
} = useIntersectionObserver(entries => {}, props.rootMargin ? {
|
|
23029
|
-
root: props.rootRef,
|
|
23030
23118
|
rootMargin: props.rootMargin
|
|
23031
23119
|
} : undefined);
|
|
23032
23120
|
watch(isIntersecting, async val => {
|
|
@@ -23206,6 +23294,208 @@ const VInfiniteScroll = genericComponent()({
|
|
|
23206
23294
|
|
|
23207
23295
|
// Types
|
|
23208
23296
|
|
|
23297
|
+
const makeVOtpInputProps = propsFactory({
|
|
23298
|
+
autofocus: Boolean,
|
|
23299
|
+
divider: String,
|
|
23300
|
+
focusAll: Boolean,
|
|
23301
|
+
label: {
|
|
23302
|
+
type: String,
|
|
23303
|
+
default: '$vuetify.input.otp'
|
|
23304
|
+
},
|
|
23305
|
+
length: {
|
|
23306
|
+
type: [Number, String],
|
|
23307
|
+
default: 6
|
|
23308
|
+
},
|
|
23309
|
+
modelValue: {
|
|
23310
|
+
type: [Number, String],
|
|
23311
|
+
default: undefined
|
|
23312
|
+
},
|
|
23313
|
+
placeholder: String,
|
|
23314
|
+
type: {
|
|
23315
|
+
type: String,
|
|
23316
|
+
default: 'text'
|
|
23317
|
+
},
|
|
23318
|
+
...makeDimensionProps(),
|
|
23319
|
+
...makeFocusProps(),
|
|
23320
|
+
...only(makeVFieldProps({
|
|
23321
|
+
variant: 'outlined'
|
|
23322
|
+
}), ['baseColor', 'bgColor', 'class', 'color', 'disabled', 'error', 'loading', 'rounded', 'style', 'theme', 'variant'])
|
|
23323
|
+
}, 'VOtpInput');
|
|
23324
|
+
const VOtpInput = genericComponent()({
|
|
23325
|
+
name: 'VOtpInput',
|
|
23326
|
+
props: makeVOtpInputProps(),
|
|
23327
|
+
emits: {
|
|
23328
|
+
finish: val => true,
|
|
23329
|
+
'update:focused': val => true,
|
|
23330
|
+
'update:modelValue': val => true
|
|
23331
|
+
},
|
|
23332
|
+
setup(props, _ref) {
|
|
23333
|
+
let {
|
|
23334
|
+
emit,
|
|
23335
|
+
slots
|
|
23336
|
+
} = _ref;
|
|
23337
|
+
const {
|
|
23338
|
+
dimensionStyles
|
|
23339
|
+
} = useDimension(props);
|
|
23340
|
+
const {
|
|
23341
|
+
isFocused,
|
|
23342
|
+
focus,
|
|
23343
|
+
blur
|
|
23344
|
+
} = useFocus(props);
|
|
23345
|
+
const model = useProxiedModel(props, 'modelValue', '', val => String(val).split(''), val => val.join(''));
|
|
23346
|
+
const {
|
|
23347
|
+
t
|
|
23348
|
+
} = useLocale();
|
|
23349
|
+
const fields = computed(() => Array(Number(props.length)).fill(0));
|
|
23350
|
+
const focusIndex = ref(-1);
|
|
23351
|
+
const contentRef = ref();
|
|
23352
|
+
const inputRef = ref([]);
|
|
23353
|
+
const current = computed(() => inputRef.value[focusIndex.value]);
|
|
23354
|
+
function onInput() {
|
|
23355
|
+
const array = model.value.slice();
|
|
23356
|
+
const value = current.value.value;
|
|
23357
|
+
array[focusIndex.value] = value;
|
|
23358
|
+
model.value = array;
|
|
23359
|
+
let target = null;
|
|
23360
|
+
if (focusIndex.value > model.value.length) {
|
|
23361
|
+
target = model.value.length + 1;
|
|
23362
|
+
} else if (focusIndex.value + 1 !== Number(props.length)) {
|
|
23363
|
+
target = 'next';
|
|
23364
|
+
} else {
|
|
23365
|
+
requestAnimationFrame(() => current.value?.blur());
|
|
23366
|
+
}
|
|
23367
|
+
if (target) focusChild(contentRef.value, target);
|
|
23368
|
+
}
|
|
23369
|
+
function onKeydown(e) {
|
|
23370
|
+
const array = model.value.slice();
|
|
23371
|
+
const index = focusIndex.value;
|
|
23372
|
+
let target = null;
|
|
23373
|
+
if (!['ArrowLeft', 'ArrowRight', 'Backspace', 'Delete'].includes(e.key)) return;
|
|
23374
|
+
e.preventDefault();
|
|
23375
|
+
if (e.key === 'ArrowLeft') {
|
|
23376
|
+
target = 'prev';
|
|
23377
|
+
} else if (e.key === 'ArrowRight') {
|
|
23378
|
+
target = 'next';
|
|
23379
|
+
} else if (['Backspace', 'Delete'].includes(e.key)) {
|
|
23380
|
+
array[focusIndex.value] = '';
|
|
23381
|
+
model.value = array;
|
|
23382
|
+
if (focusIndex.value > 0 && e.key === 'Backspace') {
|
|
23383
|
+
target = 'prev';
|
|
23384
|
+
} else {
|
|
23385
|
+
requestAnimationFrame(() => {
|
|
23386
|
+
inputRef.value[index].select();
|
|
23387
|
+
});
|
|
23388
|
+
}
|
|
23389
|
+
}
|
|
23390
|
+
requestAnimationFrame(() => {
|
|
23391
|
+
if (target != null) {
|
|
23392
|
+
focusChild(contentRef.value, target);
|
|
23393
|
+
}
|
|
23394
|
+
});
|
|
23395
|
+
}
|
|
23396
|
+
function onPaste(index, e) {
|
|
23397
|
+
e.preventDefault();
|
|
23398
|
+
e.stopPropagation();
|
|
23399
|
+
model.value = (e?.clipboardData?.getData('Text') ?? '').split('');
|
|
23400
|
+
inputRef.value?.[index].blur();
|
|
23401
|
+
}
|
|
23402
|
+
function reset() {
|
|
23403
|
+
model.value = [];
|
|
23404
|
+
}
|
|
23405
|
+
function onFocus(e, index) {
|
|
23406
|
+
focus();
|
|
23407
|
+
focusIndex.value = index;
|
|
23408
|
+
}
|
|
23409
|
+
function onBlur() {
|
|
23410
|
+
blur();
|
|
23411
|
+
focusIndex.value = -1;
|
|
23412
|
+
}
|
|
23413
|
+
provideDefaults({
|
|
23414
|
+
VField: {
|
|
23415
|
+
disabled: computed(() => props.disabled),
|
|
23416
|
+
error: computed(() => props.error),
|
|
23417
|
+
variant: computed(() => props.variant)
|
|
23418
|
+
}
|
|
23419
|
+
}, {
|
|
23420
|
+
scoped: true
|
|
23421
|
+
});
|
|
23422
|
+
watch(model, val => {
|
|
23423
|
+
if (val.length === props.length) emit('finish', val.join(''));
|
|
23424
|
+
}, {
|
|
23425
|
+
deep: true
|
|
23426
|
+
});
|
|
23427
|
+
watch(focusIndex, val => {
|
|
23428
|
+
if (val < 0) return;
|
|
23429
|
+
IN_BROWSER && window.requestAnimationFrame(() => {
|
|
23430
|
+
inputRef.value[val].select();
|
|
23431
|
+
});
|
|
23432
|
+
});
|
|
23433
|
+
useRender(() => {
|
|
23434
|
+
return createVNode("div", {
|
|
23435
|
+
"class": ['v-otp-input', {
|
|
23436
|
+
'v-otp-input--divided': !!props.divider
|
|
23437
|
+
}, props.class],
|
|
23438
|
+
"style": [props.style]
|
|
23439
|
+
}, [createVNode("div", {
|
|
23440
|
+
"ref": contentRef,
|
|
23441
|
+
"class": "v-otp-input__content",
|
|
23442
|
+
"style": [dimensionStyles.value]
|
|
23443
|
+
}, [fields.value.map((_, i) => createVNode(Fragment, null, [props.divider && i !== 0 && createVNode("span", {
|
|
23444
|
+
"class": "v-otp-input__divider"
|
|
23445
|
+
}, [props.divider]), createVNode(VField, {
|
|
23446
|
+
"focused": isFocused.value && props.focusAll || focusIndex.value === i,
|
|
23447
|
+
"key": i
|
|
23448
|
+
}, {
|
|
23449
|
+
...slots,
|
|
23450
|
+
default: () => {
|
|
23451
|
+
return createVNode("input", {
|
|
23452
|
+
"ref": val => inputRef.value[i] = val,
|
|
23453
|
+
"aria-label": t(props.label, i + 1),
|
|
23454
|
+
"autofocus": i === 0 && props.autofocus,
|
|
23455
|
+
"autocomplete": "one-time-code",
|
|
23456
|
+
"class": ['v-otp-input__field'],
|
|
23457
|
+
"inputmode": "text",
|
|
23458
|
+
"min": props.type === 'number' ? 0 : undefined,
|
|
23459
|
+
"maxlength": "1",
|
|
23460
|
+
"placeholder": props.placeholder,
|
|
23461
|
+
"type": props.type,
|
|
23462
|
+
"value": model.value[i],
|
|
23463
|
+
"onInput": onInput,
|
|
23464
|
+
"onFocus": e => onFocus(e, i),
|
|
23465
|
+
"onBlur": onBlur,
|
|
23466
|
+
"onKeydown": onKeydown,
|
|
23467
|
+
"onPaste": event => onPaste(i, event)
|
|
23468
|
+
}, null);
|
|
23469
|
+
}
|
|
23470
|
+
})])), createVNode(VOverlay, {
|
|
23471
|
+
"contained": true,
|
|
23472
|
+
"content-class": "v-otp-input__loader",
|
|
23473
|
+
"model-value": !!props.loading,
|
|
23474
|
+
"persistent": true
|
|
23475
|
+
}, {
|
|
23476
|
+
default: () => [slots.loader?.() ?? createVNode(VProgressCircular, {
|
|
23477
|
+
"color": typeof props.loading === 'boolean' ? undefined : props.loading,
|
|
23478
|
+
"indeterminate": true,
|
|
23479
|
+
"size": "24",
|
|
23480
|
+
"width": "2"
|
|
23481
|
+
}, null)]
|
|
23482
|
+
}), slots.default?.()])]);
|
|
23483
|
+
});
|
|
23484
|
+
return {
|
|
23485
|
+
blur: () => {
|
|
23486
|
+
inputRef.value?.some(input => input.blur());
|
|
23487
|
+
},
|
|
23488
|
+
focus: () => {
|
|
23489
|
+
inputRef.value?.[0].focus();
|
|
23490
|
+
},
|
|
23491
|
+
reset,
|
|
23492
|
+
isFocused
|
|
23493
|
+
};
|
|
23494
|
+
}
|
|
23495
|
+
});
|
|
23496
|
+
|
|
23497
|
+
// Types
|
|
23498
|
+
|
|
23209
23499
|
const rootTypes = {
|
|
23210
23500
|
actions: 'button@2',
|
|
23211
23501
|
article: 'heading, paragraph',
|
|
@@ -23337,6 +23627,373 @@ const VSkeletonLoader = genericComponent()({
|
|
|
23337
23627
|
}
|
|
23338
23628
|
});
|
|
23339
23629
|
|
|
23630
|
+
// Types
|
|
23631
|
+
|
|
23632
|
+
const makeVStepperActionsProps = propsFactory({
|
|
23633
|
+
color: String,
|
|
23634
|
+
disabled: {
|
|
23635
|
+
type: [Boolean, String],
|
|
23636
|
+
default: false
|
|
23637
|
+
},
|
|
23638
|
+
prevText: {
|
|
23639
|
+
type: String,
|
|
23640
|
+
default: '$vuetify.stepper.prev'
|
|
23641
|
+
},
|
|
23642
|
+
nextText: {
|
|
23643
|
+
type: String,
|
|
23644
|
+
default: '$vuetify.stepper.next'
|
|
23645
|
+
}
|
|
23646
|
+
}, 'VStepperActions');
|
|
23647
|
+
const VStepperActions = genericComponent()({
|
|
23648
|
+
name: 'VStepperActions',
|
|
23649
|
+
props: makeVStepperActionsProps(),
|
|
23650
|
+
emits: {
|
|
23651
|
+
'click:prev': () => true,
|
|
23652
|
+
'click:next': () => true
|
|
23653
|
+
},
|
|
23654
|
+
setup(props, _ref) {
|
|
23655
|
+
let {
|
|
23656
|
+
emit,
|
|
23657
|
+
slots
|
|
23658
|
+
} = _ref;
|
|
23659
|
+
const {
|
|
23660
|
+
t
|
|
23661
|
+
} = useLocale();
|
|
23662
|
+
function onClickPrev() {
|
|
23663
|
+
emit('click:prev');
|
|
23664
|
+
}
|
|
23665
|
+
function onClickNext() {
|
|
23666
|
+
emit('click:next');
|
|
23667
|
+
}
|
|
23668
|
+
useRender(() => {
|
|
23669
|
+
return createVNode("div", {
|
|
23670
|
+
"class": "v-stepper-actions"
|
|
23671
|
+
}, [createVNode(VBtn, {
|
|
23672
|
+
"disabled": ['prev', true].includes(props.disabled),
|
|
23673
|
+
"text": t(props.prevText),
|
|
23674
|
+
"variant": "text",
|
|
23675
|
+
"onClick": onClickPrev
|
|
23676
|
+
}, null), createVNode(VBtn, {
|
|
23677
|
+
"disabled": ['next', true].includes(props.disabled),
|
|
23678
|
+
"color": props.color,
|
|
23679
|
+
"text": t(props.nextText),
|
|
23680
|
+
"variant": "tonal",
|
|
23681
|
+
"onClick": onClickNext
|
|
23682
|
+
}, null)]);
|
|
23683
|
+
});
|
|
23684
|
+
return {};
|
|
23685
|
+
}
|
|
23686
|
+
});
|
|
23687
|
+
|
|
23688
|
+
// Utilities
|
|
23689
|
+
const VStepperHeader = createSimpleFunctional('v-stepper-header');
|
|
23690
|
+
|
|
23691
|
+
// Types
|
|
23692
|
+
|
|
23693
|
+
const makeVStepperItemProps = propsFactory({
|
|
23694
|
+
color: String,
|
|
23695
|
+
title: String,
|
|
23696
|
+
subtitle: String,
|
|
23697
|
+
complete: Boolean,
|
|
23698
|
+
completeIcon: {
|
|
23699
|
+
type: String,
|
|
23700
|
+
default: '$complete'
|
|
23701
|
+
},
|
|
23702
|
+
editable: Boolean,
|
|
23703
|
+
editIcon: {
|
|
23704
|
+
type: String,
|
|
23705
|
+
default: '$edit'
|
|
23706
|
+
},
|
|
23707
|
+
error: Boolean,
|
|
23708
|
+
errorIcon: {
|
|
23709
|
+
type: String,
|
|
23710
|
+
default: '$error'
|
|
23711
|
+
},
|
|
23712
|
+
icon: String,
|
|
23713
|
+
ripple: {
|
|
23714
|
+
type: [Boolean, Object],
|
|
23715
|
+
default: true
|
|
23716
|
+
},
|
|
23717
|
+
rules: {
|
|
23718
|
+
type: Array,
|
|
23719
|
+
default: () => []
|
|
23720
|
+
},
|
|
23721
|
+
...makeGroupItemProps()
|
|
23722
|
+
}, 'VStepperItem');
|
|
23723
|
+
const VStepperItem = genericComponent()({
|
|
23724
|
+
name: 'VStepperItem',
|
|
23725
|
+
directives: {
|
|
23726
|
+
Ripple
|
|
23727
|
+
},
|
|
23728
|
+
props: makeVStepperItemProps(),
|
|
23729
|
+
emits: {
|
|
23730
|
+
'group:selected': val => true
|
|
23731
|
+
},
|
|
23732
|
+
setup(props, _ref) {
|
|
23733
|
+
let {
|
|
23734
|
+
slots
|
|
23735
|
+
} = _ref;
|
|
23736
|
+
const group = useGroupItem(props, VStepperSymbol, true);
|
|
23737
|
+
const step = computed(() => group?.value.value ?? props.value);
|
|
23738
|
+
const isValid = computed(() => props.rules.every(handler => handler() === true));
|
|
23739
|
+
const canEdit = computed(() => !props.disabled && props.editable);
|
|
23740
|
+
const hasError = computed(() => props.error || !isValid.value);
|
|
23741
|
+
const hasCompleted = computed(() => props.complete || props.rules.length > 0 && isValid.value);
|
|
23742
|
+
const icon = computed(() => {
|
|
23743
|
+
if (hasError.value) return props.errorIcon;
|
|
23744
|
+
if (hasCompleted.value) return props.completeIcon;
|
|
23745
|
+
if (props.editable) return props.editIcon;
|
|
23746
|
+
return props.icon;
|
|
23747
|
+
});
|
|
23748
|
+
const slotProps = computed(() => ({
|
|
23749
|
+
canEdit: canEdit.value,
|
|
23750
|
+
hasError: hasError.value,
|
|
23751
|
+
hasCompleted: hasCompleted.value,
|
|
23752
|
+
title: props.title,
|
|
23753
|
+
subtitle: props.subtitle,
|
|
23754
|
+
step: step.value,
|
|
23755
|
+
value: props.value
|
|
23756
|
+
}));
|
|
23757
|
+
useRender(() => {
|
|
23758
|
+
const hasColor = (!group || group.isSelected.value || hasCompleted.value || canEdit.value) && !hasError.value && !props.disabled;
|
|
23759
|
+
const hasTitle = !!(props.title || slots.title);
|
|
23760
|
+
const hasSubtitle = !!(props.subtitle || slots.subtitle);
|
|
23761
|
+
function onClick() {
|
|
23762
|
+
group?.toggle();
|
|
23763
|
+
}
|
|
23764
|
+
return withDirectives(createVNode("button", {
|
|
23765
|
+
"class": ['v-stepper-item', {
|
|
23766
|
+
'v-stepper-item--complete': hasCompleted.value,
|
|
23767
|
+
'v-stepper-item--disabled': props.disabled,
|
|
23768
|
+
'v-stepper-item--error': hasError.value
|
|
23769
|
+
}, group?.selectedClass.value],
|
|
23770
|
+
"disabled": !props.editable,
|
|
23771
|
+
"onClick": onClick
|
|
23772
|
+
}, [createVNode(VAvatar, {
|
|
23773
|
+
"key": "stepper-avatar",
|
|
23774
|
+
"class": "v-stepper-item__avatar",
|
|
23775
|
+
"color": hasColor ? props.color : undefined,
|
|
23776
|
+
"size": 24
|
|
23777
|
+
}, {
|
|
23778
|
+
default: () => [slots.icon?.(slotProps.value) ?? (icon.value ? createVNode(VIcon, {
|
|
23779
|
+
"icon": icon.value
|
|
23780
|
+
}, null) : step.value)]
|
|
23781
|
+
}), createVNode("div", {
|
|
23782
|
+
"class": "v-stepper-item__content"
|
|
23783
|
+
}, [hasTitle && createVNode("div", {
|
|
23784
|
+
"key": "title",
|
|
23785
|
+
"class": "v-stepper-item__title"
|
|
23786
|
+
}, [slots.title?.(slotProps.value) ?? props.title]), hasSubtitle && createVNode("div", {
|
|
23787
|
+
"key": "subtitle",
|
|
23788
|
+
"class": "v-stepper-item__subtitle"
|
|
23789
|
+
}, [slots.subtitle?.(slotProps.value) ?? props.subtitle]), slots.default?.(slotProps.value)])]), [[resolveDirective("ripple"), props.ripple && props.editable, null]]);
|
|
23790
|
+
});
|
|
23791
|
+
return {};
|
|
23792
|
+
}
|
|
23793
|
+
});
|
|
23794
|
+
|
|
23795
|
+
// Types
|
|
23796
|
+
|
|
23797
|
+
const VStepperSymbol$1 = Symbol.for('vuetify:v-stepper');
|
|
23798
|
+
const makeVStepperWindowProps = propsFactory({
|
|
23799
|
+
...makeVWindowProps({
|
|
23800
|
+
mandatory: false
|
|
23801
|
+
})
|
|
23802
|
+
}, 'VStepperWindow');
|
|
23803
|
+
const VStepperWindow = genericComponent()({
|
|
23804
|
+
name: 'VStepperWindow',
|
|
23805
|
+
props: makeVStepperWindowProps(),
|
|
23806
|
+
emits: {
|
|
23807
|
+
'update:modelValue': v => true
|
|
23808
|
+
},
|
|
23809
|
+
setup(props, _ref) {
|
|
23810
|
+
let {
|
|
23811
|
+
slots
|
|
23812
|
+
} = _ref;
|
|
23813
|
+
const group = inject$1(VStepperSymbol$1, null);
|
|
23814
|
+
const _model = useProxiedModel(props, 'modelValue');
|
|
23815
|
+
const model = computed({
|
|
23816
|
+
get() {
|
|
23817
|
+
// Always return modelValue if defined
|
|
23818
|
+
// or if not within a VStepper group
|
|
23819
|
+
if (_model.value != null || !group) return _model.value;
|
|
23820
|
+
|
|
23821
|
+
// If inside of a VStepper, find the currently selected
|
|
23822
|
+
// item by id. Item value may be assigned by its index
|
|
23823
|
+
return group.items.value.find(item => group.selected.value.includes(item.id))?.value;
|
|
23824
|
+
},
|
|
23825
|
+
set(val) {
|
|
23826
|
+
_model.value = val;
|
|
23827
|
+
}
|
|
23828
|
+
});
|
|
23829
|
+
useRender(() => {
|
|
23830
|
+
const [windowProps] = VWindow.filterProps(props);
|
|
23831
|
+
return createVNode(VWindow, mergeProps(windowProps, {
|
|
23832
|
+
"modelValue": model.value,
|
|
23833
|
+
"onUpdate:modelValue": $event => model.value = $event,
|
|
23834
|
+
"class": "v-stepper-window"
|
|
23835
|
+
}), slots);
|
|
23836
|
+
});
|
|
23837
|
+
return {};
|
|
23838
|
+
}
|
|
23839
|
+
});
|
|
23840
|
+
|
|
23841
|
+
const makeVStepperWindowItemProps = propsFactory({
|
|
23842
|
+
...makeVWindowItemProps()
|
|
23843
|
+
}, 'VStepperWindowItem');
|
|
23844
|
+
const VStepperWindowItem = genericComponent()({
|
|
23845
|
+
name: 'VStepperWindowItem',
|
|
23846
|
+
props: makeVStepperWindowItemProps(),
|
|
23847
|
+
setup(props, _ref) {
|
|
23848
|
+
let {
|
|
23849
|
+
slots
|
|
23850
|
+
} = _ref;
|
|
23851
|
+
useRender(() => {
|
|
23852
|
+
const [windowItemProps] = VWindowItem.filterProps(props);
|
|
23853
|
+
return createVNode(VWindowItem, mergeProps(windowItemProps, {
|
|
23854
|
+
"class": "v-stepper-window-item"
|
|
23855
|
+
}), slots);
|
|
23856
|
+
});
|
|
23857
|
+
return {};
|
|
23858
|
+
}
|
|
23859
|
+
});
|
|
23860
|
+
|
|
23861
|
+
// Types
|
|
23862
|
+
|
|
23863
|
+
const VStepperSymbol = Symbol.for('vuetify:v-stepper');
|
|
23864
|
+
const makeVStepperProps = propsFactory({
|
|
23865
|
+
altLabels: Boolean,
|
|
23866
|
+
bgColor: String,
|
|
23867
|
+
editable: Boolean,
|
|
23868
|
+
hideActions: Boolean,
|
|
23869
|
+
items: {
|
|
23870
|
+
type: Array,
|
|
23871
|
+
default: () => []
|
|
23872
|
+
},
|
|
23873
|
+
itemTitle: {
|
|
23874
|
+
type: String,
|
|
23875
|
+
default: 'title'
|
|
23876
|
+
},
|
|
23877
|
+
itemValue: {
|
|
23878
|
+
type: String,
|
|
23879
|
+
default: 'value'
|
|
23880
|
+
},
|
|
23881
|
+
mobile: Boolean,
|
|
23882
|
+
nonLinear: Boolean,
|
|
23883
|
+
flat: Boolean,
|
|
23884
|
+
...makeGroupProps({
|
|
23885
|
+
mandatory: 'force',
|
|
23886
|
+
selectedClass: 'v-stepper-item--selected'
|
|
23887
|
+
}),
|
|
23888
|
+
...makeVSheetProps(),
|
|
23889
|
+
...only(makeVStepperActionsProps(), ['prevText', 'nextText'])
|
|
23890
|
+
}, 'VStepper');
|
|
23891
|
+
const VStepper = genericComponent()({
|
|
23892
|
+
name: 'VStepper',
|
|
23893
|
+
props: makeVStepperProps(),
|
|
23894
|
+
emits: {
|
|
23895
|
+
'update:modelValue': v => true
|
|
23896
|
+
},
|
|
23897
|
+
setup(props, _ref) {
|
|
23898
|
+
let {
|
|
23899
|
+
slots
|
|
23900
|
+
} = _ref;
|
|
23901
|
+
// TODO: fix typing
|
|
23902
|
+
const {
|
|
23903
|
+
items: _items,
|
|
23904
|
+
next,
|
|
23905
|
+
prev,
|
|
23906
|
+
selected
|
|
23907
|
+
} = useGroup(props, VStepperSymbol);
|
|
23908
|
+
const {
|
|
23909
|
+
color,
|
|
23910
|
+
editable,
|
|
23911
|
+
prevText,
|
|
23912
|
+
nextText
|
|
23913
|
+
} = toRefs(props);
|
|
23914
|
+
const items = computed(() => props.items.map((item, index) => {
|
|
23915
|
+
const title = getPropertyFromItem(item, props.itemTitle, item);
|
|
23916
|
+
const value = getPropertyFromItem(item, props.itemValue, index + 1);
|
|
23917
|
+
return {
|
|
23918
|
+
title,
|
|
23919
|
+
value,
|
|
23920
|
+
raw: item
|
|
23921
|
+
};
|
|
23922
|
+
}));
|
|
23923
|
+
const activeIndex = computed(() => {
|
|
23924
|
+
return _items.value.findIndex(item => selected.value.includes(item.id));
|
|
23925
|
+
});
|
|
23926
|
+
const disabled = computed(() => {
|
|
23927
|
+
if (props.disabled) return props.disabled;
|
|
23928
|
+
if (activeIndex.value === 0) return 'prev';
|
|
23929
|
+
if (activeIndex.value === _items.value.length - 1) return 'next';
|
|
23930
|
+
return false;
|
|
23931
|
+
});
|
|
23932
|
+
provideDefaults({
|
|
23933
|
+
VStepperItem: {
|
|
23934
|
+
editable,
|
|
23935
|
+
prevText,
|
|
23936
|
+
nextText
|
|
23937
|
+
},
|
|
23938
|
+
VStepperActions: {
|
|
23939
|
+
color,
|
|
23940
|
+
disabled,
|
|
23941
|
+
prevText,
|
|
23942
|
+
nextText
|
|
23943
|
+
}
|
|
23944
|
+
});
|
|
23945
|
+
useRender(() => {
|
|
23946
|
+
const [sheetProps] = VSheet.filterProps(props);
|
|
23947
|
+
const hasHeader = !!(slots.header || props.items.length);
|
|
23948
|
+
const hasWindow = props.items.length > 0;
|
|
23949
|
+
const hasActions = !props.hideActions && !!(hasWindow || slots.actions);
|
|
23950
|
+
return createVNode(VSheet, mergeProps(sheetProps, {
|
|
23951
|
+
"color": props.bgColor,
|
|
23952
|
+
"class": ['v-stepper', {
|
|
23953
|
+
'v-stepper--alt-labels': props.altLabels,
|
|
23954
|
+
'v-stepper--flat': props.flat,
|
|
23955
|
+
'v-stepper--non-linear': props.nonLinear,
|
|
23956
|
+
'v-stepper--mobile': props.mobile
|
|
23957
|
+
}, props.class],
|
|
23958
|
+
"style": props.style
|
|
23959
|
+
}), {
|
|
23960
|
+
default: () => [hasHeader && createVNode(VStepperHeader, {
|
|
23961
|
+
"key": "stepper-header"
|
|
23962
|
+
}, {
|
|
23963
|
+
default: () => [items.value.map((item, index) => createVNode(Fragment, null, [!!index && createVNode(VDivider, null, null), createVNode(VStepperItem, item, {
|
|
23964
|
+
default: slots[`header-item.${item.value}`] ?? slots.header,
|
|
23965
|
+
icon: slots.icon,
|
|
23966
|
+
title: slots.title,
|
|
23967
|
+
subtitle: slots.subtitle
|
|
23968
|
+
})]))]
|
|
23969
|
+
}), hasWindow && createVNode(VStepperWindow, {
|
|
23970
|
+
"key": "stepper-window"
|
|
23971
|
+
}, {
|
|
23972
|
+
default: () => [items.value.map(item => createVNode(VStepperWindowItem, {
|
|
23973
|
+
"value": item.value
|
|
23974
|
+
}, {
|
|
23975
|
+
default: () => slots[`item.${item.value}`]?.(item) ?? slots.item?.(item)
|
|
23976
|
+
}))]
|
|
23977
|
+
}), slots.default?.({
|
|
23978
|
+
prev,
|
|
23979
|
+
next
|
|
23980
|
+
}), hasActions && (slots.actions?.({
|
|
23981
|
+
next,
|
|
23982
|
+
prev
|
|
23983
|
+
}) ?? createVNode(VStepperActions, {
|
|
23984
|
+
"key": "stepper-actions",
|
|
23985
|
+
"onClick:prev": prev,
|
|
23986
|
+
"onClick:next": next
|
|
23987
|
+
}, null))]
|
|
23988
|
+
});
|
|
23989
|
+
});
|
|
23990
|
+
return {
|
|
23991
|
+
prev,
|
|
23992
|
+
next
|
|
23993
|
+
};
|
|
23994
|
+
}
|
|
23995
|
+
});
|
|
23996
|
+
|
|
23340
23997
|
var components = /*#__PURE__*/Object.freeze({
|
|
23341
23998
|
__proto__: null,
|
|
23342
23999
|
VAlert: VAlert,
|
|
@@ -23439,6 +24096,7 @@ var components = /*#__PURE__*/Object.freeze({
|
|
|
23439
24096
|
VMessages: VMessages,
|
|
23440
24097
|
VNavigationDrawer: VNavigationDrawer,
|
|
23441
24098
|
VNoSsr: VNoSsr,
|
|
24099
|
+
VOtpInput: VOtpInput,
|
|
23442
24100
|
VOverlay: VOverlay,
|
|
23443
24101
|
VPagination: VPagination,
|
|
23444
24102
|
VParallax: VParallax,
|
|
@@ -23471,6 +24129,12 @@ var components = /*#__PURE__*/Object.freeze({
|
|
|
23471
24129
|
VSlider: VSlider,
|
|
23472
24130
|
VSnackbar: VSnackbar,
|
|
23473
24131
|
VSpacer: VSpacer,
|
|
24132
|
+
VStepper: VStepper,
|
|
24133
|
+
VStepperActions: VStepperActions,
|
|
24134
|
+
VStepperHeader: VStepperHeader,
|
|
24135
|
+
VStepperItem: VStepperItem,
|
|
24136
|
+
VStepperWindow: VStepperWindow,
|
|
24137
|
+
VStepperWindowItem: VStepperWindowItem,
|
|
23474
24138
|
VSvgIcon: VSvgIcon,
|
|
23475
24139
|
VSwitch: VSwitch,
|
|
23476
24140
|
VSystemBar: VSystemBar,
|
|
@@ -23708,7 +24372,7 @@ function createVuetify$1() {
|
|
|
23708
24372
|
date
|
|
23709
24373
|
};
|
|
23710
24374
|
}
|
|
23711
|
-
const version$1 = "3.3.
|
|
24375
|
+
const version$1 = "3.3.11-dev.2023-08-07";
|
|
23712
24376
|
createVuetify$1.version = version$1;
|
|
23713
24377
|
|
|
23714
24378
|
// Vue's inject() can only be used in setup
|
|
@@ -23722,7 +24386,7 @@ function inject(key) {
|
|
|
23722
24386
|
|
|
23723
24387
|
/* eslint-disable local-rules/sort-imports */
|
|
23724
24388
|
|
|
23725
|
-
const version = "3.3.
|
|
24389
|
+
const version = "3.3.11-dev.2023-08-07";
|
|
23726
24390
|
|
|
23727
24391
|
/* eslint-disable local-rules/sort-imports */
|
|
23728
24392
|
|