@vuetify/nightly 3.8.8-master.2025-06-06 → 3.8.8-master.2025-06-08
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 +14 -3
- package/dist/json/attributes.json +2080 -2080
- package/dist/json/importMap-labs.json +20 -20
- package/dist/json/importMap.json +160 -160
- package/dist/json/web-types.json +3925 -3925
- package/dist/vuetify-labs.cjs +117 -59
- package/dist/vuetify-labs.css +3446 -3446
- package/dist/vuetify-labs.d.ts +65 -59
- package/dist/vuetify-labs.esm.js +117 -59
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +117 -59
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.cjs +104 -40
- package/dist/vuetify.cjs.map +1 -1
- package/dist/vuetify.css +3061 -3061
- package/dist/vuetify.d.ts +60 -59
- package/dist/vuetify.esm.js +104 -40
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +104 -40
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +147 -140
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VDataTable/VDataTableColumn.js +1 -0
- package/lib/components/VDataTable/VDataTableColumn.js.map +1 -1
- package/lib/components/VDataTable/VDataTableFooter.js +3 -1
- package/lib/components/VDataTable/VDataTableFooter.js.map +1 -1
- package/lib/components/VDataTable/VDataTableHeaders.js +8 -1
- package/lib/components/VDataTable/VDataTableHeaders.js.map +1 -1
- package/lib/components/VDatePicker/VDatePickerMonth.js +2 -2
- package/lib/components/VDatePicker/VDatePickerMonth.js.map +1 -1
- package/lib/components/VFileInput/VFileInput.js +8 -3
- package/lib/components/VFileInput/VFileInput.js.map +1 -1
- package/lib/components/VNumberInput/VNumberInput.d.ts +5 -0
- package/lib/components/VNumberInput/VNumberInput.js +7 -11
- package/lib/components/VNumberInput/VNumberInput.js.map +1 -1
- package/lib/components/VOtpInput/VOtpInput.js +5 -2
- package/lib/components/VOtpInput/VOtpInput.js.map +1 -1
- package/lib/components/VSlider/VSliderThumb.js +1 -1
- package/lib/components/VSlider/VSliderThumb.js.map +1 -1
- package/lib/components/VTextField/VTextField.js +5 -4
- package/lib/components/VTextField/VTextField.js.map +1 -1
- package/lib/composables/date/date.d.ts +1 -4
- package/lib/composables/date/date.js +13 -14
- package/lib/composables/date/date.js.map +1 -1
- package/lib/composables/fileDrop.d.ts +4 -0
- package/lib/composables/fileDrop.js +50 -0
- package/lib/composables/fileDrop.js.map +1 -0
- package/lib/entry-bundler.d.ts +0 -3
- package/lib/entry-bundler.js +1 -1
- package/lib/framework.d.ts +55 -59
- package/lib/framework.js +1 -1
- package/lib/labs/VColorInput/VColorInput.js +3 -8
- package/lib/labs/VColorInput/VColorInput.js.map +1 -1
- package/lib/labs/VDateInput/VDateInput.d.ts +5 -0
- package/lib/labs/VDateInput/VDateInput.js +7 -10
- package/lib/labs/VDateInput/VDateInput.js.map +1 -1
- package/lib/labs/VFileUpload/VFileUpload.js +7 -3
- package/lib/labs/VFileUpload/VFileUpload.js.map +1 -1
- package/lib/labs/entry-bundler.d.ts +0 -3
- package/package.json +1 -1
@@ -0,0 +1,50 @@
|
|
1
|
+
// Types
|
2
|
+
|
3
|
+
export function useFileDrop() {
|
4
|
+
function hasFilesOrFolders(e) {
|
5
|
+
const entries = [...(e.dataTransfer?.items ?? [])].filter(x => x.kind === 'file').map(x => x.webkitGetAsEntry()).filter(Boolean);
|
6
|
+
return entries.length > 0 || [...(e.dataTransfer?.files ?? [])].length > 0;
|
7
|
+
}
|
8
|
+
async function handleDrop(e) {
|
9
|
+
const result = [];
|
10
|
+
const entries = [...(e.dataTransfer?.items ?? [])].filter(x => x.kind === 'file').map(x => x.webkitGetAsEntry()).filter(Boolean);
|
11
|
+
if (entries.length) {
|
12
|
+
for (const entry of entries) {
|
13
|
+
const files = await traverseFileTree(entry, appendIfDirectory('.', entry));
|
14
|
+
result.push(...files.map(x => x.file));
|
15
|
+
}
|
16
|
+
} else {
|
17
|
+
result.push(...[...(e.dataTransfer?.files ?? [])]);
|
18
|
+
}
|
19
|
+
return result;
|
20
|
+
}
|
21
|
+
return {
|
22
|
+
handleDrop,
|
23
|
+
hasFilesOrFolders
|
24
|
+
};
|
25
|
+
}
|
26
|
+
function traverseFileTree(item) {
|
27
|
+
let path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
28
|
+
return new Promise((resolve, reject) => {
|
29
|
+
if (item.isFile) {
|
30
|
+
const fileEntry = item;
|
31
|
+
fileEntry.file(file => resolve([{
|
32
|
+
file,
|
33
|
+
path
|
34
|
+
}]), reject);
|
35
|
+
} else if (item.isDirectory) {
|
36
|
+
const directoryReader = item.createReader();
|
37
|
+
directoryReader.readEntries(async entries => {
|
38
|
+
const files = [];
|
39
|
+
for (const entry of entries) {
|
40
|
+
files.push(...(await traverseFileTree(entry, appendIfDirectory(path, entry))));
|
41
|
+
}
|
42
|
+
resolve(files);
|
43
|
+
});
|
44
|
+
}
|
45
|
+
});
|
46
|
+
}
|
47
|
+
function appendIfDirectory(path, item) {
|
48
|
+
return item.isDirectory ? `${path}/${item.name}` : path;
|
49
|
+
}
|
50
|
+
//# sourceMappingURL=fileDrop.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"fileDrop.js","names":["useFileDrop","hasFilesOrFolders","e","entries","dataTransfer","items","filter","x","kind","map","webkitGetAsEntry","Boolean","length","files","handleDrop","result","entry","traverseFileTree","appendIfDirectory","push","file","item","path","arguments","undefined","Promise","resolve","reject","isFile","fileEntry","isDirectory","directoryReader","createReader","readEntries","name"],"sources":["../../src/composables/fileDrop.ts"],"sourcesContent":["// Types\ntype FileSelection = { file: File, path: string }\n\nexport function useFileDrop () {\n function hasFilesOrFolders (e: DragEvent): boolean {\n const entries = [...e.dataTransfer?.items ?? []]\n .filter(x => x.kind === 'file')\n .map(x => x.webkitGetAsEntry())\n .filter(Boolean)\n\n return entries.length > 0 || [...e.dataTransfer?.files ?? []].length > 0\n }\n\n async function handleDrop (e: DragEvent) {\n const result: File[] = []\n\n const entries = [...e.dataTransfer?.items ?? []]\n .filter(x => x.kind === 'file')\n .map(x => x.webkitGetAsEntry())\n .filter(Boolean)\n\n if (entries.length) {\n for (const entry of entries) {\n const files = await traverseFileTree(entry!, appendIfDirectory('.', entry!))\n result.push(...files.map(x => x.file))\n }\n } else {\n result.push(...[...e.dataTransfer?.files ?? []])\n }\n\n return result\n }\n\n return {\n handleDrop,\n hasFilesOrFolders,\n }\n}\n\nfunction traverseFileTree (item: FileSystemEntry, path = ''): Promise<FileSelection[]> {\n return new Promise<FileSelection[]>((resolve, reject) => {\n if (item.isFile) {\n const fileEntry = item as FileSystemFileEntry\n fileEntry.file((file: File) => resolve([{ file, path }]), reject)\n } else if (item.isDirectory) {\n const directoryReader = (item as FileSystemDirectoryEntry).createReader()\n directoryReader.readEntries(async entries => {\n const files = [] as FileSelection[]\n for (const entry of entries) {\n files.push(...(await traverseFileTree(entry, appendIfDirectory(path, entry))))\n }\n resolve(files)\n })\n }\n })\n}\n\nfunction appendIfDirectory (path: string, item: FileSystemEntry) {\n return item.isDirectory\n ? `${path}/${item.name}`\n : path\n}\n"],"mappings":"AAAA;;AAGA,OAAO,SAASA,WAAWA,CAAA,EAAI;EAC7B,SAASC,iBAAiBA,CAAEC,CAAY,EAAW;IACjD,MAAMC,OAAO,GAAG,CAAC,IAAGD,CAAC,CAACE,YAAY,EAAEC,KAAK,IAAI,EAAE,EAAC,CAC7CC,MAAM,CAACC,CAAC,IAAIA,CAAC,CAACC,IAAI,KAAK,MAAM,CAAC,CAC9BC,GAAG,CAACF,CAAC,IAAIA,CAAC,CAACG,gBAAgB,CAAC,CAAC,CAAC,CAC9BJ,MAAM,CAACK,OAAO,CAAC;IAElB,OAAOR,OAAO,CAACS,MAAM,GAAG,CAAC,IAAI,CAAC,IAAGV,CAAC,CAACE,YAAY,EAAES,KAAK,IAAI,EAAE,EAAC,CAACD,M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AAC,CAAC,CAAC,EAAEK,MAAM,CAAC;IACnE,CAAC,MAAM,IAAIN,IAAI,CAACS,WAAW,EAAE;MAC3B,MAAMC,eAAe,GAAIV,IAAI,CAA8BW,YAAY,CAAC,CAAC;MACzED,eAAe,CAACE,WAAW,CAAC,MAAM9B,OAAO,IAAI;QAC3C,MAAMU,KAAK,GAAG,EAAqB;QACnC,KAAK,MAAMG,KAAK,IAAIb,OAAO,EAAE;UAC3BU,KAAK,CAACM,IAAI,CAAC,IAAI,MAAMF,gBAAgB,CAACD,KAAK,EAAEE,iBAAiB,CAACI,IAAI,EAAEN,KAAK,CAAC,CAAC,CAAC,CAAC;QAChF;QACAU,OAAO,CAACb,KAAK,CAAC;MAChB,CAAC,CAAC;IACJ;EACF,CAAC,CAAC;AACJ;AAEA,SAASK,iBAAiBA,CAAEI,IAAY,EAAED,IAAqB,EAAE;EAC/D,OAAOA,IAAI,CAACS,WAAW,GACnB,GAAGR,IAAI,IAAID,IAAI,CAACa,IAAI,EAAE,GACtBZ,IAAI;AACV","ignoreList":[]}
|
package/lib/entry-bundler.d.ts
CHANGED
@@ -28,7 +28,6 @@ export declare const createVuetify: {
|
|
28
28
|
options: import("./composables/date/date.js").InternalDateOptions;
|
29
29
|
instance: {
|
30
30
|
locale?: any;
|
31
|
-
createDateRange: (start: unknown, stop?: unknown) => unknown[];
|
32
31
|
date: (value?: any) => unknown;
|
33
32
|
format: (date: unknown, formatString: string) => string;
|
34
33
|
toJsDate: (value: unknown) => Date;
|
@@ -72,8 +71,6 @@ export declare const createVuetify: {
|
|
72
71
|
setHours: (date: unknown, hours: number) => unknown;
|
73
72
|
getMinutes: (date: unknown) => number;
|
74
73
|
setMinutes: (date: unknown, minutes: number) => unknown;
|
75
|
-
} & {
|
76
|
-
createDateRange(start: unknown, stop?: unknown): unknown[];
|
77
74
|
};
|
78
75
|
};
|
79
76
|
goTo: import("./types.js").GoToInstance;
|
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.8-master.2025-06-
|
19
|
+
export const version = "3.8.8-master.2025-06-08";
|
20
20
|
createVuetify.version = version;
|
21
21
|
export { blueprints, components, directives };
|
22
22
|
export * from "./composables/index.js";
|
package/lib/framework.d.ts
CHANGED
@@ -100,7 +100,6 @@ interface DateAdapter<T = unknown> {
|
|
100
100
|
|
101
101
|
interface DateInstance extends DateModule.InternalAdapter {
|
102
102
|
locale?: any;
|
103
|
-
createDateRange: (start: unknown, stop?: unknown) => unknown[];
|
104
103
|
}
|
105
104
|
/** Supports module augmentation to specify date adapter types */
|
106
105
|
declare namespace DateModule {
|
@@ -2456,7 +2455,6 @@ declare function createVuetify(vuetify?: VuetifyOptions): {
|
|
2456
2455
|
options: InternalDateOptions;
|
2457
2456
|
instance: {
|
2458
2457
|
locale?: any;
|
2459
|
-
createDateRange: (start: unknown, stop?: unknown) => unknown[];
|
2460
2458
|
date: (value?: any) => unknown;
|
2461
2459
|
format: (date: unknown, formatString: string) => string;
|
2462
2460
|
toJsDate: (value: unknown) => Date;
|
@@ -2500,8 +2498,6 @@ declare function createVuetify(vuetify?: VuetifyOptions): {
|
|
2500
2498
|
setHours: (date: unknown, hours: number) => unknown;
|
2501
2499
|
getMinutes: (date: unknown) => number;
|
2502
2500
|
setMinutes: (date: unknown, minutes: number) => unknown;
|
2503
|
-
} & {
|
2504
|
-
createDateRange(start: unknown, stop?: unknown): unknown[];
|
2505
2501
|
};
|
2506
2502
|
};
|
2507
2503
|
goTo: GoToInstance;
|
@@ -2553,37 +2549,36 @@ declare module 'vue' {
|
|
2553
2549
|
VAppBar: typeof import('vuetify/components')['VAppBar']
|
2554
2550
|
VAppBarNavIcon: typeof import('vuetify/components')['VAppBarNavIcon']
|
2555
2551
|
VAppBarTitle: typeof import('vuetify/components')['VAppBarTitle']
|
2552
|
+
VAutocomplete: typeof import('vuetify/components')['VAutocomplete']
|
2556
2553
|
VAlert: typeof import('vuetify/components')['VAlert']
|
2557
2554
|
VAlertTitle: typeof import('vuetify/components')['VAlertTitle']
|
2558
|
-
VAutocomplete: typeof import('vuetify/components')['VAutocomplete']
|
2559
2555
|
VAvatar: typeof import('vuetify/components')['VAvatar']
|
2560
|
-
VBadge: typeof import('vuetify/components')['VBadge']
|
2561
2556
|
VBanner: typeof import('vuetify/components')['VBanner']
|
2562
2557
|
VBannerActions: typeof import('vuetify/components')['VBannerActions']
|
2563
2558
|
VBannerText: typeof import('vuetify/components')['VBannerText']
|
2564
2559
|
VBottomSheet: typeof import('vuetify/components')['VBottomSheet']
|
2565
|
-
|
2560
|
+
VBadge: typeof import('vuetify/components')['VBadge']
|
2566
2561
|
VBreadcrumbs: typeof import('vuetify/components')['VBreadcrumbs']
|
2567
2562
|
VBreadcrumbsItem: typeof import('vuetify/components')['VBreadcrumbsItem']
|
2568
2563
|
VBreadcrumbsDivider: typeof import('vuetify/components')['VBreadcrumbsDivider']
|
2564
|
+
VBottomNavigation: typeof import('vuetify/components')['VBottomNavigation']
|
2565
|
+
VBtnGroup: typeof import('vuetify/components')['VBtnGroup']
|
2566
|
+
VBtnToggle: typeof import('vuetify/components')['VBtnToggle']
|
2567
|
+
VCarousel: typeof import('vuetify/components')['VCarousel']
|
2568
|
+
VCarouselItem: typeof import('vuetify/components')['VCarouselItem']
|
2569
2569
|
VBtn: typeof import('vuetify/components')['VBtn']
|
2570
|
+
VChipGroup: typeof import('vuetify/components')['VChipGroup']
|
2571
|
+
VChip: typeof import('vuetify/components')['VChip']
|
2572
|
+
VCheckbox: typeof import('vuetify/components')['VCheckbox']
|
2573
|
+
VCheckboxBtn: typeof import('vuetify/components')['VCheckboxBtn']
|
2570
2574
|
VCard: typeof import('vuetify/components')['VCard']
|
2571
2575
|
VCardActions: typeof import('vuetify/components')['VCardActions']
|
2572
2576
|
VCardItem: typeof import('vuetify/components')['VCardItem']
|
2573
2577
|
VCardSubtitle: typeof import('vuetify/components')['VCardSubtitle']
|
2574
2578
|
VCardText: typeof import('vuetify/components')['VCardText']
|
2575
2579
|
VCardTitle: typeof import('vuetify/components')['VCardTitle']
|
2576
|
-
VCarousel: typeof import('vuetify/components')['VCarousel']
|
2577
|
-
VCarouselItem: typeof import('vuetify/components')['VCarouselItem']
|
2578
|
-
VChipGroup: typeof import('vuetify/components')['VChipGroup']
|
2579
2580
|
VCode: typeof import('vuetify/components')['VCode']
|
2580
|
-
VBtnToggle: typeof import('vuetify/components')['VBtnToggle']
|
2581
|
-
VCheckbox: typeof import('vuetify/components')['VCheckbox']
|
2582
|
-
VCheckboxBtn: typeof import('vuetify/components')['VCheckboxBtn']
|
2583
|
-
VCombobox: typeof import('vuetify/components')['VCombobox']
|
2584
|
-
VCounter: typeof import('vuetify/components')['VCounter']
|
2585
2581
|
VColorPicker: typeof import('vuetify/components')['VColorPicker']
|
2586
|
-
VBtnGroup: typeof import('vuetify/components')['VBtnGroup']
|
2587
2582
|
VDataTable: typeof import('vuetify/components')['VDataTable']
|
2588
2583
|
VDataTableHeaders: typeof import('vuetify/components')['VDataTableHeaders']
|
2589
2584
|
VDataTableFooter: typeof import('vuetify/components')['VDataTableFooter']
|
@@ -2591,37 +2586,38 @@ declare module 'vue' {
|
|
2591
2586
|
VDataTableRow: typeof import('vuetify/components')['VDataTableRow']
|
2592
2587
|
VDataTableVirtual: typeof import('vuetify/components')['VDataTableVirtual']
|
2593
2588
|
VDataTableServer: typeof import('vuetify/components')['VDataTableServer']
|
2594
|
-
|
2595
|
-
VEmptyState: typeof import('vuetify/components')['VEmptyState']
|
2589
|
+
VCombobox: typeof import('vuetify/components')['VCombobox']
|
2596
2590
|
VDatePicker: typeof import('vuetify/components')['VDatePicker']
|
2597
2591
|
VDatePickerControls: typeof import('vuetify/components')['VDatePickerControls']
|
2598
2592
|
VDatePickerHeader: typeof import('vuetify/components')['VDatePickerHeader']
|
2599
2593
|
VDatePickerMonth: typeof import('vuetify/components')['VDatePickerMonth']
|
2600
2594
|
VDatePickerMonths: typeof import('vuetify/components')['VDatePickerMonths']
|
2601
2595
|
VDatePickerYears: typeof import('vuetify/components')['VDatePickerYears']
|
2596
|
+
VCounter: typeof import('vuetify/components')['VCounter']
|
2597
|
+
VDialog: typeof import('vuetify/components')['VDialog']
|
2598
|
+
VEmptyState: typeof import('vuetify/components')['VEmptyState']
|
2602
2599
|
VDivider: typeof import('vuetify/components')['VDivider']
|
2603
|
-
VFab: typeof import('vuetify/components')['VFab']
|
2604
2600
|
VExpansionPanels: typeof import('vuetify/components')['VExpansionPanels']
|
2605
2601
|
VExpansionPanel: typeof import('vuetify/components')['VExpansionPanel']
|
2606
2602
|
VExpansionPanelText: typeof import('vuetify/components')['VExpansionPanelText']
|
2607
2603
|
VExpansionPanelTitle: typeof import('vuetify/components')['VExpansionPanelTitle']
|
2608
|
-
|
2609
|
-
VField: typeof import('vuetify/components')['VField']
|
2610
|
-
VFieldLabel: typeof import('vuetify/components')['VFieldLabel']
|
2604
|
+
VFab: typeof import('vuetify/components')['VFab']
|
2611
2605
|
VFileInput: typeof import('vuetify/components')['VFileInput']
|
2612
2606
|
VFooter: typeof import('vuetify/components')['VFooter']
|
2613
|
-
|
2607
|
+
VField: typeof import('vuetify/components')['VField']
|
2608
|
+
VFieldLabel: typeof import('vuetify/components')['VFieldLabel']
|
2614
2609
|
VIcon: typeof import('vuetify/components')['VIcon']
|
2615
2610
|
VComponentIcon: typeof import('vuetify/components')['VComponentIcon']
|
2616
2611
|
VSvgIcon: typeof import('vuetify/components')['VSvgIcon']
|
2617
2612
|
VLigatureIcon: typeof import('vuetify/components')['VLigatureIcon']
|
2618
2613
|
VClassIcon: typeof import('vuetify/components')['VClassIcon']
|
2614
|
+
VImg: typeof import('vuetify/components')['VImg']
|
2615
|
+
VInput: typeof import('vuetify/components')['VInput']
|
2619
2616
|
VInfiniteScroll: typeof import('vuetify/components')['VInfiniteScroll']
|
2617
|
+
VKbd: typeof import('vuetify/components')['VKbd']
|
2620
2618
|
VItemGroup: typeof import('vuetify/components')['VItemGroup']
|
2621
2619
|
VItem: typeof import('vuetify/components')['VItem']
|
2622
|
-
VImg: typeof import('vuetify/components')['VImg']
|
2623
2620
|
VLabel: typeof import('vuetify/components')['VLabel']
|
2624
|
-
VKbd: typeof import('vuetify/components')['VKbd']
|
2625
2621
|
VList: typeof import('vuetify/components')['VList']
|
2626
2622
|
VListGroup: typeof import('vuetify/components')['VListGroup']
|
2627
2623
|
VListImg: typeof import('vuetify/components')['VListImg']
|
@@ -2632,70 +2628,68 @@ declare module 'vue' {
|
|
2632
2628
|
VListItemTitle: typeof import('vuetify/components')['VListItemTitle']
|
2633
2629
|
VListSubheader: typeof import('vuetify/components')['VListSubheader']
|
2634
2630
|
VMain: typeof import('vuetify/components')['VMain']
|
2635
|
-
VNavigationDrawer: typeof import('vuetify/components')['VNavigationDrawer']
|
2636
|
-
VMenu: typeof import('vuetify/components')['VMenu']
|
2637
2631
|
VMessages: typeof import('vuetify/components')['VMessages']
|
2638
|
-
|
2632
|
+
VMenu: typeof import('vuetify/components')['VMenu']
|
2639
2633
|
VNumberInput: typeof import('vuetify/components')['VNumberInput']
|
2640
|
-
|
2634
|
+
VNavigationDrawer: typeof import('vuetify/components')['VNavigationDrawer']
|
2635
|
+
VOtpInput: typeof import('vuetify/components')['VOtpInput']
|
2641
2636
|
VProgressLinear: typeof import('vuetify/components')['VProgressLinear']
|
2642
2637
|
VOverlay: typeof import('vuetify/components')['VOverlay']
|
2638
|
+
VPagination: typeof import('vuetify/components')['VPagination']
|
2639
|
+
VSelect: typeof import('vuetify/components')['VSelect']
|
2643
2640
|
VProgressCircular: typeof import('vuetify/components')['VProgressCircular']
|
2644
2641
|
VRadioGroup: typeof import('vuetify/components')['VRadioGroup']
|
2645
2642
|
VRating: typeof import('vuetify/components')['VRating']
|
2646
|
-
VSelectionControl: typeof import('vuetify/components')['VSelectionControl']
|
2647
|
-
VSheet: typeof import('vuetify/components')['VSheet']
|
2648
|
-
VSelect: typeof import('vuetify/components')['VSelect']
|
2649
|
-
VSkeletonLoader: typeof import('vuetify/components')['VSkeletonLoader']
|
2650
2643
|
VSelectionControlGroup: typeof import('vuetify/components')['VSelectionControlGroup']
|
2651
2644
|
VSlideGroup: typeof import('vuetify/components')['VSlideGroup']
|
2652
2645
|
VSlideGroupItem: typeof import('vuetify/components')['VSlideGroupItem']
|
2646
|
+
VSheet: typeof import('vuetify/components')['VSheet']
|
2647
|
+
VSelectionControl: typeof import('vuetify/components')['VSelectionControl']
|
2648
|
+
VSkeletonLoader: typeof import('vuetify/components')['VSkeletonLoader']
|
2653
2649
|
VSlider: typeof import('vuetify/components')['VSlider']
|
2654
|
-
|
2650
|
+
VSnackbar: typeof import('vuetify/components')['VSnackbar']
|
2655
2651
|
VStepper: typeof import('vuetify/components')['VStepper']
|
2656
2652
|
VStepperActions: typeof import('vuetify/components')['VStepperActions']
|
2657
2653
|
VStepperHeader: typeof import('vuetify/components')['VStepperHeader']
|
2658
2654
|
VStepperItem: typeof import('vuetify/components')['VStepperItem']
|
2659
2655
|
VStepperWindow: typeof import('vuetify/components')['VStepperWindow']
|
2660
2656
|
VStepperWindowItem: typeof import('vuetify/components')['VStepperWindowItem']
|
2657
|
+
VSwitch: typeof import('vuetify/components')['VSwitch']
|
2658
|
+
VTable: typeof import('vuetify/components')['VTable']
|
2661
2659
|
VSystemBar: typeof import('vuetify/components')['VSystemBar']
|
2662
|
-
|
2660
|
+
VTextarea: typeof import('vuetify/components')['VTextarea']
|
2661
|
+
VTextField: typeof import('vuetify/components')['VTextField']
|
2663
2662
|
VTab: typeof import('vuetify/components')['VTab']
|
2664
2663
|
VTabs: typeof import('vuetify/components')['VTabs']
|
2665
2664
|
VTabsWindow: typeof import('vuetify/components')['VTabsWindow']
|
2666
2665
|
VTabsWindowItem: typeof import('vuetify/components')['VTabsWindowItem']
|
2667
|
-
|
2668
|
-
|
2669
|
-
|
2670
|
-
VWindowItem: typeof import('vuetify/components')['VWindowItem']
|
2666
|
+
VTimeline: typeof import('vuetify/components')['VTimeline']
|
2667
|
+
VTimelineItem: typeof import('vuetify/components')['VTimelineItem']
|
2668
|
+
VTooltip: typeof import('vuetify/components')['VTooltip']
|
2671
2669
|
VToolbar: typeof import('vuetify/components')['VToolbar']
|
2672
2670
|
VToolbarTitle: typeof import('vuetify/components')['VToolbarTitle']
|
2673
2671
|
VToolbarItems: typeof import('vuetify/components')['VToolbarItems']
|
2674
|
-
|
2675
|
-
|
2672
|
+
VWindow: typeof import('vuetify/components')['VWindow']
|
2673
|
+
VWindowItem: typeof import('vuetify/components')['VWindowItem']
|
2676
2674
|
VConfirmEdit: typeof import('vuetify/components')['VConfirmEdit']
|
2677
|
-
VDataIterator: typeof import('vuetify/components')['VDataIterator']
|
2678
2675
|
VDefaultsProvider: typeof import('vuetify/components')['VDefaultsProvider']
|
2679
|
-
VContainer: typeof import('vuetify/components')['VContainer']
|
2680
|
-
VCol: typeof import('vuetify/components')['VCol']
|
2681
|
-
VRow: typeof import('vuetify/components')['VRow']
|
2682
|
-
VSpacer: typeof import('vuetify/components')['VSpacer']
|
2683
|
-
VHover: typeof import('vuetify/components')['VHover']
|
2684
2676
|
VForm: typeof import('vuetify/components')['VForm']
|
2685
|
-
|
2677
|
+
VDataIterator: typeof import('vuetify/components')['VDataIterator']
|
2678
|
+
VHover: typeof import('vuetify/components')['VHover']
|
2686
2679
|
VLayout: typeof import('vuetify/components')['VLayout']
|
2687
2680
|
VLayoutItem: typeof import('vuetify/components')['VLayoutItem']
|
2688
2681
|
VLocaleProvider: typeof import('vuetify/components')['VLocaleProvider']
|
2682
|
+
VLazy: typeof import('vuetify/components')['VLazy']
|
2689
2683
|
VNoSsr: typeof import('vuetify/components')['VNoSsr']
|
2690
2684
|
VParallax: typeof import('vuetify/components')['VParallax']
|
2685
|
+
VRadio: typeof import('vuetify/components')['VRadio']
|
2691
2686
|
VRangeSlider: typeof import('vuetify/components')['VRangeSlider']
|
2692
2687
|
VResponsive: typeof import('vuetify/components')['VResponsive']
|
2693
|
-
VRadio: typeof import('vuetify/components')['VRadio']
|
2694
|
-
VSparkline: typeof import('vuetify/components')['VSparkline']
|
2695
2688
|
VSpeedDial: typeof import('vuetify/components')['VSpeedDial']
|
2689
|
+
VSparkline: typeof import('vuetify/components')['VSparkline']
|
2696
2690
|
VThemeProvider: typeof import('vuetify/components')['VThemeProvider']
|
2697
|
-
VValidation: typeof import('vuetify/components')['VValidation']
|
2698
2691
|
VVirtualScroll: typeof import('vuetify/components')['VVirtualScroll']
|
2692
|
+
VValidation: typeof import('vuetify/components')['VValidation']
|
2699
2693
|
VFabTransition: typeof import('vuetify/components')['VFabTransition']
|
2700
2694
|
VDialogBottomTransition: typeof import('vuetify/components')['VDialogBottomTransition']
|
2701
2695
|
VDialogTopTransition: typeof import('vuetify/components')['VDialogTopTransition']
|
@@ -2712,8 +2706,10 @@ declare module 'vue' {
|
|
2712
2706
|
VExpandTransition: typeof import('vuetify/components')['VExpandTransition']
|
2713
2707
|
VExpandXTransition: typeof import('vuetify/components')['VExpandXTransition']
|
2714
2708
|
VDialogTransition: typeof import('vuetify/components')['VDialogTransition']
|
2715
|
-
|
2716
|
-
|
2709
|
+
VContainer: typeof import('vuetify/components')['VContainer']
|
2710
|
+
VCol: typeof import('vuetify/components')['VCol']
|
2711
|
+
VRow: typeof import('vuetify/components')['VRow']
|
2712
|
+
VSpacer: typeof import('vuetify/components')['VSpacer']
|
2717
2713
|
VSnackbarQueue: typeof import('vuetify/components')['VSnackbarQueue']
|
2718
2714
|
VCalendar: typeof import('vuetify/labs/components')['VCalendar']
|
2719
2715
|
VCalendarDay: typeof import('vuetify/labs/components')['VCalendarDay']
|
@@ -2721,22 +2717,22 @@ declare module 'vue' {
|
|
2721
2717
|
VCalendarInterval: typeof import('vuetify/labs/components')['VCalendarInterval']
|
2722
2718
|
VCalendarIntervalEvent: typeof import('vuetify/labs/components')['VCalendarIntervalEvent']
|
2723
2719
|
VCalendarMonthDay: typeof import('vuetify/labs/components')['VCalendarMonthDay']
|
2724
|
-
|
2725
|
-
|
2720
|
+
VFileUpload: typeof import('vuetify/labs/components')['VFileUpload']
|
2721
|
+
VFileUploadItem: typeof import('vuetify/labs/components')['VFileUploadItem']
|
2726
2722
|
VIconBtn: typeof import('vuetify/labs/components')['VIconBtn']
|
2723
|
+
VColorInput: typeof import('vuetify/labs/components')['VColorInput']
|
2727
2724
|
VStepperVertical: typeof import('vuetify/labs/components')['VStepperVertical']
|
2728
2725
|
VStepperVerticalItem: typeof import('vuetify/labs/components')['VStepperVerticalItem']
|
2729
2726
|
VStepperVerticalActions: typeof import('vuetify/labs/components')['VStepperVerticalActions']
|
2727
|
+
VPicker: typeof import('vuetify/labs/components')['VPicker']
|
2728
|
+
VPickerTitle: typeof import('vuetify/labs/components')['VPickerTitle']
|
2730
2729
|
VTreeview: typeof import('vuetify/labs/components')['VTreeview']
|
2731
2730
|
VTreeviewItem: typeof import('vuetify/labs/components')['VTreeviewItem']
|
2732
2731
|
VTreeviewGroup: typeof import('vuetify/labs/components')['VTreeviewGroup']
|
2733
|
-
VColorInput: typeof import('vuetify/labs/components')['VColorInput']
|
2734
|
-
VFileUpload: typeof import('vuetify/labs/components')['VFileUpload']
|
2735
|
-
VFileUploadItem: typeof import('vuetify/labs/components')['VFileUploadItem']
|
2736
2732
|
VTimePicker: typeof import('vuetify/labs/components')['VTimePicker']
|
2737
2733
|
VTimePickerClock: typeof import('vuetify/labs/components')['VTimePickerClock']
|
2738
2734
|
VTimePickerControls: typeof import('vuetify/labs/components')['VTimePickerControls']
|
2739
|
-
VPullToRefresh: typeof import('vuetify/labs/components')['VPullToRefresh']
|
2740
2735
|
VDateInput: typeof import('vuetify/labs/components')['VDateInput']
|
2736
|
+
VPullToRefresh: typeof import('vuetify/labs/components')['VPullToRefresh']
|
2741
2737
|
}
|
2742
2738
|
}
|
package/lib/framework.js
CHANGED
@@ -8,7 +8,7 @@ import { makeVConfirmEditProps, VConfirmEdit } from "../../components/VConfirmEd
|
|
8
8
|
import { VIcon } from "../../components/VIcon/VIcon.js";
|
9
9
|
import { VMenu } from "../../components/VMenu/VMenu.js";
|
10
10
|
import { makeVTextFieldProps, VTextField } from "../../components/VTextField/VTextField.js"; // Composables
|
11
|
-
import { makeFocusProps
|
11
|
+
import { makeFocusProps } from "../../composables/focus.js";
|
12
12
|
import { useProxiedModel } from "../../composables/proxiedModel.js"; // Utilities
|
13
13
|
import { computed, shallowRef } from 'vue';
|
14
14
|
import { genericComponent, omit, propsFactory, useRender } from "../../util/index.js"; // Types
|
@@ -33,13 +33,9 @@ export const VColorInput = genericComponent()({
|
|
33
33
|
let {
|
34
34
|
slots
|
35
35
|
} = _ref;
|
36
|
-
const {
|
37
|
-
isFocused,
|
38
|
-
focus,
|
39
|
-
blur
|
40
|
-
} = useFocus(props);
|
41
36
|
const model = useProxiedModel(props, 'modelValue');
|
42
37
|
const menu = shallowRef(false);
|
38
|
+
const isFocused = shallowRef(props.focused);
|
43
39
|
const isInteractive = computed(() => !props.disabled && !props.readonly);
|
44
40
|
const display = computed(() => model.value || null);
|
45
41
|
function onKeydown(e) {
|
@@ -70,10 +66,9 @@ export const VColorInput = genericComponent()({
|
|
70
66
|
"modelValue": display.value,
|
71
67
|
"onKeydown": isInteractive.value ? onKeydown : undefined,
|
72
68
|
"focused": menu.value || isFocused.value,
|
73
|
-
"onFocus": focus,
|
74
|
-
"onBlur": blur,
|
75
69
|
"onClick:control": isInteractive.value ? onClick : undefined,
|
76
70
|
"onClick:prependInner": isInteractive.value ? onClick : undefined,
|
71
|
+
"onUpdate:focused": event => isFocused.value = event,
|
77
72
|
"onClick:appendInner": isInteractive.value ? onClick : undefined,
|
78
73
|
"onUpdate:modelValue": val => {
|
79
74
|
model.value = val;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"VColorInput.js","names":["makeVColorPickerProps","VColorPicker","makeVConfirmEditProps","VConfirmEdit","VIcon","VMenu","makeVTextFieldProps","VTextField","makeFocusProps","useFocus","useProxiedModel","computed","shallowRef","genericComponent","omit","propsFactory","useRender","makeVColorInputProps","pip","Boolean","pipIcon","type","String","default","VColorInput","name","props","emits","val","setup","_ref","slots","isFocused","focus","blur","model","menu","isInteractive","disabled","readonly","display","value","onKeydown","e","key","target","onClick","preventDefault","stopPropagation","onSave","confirmEditProps","filterProps","colorPickerProps","textFieldProps","hasPrepend","prepend","_createVNode","_mergeProps","class","style","undefined","arg","_createElementVNode","_Fragment","$event","_ref2","actions","proxyModel","save","cancel","isPristine","hideActions"],"sources":["../../../src/labs/VColorInput/VColorInput.tsx"],"sourcesContent":["// Styles\nimport './VColorInput.sass'\n\n// Components\nimport { makeVColorPickerProps, VColorPicker } from '@/components/VColorPicker/VColorPicker'\nimport { makeVConfirmEditProps, VConfirmEdit } from '@/components/VConfirmEdit/VConfirmEdit'\nimport { VIcon } from '@/components/VIcon/VIcon'\nimport { VMenu } from '@/components/VMenu/VMenu'\nimport { makeVTextFieldProps, VTextField } from '@/components/VTextField/VTextField'\n\n// Composables\nimport { makeFocusProps, useFocus } from '@/composables/focus'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, shallowRef } from 'vue'\nimport { genericComponent, omit, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { VTextFieldSlots } from '@/components/VTextField/VTextField'\n\nexport type VColorInputActionsSlot = {\n save: () => void\n cancel: () => void\n isPristine: boolean\n}\n\nexport type VColorInputSlots = Omit<VTextFieldSlots, 'default'> & {\n actions: VColorInputActionsSlot\n default: never\n}\n\nexport const makeVColorInputProps = propsFactory({\n pip: Boolean,\n pipIcon: {\n type: String,\n default: '$color',\n },\n\n ...makeFocusProps(),\n ...makeVConfirmEditProps(),\n ...makeVTextFieldProps(),\n ...omit(makeVColorPickerProps(), ['width']),\n}, 'VColorInput')\n\nexport const VColorInput = genericComponent<VColorInputSlots>()({\n name: 'VColorInput',\n\n props: makeVColorInputProps(),\n\n emits: {\n 'update:modelValue': (val: string) => true,\n },\n\n setup (props, { slots }) {\n const { isFocused, focus, blur } = useFocus(props)\n const model = useProxiedModel(props, 'modelValue')\n const menu = shallowRef(false)\n\n const isInteractive = computed(() => !props.disabled && !props.readonly)\n\n const display = computed(() => model.value || null)\n\n function onKeydown (e: KeyboardEvent) {\n if (e.key !== 'Enter') return\n\n if (!menu.value || !isFocused.value) {\n menu.value = true\n\n return\n }\n\n const target = e.target as HTMLInputElement\n\n model.value = target.value\n }\n\n function onClick (e: MouseEvent) {\n e.preventDefault()\n e.stopPropagation()\n\n menu.value = true\n }\n\n function onSave () {\n menu.value = false\n }\n\n useRender(() => {\n const confirmEditProps = VConfirmEdit.filterProps(props)\n const colorPickerProps = VColorPicker.filterProps(omit(props, ['active', 'color']))\n const textFieldProps = VTextField.filterProps(omit(props, ['prependInnerIcon']))\n\n const hasPrepend = !!(slots.prepend || props.pipIcon)\n\n return (\n <VTextField\n { ...textFieldProps }\n class={[\n 'v-color-input',\n props.class,\n ]}\n style={ props.style }\n modelValue={ display.value }\n onKeydown={ isInteractive.value ? onKeydown : undefined }\n focused={ menu.value || isFocused.value }\n onFocus={ focus }\n onBlur={ blur }\n onClick:control={ isInteractive.value ? onClick : undefined }\n onClick:prependInner={ isInteractive.value ? onClick : undefined }\n onClick:appendInner={ isInteractive.value ? onClick : undefined }\n onUpdate:modelValue={ val => {\n model.value = val\n }}\n >\n {{\n ...slots,\n prepend: props.pipIcon ? arg => (\n <>\n { hasPrepend && (\n <VIcon\n color={ props.pip ? model.value as string : undefined }\n icon={ props.pipIcon }\n />\n )}\n\n { slots.prepend?.(arg) }\n </>\n ) : undefined,\n default: () => (\n <>\n <VMenu\n v-model={ menu.value }\n activator=\"parent\"\n min-width=\"0\"\n closeOnContentClick={ false }\n openOnClick={ false }\n >\n <VConfirmEdit\n { ...confirmEditProps }\n v-model={ model.value }\n onSave={ onSave }\n >\n {{\n default: ({ actions, model: proxyModel, save, cancel, isPristine }) => {\n return (\n <VColorPicker\n { ...colorPickerProps }\n modelValue={ proxyModel.value }\n onUpdate:modelValue={ val => {\n proxyModel.value = val\n model.value = val\n }}\n onMousedown={ (e: MouseEvent) => e.preventDefault() }\n >\n {{\n actions: !props.hideActions ? () => slots.actions?.({ save, cancel, isPristine }) ?? actions() : undefined,\n }}\n </VColorPicker>\n )\n },\n }}\n </VConfirmEdit>\n </VMenu>\n\n { slots.default?.() }\n </>\n ),\n }}\n </VTextField>\n )\n })\n },\n})\n\nexport type VColorInput = InstanceType<typeof VColorInput>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,qBAAqB,EAAEC,YAAY;AAAA,SACnCC,qBAAqB,EAAEC,YAAY;AAAA,SACnCC,KAAK;AAAA,SACLC,KAAK;AAAA,SACLC,mBAAmB,EAAEC,UAAU,qDAExC;AAAA,SACSC,cAAc,EAAEC,QAAQ;AAAA,SACxBC,eAAe,6CAExB;AACA,SAASC,QAAQ,EAAEC,UAAU,QAAQ,KAAK;AAAA,SACjCC,gBAAgB,EAAEC,IAAI,EAAEC,YAAY,EAAEC,SAAS,+BAExD;AAcA,OAAO,MAAMC,oBAAoB,GAAGF,YAAY,CAAC;EAC/CG,GAAG,EAAEC,OAAO;EACZC,OAAO,EAAE;IACPC,IAAI,EAAEC,MAAM;IACZC,OAAO,EAAE;EACX,CAAC;EAED,GAAGf,cAAc,CAAC,CAAC;EACnB,GAAGN,qBAAqB,CAAC,CAAC;EAC1B,GAAGI,mBAAmB,CAAC,CAAC;EACxB,GAAGQ,IAAI,CAACd,qBAAqB,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC;AAC5C,CAAC,EAAE,aAAa,CAAC;AAEjB,OAAO,MAAMwB,WAAW,GAAGX,gBAAgB,CAAmB,CAAC,CAAC;EAC9DY,IAAI,EAAE,aAAa;EAEnBC,KAAK,EAAET,oBAAoB,CAAC,CAAC;EAE7BU,KAAK,EAAE;IACL,mBAAmB,EAAGC,GAAW,IAAK;EACxC,CAAC;EAEDC,KAAKA,CAAEH,KAAK,EAAAI,IAAA,EAAa;IAAA,IAAX;MAAEC;IAAM,CAAC,GAAAD,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ACK,KAAK,GAAAuB,MAAA;UAAA;UAAA;UAAA,uBAGE,KAAK;UAAA,eACb;QAAK;UAAAzC,OAAA,EAAAA,CAAA,MAAAiC,YAAA,CAAArD,YAAA,EAAAsD,WAAA,CAGZP,gBAAgB;YAAA,cACXf,KAAK,CAACM,KAAK;YAAA,uBAAAuB,MAAA,IAAX7B,KAAK,CAACM,KAAK,GAAAuB,MAAA;YAAA,UACZf;UAAM;YAGb1B,OAAO,EAAE0C,KAAA,IAA8D;cAAA,IAA7D;gBAAEC,OAAO;gBAAE/B,KAAK,EAAEgC,UAAU;gBAAEC,IAAI;gBAAEC,MAAM;gBAAEC;cAAW,CAAC,GAAAL,KAAA;cAChE,OAAAT,YAAA,CAAAvD,YAAA,EAAAwD,WAAA,CAESL,gBAAgB;gBAAA,cACRe,UAAU,CAAC1B,KAAK;gBAAA,uBACPb,GAAG,IAAI;kBAC3BuC,UAAU,CAAC1B,KAAK,GAAGb,GAAG;kBACtBO,KAAK,CAACM,KAAK,GAAGb,GAAG;gBACnB,CAAC;gBAAA,eACce,CAAa,IAAKA,CAAC,CAACI,cAAc,CAAC;cAAC;gBAGjDmB,OAAO,EAAE,CAACxC,KAAK,CAAC6C,WAAW,GAAG,MAAMxC,KAAK,CAACmC,OAAO,GAAG;kBAAEE,IAAI;kBAAEC,MAAM;kBAAEC;gBAAW,CAAC,CAAC,IAAIJ,OAAO,CAAC,CAAC,GAAGN;cAAS;YAIlH;UAAC;QAAA,IAKL7B,KAAK,CAACR,OAAO,GAAG,CAAC;MAEtB;IAIT,CAAC,CAAC;EACJ;AACF,CAAC,CAAC","ignoreList":[]}
|
1
|
+
{"version":3,"file":"VColorInput.js","names":["makeVColorPickerProps","VColorPicker","makeVConfirmEditProps","VConfirmEdit","VIcon","VMenu","makeVTextFieldProps","VTextField","makeFocusProps","useProxiedModel","computed","shallowRef","genericComponent","omit","propsFactory","useRender","makeVColorInputProps","pip","Boolean","pipIcon","type","String","default","VColorInput","name","props","emits","val","setup","_ref","slots","model","menu","isFocused","focused","isInteractive","disabled","readonly","display","value","onKeydown","e","key","target","onClick","preventDefault","stopPropagation","onSave","confirmEditProps","filterProps","colorPickerProps","textFieldProps","hasPrepend","prepend","_createVNode","_mergeProps","class","style","undefined","event","arg","_createElementVNode","_Fragment","$event","_ref2","actions","proxyModel","save","cancel","isPristine","hideActions"],"sources":["../../../src/labs/VColorInput/VColorInput.tsx"],"sourcesContent":["// Styles\nimport './VColorInput.sass'\n\n// Components\nimport { makeVColorPickerProps, VColorPicker } from '@/components/VColorPicker/VColorPicker'\nimport { makeVConfirmEditProps, VConfirmEdit } from '@/components/VConfirmEdit/VConfirmEdit'\nimport { VIcon } from '@/components/VIcon/VIcon'\nimport { VMenu } from '@/components/VMenu/VMenu'\nimport { makeVTextFieldProps, VTextField } from '@/components/VTextField/VTextField'\n\n// Composables\nimport { makeFocusProps } from '@/composables/focus'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, shallowRef } from 'vue'\nimport { genericComponent, omit, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { VTextFieldSlots } from '@/components/VTextField/VTextField'\n\nexport type VColorInputActionsSlot = {\n save: () => void\n cancel: () => void\n isPristine: boolean\n}\n\nexport type VColorInputSlots = Omit<VTextFieldSlots, 'default'> & {\n actions: VColorInputActionsSlot\n default: never\n}\n\nexport const makeVColorInputProps = propsFactory({\n pip: Boolean,\n pipIcon: {\n type: String,\n default: '$color',\n },\n\n ...makeFocusProps(),\n ...makeVConfirmEditProps(),\n ...makeVTextFieldProps(),\n ...omit(makeVColorPickerProps(), ['width']),\n}, 'VColorInput')\n\nexport const VColorInput = genericComponent<VColorInputSlots>()({\n name: 'VColorInput',\n\n props: makeVColorInputProps(),\n\n emits: {\n 'update:modelValue': (val: string) => true,\n },\n\n setup (props, { slots }) {\n const model = useProxiedModel(props, 'modelValue')\n const menu = shallowRef(false)\n const isFocused = shallowRef(props.focused)\n\n const isInteractive = computed(() => !props.disabled && !props.readonly)\n\n const display = computed(() => model.value || null)\n\n function onKeydown (e: KeyboardEvent) {\n if (e.key !== 'Enter') return\n\n if (!menu.value || !isFocused.value) {\n menu.value = true\n\n return\n }\n\n const target = e.target as HTMLInputElement\n\n model.value = target.value\n }\n\n function onClick (e: MouseEvent) {\n e.preventDefault()\n e.stopPropagation()\n\n menu.value = true\n }\n\n function onSave () {\n menu.value = false\n }\n\n useRender(() => {\n const confirmEditProps = VConfirmEdit.filterProps(props)\n const colorPickerProps = VColorPicker.filterProps(omit(props, ['active', 'color']))\n const textFieldProps = VTextField.filterProps(omit(props, ['prependInnerIcon']))\n\n const hasPrepend = !!(slots.prepend || props.pipIcon)\n\n return (\n <VTextField\n { ...textFieldProps }\n class={[\n 'v-color-input',\n props.class,\n ]}\n style={ props.style }\n modelValue={ display.value }\n onKeydown={ isInteractive.value ? onKeydown : undefined }\n focused={ menu.value || isFocused.value }\n onClick:control={ isInteractive.value ? onClick : undefined }\n onClick:prependInner={ isInteractive.value ? onClick : undefined }\n onUpdate:focused={ event => isFocused.value = event }\n onClick:appendInner={ isInteractive.value ? onClick : undefined }\n onUpdate:modelValue={ val => {\n model.value = val\n }}\n >\n {{\n ...slots,\n prepend: props.pipIcon ? arg => (\n <>\n { hasPrepend && (\n <VIcon\n color={ props.pip ? model.value as string : undefined }\n icon={ props.pipIcon }\n />\n )}\n\n { slots.prepend?.(arg) }\n </>\n ) : undefined,\n default: () => (\n <>\n <VMenu\n v-model={ menu.value }\n activator=\"parent\"\n min-width=\"0\"\n closeOnContentClick={ false }\n openOnClick={ false }\n >\n <VConfirmEdit\n { ...confirmEditProps }\n v-model={ model.value }\n onSave={ onSave }\n >\n {{\n default: ({ actions, model: proxyModel, save, cancel, isPristine }) => {\n return (\n <VColorPicker\n { ...colorPickerProps }\n modelValue={ proxyModel.value }\n onUpdate:modelValue={ val => {\n proxyModel.value = val\n model.value = val\n }}\n onMousedown={ (e: MouseEvent) => e.preventDefault() }\n >\n {{\n actions: !props.hideActions ? () => slots.actions?.({ save, cancel, isPristine }) ?? actions() : undefined,\n }}\n </VColorPicker>\n )\n },\n }}\n </VConfirmEdit>\n </VMenu>\n\n { slots.default?.() }\n </>\n ),\n }}\n </VTextField>\n )\n })\n },\n})\n\nexport type VColorInput = InstanceType<typeof VColorInput>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,qBAAqB,EAAEC,YAAY;AAAA,SACnCC,qBAAqB,EAAEC,YAAY;AAAA,SACnCC,KAAK;AAAA,SACLC,KAAK;AAAA,SACLC,mBAAmB,EAAEC,UAAU,qDAExC;AAAA,SACSC,cAAc;AAAA,SACdC,eAAe,6CAExB;AACA,SAASC,QAAQ,EAAEC,UAAU,QAAQ,KAAK;AAAA,SACjCC,gBAAgB,EAAEC,IAAI,EAAEC,YAAY,EAAEC,SAAS,+BAExD;AAcA,OAAO,MAAMC,oBAAoB,GAAGF,YAAY,CAAC;EAC/CG,GAAG,EAAEC,OAAO;EACZC,OAAO,EAAE;IACPC,IAAI,EAAEC,MAAM;IACZC,OAAO,EAAE;EACX,CAAC;EAED,GAAGd,cAAc,CAAC,CAAC;EACnB,GAAGN,qBAAqB,CAAC,CAAC;EAC1B,GAAGI,mBAAmB,CAAC,CAAC;EACxB,GAAGO,IAAI,CAACb,qBAAqB,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC;AAC5C,CAAC,EAAE,aAAa,CAAC;AAEjB,OAAO,MAAMuB,WAAW,GAAGX,gBAAgB,CAAmB,CAAC,CAAC;EAC9DY,IAAI,EAAE,aAAa;EAEnBC,KAAK,EAAET,oBAAoB,CAAC,CAAC;EAE7BU,KAAK,EAAE;IACL,mBAAmB,EAAGC,GAAW,IAAK;EACxC,CAAC;EAEDC,KAAKA,CAAEH,KAAK,EAAAI,IAAA,EAAa;IAAA,IAAX;MAAEC;IAAM,CAAC,GAAAD,IAAA;IACrB,MAAME,KAAK,GAAGtB,eAAe,CAACgB,KAAK,EAAE,YAAY,CAAC;IAClD,MAAMO,IAAI,GAAG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AAAA,CAAA,MAAAgC,YAAA,CAAAnD,YAAA,EAAAoD,WAAA,CAGZP,gBAAgB;YAAA,cACXjB,KAAK,CAACQ,KAAK;YAAA,uBAAAwB,MAAA,IAAXhC,KAAK,CAACQ,KAAK,GAAAwB,MAAA;YAAA,UACZhB;UAAM;YAGbzB,OAAO,EAAE0C,KAAA,IAA8D;cAAA,IAA7D;gBAAEC,OAAO;gBAAElC,KAAK,EAAEmC,UAAU;gBAAEC,IAAI;gBAAEC,MAAM;gBAAEC;cAAW,CAAC,GAAAL,KAAA;cAChE,OAAAV,YAAA,CAAArD,YAAA,EAAAsD,WAAA,CAESL,gBAAgB;gBAAA,cACRgB,UAAU,CAAC3B,KAAK;gBAAA,uBACPZ,GAAG,IAAI;kBAC3BuC,UAAU,CAAC3B,KAAK,GAAGZ,GAAG;kBACtBI,KAAK,CAACQ,KAAK,GAAGZ,GAAG;gBACnB,CAAC;gBAAA,eACcc,CAAa,IAAKA,CAAC,CAACI,cAAc,CAAC;cAAC;gBAGjDoB,OAAO,EAAE,CAACxC,KAAK,CAAC6C,WAAW,GAAG,MAAMxC,KAAK,CAACmC,OAAO,GAAG;kBAAEE,IAAI;kBAAEC,MAAM;kBAAEC;gBAAW,CAAC,CAAC,IAAIJ,OAAO,CAAC,CAAC,GAAGP;cAAS;YAIlH;UAAC;QAAA,IAKL5B,KAAK,CAACR,OAAO,GAAG,CAAC;MAEtB;IAIT,CAAC,CAAC;EACJ;AACF,CAAC,CAAC","ignoreList":[]}
|
@@ -981,6 +981,7 @@ export declare const VDateInput: {
|
|
981
981
|
"v-slot:default"?: false | (() => import("vue").VNodeChild) | undefined;
|
982
982
|
} & {
|
983
983
|
onCancel?: (() => any) | undefined;
|
984
|
+
"onUpdate:focused"?: ((val: boolean) => any) | undefined;
|
984
985
|
"onUpdate:modelValue"?: ((val: string) => any) | undefined;
|
985
986
|
"onUpdate:menu"?: ((val: boolean) => any) | undefined;
|
986
987
|
onSave?: ((value: string) => any) | undefined;
|
@@ -2925,6 +2926,7 @@ export declare const VDateInput: {
|
|
2925
2926
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
2926
2927
|
save: (value: string) => true;
|
2927
2928
|
cancel: () => true;
|
2929
|
+
'update:focused': (val: boolean) => true;
|
2928
2930
|
'update:modelValue': (val: string) => true;
|
2929
2931
|
'update:menu': (val: boolean) => true;
|
2930
2932
|
}, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, {
|
@@ -3180,6 +3182,7 @@ export declare const VDateInput: {
|
|
3180
3182
|
"v-slot:default"?: false | (() => import("vue").VNodeChild) | undefined;
|
3181
3183
|
} & {
|
3182
3184
|
onCancel?: (() => any) | undefined;
|
3185
|
+
"onUpdate:focused"?: ((val: boolean) => any) | undefined;
|
3183
3186
|
"onUpdate:modelValue"?: ((val: string) => any) | undefined;
|
3184
3187
|
"onUpdate:menu"?: ((val: boolean) => any) | undefined;
|
3185
3188
|
onSave?: ((value: string) => any) | undefined;
|
@@ -5353,6 +5356,7 @@ export declare const VDateInput: {
|
|
5353
5356
|
"v-slot:default"?: false | (() => import("vue").VNodeChild) | undefined;
|
5354
5357
|
} & {
|
5355
5358
|
onCancel?: (() => any) | undefined;
|
5359
|
+
"onUpdate:focused"?: ((val: boolean) => any) | undefined;
|
5356
5360
|
"onUpdate:modelValue"?: ((val: string) => any) | undefined;
|
5357
5361
|
"onUpdate:menu"?: ((val: boolean) => any) | undefined;
|
5358
5362
|
onSave?: ((value: string) => any) | undefined;
|
@@ -7297,6 +7301,7 @@ export declare const VDateInput: {
|
|
7297
7301
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
7298
7302
|
save: (value: string) => true;
|
7299
7303
|
cancel: () => true;
|
7304
|
+
'update:focused': (val: boolean) => true;
|
7300
7305
|
'update:modelValue': (val: string) => true;
|
7301
7306
|
'update:menu': (val: boolean) => true;
|
7302
7307
|
}, string, {
|
@@ -5,9 +5,10 @@ import { makeVDatePickerProps, VDatePicker } from "../../components/VDatePicker/
|
|
5
5
|
import { VMenu } from "../../components/VMenu/VMenu.js";
|
6
6
|
import { makeVTextFieldProps, VTextField } from "../../components/VTextField/VTextField.js"; // Composables
|
7
7
|
import { useDate } from "../../composables/date/index.js";
|
8
|
+
import { createDateRange } from "../../composables/date/date.js";
|
8
9
|
import { makeDateFormatProps, useDateFormat } from "../../composables/dateFormat.js";
|
9
10
|
import { makeDisplayProps, useDisplay } from "../../composables/display.js";
|
10
|
-
import { makeFocusProps
|
11
|
+
import { makeFocusProps } from "../../composables/focus.js";
|
11
12
|
import { forwardRefs } from "../../composables/forwardRefs.js";
|
12
13
|
import { useLocale } from "../../composables/locale.js";
|
13
14
|
import { useProxiedModel } from "../../composables/proxiedModel.js"; // Utilities
|
@@ -47,6 +48,7 @@ export const VDateInput = genericComponent()({
|
|
47
48
|
emits: {
|
48
49
|
save: value => true,
|
49
50
|
cancel: () => true,
|
51
|
+
'update:focused': val => true,
|
50
52
|
'update:modelValue': val => true,
|
51
53
|
'update:menu': val => true
|
52
54
|
},
|
@@ -69,15 +71,11 @@ export const VDateInput = genericComponent()({
|
|
69
71
|
const {
|
70
72
|
mobile
|
71
73
|
} = useDisplay(props);
|
72
|
-
const {
|
73
|
-
isFocused,
|
74
|
-
focus,
|
75
|
-
blur
|
76
|
-
} = useFocus(props);
|
77
74
|
const emptyModelValue = () => props.multiple ? [] : null;
|
78
75
|
const model = useProxiedModel(props, 'modelValue', emptyModelValue(), val => Array.isArray(val) ? val.map(item => adapter.toJsDate(item)) : val ? adapter.toJsDate(val) : val, val => Array.isArray(val) ? val.map(item => adapter.date(item)) : val ? adapter.date(val) : val);
|
79
76
|
const menu = useProxiedModel(props, 'menu');
|
80
77
|
const isEditingInput = shallowRef(false);
|
78
|
+
const isFocused = shallowRef(props.focused);
|
81
79
|
const vTextFieldRef = ref();
|
82
80
|
const disabledActions = ref(['save']);
|
83
81
|
function format(date) {
|
@@ -153,7 +151,6 @@ export const VDateInput = genericComponent()({
|
|
153
151
|
if (props.updateOn.includes('blur')) {
|
154
152
|
onUserInput(e.target);
|
155
153
|
}
|
156
|
-
blur();
|
157
154
|
|
158
155
|
// When in mobile mode and editing is done (due to keyboard dismissal), close the menu
|
159
156
|
if (mobile.value && isEditingInput.value && !isFocused.value) {
|
@@ -176,7 +173,7 @@ export const VDateInput = genericComponent()({
|
|
176
173
|
if (parts.every(isValid)) {
|
177
174
|
if (props.multiple === 'range') {
|
178
175
|
const [start, stop] = parts.map(parseDate).toSorted((a, b) => adapter.isAfter(a, b) ? 1 : -1);
|
179
|
-
model.value =
|
176
|
+
model.value = createDateRange(adapter, start, stop);
|
180
177
|
} else {
|
181
178
|
model.value = parts.map(parseDate);
|
182
179
|
}
|
@@ -198,12 +195,12 @@ export const VDateInput = genericComponent()({
|
|
198
195
|
"readonly": isReadonly.value,
|
199
196
|
"onKeydown": isInteractive.value ? onKeydown : undefined,
|
200
197
|
"focused": menu.value || isFocused.value,
|
201
|
-
"onFocus": focus,
|
202
198
|
"onBlur": onBlur,
|
203
199
|
"validationValue": model.value,
|
204
200
|
"onClick:control": isInteractive.value ? onClick : undefined,
|
205
201
|
"onClick:prepend": isInteractive.value ? onClick : undefined,
|
206
|
-
"onUpdate:modelValue": onUpdateDisplayModel
|
202
|
+
"onUpdate:modelValue": onUpdateDisplayModel,
|
203
|
+
"onUpdate:focused": event => isFocused.value = event
|
207
204
|
}), {
|
208
205
|
...slots,
|
209
206
|
default: () => _createElementVNode(_Fragment, null, [_createVNode(VMenu, {
|