vuetify 3.5.5 → 3.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/json/attributes.json +40 -0
- package/dist/json/importMap-labs.json +8 -8
- package/dist/json/importMap.json +132 -128
- package/dist/json/tags.json +15 -0
- package/dist/json/web-types.json +292 -1
- package/dist/vuetify-labs.css +1632 -1635
- package/dist/vuetify-labs.d.ts +242 -1
- package/dist/vuetify-labs.esm.js +24 -13
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +24 -13
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +711 -714
- package/dist/vuetify.d.ts +281 -39
- package/dist/vuetify.esm.js +24 -13
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +24 -13
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +22 -21
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.mjs +7 -4
- package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
- package/lib/components/VCombobox/VCombobox.mjs +3 -1
- package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
- package/lib/components/VDataTable/index.d.mts +214 -1
- package/lib/components/VDataTable/index.mjs +1 -0
- package/lib/components/VDataTable/index.mjs.map +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanel.css +4 -7
- package/lib/components/VExpansionPanel/VExpansionPanel.sass +4 -3
- package/lib/components/VExpansionPanel/VExpansionPanelTitle.mjs +2 -0
- package/lib/components/VExpansionPanel/VExpansionPanelTitle.mjs.map +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanels.mjs +2 -0
- package/lib/components/VExpansionPanel/VExpansionPanels.mjs.map +1 -1
- package/lib/components/VExpansionPanel/index.d.mts +27 -0
- package/lib/components/VSelect/VSelect.mjs +4 -3
- package/lib/components/VSelect/VSelect.mjs.map +1 -1
- package/lib/components/index.d.mts +241 -1
- package/lib/composables/filter.mjs +1 -1
- package/lib/composables/filter.mjs.map +1 -1
- package/lib/composables/goto.mjs +2 -2
- package/lib/composables/goto.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/framework.mjs +1 -1
- package/lib/index.d.mts +39 -38
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter.mjs","names":["computed","ref","unref","watchEffect","getPropertyFromItem","propsFactory","wrapInArray","defaultFilter","value","query","item","toString","toLocaleLowerCase","indexOf","makeFilterProps","customFilter","Function","customKeyFilter","Object","filterKeys","Array","String","filterMode","type","default","noFilter","Boolean","filterItems","items","options","array","filter","keys","customFiltersLength","length","loop","i","transformed","customMatches","defaultMatches","match","key","keyFilter","title","defaultMatchesLength","customMatchesLength","push","index","matches","useFilter","props","filteredItems","filteredMatches","Map","transformedItems","transform","map","_query","strQuery","results","originalItems","_filteredItems","_filteredMatches","forEach","_ref","set","getMatches","get"],"sources":["../../src/composables/filter.ts"],"sourcesContent":["/* eslint-disable max-statements */\n/* eslint-disable no-labels */\n\n// Utilities\nimport { computed, ref, unref, watchEffect } from 'vue'\nimport { getPropertyFromItem, propsFactory, wrapInArray } from '@/util'\n\n// Types\nimport type { PropType, Ref } from 'vue'\nimport type { MaybeRef } from '@/util'\n\n/**\n * - match without highlight\n * - single match (index), length already known\n * - single match (start, end)\n * - multiple matches (start, end), probably shouldn't overlap\n */\nexport type FilterMatch = boolean | number | [number, number] | [number, number][]\nexport type FilterFunction = (value: string, query: string, item?: InternalItem) => FilterMatch\nexport type FilterKeyFunctions = Record<string, FilterFunction>\nexport type FilterKeys = string | string[]\nexport type FilterMode = 'some' | 'every' | 'union' | 'intersection'\n\nexport interface FilterProps {\n customFilter?: FilterFunction\n customKeyFilter?: FilterKeyFunctions\n filterKeys?: FilterKeys\n filterMode?: FilterMode\n noFilter?: boolean\n}\n\nexport interface InternalItem<T = any> {\n value: any\n raw: T\n}\n\n// Composables\nexport const defaultFilter: FilterFunction = (value, query, item) => {\n if (value == null || query == null) return -1\n\n return value.toString().toLocaleLowerCase().indexOf(query.toString().toLocaleLowerCase())\n}\n\nexport const makeFilterProps = propsFactory({\n customFilter: Function as PropType<FilterFunction>,\n customKeyFilter: Object as PropType<FilterKeyFunctions>,\n filterKeys: [Array, String] as PropType<FilterKeys>,\n filterMode: {\n type: String as PropType<FilterMode>,\n default: 'intersection',\n },\n noFilter: Boolean,\n}, 'filter')\n\nexport function filterItems (\n items: readonly (readonly [item: InternalItem, transformed: {}])[] | readonly InternalItem[],\n query: string,\n options?: {\n customKeyFilter?: FilterKeyFunctions\n default?: FilterFunction\n filterKeys?: FilterKeys\n filterMode?: FilterMode\n noFilter?: boolean\n },\n) {\n const array: { index: number, matches: Record<string, FilterMatch> }[] = []\n // always ensure we fall back to a functioning filter\n const filter = options?.default ?? defaultFilter\n const keys = options?.filterKeys ? wrapInArray(options.filterKeys) : false\n const customFiltersLength = Object.keys(options?.customKeyFilter ?? {}).length\n\n if (!items?.length) return array\n\n loop:\n for (let i = 0; i < items.length; i++) {\n const [item, transformed = item] = wrapInArray(items[i]) as readonly [InternalItem, {}]\n const customMatches: Record<string, FilterMatch> = {}\n const defaultMatches: Record<string, FilterMatch> = {}\n let match: FilterMatch = -1\n\n if (query && !options?.noFilter) {\n if (typeof item === 'object') {\n const filterKeys = keys || Object.keys(transformed)\n\n for (const key of filterKeys) {\n const value = getPropertyFromItem(transformed, key, transformed)\n const keyFilter = options?.customKeyFilter?.[key]\n\n match = keyFilter\n ? keyFilter(value, query, item)\n : filter(value, query, item)\n\n if (match !== -1 && match !== false) {\n if (keyFilter) customMatches[key] = match\n else defaultMatches[key] = match\n } else if (options?.filterMode === 'every') {\n continue loop\n }\n }\n } else {\n match = filter(item, query, item)\n if (match !== -1 && match !== false) {\n defaultMatches.title = match\n }\n }\n\n const defaultMatchesLength = Object.keys(defaultMatches).length\n const customMatchesLength = Object.keys(customMatches).length\n\n if (!defaultMatchesLength && !customMatchesLength) continue\n\n if (\n options?.filterMode === 'union' &&\n customMatchesLength !== customFiltersLength &&\n !defaultMatchesLength\n ) continue\n\n if (\n options?.filterMode === 'intersection' &&\n (\n customMatchesLength !== customFiltersLength ||\n !defaultMatchesLength\n )\n ) continue\n }\n\n array.push({ index: i, matches: { ...defaultMatches, ...customMatches } })\n }\n\n return array\n}\n\nexport function useFilter <T extends InternalItem> (\n props: FilterProps,\n items: MaybeRef<T[]>,\n query: Ref<string | undefined> | (() => string | undefined),\n options?: {\n transform?: (item: T) => {}\n customKeyFilter?: MaybeRef<FilterKeyFunctions | undefined>\n }\n) {\n const filteredItems: Ref<T[]> = ref([])\n const filteredMatches: Ref<Map<unknown, Record<string, FilterMatch>>> = ref(new Map())\n const transformedItems = computed(() => (\n options?.transform\n ? unref(items).map(item => ([item, options.transform!(item)] as const))\n : unref(items)\n ))\n\n watchEffect(() => {\n const _query = typeof query === 'function' ? query() : unref(query)\n const strQuery = (\n typeof _query !== 'string' &&\n typeof _query !== 'number'\n ) ? '' : String(_query)\n\n const results = filterItems(\n transformedItems.value,\n strQuery,\n {\n customKeyFilter: {\n ...props.customKeyFilter,\n ...unref(options?.customKeyFilter),\n },\n default: props.customFilter,\n filterKeys: props.filterKeys,\n filterMode: props.filterMode,\n noFilter: props.noFilter,\n },\n )\n\n const originalItems = unref(items)\n\n const _filteredItems: typeof filteredItems['value'] = []\n const _filteredMatches: typeof filteredMatches['value'] = new Map()\n results.forEach(({ index, matches }) => {\n const item = originalItems[index]\n _filteredItems.push(item)\n _filteredMatches.set(item.value, matches)\n })\n filteredItems.value = _filteredItems\n filteredMatches.value = _filteredMatches\n })\n\n function getMatches (item: T) {\n return filteredMatches.value.get(item.value)\n }\n\n return { filteredItems, filteredMatches, getMatches }\n}\n"],"mappings":"AAAA;AACA;;AAEA;AACA,SAASA,QAAQ,EAAEC,GAAG,EAAEC,KAAK,EAAEC,WAAW,QAAQ,KAAK;AAAA,SAC9CC,mBAAmB,EAAEC,YA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|
1
|
+
{"version":3,"file":"filter.mjs","names":["computed","ref","unref","watchEffect","getPropertyFromItem","propsFactory","wrapInArray","defaultFilter","value","query","item","toString","toLocaleLowerCase","indexOf","makeFilterProps","customFilter","Function","customKeyFilter","Object","filterKeys","Array","String","filterMode","type","default","noFilter","Boolean","filterItems","items","options","array","filter","keys","customFiltersLength","length","loop","i","transformed","customMatches","defaultMatches","match","key","keyFilter","title","defaultMatchesLength","customMatchesLength","push","index","matches","useFilter","props","filteredItems","filteredMatches","Map","transformedItems","transform","map","_query","strQuery","results","originalItems","_filteredItems","_filteredMatches","forEach","_ref","set","getMatches","get"],"sources":["../../src/composables/filter.ts"],"sourcesContent":["/* eslint-disable max-statements */\n/* eslint-disable no-labels */\n\n// Utilities\nimport { computed, ref, unref, watchEffect } from 'vue'\nimport { getPropertyFromItem, propsFactory, wrapInArray } from '@/util'\n\n// Types\nimport type { PropType, Ref } from 'vue'\nimport type { MaybeRef } from '@/util'\n\n/**\n * - match without highlight\n * - single match (index), length already known\n * - single match (start, end)\n * - multiple matches (start, end), probably shouldn't overlap\n */\nexport type FilterMatch = boolean | number | [number, number] | [number, number][]\nexport type FilterFunction = (value: string, query: string, item?: InternalItem) => FilterMatch\nexport type FilterKeyFunctions = Record<string, FilterFunction>\nexport type FilterKeys = string | string[]\nexport type FilterMode = 'some' | 'every' | 'union' | 'intersection'\n\nexport interface FilterProps {\n customFilter?: FilterFunction\n customKeyFilter?: FilterKeyFunctions\n filterKeys?: FilterKeys\n filterMode?: FilterMode\n noFilter?: boolean\n}\n\nexport interface InternalItem<T = any> {\n value: any\n raw: T\n}\n\n// Composables\nexport const defaultFilter: FilterFunction = (value, query, item) => {\n if (value == null || query == null) return -1\n\n return value.toString().toLocaleLowerCase().indexOf(query.toString().toLocaleLowerCase())\n}\n\nexport const makeFilterProps = propsFactory({\n customFilter: Function as PropType<FilterFunction>,\n customKeyFilter: Object as PropType<FilterKeyFunctions>,\n filterKeys: [Array, String] as PropType<FilterKeys>,\n filterMode: {\n type: String as PropType<FilterMode>,\n default: 'intersection',\n },\n noFilter: Boolean,\n}, 'filter')\n\nexport function filterItems (\n items: readonly (readonly [item: InternalItem, transformed: {}])[] | readonly InternalItem[],\n query: string,\n options?: {\n customKeyFilter?: FilterKeyFunctions\n default?: FilterFunction\n filterKeys?: FilterKeys\n filterMode?: FilterMode\n noFilter?: boolean\n },\n) {\n const array: { index: number, matches: Record<string, FilterMatch> }[] = []\n // always ensure we fall back to a functioning filter\n const filter = options?.default ?? defaultFilter\n const keys = options?.filterKeys ? wrapInArray(options.filterKeys) : false\n const customFiltersLength = Object.keys(options?.customKeyFilter ?? {}).length\n\n if (!items?.length) return array\n\n loop:\n for (let i = 0; i < items.length; i++) {\n const [item, transformed = item] = wrapInArray(items[i]) as readonly [InternalItem, {}]\n const customMatches: Record<string, FilterMatch> = {}\n const defaultMatches: Record<string, FilterMatch> = {}\n let match: FilterMatch = -1\n\n if (query && !options?.noFilter) {\n if (typeof item === 'object') {\n const filterKeys = keys || Object.keys(transformed)\n\n for (const key of filterKeys) {\n const value = getPropertyFromItem(transformed, key)\n const keyFilter = options?.customKeyFilter?.[key]\n\n match = keyFilter\n ? keyFilter(value, query, item)\n : filter(value, query, item)\n\n if (match !== -1 && match !== false) {\n if (keyFilter) customMatches[key] = match\n else defaultMatches[key] = match\n } else if (options?.filterMode === 'every') {\n continue loop\n }\n }\n } else {\n match = filter(item, query, item)\n if (match !== -1 && match !== false) {\n defaultMatches.title = match\n }\n }\n\n const defaultMatchesLength = Object.keys(defaultMatches).length\n const customMatchesLength = Object.keys(customMatches).length\n\n if (!defaultMatchesLength && !customMatchesLength) continue\n\n if (\n options?.filterMode === 'union' &&\n customMatchesLength !== customFiltersLength &&\n !defaultMatchesLength\n ) continue\n\n if (\n options?.filterMode === 'intersection' &&\n (\n customMatchesLength !== customFiltersLength ||\n !defaultMatchesLength\n )\n ) continue\n }\n\n array.push({ index: i, matches: { ...defaultMatches, ...customMatches } })\n }\n\n return array\n}\n\nexport function useFilter <T extends InternalItem> (\n props: FilterProps,\n items: MaybeRef<T[]>,\n query: Ref<string | undefined> | (() => string | undefined),\n options?: {\n transform?: (item: T) => {}\n customKeyFilter?: MaybeRef<FilterKeyFunctions | undefined>\n }\n) {\n const filteredItems: Ref<T[]> = ref([])\n const filteredMatches: Ref<Map<unknown, Record<string, FilterMatch>>> = ref(new Map())\n const transformedItems = computed(() => (\n options?.transform\n ? unref(items).map(item => ([item, options.transform!(item)] as const))\n : unref(items)\n ))\n\n watchEffect(() => {\n const _query = typeof query === 'function' ? query() : unref(query)\n const strQuery = (\n typeof _query !== 'string' &&\n typeof _query !== 'number'\n ) ? '' : String(_query)\n\n const results = filterItems(\n transformedItems.value,\n strQuery,\n {\n customKeyFilter: {\n ...props.customKeyFilter,\n ...unref(options?.customKeyFilter),\n },\n default: props.customFilter,\n filterKeys: props.filterKeys,\n filterMode: props.filterMode,\n noFilter: props.noFilter,\n },\n )\n\n const originalItems = unref(items)\n\n const _filteredItems: typeof filteredItems['value'] = []\n const _filteredMatches: typeof filteredMatches['value'] = new Map()\n results.forEach(({ index, matches }) => {\n const item = originalItems[index]\n _filteredItems.push(item)\n _filteredMatches.set(item.value, matches)\n })\n filteredItems.value = _filteredItems\n filteredMatches.value = _filteredMatches\n })\n\n function getMatches (item: T) {\n return filteredMatches.value.get(item.value)\n }\n\n return { filteredItems, filteredMatches, getMatches }\n}\n"],"mappings":"AAAA;AACA;;AAEA;AACA,SAASA,QAAQ,EAAEC,GAAG,EAAEC,KAAK,EAAEC,WAAW,QAAQ,KAAK;AAAA,SAC9CC,mBAAmB,EAAEC,YAAY,EAAEC,WAAW,6BAEvD;AAIA;AACA;AACA;AACA;AACA;AACA;AAoBA;AACA,OAAO,MAAMC,aAA6B,GAAGA,CAACC,KAAK,EAAEC,KAAK,EAAEC,IAAI,KAAK;EACnE,IAAIF,KAAK,IAAI,IAAI,IAAIC,KAAK,IAAI,IAAI,EAAE,OAAO,CAAC,CAAC;EAE7C,OAAO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Ae;QACxB,GAAGf,KAAK,CAAC2B,OAAO,EAAEZ,eAAe;MACnC,CAAC;MACDO,OAAO,EAAE0B,KAAK,CAACnC,YAAY;MAC3BI,UAAU,EAAE+B,KAAK,CAAC/B,UAAU;MAC5BG,UAAU,EAAE4B,KAAK,CAAC5B,UAAU;MAC5BG,QAAQ,EAAEyB,KAAK,CAACzB;IAClB,CACF,CAAC;IAED,MAAMmC,aAAa,GAAG1D,KAAK,CAAC0B,KAAK,CAAC;IAElC,MAAMiC,cAA6C,GAAG,EAAE;IACxD,MAAMC,gBAAiD,GAAG,IAAIT,GAAG,CAAC,CAAC;IACnEM,OAAO,CAACI,OAAO,CAACC,IAAA,IAAwB;MAAA,IAAvB;QAAEjB,KAAK;QAAEC;MAAQ,CAAC,GAAAgB,IAAA;MACjC,MAAMtD,IAAI,GAAGkD,aAAa,CAACb,KAAK,CAAC;MACjCc,cAAc,CAACf,IAAI,CAACpC,IAAI,CAAC;MACzBoD,gBAAgB,CAACG,GAAG,CAACvD,IAAI,CAACF,KAAK,EAAEwC,OAAO,CAAC;IAC3C,CAAC,CAAC;IACFG,aAAa,CAAC3C,KAAK,GAAGqD,cAAc;IACpCT,eAAe,CAAC5C,KAAK,GAAGsD,gBAAgB;EAC1C,CAAC,CAAC;EAEF,SAASI,UAAUA,CAAExD,IAAO,EAAE;IAC5B,OAAO0C,eAAe,CAAC5C,KAAK,CAAC2D,GAAG,CAACzD,IAAI,CAACF,KAAK,CAAC;EAC9C;EAEA,OAAO;IAAE2C,aAAa;IAAEC,eAAe;IAAEc;EAAW,CAAC;AACvD"}
|
package/lib/composables/goto.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Utilities
|
|
2
2
|
import { inject } from 'vue';
|
|
3
|
-
import { consoleWarn, mergeDeep, refElement } from "../util/index.mjs"; // Types
|
|
3
|
+
import { clamp, consoleWarn, mergeDeep, refElement } from "../util/index.mjs"; // Types
|
|
4
4
|
export const GoToSymbol = Symbol.for('vuetify:goto');
|
|
5
5
|
function genDefaults() {
|
|
6
6
|
return {
|
|
@@ -74,7 +74,7 @@ export async function scrollTo(_target, _options, horizontal, goTo) {
|
|
|
74
74
|
return new Promise(resolve => requestAnimationFrame(function step(currentTime) {
|
|
75
75
|
const timeElapsed = currentTime - startTime;
|
|
76
76
|
const progress = timeElapsed / options.duration;
|
|
77
|
-
const location = Math.floor(startLocation + (targetLocation - startLocation) * ease(
|
|
77
|
+
const location = Math.floor(startLocation + (targetLocation - startLocation) * ease(clamp(progress, 0, 1)));
|
|
78
78
|
container[property] = location;
|
|
79
79
|
|
|
80
80
|
// Allow for some jitter if target time has elapsed
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"goto.mjs","names":["inject","consoleWarn","mergeDeep","refElement","GoToSymbol","Symbol","for","genDefaults","container","undefined","duration","layout","offset","easing","patterns","linear","t","easeInQuad","easeOutQuad","easeInOutQuad","easeInCubic","easeOutCubic","easeInOutCubic","easeInQuart","easeOutQuart","easeInOutQuart","easeInQuint","easeOutQuint","easeInOutQuint","getContainer","el","getTarget","document","scrollingElement","body","querySelector","getOffset","target","horizontal","rtl","totalOffset","offsetLeft","offsetTop","offsetParent","createGoTo","options","locale","isRtl","scrollTo","_target","_options","goTo","property","value","HTMLElement","parentElement","ease","TypeError","targetLocation","styles","window","getComputedStyle","layoutOffset","getPropertyValue","parseInt","startLocation","Promise","resolve","startTime","performance","now","requestAnimationFrame","step","currentTime","timeElapsed","progress","location","Math","floor","max","abs","useGoTo","arguments","length","Error","go"],"sources":["../../src/composables/goto.ts"],"sourcesContent":["// Utilities\nimport { inject } from 'vue'\nimport { consoleWarn, mergeDeep, refElement } from '@/util'\n\n// Types\nimport type { ComponentPublicInstance, InjectionKey, Ref } from 'vue'\nimport type { LocaleInstance, RtlInstance } from './locale'\n\nexport interface GoToInstance {\n rtl: Ref<boolean>\n options: GoToOptions\n}\n\nexport interface GoToOptions {\n container: ComponentPublicInstance | HTMLElement | string\n duration: number\n layout: boolean\n offset: number\n easing: string | ((t: number) => number)\n patterns: Record<string, (t: number) => number>\n}\n\nexport const GoToSymbol: InjectionKey<GoToInstance> = Symbol.for('vuetify:goto')\n\nfunction genDefaults () {\n return {\n container: undefined,\n duration: 300,\n layout: false,\n offset: 0,\n easing: 'easeInOutCubic',\n patterns: {\n linear: (t: number) => t,\n easeInQuad: (t: number) => t ** 2,\n easeOutQuad: (t: number) => t * (2 - t),\n easeInOutQuad: (t: number) => (t < 0.5 ? 2 * t ** 2 : -1 + (4 - 2 * t) * t),\n easeInCubic: (t: number) => t ** 3,\n easeOutCubic: (t: number) => --t ** 3 + 1,\n easeInOutCubic: (t: number) => t < 0.5 ? 4 * t ** 3 : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1,\n easeInQuart: (t: number) => t ** 4,\n easeOutQuart: (t: number) => 1 - --t ** 4,\n easeInOutQuart: (t: number) => (t < 0.5 ? 8 * t ** 4 : 1 - 8 * --t ** 4),\n easeInQuint: (t: number) => t ** 5,\n easeOutQuint: (t: number) => 1 + --t ** 5,\n easeInOutQuint: (t: number) => t < 0.5 ? 16 * t ** 5 : 1 + 16 * --t ** 5,\n },\n }\n}\n\nfunction getContainer (el?: ComponentPublicInstance | HTMLElement | string) {\n return getTarget(el) ?? (document.scrollingElement || document.body) as HTMLElement\n}\n\nfunction getTarget (el: ComponentPublicInstance | HTMLElement | string | undefined) {\n return (typeof el === 'string') ? document.querySelector<HTMLElement>(el) : refElement(el)\n}\n\nfunction getOffset (target: any, horizontal?: boolean, rtl?: boolean): number {\n if (typeof target === 'number') return horizontal && rtl ? -target : target\n\n let el = getTarget(target)\n let totalOffset = 0\n while (el) {\n totalOffset += horizontal ? el.offsetLeft : el.offsetTop\n el = el.offsetParent as HTMLElement\n }\n\n return totalOffset\n}\n\nexport function createGoTo (options: Partial<GoToOptions> | undefined, locale: LocaleInstance & RtlInstance) {\n return {\n rtl: locale.isRtl,\n options: mergeDeep(genDefaults(), options),\n }\n}\n\nexport async function scrollTo (\n _target: ComponentPublicInstance | HTMLElement | number | string,\n _options: Partial<GoToOptions>,\n horizontal?: boolean,\n goTo?: GoToInstance,\n) {\n const property = horizontal ? 'scrollLeft' : 'scrollTop'\n const options = mergeDeep(goTo?.options ?? genDefaults(), _options)\n const rtl = goTo?.rtl.value\n const target = (typeof _target === 'number' ? _target : getTarget(_target)) ?? 0\n const container = options.container === 'parent' && target instanceof HTMLElement\n ? target.parentElement!\n : getContainer(options.container)\n const ease = typeof options.easing === 'function' ? options.easing : options.patterns[options.easing]\n\n if (!ease) throw new TypeError(`Easing function \"${options.easing}\" not found.`)\n\n let targetLocation: number\n if (typeof target === 'number') {\n targetLocation = getOffset(target, horizontal, rtl)\n } else {\n targetLocation = getOffset(target, horizontal, rtl) - getOffset(container, horizontal, rtl)\n\n if (options.layout) {\n const styles = window.getComputedStyle(target)\n const layoutOffset = styles.getPropertyValue('--v-layout-top')\n\n if (layoutOffset) targetLocation -= parseInt(layoutOffset, 10)\n }\n }\n\n targetLocation += options.offset\n\n const startLocation = container[property] ?? 0\n\n if (targetLocation === startLocation) return Promise.resolve(targetLocation)\n\n const startTime = performance.now()\n\n return new Promise(resolve => requestAnimationFrame(function step (currentTime: number) {\n const timeElapsed = currentTime - startTime\n const progress = timeElapsed / options.duration\n const location = Math.floor(\n startLocation +\n (targetLocation - startLocation) *\n ease(Math.max(progress, 1))\n )\n\n container[property] = location\n\n // Allow for some jitter if target time has elapsed\n if (progress >= 1 && Math.abs(location - container[property]) < 10) {\n return resolve(targetLocation)\n } else if (progress > 2) {\n // The target might not be reachable\n consoleWarn('Scroll target is not reachable')\n return resolve(container[property])\n }\n\n requestAnimationFrame(step)\n }))\n}\n\nexport function useGoTo (_options: Partial<GoToOptions> = {}) {\n const goTo = inject(GoToSymbol)\n\n if (!goTo) throw new Error('[Vuetify] Could not find injected goto instance')\n\n async function go (\n target: ComponentPublicInstance | HTMLElement | string | number,\n options?: Partial<GoToOptions>,\n ) {\n return scrollTo(target, mergeDeep(_options, options), false, goTo)\n }\n\n go.horizontal = async (\n target: ComponentPublicInstance | HTMLElement | string | number,\n options?: Partial<GoToOptions>,\n ) => {\n return scrollTo(target, mergeDeep(_options, options), true, goTo)\n }\n\n return go\n}\n"],"mappings":"AAAA;AACA,SAASA,MAAM,QAAQ,KAAK;AAAA,SACnBC,WAAW,EAAEC,SAAS,EAAEC,UAAU,6BAE3C;AAkBA,OAAO,MAAMC,UAAsC,GAAGC,MAAM,CAACC,GAAG,CAAC,cAAc,CAAC;AAEhF,SAASC,WAAWA,CAAA,EAAI;EACtB,OAAO;IACLC,SAAS,EAAEC,SAAS;IACpBC,QAAQ,EAAE,GAAG;IACbC,MAAM,EAAE,KAAK;IACbC,MAAM,EAAE,CAAC;IACTC,MAAM,EAAE,gBAAgB;IACxBC,QAAQ,EAAE;MACRC,MAAM,EAAGC,CAAS,IAAKA,CAAC;MACxBC,UAAU,EAAGD,CAAS,IAAKA,CAAC,IAAI,CAAC;MACjCE,WAAW,EAAGF,CAAS,IAAKA,CAAC,IAAI,CAAC,GAAGA,CAAC,CAAC;MACvCG,aAAa,EAAGH,CAAS,IAAMA,CAAC,GAAG,GAAG,GAAG,CAAC,GAAGA,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAGA,CAAC,IAAIA,CAAE;MAC3EI,WAAW,EAAGJ,CAAS,IAAKA,CAAC,IAAI,CAAC;MAClCK,YAAY,EAAGL,CAAS,IAAK,EAAEA,CAAC,IAAI,CAAC,GAAG,CAAC;MACzCM,cAAc,EAAGN,CAAS,IAAKA,CAAC,GAAG,GAAG,GAAG,CAAC,GAAGA,CAAC,IAAI,CAAC,GAAG,CAACA,CAAC,GAAG,CAAC,KAAK,CAAC,GAAGA,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAGA,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC;MAC7FO,WAAW,EAAGP,CAAS,IAAKA,CAAC,IAAI,CAAC;MAClCQ,YA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;IAChC,CAAC,MAAM,IAAIiB,QAAQ,GAAG,CAAC,EAAE;MACvB;MACA1E,WAAW,CAAC,gCAAgC,CAAC;MAC7C,OAAOkE,OAAO,CAAC3D,SAAS,CAAC4C,QAAQ,CAAC,CAAC;IACrC;IAEAmB,qBAAqB,CAACC,IAAI,CAAC;EAC7B,CAAC,CAAC,CAAC;AACL;AAEA,OAAO,SAASS,OAAOA,CAAA,EAAuC;EAAA,IAArC/B,QAA8B,GAAAgC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAzE,SAAA,GAAAyE,SAAA,MAAG,CAAC,CAAC;EAC1D,MAAM/B,IAAI,GAAGnD,MAAM,CAACI,UAAU,CAAC;EAE/B,IAAI,CAAC+C,IAAI,EAAE,MAAM,IAAIiC,KAAK,CAAC,iDAAiD,CAAC;EAE7E,eAAeC,EAAEA,CACfhD,MAA+D,EAC/DQ,OAA8B,EAC9B;IACA,OAAOG,QAAQ,CAACX,MAAM,EAAEnC,SAAS,CAACgD,QAAQ,EAAEL,OAAO,CAAC,EAAE,KAAK,EAAEM,IAAI,CAAC;EACpE;EAEAkC,EAAE,CAAC/C,UAAU,GAAG,OACdD,MAA+D,EAC/DQ,OAA8B,KAC3B;IACH,OAAOG,QAAQ,CAACX,MAAM,EAAEnC,SAAS,CAACgD,QAAQ,EAAEL,OAAO,CAAC,EAAE,IAAI,EAAEM,IAAI,CAAC;EACnE,CAAC;EAED,OAAOkC,EAAE;AACX"}
|
|
1
|
+
{"version":3,"file":"goto.mjs","names":["inject","clamp","consoleWarn","mergeDeep","refElement","GoToSymbol","Symbol","for","genDefaults","container","undefined","duration","layout","offset","easing","patterns","linear","t","easeInQuad","easeOutQuad","easeInOutQuad","easeInCubic","easeOutCubic","easeInOutCubic","easeInQuart","easeOutQuart","easeInOutQuart","easeInQuint","easeOutQuint","easeInOutQuint","getContainer","el","getTarget","document","scrollingElement","body","querySelector","getOffset","target","horizontal","rtl","totalOffset","offsetLeft","offsetTop","offsetParent","createGoTo","options","locale","isRtl","scrollTo","_target","_options","goTo","property","value","HTMLElement","parentElement","ease","TypeError","targetLocation","styles","window","getComputedStyle","layoutOffset","getPropertyValue","parseInt","startLocation","Promise","resolve","startTime","performance","now","requestAnimationFrame","step","currentTime","timeElapsed","progress","location","Math","floor","abs","useGoTo","arguments","length","Error","go"],"sources":["../../src/composables/goto.ts"],"sourcesContent":["// Utilities\nimport { inject } from 'vue'\nimport { clamp, consoleWarn, mergeDeep, refElement } from '@/util'\n\n// Types\nimport type { ComponentPublicInstance, InjectionKey, Ref } from 'vue'\nimport type { LocaleInstance, RtlInstance } from './locale'\n\nexport interface GoToInstance {\n rtl: Ref<boolean>\n options: GoToOptions\n}\n\nexport interface GoToOptions {\n container: ComponentPublicInstance | HTMLElement | string\n duration: number\n layout: boolean\n offset: number\n easing: string | ((t: number) => number)\n patterns: Record<string, (t: number) => number>\n}\n\nexport const GoToSymbol: InjectionKey<GoToInstance> = Symbol.for('vuetify:goto')\n\nfunction genDefaults () {\n return {\n container: undefined,\n duration: 300,\n layout: false,\n offset: 0,\n easing: 'easeInOutCubic',\n patterns: {\n linear: (t: number) => t,\n easeInQuad: (t: number) => t ** 2,\n easeOutQuad: (t: number) => t * (2 - t),\n easeInOutQuad: (t: number) => (t < 0.5 ? 2 * t ** 2 : -1 + (4 - 2 * t) * t),\n easeInCubic: (t: number) => t ** 3,\n easeOutCubic: (t: number) => --t ** 3 + 1,\n easeInOutCubic: (t: number) => t < 0.5 ? 4 * t ** 3 : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1,\n easeInQuart: (t: number) => t ** 4,\n easeOutQuart: (t: number) => 1 - --t ** 4,\n easeInOutQuart: (t: number) => (t < 0.5 ? 8 * t ** 4 : 1 - 8 * --t ** 4),\n easeInQuint: (t: number) => t ** 5,\n easeOutQuint: (t: number) => 1 + --t ** 5,\n easeInOutQuint: (t: number) => t < 0.5 ? 16 * t ** 5 : 1 + 16 * --t ** 5,\n },\n }\n}\n\nfunction getContainer (el?: ComponentPublicInstance | HTMLElement | string) {\n return getTarget(el) ?? (document.scrollingElement || document.body) as HTMLElement\n}\n\nfunction getTarget (el: ComponentPublicInstance | HTMLElement | string | undefined) {\n return (typeof el === 'string') ? document.querySelector<HTMLElement>(el) : refElement(el)\n}\n\nfunction getOffset (target: any, horizontal?: boolean, rtl?: boolean): number {\n if (typeof target === 'number') return horizontal && rtl ? -target : target\n\n let el = getTarget(target)\n let totalOffset = 0\n while (el) {\n totalOffset += horizontal ? el.offsetLeft : el.offsetTop\n el = el.offsetParent as HTMLElement\n }\n\n return totalOffset\n}\n\nexport function createGoTo (options: Partial<GoToOptions> | undefined, locale: LocaleInstance & RtlInstance) {\n return {\n rtl: locale.isRtl,\n options: mergeDeep(genDefaults(), options),\n }\n}\n\nexport async function scrollTo (\n _target: ComponentPublicInstance | HTMLElement | number | string,\n _options: Partial<GoToOptions>,\n horizontal?: boolean,\n goTo?: GoToInstance,\n) {\n const property = horizontal ? 'scrollLeft' : 'scrollTop'\n const options = mergeDeep(goTo?.options ?? genDefaults(), _options)\n const rtl = goTo?.rtl.value\n const target = (typeof _target === 'number' ? _target : getTarget(_target)) ?? 0\n const container = options.container === 'parent' && target instanceof HTMLElement\n ? target.parentElement!\n : getContainer(options.container)\n const ease = typeof options.easing === 'function' ? options.easing : options.patterns[options.easing]\n\n if (!ease) throw new TypeError(`Easing function \"${options.easing}\" not found.`)\n\n let targetLocation: number\n if (typeof target === 'number') {\n targetLocation = getOffset(target, horizontal, rtl)\n } else {\n targetLocation = getOffset(target, horizontal, rtl) - getOffset(container, horizontal, rtl)\n\n if (options.layout) {\n const styles = window.getComputedStyle(target)\n const layoutOffset = styles.getPropertyValue('--v-layout-top')\n\n if (layoutOffset) targetLocation -= parseInt(layoutOffset, 10)\n }\n }\n\n targetLocation += options.offset\n\n const startLocation = container[property] ?? 0\n\n if (targetLocation === startLocation) return Promise.resolve(targetLocation)\n\n const startTime = performance.now()\n\n return new Promise(resolve => requestAnimationFrame(function step (currentTime: number) {\n const timeElapsed = currentTime - startTime\n const progress = timeElapsed / options.duration\n const location = Math.floor(\n startLocation +\n (targetLocation - startLocation) *\n ease(clamp(progress, 0, 1))\n )\n\n container[property] = location\n\n // Allow for some jitter if target time has elapsed\n if (progress >= 1 && Math.abs(location - container[property]) < 10) {\n return resolve(targetLocation)\n } else if (progress > 2) {\n // The target might not be reachable\n consoleWarn('Scroll target is not reachable')\n return resolve(container[property])\n }\n\n requestAnimationFrame(step)\n }))\n}\n\nexport function useGoTo (_options: Partial<GoToOptions> = {}) {\n const goTo = inject(GoToSymbol)\n\n if (!goTo) throw new Error('[Vuetify] Could not find injected goto instance')\n\n async function go (\n target: ComponentPublicInstance | HTMLElement | string | number,\n options?: Partial<GoToOptions>,\n ) {\n return scrollTo(target, mergeDeep(_options, options), false, goTo)\n }\n\n go.horizontal = async (\n target: ComponentPublicInstance | HTMLElement | string | number,\n options?: Partial<GoToOptions>,\n ) => {\n return scrollTo(target, mergeDeep(_options, options), true, goTo)\n }\n\n return go\n}\n"],"mappings":"AAAA;AACA,SAASA,MAAM,QAAQ,KAAK;AAAA,SACnBC,KAAK,EAAEC,WAAW,EAAEC,SAAS,EAAEC,UAAU,6BAElD;AAkBA,OAAO,MAAMC,UAAsC,GAAGC,MAAM,CAACC,GAAG,CAAC,cAAc,CAAC;AAEhF,SAASC,WAAWA,CAAA,EAAI;EACtB,OAAO;IACLC,SAAS,EAAEC,SAAS;IACpBC,QAAQ,EAAE,GAAG;IACbC,MAAM,EAAE,KAAK;IACbC,MAAM,EAAE,CAAC;IACTC,MAAM,EAAE,gBAAgB;IACxBC,QAAQ,EAAE;MACRC,MAAM,EAAGC,CAAS,IAAKA,CAAC;MACxBC,UAAU,EAAGD,CAAS,IAAKA,CAAC,IAAI,CAAC;MACjCE,WAAW,EAAGF,CAAS,IAAKA,CAAC,IAAI,CAAC,GAAGA,CAAC,CAAC;MACvCG,aAAa,EAAGH,CAAS,IAAMA,CAAC,GAAG,GAAG,GAAG,CAAC,GAA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EAC/DQ,OAA8B,KAC3B;IACH,OAAOG,QAAQ,CAACX,MAAM,EAAEnC,SAAS,CAACgD,QAAQ,EAAEL,OAAO,CAAC,EAAE,IAAI,EAAEM,IAAI,CAAC;EACnE,CAAC;EAED,OAAOiC,EAAE;AACX"}
|
package/lib/entry-bundler.mjs
CHANGED
package/lib/framework.mjs
CHANGED
package/lib/index.d.mts
CHANGED
|
@@ -516,47 +516,41 @@ declare module '@vue/runtime-core' {
|
|
|
516
516
|
|
|
517
517
|
export interface GlobalComponents {
|
|
518
518
|
VApp: typeof import('vuetify/components')['VApp']
|
|
519
|
+
VAlert: typeof import('vuetify/components')['VAlert']
|
|
520
|
+
VAlertTitle: typeof import('vuetify/components')['VAlertTitle']
|
|
519
521
|
VAppBar: typeof import('vuetify/components')['VAppBar']
|
|
520
522
|
VAppBarNavIcon: typeof import('vuetify/components')['VAppBarNavIcon']
|
|
521
523
|
VAppBarTitle: typeof import('vuetify/components')['VAppBarTitle']
|
|
522
|
-
VAlert: typeof import('vuetify/components')['VAlert']
|
|
523
|
-
VAlertTitle: typeof import('vuetify/components')['VAlertTitle']
|
|
524
|
-
VAvatar: typeof import('vuetify/components')['VAvatar']
|
|
525
|
-
VAutocomplete: typeof import('vuetify/components')['VAutocomplete']
|
|
526
524
|
VBadge: typeof import('vuetify/components')['VBadge']
|
|
525
|
+
VAutocomplete: typeof import('vuetify/components')['VAutocomplete']
|
|
527
526
|
VBanner: typeof import('vuetify/components')['VBanner']
|
|
528
527
|
VBannerActions: typeof import('vuetify/components')['VBannerActions']
|
|
529
528
|
VBannerText: typeof import('vuetify/components')['VBannerText']
|
|
530
|
-
|
|
529
|
+
VAvatar: typeof import('vuetify/components')['VAvatar']
|
|
531
530
|
VBottomNavigation: typeof import('vuetify/components')['VBottomNavigation']
|
|
532
|
-
VBtn: typeof import('vuetify/components')['VBtn']
|
|
533
531
|
VBreadcrumbs: typeof import('vuetify/components')['VBreadcrumbs']
|
|
534
532
|
VBreadcrumbsItem: typeof import('vuetify/components')['VBreadcrumbsItem']
|
|
535
533
|
VBreadcrumbsDivider: typeof import('vuetify/components')['VBreadcrumbsDivider']
|
|
536
|
-
|
|
534
|
+
VBtn: typeof import('vuetify/components')['VBtn']
|
|
537
535
|
VBtnGroup: typeof import('vuetify/components')['VBtnGroup']
|
|
536
|
+
VBottomSheet: typeof import('vuetify/components')['VBottomSheet']
|
|
538
537
|
VCarousel: typeof import('vuetify/components')['VCarousel']
|
|
539
538
|
VCarouselItem: typeof import('vuetify/components')['VCarouselItem']
|
|
539
|
+
VBtnToggle: typeof import('vuetify/components')['VBtnToggle']
|
|
540
540
|
VCard: typeof import('vuetify/components')['VCard']
|
|
541
541
|
VCardActions: typeof import('vuetify/components')['VCardActions']
|
|
542
542
|
VCardItem: typeof import('vuetify/components')['VCardItem']
|
|
543
543
|
VCardSubtitle: typeof import('vuetify/components')['VCardSubtitle']
|
|
544
544
|
VCardText: typeof import('vuetify/components')['VCardText']
|
|
545
545
|
VCardTitle: typeof import('vuetify/components')['VCardTitle']
|
|
546
|
-
VChip: typeof import('vuetify/components')['VChip']
|
|
547
|
-
VCode: typeof import('vuetify/components')['VCode']
|
|
548
546
|
VCheckbox: typeof import('vuetify/components')['VCheckbox']
|
|
549
547
|
VCheckboxBtn: typeof import('vuetify/components')['VCheckboxBtn']
|
|
550
|
-
|
|
548
|
+
VChip: typeof import('vuetify/components')['VChip']
|
|
549
|
+
VCode: typeof import('vuetify/components')['VCode']
|
|
551
550
|
VChipGroup: typeof import('vuetify/components')['VChipGroup']
|
|
552
551
|
VCounter: typeof import('vuetify/components')['VCounter']
|
|
552
|
+
VCombobox: typeof import('vuetify/components')['VCombobox']
|
|
553
553
|
VColorPicker: typeof import('vuetify/components')['VColorPicker']
|
|
554
|
-
VDataTable: typeof import('vuetify/components')['VDataTable']
|
|
555
|
-
VDataTableFooter: typeof import('vuetify/components')['VDataTableFooter']
|
|
556
|
-
VDataTableRows: typeof import('vuetify/components')['VDataTableRows']
|
|
557
|
-
VDataTableRow: typeof import('vuetify/components')['VDataTableRow']
|
|
558
|
-
VDataTableVirtual: typeof import('vuetify/components')['VDataTableVirtual']
|
|
559
|
-
VDataTableServer: typeof import('vuetify/components')['VDataTableServer']
|
|
560
554
|
VDatePicker: typeof import('vuetify/components')['VDatePicker']
|
|
561
555
|
VDatePickerControls: typeof import('vuetify/components')['VDatePickerControls']
|
|
562
556
|
VDatePickerHeader: typeof import('vuetify/components')['VDatePickerHeader']
|
|
@@ -565,25 +559,33 @@ declare module '@vue/runtime-core' {
|
|
|
565
559
|
VDatePickerYears: typeof import('vuetify/components')['VDatePickerYears']
|
|
566
560
|
VDialog: typeof import('vuetify/components')['VDialog']
|
|
567
561
|
VDivider: typeof import('vuetify/components')['VDivider']
|
|
562
|
+
VDataTable: typeof import('vuetify/components')['VDataTable']
|
|
563
|
+
VDataTableHeaders: typeof import('vuetify/components')['VDataTableHeaders']
|
|
564
|
+
VDataTableFooter: typeof import('vuetify/components')['VDataTableFooter']
|
|
565
|
+
VDataTableRows: typeof import('vuetify/components')['VDataTableRows']
|
|
566
|
+
VDataTableRow: typeof import('vuetify/components')['VDataTableRow']
|
|
567
|
+
VDataTableVirtual: typeof import('vuetify/components')['VDataTableVirtual']
|
|
568
|
+
VDataTableServer: typeof import('vuetify/components')['VDataTableServer']
|
|
569
|
+
VFileInput: typeof import('vuetify/components')['VFileInput']
|
|
570
|
+
VField: typeof import('vuetify/components')['VField']
|
|
571
|
+
VFieldLabel: typeof import('vuetify/components')['VFieldLabel']
|
|
568
572
|
VExpansionPanels: typeof import('vuetify/components')['VExpansionPanels']
|
|
569
573
|
VExpansionPanel: typeof import('vuetify/components')['VExpansionPanel']
|
|
570
574
|
VExpansionPanelText: typeof import('vuetify/components')['VExpansionPanelText']
|
|
571
575
|
VExpansionPanelTitle: typeof import('vuetify/components')['VExpansionPanelTitle']
|
|
572
|
-
|
|
573
|
-
VFieldLabel: typeof import('vuetify/components')['VFieldLabel']
|
|
574
|
-
VFileInput: typeof import('vuetify/components')['VFileInput']
|
|
576
|
+
VFooter: typeof import('vuetify/components')['VFooter']
|
|
575
577
|
VIcon: typeof import('vuetify/components')['VIcon']
|
|
576
578
|
VComponentIcon: typeof import('vuetify/components')['VComponentIcon']
|
|
577
579
|
VSvgIcon: typeof import('vuetify/components')['VSvgIcon']
|
|
578
580
|
VLigatureIcon: typeof import('vuetify/components')['VLigatureIcon']
|
|
579
581
|
VClassIcon: typeof import('vuetify/components')['VClassIcon']
|
|
580
|
-
VFooter: typeof import('vuetify/components')['VFooter']
|
|
581
|
-
VImg: typeof import('vuetify/components')['VImg']
|
|
582
|
-
VInput: typeof import('vuetify/components')['VInput']
|
|
583
582
|
VItemGroup: typeof import('vuetify/components')['VItemGroup']
|
|
584
583
|
VItem: typeof import('vuetify/components')['VItem']
|
|
584
|
+
VImg: typeof import('vuetify/components')['VImg']
|
|
585
585
|
VInfiniteScroll: typeof import('vuetify/components')['VInfiniteScroll']
|
|
586
|
+
VInput: typeof import('vuetify/components')['VInput']
|
|
586
587
|
VKbd: typeof import('vuetify/components')['VKbd']
|
|
588
|
+
VMenu: typeof import('vuetify/components')['VMenu']
|
|
587
589
|
VLabel: typeof import('vuetify/components')['VLabel']
|
|
588
590
|
VList: typeof import('vuetify/components')['VList']
|
|
589
591
|
VListGroup: typeof import('vuetify/components')['VListGroup']
|
|
@@ -595,53 +597,52 @@ declare module '@vue/runtime-core' {
|
|
|
595
597
|
VListItemTitle: typeof import('vuetify/components')['VListItemTitle']
|
|
596
598
|
VListSubheader: typeof import('vuetify/components')['VListSubheader']
|
|
597
599
|
VMain: typeof import('vuetify/components')['VMain']
|
|
598
|
-
VNavigationDrawer: typeof import('vuetify/components')['VNavigationDrawer']
|
|
599
|
-
VMenu: typeof import('vuetify/components')['VMenu']
|
|
600
600
|
VMessages: typeof import('vuetify/components')['VMessages']
|
|
601
601
|
VOtpInput: typeof import('vuetify/components')['VOtpInput']
|
|
602
|
+
VNavigationDrawer: typeof import('vuetify/components')['VNavigationDrawer']
|
|
602
603
|
VOverlay: typeof import('vuetify/components')['VOverlay']
|
|
603
604
|
VPagination: typeof import('vuetify/components')['VPagination']
|
|
604
|
-
VProgressCircular: typeof import('vuetify/components')['VProgressCircular']
|
|
605
605
|
VProgressLinear: typeof import('vuetify/components')['VProgressLinear']
|
|
606
|
+
VProgressCircular: typeof import('vuetify/components')['VProgressCircular']
|
|
606
607
|
VRadioGroup: typeof import('vuetify/components')['VRadioGroup']
|
|
607
|
-
VRating: typeof import('vuetify/components')['VRating']
|
|
608
608
|
VSelect: typeof import('vuetify/components')['VSelect']
|
|
609
|
+
VRating: typeof import('vuetify/components')['VRating']
|
|
609
610
|
VSelectionControl: typeof import('vuetify/components')['VSelectionControl']
|
|
610
611
|
VSheet: typeof import('vuetify/components')['VSheet']
|
|
612
|
+
VSkeletonLoader: typeof import('vuetify/components')['VSkeletonLoader']
|
|
611
613
|
VSelectionControlGroup: typeof import('vuetify/components')['VSelectionControlGroup']
|
|
612
|
-
|
|
614
|
+
VSnackbar: typeof import('vuetify/components')['VSnackbar']
|
|
613
615
|
VSlideGroup: typeof import('vuetify/components')['VSlideGroup']
|
|
614
616
|
VSlideGroupItem: typeof import('vuetify/components')['VSlideGroupItem']
|
|
615
|
-
VSkeletonLoader: typeof import('vuetify/components')['VSkeletonLoader']
|
|
616
617
|
VStepper: typeof import('vuetify/components')['VStepper']
|
|
617
618
|
VStepperActions: typeof import('vuetify/components')['VStepperActions']
|
|
618
619
|
VStepperHeader: typeof import('vuetify/components')['VStepperHeader']
|
|
619
620
|
VStepperItem: typeof import('vuetify/components')['VStepperItem']
|
|
620
621
|
VStepperWindow: typeof import('vuetify/components')['VStepperWindow']
|
|
621
622
|
VStepperWindowItem: typeof import('vuetify/components')['VStepperWindowItem']
|
|
622
|
-
|
|
623
|
+
VSlider: typeof import('vuetify/components')['VSlider']
|
|
623
624
|
VSystemBar: typeof import('vuetify/components')['VSystemBar']
|
|
625
|
+
VTabs: typeof import('vuetify/components')['VTabs']
|
|
626
|
+
VTab: typeof import('vuetify/components')['VTab']
|
|
624
627
|
VSwitch: typeof import('vuetify/components')['VSwitch']
|
|
625
628
|
VTable: typeof import('vuetify/components')['VTable']
|
|
626
629
|
VTextarea: typeof import('vuetify/components')['VTextarea']
|
|
630
|
+
VTimeline: typeof import('vuetify/components')['VTimeline']
|
|
631
|
+
VTimelineItem: typeof import('vuetify/components')['VTimelineItem']
|
|
627
632
|
VTextField: typeof import('vuetify/components')['VTextField']
|
|
628
|
-
VTabs: typeof import('vuetify/components')['VTabs']
|
|
629
|
-
VTab: typeof import('vuetify/components')['VTab']
|
|
630
633
|
VToolbar: typeof import('vuetify/components')['VToolbar']
|
|
631
634
|
VToolbarTitle: typeof import('vuetify/components')['VToolbarTitle']
|
|
632
635
|
VToolbarItems: typeof import('vuetify/components')['VToolbarItems']
|
|
633
|
-
VTimeline: typeof import('vuetify/components')['VTimeline']
|
|
634
|
-
VTimelineItem: typeof import('vuetify/components')['VTimelineItem']
|
|
635
636
|
VTooltip: typeof import('vuetify/components')['VTooltip']
|
|
636
637
|
VWindow: typeof import('vuetify/components')['VWindow']
|
|
637
638
|
VWindowItem: typeof import('vuetify/components')['VWindowItem']
|
|
638
639
|
VDataIterator: typeof import('vuetify/components')['VDataIterator']
|
|
639
640
|
VDefaultsProvider: typeof import('vuetify/components')['VDefaultsProvider']
|
|
641
|
+
VForm: typeof import('vuetify/components')['VForm']
|
|
640
642
|
VContainer: typeof import('vuetify/components')['VContainer']
|
|
641
643
|
VCol: typeof import('vuetify/components')['VCol']
|
|
642
644
|
VRow: typeof import('vuetify/components')['VRow']
|
|
643
645
|
VSpacer: typeof import('vuetify/components')['VSpacer']
|
|
644
|
-
VForm: typeof import('vuetify/components')['VForm']
|
|
645
646
|
VHover: typeof import('vuetify/components')['VHover']
|
|
646
647
|
VLayout: typeof import('vuetify/components')['VLayout']
|
|
647
648
|
VLayoutItem: typeof import('vuetify/components')['VLayoutItem']
|
|
@@ -650,11 +651,11 @@ declare module '@vue/runtime-core' {
|
|
|
650
651
|
VNoSsr: typeof import('vuetify/components')['VNoSsr']
|
|
651
652
|
VParallax: typeof import('vuetify/components')['VParallax']
|
|
652
653
|
VRadio: typeof import('vuetify/components')['VRadio']
|
|
653
|
-
VResponsive: typeof import('vuetify/components')['VResponsive']
|
|
654
654
|
VRangeSlider: typeof import('vuetify/components')['VRangeSlider']
|
|
655
|
+
VResponsive: typeof import('vuetify/components')['VResponsive']
|
|
655
656
|
VThemeProvider: typeof import('vuetify/components')['VThemeProvider']
|
|
656
|
-
VVirtualScroll: typeof import('vuetify/components')['VVirtualScroll']
|
|
657
657
|
VValidation: typeof import('vuetify/components')['VValidation']
|
|
658
|
+
VVirtualScroll: typeof import('vuetify/components')['VVirtualScroll']
|
|
658
659
|
VFabTransition: typeof import('vuetify/components')['VFabTransition']
|
|
659
660
|
VDialogBottomTransition: typeof import('vuetify/components')['VDialogBottomTransition']
|
|
660
661
|
VDialogTopTransition: typeof import('vuetify/components')['VDialogTopTransition']
|
|
@@ -671,14 +672,14 @@ declare module '@vue/runtime-core' {
|
|
|
671
672
|
VExpandTransition: typeof import('vuetify/components')['VExpandTransition']
|
|
672
673
|
VExpandXTransition: typeof import('vuetify/components')['VExpandXTransition']
|
|
673
674
|
VDialogTransition: typeof import('vuetify/components')['VDialogTransition']
|
|
674
|
-
VPicker: typeof import('vuetify/labs/components')['VPicker']
|
|
675
|
-
VPickerTitle: typeof import('vuetify/labs/components')['VPickerTitle']
|
|
676
675
|
VCalendar: typeof import('vuetify/labs/components')['VCalendar']
|
|
677
676
|
VCalendarDay: typeof import('vuetify/labs/components')['VCalendarDay']
|
|
678
677
|
VCalendarHeader: typeof import('vuetify/labs/components')['VCalendarHeader']
|
|
679
678
|
VCalendarInterval: typeof import('vuetify/labs/components')['VCalendarInterval']
|
|
680
679
|
VCalendarIntervalEvent: typeof import('vuetify/labs/components')['VCalendarIntervalEvent']
|
|
681
680
|
VCalendarMonthDay: typeof import('vuetify/labs/components')['VCalendarMonthDay']
|
|
681
|
+
VPicker: typeof import('vuetify/labs/components')['VPicker']
|
|
682
|
+
VPickerTitle: typeof import('vuetify/labs/components')['VPickerTitle']
|
|
682
683
|
VConfirmEdit: typeof import('vuetify/labs/components')['VConfirmEdit']
|
|
683
684
|
VSparkline: typeof import('vuetify/labs/components')['VSparkline']
|
|
684
685
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vuetify",
|
|
3
3
|
"description": "Vue Material Component Framework",
|
|
4
|
-
"version": "3.5.
|
|
4
|
+
"version": "3.5.6",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "John Leider",
|
|
7
7
|
"email": "john@vuetifyjs.com"
|
|
@@ -200,5 +200,5 @@
|
|
|
200
200
|
"attributes": "dist/json/attributes.json"
|
|
201
201
|
},
|
|
202
202
|
"web-types": "dist/json/web-types.json",
|
|
203
|
-
"gitHead": "
|
|
203
|
+
"gitHead": "20a6fac2673a2f398cc85111dfdb76e62037fd29"
|
|
204
204
|
}
|