@vuetify/nightly 3.4.11-dev.2024-01-19 → 3.5.0-dev.2024-01-20
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 +2 -29
- package/dist/json/attributes.json +6 -6
- package/dist/json/importMap.json +116 -116
- package/dist/json/web-types.json +42 -7
- package/dist/vuetify-labs.css +2802 -2782
- package/dist/vuetify-labs.d.ts +61 -8
- package/dist/vuetify-labs.esm.js +153 -22
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +153 -21
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +757 -737
- package/dist/vuetify.d.ts +97 -44
- package/dist/vuetify.esm.js +153 -22
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +153 -21
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +359 -337
- package/dist/vuetify.min.js.map +1 -1
- package/lib/blueprints/index.d.mts +11 -1
- package/lib/blueprints/md1.d.mts +11 -1
- package/lib/blueprints/md2.d.mts +11 -1
- package/lib/blueprints/md3.d.mts +11 -1
- package/lib/components/VSwitch/VSwitch.css +22 -2
- package/lib/components/VSwitch/VSwitch.mjs +26 -3
- package/lib/components/VSwitch/VSwitch.mjs.map +1 -1
- package/lib/components/VSwitch/VSwitch.sass +20 -2
- package/lib/components/VSwitch/index.d.mts +37 -6
- package/lib/components/index.d.mts +37 -6
- package/lib/composables/goto.mjs +105 -0
- package/lib/composables/goto.mjs.map +1 -0
- package/lib/composables/index.mjs +1 -0
- package/lib/composables/index.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/entry-bundler.mjs.map +1 -1
- package/lib/framework.mjs +6 -2
- package/lib/framework.mjs.map +1 -1
- package/lib/index.d.mts +60 -38
- package/package.json +1 -1
package/dist/vuetify-labs.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
|
-
import { Ref, DeepReadonly, ComponentPropsOptions, ExtractPropTypes, VNodeChild, VNode, PropType, JSXComponent, CSSProperties, ComponentInternalInstance, ComputedRef, Component, EffectScope, DirectiveBinding, WritableComputedRef, UnwrapRef, nextTick, Prop, InjectionKey } from 'vue';
|
|
2
|
+
import { Ref, DeepReadonly, ComponentPropsOptions, ExtractPropTypes, VNodeChild, VNode, PropType, ComponentPublicInstance, JSXComponent, CSSProperties, ComponentInternalInstance, ComputedRef, Component, EffectScope, DirectiveBinding, WritableComputedRef, UnwrapRef, nextTick, Prop, InjectionKey } from 'vue';
|
|
3
3
|
// @ts-ignore
|
|
4
4
|
import * as vue_router from 'vue-router';
|
|
5
5
|
// @ts-ignore
|
|
@@ -351,6 +351,23 @@ type DefaultsOptions = Partial<DefaultsInstance>;
|
|
|
351
351
|
declare function useDefaults<T extends Record<string, any>>(props: T, name?: string): T;
|
|
352
352
|
declare function useDefaults(props?: undefined, name?: string): Record<string, any>;
|
|
353
353
|
|
|
354
|
+
interface GoToInstance {
|
|
355
|
+
rtl: Ref<boolean>;
|
|
356
|
+
options: GoToOptions;
|
|
357
|
+
}
|
|
358
|
+
interface GoToOptions {
|
|
359
|
+
container: ComponentPublicInstance | HTMLElement | string;
|
|
360
|
+
duration: number;
|
|
361
|
+
layout: boolean;
|
|
362
|
+
offset: number;
|
|
363
|
+
easing: string | ((t: number) => number);
|
|
364
|
+
patterns: Record<string, (t: number) => number>;
|
|
365
|
+
}
|
|
366
|
+
declare function useGoTo(_options?: Partial<GoToOptions>): {
|
|
367
|
+
(target: ComponentPublicInstance | HTMLElement | string | number, options?: Partial<GoToOptions>): Promise<unknown>;
|
|
368
|
+
horizontal(target: ComponentPublicInstance | HTMLElement | string | number, options?: Partial<GoToOptions>): Promise<unknown>;
|
|
369
|
+
};
|
|
370
|
+
|
|
354
371
|
type IconValue = string | (string | [path: string, opacity: number])[] | JSXComponent;
|
|
355
372
|
declare const IconValue: PropType<IconValue>;
|
|
356
373
|
interface IconAliases {
|
|
@@ -753,6 +770,7 @@ interface VuetifyOptions {
|
|
|
753
770
|
directives?: Record<string, any>;
|
|
754
771
|
defaults?: DefaultsOptions;
|
|
755
772
|
display?: DisplayOptions;
|
|
773
|
+
goTo?: GoToOptions;
|
|
756
774
|
theme?: ThemeOptions;
|
|
757
775
|
icons?: IconOptions;
|
|
758
776
|
locale?: LocaleOptions & RtlOptions;
|
|
@@ -54826,8 +54844,17 @@ declare const VStepperWindowItem: {
|
|
|
54826
54844
|
}>>;
|
|
54827
54845
|
type VStepperWindowItem = InstanceType<typeof VStepperWindowItem>;
|
|
54828
54846
|
|
|
54847
|
+
type VSwitchSlot = {
|
|
54848
|
+
model: Ref<boolean>;
|
|
54849
|
+
isValid: ComputedRef<boolean | null>;
|
|
54850
|
+
};
|
|
54829
54851
|
type VSwitchSlots = VInputSlots & VSelectionControlSlots & {
|
|
54830
54852
|
loader: LoaderSlotProps;
|
|
54853
|
+
thumb: {
|
|
54854
|
+
icon: IconValue | undefined;
|
|
54855
|
+
} & VSwitchSlot;
|
|
54856
|
+
'track-false': VSwitchSlot;
|
|
54857
|
+
'track-true': VSwitchSlot;
|
|
54831
54858
|
};
|
|
54832
54859
|
declare const VSwitch: {
|
|
54833
54860
|
new (...args: any[]): vue.CreateComponentPublicInstance<{
|
|
@@ -54884,7 +54911,7 @@ declare const VSwitch: {
|
|
|
54884
54911
|
'update:focused': (focused: boolean) => boolean;
|
|
54885
54912
|
'update:modelValue': (value: any) => boolean;
|
|
54886
54913
|
'update:indeterminate': (value: boolean) => boolean;
|
|
54887
|
-
}, "$children" | "v-slot:default" | "v-slots" | "v-slot:append" | "v-slot:prepend" | "modelValue" | "update:modelValue" | "v-slot:loader" | "v-slot:input" | "v-slot:label" | "v-slot:message" | "v-slot:details">, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & {
|
|
54914
|
+
}, "$children" | "v-slot:default" | "v-slots" | "v-slot:append" | "v-slot:prepend" | "modelValue" | "update:modelValue" | "v-slot:loader" | "v-slot:input" | "v-slot:label" | "v-slot:message" | "v-slot:details" | "v-slot:thumb" | "v-slot:track-false" | "v-slot:track-true">, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & {
|
|
54888
54915
|
flat: boolean;
|
|
54889
54916
|
inline: boolean;
|
|
54890
54917
|
error: boolean;
|
|
@@ -54959,8 +54986,8 @@ declare const VSwitch: {
|
|
|
54959
54986
|
persistentHint: boolean;
|
|
54960
54987
|
}, true, {}, vue.SlotsType<Partial<{
|
|
54961
54988
|
default: (arg: VInputSlot & {
|
|
54962
|
-
backgroundColorClasses:
|
|
54963
|
-
backgroundColorStyles:
|
|
54989
|
+
backgroundColorClasses: Ref<string[]>;
|
|
54990
|
+
backgroundColorStyles: Ref<vue.CSSProperties>;
|
|
54964
54991
|
}) => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
54965
54992
|
[key: string]: any;
|
|
54966
54993
|
}>[];
|
|
@@ -54988,6 +55015,17 @@ declare const VSwitch: {
|
|
|
54988
55015
|
loader: (arg: LoaderSlotProps) => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
54989
55016
|
[key: string]: any;
|
|
54990
55017
|
}>[];
|
|
55018
|
+
thumb: (arg: {
|
|
55019
|
+
icon: IconValue | undefined;
|
|
55020
|
+
} & VSwitchSlot) => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
55021
|
+
[key: string]: any;
|
|
55022
|
+
}>[];
|
|
55023
|
+
'track-false': (arg: VSwitchSlot) => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
55024
|
+
[key: string]: any;
|
|
55025
|
+
}>[];
|
|
55026
|
+
'track-true': (arg: VSwitchSlot) => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
55027
|
+
[key: string]: any;
|
|
55028
|
+
}>[];
|
|
54991
55029
|
}>>, {
|
|
54992
55030
|
P: {};
|
|
54993
55031
|
B: {};
|
|
@@ -55126,7 +55164,7 @@ declare const VSwitch: {
|
|
|
55126
55164
|
'update:focused': (focused: boolean) => boolean;
|
|
55127
55165
|
'update:modelValue': (value: any) => boolean;
|
|
55128
55166
|
'update:indeterminate': (value: boolean) => boolean;
|
|
55129
|
-
}, "$children" | "v-slot:default" | "v-slots" | "v-slot:append" | "v-slot:prepend" | "modelValue" | "update:modelValue" | "v-slot:loader" | "v-slot:input" | "v-slot:label" | "v-slot:message" | "v-slot:details">, string, {
|
|
55167
|
+
}, "$children" | "v-slot:default" | "v-slots" | "v-slot:append" | "v-slot:prepend" | "modelValue" | "update:modelValue" | "v-slot:loader" | "v-slot:input" | "v-slot:label" | "v-slot:message" | "v-slot:details" | "v-slot:thumb" | "v-slot:track-false" | "v-slot:track-true">, string, {
|
|
55130
55168
|
flat: boolean;
|
|
55131
55169
|
inline: boolean;
|
|
55132
55170
|
error: boolean;
|
|
@@ -55151,8 +55189,8 @@ declare const VSwitch: {
|
|
|
55151
55189
|
persistentHint: boolean;
|
|
55152
55190
|
}, {}, string, vue.SlotsType<Partial<{
|
|
55153
55191
|
default: (arg: VInputSlot & {
|
|
55154
|
-
backgroundColorClasses:
|
|
55155
|
-
backgroundColorStyles:
|
|
55192
|
+
backgroundColorClasses: Ref<string[]>;
|
|
55193
|
+
backgroundColorStyles: Ref<vue.CSSProperties>;
|
|
55156
55194
|
}) => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
55157
55195
|
[key: string]: any;
|
|
55158
55196
|
}>[];
|
|
@@ -55180,6 +55218,17 @@ declare const VSwitch: {
|
|
|
55180
55218
|
loader: (arg: LoaderSlotProps) => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
55181
55219
|
[key: string]: any;
|
|
55182
55220
|
}>[];
|
|
55221
|
+
thumb: (arg: {
|
|
55222
|
+
icon: IconValue | undefined;
|
|
55223
|
+
} & VSwitchSlot) => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
55224
|
+
[key: string]: any;
|
|
55225
|
+
}>[];
|
|
55226
|
+
'track-false': (arg: VSwitchSlot) => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
55227
|
+
[key: string]: any;
|
|
55228
|
+
}>[];
|
|
55229
|
+
'track-true': (arg: VSwitchSlot) => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
55230
|
+
[key: string]: any;
|
|
55231
|
+
}>[];
|
|
55183
55232
|
}>>> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & (new <T>(props: {
|
|
55184
55233
|
modelValue?: T | null | undefined;
|
|
55185
55234
|
'onUpdate:modelValue'?: ((value: T | null) => void) | undefined;
|
|
@@ -69223,6 +69272,10 @@ declare const createVuetify: (options?: VuetifyOptions) => {
|
|
|
69223
69272
|
setMinutes: (date: unknown, minutes: number) => unknown;
|
|
69224
69273
|
};
|
|
69225
69274
|
};
|
|
69275
|
+
goTo: {
|
|
69276
|
+
rtl: vue.Ref<boolean>;
|
|
69277
|
+
options: Record<string, any>;
|
|
69278
|
+
};
|
|
69226
69279
|
};
|
|
69227
69280
|
|
|
69228
|
-
export { type DateInstance, type DefaultsInstance, type DisplayBreakpoint, type DisplayInstance, type DisplayThresholds, type IconAliases, type IconOptions, type IconProps, type IconSet, type LocaleInstance, type LocaleMessages, type LocaleOptions, type RtlInstance, type RtlOptions, type SubmitEventPromise, type ThemeDefinition, type ThemeInstance, allComponents_d as components, createVuetify, index_d as directives, useDate, useDefaults, useDisplay, useLayout, useLocale, useRtl, useTheme, version };
|
|
69281
|
+
export { type DateInstance, type DefaultsInstance, type DisplayBreakpoint, type DisplayInstance, type DisplayThresholds, type GoToInstance, type IconAliases, type IconOptions, type IconProps, type IconSet, type LocaleInstance, type LocaleMessages, type LocaleOptions, type RtlInstance, type RtlOptions, type SubmitEventPromise, type ThemeDefinition, type ThemeInstance, allComponents_d as components, createVuetify, index_d as directives, useDate, useDefaults, useDisplay, useGoTo, useLayout, useLocale, useRtl, useTheme, version };
|
package/dist/vuetify-labs.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Vuetify v3.
|
|
2
|
+
* Vuetify v3.5.0-dev.2024-01-20
|
|
3
3
|
* Forged by John Leider
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -2156,7 +2156,7 @@ function provideLocale(props) {
|
|
|
2156
2156
|
provide(LocaleSymbol, data);
|
|
2157
2157
|
return data;
|
|
2158
2158
|
}
|
|
2159
|
-
function genDefaults$
|
|
2159
|
+
function genDefaults$2() {
|
|
2160
2160
|
return {
|
|
2161
2161
|
af: false,
|
|
2162
2162
|
ar: true,
|
|
@@ -2203,7 +2203,7 @@ function genDefaults$1() {
|
|
|
2203
2203
|
};
|
|
2204
2204
|
}
|
|
2205
2205
|
function createRtl(i18n, options) {
|
|
2206
|
-
const rtl = ref(options?.rtl ?? genDefaults$
|
|
2206
|
+
const rtl = ref(options?.rtl ?? genDefaults$2());
|
|
2207
2207
|
const isRtl = computed(() => rtl.value[i18n.current.value] ?? false);
|
|
2208
2208
|
return {
|
|
2209
2209
|
isRtl,
|
|
@@ -2236,7 +2236,7 @@ const ThemeSymbol = Symbol.for('vuetify:theme');
|
|
|
2236
2236
|
const makeThemeProps = propsFactory({
|
|
2237
2237
|
theme: String
|
|
2238
2238
|
}, 'theme');
|
|
2239
|
-
function genDefaults() {
|
|
2239
|
+
function genDefaults$1() {
|
|
2240
2240
|
return {
|
|
2241
2241
|
defaultTheme: 'light',
|
|
2242
2242
|
variations: {
|
|
@@ -2323,8 +2323,8 @@ function genDefaults() {
|
|
|
2323
2323
|
};
|
|
2324
2324
|
}
|
|
2325
2325
|
function parseThemeOptions() {
|
|
2326
|
-
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : genDefaults();
|
|
2327
|
-
const defaults = genDefaults();
|
|
2326
|
+
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : genDefaults$1();
|
|
2327
|
+
const defaults = genDefaults$1();
|
|
2328
2328
|
if (!options) return {
|
|
2329
2329
|
...defaults,
|
|
2330
2330
|
isDisabled: true
|
|
@@ -9047,7 +9047,7 @@ function elementToViewport(point, offset) {
|
|
|
9047
9047
|
}
|
|
9048
9048
|
|
|
9049
9049
|
/** Get the difference between two points */
|
|
9050
|
-
function getOffset$
|
|
9050
|
+
function getOffset$2(a, b) {
|
|
9051
9051
|
return {
|
|
9052
9052
|
x: a.x - b.x,
|
|
9053
9053
|
y: a.y - b.y
|
|
@@ -9294,7 +9294,7 @@ function connectedLocationStrategy(data, props, contentStyles) {
|
|
|
9294
9294
|
let {
|
|
9295
9295
|
x,
|
|
9296
9296
|
y
|
|
9297
|
-
} = getOffset$
|
|
9297
|
+
} = getOffset$2(targetPoint, contentPoint);
|
|
9298
9298
|
switch (_placement.anchor.side) {
|
|
9299
9299
|
case 'top':
|
|
9300
9300
|
y -= offset.value[0];
|
|
@@ -9829,7 +9829,7 @@ function useActivator(props, _ref) {
|
|
|
9829
9829
|
const target = computed(() => {
|
|
9830
9830
|
if (props.target === 'cursor' && cursorTarget.value) return cursorTarget.value;
|
|
9831
9831
|
if (targetRef.value) return refElement(targetRef.value);
|
|
9832
|
-
return getTarget(props.target, vm) || activatorEl.value;
|
|
9832
|
+
return getTarget$1(props.target, vm) || activatorEl.value;
|
|
9833
9833
|
});
|
|
9834
9834
|
const targetEl = computed(() => {
|
|
9835
9835
|
return Array.isArray(target.value) ? undefined : target.value;
|
|
@@ -9901,14 +9901,14 @@ function _useActivator(props, vm, _ref2) {
|
|
|
9901
9901
|
}
|
|
9902
9902
|
function getActivator() {
|
|
9903
9903
|
let selector = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : props.activator;
|
|
9904
|
-
const activator = getTarget(selector, vm);
|
|
9904
|
+
const activator = getTarget$1(selector, vm);
|
|
9905
9905
|
|
|
9906
9906
|
// The activator should only be a valid element (Ignore comments and text nodes)
|
|
9907
9907
|
activatorEl.value = activator?.nodeType === Node.ELEMENT_NODE ? activator : undefined;
|
|
9908
9908
|
return activatorEl.value;
|
|
9909
9909
|
}
|
|
9910
9910
|
}
|
|
9911
|
-
function getTarget(selector, vm) {
|
|
9911
|
+
function getTarget$1(selector, vm) {
|
|
9912
9912
|
if (!selector) return;
|
|
9913
9913
|
let target;
|
|
9914
9914
|
if (selector === 'parent') {
|
|
@@ -14530,7 +14530,7 @@ const VColorPickerEdit = defineComponent({
|
|
|
14530
14530
|
// Types
|
|
14531
14531
|
|
|
14532
14532
|
const VSliderSymbol = Symbol.for('vuetify:v-slider');
|
|
14533
|
-
function getOffset(e, el, direction) {
|
|
14533
|
+
function getOffset$1(e, el, direction) {
|
|
14534
14534
|
const vertical = direction === 'vertical';
|
|
14535
14535
|
const rect = el.getBoundingClientRect();
|
|
14536
14536
|
const touch = 'touches' in e ? e.touches[0] : e;
|
|
@@ -14689,7 +14689,7 @@ const useSlider = _ref => {
|
|
|
14689
14689
|
activeThumbRef.value.focus();
|
|
14690
14690
|
mousePressed.value = true;
|
|
14691
14691
|
if (activeThumbRef.value.contains(e.target)) {
|
|
14692
|
-
startOffset.value = getOffset(e, activeThumbRef.value, props.direction);
|
|
14692
|
+
startOffset.value = getOffset$1(e, activeThumbRef.value, props.direction);
|
|
14693
14693
|
} else {
|
|
14694
14694
|
startOffset.value = 0;
|
|
14695
14695
|
onSliderMove({
|
|
@@ -17534,6 +17534,112 @@ function getWeek(adapter, value) {
|
|
|
17534
17534
|
return Math.floor(diffDays / 7) + 1;
|
|
17535
17535
|
}
|
|
17536
17536
|
|
|
17537
|
+
// Utilities
|
|
17538
|
+
|
|
17539
|
+
// Types
|
|
17540
|
+
|
|
17541
|
+
const GoToSymbol = Symbol.for('vuetify:goto');
|
|
17542
|
+
function genDefaults() {
|
|
17543
|
+
return {
|
|
17544
|
+
container: undefined,
|
|
17545
|
+
duration: 300,
|
|
17546
|
+
layout: false,
|
|
17547
|
+
offset: 0,
|
|
17548
|
+
easing: 'easeInOutCubic',
|
|
17549
|
+
patterns: {
|
|
17550
|
+
linear: t => t,
|
|
17551
|
+
easeInQuad: t => t ** 2,
|
|
17552
|
+
easeOutQuad: t => t * (2 - t),
|
|
17553
|
+
easeInOutQuad: t => t < 0.5 ? 2 * t ** 2 : -1 + (4 - 2 * t) * t,
|
|
17554
|
+
easeInCubic: t => t ** 3,
|
|
17555
|
+
easeOutCubic: t => --t ** 3 + 1,
|
|
17556
|
+
easeInOutCubic: t => t < 0.5 ? 4 * t ** 3 : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1,
|
|
17557
|
+
easeInQuart: t => t ** 4,
|
|
17558
|
+
easeOutQuart: t => 1 - --t ** 4,
|
|
17559
|
+
easeInOutQuart: t => t < 0.5 ? 8 * t ** 4 : 1 - 8 * --t ** 4,
|
|
17560
|
+
easeInQuint: t => t ** 5,
|
|
17561
|
+
easeOutQuint: t => 1 + --t ** 5,
|
|
17562
|
+
easeInOutQuint: t => t < 0.5 ? 16 * t ** 5 : 1 + 16 * --t ** 5
|
|
17563
|
+
}
|
|
17564
|
+
};
|
|
17565
|
+
}
|
|
17566
|
+
function getContainer(el) {
|
|
17567
|
+
return getTarget(el) ?? (document.scrollingElement || document.body);
|
|
17568
|
+
}
|
|
17569
|
+
function getTarget(el) {
|
|
17570
|
+
return typeof el === 'string' ? document.querySelector(el) : refElement(el);
|
|
17571
|
+
}
|
|
17572
|
+
function getOffset(target, horizontal, rtl) {
|
|
17573
|
+
if (typeof target === 'number') return horizontal && rtl ? -target : target;
|
|
17574
|
+
let el = getTarget(target);
|
|
17575
|
+
let totalOffset = 0;
|
|
17576
|
+
while (el) {
|
|
17577
|
+
totalOffset += horizontal ? el.offsetLeft : el.offsetTop;
|
|
17578
|
+
el = el.offsetParent;
|
|
17579
|
+
}
|
|
17580
|
+
return totalOffset;
|
|
17581
|
+
}
|
|
17582
|
+
function createGoTo(options, locale) {
|
|
17583
|
+
return {
|
|
17584
|
+
rtl: locale.isRtl,
|
|
17585
|
+
options: mergeDeep(genDefaults(), options)
|
|
17586
|
+
};
|
|
17587
|
+
}
|
|
17588
|
+
async function scrollTo(_target, _options, horizontal, goTo) {
|
|
17589
|
+
const options = mergeDeep(goTo?.options, _options);
|
|
17590
|
+
const rtl = goTo?.rtl.value;
|
|
17591
|
+
const target = (typeof _target === 'number' ? _target : getTarget(_target)) ?? 0;
|
|
17592
|
+
const container = options.container === 'parent' && target instanceof HTMLElement ? target.parentElement : getContainer(options.container);
|
|
17593
|
+
const ease = typeof options.easing === 'function' ? options.easing : options.patterns[options.easing];
|
|
17594
|
+
if (!ease) throw new TypeError(`Easing function "${options.easing}" not found.`);
|
|
17595
|
+
let targetLocation;
|
|
17596
|
+
if (typeof target === 'number') {
|
|
17597
|
+
targetLocation = getOffset(target, horizontal, rtl);
|
|
17598
|
+
} else {
|
|
17599
|
+
targetLocation = getOffset(target, horizontal, rtl) - getOffset(container, horizontal, rtl);
|
|
17600
|
+
if (options.layout) {
|
|
17601
|
+
const styles = window.getComputedStyle(target);
|
|
17602
|
+
const layoutOffset = styles.getPropertyValue('--v-layout-top');
|
|
17603
|
+
if (layoutOffset) targetLocation -= parseInt(layoutOffset, 10);
|
|
17604
|
+
}
|
|
17605
|
+
}
|
|
17606
|
+
targetLocation += options.offset;
|
|
17607
|
+
const startLocation = (horizontal ? container.scrollLeft : container.scrollTop) ?? 0;
|
|
17608
|
+
if (targetLocation === startLocation) return Promise.resolve(targetLocation);
|
|
17609
|
+
const startTime = performance.now();
|
|
17610
|
+
return new Promise(resolve => requestAnimationFrame(function step(currentTime) {
|
|
17611
|
+
const timeElapsed = currentTime - startTime;
|
|
17612
|
+
const progress = Math.abs(options.duration ? Math.min(timeElapsed / options.duration, 1) : 1);
|
|
17613
|
+
const location = Math.floor(startLocation + (targetLocation - startLocation) * ease(progress));
|
|
17614
|
+
container[horizontal ? 'scrollLeft' : 'scrollTop'] = location;
|
|
17615
|
+
if (progress === 1) return resolve(targetLocation);
|
|
17616
|
+
let clientSize;
|
|
17617
|
+
let reachEnd;
|
|
17618
|
+
if (!horizontal) {
|
|
17619
|
+
clientSize = container === document.body ? document.documentElement.clientHeight : container.clientHeight;
|
|
17620
|
+
reachEnd = clientSize + container.scrollTop >= container.scrollHeight;
|
|
17621
|
+
if (targetLocation > container.scrollTop && reachEnd) return resolve(targetLocation);
|
|
17622
|
+
} else {
|
|
17623
|
+
clientSize = container === document.body ? document.documentElement.clientWidth : container.clientWidth;
|
|
17624
|
+
reachEnd = clientSize + container.scrollLeft >= container.scrollWidth;
|
|
17625
|
+
if (targetLocation > container.scrollLeft && reachEnd) return resolve(targetLocation);
|
|
17626
|
+
}
|
|
17627
|
+
requestAnimationFrame(step);
|
|
17628
|
+
}));
|
|
17629
|
+
}
|
|
17630
|
+
function useGoTo() {
|
|
17631
|
+
let _options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
17632
|
+
const goTo = inject$1(GoToSymbol);
|
|
17633
|
+
if (!goTo) throw new Error('[Vuetify] Could not find injected goto instance');
|
|
17634
|
+
async function go(target, options) {
|
|
17635
|
+
return scrollTo(target, mergeDeep(_options, options), false, goTo);
|
|
17636
|
+
}
|
|
17637
|
+
go.horizontal = async (target, options) => {
|
|
17638
|
+
return scrollTo(target, mergeDeep(_options, options), true, goTo);
|
|
17639
|
+
};
|
|
17640
|
+
return go;
|
|
17641
|
+
}
|
|
17642
|
+
|
|
17537
17643
|
// Composables
|
|
17538
17644
|
|
|
17539
17645
|
// Types
|
|
@@ -23016,8 +23122,8 @@ const VRangeSlider = genericComponent()({
|
|
|
23016
23122
|
} = useRtl();
|
|
23017
23123
|
function getActiveThumb(e) {
|
|
23018
23124
|
if (!startThumbRef.value || !stopThumbRef.value) return;
|
|
23019
|
-
const startOffset = getOffset(e, startThumbRef.value.$el, props.direction);
|
|
23020
|
-
const stopOffset = getOffset(e, stopThumbRef.value.$el, props.direction);
|
|
23125
|
+
const startOffset = getOffset$1(e, startThumbRef.value.$el, props.direction);
|
|
23126
|
+
const stopOffset = getOffset$1(e, stopThumbRef.value.$el, props.direction);
|
|
23021
23127
|
const a = Math.abs(startOffset);
|
|
23022
23128
|
const b = Math.abs(stopOffset);
|
|
23023
23129
|
return a < b || a === b && startOffset < 0 ? startThumbRef.value.$el : stopThumbRef.value.$el;
|
|
@@ -24192,6 +24298,10 @@ const VSwitch = genericComponent()({
|
|
|
24192
24298
|
isReadonly,
|
|
24193
24299
|
isValid
|
|
24194
24300
|
} = _ref2;
|
|
24301
|
+
const slotProps = {
|
|
24302
|
+
model,
|
|
24303
|
+
isValid
|
|
24304
|
+
};
|
|
24195
24305
|
return createVNode(VSelectionControl, mergeProps({
|
|
24196
24306
|
"ref": control
|
|
24197
24307
|
}, controlProps, {
|
|
@@ -24216,7 +24326,13 @@ const VSwitch = genericComponent()({
|
|
|
24216
24326
|
"class": ['v-switch__track', ...backgroundColorClasses.value],
|
|
24217
24327
|
"style": backgroundColorStyles.value,
|
|
24218
24328
|
"onClick": onTrackClick
|
|
24219
|
-
},
|
|
24329
|
+
}, [slots['track-true'] && createVNode("div", {
|
|
24330
|
+
"key": "prepend",
|
|
24331
|
+
"class": "v-switch__track-true"
|
|
24332
|
+
}, [slots['track-true'](slotProps)]), slots['track-false'] && createVNode("div", {
|
|
24333
|
+
"key": "append",
|
|
24334
|
+
"class": "v-switch__track-false"
|
|
24335
|
+
}, [slots['track-false'](slotProps)])]);
|
|
24220
24336
|
},
|
|
24221
24337
|
input: _ref4 => {
|
|
24222
24338
|
let {
|
|
@@ -24230,9 +24346,21 @@ const VSwitch = genericComponent()({
|
|
|
24230
24346
|
'v-switch__thumb--filled': icon || props.loading
|
|
24231
24347
|
}, props.inset ? undefined : backgroundColorClasses.value],
|
|
24232
24348
|
"style": props.inset ? undefined : backgroundColorStyles.value
|
|
24233
|
-
}, [createVNode(
|
|
24349
|
+
}, [slots.thumb ? createVNode(VDefaultsProvider, {
|
|
24350
|
+
"defaults": {
|
|
24351
|
+
VIcon: {
|
|
24352
|
+
icon,
|
|
24353
|
+
size: 'x-small'
|
|
24354
|
+
}
|
|
24355
|
+
}
|
|
24356
|
+
}, {
|
|
24357
|
+
default: () => [slots.thumb({
|
|
24358
|
+
...slotProps,
|
|
24359
|
+
icon
|
|
24360
|
+
})]
|
|
24361
|
+
}) : createVNode(VScaleTransition, null, {
|
|
24234
24362
|
default: () => [!props.loading ? icon && createVNode(VIcon, {
|
|
24235
|
-
"key": icon,
|
|
24363
|
+
"key": String(icon),
|
|
24236
24364
|
"icon": icon,
|
|
24237
24365
|
"size": "x-small"
|
|
24238
24366
|
}, null) : createVNode(LoaderSlot, {
|
|
@@ -26004,6 +26132,7 @@ function createVuetify$1() {
|
|
|
26004
26132
|
const icons = createIcons(options.icons);
|
|
26005
26133
|
const locale = createLocale(options.locale);
|
|
26006
26134
|
const date = createDate(options.date, locale);
|
|
26135
|
+
const goTo = createGoTo(options.goTo, locale);
|
|
26007
26136
|
const install = app => {
|
|
26008
26137
|
for (const key in directives) {
|
|
26009
26138
|
app.directive(key, directives[key]);
|
|
@@ -26026,6 +26155,7 @@ function createVuetify$1() {
|
|
|
26026
26155
|
app.provide(LocaleSymbol, locale);
|
|
26027
26156
|
app.provide(DateOptionsSymbol, date.options);
|
|
26028
26157
|
app.provide(DateAdapterSymbol, date.instance);
|
|
26158
|
+
app.provide(GoToSymbol, goTo);
|
|
26029
26159
|
if (IN_BROWSER && options.ssr) {
|
|
26030
26160
|
if (app.$nuxt) {
|
|
26031
26161
|
app.$nuxt.hook('app:suspense:resolve', () => {
|
|
@@ -26068,10 +26198,11 @@ function createVuetify$1() {
|
|
|
26068
26198
|
theme,
|
|
26069
26199
|
icons,
|
|
26070
26200
|
locale,
|
|
26071
|
-
date
|
|
26201
|
+
date,
|
|
26202
|
+
goTo
|
|
26072
26203
|
};
|
|
26073
26204
|
}
|
|
26074
|
-
const version$1 = "3.
|
|
26205
|
+
const version$1 = "3.5.0-dev.2024-01-20";
|
|
26075
26206
|
createVuetify$1.version = version$1;
|
|
26076
26207
|
|
|
26077
26208
|
// Vue's inject() can only be used in setup
|
|
@@ -26085,7 +26216,7 @@ function inject(key) {
|
|
|
26085
26216
|
|
|
26086
26217
|
/* eslint-disable local-rules/sort-imports */
|
|
26087
26218
|
|
|
26088
|
-
const version = "3.
|
|
26219
|
+
const version = "3.5.0-dev.2024-01-20";
|
|
26089
26220
|
|
|
26090
26221
|
/* eslint-disable local-rules/sort-imports */
|
|
26091
26222
|
|
|
@@ -26098,5 +26229,5 @@ const createVuetify = function () {
|
|
|
26098
26229
|
});
|
|
26099
26230
|
};
|
|
26100
26231
|
|
|
26101
|
-
export { components, createVuetify, directives, useDate, useDefaults, useDisplay, useLayout, useLocale, useRtl, useTheme, version };
|
|
26232
|
+
export { components, createVuetify, directives, useDate, useDefaults, useDisplay, useGoTo, useLayout, useLocale, useRtl, useTheme, version };
|
|
26102
26233
|
//# sourceMappingURL=vuetify-labs.esm.js.map
|