@vuetify/nightly 3.8.9-master.2025-06-13 → 3.8.9-master.2025-06-14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -3
- package/dist/json/attributes.json +2598 -2598
- package/dist/json/importMap-labs.json +28 -28
- package/dist/json/importMap.json +158 -158
- package/dist/json/web-types.json +4379 -4379
- package/dist/vuetify-labs.cjs +4 -3
- package/dist/vuetify-labs.css +3476 -3473
- package/dist/vuetify-labs.d.ts +62 -62
- package/dist/vuetify-labs.esm.js +4 -3
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +4 -3
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.cjs +3 -3
- package/dist/vuetify.css +3932 -3929
- package/dist/vuetify.d.ts +62 -62
- package/dist/vuetify.esm.js +3 -3
- package/dist/vuetify.js +3 -3
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +3 -3
- package/lib/components/VDataTable/VDataTable.css +6 -3
- package/lib/components/VDataTable/VDataTable.sass +4 -2
- package/lib/composables/hotkey.js +17 -17
- package/lib/composables/hotkey.js.map +1 -1
- package/lib/entry-bundler.js +1 -1
- package/lib/framework.d.ts +62 -62
- package/lib/framework.js +1 -1
- package/lib/labs/VFileUpload/VFileUploadItem.js +1 -0
- package/lib/labs/VFileUpload/VFileUploadItem.js.map +1 -1
- package/package.json +1 -1
package/dist/vuetify.min.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Vuetify v3.8.9-master.2025-06-
|
2
|
+
* Vuetify v3.8.9-master.2025-06-14
|
3
3
|
* Forged by John Leider
|
4
4
|
* Released under the MIT License.
|
5
5
|
*/
|
@@ -2240,8 +2240,8 @@ if(m.run((()=>{o.install(u)})),u.onUnmount((()=>m.stop())),u.provide(wt,e),u.pro
|
|
2240
2240
|
else{const{mount:e}=u
|
2241
2241
|
u.mount=function(){const a=e(...arguments)
|
2242
2242
|
return t.nextTick((()=>l.update())),u.mount=e,a}}("boolean"!=typeof __VUE_OPTIONS_API__||__VUE_OPTIONS_API__)&&u.mixin({computed:{$vuetify(){return t.reactive({defaults:Sm.call(this,wt),display:Sm.call(this,Vn),theme:Sm.call(this,ya),icons:Sm.call(this,zt),locale:Sm.call(this,pa),date:Sm.call(this,Cu)})}}})},unmount:function(){u.stop()},defaults:e,display:l,theme:o,icons:c,locale:d,date:v,goTo:p}}))}function Sm(e){const t=this.$,a=t.parent?.provides??t.vnode.appContext?.provides
|
2243
|
-
if(a&&e in a)return a[e]}wm.version="3.8.9-master.2025-06-
|
2244
|
-
const km=function(){return wm({components:vm,directives:Vm,...arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}})},xm="3.8.9-master.2025-06-
|
2243
|
+
if(a&&e in a)return a[e]}wm.version="3.8.9-master.2025-06-14"
|
2244
|
+
const km=function(){return wm({components:vm,directives:Vm,...arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}})},xm="3.8.9-master.2025-06-14"
|
2245
2245
|
km.version=xm,e.blueprints=Kt,e.components=vm,e.createVuetify=km,e.directives=Vm,e.useDate=Eu,e.useDefaults=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0
|
2246
2246
|
const{props:a,provideSubDefaults:l}=xt(e,t)
|
2247
2247
|
return l(),a},e.useDisplay=En,e.useGoTo=Rn,e.useLayout=ta,e.useLocale=fa,e.useRtl=ha,e.useTheme=Ea,e.version=xm}))
|
@@ -68,7 +68,9 @@
|
|
68
68
|
position: sticky;
|
69
69
|
}
|
70
70
|
.v-data-table .v-table__wrapper > table > thead > tr > th.v-data-table__th--sortable:hover,
|
71
|
-
.v-data-table .v-table__wrapper > table
|
71
|
+
.v-data-table .v-table__wrapper > table > thead > tr > th.v-data-table__th--sortable:focus,
|
72
|
+
.v-data-table .v-table__wrapper > table tbody > tr > th.v-data-table__th--sortable:hover,
|
73
|
+
.v-data-table .v-table__wrapper > table tbody > tr > th.v-data-table__th--sortable:focus {
|
72
74
|
cursor: pointer;
|
73
75
|
color: rgba(var(--v-theme-on-surface), var(--v-high-emphasis-opacity));
|
74
76
|
}
|
@@ -76,8 +78,9 @@
|
|
76
78
|
.v-data-table .v-table__wrapper > table tbody > tr > th:not(.v-data-table__th--sorted) .v-data-table-header__sort-icon {
|
77
79
|
opacity: 0;
|
78
80
|
}
|
79
|
-
.v-data-table .v-table__wrapper > table > thead > tr > th:not(.v-data-table__th--sorted):hover .v-data-table-header__sort-icon,
|
80
|
-
.v-data-table .v-table__wrapper > table tbody > tr > th:not(.v-data-table__th--sorted):hover .v-data-table-header__sort-icon
|
81
|
+
.v-data-table .v-table__wrapper > table > thead > tr > th:not(.v-data-table__th--sorted):hover .v-data-table-header__sort-icon, .v-data-table .v-table__wrapper > table > thead > tr > th:not(.v-data-table__th--sorted):focus .v-data-table-header__sort-icon,
|
82
|
+
.v-data-table .v-table__wrapper > table tbody > tr > th:not(.v-data-table__th--sorted):hover .v-data-table-header__sort-icon,
|
83
|
+
.v-data-table .v-table__wrapper > table tbody > tr > th:not(.v-data-table__th--sorted):focus .v-data-table-header__sort-icon {
|
81
84
|
opacity: 0.5;
|
82
85
|
}
|
83
86
|
.v-data-table .v-table__wrapper > table > thead > tr.v-data-table__tr--mobile > td,
|
@@ -58,7 +58,8 @@
|
|
58
58
|
> th.v-data-table__th--fixed
|
59
59
|
position: sticky
|
60
60
|
|
61
|
-
> th.v-data-table__th--sortable:hover
|
61
|
+
> th.v-data-table__th--sortable:hover,
|
62
|
+
> th.v-data-table__th--sortable:focus
|
62
63
|
cursor: pointer
|
63
64
|
color: rgba(var(--v-theme-on-surface), var(--v-high-emphasis-opacity))
|
64
65
|
|
@@ -66,7 +67,8 @@
|
|
66
67
|
.v-data-table-header__sort-icon
|
67
68
|
opacity: 0
|
68
69
|
|
69
|
-
&:hover
|
70
|
+
&:hover,
|
71
|
+
&:focus
|
70
72
|
.v-data-table-header__sort-icon
|
71
73
|
opacity: 0.5
|
72
74
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
// Utilities
|
2
|
-
import { onBeforeUnmount,
|
2
|
+
import { onBeforeUnmount, toValue, watch } from 'vue';
|
3
3
|
import { IN_BROWSER } from "../util/index.js";
|
4
4
|
import { getCurrentInstance } from "../util/getCurrentInstance.js"; // Types
|
5
5
|
export function useHotkey(keys, callback) {
|
@@ -12,14 +12,14 @@ export function useHotkey(keys, callback) {
|
|
12
12
|
sequenceTimeout = 1000
|
13
13
|
} = options;
|
14
14
|
const isMac = navigator?.userAgent?.includes('Macintosh');
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
15
|
+
let timeout = 0;
|
16
|
+
let keyGroups;
|
17
|
+
let isSequence = false;
|
18
|
+
let groupIndex = 0;
|
19
19
|
function clearTimer() {
|
20
|
-
if (!
|
21
|
-
clearTimeout(
|
22
|
-
|
20
|
+
if (!timeout) return;
|
21
|
+
clearTimeout(timeout);
|
22
|
+
timeout = 0;
|
23
23
|
}
|
24
24
|
function isInputFocused() {
|
25
25
|
if (inputs) return false;
|
@@ -27,29 +27,29 @@ export function useHotkey(keys, callback) {
|
|
27
27
|
return activeElement && (activeElement.tagName === 'INPUT' || activeElement.tagName === 'TEXTAREA' || activeElement.isContentEditable || activeElement.contentEditable === 'true');
|
28
28
|
}
|
29
29
|
function resetSequence() {
|
30
|
-
groupIndex
|
30
|
+
groupIndex = 0;
|
31
31
|
clearTimer();
|
32
32
|
}
|
33
33
|
function handler(e) {
|
34
|
-
const group = keyGroups
|
34
|
+
const group = keyGroups[groupIndex];
|
35
35
|
if (!group || isInputFocused()) return;
|
36
36
|
if (!matchesKeyGroup(e, group)) {
|
37
|
-
if (isSequence
|
37
|
+
if (isSequence) resetSequence();
|
38
38
|
return;
|
39
39
|
}
|
40
40
|
if (preventDefault) e.preventDefault();
|
41
|
-
if (!isSequence
|
41
|
+
if (!isSequence) {
|
42
42
|
callback(e);
|
43
43
|
return;
|
44
44
|
}
|
45
45
|
clearTimer();
|
46
|
-
groupIndex
|
47
|
-
if (groupIndex
|
46
|
+
groupIndex++;
|
47
|
+
if (groupIndex === keyGroups.length) {
|
48
48
|
callback(e);
|
49
49
|
resetSequence();
|
50
50
|
return;
|
51
51
|
}
|
52
|
-
|
52
|
+
timeout = window.setTimeout(resetSequence, sequenceTimeout);
|
53
53
|
}
|
54
54
|
function cleanup() {
|
55
55
|
window.removeEventListener(event, handler);
|
@@ -79,8 +79,8 @@ export function useHotkey(keys, callback) {
|
|
79
79
|
cleanup();
|
80
80
|
if (unrefKeys) {
|
81
81
|
const groups = splitKeySequence(unrefKeys.toLowerCase());
|
82
|
-
isSequence
|
83
|
-
keyGroups
|
82
|
+
isSequence = groups.length > 1;
|
83
|
+
keyGroups = groups;
|
84
84
|
resetSequence();
|
85
85
|
window.addEventListener(event, handler);
|
86
86
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"hotkey.js","names":["onBeforeUnmount","
|
1
|
+
{"version":3,"file":"hotkey.js","names":["onBeforeUnmount","toValue","watch","IN_BROWSER","getCurrentInstance","useHotkey","keys","callback","options","arguments","length","undefined","event","inputs","preventDefault","sequenceTimeout","isMac","navigator","userAgent","includes","timeout","keyGroups","isSequence","groupIndex","clearTimer","clearTimeout","isInputFocused","activeElement","document","tagName","isContentEditable","contentEditable","resetSequence","handler","e","group","matchesKeyGroup","window","setTimeout","cleanup","removeEventListener","splitKeySequence","str","groups","current","i","char","next","push","unrefKeys","toLowerCase","addEventListener","immediate","parseKeyGroup","MODIFIERS","parts","split","modifiers","Object","fromEntries","map","m","actualKey","part","lastChar","slice","ctrlKey","cmd","ctrl","metaKey","meta","shiftKey","shift","altKey","alt","key"],"sources":["../../src/composables/hotkey.ts"],"sourcesContent":["// Utilities\nimport { onBeforeUnmount, toValue, watch } from 'vue'\nimport { IN_BROWSER } from '@/util'\nimport { getCurrentInstance } from '@/util/getCurrentInstance'\n\n// Types\nimport type { MaybeRef } from '@/util'\n\ninterface HotkeyOptions {\n event?: 'keydown' | 'keyup'\n inputs?: boolean\n preventDefault?: boolean\n sequenceTimeout?: number\n}\n\nexport function useHotkey (\n keys: MaybeRef<string | undefined>,\n callback: (e: KeyboardEvent) => void,\n options: HotkeyOptions = {}\n) {\n if (!IN_BROWSER) return function () {}\n\n const {\n event = 'keydown',\n inputs = false,\n preventDefault = true,\n sequenceTimeout = 1000,\n } = options\n\n const isMac = navigator?.userAgent?.includes('Macintosh')\n let timeout = 0\n let keyGroups: string[]\n let isSequence = false\n let groupIndex = 0\n\n function clearTimer () {\n if (!timeout) return\n\n clearTimeout(timeout)\n timeout = 0\n }\n\n function isInputFocused () {\n if (inputs) return false\n\n const activeElement = document.activeElement as HTMLElement\n\n return activeElement && (\n activeElement.tagName === 'INPUT' ||\n activeElement.tagName === 'TEXTAREA' ||\n activeElement.isContentEditable ||\n activeElement.contentEditable === 'true'\n )\n }\n\n function resetSequence () {\n groupIndex = 0\n clearTimer()\n }\n\n function handler (e: KeyboardEvent) {\n const group = keyGroups[groupIndex]\n\n if (!group || isInputFocused()) return\n\n if (!matchesKeyGroup(e, group)) {\n if (isSequence) resetSequence()\n return\n }\n\n if (preventDefault) e.preventDefault()\n\n if (!isSequence) {\n callback(e)\n return\n }\n\n clearTimer()\n groupIndex++\n\n if (groupIndex === keyGroups.length) {\n callback(e)\n resetSequence()\n return\n }\n\n timeout = window.setTimeout(resetSequence, sequenceTimeout)\n }\n\n function cleanup () {\n window.removeEventListener(event, handler)\n clearTimer()\n }\n\n function splitKeySequence (str: string) {\n const groups: string[] = []\n let current = ''\n for (let i = 0; i < str.length; i++) {\n const char = str[i]\n if (char === '-') {\n const next = str[i + 1]\n // Treat '-' as a sequence delimiter only if the next character exists\n // and is NOT one of '-', '+', or '_' (these indicate the '-' belongs to the key itself)\n if (next && !['-', '+', '_'].includes(next)) {\n groups.push(current)\n current = ''\n continue\n }\n }\n current += char\n }\n groups.push(current)\n\n return groups\n }\n\n watch(() => toValue(keys), function (unrefKeys) {\n cleanup()\n\n if (unrefKeys) {\n const groups = splitKeySequence(unrefKeys.toLowerCase())\n isSequence = groups.length > 1\n keyGroups = groups\n resetSequence()\n window.addEventListener(event, handler)\n }\n }, { immediate: true })\n\n try {\n getCurrentInstance('useHotkey')\n onBeforeUnmount(cleanup)\n } catch {\n // Not in Vue setup context\n }\n\n function parseKeyGroup (group: string) {\n const MODIFIERS = ['ctrl', 'shift', 'alt', 'meta', 'cmd']\n\n // Split on +, -, or _ but keep empty strings which indicate consecutive separators (e.g. alt--)\n const parts = group.toLowerCase().split(/[+_-]/)\n\n const modifiers = Object.fromEntries(MODIFIERS.map(m => [m, false])) as Record<string, boolean>\n let actualKey: string | undefined\n\n for (const part of parts) {\n if (!part) continue // Skip empty tokens\n if (MODIFIERS.includes(part)) {\n modifiers[part] = true\n } else {\n actualKey = part\n }\n }\n\n // Fallback for cases where actualKey is a literal '+' or '-' (e.g. alt--, alt++ , alt+-, alt-+)\n if (!actualKey) {\n const lastChar = group.slice(-1)\n if (['+', '-', '_'].includes(lastChar)) actualKey = lastChar\n }\n\n return { modifiers, actualKey }\n }\n\n function matchesKeyGroup (e: KeyboardEvent, group: string) {\n const { modifiers, actualKey } = parseKeyGroup(group)\n\n return (\n e.ctrlKey === (isMac && modifiers.cmd ? false : modifiers.ctrl) &&\n e.metaKey === (isMac && modifiers.cmd ? true : modifiers.meta) &&\n e.shiftKey === modifiers.shift &&\n e.altKey === modifiers.alt &&\n e.key.toLowerCase() === actualKey?.toLowerCase()\n )\n }\n\n return cleanup\n}\n"],"mappings":"AAAA;AACA,SAASA,eAAe,EAAEC,OAAO,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAC5CC,UAAU;AAAA,SACVC,kBAAkB,yCAE3B;AAUA,OAAO,SAASC,SAASA,CACvBC,IAAkC,EAClCC,QAAoC,EAEpC;EAAA,IADAC,OAAsB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,M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,CAAC6C,QAAQ,CAAC,EAAEF,SAAS,GAAGE,QAAQ;IAC9D;IAEA,OAAO;MAAEP,SAAS;MAAEK;IAAU,CAAC;EACjC;EAEA,SAAS1B,eAAeA,CAAEF,CAAgB,EAAEC,KAAa,EAAE;IACzD,MAAM;MAAEsB,SAAS;MAAEK;IAAU,CAAC,GAAGT,aAAa,CAAClB,KAAK,CAAC;IAErD,OACED,CAAC,CAACgC,OAAO,MAAMlD,KAAK,IAAIyC,SAAS,CAACU,GAAG,GAAG,KAAK,GAAGV,SAAS,CAACW,IAAI,CAAC,IAC/DlC,CAAC,CAACmC,OAAO,MAAMrD,KAAK,IAAIyC,SAAS,CAACU,GAAG,GAAG,IAAI,GAAGV,SAAS,CAACa,IAAI,CAAC,IAC9DpC,CAAC,CAACqC,QAAQ,KAAKd,SAAS,CAACe,KAAK,IAC9BtC,CAAC,CAACuC,MAAM,KAAKhB,SAAS,CAACiB,GAAG,IAC1BxC,CAAC,CAACyC,GAAG,CAACzB,WAAW,CAAC,CAAC,KAAKY,SAAS,EAAEZ,WAAW,CAAC,CAAC;EAEpD;EAEA,OAAOX,OAAO;AAChB","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.8.9-master.2025-06-
|
19
|
+
export const version = "3.8.9-master.2025-06-14";
|
20
20
|
createVuetify.version = version;
|
21
21
|
export { blueprints, components, directives };
|
22
22
|
export * from "./composables/index.js";
|
package/lib/framework.d.ts
CHANGED
@@ -2545,43 +2545,41 @@ declare module 'vue' {
|
|
2545
2545
|
$children?: VNodeChild
|
2546
2546
|
}
|
2547
2547
|
export interface GlobalComponents {
|
2548
|
+
VAlert: typeof import('vuetify/components')['VAlert']
|
2549
|
+
VAlertTitle: typeof import('vuetify/components')['VAlertTitle']
|
2548
2550
|
VAppBar: typeof import('vuetify/components')['VAppBar']
|
2549
2551
|
VAppBarNavIcon: typeof import('vuetify/components')['VAppBarNavIcon']
|
2550
2552
|
VAppBarTitle: typeof import('vuetify/components')['VAppBarTitle']
|
2551
2553
|
VApp: typeof import('vuetify/components')['VApp']
|
2552
|
-
VAlert: typeof import('vuetify/components')['VAlert']
|
2553
|
-
VAlertTitle: typeof import('vuetify/components')['VAlertTitle']
|
2554
|
-
VAvatar: typeof import('vuetify/components')['VAvatar']
|
2555
2554
|
VAutocomplete: typeof import('vuetify/components')['VAutocomplete']
|
2556
|
-
|
2557
|
-
|
2558
|
-
|
2559
|
-
VBadge: typeof import('vuetify/components')['VBadge']
|
2560
|
-
VBottomSheet: typeof import('vuetify/components')['VBottomSheet']
|
2555
|
+
VBanner: typeof import('vuetify/components')['VBanner']
|
2556
|
+
VBannerActions: typeof import('vuetify/components')['VBannerActions']
|
2557
|
+
VBannerText: typeof import('vuetify/components')['VBannerText']
|
2561
2558
|
VBottomNavigation: typeof import('vuetify/components')['VBottomNavigation']
|
2562
|
-
|
2563
|
-
|
2559
|
+
VBadge: typeof import('vuetify/components')['VBadge']
|
2560
|
+
VBtnGroup: typeof import('vuetify/components')['VBtnGroup']
|
2561
|
+
VAvatar: typeof import('vuetify/components')['VAvatar']
|
2564
2562
|
VCard: typeof import('vuetify/components')['VCard']
|
2565
2563
|
VCardActions: typeof import('vuetify/components')['VCardActions']
|
2566
2564
|
VCardItem: typeof import('vuetify/components')['VCardItem']
|
2567
2565
|
VCardSubtitle: typeof import('vuetify/components')['VCardSubtitle']
|
2568
2566
|
VCardText: typeof import('vuetify/components')['VCardText']
|
2569
2567
|
VCardTitle: typeof import('vuetify/components')['VCardTitle']
|
2570
|
-
|
2568
|
+
VBtnToggle: typeof import('vuetify/components')['VBtnToggle']
|
2569
|
+
VBottomSheet: typeof import('vuetify/components')['VBottomSheet']
|
2570
|
+
VBreadcrumbs: typeof import('vuetify/components')['VBreadcrumbs']
|
2571
|
+
VBreadcrumbsItem: typeof import('vuetify/components')['VBreadcrumbsItem']
|
2572
|
+
VBreadcrumbsDivider: typeof import('vuetify/components')['VBreadcrumbsDivider']
|
2571
2573
|
VCheckbox: typeof import('vuetify/components')['VCheckbox']
|
2572
2574
|
VCheckboxBtn: typeof import('vuetify/components')['VCheckboxBtn']
|
2573
|
-
|
2574
|
-
VCombobox: typeof import('vuetify/components')['VCombobox']
|
2575
|
-
VChipGroup: typeof import('vuetify/components')['VChipGroup']
|
2576
|
-
VCode: typeof import('vuetify/components')['VCode']
|
2575
|
+
VBtn: typeof import('vuetify/components')['VBtn']
|
2577
2576
|
VCarousel: typeof import('vuetify/components')['VCarousel']
|
2578
2577
|
VCarouselItem: typeof import('vuetify/components')['VCarouselItem']
|
2579
|
-
|
2580
|
-
|
2581
|
-
|
2582
|
-
|
2583
|
-
|
2584
|
-
VDatePickerYears: typeof import('vuetify/components')['VDatePickerYears']
|
2578
|
+
VChip: typeof import('vuetify/components')['VChip']
|
2579
|
+
VCode: typeof import('vuetify/components')['VCode']
|
2580
|
+
VCombobox: typeof import('vuetify/components')['VCombobox']
|
2581
|
+
VCounter: typeof import('vuetify/components')['VCounter']
|
2582
|
+
VColorPicker: typeof import('vuetify/components')['VColorPicker']
|
2585
2583
|
VDataTable: typeof import('vuetify/components')['VDataTable']
|
2586
2584
|
VDataTableHeaders: typeof import('vuetify/components')['VDataTableHeaders']
|
2587
2585
|
VDataTableFooter: typeof import('vuetify/components')['VDataTableFooter']
|
@@ -2589,19 +2587,24 @@ declare module 'vue' {
|
|
2589
2587
|
VDataTableRow: typeof import('vuetify/components')['VDataTableRow']
|
2590
2588
|
VDataTableVirtual: typeof import('vuetify/components')['VDataTableVirtual']
|
2591
2589
|
VDataTableServer: typeof import('vuetify/components')['VDataTableServer']
|
2592
|
-
|
2593
|
-
|
2590
|
+
VChipGroup: typeof import('vuetify/components')['VChipGroup']
|
2591
|
+
VDatePicker: typeof import('vuetify/components')['VDatePicker']
|
2592
|
+
VDatePickerControls: typeof import('vuetify/components')['VDatePickerControls']
|
2593
|
+
VDatePickerHeader: typeof import('vuetify/components')['VDatePickerHeader']
|
2594
|
+
VDatePickerMonth: typeof import('vuetify/components')['VDatePickerMonth']
|
2595
|
+
VDatePickerMonths: typeof import('vuetify/components')['VDatePickerMonths']
|
2596
|
+
VDatePickerYears: typeof import('vuetify/components')['VDatePickerYears']
|
2594
2597
|
VDialog: typeof import('vuetify/components')['VDialog']
|
2595
2598
|
VExpansionPanels: typeof import('vuetify/components')['VExpansionPanels']
|
2596
2599
|
VExpansionPanel: typeof import('vuetify/components')['VExpansionPanel']
|
2597
2600
|
VExpansionPanelText: typeof import('vuetify/components')['VExpansionPanelText']
|
2598
2601
|
VExpansionPanelTitle: typeof import('vuetify/components')['VExpansionPanelTitle']
|
2602
|
+
VDivider: typeof import('vuetify/components')['VDivider']
|
2603
|
+
VFooter: typeof import('vuetify/components')['VFooter']
|
2599
2604
|
VFab: typeof import('vuetify/components')['VFab']
|
2600
|
-
VEmptyState: typeof import('vuetify/components')['VEmptyState']
|
2601
2605
|
VField: typeof import('vuetify/components')['VField']
|
2602
2606
|
VFieldLabel: typeof import('vuetify/components')['VFieldLabel']
|
2603
|
-
|
2604
|
-
VInfiniteScroll: typeof import('vuetify/components')['VInfiniteScroll']
|
2607
|
+
VEmptyState: typeof import('vuetify/components')['VEmptyState']
|
2605
2608
|
VFileInput: typeof import('vuetify/components')['VFileInput']
|
2606
2609
|
VIcon: typeof import('vuetify/components')['VIcon']
|
2607
2610
|
VComponentIcon: typeof import('vuetify/components')['VComponentIcon']
|
@@ -2609,10 +2612,15 @@ declare module 'vue' {
|
|
2609
2612
|
VLigatureIcon: typeof import('vuetify/components')['VLigatureIcon']
|
2610
2613
|
VClassIcon: typeof import('vuetify/components')['VClassIcon']
|
2611
2614
|
VImg: typeof import('vuetify/components')['VImg']
|
2612
|
-
|
2615
|
+
VInfiniteScroll: typeof import('vuetify/components')['VInfiniteScroll']
|
2613
2616
|
VItemGroup: typeof import('vuetify/components')['VItemGroup']
|
2614
2617
|
VItem: typeof import('vuetify/components')['VItem']
|
2615
2618
|
VInput: typeof import('vuetify/components')['VInput']
|
2619
|
+
VMenu: typeof import('vuetify/components')['VMenu']
|
2620
|
+
VKbd: typeof import('vuetify/components')['VKbd']
|
2621
|
+
VLabel: typeof import('vuetify/components')['VLabel']
|
2622
|
+
VNavigationDrawer: typeof import('vuetify/components')['VNavigationDrawer']
|
2623
|
+
VMessages: typeof import('vuetify/components')['VMessages']
|
2616
2624
|
VList: typeof import('vuetify/components')['VList']
|
2617
2625
|
VListGroup: typeof import('vuetify/components')['VListGroup']
|
2618
2626
|
VListImg: typeof import('vuetify/components')['VListImg']
|
@@ -2622,54 +2630,49 @@ declare module 'vue' {
|
|
2622
2630
|
VListItemSubtitle: typeof import('vuetify/components')['VListItemSubtitle']
|
2623
2631
|
VListItemTitle: typeof import('vuetify/components')['VListItemTitle']
|
2624
2632
|
VListSubheader: typeof import('vuetify/components')['VListSubheader']
|
2625
|
-
|
2626
|
-
VMenu: typeof import('vuetify/components')['VMenu']
|
2627
|
-
VMessages: typeof import('vuetify/components')['VMessages']
|
2628
|
-
VMain: typeof import('vuetify/components')['VMain']
|
2629
|
-
VNavigationDrawer: typeof import('vuetify/components')['VNavigationDrawer']
|
2633
|
+
VNumberInput: typeof import('vuetify/components')['VNumberInput']
|
2630
2634
|
VOtpInput: typeof import('vuetify/components')['VOtpInput']
|
2631
|
-
VDivider: typeof import('vuetify/components')['VDivider']
|
2632
2635
|
VOverlay: typeof import('vuetify/components')['VOverlay']
|
2633
|
-
VNumberInput: typeof import('vuetify/components')['VNumberInput']
|
2634
|
-
VPagination: typeof import('vuetify/components')['VPagination']
|
2635
2636
|
VProgressCircular: typeof import('vuetify/components')['VProgressCircular']
|
2636
2637
|
VRadioGroup: typeof import('vuetify/components')['VRadioGroup']
|
2637
2638
|
VProgressLinear: typeof import('vuetify/components')['VProgressLinear']
|
2639
|
+
VPagination: typeof import('vuetify/components')['VPagination']
|
2638
2640
|
VSelect: typeof import('vuetify/components')['VSelect']
|
2639
|
-
VRating: typeof import('vuetify/components')['VRating']
|
2640
2641
|
VSelectionControl: typeof import('vuetify/components')['VSelectionControl']
|
2641
2642
|
VSelectionControlGroup: typeof import('vuetify/components')['VSelectionControlGroup']
|
2642
|
-
|
2643
|
-
VSlideGroupItem: typeof import('vuetify/components')['VSlideGroupItem']
|
2644
|
-
VSnackbar: typeof import('vuetify/components')['VSnackbar']
|
2643
|
+
VRating: typeof import('vuetify/components')['VRating']
|
2645
2644
|
VSheet: typeof import('vuetify/components')['VSheet']
|
2646
2645
|
VSkeletonLoader: typeof import('vuetify/components')['VSkeletonLoader']
|
2646
|
+
VSlideGroup: typeof import('vuetify/components')['VSlideGroup']
|
2647
|
+
VSlideGroupItem: typeof import('vuetify/components')['VSlideGroupItem']
|
2647
2648
|
VStepper: typeof import('vuetify/components')['VStepper']
|
2648
2649
|
VStepperActions: typeof import('vuetify/components')['VStepperActions']
|
2649
2650
|
VStepperHeader: typeof import('vuetify/components')['VStepperHeader']
|
2650
2651
|
VStepperItem: typeof import('vuetify/components')['VStepperItem']
|
2651
2652
|
VStepperWindow: typeof import('vuetify/components')['VStepperWindow']
|
2652
2653
|
VStepperWindowItem: typeof import('vuetify/components')['VStepperWindowItem']
|
2654
|
+
VSnackbar: typeof import('vuetify/components')['VSnackbar']
|
2653
2655
|
VSlider: typeof import('vuetify/components')['VSlider']
|
2654
|
-
VSwitch: typeof import('vuetify/components')['VSwitch']
|
2655
2656
|
VSystemBar: typeof import('vuetify/components')['VSystemBar']
|
2657
|
+
VSwitch: typeof import('vuetify/components')['VSwitch']
|
2658
|
+
VTextarea: typeof import('vuetify/components')['VTextarea']
|
2656
2659
|
VTable: typeof import('vuetify/components')['VTable']
|
2660
|
+
VTextField: typeof import('vuetify/components')['VTextField']
|
2657
2661
|
VTab: typeof import('vuetify/components')['VTab']
|
2658
2662
|
VTabs: typeof import('vuetify/components')['VTabs']
|
2659
2663
|
VTabsWindow: typeof import('vuetify/components')['VTabsWindow']
|
2660
2664
|
VTabsWindowItem: typeof import('vuetify/components')['VTabsWindowItem']
|
2661
|
-
|
2662
|
-
|
2665
|
+
VTooltip: typeof import('vuetify/components')['VTooltip']
|
2666
|
+
VWindow: typeof import('vuetify/components')['VWindow']
|
2667
|
+
VWindowItem: typeof import('vuetify/components')['VWindowItem']
|
2663
2668
|
VTimeline: typeof import('vuetify/components')['VTimeline']
|
2664
2669
|
VTimelineItem: typeof import('vuetify/components')['VTimelineItem']
|
2665
2670
|
VToolbar: typeof import('vuetify/components')['VToolbar']
|
2666
2671
|
VToolbarTitle: typeof import('vuetify/components')['VToolbarTitle']
|
2667
2672
|
VToolbarItems: typeof import('vuetify/components')['VToolbarItems']
|
2668
|
-
|
2669
|
-
VWindowItem: typeof import('vuetify/components')['VWindowItem']
|
2670
|
-
VTooltip: typeof import('vuetify/components')['VTooltip']
|
2671
|
-
VDataIterator: typeof import('vuetify/components')['VDataIterator']
|
2673
|
+
VMain: typeof import('vuetify/components')['VMain']
|
2672
2674
|
VConfirmEdit: typeof import('vuetify/components')['VConfirmEdit']
|
2675
|
+
VDataIterator: typeof import('vuetify/components')['VDataIterator']
|
2673
2676
|
VDefaultsProvider: typeof import('vuetify/components')['VDefaultsProvider']
|
2674
2677
|
VForm: typeof import('vuetify/components')['VForm']
|
2675
2678
|
VContainer: typeof import('vuetify/components')['VContainer']
|
@@ -2682,18 +2685,16 @@ declare module 'vue' {
|
|
2682
2685
|
VLazy: typeof import('vuetify/components')['VLazy']
|
2683
2686
|
VLocaleProvider: typeof import('vuetify/components')['VLocaleProvider']
|
2684
2687
|
VNoSsr: typeof import('vuetify/components')['VNoSsr']
|
2685
|
-
VParallax: typeof import('vuetify/components')['VParallax']
|
2686
2688
|
VRadio: typeof import('vuetify/components')['VRadio']
|
2689
|
+
VParallax: typeof import('vuetify/components')['VParallax']
|
2690
|
+
VRangeSlider: typeof import('vuetify/components')['VRangeSlider']
|
2687
2691
|
VResponsive: typeof import('vuetify/components')['VResponsive']
|
2688
2692
|
VSnackbarQueue: typeof import('vuetify/components')['VSnackbarQueue']
|
2689
2693
|
VSparkline: typeof import('vuetify/components')['VSparkline']
|
2690
2694
|
VSpeedDial: typeof import('vuetify/components')['VSpeedDial']
|
2691
|
-
VBanner: typeof import('vuetify/components')['VBanner']
|
2692
|
-
VBannerActions: typeof import('vuetify/components')['VBannerActions']
|
2693
|
-
VBannerText: typeof import('vuetify/components')['VBannerText']
|
2694
|
-
VThemeProvider: typeof import('vuetify/components')['VThemeProvider']
|
2695
2695
|
VValidation: typeof import('vuetify/components')['VValidation']
|
2696
2696
|
VVirtualScroll: typeof import('vuetify/components')['VVirtualScroll']
|
2697
|
+
VThemeProvider: typeof import('vuetify/components')['VThemeProvider']
|
2697
2698
|
VFabTransition: typeof import('vuetify/components')['VFabTransition']
|
2698
2699
|
VDialogBottomTransition: typeof import('vuetify/components')['VDialogBottomTransition']
|
2699
2700
|
VDialogTopTransition: typeof import('vuetify/components')['VDialogTopTransition']
|
@@ -2710,29 +2711,28 @@ declare module 'vue' {
|
|
2710
2711
|
VExpandTransition: typeof import('vuetify/components')['VExpandTransition']
|
2711
2712
|
VExpandXTransition: typeof import('vuetify/components')['VExpandXTransition']
|
2712
2713
|
VDialogTransition: typeof import('vuetify/components')['VDialogTransition']
|
2713
|
-
VRangeSlider: typeof import('vuetify/components')['VRangeSlider']
|
2714
2714
|
VCalendar: typeof import('vuetify/labs/components')['VCalendar']
|
2715
2715
|
VCalendarDay: typeof import('vuetify/labs/components')['VCalendarDay']
|
2716
2716
|
VCalendarHeader: typeof import('vuetify/labs/components')['VCalendarHeader']
|
2717
2717
|
VCalendarInterval: typeof import('vuetify/labs/components')['VCalendarInterval']
|
2718
2718
|
VCalendarIntervalEvent: typeof import('vuetify/labs/components')['VCalendarIntervalEvent']
|
2719
2719
|
VCalendarMonthDay: typeof import('vuetify/labs/components')['VCalendarMonthDay']
|
2720
|
+
VFileUpload: typeof import('vuetify/labs/components')['VFileUpload']
|
2721
|
+
VFileUploadItem: typeof import('vuetify/labs/components')['VFileUploadItem']
|
2720
2722
|
VIconBtn: typeof import('vuetify/labs/components')['VIconBtn']
|
2721
|
-
VStepperVertical: typeof import('vuetify/labs/components')['VStepperVertical']
|
2722
|
-
VStepperVerticalItem: typeof import('vuetify/labs/components')['VStepperVerticalItem']
|
2723
|
-
VStepperVerticalActions: typeof import('vuetify/labs/components')['VStepperVerticalActions']
|
2724
|
-
VPicker: typeof import('vuetify/labs/components')['VPicker']
|
2725
|
-
VPickerTitle: typeof import('vuetify/labs/components')['VPickerTitle']
|
2726
2723
|
VTimePicker: typeof import('vuetify/labs/components')['VTimePicker']
|
2727
2724
|
VTimePickerClock: typeof import('vuetify/labs/components')['VTimePickerClock']
|
2728
2725
|
VTimePickerControls: typeof import('vuetify/labs/components')['VTimePickerControls']
|
2729
|
-
|
2730
|
-
|
2731
|
-
|
2732
|
-
|
2733
|
-
|
2726
|
+
VPicker: typeof import('vuetify/labs/components')['VPicker']
|
2727
|
+
VPickerTitle: typeof import('vuetify/labs/components')['VPickerTitle']
|
2728
|
+
VStepperVertical: typeof import('vuetify/labs/components')['VStepperVertical']
|
2729
|
+
VStepperVerticalItem: typeof import('vuetify/labs/components')['VStepperVerticalItem']
|
2730
|
+
VStepperVerticalActions: typeof import('vuetify/labs/components')['VStepperVerticalActions']
|
2734
2731
|
VDateInput: typeof import('vuetify/labs/components')['VDateInput']
|
2735
2732
|
VPullToRefresh: typeof import('vuetify/labs/components')['VPullToRefresh']
|
2736
2733
|
VColorInput: typeof import('vuetify/labs/components')['VColorInput']
|
2734
|
+
VTreeview: typeof import('vuetify/labs/components')['VTreeview']
|
2735
|
+
VTreeviewItem: typeof import('vuetify/labs/components')['VTreeviewItem']
|
2736
|
+
VTreeviewGroup: typeof import('vuetify/labs/components')['VTreeviewGroup']
|
2737
2737
|
}
|
2738
2738
|
}
|
package/lib/framework.js
CHANGED
@@ -52,6 +52,7 @@ export const VFileUploadItem = genericComponent()({
|
|
52
52
|
"class": "v-file-upload-item"
|
53
53
|
}), {
|
54
54
|
...slots,
|
55
|
+
title: () => props?.title ?? props.file?.name,
|
55
56
|
prepend: slotProps => _createElementVNode(_Fragment, null, [!slots.prepend ? _createVNode(VAvatar, {
|
56
57
|
"icon": props.fileIcon,
|
57
58
|
"image": preview.value,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"VFileUploadItem.js","names":["VAvatar","VBtn","VDefaultsProvider","makeVListItemProps","VListItem","computed","ref","watchEffect","genericComponent","humanReadableFileSize","propsFactory","useRender","makeVFileUploadItemProps","clearable","Boolean","file","type","Object","default","fileIcon","String","showSize","border","rounded","lines","VFileUploadItem","name","props","emits","click:remove","click","e","setup","_ref","emit","slots","preview","base","undefined","onClickRemove","value","startsWith","URL","createObjectURL","listItemProps","filterProps","_createVNode","_mergeProps","title","size","prepend","slotProps","_createElementVNode","_Fragment","image","icon","append","clear","density","variant","onClick"],"sources":["../../../src/labs/VFileUpload/VFileUploadItem.tsx"],"sourcesContent":["// Components\nimport { VAvatar } from '@/components/VAvatar/VAvatar'\nimport { VBtn } from '@/components/VBtn/VBtn'\nimport { VDefaultsProvider } from '@/components/VDefaultsProvider/VDefaultsProvider'\nimport { makeVListItemProps, VListItem } from '@/components/VList/VListItem'\n\n// Utilities\nimport { computed, ref, watchEffect } from 'vue'\nimport { genericComponent, humanReadableFileSize, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { VListItemSlots } from '@/components/VList/VListItem'\n\nexport type VFileUploadItemSlots = {\n clear: {\n props: { onClick: () => void }\n }\n} & VListItemSlots\n\nexport const makeVFileUploadItemProps = propsFactory({\n clearable: Boolean,\n file: {\n type: Object as PropType<File>,\n default: null,\n },\n fileIcon: {\n type: String,\n // TODO: setup up a proper aliased icon\n default: 'mdi-file-document',\n },\n showSize: Boolean,\n\n ...makeVListItemProps({\n border: true,\n rounded: true,\n lines: 'two' as const,\n }),\n}, 'VFileUploadItem')\n\nexport const VFileUploadItem = genericComponent<VFileUploadItemSlots>()({\n name: 'VFileUploadItem',\n\n props: makeVFileUploadItemProps(),\n\n emits: {\n 'click:remove': () => true,\n click: (e: MouseEvent | KeyboardEvent) => true,\n },\n\n setup (props, { emit, slots }) {\n const preview = ref()\n const base = computed(() => typeof props.showSize !== 'boolean' ? props.showSize : undefined)\n\n function onClickRemove () {\n emit('click:remove')\n }\n\n watchEffect(() => {\n preview.value = props.file?.type.startsWith('image') ? URL.createObjectURL(props.file) : undefined\n })\n\n useRender(() => {\n const listItemProps = VListItem.filterProps(props)\n\n return (\n <VListItem\n { ...listItemProps }\n title={ props.title ?? props.file?.name }\n subtitle={ props.showSize ? humanReadableFileSize(props.file?.size, base.value) : props.file?.type }\n class=\"v-file-upload-item\"\n >\n {{\n ...slots,\n prepend: slotProps => (\n <>\n { !slots.prepend ? (\n <VAvatar\n icon={ props.fileIcon }\n image={ preview.value }\n rounded\n />\n ) : (\n <VDefaultsProvider\n defaults={{\n VAvatar: {\n image: preview.value,\n icon: !preview.value ? props.fileIcon : undefined,\n rounded: true,\n },\n }}\n >\n { slots.prepend?.(slotProps) ?? (\n <VAvatar />\n )}\n </VDefaultsProvider>\n )}\n </>\n ),\n append: slotProps => (\n <>\n { props.clearable && (\n <>\n { !slots.clear ? (\n <VBtn\n icon=\"$clear\"\n density=\"comfortable\"\n variant=\"text\"\n onClick={ onClickRemove }\n />\n ) : (\n <VDefaultsProvider\n defaults={{\n VBtn: {\n icon: '$clear',\n density: 'comfortable',\n variant: 'text',\n },\n }}\n >\n { slots.clear?.({\n ...slotProps,\n props: { onClick: onClickRemove },\n }) ?? (<VBtn />)}\n </VDefaultsProvider>\n )}\n </>\n )}\n\n { slots.append?.(slotProps) }\n </>\n ),\n }}\n </VListItem>\n )\n })\n },\n})\n\nexport type VFileUploadItem = InstanceType<typeof VFileUploadItem>\n"],"mappings":";AAAA;AAAA,SACSA,OAAO;AAAA,SACPC,IAAI;AAAA,SACJC,iBAAiB;AAAA,SACjBC,kBAAkB,EAAEC,SA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B,UAAU,CAAC,OAAO,CAAC,GAAGC,GAAG,CAACC,eAAe,CAAChB,KAAK,CAACZ,IAAI,CAAC,GAAGuB,SAAS;IACpG,CAAC,CAAC;IAEF3B,SAAS,CAAC,MAAM;MACd,MAAMiC,aAAa,GAAGxC,SAAS,CAACyC,WAAW,CAAClB,KAAK,CAAC;MAElD,OAAAmB,YAAA,CAAA1C,SAAA,EAAA2C,WAAA,CAESH,aAAa;QAAA,SACVjB,KAAK,CAACqB,KAAK,IAAIrB,KAAK,CAACZ,IAAI,EAAEW,IAAI;QAAA,YAC5BC,KAAK,CAACN,QAAQ,GAAGZ,qBAAqB,CAACkB,KAAK,CAACZ,IAAI,EAAEkC,IAAI,EAAEZ,IAAI,CAACG,KAAK,CAAC,GAAGb,KAAK,CAACZ,IAAI,EAAEC,IAAI;QAAA;MAAA;QAIhG,GAAGmB,KAAK;
|
1
|
+
{"version":3,"file":"VFileUploadItem.js","names":["VAvatar","VBtn","VDefaultsProvider","makeVListItemProps","VListItem","computed","ref","watchEffect","genericComponent","humanReadableFileSize","propsFactory","useRender","makeVFileUploadItemProps","clearable","Boolean","file","type","Object","default","fileIcon","String","showSize","border","rounded","lines","VFileUploadItem","name","props","emits","click:remove","click","e","setup","_ref","emit","slots","preview","base","undefined","onClickRemove","value","startsWith","URL","createObjectURL","listItemProps","filterProps","_createVNode","_mergeProps","title","size","prepend","slotProps","_createElementVNode","_Fragment","image","icon","append","clear","density","variant","onClick"],"sources":["../../../src/labs/VFileUpload/VFileUploadItem.tsx"],"sourcesContent":["// Components\nimport { VAvatar } from '@/components/VAvatar/VAvatar'\nimport { VBtn } from '@/components/VBtn/VBtn'\nimport { VDefaultsProvider } from '@/components/VDefaultsProvider/VDefaultsProvider'\nimport { makeVListItemProps, VListItem } from '@/components/VList/VListItem'\n\n// Utilities\nimport { computed, ref, watchEffect } from 'vue'\nimport { genericComponent, humanReadableFileSize, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { VListItemSlots } from '@/components/VList/VListItem'\n\nexport type VFileUploadItemSlots = {\n clear: {\n props: { onClick: () => void }\n }\n} & VListItemSlots\n\nexport const makeVFileUploadItemProps = propsFactory({\n clearable: Boolean,\n file: {\n type: Object as PropType<File>,\n default: null,\n },\n fileIcon: {\n type: String,\n // TODO: setup up a proper aliased icon\n default: 'mdi-file-document',\n },\n showSize: Boolean,\n\n ...makeVListItemProps({\n border: true,\n rounded: true,\n lines: 'two' as const,\n }),\n}, 'VFileUploadItem')\n\nexport const VFileUploadItem = genericComponent<VFileUploadItemSlots>()({\n name: 'VFileUploadItem',\n\n props: makeVFileUploadItemProps(),\n\n emits: {\n 'click:remove': () => true,\n click: (e: MouseEvent | KeyboardEvent) => true,\n },\n\n setup (props, { emit, slots }) {\n const preview = ref()\n const base = computed(() => typeof props.showSize !== 'boolean' ? props.showSize : undefined)\n\n function onClickRemove () {\n emit('click:remove')\n }\n\n watchEffect(() => {\n preview.value = props.file?.type.startsWith('image') ? URL.createObjectURL(props.file) : undefined\n })\n\n useRender(() => {\n const listItemProps = VListItem.filterProps(props)\n\n return (\n <VListItem\n { ...listItemProps }\n title={ props.title ?? props.file?.name }\n subtitle={ props.showSize ? humanReadableFileSize(props.file?.size, base.value) : props.file?.type }\n class=\"v-file-upload-item\"\n >\n {{\n ...slots,\n title: () => props?.title ?? props.file?.name,\n prepend: slotProps => (\n <>\n { !slots.prepend ? (\n <VAvatar\n icon={ props.fileIcon }\n image={ preview.value }\n rounded\n />\n ) : (\n <VDefaultsProvider\n defaults={{\n VAvatar: {\n image: preview.value,\n icon: !preview.value ? props.fileIcon : undefined,\n rounded: true,\n },\n }}\n >\n { slots.prepend?.(slotProps) ?? (\n <VAvatar />\n )}\n </VDefaultsProvider>\n )}\n </>\n ),\n append: slotProps => (\n <>\n { props.clearable && (\n <>\n { !slots.clear ? (\n <VBtn\n icon=\"$clear\"\n density=\"comfortable\"\n variant=\"text\"\n onClick={ onClickRemove }\n />\n ) : (\n <VDefaultsProvider\n defaults={{\n VBtn: {\n icon: '$clear',\n density: 'comfortable',\n variant: 'text',\n },\n }}\n >\n { slots.clear?.({\n ...slotProps,\n props: { onClick: onClickRemove },\n }) ?? (<VBtn />)}\n </VDefaultsProvider>\n )}\n </>\n )}\n\n { slots.append?.(slotProps) }\n </>\n ),\n }}\n </VListItem>\n )\n })\n },\n})\n\nexport type VFileUploadItem = InstanceType<typeof VFileUploadItem>\n"],"mappings":";AAAA;AAAA,SACSA,OAAO;AAAA,SACPC,IAAI;AAAA,SACJC,iBAAiB;AAAA,SACjBC,kBAAkB,EAAEC,SAAS,+CAEtC;AACA,SAASC,QAAQ,EAAEC,GAAG,EAAEC,WAAW,QAAQ,KAAK;AAAA,SACvCC,gBAAgB,EAAEC,qBAAqB,EAAEC,YAAY,EAAEC,SAAS,+BAEzE;AAUA,OAAO,MAAMC,wBAAwB,GAAGF,YAAY,CAAC;EACnDG,SAAS,EAAEC,OAAO;EAClBC,IAAI,EAAE;IACJC,IAAI,EAAEC,MAAwB;IAC9BC,OAAO,EAAE;EACX,CAAC;EACDC,QAAQ,EAAE;IACRH,IAAI,EAAEI,MAAM;IACZ;IACAF,OAAO,EAAE;EACX,CAAC;EACDG,QAAQ,EAAEP,OAAO;EAEjB,GAAGX,kBAAkB,CAAC;IACpBmB,MAAM,EAAE,IAAI;IACZC,OAAO,EAAE,IAAI;IACbC,KAAK,EAAE;EACT,CAAC;AACH,CAAC,EAAE,iBAAiB,CAAC;AAErB,OAAO,MAAMC,eAAe,GAAGjB,gBAAgB,CAAuB,CAAC,CAAC;EACtEkB,IAAI,EAAE,iBAAiB;EAEvBC,KAAK,EAAEf,wBAAwB,CAAC,CAAC;EAEjCgB,KAAK,EAAE;IACL,cAAc,EAAEC,CAAA,KAAM,IAAI;IAC1BC,KAAK,EAAGC,CAA6B,IAAK;EAC5C,CAAC;EAEDC,KAAKA,CAAEL,KAAK,EAAAM,IAAA,EAAmB;IAAA,IAAjB;MAAEC,IAAI;MAAEC;IAAM,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