@vuetify/nightly 3.6.3-master.2024-05-06 → 3.6.3-master.2024-05-07
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 -2
- package/dist/json/attributes.json +148 -8
- package/dist/json/importMap-labs.json +4 -4
- package/dist/json/importMap.json +112 -112
- package/dist/json/tags.json +36 -1
- package/dist/json/web-types.json +433 -23
- package/dist/vuetify-labs.css +1744 -1744
- package/dist/vuetify-labs.d.ts +631 -317
- package/dist/vuetify-labs.esm.js +65 -89
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +65 -89
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +4507 -4507
- package/dist/vuetify.d.ts +273 -315
- package/dist/vuetify.esm.js +12 -14
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +12 -14
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +11 -11
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.mjs +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
- package/lib/components/VAutocomplete/index.d.mts +18 -18
- package/lib/components/VBottomSheet/index.d.mts +9 -15
- package/lib/components/VCarousel/index.d.mts +6 -6
- package/lib/components/VCombobox/index.d.mts +18 -18
- package/lib/components/VDialog/index.d.mts +27 -33
- package/lib/components/VFileInput/VFileInput.mjs +1 -1
- package/lib/components/VFileInput/VFileInput.mjs.map +1 -1
- package/lib/components/VFileInput/index.d.mts +9 -9
- package/lib/components/VImg/index.d.mts +6 -6
- package/lib/components/VList/VListItem.mjs +3 -2
- package/lib/components/VList/VListItem.mjs.map +1 -1
- package/lib/components/VList/index.d.mts +6 -6
- package/lib/components/VMenu/index.d.mts +27 -33
- package/lib/components/VOverlay/VOverlay.mjs +2 -5
- package/lib/components/VOverlay/VOverlay.mjs.map +1 -1
- package/lib/components/VOverlay/index.d.mts +9 -15
- package/lib/components/VResponsive/VResponsive.mjs +1 -1
- package/lib/components/VResponsive/VResponsive.mjs.map +1 -1
- package/lib/components/VResponsive/index.d.mts +6 -6
- package/lib/components/VSelect/index.d.mts +18 -18
- package/lib/components/VSlideGroup/VSlideGroup.mjs.map +1 -1
- package/lib/components/VSnackbar/VSnackbar.mjs.map +1 -1
- package/lib/components/VSnackbar/index.d.mts +41 -47
- package/lib/components/VSpeedDial/index.d.mts +9 -15
- package/lib/components/VTooltip/index.d.mts +27 -33
- package/lib/components/index.d.mts +236 -278
- package/lib/composables/component.mjs +1 -1
- package/lib/composables/component.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/framework.mjs +1 -1
- package/lib/index.d.mts +37 -37
- package/lib/labs/VNumberInput/VNumberInput.mjs +57 -81
- package/lib/labs/VNumberInput/VNumberInput.mjs.map +1 -1
- package/lib/labs/VNumberInput/index.d.mts +402 -34
- package/lib/labs/VSnackbarQueue/index.d.mts +41 -47
- package/lib/labs/VTreeview/index.d.mts +6 -6
- package/lib/labs/components.d.mts +442 -86
- package/package.json +2 -2
@@ -638,7 +638,7 @@ declare const VCombobox: {
|
|
638
638
|
component: vue.Component;
|
639
639
|
};
|
640
640
|
zIndex: string | number;
|
641
|
-
modelValue: boolean
|
641
|
+
modelValue: boolean;
|
642
642
|
origin: Anchor | "auto" | "overlap";
|
643
643
|
eager: boolean;
|
644
644
|
location: Anchor;
|
@@ -667,7 +667,7 @@ declare const VCombobox: {
|
|
667
667
|
component: vue.Component;
|
668
668
|
};
|
669
669
|
zIndex: string | number;
|
670
|
-
modelValue: boolean
|
670
|
+
modelValue: boolean;
|
671
671
|
origin: Anchor | "auto" | "overlap";
|
672
672
|
eager: boolean;
|
673
673
|
location: Anchor;
|
@@ -743,7 +743,7 @@ declare const VCombobox: {
|
|
743
743
|
component: vue.Component;
|
744
744
|
};
|
745
745
|
zIndex: string | number;
|
746
|
-
modelValue: boolean
|
746
|
+
modelValue: boolean;
|
747
747
|
origin: Anchor | "auto" | "overlap";
|
748
748
|
eager: boolean;
|
749
749
|
location: Anchor;
|
@@ -1218,7 +1218,7 @@ declare const VCombobox: {
|
|
1218
1218
|
component: vue.Component;
|
1219
1219
|
};
|
1220
1220
|
zIndex: string | number;
|
1221
|
-
modelValue: boolean
|
1221
|
+
modelValue: boolean;
|
1222
1222
|
origin: Anchor | "auto" | "overlap";
|
1223
1223
|
eager: boolean;
|
1224
1224
|
location: Anchor;
|
@@ -1247,7 +1247,7 @@ declare const VCombobox: {
|
|
1247
1247
|
component: vue.Component;
|
1248
1248
|
};
|
1249
1249
|
zIndex: string | number;
|
1250
|
-
modelValue: boolean
|
1250
|
+
modelValue: boolean;
|
1251
1251
|
origin: Anchor | "auto" | "overlap";
|
1252
1252
|
eager: boolean;
|
1253
1253
|
location: Anchor;
|
@@ -1323,7 +1323,7 @@ declare const VCombobox: {
|
|
1323
1323
|
component: vue.Component;
|
1324
1324
|
};
|
1325
1325
|
zIndex: string | number;
|
1326
|
-
modelValue: boolean
|
1326
|
+
modelValue: boolean;
|
1327
1327
|
origin: Anchor | "auto" | "overlap";
|
1328
1328
|
eager: boolean;
|
1329
1329
|
location: Anchor;
|
@@ -1912,7 +1912,7 @@ declare const VCombobox: {
|
|
1912
1912
|
component: vue.Component;
|
1913
1913
|
};
|
1914
1914
|
zIndex: string | number;
|
1915
|
-
modelValue: boolean
|
1915
|
+
modelValue: boolean;
|
1916
1916
|
origin: Anchor | "auto" | "overlap";
|
1917
1917
|
eager: boolean;
|
1918
1918
|
location: Anchor;
|
@@ -1941,7 +1941,7 @@ declare const VCombobox: {
|
|
1941
1941
|
component: vue.Component;
|
1942
1942
|
};
|
1943
1943
|
zIndex: string | number;
|
1944
|
-
modelValue: boolean
|
1944
|
+
modelValue: boolean;
|
1945
1945
|
origin: Anchor | "auto" | "overlap";
|
1946
1946
|
eager: boolean;
|
1947
1947
|
location: Anchor;
|
@@ -2017,7 +2017,7 @@ declare const VCombobox: {
|
|
2017
2017
|
component: vue.Component;
|
2018
2018
|
};
|
2019
2019
|
zIndex: string | number;
|
2020
|
-
modelValue: boolean
|
2020
|
+
modelValue: boolean;
|
2021
2021
|
origin: Anchor | "auto" | "overlap";
|
2022
2022
|
eager: boolean;
|
2023
2023
|
location: Anchor;
|
@@ -2541,7 +2541,7 @@ declare const VCombobox: {
|
|
2541
2541
|
component: vue.Component;
|
2542
2542
|
};
|
2543
2543
|
zIndex: string | number;
|
2544
|
-
modelValue: boolean
|
2544
|
+
modelValue: boolean;
|
2545
2545
|
origin: Anchor | "auto" | "overlap";
|
2546
2546
|
eager: boolean;
|
2547
2547
|
location: Anchor;
|
@@ -2570,7 +2570,7 @@ declare const VCombobox: {
|
|
2570
2570
|
component: vue.Component;
|
2571
2571
|
};
|
2572
2572
|
zIndex: string | number;
|
2573
|
-
modelValue: boolean
|
2573
|
+
modelValue: boolean;
|
2574
2574
|
origin: Anchor | "auto" | "overlap";
|
2575
2575
|
eager: boolean;
|
2576
2576
|
location: Anchor;
|
@@ -2646,7 +2646,7 @@ declare const VCombobox: {
|
|
2646
2646
|
component: vue.Component;
|
2647
2647
|
};
|
2648
2648
|
zIndex: string | number;
|
2649
|
-
modelValue: boolean
|
2649
|
+
modelValue: boolean;
|
2650
2650
|
origin: Anchor | "auto" | "overlap";
|
2651
2651
|
eager: boolean;
|
2652
2652
|
location: Anchor;
|
@@ -3384,7 +3384,7 @@ declare const VCombobox: {
|
|
3384
3384
|
component: vue.Component;
|
3385
3385
|
};
|
3386
3386
|
zIndex: string | number;
|
3387
|
-
modelValue: boolean
|
3387
|
+
modelValue: boolean;
|
3388
3388
|
origin: Anchor | "auto" | "overlap";
|
3389
3389
|
eager: boolean;
|
3390
3390
|
location: Anchor;
|
@@ -3413,7 +3413,7 @@ declare const VCombobox: {
|
|
3413
3413
|
component: vue.Component;
|
3414
3414
|
};
|
3415
3415
|
zIndex: string | number;
|
3416
|
-
modelValue: boolean
|
3416
|
+
modelValue: boolean;
|
3417
3417
|
origin: Anchor | "auto" | "overlap";
|
3418
3418
|
eager: boolean;
|
3419
3419
|
location: Anchor;
|
@@ -3489,7 +3489,7 @@ declare const VCombobox: {
|
|
3489
3489
|
component: vue.Component;
|
3490
3490
|
};
|
3491
3491
|
zIndex: string | number;
|
3492
|
-
modelValue: boolean
|
3492
|
+
modelValue: boolean;
|
3493
3493
|
origin: Anchor | "auto" | "overlap";
|
3494
3494
|
eager: boolean;
|
3495
3495
|
location: Anchor;
|
@@ -4077,7 +4077,7 @@ declare const VCombobox: {
|
|
4077
4077
|
component: vue.Component;
|
4078
4078
|
};
|
4079
4079
|
zIndex: string | number;
|
4080
|
-
modelValue: boolean
|
4080
|
+
modelValue: boolean;
|
4081
4081
|
origin: Anchor | "auto" | "overlap";
|
4082
4082
|
eager: boolean;
|
4083
4083
|
location: Anchor;
|
@@ -4106,7 +4106,7 @@ declare const VCombobox: {
|
|
4106
4106
|
component: vue.Component;
|
4107
4107
|
};
|
4108
4108
|
zIndex: string | number;
|
4109
|
-
modelValue: boolean
|
4109
|
+
modelValue: boolean;
|
4110
4110
|
origin: Anchor | "auto" | "overlap";
|
4111
4111
|
eager: boolean;
|
4112
4112
|
location: Anchor;
|
@@ -4182,7 +4182,7 @@ declare const VCombobox: {
|
|
4182
4182
|
component: vue.Component;
|
4183
4183
|
};
|
4184
4184
|
zIndex: string | number;
|
4185
|
-
modelValue: boolean
|
4185
|
+
modelValue: boolean;
|
4186
4186
|
origin: Anchor | "auto" | "overlap";
|
4187
4187
|
eager: boolean;
|
4188
4188
|
location: Anchor;
|
@@ -95,7 +95,7 @@ declare const VDialog: {
|
|
95
95
|
component: Component;
|
96
96
|
};
|
97
97
|
zIndex: NonNullable<string | number>;
|
98
|
-
modelValue: boolean
|
98
|
+
modelValue: boolean;
|
99
99
|
origin: NonNullable<Anchor | "auto" | "overlap">;
|
100
100
|
eager: boolean;
|
101
101
|
location: Anchor;
|
@@ -180,7 +180,7 @@ declare const VDialog: {
|
|
180
180
|
component?: Component | undefined;
|
181
181
|
});
|
182
182
|
zIndex: string | number;
|
183
|
-
modelValue: boolean
|
183
|
+
modelValue: boolean;
|
184
184
|
origin: Anchor | "auto" | "overlap";
|
185
185
|
eager: boolean;
|
186
186
|
location: Anchor;
|
@@ -207,7 +207,7 @@ declare const VDialog: {
|
|
207
207
|
component?: Component | undefined;
|
208
208
|
});
|
209
209
|
zIndex: string | number;
|
210
|
-
modelValue: boolean
|
210
|
+
modelValue: boolean;
|
211
211
|
origin: Anchor | "auto" | "overlap";
|
212
212
|
eager: boolean;
|
213
213
|
location: Anchor;
|
@@ -285,7 +285,7 @@ declare const VDialog: {
|
|
285
285
|
component?: Component | undefined;
|
286
286
|
});
|
287
287
|
zIndex: string | number;
|
288
|
-
modelValue: boolean
|
288
|
+
modelValue: boolean;
|
289
289
|
origin: Anchor | "auto" | "overlap";
|
290
290
|
eager: boolean;
|
291
291
|
location: Anchor;
|
@@ -392,7 +392,7 @@ declare const VDialog: {
|
|
392
392
|
component?: Component | undefined;
|
393
393
|
});
|
394
394
|
zIndex: string | number;
|
395
|
-
modelValue: boolean
|
395
|
+
modelValue: boolean;
|
396
396
|
origin: Anchor | "auto" | "overlap";
|
397
397
|
eager: boolean;
|
398
398
|
location: Anchor;
|
@@ -488,7 +488,7 @@ declare const VDialog: {
|
|
488
488
|
component?: Component | undefined;
|
489
489
|
});
|
490
490
|
zIndex: string | number;
|
491
|
-
modelValue: boolean
|
491
|
+
modelValue: boolean;
|
492
492
|
origin: Anchor | "auto" | "overlap";
|
493
493
|
eager: boolean;
|
494
494
|
location: Anchor;
|
@@ -548,7 +548,7 @@ declare const VDialog: {
|
|
548
548
|
component?: Component | undefined;
|
549
549
|
});
|
550
550
|
zIndex: string | number;
|
551
|
-
modelValue: boolean
|
551
|
+
modelValue: boolean;
|
552
552
|
origin: Anchor | "auto" | "overlap";
|
553
553
|
eager: boolean;
|
554
554
|
location: Anchor;
|
@@ -644,7 +644,7 @@ declare const VDialog: {
|
|
644
644
|
component: Component;
|
645
645
|
};
|
646
646
|
zIndex: NonNullable<string | number>;
|
647
|
-
modelValue: boolean
|
647
|
+
modelValue: boolean;
|
648
648
|
origin: NonNullable<Anchor | "auto" | "overlap">;
|
649
649
|
eager: boolean;
|
650
650
|
location: Anchor;
|
@@ -728,7 +728,7 @@ declare const VDialog: {
|
|
728
728
|
component: Component;
|
729
729
|
};
|
730
730
|
zIndex: NonNullable<string | number>;
|
731
|
-
modelValue: boolean
|
731
|
+
modelValue: boolean;
|
732
732
|
origin: NonNullable<Anchor | "auto" | "overlap">;
|
733
733
|
eager: boolean;
|
734
734
|
location: Anchor;
|
@@ -779,7 +779,7 @@ declare const VDialog: {
|
|
779
779
|
component: Component;
|
780
780
|
};
|
781
781
|
zIndex: NonNullable<string | number>;
|
782
|
-
modelValue: boolean
|
782
|
+
modelValue: boolean;
|
783
783
|
origin: NonNullable<Anchor | "auto" | "overlap">;
|
784
784
|
eager: boolean;
|
785
785
|
location: Anchor;
|
@@ -864,7 +864,7 @@ declare const VDialog: {
|
|
864
864
|
component?: Component | undefined;
|
865
865
|
});
|
866
866
|
zIndex: string | number;
|
867
|
-
modelValue: boolean
|
867
|
+
modelValue: boolean;
|
868
868
|
origin: Anchor | "auto" | "overlap";
|
869
869
|
eager: boolean;
|
870
870
|
location: Anchor;
|
@@ -891,7 +891,7 @@ declare const VDialog: {
|
|
891
891
|
component?: Component | undefined;
|
892
892
|
});
|
893
893
|
zIndex: string | number;
|
894
|
-
modelValue: boolean
|
894
|
+
modelValue: boolean;
|
895
895
|
origin: Anchor | "auto" | "overlap";
|
896
896
|
eager: boolean;
|
897
897
|
location: Anchor;
|
@@ -969,7 +969,7 @@ declare const VDialog: {
|
|
969
969
|
component?: Component | undefined;
|
970
970
|
});
|
971
971
|
zIndex: string | number;
|
972
|
-
modelValue: boolean
|
972
|
+
modelValue: boolean;
|
973
973
|
origin: Anchor | "auto" | "overlap";
|
974
974
|
eager: boolean;
|
975
975
|
location: Anchor;
|
@@ -1076,7 +1076,7 @@ declare const VDialog: {
|
|
1076
1076
|
component?: Component | undefined;
|
1077
1077
|
});
|
1078
1078
|
zIndex: string | number;
|
1079
|
-
modelValue: boolean
|
1079
|
+
modelValue: boolean;
|
1080
1080
|
origin: Anchor | "auto" | "overlap";
|
1081
1081
|
eager: boolean;
|
1082
1082
|
location: Anchor;
|
@@ -1172,7 +1172,7 @@ declare const VDialog: {
|
|
1172
1172
|
component?: Component | undefined;
|
1173
1173
|
});
|
1174
1174
|
zIndex: string | number;
|
1175
|
-
modelValue: boolean
|
1175
|
+
modelValue: boolean;
|
1176
1176
|
origin: Anchor | "auto" | "overlap";
|
1177
1177
|
eager: boolean;
|
1178
1178
|
location: Anchor;
|
@@ -1232,7 +1232,7 @@ declare const VDialog: {
|
|
1232
1232
|
component?: Component | undefined;
|
1233
1233
|
});
|
1234
1234
|
zIndex: string | number;
|
1235
|
-
modelValue: boolean
|
1235
|
+
modelValue: boolean;
|
1236
1236
|
origin: Anchor | "auto" | "overlap";
|
1237
1237
|
eager: boolean;
|
1238
1238
|
location: Anchor;
|
@@ -1325,7 +1325,7 @@ declare const VDialog: {
|
|
1325
1325
|
component: Component;
|
1326
1326
|
};
|
1327
1327
|
zIndex: NonNullable<string | number>;
|
1328
|
-
modelValue: boolean
|
1328
|
+
modelValue: boolean;
|
1329
1329
|
origin: NonNullable<Anchor | "auto" | "overlap">;
|
1330
1330
|
eager: boolean;
|
1331
1331
|
location: Anchor;
|
@@ -1360,7 +1360,7 @@ declare const VDialog: {
|
|
1360
1360
|
component: Component;
|
1361
1361
|
};
|
1362
1362
|
zIndex: NonNullable<string | number>;
|
1363
|
-
modelValue: boolean
|
1363
|
+
modelValue: boolean;
|
1364
1364
|
origin: NonNullable<Anchor | "auto" | "overlap">;
|
1365
1365
|
eager: boolean;
|
1366
1366
|
location: Anchor;
|
@@ -1445,7 +1445,7 @@ declare const VDialog: {
|
|
1445
1445
|
component?: Component | undefined;
|
1446
1446
|
});
|
1447
1447
|
zIndex: string | number;
|
1448
|
-
modelValue: boolean
|
1448
|
+
modelValue: boolean;
|
1449
1449
|
origin: Anchor | "auto" | "overlap";
|
1450
1450
|
eager: boolean;
|
1451
1451
|
location: Anchor;
|
@@ -1472,7 +1472,7 @@ declare const VDialog: {
|
|
1472
1472
|
component?: Component | undefined;
|
1473
1473
|
});
|
1474
1474
|
zIndex: string | number;
|
1475
|
-
modelValue: boolean
|
1475
|
+
modelValue: boolean;
|
1476
1476
|
origin: Anchor | "auto" | "overlap";
|
1477
1477
|
eager: boolean;
|
1478
1478
|
location: Anchor;
|
@@ -1550,7 +1550,7 @@ declare const VDialog: {
|
|
1550
1550
|
component?: Component | undefined;
|
1551
1551
|
});
|
1552
1552
|
zIndex: string | number;
|
1553
|
-
modelValue: boolean
|
1553
|
+
modelValue: boolean;
|
1554
1554
|
origin: Anchor | "auto" | "overlap";
|
1555
1555
|
eager: boolean;
|
1556
1556
|
location: Anchor;
|
@@ -1657,7 +1657,7 @@ declare const VDialog: {
|
|
1657
1657
|
component?: Component | undefined;
|
1658
1658
|
});
|
1659
1659
|
zIndex: string | number;
|
1660
|
-
modelValue: boolean
|
1660
|
+
modelValue: boolean;
|
1661
1661
|
origin: Anchor | "auto" | "overlap";
|
1662
1662
|
eager: boolean;
|
1663
1663
|
location: Anchor;
|
@@ -1753,7 +1753,7 @@ declare const VDialog: {
|
|
1753
1753
|
component?: Component | undefined;
|
1754
1754
|
});
|
1755
1755
|
zIndex: string | number;
|
1756
|
-
modelValue: boolean
|
1756
|
+
modelValue: boolean;
|
1757
1757
|
origin: Anchor | "auto" | "overlap";
|
1758
1758
|
eager: boolean;
|
1759
1759
|
location: Anchor;
|
@@ -1813,7 +1813,7 @@ declare const VDialog: {
|
|
1813
1813
|
component?: Component | undefined;
|
1814
1814
|
});
|
1815
1815
|
zIndex: string | number;
|
1816
|
-
modelValue: boolean
|
1816
|
+
modelValue: boolean;
|
1817
1817
|
origin: Anchor | "auto" | "overlap";
|
1818
1818
|
eager: boolean;
|
1819
1819
|
location: Anchor;
|
@@ -1909,7 +1909,7 @@ declare const VDialog: {
|
|
1909
1909
|
component: Component;
|
1910
1910
|
};
|
1911
1911
|
zIndex: NonNullable<string | number>;
|
1912
|
-
modelValue: boolean
|
1912
|
+
modelValue: boolean;
|
1913
1913
|
origin: NonNullable<Anchor | "auto" | "overlap">;
|
1914
1914
|
eager: boolean;
|
1915
1915
|
location: Anchor;
|
@@ -2032,10 +2032,7 @@ declare const VDialog: {
|
|
2032
2032
|
disabled: BooleanConstructor;
|
2033
2033
|
opacity: (StringConstructor | NumberConstructor)[];
|
2034
2034
|
noClickAnimation: BooleanConstructor;
|
2035
|
-
modelValue:
|
2036
|
-
type: vue.PropType<boolean | null>;
|
2037
|
-
default: null;
|
2038
|
-
};
|
2035
|
+
modelValue: BooleanConstructor;
|
2039
2036
|
persistent: BooleanConstructor;
|
2040
2037
|
scrim: {
|
2041
2038
|
type: (StringConstructor | BooleanConstructor)[];
|
@@ -2143,10 +2140,7 @@ declare const VDialog: {
|
|
2143
2140
|
disabled: BooleanConstructor;
|
2144
2141
|
opacity: (StringConstructor | NumberConstructor)[];
|
2145
2142
|
noClickAnimation: BooleanConstructor;
|
2146
|
-
modelValue:
|
2147
|
-
type: vue.PropType<boolean | null>;
|
2148
|
-
default: null;
|
2149
|
-
};
|
2143
|
+
modelValue: BooleanConstructor;
|
2150
2144
|
persistent: BooleanConstructor;
|
2151
2145
|
scrim: {
|
2152
2146
|
type: (StringConstructor | BooleanConstructor)[];
|
@@ -67,7 +67,7 @@ export const VFileInput = genericComponent()({
|
|
67
67
|
const {
|
68
68
|
t
|
69
69
|
} = useLocale();
|
70
|
-
const model = useProxiedModel(props, 'modelValue', props.modelValue, val => wrapInArray(val), val => props.multiple || Array.isArray(props.modelValue) ? val : val[0]);
|
70
|
+
const model = useProxiedModel(props, 'modelValue', props.modelValue, val => wrapInArray(val), val => props.multiple || Array.isArray(props.modelValue) ? val : val[0] ?? null);
|
71
71
|
const {
|
72
72
|
isFocused,
|
73
73
|
focus,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"VFileInput.mjs","names":["VChip","VCounter","VField","filterFieldProps","makeVFieldProps","makeVInputProps","VInput","useFocus","forwardRefs","useLocale","useProxiedModel","computed","nextTick","ref","watch","callEvent","filterInputAttrs","genericComponent","humanReadableFileSize","propsFactory","useRender","wrapInArray","makeVFileInputProps","chips","Boolean","counter","counterSizeString","type","String","default","counterString","hideInput","multiple","showSize","Number","validator","v","includes","prependIcon","modelValue","Array","Object","props","val","every","clearable","VFileInput","name","inheritAttrs","emits","e","focused","files","setup","_ref","attrs","emit","slots","t","model","isArray","isFocused","focus","blur","base","undefined","totalBytes","value","reduce","bytes","_ref2","size","totalBytesReadable","fileNames","map","file","counterValue","fileCount","length","vInputRef","vFieldRef","inputRef","isActive","active","isPlainOrUnderlined","variant","onFocus","document","activeElement","onClickPrepend","click","onControlMousedown","onControlClick","onClear","stopPropagation","newValue","hasModelReset","hasCounter","hasDetails","details","rootAttrs","inputAttrs","_","inputProps","filterProps","fieldProps","_createVNode","_mergeProps","$event","class","style","_ref3","id","isDisabled","isDirty","isReadonly","isValid","_ref4","fieldClass","slotProps","_Fragment","preventDefault","target","selection","text","join","disabled"],"sources":["../../../src/components/VFileInput/VFileInput.tsx"],"sourcesContent":["// Styles\nimport './VFileInput.sass'\n\n// Components\nimport { VChip } from '@/components/VChip'\nimport { VCounter } from '@/components/VCounter'\nimport { VField } from '@/components/VField'\nimport { filterFieldProps, makeVFieldProps } from '@/components/VField/VField'\nimport { makeVInputProps, VInput } from '@/components/VInput/VInput'\n\n// Composables\nimport { useFocus } from '@/composables/focus'\nimport { forwardRefs } from '@/composables/forwardRefs'\nimport { useLocale } from '@/composables/locale'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, nextTick, ref, watch } from 'vue'\nimport {\n callEvent,\n filterInputAttrs,\n genericComponent,\n humanReadableFileSize,\n propsFactory,\n useRender,\n wrapInArray,\n} from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { VFieldSlots } from '@/components/VField/VField'\nimport type { VInputSlots } from '@/components/VInput/VInput'\n\nexport type VFileInputSlots = VInputSlots & VFieldSlots & {\n counter: never\n selection: {\n fileNames: string[]\n totalBytes: number\n totalBytesReadable: string\n }\n}\n\nexport const makeVFileInputProps = propsFactory({\n chips: Boolean,\n counter: Boolean,\n counterSizeString: {\n type: String,\n default: '$vuetify.fileInput.counterSize',\n },\n counterString: {\n type: String,\n default: '$vuetify.fileInput.counter',\n },\n hideInput: Boolean,\n multiple: Boolean,\n showSize: {\n type: [Boolean, Number, String] as PropType<boolean | 1000 | 1024>,\n default: false,\n validator: (v: boolean | number) => {\n return (\n typeof v === 'boolean' ||\n [1000, 1024].includes(Number(v))\n )\n },\n },\n\n ...makeVInputProps({ prependIcon: '$file' }),\n\n modelValue: {\n type: [Array, Object] as PropType<File[] | File>,\n default: (props: any) => props.multiple ? [] : null,\n validator: (val: any) => {\n return wrapInArray(val).every(v => v != null && typeof v === 'object')\n },\n },\n\n ...makeVFieldProps({ clearable: true }),\n}, 'VFileInput')\n\nexport const VFileInput = genericComponent<VFileInputSlots>()({\n name: 'VFileInput',\n\n inheritAttrs: false,\n\n props: makeVFileInputProps(),\n\n emits: {\n 'click:control': (e: MouseEvent) => true,\n 'mousedown:control': (e: MouseEvent) => true,\n 'update:focused': (focused: boolean) => true,\n 'update:modelValue': (files: File | File[]) => true,\n },\n\n setup (props, { attrs, emit, slots }) {\n const { t } = useLocale()\n const model = useProxiedModel(\n props,\n 'modelValue',\n props.modelValue,\n val => wrapInArray(val),\n val => (props.multiple || Array.isArray(props.modelValue)) ? val : val[0],\n )\n const { isFocused, focus, blur } = useFocus(props)\n const base = computed(() => typeof props.showSize !== 'boolean' ? props.showSize : undefined)\n const totalBytes = computed(() => (model.value ?? []).reduce((bytes, { size = 0 }) => bytes + size, 0))\n const totalBytesReadable = computed(() => humanReadableFileSize(totalBytes.value, base.value))\n\n const fileNames = computed(() => (model.value ?? []).map(file => {\n const { name = '', size = 0 } = file\n\n return !props.showSize\n ? name\n : `${name} (${humanReadableFileSize(size, base.value)})`\n }))\n\n const counterValue = computed(() => {\n const fileCount = model.value?.length ?? 0\n if (props.showSize) return t(props.counterSizeString, fileCount, totalBytesReadable.value)\n else return t(props.counterString, fileCount)\n })\n const vInputRef = ref<VInput>()\n const vFieldRef = ref<VInput>()\n const inputRef = ref<HTMLInputElement>()\n const isActive = computed(() => (\n isFocused.value ||\n props.active\n ))\n const isPlainOrUnderlined = computed(() => ['plain', 'underlined'].includes(props.variant))\n function onFocus () {\n if (inputRef.value !== document.activeElement) {\n inputRef.value?.focus()\n }\n\n if (!isFocused.value) focus()\n }\n function onClickPrepend (e: MouseEvent) {\n inputRef.value?.click()\n }\n function onControlMousedown (e: MouseEvent) {\n emit('mousedown:control', e)\n }\n function onControlClick (e: MouseEvent) {\n inputRef.value?.click()\n\n emit('click:control', e)\n }\n function onClear (e: MouseEvent) {\n e.stopPropagation()\n\n onFocus()\n\n nextTick(() => {\n model.value = []\n\n callEvent(props['onClick:clear'], e)\n })\n }\n\n watch(model, newValue => {\n const hasModelReset = !Array.isArray(newValue) || !newValue.length\n\n if (hasModelReset && inputRef.value) {\n inputRef.value.value = ''\n }\n })\n\n useRender(() => {\n const hasCounter = !!(slots.counter || props.counter)\n const hasDetails = !!(hasCounter || slots.details)\n const [rootAttrs, inputAttrs] = filterInputAttrs(attrs)\n const { modelValue: _, ...inputProps } = VInput.filterProps(props)\n const fieldProps = filterFieldProps(props)\n\n return (\n <VInput\n ref={ vInputRef }\n v-model={ model.value }\n class={[\n 'v-file-input',\n {\n 'v-file-input--chips': !!props.chips,\n 'v-file-input--hide': props.hideInput,\n 'v-input--plain-underlined': isPlainOrUnderlined.value,\n },\n props.class,\n ]}\n style={ props.style }\n onClick:prepend={ onClickPrepend }\n { ...rootAttrs }\n { ...inputProps }\n centerAffix={ !isPlainOrUnderlined.value }\n focused={ isFocused.value }\n >\n {{\n ...slots,\n default: ({\n id,\n isDisabled,\n isDirty,\n isReadonly,\n isValid,\n }) => (\n <VField\n ref={ vFieldRef }\n prepend-icon={ props.prependIcon }\n onMousedown={ onControlMousedown }\n onClick={ onControlClick }\n onClick:clear={ onClear }\n onClick:prependInner={ props['onClick:prependInner'] }\n onClick:appendInner={ props['onClick:appendInner'] }\n { ...fieldProps }\n id={ id.value }\n active={ isActive.value || isDirty.value }\n dirty={ isDirty.value }\n disabled={ isDisabled.value }\n focused={ isFocused.value }\n error={ isValid.value === false }\n >\n {{\n ...slots,\n default: ({\n props: { class: fieldClass, ...slotProps },\n }) => (\n <>\n <input\n ref={ inputRef }\n type=\"file\"\n readonly={ isReadonly.value }\n disabled={ isDisabled.value }\n multiple={ props.multiple }\n name={ props.name }\n onClick={ e => {\n e.stopPropagation()\n\n if (isReadonly.value) e.preventDefault()\n\n onFocus()\n }}\n onChange={ e => {\n if (!e.target) return\n\n const target = e.target as HTMLInputElement\n model.value = [...target.files ?? []]\n }}\n onFocus={ onFocus }\n onBlur={ blur }\n { ...slotProps }\n { ...inputAttrs }\n />\n\n <div class={ fieldClass }>\n { !!model.value?.length && !props.hideInput && (\n slots.selection ? slots.selection({\n fileNames: fileNames.value,\n totalBytes: totalBytes.value,\n totalBytesReadable: totalBytesReadable.value,\n })\n : props.chips ? fileNames.value.map(text => (\n <VChip\n key={ text }\n size=\"small\"\n text={ text }\n />\n ))\n : fileNames.value.join(', ')\n )}\n </div>\n </>\n ),\n }}\n </VField>\n ),\n details: hasDetails ? slotProps => (\n <>\n { slots.details?.(slotProps) }\n\n { hasCounter && (\n <>\n <span />\n\n <VCounter\n active={ !!model.value?.length }\n value={ counterValue.value }\n disabled={ props.disabled }\n v-slots:default={ slots.counter }\n />\n </>\n )}\n </>\n ) : undefined,\n }}\n </VInput>\n )\n })\n\n return forwardRefs({}, vInputRef, vFieldRef, inputRef)\n },\n})\n\nexport type VFileInput = InstanceType<typeof VFileInput>\n"],"m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C","ignoreList":[]}
|
1
|
+
{"version":3,"file":"VFileInput.mjs","names":["VChip","VCounter","VField","filterFieldProps","makeVFieldProps","makeVInputProps","VInput","useFocus","forwardRefs","useLocale","useProxiedModel","computed","nextTick","ref","watch","callEvent","filterInputAttrs","genericComponent","humanReadableFileSize","propsFactory","useRender","wrapInArray","makeVFileInputProps","chips","Boolean","counter","counterSizeString","type","String","default","counterString","hideInput","multiple","showSize","Number","validator","v","includes","prependIcon","modelValue","Array","Object","props","val","every","clearable","VFileInput","name","inheritAttrs","emits","e","focused","files","setup","_ref","attrs","emit","slots","t","model","isArray","isFocused","focus","blur","base","undefined","totalBytes","value","reduce","bytes","_ref2","size","totalBytesReadable","fileNames","map","file","counterValue","fileCount","length","vInputRef","vFieldRef","inputRef","isActive","active","isPlainOrUnderlined","variant","onFocus","document","activeElement","onClickPrepend","click","onControlMousedown","onControlClick","onClear","stopPropagation","newValue","hasModelReset","hasCounter","hasDetails","details","rootAttrs","inputAttrs","_","inputProps","filterProps","fieldProps","_createVNode","_mergeProps","$event","class","style","_ref3","id","isDisabled","isDirty","isReadonly","isValid","_ref4","fieldClass","slotProps","_Fragment","preventDefault","target","selection","text","join","disabled"],"sources":["../../../src/components/VFileInput/VFileInput.tsx"],"sourcesContent":["// Styles\nimport './VFileInput.sass'\n\n// Components\nimport { VChip } from '@/components/VChip'\nimport { VCounter } from '@/components/VCounter'\nimport { VField } from '@/components/VField'\nimport { filterFieldProps, makeVFieldProps } from '@/components/VField/VField'\nimport { makeVInputProps, VInput } from '@/components/VInput/VInput'\n\n// Composables\nimport { useFocus } from '@/composables/focus'\nimport { forwardRefs } from '@/composables/forwardRefs'\nimport { useLocale } from '@/composables/locale'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, nextTick, ref, watch } from 'vue'\nimport {\n callEvent,\n filterInputAttrs,\n genericComponent,\n humanReadableFileSize,\n propsFactory,\n useRender,\n wrapInArray,\n} from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { VFieldSlots } from '@/components/VField/VField'\nimport type { VInputSlots } from '@/components/VInput/VInput'\n\nexport type VFileInputSlots = VInputSlots & VFieldSlots & {\n counter: never\n selection: {\n fileNames: string[]\n totalBytes: number\n totalBytesReadable: string\n }\n}\n\nexport const makeVFileInputProps = propsFactory({\n chips: Boolean,\n counter: Boolean,\n counterSizeString: {\n type: String,\n default: '$vuetify.fileInput.counterSize',\n },\n counterString: {\n type: String,\n default: '$vuetify.fileInput.counter',\n },\n hideInput: Boolean,\n multiple: Boolean,\n showSize: {\n type: [Boolean, Number, String] as PropType<boolean | 1000 | 1024>,\n default: false,\n validator: (v: boolean | number) => {\n return (\n typeof v === 'boolean' ||\n [1000, 1024].includes(Number(v))\n )\n },\n },\n\n ...makeVInputProps({ prependIcon: '$file' }),\n\n modelValue: {\n type: [Array, Object] as PropType<File[] | File | null>,\n default: (props: any) => props.multiple ? [] : null,\n validator: (val: any) => {\n return wrapInArray(val).every(v => v != null && typeof v === 'object')\n },\n },\n\n ...makeVFieldProps({ clearable: true }),\n}, 'VFileInput')\n\nexport const VFileInput = genericComponent<VFileInputSlots>()({\n name: 'VFileInput',\n\n inheritAttrs: false,\n\n props: makeVFileInputProps(),\n\n emits: {\n 'click:control': (e: MouseEvent) => true,\n 'mousedown:control': (e: MouseEvent) => true,\n 'update:focused': (focused: boolean) => true,\n 'update:modelValue': (files: File | File[]) => true,\n },\n\n setup (props, { attrs, emit, slots }) {\n const { t } = useLocale()\n const model = useProxiedModel(\n props,\n 'modelValue',\n props.modelValue,\n val => wrapInArray(val),\n val => (props.multiple || Array.isArray(props.modelValue)) ? val : (val[0] ?? null),\n )\n const { isFocused, focus, blur } = useFocus(props)\n const base = computed(() => typeof props.showSize !== 'boolean' ? props.showSize : undefined)\n const totalBytes = computed(() => (model.value ?? []).reduce((bytes, { size = 0 }) => bytes + size, 0))\n const totalBytesReadable = computed(() => humanReadableFileSize(totalBytes.value, base.value))\n\n const fileNames = computed(() => (model.value ?? []).map(file => {\n const { name = '', size = 0 } = file\n\n return !props.showSize\n ? name\n : `${name} (${humanReadableFileSize(size, base.value)})`\n }))\n\n const counterValue = computed(() => {\n const fileCount = model.value?.length ?? 0\n if (props.showSize) return t(props.counterSizeString, fileCount, totalBytesReadable.value)\n else return t(props.counterString, fileCount)\n })\n const vInputRef = ref<VInput>()\n const vFieldRef = ref<VInput>()\n const inputRef = ref<HTMLInputElement>()\n const isActive = computed(() => (\n isFocused.value ||\n props.active\n ))\n const isPlainOrUnderlined = computed(() => ['plain', 'underlined'].includes(props.variant))\n function onFocus () {\n if (inputRef.value !== document.activeElement) {\n inputRef.value?.focus()\n }\n\n if (!isFocused.value) focus()\n }\n function onClickPrepend (e: MouseEvent) {\n inputRef.value?.click()\n }\n function onControlMousedown (e: MouseEvent) {\n emit('mousedown:control', e)\n }\n function onControlClick (e: MouseEvent) {\n inputRef.value?.click()\n\n emit('click:control', e)\n }\n function onClear (e: MouseEvent) {\n e.stopPropagation()\n\n onFocus()\n\n nextTick(() => {\n model.value = []\n\n callEvent(props['onClick:clear'], e)\n })\n }\n\n watch(model, newValue => {\n const hasModelReset = !Array.isArray(newValue) || !newValue.length\n\n if (hasModelReset && inputRef.value) {\n inputRef.value.value = ''\n }\n })\n\n useRender(() => {\n const hasCounter = !!(slots.counter || props.counter)\n const hasDetails = !!(hasCounter || slots.details)\n const [rootAttrs, inputAttrs] = filterInputAttrs(attrs)\n const { modelValue: _, ...inputProps } = VInput.filterProps(props)\n const fieldProps = filterFieldProps(props)\n\n return (\n <VInput\n ref={ vInputRef }\n v-model={ model.value }\n class={[\n 'v-file-input',\n {\n 'v-file-input--chips': !!props.chips,\n 'v-file-input--hide': props.hideInput,\n 'v-input--plain-underlined': isPlainOrUnderlined.value,\n },\n props.class,\n ]}\n style={ props.style }\n onClick:prepend={ onClickPrepend }\n { ...rootAttrs }\n { ...inputProps }\n centerAffix={ !isPlainOrUnderlined.value }\n focused={ isFocused.value }\n >\n {{\n ...slots,\n default: ({\n id,\n isDisabled,\n isDirty,\n isReadonly,\n isValid,\n }) => (\n <VField\n ref={ vFieldRef }\n prepend-icon={ props.prependIcon }\n onMousedown={ onControlMousedown }\n onClick={ onControlClick }\n onClick:clear={ onClear }\n onClick:prependInner={ props['onClick:prependInner'] }\n onClick:appendInner={ props['onClick:appendInner'] }\n { ...fieldProps }\n id={ id.value }\n active={ isActive.value || isDirty.value }\n dirty={ isDirty.value }\n disabled={ isDisabled.value }\n focused={ isFocused.value }\n error={ isValid.value === false }\n >\n {{\n ...slots,\n default: ({\n props: { class: fieldClass, ...slotProps },\n }) => (\n <>\n <input\n ref={ inputRef }\n type=\"file\"\n readonly={ isReadonly.value }\n disabled={ isDisabled.value }\n multiple={ props.multiple }\n name={ props.name }\n onClick={ e => {\n e.stopPropagation()\n\n if (isReadonly.value) e.preventDefault()\n\n onFocus()\n }}\n onChange={ e => {\n if (!e.target) return\n\n const target = e.target as HTMLInputElement\n model.value = [...target.files ?? []]\n }}\n onFocus={ onFocus }\n onBlur={ blur }\n { ...slotProps }\n { ...inputAttrs }\n />\n\n <div class={ fieldClass }>\n { !!model.value?.length && !props.hideInput && (\n slots.selection ? slots.selection({\n fileNames: fileNames.value,\n totalBytes: totalBytes.value,\n totalBytesReadable: totalBytesReadable.value,\n })\n : props.chips ? fileNames.value.map(text => (\n <VChip\n key={ text }\n size=\"small\"\n text={ text }\n />\n ))\n : fileNames.value.join(', ')\n )}\n </div>\n </>\n ),\n }}\n </VField>\n ),\n details: hasDetails ? slotProps => (\n <>\n { slots.details?.(slotProps) }\n\n { hasCounter && (\n <>\n <span />\n\n <VCounter\n active={ !!model.value?.length }\n value={ counterValue.value }\n disabled={ props.disabled }\n v-slots:default={ slots.counter }\n />\n </>\n )}\n </>\n ) : undefined,\n }}\n </VInput>\n )\n })\n\n return forwardRefs({}, vInputRef, vFieldRef, inputRef)\n },\n})\n\nexport type VFileInput = InstanceType<typeof VFileInput>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SAC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-94,7 +94,7 @@ declare const VFileInput: {
|
|
94
94
|
maxErrors: string | number;
|
95
95
|
readonly: boolean | null;
|
96
96
|
rules: readonly ValidationRule[];
|
97
|
-
modelValue: File | File[];
|
97
|
+
modelValue: File | File[] | null;
|
98
98
|
variant: "underlined" | "filled" | "outlined" | "plain" | "solo" | "solo-inverted" | "solo-filled";
|
99
99
|
multiple: boolean;
|
100
100
|
tile: boolean;
|
@@ -479,7 +479,7 @@ declare const VFileInput: {
|
|
479
479
|
maxErrors: string | number;
|
480
480
|
readonly: boolean | null;
|
481
481
|
rules: readonly ValidationRule[];
|
482
|
-
modelValue: File | File[];
|
482
|
+
modelValue: File | File[] | null;
|
483
483
|
variant: "underlined" | "filled" | "outlined" | "plain" | "solo" | "solo-inverted" | "solo-filled";
|
484
484
|
multiple: boolean;
|
485
485
|
tile: boolean;
|
@@ -614,7 +614,7 @@ declare const VFileInput: {
|
|
614
614
|
maxErrors: string | number;
|
615
615
|
readonly: boolean | null;
|
616
616
|
rules: readonly ValidationRule[];
|
617
|
-
modelValue: File | File[];
|
617
|
+
modelValue: File | File[] | null;
|
618
618
|
rounded: string | number | boolean;
|
619
619
|
variant: "underlined" | "filled" | "outlined" | "plain" | "solo" | "solo-inverted" | "solo-filled";
|
620
620
|
multiple: boolean;
|
@@ -702,7 +702,7 @@ declare const VFileInput: {
|
|
702
702
|
maxErrors: string | number;
|
703
703
|
readonly: boolean | null;
|
704
704
|
rules: readonly ValidationRule[];
|
705
|
-
modelValue: File | File[];
|
705
|
+
modelValue: File | File[] | null;
|
706
706
|
variant: "underlined" | "filled" | "outlined" | "plain" | "solo" | "solo-inverted" | "solo-filled";
|
707
707
|
multiple: boolean;
|
708
708
|
tile: boolean;
|
@@ -1082,7 +1082,7 @@ declare const VFileInput: {
|
|
1082
1082
|
maxErrors: string | number;
|
1083
1083
|
readonly: boolean | null;
|
1084
1084
|
rules: readonly ValidationRule[];
|
1085
|
-
modelValue: File | File[];
|
1085
|
+
modelValue: File | File[] | null;
|
1086
1086
|
rounded: string | number | boolean;
|
1087
1087
|
variant: "underlined" | "filled" | "outlined" | "plain" | "solo" | "solo-inverted" | "solo-filled";
|
1088
1088
|
multiple: boolean;
|
@@ -1121,7 +1121,7 @@ declare const VFileInput: {
|
|
1121
1121
|
maxErrors: string | number;
|
1122
1122
|
readonly: boolean | null;
|
1123
1123
|
rules: readonly ValidationRule[];
|
1124
|
-
modelValue: File | File[];
|
1124
|
+
modelValue: File | File[] | null;
|
1125
1125
|
variant: "underlined" | "filled" | "outlined" | "plain" | "solo" | "solo-inverted" | "solo-filled";
|
1126
1126
|
multiple: boolean;
|
1127
1127
|
tile: boolean;
|
@@ -1506,7 +1506,7 @@ declare const VFileInput: {
|
|
1506
1506
|
maxErrors: string | number;
|
1507
1507
|
readonly: boolean | null;
|
1508
1508
|
rules: readonly ValidationRule[];
|
1509
|
-
modelValue: File | File[];
|
1509
|
+
modelValue: File | File[] | null;
|
1510
1510
|
rounded: string | number | boolean;
|
1511
1511
|
variant: "underlined" | "filled" | "outlined" | "plain" | "solo" | "solo-inverted" | "solo-filled";
|
1512
1512
|
multiple: boolean;
|
@@ -1624,7 +1624,7 @@ declare const VFileInput: {
|
|
1624
1624
|
'onClick:appendInner': PropType<(args_0: MouseEvent) => void>;
|
1625
1625
|
'onClick:prependInner': PropType<(args_0: MouseEvent) => void>;
|
1626
1626
|
modelValue: {
|
1627
|
-
type: PropType<File | File[]>;
|
1627
|
+
type: PropType<File | File[] | null>;
|
1628
1628
|
default: (props: any) => never[] | null;
|
1629
1629
|
validator: (val: any) => boolean;
|
1630
1630
|
};
|
@@ -1746,7 +1746,7 @@ declare const VFileInput: {
|
|
1746
1746
|
'onClick:appendInner': PropType<(args_0: MouseEvent) => void>;
|
1747
1747
|
'onClick:prependInner': PropType<(args_0: MouseEvent) => void>;
|
1748
1748
|
modelValue: {
|
1749
|
-
type: PropType<File | File[]>;
|
1749
|
+
type: PropType<File | File[] | null>;
|
1750
1750
|
default: (props: any) => never[] | null;
|
1751
1751
|
validator: (val: any) => boolean;
|
1752
1752
|
};
|
@@ -33,7 +33,7 @@ declare const VImg: {
|
|
33
33
|
sizes?: string | undefined;
|
34
34
|
position?: string | undefined;
|
35
35
|
rounded?: string | number | boolean | undefined;
|
36
|
-
contentClass?:
|
36
|
+
contentClass?: any;
|
37
37
|
maxHeight?: string | number | undefined;
|
38
38
|
maxWidth?: string | number | undefined;
|
39
39
|
minHeight?: string | number | undefined;
|
@@ -97,7 +97,7 @@ declare const VImg: {
|
|
97
97
|
sizes?: string | undefined;
|
98
98
|
position?: string | undefined;
|
99
99
|
rounded?: string | number | boolean | undefined;
|
100
|
-
contentClass?:
|
100
|
+
contentClass?: any;
|
101
101
|
maxHeight?: string | number | undefined;
|
102
102
|
maxWidth?: string | number | undefined;
|
103
103
|
minHeight?: string | number | undefined;
|
@@ -184,7 +184,7 @@ declare const VImg: {
|
|
184
184
|
sizes?: string | undefined;
|
185
185
|
position?: string | undefined;
|
186
186
|
rounded?: string | number | boolean | undefined;
|
187
|
-
contentClass?:
|
187
|
+
contentClass?: any;
|
188
188
|
maxHeight?: string | number | undefined;
|
189
189
|
maxWidth?: string | number | undefined;
|
190
190
|
minHeight?: string | number | undefined;
|
@@ -261,7 +261,7 @@ declare const VImg: {
|
|
261
261
|
sizes?: string | undefined;
|
262
262
|
position?: string | undefined;
|
263
263
|
rounded?: string | number | boolean | undefined;
|
264
|
-
contentClass?:
|
264
|
+
contentClass?: any;
|
265
265
|
maxHeight?: string | number | undefined;
|
266
266
|
maxWidth?: string | number | undefined;
|
267
267
|
minHeight?: string | number | undefined;
|
@@ -355,7 +355,7 @@ declare const VImg: {
|
|
355
355
|
minWidth: (StringConstructor | NumberConstructor)[];
|
356
356
|
width: (StringConstructor | NumberConstructor)[];
|
357
357
|
aspectRatio: (StringConstructor | NumberConstructor)[];
|
358
|
-
contentClass:
|
358
|
+
contentClass: null;
|
359
359
|
inline: BooleanConstructor;
|
360
360
|
alt: StringConstructor;
|
361
361
|
cover: BooleanConstructor;
|
@@ -409,7 +409,7 @@ declare const VImg: {
|
|
409
409
|
minWidth: (StringConstructor | NumberConstructor)[];
|
410
410
|
width: (StringConstructor | NumberConstructor)[];
|
411
411
|
aspectRatio: (StringConstructor | NumberConstructor)[];
|
412
|
-
contentClass:
|
412
|
+
contentClass: null;
|
413
413
|
inline: BooleanConstructor;
|
414
414
|
alt: StringConstructor;
|
415
415
|
cover: BooleanConstructor;
|
@@ -36,7 +36,7 @@ export const makeVListItemProps = propsFactory({
|
|
36
36
|
appendIcon: IconValue,
|
37
37
|
baseColor: String,
|
38
38
|
disabled: Boolean,
|
39
|
-
lines: String,
|
39
|
+
lines: [Boolean, String],
|
40
40
|
link: {
|
41
41
|
type: Boolean,
|
42
42
|
default: undefined
|
@@ -147,8 +147,9 @@ export const VListItem = genericComponent()({
|
|
147
147
|
}));
|
148
148
|
function onClick(e) {
|
149
149
|
emit('click', e);
|
150
|
-
if (
|
150
|
+
if (!isClickable.value) return;
|
151
151
|
link.navigate?.(e);
|
152
|
+
if (isGroupActivator) return;
|
152
153
|
if (root.activatable.value) {
|
153
154
|
activate(!isActivated.value, e);
|
154
155
|
} else if (root.selectable.value) {
|