@vuetify/nightly 3.9.3-master.2025-08-02 → 3.9.3-master.2025-08-04
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 +8 -3
- package/dist/json/attributes.json +4001 -3997
- package/dist/json/importMap-labs.json +32 -32
- package/dist/json/importMap.json +158 -158
- package/dist/json/tags.json +1 -0
- package/dist/json/web-types.json +6836 -6827
- package/dist/vuetify-labs.cjs +22 -14
- package/dist/vuetify-labs.css +3841 -3840
- package/dist/vuetify-labs.d.ts +63 -58
- package/dist/vuetify-labs.esm.js +22 -14
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +22 -14
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.cjs +18 -13
- package/dist/vuetify.cjs.map +1 -1
- package/dist/vuetify.css +3353 -3352
- package/dist/vuetify.d.ts +58 -58
- package/dist/vuetify.esm.js +18 -13
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +18 -13
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +461 -460
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VColorPicker/VColorPickerCanvas.css +1 -0
- package/lib/components/VColorPicker/VColorPickerCanvas.sass +1 -0
- package/lib/components/VOverlay/scrollStrategies.js +7 -7
- package/lib/components/VOverlay/scrollStrategies.js.map +1 -1
- package/lib/entry-bundler.js +1 -1
- package/lib/framework.d.ts +58 -58
- package/lib/framework.js +1 -1
- package/lib/labs/VVideo/VVideo.css +3 -3
- package/lib/labs/VVideo/VVideo.d.ts +10 -0
- package/lib/labs/VVideo/VVideo.js +4 -1
- package/lib/labs/VVideo/VVideo.js.map +1 -1
- package/lib/labs/VVideo/VVideo.sass +2 -2
- package/lib/labs/VVideo/_variables.scss +3 -2
- package/lib/labs/rules/rules.d.ts +10 -3
- package/lib/labs/rules/rules.js +13 -5
- package/lib/labs/rules/rules.js.map +1 -1
- package/package.json +1 -1
@@ -39,11 +39,11 @@ function closeScrollStrategy(data) {
|
|
39
39
|
function onScroll(e) {
|
40
40
|
data.isActive.value = false;
|
41
41
|
}
|
42
|
-
bindScroll(data.target.value
|
42
|
+
bindScroll(getTargetEl(data.target.value, data.contentEl.value), onScroll);
|
43
43
|
}
|
44
44
|
function blockScrollStrategy(data, props) {
|
45
45
|
const offsetParent = data.root.value?.offsetParent;
|
46
|
-
const target =
|
46
|
+
const target = getTargetEl(data.target.value, data.contentEl.value);
|
47
47
|
const scrollElements = [...new Set([...getScrollParents(target, props.contained ? offsetParent : undefined), ...getScrollParents(data.contentEl.value, props.contained ? offsetParent : undefined)])].filter(el => !el.classList.contains('v-overlay-scroll-blocked'));
|
48
48
|
const scrollbarWidth = window.innerWidth - document.documentElement.offsetWidth;
|
49
49
|
const scrollableParent = (el => hasScrollbar(el) && el)(offsetParent || document.documentElement);
|
@@ -91,7 +91,7 @@ function repositionScrollStrategy(data, props, scope) {
|
|
91
91
|
}
|
92
92
|
ric = (typeof requestIdleCallback === 'undefined' ? cb => cb() : requestIdleCallback)(() => {
|
93
93
|
scope.run(() => {
|
94
|
-
bindScroll(data.target.value
|
94
|
+
bindScroll(getTargetEl(data.target.value, data.contentEl.value), e => {
|
95
95
|
if (slow) {
|
96
96
|
// If the position calculation is slow,
|
97
97
|
// defer updates until scrolling is finished.
|
@@ -114,10 +114,10 @@ function repositionScrollStrategy(data, props, scope) {
|
|
114
114
|
cancelAnimationFrame(raf);
|
115
115
|
});
|
116
116
|
}
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
117
|
+
function getTargetEl(target, contentEl) {
|
118
|
+
return Array.isArray(target) ? document.elementsFromPoint(...target).find(el => !contentEl?.contains(el)) : target ?? contentEl;
|
119
|
+
}
|
120
|
+
function bindScroll(el, onScroll) {
|
121
121
|
const scrollElements = [document, ...getScrollParents(el)];
|
122
122
|
scrollElements.forEach(el => {
|
123
123
|
el.addEventListener('scroll', onScroll, {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"scrollStrategies.js","names":["effectScope","onScopeDispose","watchEffect","requestNewFrame","convertToUnit","getScrollParents","hasScrollbar","IN_BROWSER","propsFactory","scrollStrategies","none","close","closeScrollStrategy","block","blockScrollStrategy","reposition","repositionScrollStrategy","makeScrollStrategyProps","scrollStrategy","type","String","Function","default","validator","val","useScrollStrategies","props","data","scope","stop","isActive","value","Promise","resolve","setTimeout","active","run","onScroll","e","bindScroll","target","contentEl","offsetParent","root","Array","isArray","document","elementFromPoint","scrollElements","Set","contained","undefined","filter","el","classList","contains","scrollbarWidth","window","innerWidth","documentElement","offsetWidth","scrollableParent","add","forEach","i","style","setProperty","scrollLeft","scrollTop","x","parseFloat","getPropertyValue","y","scrollBehavior","removeProperty","remove","slow","raf","ric","update","start","performance","now","updateLocation","time","requestIdleCallback","cb","cancelAnimationFrame","requestAnimationFrame","cancelIdleCallback","addEventListener","passive","removeEventListener"],"sources":["../../../src/components/VOverlay/scrollStrategies.ts"],"sourcesContent":["// Utilities\nimport { effectScope, onScopeDispose, watchEffect } from 'vue'\nimport { requestNewFrame } from './requestNewFrame'\nimport { convertToUnit, getScrollParents, hasScrollbar, IN_BROWSER, propsFactory } from '@/util'\n\n// Types\nimport type { EffectScope, PropType, Ref } from 'vue'\n\nexport interface ScrollStrategyData {\n root: Ref<HTMLElement | undefined>\n contentEl: Ref<HTMLElement | undefined>\n targetEl: Ref<HTMLElement | undefined>\n target: Ref<HTMLElement | [x: number, y: number] | undefined>\n isActive: Ref<boolean>\n updateLocation: Ref<((e: Event) => void) | undefined>\n}\n\nexport type ScrollStrategyFunction = (data: ScrollStrategyData, props: StrategyProps, scope: EffectScope) => void\n\nconst scrollStrategies = {\n none: null,\n close: closeScrollStrategy,\n block: blockScrollStrategy,\n reposition: repositionScrollStrategy,\n}\n\nexport interface StrategyProps {\n scrollStrategy: keyof typeof scrollStrategies | ScrollStrategyFunction\n contained: boolean | undefined\n}\n\nexport const makeScrollStrategyProps = propsFactory({\n scrollStrategy: {\n type: [String, Function] as PropType<StrategyProps['scrollStrategy']>,\n default: 'block',\n validator: (val: any) => typeof val === 'function' || val in scrollStrategies,\n },\n}, 'VOverlay-scroll-strategies')\n\nexport function useScrollStrategies (\n props: StrategyProps,\n data: ScrollStrategyData\n) {\n if (!IN_BROWSER) return\n\n let scope: EffectScope | undefined\n watchEffect(async () => {\n scope?.stop()\n\n if (!(data.isActive.value && props.scrollStrategy)) return\n\n scope = effectScope()\n await new Promise(resolve => setTimeout(resolve))\n scope.active && scope.run(() => {\n if (typeof props.scrollStrategy === 'function') {\n props.scrollStrategy(data, props, scope!)\n } else {\n scrollStrategies[props.scrollStrategy]?.(data, props, scope!)\n }\n })\n })\n\n onScopeDispose(() => {\n scope?.stop()\n })\n}\n\nfunction closeScrollStrategy (data: ScrollStrategyData) {\n function onScroll (e: Event) {\n data.isActive.value = false\n }\n\n bindScroll(data.target.value ?? data.contentEl.value, onScroll)\n}\n\nfunction blockScrollStrategy (data: ScrollStrategyData, props: StrategyProps) {\n const offsetParent = data.root.value?.offsetParent\n const target = Array.isArray(data.target.value)\n ? document.elementFromPoint(...data.target.value)\n : data.target.value\n const scrollElements = [...new Set([\n ...getScrollParents(target, props.contained ? offsetParent : undefined),\n ...getScrollParents(data.contentEl.value, props.contained ? offsetParent : undefined),\n ])].filter(el => !el.classList.contains('v-overlay-scroll-blocked'))\n const scrollbarWidth = window.innerWidth - document.documentElement.offsetWidth\n\n const scrollableParent = (el => hasScrollbar(el) && el)(offsetParent || document.documentElement)\n if (scrollableParent) {\n data.root.value!.classList.add('v-overlay--scroll-blocked')\n }\n\n scrollElements.forEach((el, i) => {\n el.style.setProperty('--v-body-scroll-x', convertToUnit(-el.scrollLeft))\n el.style.setProperty('--v-body-scroll-y', convertToUnit(-el.scrollTop))\n\n if (el !== document.documentElement) {\n el.style.setProperty('--v-scrollbar-offset', convertToUnit(scrollbarWidth))\n }\n\n el.classList.add('v-overlay-scroll-blocked')\n })\n\n onScopeDispose(() => {\n scrollElements.forEach((el, i) => {\n const x = parseFloat(el.style.getPropertyValue('--v-body-scroll-x'))\n const y = parseFloat(el.style.getPropertyValue('--v-body-scroll-y'))\n\n const scrollBehavior = el.style.scrollBehavior\n\n el.style.scrollBehavior = 'auto'\n el.style.removeProperty('--v-body-scroll-x')\n el.style.removeProperty('--v-body-scroll-y')\n el.style.removeProperty('--v-scrollbar-offset')\n el.classList.remove('v-overlay-scroll-blocked')\n\n el.scrollLeft = -x\n el.scrollTop = -y\n\n el.style.scrollBehavior = scrollBehavior\n })\n if (scrollableParent) {\n data.root.value!.classList.remove('v-overlay--scroll-blocked')\n }\n })\n}\n\nfunction repositionScrollStrategy (data: ScrollStrategyData, props: StrategyProps, scope: EffectScope) {\n let slow = false\n let raf = -1\n let ric = -1\n\n function update (e: Event) {\n requestNewFrame(() => {\n const start = performance.now()\n data.updateLocation.value?.(e)\n const time = performance.now() - start\n slow = time / (1000 / 60) > 2\n })\n }\n\n ric = (typeof requestIdleCallback === 'undefined' ? (cb: Function) => cb() : requestIdleCallback)(() => {\n scope.run(() => {\n bindScroll(data.target.value ?? data.contentEl.value, e => {\n if (slow) {\n // If the position calculation is slow,\n // defer updates until scrolling is finished.\n // Browsers usually fire one scroll event per frame so\n // we just wait until we've got two frames without an event\n cancelAnimationFrame(raf)\n raf = requestAnimationFrame(() => {\n raf = requestAnimationFrame(() => {\n update(e)\n })\n })\n } else {\n update(e)\n }\n })\n })\n })\n\n onScopeDispose(() => {\n typeof cancelIdleCallback !== 'undefined' && cancelIdleCallback(ric)\n cancelAnimationFrame(raf)\n })\n}\n\n/** @private */\nfunction bindScroll (target: HTMLElement | [x: number, y: number] | undefined, onScroll: (e: Event) => void) {\n const el = Array.isArray(target) ? document.elementFromPoint(...target) : target\n const scrollElements = [document, ...getScrollParents(el)]\n scrollElements.forEach(el => {\n el.addEventListener('scroll', onScroll, { passive: true })\n })\n\n onScopeDispose(() => {\n scrollElements.forEach(el =>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
{"version":3,"file":"scrollStrategies.js","names":["effectScope","onScopeDispose","watchEffect","requestNewFrame","convertToUnit","getScrollParents","hasScrollbar","IN_BROWSER","propsFactory","scrollStrategies","none","close","closeScrollStrategy","block","blockScrollStrategy","reposition","repositionScrollStrategy","makeScrollStrategyProps","scrollStrategy","type","String","Function","default","validator","val","useScrollStrategies","props","data","scope","stop","isActive","value","Promise","resolve","setTimeout","active","run","onScroll","e","bindScroll","getTargetEl","target","contentEl","offsetParent","root","scrollElements","Set","contained","undefined","filter","el","classList","contains","scrollbarWidth","window","innerWidth","document","documentElement","offsetWidth","scrollableParent","add","forEach","i","style","setProperty","scrollLeft","scrollTop","x","parseFloat","getPropertyValue","y","scrollBehavior","removeProperty","remove","slow","raf","ric","update","start","performance","now","updateLocation","time","requestIdleCallback","cb","cancelAnimationFrame","requestAnimationFrame","cancelIdleCallback","Array","isArray","elementsFromPoint","find","addEventListener","passive","removeEventListener"],"sources":["../../../src/components/VOverlay/scrollStrategies.ts"],"sourcesContent":["// Utilities\nimport { effectScope, onScopeDispose, watchEffect } from 'vue'\nimport { requestNewFrame } from './requestNewFrame'\nimport { convertToUnit, getScrollParents, hasScrollbar, IN_BROWSER, propsFactory } from '@/util'\n\n// Types\nimport type { EffectScope, PropType, Ref } from 'vue'\n\nexport interface ScrollStrategyData {\n root: Ref<HTMLElement | undefined>\n contentEl: Ref<HTMLElement | undefined>\n targetEl: Ref<HTMLElement | undefined>\n target: Ref<HTMLElement | [x: number, y: number] | undefined>\n isActive: Ref<boolean>\n updateLocation: Ref<((e: Event) => void) | undefined>\n}\n\nexport type ScrollStrategyFunction = (data: ScrollStrategyData, props: StrategyProps, scope: EffectScope) => void\n\nconst scrollStrategies = {\n none: null,\n close: closeScrollStrategy,\n block: blockScrollStrategy,\n reposition: repositionScrollStrategy,\n}\n\nexport interface StrategyProps {\n scrollStrategy: keyof typeof scrollStrategies | ScrollStrategyFunction\n contained: boolean | undefined\n}\n\nexport const makeScrollStrategyProps = propsFactory({\n scrollStrategy: {\n type: [String, Function] as PropType<StrategyProps['scrollStrategy']>,\n default: 'block',\n validator: (val: any) => typeof val === 'function' || val in scrollStrategies,\n },\n}, 'VOverlay-scroll-strategies')\n\nexport function useScrollStrategies (\n props: StrategyProps,\n data: ScrollStrategyData\n) {\n if (!IN_BROWSER) return\n\n let scope: EffectScope | undefined\n watchEffect(async () => {\n scope?.stop()\n\n if (!(data.isActive.value && props.scrollStrategy)) return\n\n scope = effectScope()\n await new Promise(resolve => setTimeout(resolve))\n scope.active && scope.run(() => {\n if (typeof props.scrollStrategy === 'function') {\n props.scrollStrategy(data, props, scope!)\n } else {\n scrollStrategies[props.scrollStrategy]?.(data, props, scope!)\n }\n })\n })\n\n onScopeDispose(() => {\n scope?.stop()\n })\n}\n\nfunction closeScrollStrategy (data: ScrollStrategyData) {\n function onScroll (e: Event) {\n data.isActive.value = false\n }\n\n bindScroll(getTargetEl(data.target.value, data.contentEl.value), onScroll)\n}\n\nfunction blockScrollStrategy (data: ScrollStrategyData, props: StrategyProps) {\n const offsetParent = data.root.value?.offsetParent\n const target = getTargetEl(data.target.value, data.contentEl.value)\n const scrollElements = [...new Set([\n ...getScrollParents(target, props.contained ? offsetParent : undefined),\n ...getScrollParents(data.contentEl.value, props.contained ? offsetParent : undefined),\n ])].filter(el => !el.classList.contains('v-overlay-scroll-blocked'))\n const scrollbarWidth = window.innerWidth - document.documentElement.offsetWidth\n\n const scrollableParent = (el => hasScrollbar(el) && el)(offsetParent || document.documentElement)\n if (scrollableParent) {\n data.root.value!.classList.add('v-overlay--scroll-blocked')\n }\n\n scrollElements.forEach((el, i) => {\n el.style.setProperty('--v-body-scroll-x', convertToUnit(-el.scrollLeft))\n el.style.setProperty('--v-body-scroll-y', convertToUnit(-el.scrollTop))\n\n if (el !== document.documentElement) {\n el.style.setProperty('--v-scrollbar-offset', convertToUnit(scrollbarWidth))\n }\n\n el.classList.add('v-overlay-scroll-blocked')\n })\n\n onScopeDispose(() => {\n scrollElements.forEach((el, i) => {\n const x = parseFloat(el.style.getPropertyValue('--v-body-scroll-x'))\n const y = parseFloat(el.style.getPropertyValue('--v-body-scroll-y'))\n\n const scrollBehavior = el.style.scrollBehavior\n\n el.style.scrollBehavior = 'auto'\n el.style.removeProperty('--v-body-scroll-x')\n el.style.removeProperty('--v-body-scroll-y')\n el.style.removeProperty('--v-scrollbar-offset')\n el.classList.remove('v-overlay-scroll-blocked')\n\n el.scrollLeft = -x\n el.scrollTop = -y\n\n el.style.scrollBehavior = scrollBehavior\n })\n if (scrollableParent) {\n data.root.value!.classList.remove('v-overlay--scroll-blocked')\n }\n })\n}\n\nfunction repositionScrollStrategy (data: ScrollStrategyData, props: StrategyProps, scope: EffectScope) {\n let slow = false\n let raf = -1\n let ric = -1\n\n function update (e: Event) {\n requestNewFrame(() => {\n const start = performance.now()\n data.updateLocation.value?.(e)\n const time = performance.now() - start\n slow = time / (1000 / 60) > 2\n })\n }\n\n ric = (typeof requestIdleCallback === 'undefined' ? (cb: Function) => cb() : requestIdleCallback)(() => {\n scope.run(() => {\n bindScroll(getTargetEl(data.target.value, data.contentEl.value), e => {\n if (slow) {\n // If the position calculation is slow,\n // defer updates until scrolling is finished.\n // Browsers usually fire one scroll event per frame so\n // we just wait until we've got two frames without an event\n cancelAnimationFrame(raf)\n raf = requestAnimationFrame(() => {\n raf = requestAnimationFrame(() => {\n update(e)\n })\n })\n } else {\n update(e)\n }\n })\n })\n })\n\n onScopeDispose(() => {\n typeof cancelIdleCallback !== 'undefined' && cancelIdleCallback(ric)\n cancelAnimationFrame(raf)\n })\n}\n\nfunction getTargetEl (\n target: HTMLElement | [x: number, y: number] | undefined,\n contentEl: HTMLElement | undefined,\n) {\n return Array.isArray(target)\n ? document.elementsFromPoint(...target).find(el => !contentEl?.contains(el))\n : target ?? contentEl\n}\n\nfunction bindScroll (el: Element | undefined, onScroll: (e: Event) => void) {\n const scrollElements = [document, ...getScrollParents(el)]\n scrollElements.forEach(el => {\n el.addEventListener('scroll', onScroll, { passive: true })\n })\n\n onScopeDispose(() => {\n scrollElements.forEach(el => {\n el.removeEventListener('scroll', onScroll)\n })\n })\n}\n"],"mappings":"AAAA;AACA,SAASA,WAAW,EAAEC,cAAc,EAAEC,WAAW,QAAQ,KAAK;AAAA,SACrDC,eAAe;AAAA,SACfC,aAAa,EAAEC,gBAAgB,EAAEC,YAAY,EAAEC,UAAU,EAAEC,YAAY,+BAEhF;AAcA,MAAMC,gBAAgB,GAAG;EACvBC,IAAI,EAAE,IAAI;EACVC,KAAK,EAAEC,mBAAmB;EAC1BC,KAAK,EAAEC,mBAAmB;EAC1BC,UAAU,EAAEC;AACd,CAAC;AAOD,OAAO,MAAMC,uBAAuB,GAAGT,YAAY,CAAC;EAClDU,cAAc,EAAE;IACdC,IAAI,EAAE,CAACC,MAAM,EAAEC,QAAQ,CAA8C;IACrEC,OAAO,EAAE,OAAO;IAChBC,SAAS,EAAGC,GAAQ,IAAK,OAAOA,GAAG,KAAK,UAAU,IAAIA,GAAG,IAAIf;EAC/D;AACF,CAAC,EAAE,4BAA4B,CAAC;AAEhC,OAAO,SAASgB,mBAAmBA,CACjCC,KAAoB,EACpBC,IAAwB,EACxB;EACA,IAAI,CAACpB,UAAU,EAAE;EAEjB,IAAIqB,KAA8B;EAClC1B,WAAW,CAAC,YAAY;IACtB0B,KAAK,EAAEC,IAAI,CAAC,CAAC;IAEb,IAAI,EAAEF,IAAI,CAACG,QAAQ,CAACC,KAAK,IAAIL,KAAK,CAACR,cAAc,CAAC,EAAE;IAEpDU,KAAK,GAAG5B,WAAW,CAAC,CAAC;IACrB,MAAM,IAAIgC,OAAO,CAACC,OAAO,IAAIC,UAAU,CAACD,OAAO,CAAC,CAAC;IACjDL,KAAK,CAACO,MAAM,IAAIP,KAAK,CAACQ,GAAG,CAAC,MAAM;MAC9B,IAAI,OAAOV,KAAK,CAACR,cAAc,KAAK,UAAU,EAAE;QAC9CQ,KAAK,CAACR,cAAc,CAACS,IAAI,EAAED,KAAK,EAAEE,KAA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IAAI;MAC3BA,EAAE,CAAC4C,mBAAmB,CAAC,QAAQ,EAAEzD,QAAQ,CAAC;IAC5C,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ","ignoreList":[]}
|
package/lib/entry-bundler.js
CHANGED
@@ -16,7 +16,7 @@ export const createVuetify = function () {
|
|
16
16
|
...options
|
17
17
|
});
|
18
18
|
};
|
19
|
-
export const version = "3.9.3-master.2025-08-
|
19
|
+
export const version = "3.9.3-master.2025-08-04";
|
20
20
|
createVuetify.version = version;
|
21
21
|
export { blueprints, components, directives };
|
22
22
|
export * from "./composables/index.js";
|
package/lib/framework.d.ts
CHANGED
@@ -2609,35 +2609,35 @@ declare module 'vue' {
|
|
2609
2609
|
VAppBar: typeof import('vuetify/components')['VAppBar']
|
2610
2610
|
VAppBarNavIcon: typeof import('vuetify/components')['VAppBarNavIcon']
|
2611
2611
|
VAppBarTitle: typeof import('vuetify/components')['VAppBarTitle']
|
2612
|
-
VAlert: typeof import('vuetify/components')['VAlert']
|
2613
|
-
VAlertTitle: typeof import('vuetify/components')['VAlertTitle']
|
2614
2612
|
VAutocomplete: typeof import('vuetify/components')['VAutocomplete']
|
2615
|
-
VBadge: typeof import('vuetify/components')['VBadge']
|
2616
2613
|
VAvatar: typeof import('vuetify/components')['VAvatar']
|
2617
|
-
|
2618
|
-
|
2619
|
-
VBtn: typeof import('vuetify/components')['VBtn']
|
2614
|
+
VAlert: typeof import('vuetify/components')['VAlert']
|
2615
|
+
VAlertTitle: typeof import('vuetify/components')['VAlertTitle']
|
2620
2616
|
VBanner: typeof import('vuetify/components')['VBanner']
|
2621
2617
|
VBannerActions: typeof import('vuetify/components')['VBannerActions']
|
2622
2618
|
VBannerText: typeof import('vuetify/components')['VBannerText']
|
2623
|
-
|
2619
|
+
VBadge: typeof import('vuetify/components')['VBadge']
|
2624
2620
|
VBreadcrumbs: typeof import('vuetify/components')['VBreadcrumbs']
|
2625
2621
|
VBreadcrumbsItem: typeof import('vuetify/components')['VBreadcrumbsItem']
|
2626
2622
|
VBreadcrumbsDivider: typeof import('vuetify/components')['VBreadcrumbsDivider']
|
2627
|
-
|
2628
|
-
|
2623
|
+
VBtn: typeof import('vuetify/components')['VBtn']
|
2624
|
+
VBottomNavigation: typeof import('vuetify/components')['VBottomNavigation']
|
2629
2625
|
VBtnToggle: typeof import('vuetify/components')['VBtnToggle']
|
2630
|
-
VCheckbox: typeof import('vuetify/components')['VCheckbox']
|
2631
|
-
VCheckboxBtn: typeof import('vuetify/components')['VCheckboxBtn']
|
2632
|
-
VCode: typeof import('vuetify/components')['VCode']
|
2633
2626
|
VCard: typeof import('vuetify/components')['VCard']
|
2634
2627
|
VCardActions: typeof import('vuetify/components')['VCardActions']
|
2635
2628
|
VCardItem: typeof import('vuetify/components')['VCardItem']
|
2636
2629
|
VCardSubtitle: typeof import('vuetify/components')['VCardSubtitle']
|
2637
2630
|
VCardText: typeof import('vuetify/components')['VCardText']
|
2638
2631
|
VCardTitle: typeof import('vuetify/components')['VCardTitle']
|
2639
|
-
|
2632
|
+
VCarousel: typeof import('vuetify/components')['VCarousel']
|
2633
|
+
VCarouselItem: typeof import('vuetify/components')['VCarouselItem']
|
2634
|
+
VCheckbox: typeof import('vuetify/components')['VCheckbox']
|
2635
|
+
VCheckboxBtn: typeof import('vuetify/components')['VCheckboxBtn']
|
2640
2636
|
VChipGroup: typeof import('vuetify/components')['VChipGroup']
|
2637
|
+
VCode: typeof import('vuetify/components')['VCode']
|
2638
|
+
VChip: typeof import('vuetify/components')['VChip']
|
2639
|
+
VColorPicker: typeof import('vuetify/components')['VColorPicker']
|
2640
|
+
VCounter: typeof import('vuetify/components')['VCounter']
|
2641
2641
|
VDataTable: typeof import('vuetify/components')['VDataTable']
|
2642
2642
|
VDataTableHeaders: typeof import('vuetify/components')['VDataTableHeaders']
|
2643
2643
|
VDataTableFooter: typeof import('vuetify/components')['VDataTableFooter']
|
@@ -2645,8 +2645,6 @@ declare module 'vue' {
|
|
2645
2645
|
VDataTableRow: typeof import('vuetify/components')['VDataTableRow']
|
2646
2646
|
VDataTableVirtual: typeof import('vuetify/components')['VDataTableVirtual']
|
2647
2647
|
VDataTableServer: typeof import('vuetify/components')['VDataTableServer']
|
2648
|
-
VColorPicker: typeof import('vuetify/components')['VColorPicker']
|
2649
|
-
VCounter: typeof import('vuetify/components')['VCounter']
|
2650
2648
|
VDatePicker: typeof import('vuetify/components')['VDatePicker']
|
2651
2649
|
VDatePickerControls: typeof import('vuetify/components')['VDatePickerControls']
|
2652
2650
|
VDatePickerHeader: typeof import('vuetify/components')['VDatePickerHeader']
|
@@ -2654,31 +2652,29 @@ declare module 'vue' {
|
|
2654
2652
|
VDatePickerMonths: typeof import('vuetify/components')['VDatePickerMonths']
|
2655
2653
|
VDatePickerYears: typeof import('vuetify/components')['VDatePickerYears']
|
2656
2654
|
VDialog: typeof import('vuetify/components')['VDialog']
|
2657
|
-
VCombobox: typeof import('vuetify/components')['VCombobox']
|
2658
|
-
VEmptyState: typeof import('vuetify/components')['VEmptyState']
|
2659
2655
|
VDivider: typeof import('vuetify/components')['VDivider']
|
2656
|
+
VEmptyState: typeof import('vuetify/components')['VEmptyState']
|
2660
2657
|
VExpansionPanels: typeof import('vuetify/components')['VExpansionPanels']
|
2661
2658
|
VExpansionPanel: typeof import('vuetify/components')['VExpansionPanel']
|
2662
2659
|
VExpansionPanelText: typeof import('vuetify/components')['VExpansionPanelText']
|
2663
2660
|
VExpansionPanelTitle: typeof import('vuetify/components')['VExpansionPanelTitle']
|
2664
|
-
VFab: typeof import('vuetify/components')['VFab']
|
2665
|
-
VFileInput: typeof import('vuetify/components')['VFileInput']
|
2666
2661
|
VField: typeof import('vuetify/components')['VField']
|
2667
2662
|
VFieldLabel: typeof import('vuetify/components')['VFieldLabel']
|
2663
|
+
VFileInput: typeof import('vuetify/components')['VFileInput']
|
2668
2664
|
VFooter: typeof import('vuetify/components')['VFooter']
|
2669
|
-
VInfiniteScroll: typeof import('vuetify/components')['VInfiniteScroll']
|
2670
2665
|
VIcon: typeof import('vuetify/components')['VIcon']
|
2671
2666
|
VComponentIcon: typeof import('vuetify/components')['VComponentIcon']
|
2672
2667
|
VSvgIcon: typeof import('vuetify/components')['VSvgIcon']
|
2673
2668
|
VLigatureIcon: typeof import('vuetify/components')['VLigatureIcon']
|
2674
2669
|
VClassIcon: typeof import('vuetify/components')['VClassIcon']
|
2670
|
+
VImg: typeof import('vuetify/components')['VImg']
|
2671
|
+
VFab: typeof import('vuetify/components')['VFab']
|
2672
|
+
VInfiniteScroll: typeof import('vuetify/components')['VInfiniteScroll']
|
2673
|
+
VItemGroup: typeof import('vuetify/components')['VItemGroup']
|
2674
|
+
VItem: typeof import('vuetify/components')['VItem']
|
2675
2675
|
VInput: typeof import('vuetify/components')['VInput']
|
2676
2676
|
VKbd: typeof import('vuetify/components')['VKbd']
|
2677
|
-
VImg: typeof import('vuetify/components')['VImg']
|
2678
|
-
VMenu: typeof import('vuetify/components')['VMenu']
|
2679
|
-
VMain: typeof import('vuetify/components')['VMain']
|
2680
2677
|
VLabel: typeof import('vuetify/components')['VLabel']
|
2681
|
-
VMessages: typeof import('vuetify/components')['VMessages']
|
2682
2678
|
VList: typeof import('vuetify/components')['VList']
|
2683
2679
|
VListGroup: typeof import('vuetify/components')['VListGroup']
|
2684
2680
|
VListImg: typeof import('vuetify/components')['VListImg']
|
@@ -2688,76 +2684,81 @@ declare module 'vue' {
|
|
2688
2684
|
VListItemSubtitle: typeof import('vuetify/components')['VListItemSubtitle']
|
2689
2685
|
VListItemTitle: typeof import('vuetify/components')['VListItemTitle']
|
2690
2686
|
VListSubheader: typeof import('vuetify/components')['VListSubheader']
|
2691
|
-
|
2687
|
+
VMain: typeof import('vuetify/components')['VMain']
|
2688
|
+
VMenu: typeof import('vuetify/components')['VMenu']
|
2689
|
+
VMessages: typeof import('vuetify/components')['VMessages']
|
2690
|
+
VNavigationDrawer: typeof import('vuetify/components')['VNavigationDrawer']
|
2691
|
+
VOtpInput: typeof import('vuetify/components')['VOtpInput']
|
2692
2692
|
VOverlay: typeof import('vuetify/components')['VOverlay']
|
2693
|
-
VItemGroup: typeof import('vuetify/components')['VItemGroup']
|
2694
|
-
VItem: typeof import('vuetify/components')['VItem']
|
2695
2693
|
VPagination: typeof import('vuetify/components')['VPagination']
|
2694
|
+
VNumberInput: typeof import('vuetify/components')['VNumberInput']
|
2696
2695
|
VProgressCircular: typeof import('vuetify/components')['VProgressCircular']
|
2697
2696
|
VProgressLinear: typeof import('vuetify/components')['VProgressLinear']
|
2698
|
-
VOtpInput: typeof import('vuetify/components')['VOtpInput']
|
2699
|
-
VRating: typeof import('vuetify/components')['VRating']
|
2700
2697
|
VRadioGroup: typeof import('vuetify/components')['VRadioGroup']
|
2701
|
-
|
2698
|
+
VRating: typeof import('vuetify/components')['VRating']
|
2702
2699
|
VSelect: typeof import('vuetify/components')['VSelect']
|
2703
2700
|
VSelectionControl: typeof import('vuetify/components')['VSelectionControl']
|
2704
2701
|
VSelectionControlGroup: typeof import('vuetify/components')['VSelectionControlGroup']
|
2705
|
-
VSkeletonLoader: typeof import('vuetify/components')['VSkeletonLoader']
|
2706
2702
|
VSheet: typeof import('vuetify/components')['VSheet']
|
2703
|
+
VSkeletonLoader: typeof import('vuetify/components')['VSkeletonLoader']
|
2707
2704
|
VSlideGroup: typeof import('vuetify/components')['VSlideGroup']
|
2708
2705
|
VSlideGroupItem: typeof import('vuetify/components')['VSlideGroupItem']
|
2706
|
+
VSlider: typeof import('vuetify/components')['VSlider']
|
2709
2707
|
VStepper: typeof import('vuetify/components')['VStepper']
|
2710
2708
|
VStepperActions: typeof import('vuetify/components')['VStepperActions']
|
2711
2709
|
VStepperHeader: typeof import('vuetify/components')['VStepperHeader']
|
2712
2710
|
VStepperItem: typeof import('vuetify/components')['VStepperItem']
|
2713
2711
|
VStepperWindow: typeof import('vuetify/components')['VStepperWindow']
|
2714
2712
|
VStepperWindowItem: typeof import('vuetify/components')['VStepperWindowItem']
|
2715
|
-
|
2713
|
+
VTable: typeof import('vuetify/components')['VTable']
|
2716
2714
|
VSystemBar: typeof import('vuetify/components')['VSystemBar']
|
2717
2715
|
VTab: typeof import('vuetify/components')['VTab']
|
2718
2716
|
VTabs: typeof import('vuetify/components')['VTabs']
|
2719
2717
|
VTabsWindow: typeof import('vuetify/components')['VTabsWindow']
|
2720
2718
|
VTabsWindowItem: typeof import('vuetify/components')['VTabsWindowItem']
|
2721
|
-
VSwitch: typeof import('vuetify/components')['VSwitch']
|
2722
|
-
VTable: typeof import('vuetify/components')['VTable']
|
2723
|
-
VTextField: typeof import('vuetify/components')['VTextField']
|
2724
2719
|
VTextarea: typeof import('vuetify/components')['VTextarea']
|
2720
|
+
VTextField: typeof import('vuetify/components')['VTextField']
|
2725
2721
|
VTimeline: typeof import('vuetify/components')['VTimeline']
|
2726
2722
|
VTimelineItem: typeof import('vuetify/components')['VTimelineItem']
|
2727
|
-
VTooltip: typeof import('vuetify/components')['VTooltip']
|
2728
2723
|
VTimePicker: typeof import('vuetify/components')['VTimePicker']
|
2729
2724
|
VTimePickerClock: typeof import('vuetify/components')['VTimePickerClock']
|
2730
2725
|
VTimePickerControls: typeof import('vuetify/components')['VTimePickerControls']
|
2731
|
-
VTreeview: typeof import('vuetify/components')['VTreeview']
|
2732
|
-
VTreeviewItem: typeof import('vuetify/components')['VTreeviewItem']
|
2733
|
-
VTreeviewGroup: typeof import('vuetify/components')['VTreeviewGroup']
|
2734
2726
|
VToolbar: typeof import('vuetify/components')['VToolbar']
|
2735
2727
|
VToolbarTitle: typeof import('vuetify/components')['VToolbarTitle']
|
2736
2728
|
VToolbarItems: typeof import('vuetify/components')['VToolbarItems']
|
2729
|
+
VTreeview: typeof import('vuetify/components')['VTreeview']
|
2730
|
+
VTreeviewItem: typeof import('vuetify/components')['VTreeviewItem']
|
2731
|
+
VTreeviewGroup: typeof import('vuetify/components')['VTreeviewGroup']
|
2732
|
+
VTooltip: typeof import('vuetify/components')['VTooltip']
|
2737
2733
|
VWindow: typeof import('vuetify/components')['VWindow']
|
2738
2734
|
VWindowItem: typeof import('vuetify/components')['VWindowItem']
|
2739
|
-
|
2735
|
+
VBtnGroup: typeof import('vuetify/components')['VBtnGroup']
|
2736
|
+
VDataIterator: typeof import('vuetify/components')['VDataIterator']
|
2737
|
+
VConfirmEdit: typeof import('vuetify/components')['VConfirmEdit']
|
2740
2738
|
VDefaultsProvider: typeof import('vuetify/components')['VDefaultsProvider']
|
2739
|
+
VForm: typeof import('vuetify/components')['VForm']
|
2741
2740
|
VContainer: typeof import('vuetify/components')['VContainer']
|
2742
2741
|
VCol: typeof import('vuetify/components')['VCol']
|
2743
2742
|
VRow: typeof import('vuetify/components')['VRow']
|
2744
2743
|
VSpacer: typeof import('vuetify/components')['VSpacer']
|
2745
|
-
VForm: typeof import('vuetify/components')['VForm']
|
2746
2744
|
VLayout: typeof import('vuetify/components')['VLayout']
|
2747
2745
|
VLayoutItem: typeof import('vuetify/components')['VLayoutItem']
|
2748
|
-
VHover: typeof import('vuetify/components')['VHover']
|
2749
2746
|
VLazy: typeof import('vuetify/components')['VLazy']
|
2750
|
-
|
2747
|
+
VHover: typeof import('vuetify/components')['VHover']
|
2751
2748
|
VNoSsr: typeof import('vuetify/components')['VNoSsr']
|
2749
|
+
VLocaleProvider: typeof import('vuetify/components')['VLocaleProvider']
|
2752
2750
|
VParallax: typeof import('vuetify/components')['VParallax']
|
2751
|
+
VRangeSlider: typeof import('vuetify/components')['VRangeSlider']
|
2753
2752
|
VRadio: typeof import('vuetify/components')['VRadio']
|
2753
|
+
VCombobox: typeof import('vuetify/components')['VCombobox']
|
2754
|
+
VSparkline: typeof import('vuetify/components')['VSparkline']
|
2754
2755
|
VResponsive: typeof import('vuetify/components')['VResponsive']
|
2755
|
-
|
2756
|
+
VSpeedDial: typeof import('vuetify/components')['VSpeedDial']
|
2757
|
+
VSwitch: typeof import('vuetify/components')['VSwitch']
|
2756
2758
|
VSnackbarQueue: typeof import('vuetify/components')['VSnackbarQueue']
|
2757
|
-
VSparkline: typeof import('vuetify/components')['VSparkline']
|
2758
2759
|
VThemeProvider: typeof import('vuetify/components')['VThemeProvider']
|
2759
|
-
VValidation: typeof import('vuetify/components')['VValidation']
|
2760
2760
|
VVirtualScroll: typeof import('vuetify/components')['VVirtualScroll']
|
2761
|
+
VValidation: typeof import('vuetify/components')['VValidation']
|
2761
2762
|
VFabTransition: typeof import('vuetify/components')['VFabTransition']
|
2762
2763
|
VDialogBottomTransition: typeof import('vuetify/components')['VDialogBottomTransition']
|
2763
2764
|
VDialogTopTransition: typeof import('vuetify/components')['VDialogTopTransition']
|
@@ -2774,32 +2775,31 @@ declare module 'vue' {
|
|
2774
2775
|
VExpandTransition: typeof import('vuetify/components')['VExpandTransition']
|
2775
2776
|
VExpandXTransition: typeof import('vuetify/components')['VExpandXTransition']
|
2776
2777
|
VDialogTransition: typeof import('vuetify/components')['VDialogTransition']
|
2777
|
-
|
2778
|
-
|
2779
|
-
VDataIterator: typeof import('vuetify/components')['VDataIterator']
|
2780
|
-
VFileUpload: typeof import('vuetify/labs/components')['VFileUpload']
|
2781
|
-
VFileUploadItem: typeof import('vuetify/labs/components')['VFileUploadItem']
|
2778
|
+
VSnackbar: typeof import('vuetify/components')['VSnackbar']
|
2779
|
+
VBottomSheet: typeof import('vuetify/components')['VBottomSheet']
|
2782
2780
|
VCalendar: typeof import('vuetify/labs/components')['VCalendar']
|
2783
2781
|
VCalendarDay: typeof import('vuetify/labs/components')['VCalendarDay']
|
2784
2782
|
VCalendarHeader: typeof import('vuetify/labs/components')['VCalendarHeader']
|
2785
2783
|
VCalendarInterval: typeof import('vuetify/labs/components')['VCalendarInterval']
|
2786
2784
|
VCalendarIntervalEvent: typeof import('vuetify/labs/components')['VCalendarIntervalEvent']
|
2787
2785
|
VCalendarMonthDay: typeof import('vuetify/labs/components')['VCalendarMonthDay']
|
2788
|
-
VPicker: typeof import('vuetify/labs/components')['VPicker']
|
2789
|
-
VPickerTitle: typeof import('vuetify/labs/components')['VPickerTitle']
|
2790
2786
|
VColorInput: typeof import('vuetify/labs/components')['VColorInput']
|
2791
|
-
|
2792
|
-
VVideo: typeof import('vuetify/labs/components')['VVideo']
|
2793
|
-
VVideoControls: typeof import('vuetify/labs/components')['VVideoControls']
|
2794
|
-
VVideoVolume: typeof import('vuetify/labs/components')['VVideoVolume']
|
2787
|
+
VIconBtn: typeof import('vuetify/labs/components')['VIconBtn']
|
2795
2788
|
VPie: typeof import('vuetify/labs/components')['VPie']
|
2796
2789
|
VPieSegment: typeof import('vuetify/labs/components')['VPieSegment']
|
2797
2790
|
VPieTooltip: typeof import('vuetify/labs/components')['VPieTooltip']
|
2791
|
+
VVideo: typeof import('vuetify/labs/components')['VVideo']
|
2792
|
+
VVideoControls: typeof import('vuetify/labs/components')['VVideoControls']
|
2793
|
+
VVideoVolume: typeof import('vuetify/labs/components')['VVideoVolume']
|
2798
2794
|
VStepperVertical: typeof import('vuetify/labs/components')['VStepperVertical']
|
2799
2795
|
VStepperVerticalItem: typeof import('vuetify/labs/components')['VStepperVerticalItem']
|
2800
2796
|
VStepperVerticalActions: typeof import('vuetify/labs/components')['VStepperVerticalActions']
|
2797
|
+
VPicker: typeof import('vuetify/labs/components')['VPicker']
|
2798
|
+
VPickerTitle: typeof import('vuetify/labs/components')['VPickerTitle']
|
2799
|
+
VHotkey: typeof import('vuetify/labs/components')['VHotkey']
|
2800
|
+
VFileUpload: typeof import('vuetify/labs/components')['VFileUpload']
|
2801
|
+
VFileUploadItem: typeof import('vuetify/labs/components')['VFileUploadItem']
|
2801
2802
|
VDateInput: typeof import('vuetify/labs/components')['VDateInput']
|
2802
|
-
VIconBtn: typeof import('vuetify/labs/components')['VIconBtn']
|
2803
2803
|
VMaskInput: typeof import('vuetify/labs/components')['VMaskInput']
|
2804
2804
|
VPullToRefresh: typeof import('vuetify/labs/components')['VPullToRefresh']
|
2805
2805
|
}
|
package/lib/framework.js
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
flex-direction: column;
|
4
4
|
align-items: center;
|
5
5
|
position: relative;
|
6
|
+
--v-video-aspect-ratio: 1.7777777778;
|
6
7
|
--v-video-controls-height: 58px;
|
7
8
|
--v-video-controls-pill-border-radius: 99px;
|
8
9
|
}
|
@@ -145,17 +146,16 @@
|
|
145
146
|
letter-spacing: 0.02em;
|
146
147
|
}
|
147
148
|
.v-video--variant-player {
|
148
|
-
width:
|
149
|
+
width: 100%;
|
149
150
|
}
|
150
151
|
.v-video--variant-player > .v-video__content {
|
151
152
|
width: 100%;
|
152
|
-
|
153
|
+
aspect-ratio: var(--v-video-aspect-ratio);
|
153
154
|
}
|
154
155
|
.v-video--variant-background {
|
155
156
|
outline: none;
|
156
157
|
position: absolute;
|
157
158
|
pointer-events: none;
|
158
|
-
width: 100%;
|
159
159
|
height: 100%;
|
160
160
|
}
|
161
161
|
.v-video--variant-background > .v-video__content {
|
@@ -39,6 +39,7 @@ export declare const makeVVideoProps: <Defaults extends {
|
|
39
39
|
width?: unknown;
|
40
40
|
class?: unknown;
|
41
41
|
style?: unknown;
|
42
|
+
aspectRatio?: unknown;
|
42
43
|
autoplay?: unknown;
|
43
44
|
muted?: unknown;
|
44
45
|
eager?: unknown;
|
@@ -2110,6 +2111,10 @@ export declare const makeVVideoProps: <Defaults extends {
|
|
2110
2111
|
type: PropType<unknown extends Defaults["style"] ? import("vue").StyleValue : import("vue").StyleValue | Defaults["style"]>;
|
2111
2112
|
default: unknown extends Defaults["style"] ? import("vue").StyleValue : NonNullable<import("vue").StyleValue> | Defaults["style"];
|
2112
2113
|
};
|
2114
|
+
aspectRatio: unknown extends Defaults["aspectRatio"] ? (StringConstructor | NumberConstructor)[] : {
|
2115
|
+
type: PropType<unknown extends Defaults["aspectRatio"] ? string | number : string | number | Defaults["aspectRatio"]>;
|
2116
|
+
default: unknown extends Defaults["aspectRatio"] ? string | number : NonNullable<string | number> | Defaults["aspectRatio"];
|
2117
|
+
};
|
2113
2118
|
autoplay: unknown extends Defaults["autoplay"] ? BooleanConstructor : {
|
2114
2119
|
type: PropType<unknown extends Defaults["autoplay"] ? boolean : boolean | Defaults["autoplay"]>;
|
2115
2120
|
default: unknown extends Defaults["autoplay"] ? boolean : boolean | Defaults["autoplay"];
|
@@ -3984,6 +3989,7 @@ export declare const VVideo: {
|
|
3984
3989
|
type?: string | undefined;
|
3985
3990
|
height?: string | number | undefined;
|
3986
3991
|
width?: string | number | undefined;
|
3992
|
+
aspectRatio?: string | number | undefined;
|
3987
3993
|
backgroundColor?: string | undefined;
|
3988
3994
|
color?: string | undefined;
|
3989
3995
|
maxHeight?: string | number | undefined;
|
@@ -4933,6 +4939,7 @@ export declare const VVideo: {
|
|
4933
4939
|
type?: string | undefined;
|
4934
4940
|
height?: string | number | undefined;
|
4935
4941
|
width?: string | number | undefined;
|
4942
|
+
aspectRatio?: string | number | undefined;
|
4936
4943
|
backgroundColor?: string | undefined;
|
4937
4944
|
color?: string | undefined;
|
4938
4945
|
maxHeight?: string | number | undefined;
|
@@ -5867,6 +5874,7 @@ export declare const VVideo: {
|
|
5867
5874
|
type?: string | undefined;
|
5868
5875
|
height?: string | number | undefined;
|
5869
5876
|
width?: string | number | undefined;
|
5877
|
+
aspectRatio?: string | number | undefined;
|
5870
5878
|
backgroundColor?: string | undefined;
|
5871
5879
|
color?: string | undefined;
|
5872
5880
|
maxHeight?: string | number | undefined;
|
@@ -6828,6 +6836,7 @@ export declare const VVideo: {
|
|
6828
6836
|
type: PropType<import("vue").StyleValue>;
|
6829
6837
|
default: null;
|
6830
6838
|
};
|
6839
|
+
aspectRatio: (StringConstructor | NumberConstructor)[];
|
6831
6840
|
autoplay: BooleanConstructor;
|
6832
6841
|
muted: BooleanConstructor;
|
6833
6842
|
eager: BooleanConstructor;
|
@@ -6899,6 +6908,7 @@ export declare const VVideo: {
|
|
6899
6908
|
type: PropType<import("vue").StyleValue>;
|
6900
6909
|
default: null;
|
6901
6910
|
};
|
6911
|
+
aspectRatio: (StringConstructor | NumberConstructor)[];
|
6902
6912
|
autoplay: BooleanConstructor;
|
6903
6913
|
muted: BooleanConstructor;
|
6904
6914
|
eager: BooleanConstructor;
|
@@ -24,6 +24,7 @@ import { nextTick, onBeforeUnmount, onMounted, ref, shallowRef, toRef, watch } f
|
|
24
24
|
import { createRange, genericComponent, omit, pick, propsFactory, useRender } from "../../util/index.js"; // Types
|
25
25
|
const allowedVariants = ['background', 'player'];
|
26
26
|
export const makeVVideoProps = propsFactory({
|
27
|
+
aspectRatio: [String, Number],
|
27
28
|
autoplay: Boolean,
|
28
29
|
muted: Boolean,
|
29
30
|
eager: Boolean,
|
@@ -340,7 +341,9 @@ export const VVideo = genericComponent()({
|
|
340
341
|
"class": _normalizeClass(['v-video', `v-video--variant-${props.variant}`, `v-video--${state.value}`, {
|
341
342
|
'v-video--playing': playing.value
|
342
343
|
}, themeClasses.value, densityClasses.value, roundedContainerClasses.value, props.class]),
|
343
|
-
"style": _normalizeStyle([
|
344
|
+
"style": _normalizeStyle([{
|
345
|
+
'--v-video-aspect-ratio': props.aspectRatio
|
346
|
+
}, props.variant === 'background' ? [] : pick(dimensionStyles.value, ['width', 'minWidth', 'maxWidth']), props.style]),
|
344
347
|
"onKeydown": onKeydown,
|
345
348
|
"onClick": onClick
|
346
349
|
}, [_createElementVNode("div", {
|