@vuetify/nightly 3.4.0-alpha.1-dev.2023-10-21 → 3.4.0-alpha.1-dev.2023-10-26
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 +6 -3
- package/dist/_component-variables-labs.sass +1 -4
- package/dist/_component-variables.sass +3 -0
- package/dist/json/attributes.json +26 -26
- package/dist/json/importMap-labs.json +20 -52
- package/dist/json/importMap.json +56 -24
- package/dist/json/web-types.json +30 -30
- package/dist/vuetify-labs.css +725 -724
- package/dist/vuetify-labs.d.ts +41344 -36620
- package/dist/vuetify-labs.esm.js +5358 -5336
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +5357 -5335
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +385 -13
- package/dist/vuetify.d.ts +19744 -12997
- package/dist/vuetify.esm.js +735 -145
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +734 -144
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +808 -779
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VAlert/index.d.mts +114 -106
- package/lib/components/VApp/index.d.mts +24 -47
- package/lib/components/VAppBar/index.d.mts +219 -175
- package/lib/components/VAutocomplete/VAutocomplete.mjs +13 -10
- package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
- package/lib/components/VAutocomplete/index.d.mts +1203 -551
- package/lib/components/VAvatar/index.d.mts +45 -53
- package/lib/components/VBadge/index.d.mts +66 -58
- package/lib/components/VBanner/index.d.mts +106 -146
- package/lib/components/VBottomNavigation/index.d.mts +72 -63
- package/lib/{labs → components}/VBottomSheet/VBottomSheet.mjs +1 -1
- package/lib/components/VBottomSheet/VBottomSheet.mjs.map +1 -0
- package/lib/{labs → components}/VBottomSheet/index.d.mts +153 -83
- package/lib/components/VBottomSheet/index.mjs.map +1 -0
- package/lib/components/VBreadcrumbs/index.d.mts +89 -147
- package/lib/components/VBtn/index.d.mts +107 -66
- package/lib/components/VBtnGroup/index.d.mts +38 -51
- package/lib/components/VBtnToggle/index.d.mts +53 -55
- package/lib/components/VCard/index.d.mts +238 -298
- package/lib/components/VCarousel/index.d.mts +251 -131
- package/lib/components/VCheckbox/index.d.mts +259 -146
- package/lib/components/VChip/index.d.mts +157 -76
- package/lib/components/VChipGroup/index.d.mts +76 -55
- package/lib/components/VCode/index.d.mts +21 -46
- package/lib/components/VColorPicker/index.d.mts +112 -61
- package/lib/components/VCombobox/VCombobox.mjs +13 -10
- package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
- package/lib/components/VCombobox/index.d.mts +1203 -551
- package/lib/components/VCounter/index.d.mts +45 -57
- package/lib/components/VDefaultsProvider/index.d.mts +24 -49
- package/lib/components/VDialog/index.d.mts +583 -329
- package/lib/components/VDivider/index.d.mts +30 -49
- package/lib/components/VExpansionPanel/index.d.mts +188 -212
- package/lib/components/VField/index.d.mts +88 -105
- package/lib/components/VFileInput/index.d.mts +472 -287
- package/lib/components/VFooter/index.d.mts +42 -52
- package/lib/components/VForm/index.d.mts +149 -51
- package/lib/components/VGrid/index.d.mts +146 -196
- package/lib/components/VHover/index.d.mts +37 -49
- package/lib/components/VIcon/index.d.mts +79 -234
- package/lib/components/VImg/index.d.mts +80 -61
- package/lib/components/VInput/index.d.mts +90 -66
- package/lib/components/VItemGroup/index.d.mts +115 -99
- package/lib/components/VKbd/index.d.mts +21 -46
- package/lib/components/VLabel/index.d.mts +24 -47
- package/lib/components/VLayout/index.d.mts +55 -96
- package/lib/components/VLazy/index.d.mts +43 -50
- package/lib/components/VList/index.d.mts +403 -468
- package/lib/components/VLocaleProvider/index.d.mts +24 -46
- package/lib/components/VMain/index.d.mts +24 -47
- package/lib/components/VMenu/index.d.mts +573 -324
- package/lib/components/VMessages/index.d.mts +41 -49
- package/lib/components/VNavigationDrawer/VNavigationDrawer.css +1 -0
- package/lib/components/VNavigationDrawer/VNavigationDrawer.sass +1 -0
- package/lib/components/VNavigationDrawer/index.d.mts +95 -67
- package/lib/components/VOverlay/index.d.mts +138 -76
- package/lib/components/VPagination/index.d.mts +114 -73
- package/lib/components/VParallax/index.d.mts +31 -47
- package/lib/components/VProgressCircular/index.d.mts +48 -53
- package/lib/components/VProgressLinear/index.d.mts +84 -63
- package/lib/components/VRadio/index.d.mts +93 -61
- package/lib/components/VRadioGroup/index.d.mts +130 -77
- package/lib/components/VRangeSlider/index.d.mts +169 -86
- package/lib/components/VRating/index.d.mts +75 -62
- package/lib/components/VResponsive/index.d.mts +33 -47
- package/lib/components/VSelect/VSelect.mjs +13 -10
- package/lib/components/VSelect/VSelect.mjs.map +1 -1
- package/lib/components/VSelect/index.d.mts +1191 -546
- package/lib/components/VSelectionControl/index.d.mts +48 -53
- package/lib/components/VSelectionControlGroup/index.d.mts +58 -57
- package/lib/components/VSheet/index.d.mts +37 -48
- package/lib/components/VSkeletonLoader/VSkeletonLoader.mjs.map +1 -0
- package/lib/{labs → components}/VSkeletonLoader/index.d.mts +36 -51
- package/lib/components/VSkeletonLoader/index.mjs.map +1 -0
- package/lib/components/VSlideGroup/index.d.mts +106 -105
- package/lib/components/VSlider/index.d.mts +166 -85
- package/lib/components/VSnackbar/index.d.mts +572 -324
- package/lib/components/VStepper/VStepper.mjs +137 -98
- package/lib/components/VStepper/VStepper.mjs.map +1 -1
- package/lib/components/VStepper/VStepper.sass +38 -198
- package/lib/{labs → components}/VStepper/VStepperActions.mjs +2 -2
- package/lib/components/VStepper/VStepperActions.mjs.map +1 -0
- package/lib/components/VStepper/VStepperHeader.mjs.map +1 -0
- package/lib/{labs → components}/VStepper/VStepperItem.mjs +2 -2
- package/lib/components/VStepper/VStepperItem.mjs.map +1 -0
- package/lib/{labs → components}/VStepper/VStepperWindow.mjs +1 -1
- package/lib/components/VStepper/VStepperWindow.mjs.map +1 -0
- package/lib/{labs → components}/VStepper/VStepperWindowItem.mjs +1 -1
- package/lib/components/VStepper/VStepperWindowItem.mjs.map +1 -0
- package/lib/components/VStepper/_variables.scss +21 -31
- package/lib/{labs → components}/VStepper/index.d.mts +368 -340
- package/lib/components/VStepper/index.mjs +6 -17
- package/lib/components/VStepper/index.mjs.map +1 -1
- package/lib/components/VSwitch/index.d.mts +168 -86
- package/lib/components/VSystemBar/index.d.mts +39 -51
- package/lib/components/VTable/index.d.mts +45 -51
- package/lib/components/VTabs/index.d.mts +177 -132
- package/lib/components/VTextField/index.d.mts +665 -470
- package/lib/components/VTextarea/index.d.mts +469 -297
- package/lib/components/VThemeProvider/index.d.mts +26 -48
- package/lib/components/VTimeline/index.d.mts +98 -106
- package/lib/components/VToolbar/index.d.mts +119 -150
- package/lib/components/VTooltip/index.d.mts +565 -321
- package/lib/components/VValidation/index.d.mts +108 -62
- package/lib/components/VVirtualScroll/index.d.mts +18 -46
- package/lib/components/VWindow/index.d.mts +130 -110
- package/lib/components/index.d.mts +19539 -12808
- package/lib/components/index.mjs +4 -2
- package/lib/components/index.mjs.map +1 -1
- package/lib/components/transitions/index.d.mts +455 -819
- package/lib/composables/color.mjs +2 -2
- package/lib/composables/color.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/framework.mjs +1 -1
- package/lib/index.d.mts +22 -22
- package/lib/labs/VDataIterator/index.d.mts +112 -75
- package/lib/labs/VDataTable/index.d.mts +1456 -530
- package/lib/labs/VDateInput/index.d.mts +260 -157
- package/lib/labs/VDatePicker/index.d.mts +1100 -889
- package/lib/labs/VDateRangePicker/index.d.mts +207 -129
- package/lib/labs/VInfiniteScroll/index.d.mts +59 -54
- package/lib/labs/VOtpInput/index.d.mts +80 -64
- package/lib/labs/VPicker/index.d.mts +74 -97
- package/lib/labs/components.d.mts +7777 -9883
- package/lib/labs/components.mjs +0 -3
- package/lib/labs/components.mjs.map +1 -1
- package/lib/labs/date/adapters/vuetify.mjs +6 -3
- package/lib/labs/date/adapters/vuetify.mjs.map +1 -1
- package/lib/locale/fr.mjs +19 -19
- package/lib/locale/fr.mjs.map +1 -1
- package/lib/util/colorUtils.mjs +3 -0
- package/lib/util/colorUtils.mjs.map +1 -1
- package/lib/util/helpers.mjs +8 -1
- package/lib/util/helpers.mjs.map +1 -1
- package/package.json +1 -1
- package/lib/components/VStepper/VStepperContent.mjs +0 -114
- package/lib/components/VStepper/VStepperContent.mjs.map +0 -1
- package/lib/components/VStepper/VStepperStep.mjs +0 -134
- package/lib/components/VStepper/VStepperStep.mjs.map +0 -1
- package/lib/labs/VBottomSheet/VBottomSheet.mjs.map +0 -1
- package/lib/labs/VBottomSheet/index.mjs.map +0 -1
- package/lib/labs/VSkeletonLoader/VSkeletonLoader.mjs.map +0 -1
- package/lib/labs/VSkeletonLoader/index.mjs.map +0 -1
- package/lib/labs/VStepper/VStepper.mjs +0 -149
- package/lib/labs/VStepper/VStepper.mjs.map +0 -1
- package/lib/labs/VStepper/VStepper.sass +0 -53
- package/lib/labs/VStepper/VStepperActions.mjs.map +0 -1
- package/lib/labs/VStepper/VStepperHeader.mjs.map +0 -1
- package/lib/labs/VStepper/VStepperItem.mjs.map +0 -1
- package/lib/labs/VStepper/VStepperWindow.mjs.map +0 -1
- package/lib/labs/VStepper/VStepperWindowItem.mjs.map +0 -1
- package/lib/labs/VStepper/_variables.scss +0 -27
- package/lib/labs/VStepper/index.mjs +0 -7
- package/lib/labs/VStepper/index.mjs.map +0 -1
- /package/lib/{labs → components}/VBottomSheet/VBottomSheet.css +0 -0
- /package/lib/{labs → components}/VBottomSheet/VBottomSheet.sass +0 -0
- /package/lib/{labs → components}/VBottomSheet/_variables.scss +0 -0
- /package/lib/{labs → components}/VBottomSheet/index.mjs +0 -0
- /package/lib/{labs → components}/VSkeletonLoader/VSkeletonLoader.css +0 -0
- /package/lib/{labs → components}/VSkeletonLoader/VSkeletonLoader.mjs +0 -0
- /package/lib/{labs → components}/VSkeletonLoader/VSkeletonLoader.sass +0 -0
- /package/lib/{labs → components}/VSkeletonLoader/_variables.scss +0 -0
- /package/lib/{labs → components}/VSkeletonLoader/index.mjs +0 -0
- /package/lib/{labs → components}/VStepper/VStepper.css +0 -0
- /package/lib/{labs → components}/VStepper/VStepperHeader.mjs +0 -0
- /package/lib/{labs → components}/VStepper/VStepperItem.css +0 -0
- /package/lib/{labs → components}/VStepper/VStepperItem.sass +0 -0
package/dist/vuetify.esm.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Vuetify v3.4.0-alpha.1-dev.2023-10-
|
|
2
|
+
* Vuetify v3.4.0-alpha.1-dev.2023-10-26
|
|
3
3
|
* Forged by John Leider
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { Fragment, reactive, computed, watchEffect, toRefs, capitalize, warn, ref, unref, provide, shallowRef, inject as inject$1, defineComponent as defineComponent$1, camelize, h, getCurrentInstance as getCurrentInstance$1, onBeforeUnmount, watch, readonly, onDeactivated, onActivated, onMounted, onScopeDispose, effectScope, toRaw, createVNode, TransitionGroup, Transition, mergeProps, onBeforeMount, nextTick, withDirectives, resolveDirective, vShow, isRef, toRef, Text, resolveDynamicComponent, Teleport, cloneVNode, createTextVNode, onUnmounted, onBeforeUpdate, vModelText } from 'vue';
|
|
7
|
+
import { Fragment, reactive, computed, watchEffect, toRefs, capitalize, isVNode, Comment, warn, ref, unref, provide, shallowRef, inject as inject$1, defineComponent as defineComponent$1, camelize, h, getCurrentInstance as getCurrentInstance$1, onBeforeUnmount, watch, readonly, onDeactivated, onActivated, onMounted, onScopeDispose, effectScope, toRaw, createVNode, TransitionGroup, Transition, mergeProps, onBeforeMount, nextTick, withDirectives, resolveDirective, vShow, isRef, toRef, Text, resolveDynamicComponent, Teleport, cloneVNode, createTextVNode, onUnmounted, onBeforeUpdate, vModelText } from 'vue';
|
|
8
8
|
|
|
9
9
|
// Types
|
|
10
10
|
// eslint-disable-line vue/prefer-import-from-vue
|
|
@@ -234,6 +234,11 @@ function omit(obj, exclude) {
|
|
|
234
234
|
exclude.forEach(prop => delete clone[prop]);
|
|
235
235
|
return clone;
|
|
236
236
|
}
|
|
237
|
+
function only(obj, include) {
|
|
238
|
+
const clone = {};
|
|
239
|
+
include.forEach(prop => clone[prop] = obj[prop]);
|
|
240
|
+
return clone;
|
|
241
|
+
}
|
|
237
242
|
const onRE = /^on[^a-z]/;
|
|
238
243
|
const isOn = key => onRE.test(key);
|
|
239
244
|
const bubblingEvents = ['onAfterscriptexecute', 'onAnimationcancel', 'onAnimationend', 'onAnimationiteration', 'onAnimationstart', 'onAuxclick', 'onBeforeinput', 'onBeforescriptexecute', 'onChange', 'onClick', 'onCompositionend', 'onCompositionstart', 'onCompositionupdate', 'onContextmenu', 'onCopy', 'onCut', 'onDblclick', 'onFocusin', 'onFocusout', 'onFullscreenchange', 'onFullscreenerror', 'onGesturechange', 'onGestureend', 'onGesturestart', 'onGotpointercapture', 'onInput', 'onKeydown', 'onKeypress', 'onKeyup', 'onLostpointercapture', 'onMousedown', 'onMousemove', 'onMouseout', 'onMouseover', 'onMouseup', 'onMousewheel', 'onPaste', 'onPointercancel', 'onPointerdown', 'onPointerenter', 'onPointerleave', 'onPointermove', 'onPointerout', 'onPointerover', 'onPointerup', 'onReset', 'onSelect', 'onSubmit', 'onTouchcancel', 'onTouchend', 'onTouchmove', 'onTouchstart', 'onTransitioncancel', 'onTransitionend', 'onTransitionrun', 'onTransitionstart', 'onWheel'];
|
|
@@ -474,6 +479,13 @@ function matchesSelector(el, selector) {
|
|
|
474
479
|
return null;
|
|
475
480
|
}
|
|
476
481
|
}
|
|
482
|
+
function ensureValidVNode(vnodes) {
|
|
483
|
+
return vnodes.some(child => {
|
|
484
|
+
if (!isVNode(child)) return true;
|
|
485
|
+
if (child.type === Comment) return false;
|
|
486
|
+
return child.type !== Fragment || ensureValidVNode(child.children);
|
|
487
|
+
}) ? vnodes : null;
|
|
488
|
+
}
|
|
477
489
|
|
|
478
490
|
// Utilities
|
|
479
491
|
const block = ['top', 'bottom'];
|
|
@@ -866,6 +878,9 @@ function toXYZ(_ref) {
|
|
|
866
878
|
function isCssColor(color) {
|
|
867
879
|
return !!color && /^(#|var\(--|(rgb|hsl)a?\()/.test(color);
|
|
868
880
|
}
|
|
881
|
+
function isParsableColor(color) {
|
|
882
|
+
return isCssColor(color) && !/^((rgb|hsl)a?\()?var\(--/.test(color);
|
|
883
|
+
}
|
|
869
884
|
const cssColorRe = /^(?<fn>(?:rgb|hsl)a?)\((?<values>.+)\)/;
|
|
870
885
|
const mappers = {
|
|
871
886
|
rgb: (r, g, b, a) => ({
|
|
@@ -3302,7 +3317,7 @@ function useColor(colors) {
|
|
|
3302
3317
|
if (colors.value.background) {
|
|
3303
3318
|
if (isCssColor(colors.value.background)) {
|
|
3304
3319
|
styles.backgroundColor = colors.value.background;
|
|
3305
|
-
if (!colors.value.text) {
|
|
3320
|
+
if (!colors.value.text && isParsableColor(colors.value.background)) {
|
|
3306
3321
|
const backgroundColor = parseColor(colors.value.background);
|
|
3307
3322
|
if (backgroundColor.a == null || backgroundColor.a === 1) {
|
|
3308
3323
|
const textColor = getForeground(backgroundColor);
|
|
@@ -11250,6 +11265,16 @@ const VSelect = genericComponent()({
|
|
|
11250
11265
|
modelValue: true,
|
|
11251
11266
|
'onUpdate:modelValue': undefined
|
|
11252
11267
|
};
|
|
11268
|
+
const hasSlot = hasChips ? !!slots.chip : !!slots.selection;
|
|
11269
|
+
const slotContent = hasSlot ? ensureValidVNode(hasChips ? slots.chip({
|
|
11270
|
+
item,
|
|
11271
|
+
index,
|
|
11272
|
+
props: slotProps
|
|
11273
|
+
}) : slots.selection({
|
|
11274
|
+
item,
|
|
11275
|
+
index
|
|
11276
|
+
})) : undefined;
|
|
11277
|
+
if (hasSlot && !slotContent) return undefined;
|
|
11253
11278
|
return createVNode("div", {
|
|
11254
11279
|
"key": item.value,
|
|
11255
11280
|
"class": "v-select__selection"
|
|
@@ -11269,15 +11294,8 @@ const VSelect = genericComponent()({
|
|
|
11269
11294
|
}
|
|
11270
11295
|
}
|
|
11271
11296
|
}, {
|
|
11272
|
-
default: () => [
|
|
11273
|
-
|
|
11274
|
-
index,
|
|
11275
|
-
props: slotProps
|
|
11276
|
-
})]
|
|
11277
|
-
}) : slots.selection?.({
|
|
11278
|
-
item,
|
|
11279
|
-
index
|
|
11280
|
-
}) ?? createVNode("span", {
|
|
11297
|
+
default: () => [slotContent]
|
|
11298
|
+
}) : slotContent ?? createVNode("span", {
|
|
11281
11299
|
"class": "v-select__selection-text"
|
|
11282
11300
|
}, [item.title, props.multiple && index < model.value.length - 1 && createVNode("span", {
|
|
11283
11301
|
"class": "v-select__selection-comma"
|
|
@@ -11778,6 +11796,16 @@ const VAutocomplete = genericComponent()({
|
|
|
11778
11796
|
modelValue: true,
|
|
11779
11797
|
'onUpdate:modelValue': undefined
|
|
11780
11798
|
};
|
|
11799
|
+
const hasSlot = hasChips ? !!slots.chip : !!slots.selection;
|
|
11800
|
+
const slotContent = hasSlot ? ensureValidVNode(hasChips ? slots.chip({
|
|
11801
|
+
item,
|
|
11802
|
+
index,
|
|
11803
|
+
props: slotProps
|
|
11804
|
+
}) : slots.selection({
|
|
11805
|
+
item,
|
|
11806
|
+
index
|
|
11807
|
+
})) : undefined;
|
|
11808
|
+
if (hasSlot && !slotContent) return undefined;
|
|
11781
11809
|
return createVNode("div", {
|
|
11782
11810
|
"key": item.value,
|
|
11783
11811
|
"class": ['v-autocomplete__selection', index === selectionIndex.value && ['v-autocomplete__selection--selected', textColorClasses.value]],
|
|
@@ -11798,15 +11826,8 @@ const VAutocomplete = genericComponent()({
|
|
|
11798
11826
|
}
|
|
11799
11827
|
}
|
|
11800
11828
|
}, {
|
|
11801
|
-
default: () => [
|
|
11802
|
-
|
|
11803
|
-
index,
|
|
11804
|
-
props: slotProps
|
|
11805
|
-
})]
|
|
11806
|
-
}) : slots.selection?.({
|
|
11807
|
-
item,
|
|
11808
|
-
index
|
|
11809
|
-
}) ?? createVNode("span", {
|
|
11829
|
+
default: () => [slotContent]
|
|
11830
|
+
}) : slotContent ?? createVNode("span", {
|
|
11810
11831
|
"class": "v-autocomplete__selection-text"
|
|
11811
11832
|
}, [item.title, props.multiple && index < model.value.length - 1 && createVNode("span", {
|
|
11812
11833
|
"class": "v-autocomplete__selection-comma"
|
|
@@ -12191,6 +12212,151 @@ const VBottomNavigation = genericComponent()({
|
|
|
12191
12212
|
}
|
|
12192
12213
|
});
|
|
12193
12214
|
|
|
12215
|
+
// Types
|
|
12216
|
+
|
|
12217
|
+
const makeVDialogProps = propsFactory({
|
|
12218
|
+
fullscreen: Boolean,
|
|
12219
|
+
retainFocus: {
|
|
12220
|
+
type: Boolean,
|
|
12221
|
+
default: true
|
|
12222
|
+
},
|
|
12223
|
+
scrollable: Boolean,
|
|
12224
|
+
...makeVOverlayProps({
|
|
12225
|
+
origin: 'center center',
|
|
12226
|
+
scrollStrategy: 'block',
|
|
12227
|
+
transition: {
|
|
12228
|
+
component: VDialogTransition
|
|
12229
|
+
},
|
|
12230
|
+
zIndex: 2400
|
|
12231
|
+
})
|
|
12232
|
+
}, 'VDialog');
|
|
12233
|
+
const VDialog = genericComponent()({
|
|
12234
|
+
name: 'VDialog',
|
|
12235
|
+
props: makeVDialogProps(),
|
|
12236
|
+
emits: {
|
|
12237
|
+
'update:modelValue': value => true
|
|
12238
|
+
},
|
|
12239
|
+
setup(props, _ref) {
|
|
12240
|
+
let {
|
|
12241
|
+
slots
|
|
12242
|
+
} = _ref;
|
|
12243
|
+
const isActive = useProxiedModel(props, 'modelValue');
|
|
12244
|
+
const {
|
|
12245
|
+
scopeId
|
|
12246
|
+
} = useScopeId();
|
|
12247
|
+
const overlay = ref();
|
|
12248
|
+
function onFocusin(e) {
|
|
12249
|
+
const before = e.relatedTarget;
|
|
12250
|
+
const after = e.target;
|
|
12251
|
+
if (before !== after && overlay.value?.contentEl &&
|
|
12252
|
+
// We're the topmost dialog
|
|
12253
|
+
overlay.value?.globalTop &&
|
|
12254
|
+
// It isn't the document or the dialog body
|
|
12255
|
+
![document, overlay.value.contentEl].includes(after) &&
|
|
12256
|
+
// It isn't inside the dialog body
|
|
12257
|
+
!overlay.value.contentEl.contains(after)) {
|
|
12258
|
+
const focusable = focusableChildren(overlay.value.contentEl);
|
|
12259
|
+
if (!focusable.length) return;
|
|
12260
|
+
const firstElement = focusable[0];
|
|
12261
|
+
const lastElement = focusable[focusable.length - 1];
|
|
12262
|
+
if (before === firstElement) {
|
|
12263
|
+
lastElement.focus();
|
|
12264
|
+
} else {
|
|
12265
|
+
firstElement.focus();
|
|
12266
|
+
}
|
|
12267
|
+
}
|
|
12268
|
+
}
|
|
12269
|
+
if (IN_BROWSER) {
|
|
12270
|
+
watch(() => isActive.value && props.retainFocus, val => {
|
|
12271
|
+
val ? document.addEventListener('focusin', onFocusin) : document.removeEventListener('focusin', onFocusin);
|
|
12272
|
+
}, {
|
|
12273
|
+
immediate: true
|
|
12274
|
+
});
|
|
12275
|
+
}
|
|
12276
|
+
watch(isActive, async val => {
|
|
12277
|
+
await nextTick();
|
|
12278
|
+
if (val) {
|
|
12279
|
+
overlay.value.contentEl?.focus({
|
|
12280
|
+
preventScroll: true
|
|
12281
|
+
});
|
|
12282
|
+
} else {
|
|
12283
|
+
overlay.value.activatorEl?.focus({
|
|
12284
|
+
preventScroll: true
|
|
12285
|
+
});
|
|
12286
|
+
}
|
|
12287
|
+
});
|
|
12288
|
+
const activatorProps = computed(() => mergeProps({
|
|
12289
|
+
'aria-haspopup': 'dialog',
|
|
12290
|
+
'aria-expanded': String(isActive.value)
|
|
12291
|
+
}, props.activatorProps));
|
|
12292
|
+
useRender(() => {
|
|
12293
|
+
const [overlayProps] = VOverlay.filterProps(props);
|
|
12294
|
+
return createVNode(VOverlay, mergeProps({
|
|
12295
|
+
"ref": overlay,
|
|
12296
|
+
"class": ['v-dialog', {
|
|
12297
|
+
'v-dialog--fullscreen': props.fullscreen,
|
|
12298
|
+
'v-dialog--scrollable': props.scrollable
|
|
12299
|
+
}, props.class],
|
|
12300
|
+
"style": props.style
|
|
12301
|
+
}, overlayProps, {
|
|
12302
|
+
"modelValue": isActive.value,
|
|
12303
|
+
"onUpdate:modelValue": $event => isActive.value = $event,
|
|
12304
|
+
"aria-modal": "true",
|
|
12305
|
+
"activatorProps": activatorProps.value,
|
|
12306
|
+
"role": "dialog"
|
|
12307
|
+
}, scopeId), {
|
|
12308
|
+
activator: slots.activator,
|
|
12309
|
+
default: function () {
|
|
12310
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
12311
|
+
args[_key] = arguments[_key];
|
|
12312
|
+
}
|
|
12313
|
+
return createVNode(VDefaultsProvider, {
|
|
12314
|
+
"root": "VDialog"
|
|
12315
|
+
}, {
|
|
12316
|
+
default: () => [slots.default?.(...args)]
|
|
12317
|
+
});
|
|
12318
|
+
}
|
|
12319
|
+
});
|
|
12320
|
+
});
|
|
12321
|
+
return forwardRefs({}, overlay);
|
|
12322
|
+
}
|
|
12323
|
+
});
|
|
12324
|
+
|
|
12325
|
+
// Types
|
|
12326
|
+
|
|
12327
|
+
const makeVBottomSheetProps = propsFactory({
|
|
12328
|
+
inset: Boolean,
|
|
12329
|
+
...makeVDialogProps({
|
|
12330
|
+
transition: 'bottom-sheet-transition'
|
|
12331
|
+
})
|
|
12332
|
+
}, 'VBottomSheet');
|
|
12333
|
+
const VBottomSheet = genericComponent()({
|
|
12334
|
+
name: 'VBottomSheet',
|
|
12335
|
+
props: makeVBottomSheetProps(),
|
|
12336
|
+
emits: {
|
|
12337
|
+
'update:modelValue': value => true
|
|
12338
|
+
},
|
|
12339
|
+
setup(props, _ref) {
|
|
12340
|
+
let {
|
|
12341
|
+
slots
|
|
12342
|
+
} = _ref;
|
|
12343
|
+
const isActive = useProxiedModel(props, 'modelValue');
|
|
12344
|
+
useRender(() => {
|
|
12345
|
+
const [dialogProps] = VDialog.filterProps(props);
|
|
12346
|
+
return createVNode(VDialog, mergeProps(dialogProps, {
|
|
12347
|
+
"contentClass": ['v-bottom-sheet__content', props.contentClass],
|
|
12348
|
+
"modelValue": isActive.value,
|
|
12349
|
+
"onUpdate:modelValue": $event => isActive.value = $event,
|
|
12350
|
+
"class": ['v-bottom-sheet', {
|
|
12351
|
+
'v-bottom-sheet--inset': props.inset
|
|
12352
|
+
}, props.class],
|
|
12353
|
+
"style": props.style
|
|
12354
|
+
}), slots);
|
|
12355
|
+
});
|
|
12356
|
+
return {};
|
|
12357
|
+
}
|
|
12358
|
+
});
|
|
12359
|
+
|
|
12194
12360
|
const makeVBreadcrumbsDividerProps = propsFactory({
|
|
12195
12361
|
divider: [Number, String],
|
|
12196
12362
|
...makeComponentProps()
|
|
@@ -15373,6 +15539,16 @@ const VCombobox = genericComponent()({
|
|
|
15373
15539
|
modelValue: true,
|
|
15374
15540
|
'onUpdate:modelValue': undefined
|
|
15375
15541
|
};
|
|
15542
|
+
const hasSlot = hasChips ? !!slots.chip : !!slots.selection;
|
|
15543
|
+
const slotContent = hasSlot ? ensureValidVNode(hasChips ? slots.chip({
|
|
15544
|
+
item,
|
|
15545
|
+
index,
|
|
15546
|
+
props: slotProps
|
|
15547
|
+
}) : slots.selection({
|
|
15548
|
+
item,
|
|
15549
|
+
index
|
|
15550
|
+
})) : undefined;
|
|
15551
|
+
if (hasSlot && !slotContent) return undefined;
|
|
15376
15552
|
return createVNode("div", {
|
|
15377
15553
|
"key": item.value,
|
|
15378
15554
|
"class": ['v-combobox__selection', index === selectionIndex.value && ['v-combobox__selection--selected', textColorClasses.value]],
|
|
@@ -15393,15 +15569,8 @@ const VCombobox = genericComponent()({
|
|
|
15393
15569
|
}
|
|
15394
15570
|
}
|
|
15395
15571
|
}, {
|
|
15396
|
-
default: () => [
|
|
15397
|
-
|
|
15398
|
-
index,
|
|
15399
|
-
props: slotProps
|
|
15400
|
-
})]
|
|
15401
|
-
}) : slots.selection?.({
|
|
15402
|
-
item,
|
|
15403
|
-
index
|
|
15404
|
-
}) ?? createVNode("span", {
|
|
15572
|
+
default: () => [slotContent]
|
|
15573
|
+
}) : slotContent ?? createVNode("span", {
|
|
15405
15574
|
"class": "v-combobox__selection-text"
|
|
15406
15575
|
}, [item.title, props.multiple && index < model.value.length - 1 && createVNode("span", {
|
|
15407
15576
|
"class": "v-combobox__selection-comma"
|
|
@@ -15436,116 +15605,6 @@ const VCombobox = genericComponent()({
|
|
|
15436
15605
|
|
|
15437
15606
|
// Types
|
|
15438
15607
|
|
|
15439
|
-
const makeVDialogProps = propsFactory({
|
|
15440
|
-
fullscreen: Boolean,
|
|
15441
|
-
retainFocus: {
|
|
15442
|
-
type: Boolean,
|
|
15443
|
-
default: true
|
|
15444
|
-
},
|
|
15445
|
-
scrollable: Boolean,
|
|
15446
|
-
...makeVOverlayProps({
|
|
15447
|
-
origin: 'center center',
|
|
15448
|
-
scrollStrategy: 'block',
|
|
15449
|
-
transition: {
|
|
15450
|
-
component: VDialogTransition
|
|
15451
|
-
},
|
|
15452
|
-
zIndex: 2400
|
|
15453
|
-
})
|
|
15454
|
-
}, 'VDialog');
|
|
15455
|
-
const VDialog = genericComponent()({
|
|
15456
|
-
name: 'VDialog',
|
|
15457
|
-
props: makeVDialogProps(),
|
|
15458
|
-
emits: {
|
|
15459
|
-
'update:modelValue': value => true
|
|
15460
|
-
},
|
|
15461
|
-
setup(props, _ref) {
|
|
15462
|
-
let {
|
|
15463
|
-
slots
|
|
15464
|
-
} = _ref;
|
|
15465
|
-
const isActive = useProxiedModel(props, 'modelValue');
|
|
15466
|
-
const {
|
|
15467
|
-
scopeId
|
|
15468
|
-
} = useScopeId();
|
|
15469
|
-
const overlay = ref();
|
|
15470
|
-
function onFocusin(e) {
|
|
15471
|
-
const before = e.relatedTarget;
|
|
15472
|
-
const after = e.target;
|
|
15473
|
-
if (before !== after && overlay.value?.contentEl &&
|
|
15474
|
-
// We're the topmost dialog
|
|
15475
|
-
overlay.value?.globalTop &&
|
|
15476
|
-
// It isn't the document or the dialog body
|
|
15477
|
-
![document, overlay.value.contentEl].includes(after) &&
|
|
15478
|
-
// It isn't inside the dialog body
|
|
15479
|
-
!overlay.value.contentEl.contains(after)) {
|
|
15480
|
-
const focusable = focusableChildren(overlay.value.contentEl);
|
|
15481
|
-
if (!focusable.length) return;
|
|
15482
|
-
const firstElement = focusable[0];
|
|
15483
|
-
const lastElement = focusable[focusable.length - 1];
|
|
15484
|
-
if (before === firstElement) {
|
|
15485
|
-
lastElement.focus();
|
|
15486
|
-
} else {
|
|
15487
|
-
firstElement.focus();
|
|
15488
|
-
}
|
|
15489
|
-
}
|
|
15490
|
-
}
|
|
15491
|
-
if (IN_BROWSER) {
|
|
15492
|
-
watch(() => isActive.value && props.retainFocus, val => {
|
|
15493
|
-
val ? document.addEventListener('focusin', onFocusin) : document.removeEventListener('focusin', onFocusin);
|
|
15494
|
-
}, {
|
|
15495
|
-
immediate: true
|
|
15496
|
-
});
|
|
15497
|
-
}
|
|
15498
|
-
watch(isActive, async val => {
|
|
15499
|
-
await nextTick();
|
|
15500
|
-
if (val) {
|
|
15501
|
-
overlay.value.contentEl?.focus({
|
|
15502
|
-
preventScroll: true
|
|
15503
|
-
});
|
|
15504
|
-
} else {
|
|
15505
|
-
overlay.value.activatorEl?.focus({
|
|
15506
|
-
preventScroll: true
|
|
15507
|
-
});
|
|
15508
|
-
}
|
|
15509
|
-
});
|
|
15510
|
-
const activatorProps = computed(() => mergeProps({
|
|
15511
|
-
'aria-haspopup': 'dialog',
|
|
15512
|
-
'aria-expanded': String(isActive.value)
|
|
15513
|
-
}, props.activatorProps));
|
|
15514
|
-
useRender(() => {
|
|
15515
|
-
const [overlayProps] = VOverlay.filterProps(props);
|
|
15516
|
-
return createVNode(VOverlay, mergeProps({
|
|
15517
|
-
"ref": overlay,
|
|
15518
|
-
"class": ['v-dialog', {
|
|
15519
|
-
'v-dialog--fullscreen': props.fullscreen,
|
|
15520
|
-
'v-dialog--scrollable': props.scrollable
|
|
15521
|
-
}, props.class],
|
|
15522
|
-
"style": props.style
|
|
15523
|
-
}, overlayProps, {
|
|
15524
|
-
"modelValue": isActive.value,
|
|
15525
|
-
"onUpdate:modelValue": $event => isActive.value = $event,
|
|
15526
|
-
"aria-modal": "true",
|
|
15527
|
-
"activatorProps": activatorProps.value,
|
|
15528
|
-
"role": "dialog"
|
|
15529
|
-
}, scopeId), {
|
|
15530
|
-
activator: slots.activator,
|
|
15531
|
-
default: function () {
|
|
15532
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
15533
|
-
args[_key] = arguments[_key];
|
|
15534
|
-
}
|
|
15535
|
-
return createVNode(VDefaultsProvider, {
|
|
15536
|
-
"root": "VDialog"
|
|
15537
|
-
}, {
|
|
15538
|
-
default: () => [slots.default?.(...args)]
|
|
15539
|
-
});
|
|
15540
|
-
}
|
|
15541
|
-
});
|
|
15542
|
-
});
|
|
15543
|
-
return forwardRefs({}, overlay);
|
|
15544
|
-
}
|
|
15545
|
-
});
|
|
15546
|
-
|
|
15547
|
-
// Types
|
|
15548
|
-
|
|
15549
15608
|
const VExpansionPanelSymbol = Symbol.for('vuetify:v-expansion-panel');
|
|
15550
15609
|
const allowedVariants = ['default', 'accordion', 'inset', 'popout'];
|
|
15551
15610
|
const makeVExpansionPanelsProps = propsFactory({
|
|
@@ -18174,6 +18233,140 @@ const VRating = genericComponent()({
|
|
|
18174
18233
|
}
|
|
18175
18234
|
});
|
|
18176
18235
|
|
|
18236
|
+
// Types
|
|
18237
|
+
|
|
18238
|
+
const rootTypes = {
|
|
18239
|
+
actions: 'button@2',
|
|
18240
|
+
article: 'heading, paragraph',
|
|
18241
|
+
avatar: 'avatar',
|
|
18242
|
+
button: 'button',
|
|
18243
|
+
card: 'image, heading',
|
|
18244
|
+
'card-avatar': 'image, list-item-avatar',
|
|
18245
|
+
chip: 'chip',
|
|
18246
|
+
'date-picker': 'list-item, heading, divider, date-picker-options, date-picker-days, actions',
|
|
18247
|
+
'date-picker-options': 'text, avatar@2',
|
|
18248
|
+
'date-picker-days': 'avatar@28',
|
|
18249
|
+
divider: 'divider',
|
|
18250
|
+
heading: 'heading',
|
|
18251
|
+
image: 'image',
|
|
18252
|
+
'list-item': 'text',
|
|
18253
|
+
'list-item-avatar': 'avatar, text',
|
|
18254
|
+
'list-item-two-line': 'sentences',
|
|
18255
|
+
'list-item-avatar-two-line': 'avatar, sentences',
|
|
18256
|
+
'list-item-three-line': 'paragraph',
|
|
18257
|
+
'list-item-avatar-three-line': 'avatar, paragraph',
|
|
18258
|
+
ossein: 'ossein',
|
|
18259
|
+
paragraph: 'text@3',
|
|
18260
|
+
sentences: 'text@2',
|
|
18261
|
+
subtitle: 'text',
|
|
18262
|
+
table: 'table-heading, table-thead, table-tbody, table-tfoot',
|
|
18263
|
+
'table-heading': 'chip, text',
|
|
18264
|
+
'table-thead': 'heading@6',
|
|
18265
|
+
'table-tbody': 'table-row-divider@6',
|
|
18266
|
+
'table-row-divider': 'table-row, divider',
|
|
18267
|
+
'table-row': 'text@6',
|
|
18268
|
+
'table-tfoot': 'text@2, avatar@2',
|
|
18269
|
+
text: 'text'
|
|
18270
|
+
};
|
|
18271
|
+
function genBone(type) {
|
|
18272
|
+
let children = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
18273
|
+
return createVNode("div", {
|
|
18274
|
+
"class": ['v-skeleton-loader__bone', `v-skeleton-loader__${type}`]
|
|
18275
|
+
}, [children]);
|
|
18276
|
+
}
|
|
18277
|
+
function genBones(bone) {
|
|
18278
|
+
// e.g. 'text@3'
|
|
18279
|
+
const [type, length] = bone.split('@');
|
|
18280
|
+
|
|
18281
|
+
// Generate a length array based upon
|
|
18282
|
+
// value after @ in the bone string
|
|
18283
|
+
return Array.from({
|
|
18284
|
+
length
|
|
18285
|
+
}).map(() => genStructure(type));
|
|
18286
|
+
}
|
|
18287
|
+
function genStructure(type) {
|
|
18288
|
+
let children = [];
|
|
18289
|
+
if (!type) return children;
|
|
18290
|
+
|
|
18291
|
+
// TODO: figure out a better way to type this
|
|
18292
|
+
const bone = rootTypes[type];
|
|
18293
|
+
|
|
18294
|
+
// End of recursion, do nothing
|
|
18295
|
+
/* eslint-disable-next-line no-empty, brace-style */
|
|
18296
|
+
if (type === bone) ;
|
|
18297
|
+
// Array of values - e.g. 'heading, paragraph, text@2'
|
|
18298
|
+
else if (type.includes(',')) return mapBones(type);
|
|
18299
|
+
// Array of values - e.g. 'paragraph@4'
|
|
18300
|
+
else if (type.includes('@')) return genBones(type);
|
|
18301
|
+
// Array of values - e.g. 'card@2'
|
|
18302
|
+
else if (bone.includes(',')) children = mapBones(bone);
|
|
18303
|
+
// Array of values - e.g. 'list-item@2'
|
|
18304
|
+
else if (bone.includes('@')) children = genBones(bone);
|
|
18305
|
+
// Single value - e.g. 'card-heading'
|
|
18306
|
+
else if (bone) children.push(genStructure(bone));
|
|
18307
|
+
return [genBone(type, children)];
|
|
18308
|
+
}
|
|
18309
|
+
function mapBones(bones) {
|
|
18310
|
+
// Remove spaces and return array of structures
|
|
18311
|
+
return bones.replace(/\s/g, '').split(',').map(genStructure);
|
|
18312
|
+
}
|
|
18313
|
+
const makeVSkeletonLoaderProps = propsFactory({
|
|
18314
|
+
boilerplate: Boolean,
|
|
18315
|
+
color: String,
|
|
18316
|
+
loading: Boolean,
|
|
18317
|
+
loadingText: {
|
|
18318
|
+
type: String,
|
|
18319
|
+
default: '$vuetify.loading'
|
|
18320
|
+
},
|
|
18321
|
+
type: {
|
|
18322
|
+
type: [String, Array],
|
|
18323
|
+
default: 'ossein'
|
|
18324
|
+
},
|
|
18325
|
+
...makeDimensionProps(),
|
|
18326
|
+
...makeElevationProps(),
|
|
18327
|
+
...makeThemeProps()
|
|
18328
|
+
}, 'VSkeletonLoader');
|
|
18329
|
+
const VSkeletonLoader = genericComponent()({
|
|
18330
|
+
name: 'VSkeletonLoader',
|
|
18331
|
+
props: makeVSkeletonLoaderProps(),
|
|
18332
|
+
setup(props, _ref) {
|
|
18333
|
+
let {
|
|
18334
|
+
slots
|
|
18335
|
+
} = _ref;
|
|
18336
|
+
const {
|
|
18337
|
+
backgroundColorClasses,
|
|
18338
|
+
backgroundColorStyles
|
|
18339
|
+
} = useBackgroundColor(toRef(props, 'color'));
|
|
18340
|
+
const {
|
|
18341
|
+
dimensionStyles
|
|
18342
|
+
} = useDimension(props);
|
|
18343
|
+
const {
|
|
18344
|
+
elevationClasses
|
|
18345
|
+
} = useElevation(props);
|
|
18346
|
+
const {
|
|
18347
|
+
themeClasses
|
|
18348
|
+
} = provideTheme(props);
|
|
18349
|
+
const {
|
|
18350
|
+
t
|
|
18351
|
+
} = useLocale();
|
|
18352
|
+
const items = computed(() => genStructure(wrapInArray(props.type).join(',')));
|
|
18353
|
+
useRender(() => {
|
|
18354
|
+
const isLoading = !slots.default || props.loading;
|
|
18355
|
+
return createVNode("div", {
|
|
18356
|
+
"class": ['v-skeleton-loader', {
|
|
18357
|
+
'v-skeleton-loader--boilerplate': props.boilerplate
|
|
18358
|
+
}, themeClasses.value, backgroundColorClasses.value, elevationClasses.value],
|
|
18359
|
+
"style": [backgroundColorStyles.value, isLoading ? dimensionStyles.value : {}],
|
|
18360
|
+
"aria-busy": !props.boilerplate ? isLoading : undefined,
|
|
18361
|
+
"aria-live": !props.boilerplate ? 'polite' : undefined,
|
|
18362
|
+
"aria-label": !props.boilerplate ? t(props.loadingText) : undefined,
|
|
18363
|
+
"role": !props.boilerplate ? 'alert' : undefined
|
|
18364
|
+
}, [isLoading ? items.value : slots.default?.()]);
|
|
18365
|
+
});
|
|
18366
|
+
return {};
|
|
18367
|
+
}
|
|
18368
|
+
});
|
|
18369
|
+
|
|
18177
18370
|
function bias(val) {
|
|
18178
18371
|
const c = 0.501;
|
|
18179
18372
|
const x = Math.abs(val);
|
|
@@ -18737,6 +18930,392 @@ const VSnackbar = genericComponent()({
|
|
|
18737
18930
|
|
|
18738
18931
|
// Types
|
|
18739
18932
|
|
|
18933
|
+
const makeVStepperActionsProps = propsFactory({
|
|
18934
|
+
color: String,
|
|
18935
|
+
disabled: {
|
|
18936
|
+
type: [Boolean, String],
|
|
18937
|
+
default: false
|
|
18938
|
+
},
|
|
18939
|
+
prevText: {
|
|
18940
|
+
type: String,
|
|
18941
|
+
default: '$vuetify.stepper.prev'
|
|
18942
|
+
},
|
|
18943
|
+
nextText: {
|
|
18944
|
+
type: String,
|
|
18945
|
+
default: '$vuetify.stepper.next'
|
|
18946
|
+
}
|
|
18947
|
+
}, 'VStepperActions');
|
|
18948
|
+
const VStepperActions = genericComponent()({
|
|
18949
|
+
name: 'VStepperActions',
|
|
18950
|
+
props: makeVStepperActionsProps(),
|
|
18951
|
+
emits: {
|
|
18952
|
+
'click:prev': () => true,
|
|
18953
|
+
'click:next': () => true
|
|
18954
|
+
},
|
|
18955
|
+
setup(props, _ref) {
|
|
18956
|
+
let {
|
|
18957
|
+
emit,
|
|
18958
|
+
slots
|
|
18959
|
+
} = _ref;
|
|
18960
|
+
const {
|
|
18961
|
+
t
|
|
18962
|
+
} = useLocale();
|
|
18963
|
+
function onClickPrev() {
|
|
18964
|
+
emit('click:prev');
|
|
18965
|
+
}
|
|
18966
|
+
function onClickNext() {
|
|
18967
|
+
emit('click:next');
|
|
18968
|
+
}
|
|
18969
|
+
useRender(() => {
|
|
18970
|
+
const prevSlotProps = {
|
|
18971
|
+
onClick: onClickPrev
|
|
18972
|
+
};
|
|
18973
|
+
const nextSlotProps = {
|
|
18974
|
+
onClick: onClickNext
|
|
18975
|
+
};
|
|
18976
|
+
return createVNode("div", {
|
|
18977
|
+
"class": "v-stepper-actions"
|
|
18978
|
+
}, [createVNode(VDefaultsProvider, {
|
|
18979
|
+
"defaults": {
|
|
18980
|
+
VBtn: {
|
|
18981
|
+
disabled: ['prev', true].includes(props.disabled),
|
|
18982
|
+
text: t(props.prevText),
|
|
18983
|
+
variant: 'text'
|
|
18984
|
+
}
|
|
18985
|
+
}
|
|
18986
|
+
}, {
|
|
18987
|
+
default: () => [slots.prev?.({
|
|
18988
|
+
props: prevSlotProps
|
|
18989
|
+
}) ?? createVNode(VBtn, prevSlotProps, null)]
|
|
18990
|
+
}), createVNode(VDefaultsProvider, {
|
|
18991
|
+
"defaults": {
|
|
18992
|
+
VBtn: {
|
|
18993
|
+
color: props.color,
|
|
18994
|
+
disabled: ['next', true].includes(props.disabled),
|
|
18995
|
+
text: t(props.nextText),
|
|
18996
|
+
variant: 'tonal'
|
|
18997
|
+
}
|
|
18998
|
+
}
|
|
18999
|
+
}, {
|
|
19000
|
+
default: () => [slots.next?.({
|
|
19001
|
+
props: nextSlotProps
|
|
19002
|
+
}) ?? createVNode(VBtn, nextSlotProps, null)]
|
|
19003
|
+
})]);
|
|
19004
|
+
});
|
|
19005
|
+
return {};
|
|
19006
|
+
}
|
|
19007
|
+
});
|
|
19008
|
+
|
|
19009
|
+
// Utilities
|
|
19010
|
+
const VStepperHeader = createSimpleFunctional('v-stepper-header');
|
|
19011
|
+
|
|
19012
|
+
// Types
|
|
19013
|
+
|
|
19014
|
+
const makeVStepperItemProps = propsFactory({
|
|
19015
|
+
color: String,
|
|
19016
|
+
title: String,
|
|
19017
|
+
subtitle: String,
|
|
19018
|
+
complete: Boolean,
|
|
19019
|
+
completeIcon: {
|
|
19020
|
+
type: String,
|
|
19021
|
+
default: '$complete'
|
|
19022
|
+
},
|
|
19023
|
+
editable: Boolean,
|
|
19024
|
+
editIcon: {
|
|
19025
|
+
type: String,
|
|
19026
|
+
default: '$edit'
|
|
19027
|
+
},
|
|
19028
|
+
error: Boolean,
|
|
19029
|
+
errorIcon: {
|
|
19030
|
+
type: String,
|
|
19031
|
+
default: '$error'
|
|
19032
|
+
},
|
|
19033
|
+
icon: String,
|
|
19034
|
+
ripple: {
|
|
19035
|
+
type: [Boolean, Object],
|
|
19036
|
+
default: true
|
|
19037
|
+
},
|
|
19038
|
+
rules: {
|
|
19039
|
+
type: Array,
|
|
19040
|
+
default: () => []
|
|
19041
|
+
},
|
|
19042
|
+
...makeGroupItemProps()
|
|
19043
|
+
}, 'VStepperItem');
|
|
19044
|
+
const VStepperItem = genericComponent()({
|
|
19045
|
+
name: 'VStepperItem',
|
|
19046
|
+
directives: {
|
|
19047
|
+
Ripple
|
|
19048
|
+
},
|
|
19049
|
+
props: makeVStepperItemProps(),
|
|
19050
|
+
emits: {
|
|
19051
|
+
'group:selected': val => true
|
|
19052
|
+
},
|
|
19053
|
+
setup(props, _ref) {
|
|
19054
|
+
let {
|
|
19055
|
+
slots
|
|
19056
|
+
} = _ref;
|
|
19057
|
+
const group = useGroupItem(props, VStepperSymbol, true);
|
|
19058
|
+
const step = computed(() => group?.value.value ?? props.value);
|
|
19059
|
+
const isValid = computed(() => props.rules.every(handler => handler() === true));
|
|
19060
|
+
const canEdit = computed(() => !props.disabled && props.editable);
|
|
19061
|
+
const hasError = computed(() => props.error || !isValid.value);
|
|
19062
|
+
const hasCompleted = computed(() => props.complete || props.rules.length > 0 && isValid.value);
|
|
19063
|
+
const icon = computed(() => {
|
|
19064
|
+
if (hasError.value) return props.errorIcon;
|
|
19065
|
+
if (hasCompleted.value) return props.completeIcon;
|
|
19066
|
+
if (props.editable) return props.editIcon;
|
|
19067
|
+
return props.icon;
|
|
19068
|
+
});
|
|
19069
|
+
const slotProps = computed(() => ({
|
|
19070
|
+
canEdit: canEdit.value,
|
|
19071
|
+
hasError: hasError.value,
|
|
19072
|
+
hasCompleted: hasCompleted.value,
|
|
19073
|
+
title: props.title,
|
|
19074
|
+
subtitle: props.subtitle,
|
|
19075
|
+
step: step.value,
|
|
19076
|
+
value: props.value
|
|
19077
|
+
}));
|
|
19078
|
+
useRender(() => {
|
|
19079
|
+
const hasColor = (!group || group.isSelected.value || hasCompleted.value || canEdit.value) && !hasError.value && !props.disabled;
|
|
19080
|
+
const hasTitle = !!(props.title || slots.title);
|
|
19081
|
+
const hasSubtitle = !!(props.subtitle || slots.subtitle);
|
|
19082
|
+
function onClick() {
|
|
19083
|
+
group?.toggle();
|
|
19084
|
+
}
|
|
19085
|
+
return withDirectives(createVNode("button", {
|
|
19086
|
+
"class": ['v-stepper-item', {
|
|
19087
|
+
'v-stepper-item--complete': hasCompleted.value,
|
|
19088
|
+
'v-stepper-item--disabled': props.disabled,
|
|
19089
|
+
'v-stepper-item--error': hasError.value
|
|
19090
|
+
}, group?.selectedClass.value],
|
|
19091
|
+
"disabled": !props.editable,
|
|
19092
|
+
"onClick": onClick
|
|
19093
|
+
}, [createVNode(VAvatar, {
|
|
19094
|
+
"key": "stepper-avatar",
|
|
19095
|
+
"class": "v-stepper-item__avatar",
|
|
19096
|
+
"color": hasColor ? props.color : undefined,
|
|
19097
|
+
"size": 24
|
|
19098
|
+
}, {
|
|
19099
|
+
default: () => [slots.icon?.(slotProps.value) ?? (icon.value ? createVNode(VIcon, {
|
|
19100
|
+
"icon": icon.value
|
|
19101
|
+
}, null) : step.value)]
|
|
19102
|
+
}), createVNode("div", {
|
|
19103
|
+
"class": "v-stepper-item__content"
|
|
19104
|
+
}, [hasTitle && createVNode("div", {
|
|
19105
|
+
"key": "title",
|
|
19106
|
+
"class": "v-stepper-item__title"
|
|
19107
|
+
}, [slots.title?.(slotProps.value) ?? props.title]), hasSubtitle && createVNode("div", {
|
|
19108
|
+
"key": "subtitle",
|
|
19109
|
+
"class": "v-stepper-item__subtitle"
|
|
19110
|
+
}, [slots.subtitle?.(slotProps.value) ?? props.subtitle]), slots.default?.(slotProps.value)])]), [[resolveDirective("ripple"), props.ripple && props.editable, null]]);
|
|
19111
|
+
});
|
|
19112
|
+
return {};
|
|
19113
|
+
}
|
|
19114
|
+
});
|
|
19115
|
+
|
|
19116
|
+
// Types
|
|
19117
|
+
|
|
19118
|
+
const VStepperSymbol$1 = Symbol.for('vuetify:v-stepper');
|
|
19119
|
+
const makeVStepperWindowProps = propsFactory({
|
|
19120
|
+
...makeVWindowProps({
|
|
19121
|
+
mandatory: false
|
|
19122
|
+
})
|
|
19123
|
+
}, 'VStepperWindow');
|
|
19124
|
+
const VStepperWindow = genericComponent()({
|
|
19125
|
+
name: 'VStepperWindow',
|
|
19126
|
+
props: makeVStepperWindowProps(),
|
|
19127
|
+
emits: {
|
|
19128
|
+
'update:modelValue': v => true
|
|
19129
|
+
},
|
|
19130
|
+
setup(props, _ref) {
|
|
19131
|
+
let {
|
|
19132
|
+
slots
|
|
19133
|
+
} = _ref;
|
|
19134
|
+
const group = inject$1(VStepperSymbol$1, null);
|
|
19135
|
+
const _model = useProxiedModel(props, 'modelValue');
|
|
19136
|
+
const model = computed({
|
|
19137
|
+
get() {
|
|
19138
|
+
// Always return modelValue if defined
|
|
19139
|
+
// or if not within a VStepper group
|
|
19140
|
+
if (_model.value != null || !group) return _model.value;
|
|
19141
|
+
|
|
19142
|
+
// If inside of a VStepper, find the currently selected
|
|
19143
|
+
// item by id. Item value may be assigned by its index
|
|
19144
|
+
return group.items.value.find(item => group.selected.value.includes(item.id))?.value;
|
|
19145
|
+
},
|
|
19146
|
+
set(val) {
|
|
19147
|
+
_model.value = val;
|
|
19148
|
+
}
|
|
19149
|
+
});
|
|
19150
|
+
useRender(() => {
|
|
19151
|
+
const [windowProps] = VWindow.filterProps(props);
|
|
19152
|
+
return createVNode(VWindow, mergeProps(windowProps, {
|
|
19153
|
+
"modelValue": model.value,
|
|
19154
|
+
"onUpdate:modelValue": $event => model.value = $event,
|
|
19155
|
+
"class": "v-stepper-window"
|
|
19156
|
+
}), slots);
|
|
19157
|
+
});
|
|
19158
|
+
return {};
|
|
19159
|
+
}
|
|
19160
|
+
});
|
|
19161
|
+
|
|
19162
|
+
const makeVStepperWindowItemProps = propsFactory({
|
|
19163
|
+
...makeVWindowItemProps()
|
|
19164
|
+
}, 'VStepperWindowItem');
|
|
19165
|
+
const VStepperWindowItem = genericComponent()({
|
|
19166
|
+
name: 'VStepperWindowItem',
|
|
19167
|
+
props: makeVStepperWindowItemProps(),
|
|
19168
|
+
setup(props, _ref) {
|
|
19169
|
+
let {
|
|
19170
|
+
slots
|
|
19171
|
+
} = _ref;
|
|
19172
|
+
useRender(() => {
|
|
19173
|
+
const [windowItemProps] = VWindowItem.filterProps(props);
|
|
19174
|
+
return createVNode(VWindowItem, mergeProps(windowItemProps, {
|
|
19175
|
+
"class": "v-stepper-window-item"
|
|
19176
|
+
}), slots);
|
|
19177
|
+
});
|
|
19178
|
+
return {};
|
|
19179
|
+
}
|
|
19180
|
+
});
|
|
19181
|
+
|
|
19182
|
+
// Types
|
|
19183
|
+
|
|
19184
|
+
const VStepperSymbol = Symbol.for('vuetify:v-stepper');
|
|
19185
|
+
const makeVStepperProps = propsFactory({
|
|
19186
|
+
altLabels: Boolean,
|
|
19187
|
+
bgColor: String,
|
|
19188
|
+
editable: Boolean,
|
|
19189
|
+
hideActions: Boolean,
|
|
19190
|
+
items: {
|
|
19191
|
+
type: Array,
|
|
19192
|
+
default: () => []
|
|
19193
|
+
},
|
|
19194
|
+
itemTitle: {
|
|
19195
|
+
type: String,
|
|
19196
|
+
default: 'title'
|
|
19197
|
+
},
|
|
19198
|
+
itemValue: {
|
|
19199
|
+
type: String,
|
|
19200
|
+
default: 'value'
|
|
19201
|
+
},
|
|
19202
|
+
mobile: Boolean,
|
|
19203
|
+
nonLinear: Boolean,
|
|
19204
|
+
flat: Boolean,
|
|
19205
|
+
...makeGroupProps({
|
|
19206
|
+
mandatory: 'force',
|
|
19207
|
+
selectedClass: 'v-stepper-item--selected'
|
|
19208
|
+
}),
|
|
19209
|
+
...makeVSheetProps(),
|
|
19210
|
+
...only(makeVStepperActionsProps(), ['prevText', 'nextText'])
|
|
19211
|
+
}, 'VStepper');
|
|
19212
|
+
const VStepper = genericComponent()({
|
|
19213
|
+
name: 'VStepper',
|
|
19214
|
+
props: makeVStepperProps(),
|
|
19215
|
+
emits: {
|
|
19216
|
+
'update:modelValue': v => true
|
|
19217
|
+
},
|
|
19218
|
+
setup(props, _ref) {
|
|
19219
|
+
let {
|
|
19220
|
+
slots
|
|
19221
|
+
} = _ref;
|
|
19222
|
+
const {
|
|
19223
|
+
items: _items,
|
|
19224
|
+
next,
|
|
19225
|
+
prev,
|
|
19226
|
+
selected
|
|
19227
|
+
} = useGroup(props, VStepperSymbol);
|
|
19228
|
+
const {
|
|
19229
|
+
color,
|
|
19230
|
+
editable,
|
|
19231
|
+
prevText,
|
|
19232
|
+
nextText
|
|
19233
|
+
} = toRefs(props);
|
|
19234
|
+
const items = computed(() => props.items.map((item, index) => {
|
|
19235
|
+
const title = getPropertyFromItem(item, props.itemTitle, item);
|
|
19236
|
+
const value = getPropertyFromItem(item, props.itemValue, index + 1);
|
|
19237
|
+
return {
|
|
19238
|
+
title,
|
|
19239
|
+
value,
|
|
19240
|
+
raw: item
|
|
19241
|
+
};
|
|
19242
|
+
}));
|
|
19243
|
+
const activeIndex = computed(() => {
|
|
19244
|
+
return _items.value.findIndex(item => selected.value.includes(item.id));
|
|
19245
|
+
});
|
|
19246
|
+
const disabled = computed(() => {
|
|
19247
|
+
if (props.disabled) return props.disabled;
|
|
19248
|
+
if (activeIndex.value === 0) return 'prev';
|
|
19249
|
+
if (activeIndex.value === _items.value.length - 1) return 'next';
|
|
19250
|
+
return false;
|
|
19251
|
+
});
|
|
19252
|
+
provideDefaults({
|
|
19253
|
+
VStepperItem: {
|
|
19254
|
+
editable,
|
|
19255
|
+
prevText,
|
|
19256
|
+
nextText
|
|
19257
|
+
},
|
|
19258
|
+
VStepperActions: {
|
|
19259
|
+
color,
|
|
19260
|
+
disabled,
|
|
19261
|
+
prevText,
|
|
19262
|
+
nextText
|
|
19263
|
+
}
|
|
19264
|
+
});
|
|
19265
|
+
useRender(() => {
|
|
19266
|
+
const [sheetProps] = VSheet.filterProps(props);
|
|
19267
|
+
const hasHeader = !!(slots.header || props.items.length);
|
|
19268
|
+
const hasWindow = props.items.length > 0;
|
|
19269
|
+
const hasActions = !props.hideActions && !!(hasWindow || slots.actions);
|
|
19270
|
+
return createVNode(VSheet, mergeProps(sheetProps, {
|
|
19271
|
+
"color": props.bgColor,
|
|
19272
|
+
"class": ['v-stepper', {
|
|
19273
|
+
'v-stepper--alt-labels': props.altLabels,
|
|
19274
|
+
'v-stepper--flat': props.flat,
|
|
19275
|
+
'v-stepper--non-linear': props.nonLinear,
|
|
19276
|
+
'v-stepper--mobile': props.mobile
|
|
19277
|
+
}, props.class],
|
|
19278
|
+
"style": props.style
|
|
19279
|
+
}), {
|
|
19280
|
+
default: () => [hasHeader && createVNode(VStepperHeader, {
|
|
19281
|
+
"key": "stepper-header"
|
|
19282
|
+
}, {
|
|
19283
|
+
default: () => [items.value.map((item, index) => createVNode(Fragment, null, [!!index && createVNode(VDivider, null, null), createVNode(VStepperItem, item, {
|
|
19284
|
+
default: slots[`header-item.${item.value}`] ?? slots.header,
|
|
19285
|
+
icon: slots.icon,
|
|
19286
|
+
title: slots.title,
|
|
19287
|
+
subtitle: slots.subtitle
|
|
19288
|
+
})]))]
|
|
19289
|
+
}), hasWindow && createVNode(VStepperWindow, {
|
|
19290
|
+
"key": "stepper-window"
|
|
19291
|
+
}, {
|
|
19292
|
+
default: () => [items.value.map(item => createVNode(VStepperWindowItem, {
|
|
19293
|
+
"value": item.value
|
|
19294
|
+
}, {
|
|
19295
|
+
default: () => slots[`item.${item.value}`]?.(item) ?? slots.item?.(item)
|
|
19296
|
+
}))]
|
|
19297
|
+
}), slots.default?.({
|
|
19298
|
+
prev,
|
|
19299
|
+
next
|
|
19300
|
+
}), hasActions && (slots.actions?.({
|
|
19301
|
+
next,
|
|
19302
|
+
prev
|
|
19303
|
+
}) ?? createVNode(VStepperActions, {
|
|
19304
|
+
"key": "stepper-actions",
|
|
19305
|
+
"onClick:prev": prev,
|
|
19306
|
+
"onClick:next": next
|
|
19307
|
+
}, slots))]
|
|
19308
|
+
});
|
|
19309
|
+
});
|
|
19310
|
+
return {
|
|
19311
|
+
prev,
|
|
19312
|
+
next
|
|
19313
|
+
};
|
|
19314
|
+
}
|
|
19315
|
+
});
|
|
19316
|
+
|
|
19317
|
+
// Types
|
|
19318
|
+
|
|
18740
19319
|
const makeVSwitchProps = propsFactory({
|
|
18741
19320
|
indeterminate: Boolean,
|
|
18742
19321
|
inset: Boolean,
|
|
@@ -19815,6 +20394,7 @@ var components = /*#__PURE__*/Object.freeze({
|
|
|
19815
20394
|
VBannerActions: VBannerActions,
|
|
19816
20395
|
VBannerText: VBannerText,
|
|
19817
20396
|
VBottomNavigation: VBottomNavigation,
|
|
20397
|
+
VBottomSheet: VBottomSheet,
|
|
19818
20398
|
VBreadcrumbs: VBreadcrumbs,
|
|
19819
20399
|
VBreadcrumbsDivider: VBreadcrumbsDivider,
|
|
19820
20400
|
VBreadcrumbsItem: VBreadcrumbsItem,
|
|
@@ -19907,6 +20487,7 @@ var components = /*#__PURE__*/Object.freeze({
|
|
|
19907
20487
|
VSelectionControl: VSelectionControl,
|
|
19908
20488
|
VSelectionControlGroup: VSelectionControlGroup,
|
|
19909
20489
|
VSheet: VSheet,
|
|
20490
|
+
VSkeletonLoader: VSkeletonLoader,
|
|
19910
20491
|
VSlideGroup: VSlideGroup,
|
|
19911
20492
|
VSlideGroupItem: VSlideGroupItem,
|
|
19912
20493
|
VSlideXReverseTransition: VSlideXReverseTransition,
|
|
@@ -19916,6 +20497,12 @@ var components = /*#__PURE__*/Object.freeze({
|
|
|
19916
20497
|
VSlider: VSlider,
|
|
19917
20498
|
VSnackbar: VSnackbar,
|
|
19918
20499
|
VSpacer: VSpacer,
|
|
20500
|
+
VStepper: VStepper,
|
|
20501
|
+
VStepperActions: VStepperActions,
|
|
20502
|
+
VStepperHeader: VStepperHeader,
|
|
20503
|
+
VStepperItem: VStepperItem,
|
|
20504
|
+
VStepperWindow: VStepperWindow,
|
|
20505
|
+
VStepperWindowItem: VStepperWindowItem,
|
|
19919
20506
|
VSvgIcon: VSvgIcon,
|
|
19920
20507
|
VSwitch: VSwitch,
|
|
19921
20508
|
VSystemBar: VSystemBar,
|
|
@@ -20296,7 +20883,6 @@ function getWeekdays(locale) {
|
|
|
20296
20883
|
});
|
|
20297
20884
|
}
|
|
20298
20885
|
function format(value, formatString, locale) {
|
|
20299
|
-
const date = new Date(value);
|
|
20300
20886
|
let options = {};
|
|
20301
20887
|
switch (formatString) {
|
|
20302
20888
|
case 'fullDateWithWeekday':
|
|
@@ -20315,7 +20901,11 @@ function format(value, formatString, locale) {
|
|
|
20315
20901
|
};
|
|
20316
20902
|
break;
|
|
20317
20903
|
case 'keyboardDate':
|
|
20318
|
-
options = {
|
|
20904
|
+
options = {
|
|
20905
|
+
day: '2-digit',
|
|
20906
|
+
month: '2-digit',
|
|
20907
|
+
year: 'numeric'
|
|
20908
|
+
};
|
|
20319
20909
|
break;
|
|
20320
20910
|
case 'monthAndDate':
|
|
20321
20911
|
options = {
|
|
@@ -20345,7 +20935,7 @@ function format(value, formatString, locale) {
|
|
|
20345
20935
|
timeZoneName: 'short'
|
|
20346
20936
|
};
|
|
20347
20937
|
}
|
|
20348
|
-
return new Intl.DateTimeFormat(locale, options).format(date);
|
|
20938
|
+
return new Intl.DateTimeFormat(locale, options).format(date(value) ?? undefined);
|
|
20349
20939
|
}
|
|
20350
20940
|
function toISO(adapter, value) {
|
|
20351
20941
|
const date = adapter.toJsDate(value);
|
|
@@ -20645,7 +21235,7 @@ function createVuetify$1() {
|
|
|
20645
21235
|
date
|
|
20646
21236
|
};
|
|
20647
21237
|
}
|
|
20648
|
-
const version$1 = "3.4.0-alpha.1-dev.2023-10-
|
|
21238
|
+
const version$1 = "3.4.0-alpha.1-dev.2023-10-26";
|
|
20649
21239
|
createVuetify$1.version = version$1;
|
|
20650
21240
|
|
|
20651
21241
|
// Vue's inject() can only be used in setup
|
|
@@ -20670,7 +21260,7 @@ const createVuetify = function () {
|
|
|
20670
21260
|
...options
|
|
20671
21261
|
});
|
|
20672
21262
|
};
|
|
20673
|
-
const version = "3.4.0-alpha.1-dev.2023-10-
|
|
21263
|
+
const version = "3.4.0-alpha.1-dev.2023-10-26";
|
|
20674
21264
|
createVuetify.version = version;
|
|
20675
21265
|
|
|
20676
21266
|
export { components, createVuetify, directives, useDefaults, useDisplay, useLayout, useLocale, useRtl, useTheme, version };
|