@vuetify/nightly 4.0.0-dev-20230427.0 → 4.0.0-dev-20230511.0
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 +22 -23
- package/dist/json/attributes.json +854 -658
- package/dist/json/importMap-labs.json +4 -4
- package/dist/json/tags.json +50 -1
- package/dist/json/web-types.json +1797 -1324
- package/dist/vuetify-labs.css +81 -69
- package/dist/vuetify-labs.d.ts +771 -257
- package/dist/vuetify-labs.esm.js +260 -224
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +259 -223
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +23 -11
- package/dist/vuetify.d.ts +884 -412
- package/dist/vuetify.esm.js +237 -215
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +236 -214
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +640 -645
- package/dist/vuetify.min.js.map +1 -1
- package/lib/blueprints/{index.d.ts → index.d.mts} +5 -1
- package/lib/blueprints/{md1.d.ts → md1.d.mts} +5 -1
- package/lib/blueprints/{md2.d.ts → md2.d.mts} +5 -1
- package/lib/blueprints/{md3.d.ts → md3.d.mts} +5 -1
- package/lib/components/VAppBar/VAppBar.mjs +7 -11
- package/lib/components/VAppBar/VAppBar.mjs.map +1 -1
- package/lib/components/VAppBar/VAppBarNavIcon.mjs +10 -16
- package/lib/components/VAppBar/VAppBarNavIcon.mjs.map +1 -1
- package/lib/components/VAppBar/{index.d.ts → index.d.mts} +394 -28
- package/lib/components/VAutocomplete/VAutocomplete.css +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.mjs +9 -2
- package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.sass +1 -1
- package/lib/components/VAutocomplete/{index.d.ts → index.d.mts} +6 -6
- package/lib/components/VBtn/VBtn.mjs +7 -6
- package/lib/components/VBtn/VBtn.mjs.map +1 -1
- package/lib/components/VCheckbox/VCheckboxBtn.mjs +0 -1
- package/lib/components/VCheckbox/VCheckboxBtn.mjs.map +1 -1
- package/lib/components/VCheckbox/{index.d.ts → index.d.mts} +6 -6
- package/lib/components/VColorPicker/VColorPicker.mjs +9 -4
- package/lib/components/VColorPicker/VColorPicker.mjs.map +1 -1
- package/lib/components/VColorPicker/VColorPickerEdit.mjs.map +1 -1
- package/lib/components/VColorPicker/VColorPickerSwatches.mjs +5 -4
- package/lib/components/VColorPicker/VColorPickerSwatches.mjs.map +1 -1
- package/lib/components/VColorPicker/{index.d.ts → index.d.mts} +97 -31
- package/lib/components/VColorPicker/util/index.mjs +2 -22
- package/lib/components/VColorPicker/util/index.mjs.map +1 -1
- package/lib/components/VCombobox/VCombobox.mjs +9 -2
- package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
- package/lib/components/VCombobox/{index.d.ts → index.d.mts} +6 -6
- package/lib/components/VField/{index.d.ts → index.d.mts} +6 -6
- package/lib/components/VFileInput/VFileInput.mjs +2 -1
- package/lib/components/VFileInput/VFileInput.mjs.map +1 -1
- package/lib/components/VFileInput/{index.d.ts → index.d.mts} +15 -15
- package/lib/components/VImg/VImg.css +2 -4
- package/lib/components/VImg/VImg.mjs +25 -24
- package/lib/components/VImg/VImg.mjs.map +1 -1
- package/lib/components/VImg/VImg.sass +4 -3
- package/lib/components/VImg/{index.d.ts → index.d.mts} +48 -3
- package/lib/components/VInput/{index.d.ts → index.d.mts} +6 -6
- package/lib/components/VList/VList.mjs +5 -0
- package/lib/components/VList/VList.mjs.map +1 -1
- package/lib/components/VList/VListGroup.mjs +3 -0
- package/lib/components/VList/VListGroup.mjs.map +1 -1
- package/lib/components/VList/VListItem.mjs +10 -5
- package/lib/components/VList/VListItem.mjs.map +1 -1
- package/lib/components/VList/{index.d.ts → index.d.mts} +18 -0
- package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs +1 -8
- package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs.map +1 -1
- package/lib/components/VRadioGroup/{index.d.ts → index.d.mts} +6 -6
- package/lib/components/VRangeSlider/{index.d.ts → index.d.mts} +6 -6
- package/lib/components/VResponsive/VResponsive.css +13 -5
- package/lib/components/VResponsive/VResponsive.mjs +12 -8
- package/lib/components/VResponsive/VResponsive.mjs.map +1 -1
- package/lib/components/VResponsive/VResponsive.sass +12 -4
- package/lib/components/VResponsive/{index.d.ts → index.d.mts} +10 -1
- package/lib/components/VSelect/VSelect.mjs +9 -2
- package/lib/components/VSelect/VSelect.mjs.map +1 -1
- package/lib/components/VSelect/{index.d.ts → index.d.mts} +6 -6
- package/lib/components/VSheet/VSheet.css +6 -0
- package/lib/components/VSheet/_variables.scss +1 -1
- package/lib/components/VSlider/{index.d.ts → index.d.mts} +6 -6
- package/lib/components/VSwitch/{index.d.ts → index.d.mts} +6 -6
- package/lib/components/VTextField/VTextField.mjs +1 -1
- package/lib/components/VTextField/VTextField.mjs.map +1 -1
- package/lib/components/VTextField/{index.d.ts → index.d.mts} +24 -24
- package/lib/components/VTextarea/VTextarea.mjs +1 -1
- package/lib/components/VTextarea/VTextarea.mjs.map +1 -1
- package/lib/components/VTextarea/{index.d.ts → index.d.mts} +15 -15
- package/lib/components/VValidation/{index.d.ts → index.d.mts} +6 -6
- package/lib/components/{index.d.ts → index.d.mts} +679 -208
- package/lib/composables/defaults.mjs +15 -3
- package/lib/composables/defaults.mjs.map +1 -1
- package/lib/composables/display.mjs +6 -6
- package/lib/composables/display.mjs.map +1 -1
- package/lib/composables/focus.mjs.map +1 -1
- package/lib/composables/scroll.mjs +18 -19
- package/lib/composables/scroll.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/framework.mjs +1 -1
- package/lib/framework.mjs.map +1 -1
- package/lib/{index.d.ts → index.d.mts} +7 -6
- package/lib/labs/VDataTable/VDataTable.mjs +11 -2
- package/lib/labs/VDataTable/VDataTable.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableServer.mjs +0 -5
- package/lib/labs/VDataTable/VDataTableServer.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableVirtual.mjs +7 -2
- package/lib/labs/VDataTable/VDataTableVirtual.mjs.map +1 -1
- package/lib/labs/VDataTable/composables/paginate.mjs +6 -1
- package/lib/labs/VDataTable/composables/paginate.mjs.map +1 -1
- package/lib/labs/VDataTable/{index.d.ts → index.d.mts} +54 -12
- package/lib/labs/{components.d.ts → components.d.mts} +54 -12
- package/lib/util/colorUtils.mjs +68 -3
- package/lib/util/colorUtils.mjs.map +1 -1
- package/lib/util/console.mjs +12 -81
- package/lib/util/console.mjs.map +1 -1
- package/lib/util/defineComponent.mjs +2 -2
- package/lib/util/defineComponent.mjs.map +1 -1
- package/lib/util/helpers.mjs +3 -0
- package/lib/util/helpers.mjs.map +1 -1
- package/package.json +10 -6
- /package/lib/components/VAlert/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VApp/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VAvatar/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VBadge/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VBanner/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VBottomNavigation/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VBreadcrumbs/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VBtn/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VBtnGroup/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VBtnToggle/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VCard/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VCarousel/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VChip/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VChipGroup/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VCode/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VCounter/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VDefaultsProvider/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VDialog/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VDivider/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VExpansionPanel/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VFooter/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VForm/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VGrid/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VHover/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VIcon/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VItemGroup/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VKbd/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VLabel/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VLayout/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VLazy/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VLocaleProvider/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VMain/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VMenu/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VMessages/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VNavigationDrawer/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VNoSsr/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VOverlay/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VPagination/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VParallax/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VProgressCircular/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VProgressLinear/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VRadio/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VRating/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VSelectionControl/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VSelectionControlGroup/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VSheet/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VSlideGroup/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VSnackbar/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VSystemBar/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VTable/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VTabs/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VThemeProvider/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VTimeline/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VToolbar/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VTooltip/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VVirtualScroll/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VWindow/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/transitions/{index.d.ts → index.d.mts} +0 -0
- /package/lib/directives/{index.d.ts → index.d.mts} +0 -0
- /package/lib/iconsets/{fa-svg.d.ts → fa-svg.d.mts} +0 -0
- /package/lib/iconsets/{fa.d.ts → fa.d.mts} +0 -0
- /package/lib/iconsets/{fa4.d.ts → fa4.d.mts} +0 -0
- /package/lib/iconsets/{md.d.ts → md.d.mts} +0 -0
- /package/lib/iconsets/{mdi-svg.d.ts → mdi-svg.d.mts} +0 -0
- /package/lib/iconsets/{mdi.d.ts → mdi.d.mts} +0 -0
- /package/lib/labs/VInfiniteScroll/{index.d.ts → index.d.mts} +0 -0
- /package/lib/labs/VSkeletonLoader/{index.d.ts → index.d.mts} +0 -0
- /package/lib/labs/date/adapters/{vuetify.d.ts → vuetify.d.mts} +0 -0
- /package/lib/labs/date/{index.d.ts → index.d.mts} +0 -0
- /package/lib/locale/adapters/{vue-i18n.d.ts → vue-i18n.d.mts} +0 -0
- /package/lib/locale/adapters/{vuetify.d.ts → vuetify.d.mts} +0 -0
- /package/lib/locale/{index.d.ts → index.d.mts} +0 -0
@@ -139,6 +139,7 @@ declare const VListItem: {
|
|
139
139
|
rounded?: string | number | boolean | undefined;
|
140
140
|
prependIcon?: IconValue | undefined;
|
141
141
|
appendIcon?: IconValue | undefined;
|
142
|
+
baseColor?: string | undefined;
|
142
143
|
activeClass?: string | undefined;
|
143
144
|
appendAvatar?: string | undefined;
|
144
145
|
prependAvatar?: string | undefined;
|
@@ -215,6 +216,7 @@ declare const VListItem: {
|
|
215
216
|
rounded?: string | number | boolean | undefined;
|
216
217
|
prependIcon?: IconValue | undefined;
|
217
218
|
appendIcon?: IconValue | undefined;
|
219
|
+
baseColor?: string | undefined;
|
218
220
|
activeClass?: string | undefined;
|
219
221
|
appendAvatar?: string | undefined;
|
220
222
|
prependAvatar?: string | undefined;
|
@@ -312,6 +314,7 @@ declare const VListItem: {
|
|
312
314
|
rounded?: string | number | boolean | undefined;
|
313
315
|
prependIcon?: IconValue | undefined;
|
314
316
|
appendIcon?: IconValue | undefined;
|
317
|
+
baseColor?: string | undefined;
|
315
318
|
activeClass?: string | undefined;
|
316
319
|
appendAvatar?: string | undefined;
|
317
320
|
prependAvatar?: string | undefined;
|
@@ -378,6 +381,7 @@ declare const VListItem: {
|
|
378
381
|
rounded?: string | number | boolean | undefined;
|
379
382
|
prependIcon?: IconValue | undefined;
|
380
383
|
appendIcon?: IconValue | undefined;
|
384
|
+
baseColor?: string | undefined;
|
381
385
|
activeClass?: string | undefined;
|
382
386
|
appendAvatar?: string | undefined;
|
383
387
|
prependAvatar?: string | undefined;
|
@@ -474,6 +478,7 @@ declare const VListItem: {
|
|
474
478
|
activeColor: StringConstructor;
|
475
479
|
appendAvatar: StringConstructor;
|
476
480
|
appendIcon: PropType<IconValue>;
|
481
|
+
baseColor: StringConstructor;
|
477
482
|
disabled: BooleanConstructor;
|
478
483
|
lines: PropType<"one" | "two" | "three">;
|
479
484
|
link: {
|
@@ -544,6 +549,7 @@ declare const VListItem: {
|
|
544
549
|
activeColor: StringConstructor;
|
545
550
|
appendAvatar: StringConstructor;
|
546
551
|
appendIcon: PropType<IconValue>;
|
552
|
+
baseColor: StringConstructor;
|
547
553
|
disabled: BooleanConstructor;
|
548
554
|
lines: PropType<"one" | "two" | "three">;
|
549
555
|
link: {
|
@@ -677,6 +683,7 @@ declare const VList: {
|
|
677
683
|
opened: PropType<unknown[]>;
|
678
684
|
selected: PropType<unknown[]>;
|
679
685
|
mandatory: BooleanConstructor;
|
686
|
+
baseColor: StringConstructor;
|
680
687
|
activeColor: StringConstructor;
|
681
688
|
activeClass: StringConstructor;
|
682
689
|
bgColor: StringConstructor;
|
@@ -797,6 +804,7 @@ declare const VList: {
|
|
797
804
|
opened: PropType<unknown[]>;
|
798
805
|
selected: PropType<unknown[]>;
|
799
806
|
mandatory: BooleanConstructor;
|
807
|
+
baseColor: StringConstructor;
|
800
808
|
activeColor: StringConstructor;
|
801
809
|
activeClass: StringConstructor;
|
802
810
|
bgColor: StringConstructor;
|
@@ -950,6 +958,7 @@ declare const VList: {
|
|
950
958
|
opened: PropType<unknown[]>;
|
951
959
|
selected: PropType<unknown[]>;
|
952
960
|
mandatory: BooleanConstructor;
|
961
|
+
baseColor: StringConstructor;
|
953
962
|
activeColor: StringConstructor;
|
954
963
|
activeClass: StringConstructor;
|
955
964
|
bgColor: StringConstructor;
|
@@ -1056,6 +1065,7 @@ declare const VList: {
|
|
1056
1065
|
opened: PropType<unknown[]>;
|
1057
1066
|
selected: PropType<unknown[]>;
|
1058
1067
|
mandatory: BooleanConstructor;
|
1068
|
+
baseColor: StringConstructor;
|
1059
1069
|
activeColor: StringConstructor;
|
1060
1070
|
activeClass: StringConstructor;
|
1061
1071
|
bgColor: StringConstructor;
|
@@ -1193,6 +1203,7 @@ declare const VList: {
|
|
1193
1203
|
opened: PropType<unknown[]>;
|
1194
1204
|
selected: PropType<unknown[]>;
|
1195
1205
|
mandatory: BooleanConstructor;
|
1206
|
+
baseColor: StringConstructor;
|
1196
1207
|
activeColor: StringConstructor;
|
1197
1208
|
activeClass: StringConstructor;
|
1198
1209
|
bgColor: StringConstructor;
|
@@ -1278,6 +1289,7 @@ declare const VList: {
|
|
1278
1289
|
opened: PropType<unknown[]>;
|
1279
1290
|
selected: PropType<unknown[]>;
|
1280
1291
|
mandatory: BooleanConstructor;
|
1292
|
+
baseColor: StringConstructor;
|
1281
1293
|
activeColor: StringConstructor;
|
1282
1294
|
activeClass: StringConstructor;
|
1283
1295
|
bgColor: StringConstructor;
|
@@ -1315,6 +1327,7 @@ declare const VListGroup: {
|
|
1315
1327
|
class?: any;
|
1316
1328
|
prependIcon?: IconValue | undefined;
|
1317
1329
|
appendIcon?: IconValue | undefined;
|
1330
|
+
baseColor?: string | undefined;
|
1318
1331
|
activeColor?: string | undefined;
|
1319
1332
|
} & {
|
1320
1333
|
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
|
@@ -1365,6 +1378,7 @@ declare const VListGroup: {
|
|
1365
1378
|
class?: any;
|
1366
1379
|
prependIcon?: IconValue | undefined;
|
1367
1380
|
appendIcon?: IconValue | undefined;
|
1381
|
+
baseColor?: string | undefined;
|
1368
1382
|
activeColor?: string | undefined;
|
1369
1383
|
} & {
|
1370
1384
|
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
|
@@ -1428,6 +1442,7 @@ declare const VListGroup: {
|
|
1428
1442
|
class?: any;
|
1429
1443
|
prependIcon?: IconValue | undefined;
|
1430
1444
|
appendIcon?: IconValue | undefined;
|
1445
|
+
baseColor?: string | undefined;
|
1431
1446
|
activeColor?: string | undefined;
|
1432
1447
|
} & {
|
1433
1448
|
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
|
@@ -1468,6 +1483,7 @@ declare const VListGroup: {
|
|
1468
1483
|
class?: any;
|
1469
1484
|
prependIcon?: IconValue | undefined;
|
1470
1485
|
appendIcon?: IconValue | undefined;
|
1486
|
+
baseColor?: string | undefined;
|
1471
1487
|
activeColor?: string | undefined;
|
1472
1488
|
} & {
|
1473
1489
|
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
|
@@ -1508,6 +1524,7 @@ declare const VListGroup: {
|
|
1508
1524
|
default: null;
|
1509
1525
|
};
|
1510
1526
|
activeColor: StringConstructor;
|
1527
|
+
baseColor: StringConstructor;
|
1511
1528
|
color: StringConstructor;
|
1512
1529
|
collapseIcon: {
|
1513
1530
|
type: vue.PropType<IconValue>;
|
@@ -1534,6 +1551,7 @@ declare const VListGroup: {
|
|
1534
1551
|
default: null;
|
1535
1552
|
};
|
1536
1553
|
activeColor: StringConstructor;
|
1554
|
+
baseColor: StringConstructor;
|
1537
1555
|
color: StringConstructor;
|
1538
1556
|
collapseIcon: {
|
1539
1557
|
type: vue.PropType<IconValue>;
|
@@ -20,7 +20,7 @@ import { useSsrBoot } from "../../composables/ssrBoot.mjs";
|
|
20
20
|
import { useSticky } from "./sticky.mjs";
|
21
21
|
import { useTouch } from "./touch.mjs"; // Utilities
|
22
22
|
import { computed, nextTick, onBeforeMount, ref, toRef, Transition, watch } from 'vue';
|
23
|
-
import {
|
23
|
+
import { genericComponent, toPhysical, useRender } from "../../util/index.mjs"; // Types
|
24
24
|
const locations = ['start', 'end', 'left', 'right', 'top', 'bottom'];
|
25
25
|
export const VNavigationDrawer = genericComponent()({
|
26
26
|
name: 'VNavigationDrawer',
|
@@ -150,7 +150,6 @@ export const VNavigationDrawer = genericComponent()({
|
|
150
150
|
});
|
151
151
|
const {
|
152
152
|
layoutItemStyles,
|
153
|
-
layoutRect,
|
154
153
|
layoutItemScrimStyles
|
155
154
|
} = useLayoutItem({
|
156
155
|
id: props.name,
|
@@ -180,12 +179,6 @@ export const VNavigationDrawer = genericComponent()({
|
|
180
179
|
opacity: dragProgress.value * 0.2,
|
181
180
|
transition: 'none'
|
182
181
|
} : undefined),
|
183
|
-
...(layoutRect.value ? {
|
184
|
-
left: convertToUnit(layoutRect.value.left),
|
185
|
-
right: convertToUnit(layoutRect.value.right),
|
186
|
-
top: convertToUnit(layoutRect.value.top),
|
187
|
-
bottom: convertToUnit(layoutRect.value.bottom)
|
188
|
-
} : undefined),
|
189
182
|
...layoutItemScrimStyles.value
|
190
183
|
}));
|
191
184
|
provideDefaults({
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"VNavigationDrawer.mjs","names":["makeBorderProps","useBorder","makeComponentProps","makeElevationProps","useElevation","makeLayoutItemProps","useLayoutItem","makeRoundedProps","useRounded","makeTagProps","makeThemeProps","provideTheme","provideDefaults","useBackgroundColor","useDisplay","useProxiedModel","useRouter","useRtl","useSsrBoot","useSticky","useTouch","computed","nextTick","onBeforeMount","ref","toRef","Transition","watch","convertToUnit","genericComponent","toPhysical","useRender","locations","VNavigationDrawer","name","props","color","String","disableResizeWatcher","Boolean","disableRouteWatcher","expandOnHover","floating","modelValue","type","default","permanent","rail","railWidth","Number","scrim","image","temporary","touchless","width","location","validator","value","includes","sticky","tag","emits","val","setup","_ref","attrs","emit","slots","isRtl","themeClasses","borderClasses","backgroundColorClasses","backgroundColorStyles","elevationClasses","mobile","roundedClasses","router","isActive","v","ssrBootStyles","rootEl","isHovering","isTemporary","isSticky","currentRoute","isDragging","dragProgress","dragStyles","position","layoutSize","size","layoutItemStyles","layoutRect","layoutItemScrimStyles","id","order","parseInt","elementSize","active","disableTransitions","absolute","isStuck","stickyStyles","scrimColor","scrimStyles","opacity","transition","undefined","left","right","top","bottom","VList","bgColor","onMouseenter","onMouseleave","hasImage","_createVNode","_Fragment","_mergeProps","class","style","prepend","append","onClick"],"sources":["../../../src/components/VNavigationDrawer/VNavigationDrawer.tsx"],"sourcesContent":["// Styles\nimport './VNavigationDrawer.sass'\n\n// Composables\nimport { makeBorderProps, useBorder } from '@/composables/border'\nimport { makeComponentProps } from '@/composables/component'\nimport { makeElevationProps, useElevation } from '@/composables/elevation'\nimport { makeLayoutItemProps, useLayoutItem } from '@/composables/layout'\nimport { makeRoundedProps, useRounded } from '@/composables/rounded'\nimport { makeTagProps } from '@/composables/tag'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\nimport { provideDefaults } from '@/composables/defaults'\nimport { useBackgroundColor } from '@/composables/color'\nimport { useDisplay } from '@/composables/display'\nimport { useProxiedModel } from '@/composables/proxiedModel'\nimport { useRouter } from '@/composables/router'\nimport { useRtl } from '@/composables'\nimport { useSsrBoot } from '@/composables/ssrBoot'\nimport { useSticky } from './sticky'\nimport { useTouch } from './touch'\n\n// Utilities\nimport { computed, nextTick, onBeforeMount, ref, toRef, Transition, watch } from 'vue'\nimport { convertToUnit, genericComponent, toPhysical, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\n\nexport type VNavigationDrawerImageSlot = {\n image: string\n}\n\nexport type VNavigationDrawerSlots = {\n default: []\n prepend: []\n append: []\n image: [VNavigationDrawerImageSlot]\n}\n\nconst locations = ['start', 'end', 'left', 'right', 'top', 'bottom'] as const\n\nexport const VNavigationDrawer = genericComponent<VNavigationDrawerSlots>()({\n name: 'VNavigationDrawer',\n\n props: {\n color: String,\n disableResizeWatcher: Boolean,\n disableRouteWatcher: Boolean,\n expandOnHover: Boolean,\n floating: Boolean,\n modelValue: {\n type: Boolean as PropType<boolean | null>,\n default: null,\n },\n permanent: Boolean,\n rail: {\n type: Boolean as PropType<boolean | null>,\n default: null,\n },\n railWidth: {\n type: [Number, String],\n default: 56,\n },\n scrim: {\n type: [String, Boolean],\n default: true,\n },\n image: String,\n temporary: Boolean,\n touchless: Boolean,\n width: {\n type: [Number, String],\n default: 256,\n },\n location: {\n type: String as PropType<typeof locations[number]>,\n default: 'start',\n validator: (value: any) => locations.includes(value),\n },\n sticky: Boolean,\n\n ...makeBorderProps(),\n ...makeComponentProps(),\n ...makeElevationProps(),\n ...makeLayoutItemProps(),\n ...makeRoundedProps(),\n ...makeTagProps({ tag: 'nav' }),\n ...makeThemeProps(),\n },\n\n emits: {\n 'update:modelValue': (val: boolean) => true,\n 'update:rail': (val: boolean) => true,\n },\n\n setup (props, { attrs, emit, slots }) {\n const { isRtl } = useRtl()\n const { themeClasses } = provideTheme(props)\n const { borderClasses } = useBorder(props)\n const { backgroundColorClasses, backgroundColorStyles } = useBackgroundColor(toRef(props, 'color'))\n const { elevationClasses } = useElevation(props)\n const { mobile } = useDisplay()\n const { roundedClasses } = useRounded(props)\n const router = useRouter()\n const isActive = useProxiedModel(props, 'modelValue', null, v => !!v)\n const { ssrBootStyles } = useSsrBoot()\n\n const rootEl = ref<HTMLElement>()\n const isHovering = ref(false)\n\n const width = computed(() => {\n return (props.rail && props.expandOnHover && isHovering.value)\n ? Number(props.width)\n : Number(props.rail ? props.railWidth : props.width)\n })\n const location = computed(() => {\n return toPhysical(props.location, isRtl.value) as 'left' | 'right' | 'bottom'\n })\n const isTemporary = computed(() => !props.permanent && (mobile.value || props.temporary))\n const isSticky = computed(() =>\n props.sticky &&\n !isTemporary.value &&\n location.value !== 'bottom'\n )\n\n if (props.expandOnHover && props.rail != null) {\n watch(isHovering, val => emit('update:rail', !val))\n }\n\n if (!props.disableResizeWatcher) {\n watch(isTemporary, val => !props.permanent && (nextTick(() => isActive.value = !val)))\n }\n\n if (!props.disableRouteWatcher && router) {\n watch(router.currentRoute, () => isTemporary.value && (isActive.value = false))\n }\n\n watch(() => props.permanent, val => {\n if (val) isActive.value = true\n })\n\n onBeforeMount(() => {\n if (props.modelValue != null || isTemporary.value) return\n\n isActive.value = props.permanent || !mobile.value\n })\n\n const { isDragging, dragProgress, dragStyles } = useTouch({\n isActive,\n isTemporary,\n width,\n touchless: toRef(props, 'touchless'),\n position: location,\n })\n\n const layoutSize = computed(() => {\n const size = isTemporary.value ? 0\n : props.rail && props.expandOnHover ? Number(props.railWidth)\n : width.value\n\n return isDragging.value ? size * dragProgress.value : size\n })\n\n const { layoutItemStyles, layoutRect, layoutItemScrimStyles } = useLayoutItem({\n id: props.name,\n order: computed(() => parseInt(props.order, 10)),\n position: location,\n layoutSize,\n elementSize: width,\n active: computed(() => isActive.value || isDragging.value),\n disableTransitions: computed(() => isDragging.value),\n absolute: computed(() =>\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n props.absolute || (isSticky.value && typeof isStuck.value !== 'string')\n ),\n })\n\n const { isStuck, stickyStyles } = useSticky({ rootEl, isSticky, layoutItemStyles })\n\n const scrimColor = useBackgroundColor(computed(() => {\n return typeof props.scrim === 'string' ? props.scrim : null\n }))\n const scrimStyles = computed(() => ({\n ...isDragging.value ? {\n opacity: dragProgress.value * 0.2,\n transition: 'none',\n } : undefined,\n ...layoutRect.value ? {\n left: convertToUnit(layoutRect.value.left),\n right: convertToUnit(layoutRect.value.right),\n top: convertToUnit(layoutRect.value.top),\n bottom: convertToUnit(layoutRect.value.bottom),\n } : undefined,\n ...layoutItemScrimStyles.value,\n }))\n\n provideDefaults({\n VList: {\n bgColor: 'transparent',\n },\n })\n\n function onMouseenter () {\n isHovering.value = true\n }\n function onMouseleave () {\n isHovering.value = false\n }\n\n useRender(() => {\n const hasImage = (slots.image || props.image)\n\n return (\n <>\n <props.tag\n ref={ rootEl }\n onMouseenter={ onMouseenter }\n onMouseleave={ onMouseleave }\n class={[\n 'v-navigation-drawer',\n `v-navigation-drawer--${location.value}`,\n {\n 'v-navigation-drawer--expand-on-hover': props.expandOnHover,\n 'v-navigation-drawer--floating': props.floating,\n 'v-navigation-drawer--is-hovering': isHovering.value,\n 'v-navigation-drawer--rail': props.rail,\n 'v-navigation-drawer--temporary': isTemporary.value,\n 'v-navigation-drawer--active': isActive.value,\n 'v-navigation-drawer--sticky': isSticky.value,\n },\n themeClasses.value,\n backgroundColorClasses.value,\n borderClasses.value,\n elevationClasses.value,\n roundedClasses.value,\n props.class,\n ]}\n style={[\n backgroundColorStyles.value,\n layoutItemStyles.value,\n dragStyles.value,\n ssrBootStyles.value,\n stickyStyles.value,\n props.style,\n ]}\n { ...attrs }\n >\n { hasImage && (\n <div key=\"image\" class=\"v-navigation-drawer__img\">\n { slots.image\n ? slots.image?.({ image: props.image })\n : (<img src={ props.image } alt=\"\" />)\n }\n </div>\n )}\n\n { slots.prepend && (\n <div class=\"v-navigation-drawer__prepend\">\n { slots.prepend?.() }\n </div>\n )}\n\n <div class=\"v-navigation-drawer__content\">\n { slots.default?.() }\n </div>\n\n { slots.append && (\n <div class=\"v-navigation-drawer__append\">\n { slots.append?.() }\n </div>\n )}\n </props.tag>\n\n <Transition name=\"fade-transition\">\n { isTemporary.value && (isDragging.value || isActive.value) && !!props.scrim && (\n <div\n class={['v-navigation-drawer__scrim', scrimColor.backgroundColorClasses.value]}\n style={[scrimStyles.value, scrimColor.backgroundColorStyles.value]}\n onClick={ () => isActive.value = false }\n />\n )}\n </Transition>\n </>\n )\n })\n\n return {\n isStuck,\n }\n },\n})\n\nexport type VNavigationDrawer = InstanceType<typeof VNavigationDrawer>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,eAAe,EAAEC,SAAS;AAAA,SAC1BC,kBAAkB;AAAA,SAClBC,kBAAkB,EAAEC,YAAY;AAAA,SAChCC,mBAAmB,EAAEC,aAAa;AAAA,SAClCC,gBAAgB,EAAEC,UAAU;AAAA,SAC5BC,YAAY;AAAA,SACZC,cAAc,EAAEC,YAAY;AAAA,SAC5BC,eAAe;AAAA,SACfC,kBAAkB;AAAA,SAClBC,UAAU;AAAA,SACVC,eAAe;AAAA,SACfC,SAAS;AAAA,SACTC,MAAM;AAAA,SACNC,UAAU;AAAA,SACVC,SAAS;AAAA,SACTC,QAAQ,uBAEjB;AACA,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,aAAa,EAAEC,GAAG,EAAEC,KAAK,EAAEC,UAAU,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAC7EC,aAAa,EAAEC,gBAAgB,EAAEC,UAAU,EAAEC,SAAS,gCAE/D;AAcA,MAAMC,SAAS,GAAG,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAU;AAE7E,OAAO,MAAMC,iBAAiB,GAAGJ,gBAAgB,EAA0B,CAAC;EAC1EK,IAAI,EAAE,mBAAmB;EAEzBC,KAAK,EAAE;IACLC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O;QAAE,QAAI,EAG3C,EAECgB,KAAK,CAACuD,OAAO,IAAAL,YAAA;UAAA,SACF;QAA8B,IACrClD,KAAK,CAACuD,OAAO,IAAI,EAEtB,EAAAL,YAAA;UAAA,SAEU;QAA8B,IACrClD,KAAK,CAACtB,OAAO,IAAI,IAGnBsB,KAAK,CAACwD,MAAM,IAAAN,YAAA;UAAA,SACD;QAA6B,IACpClD,KAAK,CAACwD,MAAM,IAAI,EAErB;MAAA,IAAAN,YAAA,CAAA3F,UAAA;QAAA,QAGc;MAAiB;QAAAmB,OAAA,EAAAA,CAAA,MAC9BqC,WAAW,CAACzB,KAAK,KAAK4B,UAAU,CAAC5B,KAAK,IAAIoB,QAAQ,CAACpB,KAAK,CAAC,IAAI,CAAC,CAACtB,KAAK,CAACe,KAAK,IAAAmE,YAAA;UAAA,SAEjE,CAAC,4BAA4B,EAAEd,UAAU,CAAChC,sBAAsB,CAACd,KAAK,CAAC;UAAA,SACvE,CAAC+C,WAAW,CAAC/C,KAAK,EAAE8C,UAAU,CAAC/B,qBAAqB,CAACf,KAAK,CAAC;UAAA,WACxDmE,CAAA,KAAM/C,QAAQ,CAACpB,KAAK,GAAG;QAAK,QAEzC;MAAA;IAIT,CAAC,CAAC;IAEF,OAAO;MACL4C;IACF,CAAC;EACH;AACF,CAAC,CAAC"}
|
1
|
+
{"version":3,"file":"VNavigationDrawer.mjs","names":["makeBorderProps","useBorder","makeComponentProps","makeElevationProps","useElevation","makeLayoutItemProps","useLayoutItem","makeRoundedProps","useRounded","makeTagProps","makeThemeProps","provideTheme","provideDefaults","useBackgroundColor","useDisplay","useProxiedModel","useRouter","useRtl","useSsrBoot","useSticky","useTouch","computed","nextTick","onBeforeMount","ref","toRef","Transition","watch","genericComponent","toPhysical","useRender","locations","VNavigationDrawer","name","props","color","String","disableResizeWatcher","Boolean","disableRouteWatcher","expandOnHover","floating","modelValue","type","default","permanent","rail","railWidth","Number","scrim","image","temporary","touchless","width","location","validator","value","includes","sticky","tag","emits","val","setup","_ref","attrs","emit","slots","isRtl","themeClasses","borderClasses","backgroundColorClasses","backgroundColorStyles","elevationClasses","mobile","roundedClasses","router","isActive","v","ssrBootStyles","rootEl","isHovering","isTemporary","isSticky","currentRoute","isDragging","dragProgress","dragStyles","position","layoutSize","size","layoutItemStyles","layoutItemScrimStyles","id","order","parseInt","elementSize","active","disableTransitions","absolute","isStuck","stickyStyles","scrimColor","scrimStyles","opacity","transition","undefined","VList","bgColor","onMouseenter","onMouseleave","hasImage","_createVNode","_Fragment","_mergeProps","class","style","prepend","append","onClick"],"sources":["../../../src/components/VNavigationDrawer/VNavigationDrawer.tsx"],"sourcesContent":["// Styles\nimport './VNavigationDrawer.sass'\n\n// Composables\nimport { makeBorderProps, useBorder } from '@/composables/border'\nimport { makeComponentProps } from '@/composables/component'\nimport { makeElevationProps, useElevation } from '@/composables/elevation'\nimport { makeLayoutItemProps, useLayoutItem } from '@/composables/layout'\nimport { makeRoundedProps, useRounded } from '@/composables/rounded'\nimport { makeTagProps } from '@/composables/tag'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\nimport { provideDefaults } from '@/composables/defaults'\nimport { useBackgroundColor } from '@/composables/color'\nimport { useDisplay } from '@/composables/display'\nimport { useProxiedModel } from '@/composables/proxiedModel'\nimport { useRouter } from '@/composables/router'\nimport { useRtl } from '@/composables'\nimport { useSsrBoot } from '@/composables/ssrBoot'\nimport { useSticky } from './sticky'\nimport { useTouch } from './touch'\n\n// Utilities\nimport { computed, nextTick, onBeforeMount, ref, toRef, Transition, watch } from 'vue'\nimport { genericComponent, toPhysical, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\n\nexport type VNavigationDrawerImageSlot = {\n image: string\n}\n\nexport type VNavigationDrawerSlots = {\n default: []\n prepend: []\n append: []\n image: [VNavigationDrawerImageSlot]\n}\n\nconst locations = ['start', 'end', 'left', 'right', 'top', 'bottom'] as const\n\nexport const VNavigationDrawer = genericComponent<VNavigationDrawerSlots>()({\n name: 'VNavigationDrawer',\n\n props: {\n color: String,\n disableResizeWatcher: Boolean,\n disableRouteWatcher: Boolean,\n expandOnHover: Boolean,\n floating: Boolean,\n modelValue: {\n type: Boolean as PropType<boolean | null>,\n default: null,\n },\n permanent: Boolean,\n rail: {\n type: Boolean as PropType<boolean | null>,\n default: null,\n },\n railWidth: {\n type: [Number, String],\n default: 56,\n },\n scrim: {\n type: [String, Boolean],\n default: true,\n },\n image: String,\n temporary: Boolean,\n touchless: Boolean,\n width: {\n type: [Number, String],\n default: 256,\n },\n location: {\n type: String as PropType<typeof locations[number]>,\n default: 'start',\n validator: (value: any) => locations.includes(value),\n },\n sticky: Boolean,\n\n ...makeBorderProps(),\n ...makeComponentProps(),\n ...makeElevationProps(),\n ...makeLayoutItemProps(),\n ...makeRoundedProps(),\n ...makeTagProps({ tag: 'nav' }),\n ...makeThemeProps(),\n },\n\n emits: {\n 'update:modelValue': (val: boolean) => true,\n 'update:rail': (val: boolean) => true,\n },\n\n setup (props, { attrs, emit, slots }) {\n const { isRtl } = useRtl()\n const { themeClasses } = provideTheme(props)\n const { borderClasses } = useBorder(props)\n const { backgroundColorClasses, backgroundColorStyles } = useBackgroundColor(toRef(props, 'color'))\n const { elevationClasses } = useElevation(props)\n const { mobile } = useDisplay()\n const { roundedClasses } = useRounded(props)\n const router = useRouter()\n const isActive = useProxiedModel(props, 'modelValue', null, v => !!v)\n const { ssrBootStyles } = useSsrBoot()\n\n const rootEl = ref<HTMLElement>()\n const isHovering = ref(false)\n\n const width = computed(() => {\n return (props.rail && props.expandOnHover && isHovering.value)\n ? Number(props.width)\n : Number(props.rail ? props.railWidth : props.width)\n })\n const location = computed(() => {\n return toPhysical(props.location, isRtl.value) as 'left' | 'right' | 'bottom'\n })\n const isTemporary = computed(() => !props.permanent && (mobile.value || props.temporary))\n const isSticky = computed(() =>\n props.sticky &&\n !isTemporary.value &&\n location.value !== 'bottom'\n )\n\n if (props.expandOnHover && props.rail != null) {\n watch(isHovering, val => emit('update:rail', !val))\n }\n\n if (!props.disableResizeWatcher) {\n watch(isTemporary, val => !props.permanent && (nextTick(() => isActive.value = !val)))\n }\n\n if (!props.disableRouteWatcher && router) {\n watch(router.currentRoute, () => isTemporary.value && (isActive.value = false))\n }\n\n watch(() => props.permanent, val => {\n if (val) isActive.value = true\n })\n\n onBeforeMount(() => {\n if (props.modelValue != null || isTemporary.value) return\n\n isActive.value = props.permanent || !mobile.value\n })\n\n const { isDragging, dragProgress, dragStyles } = useTouch({\n isActive,\n isTemporary,\n width,\n touchless: toRef(props, 'touchless'),\n position: location,\n })\n\n const layoutSize = computed(() => {\n const size = isTemporary.value ? 0\n : props.rail && props.expandOnHover ? Number(props.railWidth)\n : width.value\n\n return isDragging.value ? size * dragProgress.value : size\n })\n\n const { layoutItemStyles, layoutItemScrimStyles } = useLayoutItem({\n id: props.name,\n order: computed(() => parseInt(props.order, 10)),\n position: location,\n layoutSize,\n elementSize: width,\n active: computed(() => isActive.value || isDragging.value),\n disableTransitions: computed(() => isDragging.value),\n absolute: computed(() =>\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n props.absolute || (isSticky.value && typeof isStuck.value !== 'string')\n ),\n })\n\n const { isStuck, stickyStyles } = useSticky({ rootEl, isSticky, layoutItemStyles })\n\n const scrimColor = useBackgroundColor(computed(() => {\n return typeof props.scrim === 'string' ? props.scrim : null\n }))\n const scrimStyles = computed(() => ({\n ...isDragging.value ? {\n opacity: dragProgress.value * 0.2,\n transition: 'none',\n } : undefined,\n ...layoutItemScrimStyles.value,\n }))\n\n provideDefaults({\n VList: {\n bgColor: 'transparent',\n },\n })\n\n function onMouseenter () {\n isHovering.value = true\n }\n function onMouseleave () {\n isHovering.value = false\n }\n\n useRender(() => {\n const hasImage = (slots.image || props.image)\n\n return (\n <>\n <props.tag\n ref={ rootEl }\n onMouseenter={ onMouseenter }\n onMouseleave={ onMouseleave }\n class={[\n 'v-navigation-drawer',\n `v-navigation-drawer--${location.value}`,\n {\n 'v-navigation-drawer--expand-on-hover': props.expandOnHover,\n 'v-navigation-drawer--floating': props.floating,\n 'v-navigation-drawer--is-hovering': isHovering.value,\n 'v-navigation-drawer--rail': props.rail,\n 'v-navigation-drawer--temporary': isTemporary.value,\n 'v-navigation-drawer--active': isActive.value,\n 'v-navigation-drawer--sticky': isSticky.value,\n },\n themeClasses.value,\n backgroundColorClasses.value,\n borderClasses.value,\n elevationClasses.value,\n roundedClasses.value,\n props.class,\n ]}\n style={[\n backgroundColorStyles.value,\n layoutItemStyles.value,\n dragStyles.value,\n ssrBootStyles.value,\n stickyStyles.value,\n props.style,\n ]}\n { ...attrs }\n >\n { hasImage && (\n <div key=\"image\" class=\"v-navigation-drawer__img\">\n { slots.image\n ? slots.image?.({ image: props.image })\n : (<img src={ props.image } alt=\"\" />)\n }\n </div>\n )}\n\n { slots.prepend && (\n <div class=\"v-navigation-drawer__prepend\">\n { slots.prepend?.() }\n </div>\n )}\n\n <div class=\"v-navigation-drawer__content\">\n { slots.default?.() }\n </div>\n\n { slots.append && (\n <div class=\"v-navigation-drawer__append\">\n { slots.append?.() }\n </div>\n )}\n </props.tag>\n\n <Transition name=\"fade-transition\">\n { isTemporary.value && (isDragging.value || isActive.value) && !!props.scrim && (\n <div\n class={['v-navigation-drawer__scrim', scrimColor.backgroundColorClasses.value]}\n style={[scrimStyles.value, scrimColor.backgroundColorStyles.value]}\n onClick={ () => isActive.value = false }\n />\n )}\n </Transition>\n </>\n )\n })\n\n return {\n isStuck,\n }\n },\n})\n\nexport type VNavigationDrawer = InstanceType<typeof VNavigationDrawer>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,eAAe,EAAEC,SAAS;AAAA,SAC1BC,kBAAkB;AAAA,SAClBC,kBAAkB,EAAEC,YAAY;AAAA,SAChCC,mBAAmB,EAAEC,aAAa;AAAA,SAClCC,gBAAgB,EAAEC,UAAU;AAAA,SAC5BC,YAAY;AAAA,SACZC,cAAc,EAAEC,YAAY;AAAA,SAC5BC,eAAe;AAAA,SACfC,kBAAk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,KAAK,GACTgB,KAAK,CAAChB,KAAK,GAAG;UAAEA,KAAK,EAAEhB,KAAK,CAACgB;QAAM,CAAC,CAAC,GAAA6D,YAAA;UAAA,OACzB7E,KAAK,CAACgB,KAAK;UAAA,OAAO;QAAE,QAAI,EAG3C,EAECgB,KAAK,CAACkD,OAAO,IAAAL,YAAA;UAAA,SACF;QAA8B,IACrC7C,KAAK,CAACkD,OAAO,IAAI,EAEtB,EAAAL,YAAA;UAAA,SAEU;QAA8B,IACrC7C,KAAK,CAACtB,OAAO,IAAI,IAGnBsB,KAAK,CAACmD,MAAM,IAAAN,YAAA;UAAA,SACD;QAA6B,IACpC7C,KAAK,CAACmD,MAAM,IAAI,EAErB;MAAA,IAAAN,YAAA,CAAArF,UAAA;QAAA,QAGc;MAAiB;QAAAkB,OAAA,EAAAA,CAAA,MAC9BqC,WAAW,CAACzB,KAAK,KAAK4B,UAAU,CAAC5B,KAAK,IAAIoB,QAAQ,CAACpB,KAAK,CAAC,IAAI,CAAC,CAACtB,KAAK,CAACe,KAAK,IAAA8D,YAAA;UAAA,SAEjE,CAAC,4BAA4B,EAAEV,UAAU,CAAC/B,sBAAsB,CAACd,KAAK,CAAC;UAAA,SACvE,CAAC8C,WAAW,CAAC9C,KAAK,EAAE6C,UAAU,CAAC9B,qBAAqB,CAACf,KAAK,CAAC;UAAA,WACxD8D,CAAA,KAAM1C,QAAQ,CAACpB,KAAK,GAAG;QAAK,QAEzC;MAAA;IAIT,CAAC,CAAC;IAEF,OAAO;MACL2C;IACF,CAAC;EACH;AACF,CAAC,CAAC"}
|
@@ -98,7 +98,7 @@ declare const VRadioGroup: {
|
|
98
98
|
appendIcon?: IconValue | undefined;
|
99
99
|
'onClick:append'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
|
100
100
|
'onClick:prepend'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
|
101
|
-
'onUpdate:focused'?: EventProp<[
|
101
|
+
'onUpdate:focused'?: EventProp<[boolean], (args_0: boolean) => any> | undefined;
|
102
102
|
validateOn?: "input" | "blur" | "submit" | undefined;
|
103
103
|
validationValue?: any;
|
104
104
|
hint?: string | undefined;
|
@@ -184,7 +184,7 @@ declare const VRadioGroup: {
|
|
184
184
|
appendIcon?: IconValue | undefined;
|
185
185
|
'onClick:append'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
|
186
186
|
'onClick:prepend'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
|
187
|
-
'onUpdate:focused'?: EventProp<[
|
187
|
+
'onUpdate:focused'?: EventProp<[boolean], (args_0: boolean) => any> | undefined;
|
188
188
|
validateOn?: "input" | "blur" | "submit" | undefined;
|
189
189
|
validationValue?: any;
|
190
190
|
hint?: string | undefined;
|
@@ -298,7 +298,7 @@ declare const VRadioGroup: {
|
|
298
298
|
appendIcon?: IconValue | undefined;
|
299
299
|
'onClick:append'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
|
300
300
|
'onClick:prepend'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
|
301
|
-
'onUpdate:focused'?: EventProp<[
|
301
|
+
'onUpdate:focused'?: EventProp<[boolean], (args_0: boolean) => any> | undefined;
|
302
302
|
validateOn?: "input" | "blur" | "submit" | undefined;
|
303
303
|
validationValue?: any;
|
304
304
|
hint?: string | undefined;
|
@@ -374,7 +374,7 @@ declare const VRadioGroup: {
|
|
374
374
|
appendIcon?: IconValue | undefined;
|
375
375
|
'onClick:append'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
|
376
376
|
'onClick:prepend'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
|
377
|
-
'onUpdate:focused'?: EventProp<[
|
377
|
+
'onUpdate:focused'?: EventProp<[boolean], (args_0: boolean) => any> | undefined;
|
378
378
|
validateOn?: "input" | "blur" | "submit" | undefined;
|
379
379
|
validationValue?: any;
|
380
380
|
hint?: string | undefined;
|
@@ -472,7 +472,7 @@ declare const VRadioGroup: {
|
|
472
472
|
default: typeof deepEqual;
|
473
473
|
};
|
474
474
|
focused: BooleanConstructor;
|
475
|
-
'onUpdate:focused': vue.PropType<EventProp<[
|
475
|
+
'onUpdate:focused': vue.PropType<EventProp<[boolean], (args_0: boolean) => any>>;
|
476
476
|
errorMessages: {
|
477
477
|
type: vue.PropType<string | string[]>;
|
478
478
|
default: () => never[];
|
@@ -549,7 +549,7 @@ declare const VRadioGroup: {
|
|
549
549
|
default: typeof deepEqual;
|
550
550
|
};
|
551
551
|
focused: BooleanConstructor;
|
552
|
-
'onUpdate:focused': vue.PropType<EventProp<[
|
552
|
+
'onUpdate:focused': vue.PropType<EventProp<[boolean], (args_0: boolean) => any>>;
|
553
553
|
errorMessages: {
|
554
554
|
type: vue.PropType<string | string[]>;
|
555
555
|
default: () => never[];
|
@@ -95,7 +95,7 @@ declare const VRangeSlider: {
|
|
95
95
|
appendIcon?: IconValue | undefined;
|
96
96
|
'onClick:append'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
|
97
97
|
'onClick:prepend'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
|
98
|
-
'onUpdate:focused'?: EventProp<[
|
98
|
+
'onUpdate:focused'?: EventProp<[boolean], (args_0: boolean) => any> | undefined;
|
99
99
|
validateOn?: "input" | "blur" | "submit" | undefined;
|
100
100
|
validationValue?: any;
|
101
101
|
hint?: string | undefined;
|
@@ -183,7 +183,7 @@ declare const VRangeSlider: {
|
|
183
183
|
appendIcon?: IconValue | undefined;
|
184
184
|
'onClick:append'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
|
185
185
|
'onClick:prepend'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
|
186
|
-
'onUpdate:focused'?: EventProp<[
|
186
|
+
'onUpdate:focused'?: EventProp<[boolean], (args_0: boolean) => any> | undefined;
|
187
187
|
validateOn?: "input" | "blur" | "submit" | undefined;
|
188
188
|
validationValue?: any;
|
189
189
|
hint?: string | undefined;
|
@@ -308,7 +308,7 @@ declare const VRangeSlider: {
|
|
308
308
|
appendIcon?: IconValue | undefined;
|
309
309
|
'onClick:append'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
|
310
310
|
'onClick:prepend'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
|
311
|
-
'onUpdate:focused'?: EventProp<[
|
311
|
+
'onUpdate:focused'?: EventProp<[boolean], (args_0: boolean) => any> | undefined;
|
312
312
|
validateOn?: "input" | "blur" | "submit" | undefined;
|
313
313
|
validationValue?: any;
|
314
314
|
hint?: string | undefined;
|
@@ -386,7 +386,7 @@ declare const VRangeSlider: {
|
|
386
386
|
appendIcon?: IconValue | undefined;
|
387
387
|
'onClick:append'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
|
388
388
|
'onClick:prepend'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
|
389
|
-
'onUpdate:focused'?: EventProp<[
|
389
|
+
'onUpdate:focused'?: EventProp<[boolean], (args_0: boolean) => any> | undefined;
|
390
390
|
validateOn?: "input" | "blur" | "submit" | undefined;
|
391
391
|
validationValue?: any;
|
392
392
|
hint?: string | undefined;
|
@@ -524,7 +524,7 @@ declare const VRangeSlider: {
|
|
524
524
|
};
|
525
525
|
reverse: BooleanConstructor;
|
526
526
|
focused: BooleanConstructor;
|
527
|
-
'onUpdate:focused': PropType<EventProp<[
|
527
|
+
'onUpdate:focused': PropType<EventProp<[boolean], (args_0: boolean) => any>>;
|
528
528
|
errorMessages: {
|
529
529
|
type: PropType<string | string[]>;
|
530
530
|
default: () => never[];
|
@@ -631,7 +631,7 @@ declare const VRangeSlider: {
|
|
631
631
|
};
|
632
632
|
reverse: BooleanConstructor;
|
633
633
|
focused: BooleanConstructor;
|
634
|
-
'onUpdate:focused': PropType<EventProp<[
|
634
|
+
'onUpdate:focused': PropType<EventProp<[boolean], (args_0: boolean) => any>>;
|
635
635
|
errorMessages: {
|
636
636
|
type: PropType<string | string[]>;
|
637
637
|
default: () => never[];
|
@@ -1,23 +1,31 @@
|
|
1
1
|
.v-responsive {
|
2
|
-
display:
|
2
|
+
display: grid;
|
3
|
+
grid-template-rows: minmax(100%, 1fr);
|
4
|
+
grid-template-columns: 1fr;
|
3
5
|
flex: 1 0 auto;
|
4
6
|
max-height: 100%;
|
5
7
|
max-width: 100%;
|
6
8
|
overflow: hidden;
|
7
9
|
position: relative;
|
8
10
|
}
|
11
|
+
.v-responsive--inline {
|
12
|
+
display: inline-grid;
|
13
|
+
flex: 0 0 auto;
|
14
|
+
}
|
9
15
|
|
10
16
|
.v-responsive__content {
|
11
17
|
flex: 1 0 0px;
|
12
18
|
max-width: 100%;
|
13
19
|
}
|
14
20
|
|
15
|
-
.v-responsive__sizer ~ .v-responsive__content {
|
16
|
-
margin-inline-start: -100%;
|
17
|
-
}
|
18
|
-
|
19
21
|
.v-responsive__sizer {
|
20
22
|
flex: 1 0 0px;
|
21
23
|
transition: padding-bottom 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
22
24
|
pointer-events: none;
|
25
|
+
}
|
26
|
+
|
27
|
+
.v-responsive__sizer,
|
28
|
+
.v-responsive__content {
|
29
|
+
grid-row-start: 1;
|
30
|
+
grid-column-start: 1;
|
23
31
|
}
|
@@ -6,7 +6,7 @@ import "./VResponsive.css";
|
|
6
6
|
import { makeComponentProps } from "../../composables/component.mjs";
|
7
7
|
import { makeDimensionProps, useDimension } from "../../composables/dimensions.mjs"; // Utilities
|
8
8
|
import { computed } from 'vue';
|
9
|
-
import { genericComponent, useRender } from "../../util/index.mjs";
|
9
|
+
import { genericComponent, propsFactory, useRender } from "../../util/index.mjs";
|
10
10
|
export function useAspectStyles(props) {
|
11
11
|
return {
|
12
12
|
aspectStyles: computed(() => {
|
@@ -17,14 +17,16 @@ export function useAspectStyles(props) {
|
|
17
17
|
})
|
18
18
|
};
|
19
19
|
}
|
20
|
+
export const makeVResponsiveProps = propsFactory({
|
21
|
+
aspectRatio: [String, Number],
|
22
|
+
contentClass: String,
|
23
|
+
inline: Boolean,
|
24
|
+
...makeComponentProps(),
|
25
|
+
...makeDimensionProps()
|
26
|
+
}, 'v-responsive');
|
20
27
|
export const VResponsive = genericComponent()({
|
21
28
|
name: 'VResponsive',
|
22
|
-
props:
|
23
|
-
aspectRatio: [String, Number],
|
24
|
-
contentClass: String,
|
25
|
-
...makeComponentProps(),
|
26
|
-
...makeDimensionProps()
|
27
|
-
},
|
29
|
+
props: makeVResponsiveProps(),
|
28
30
|
setup(props, _ref) {
|
29
31
|
let {
|
30
32
|
slots
|
@@ -36,7 +38,9 @@ export const VResponsive = genericComponent()({
|
|
36
38
|
dimensionStyles
|
37
39
|
} = useDimension(props);
|
38
40
|
useRender(() => _createVNode("div", {
|
39
|
-
"class": ['v-responsive',
|
41
|
+
"class": ['v-responsive', {
|
42
|
+
'v-responsive--inline': props.inline
|
43
|
+
}, props.class],
|
40
44
|
"style": [dimensionStyles.value, props.style]
|
41
45
|
}, [_createVNode("div", {
|
42
46
|
"class": "v-responsive__sizer",
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"VResponsive.mjs","names":["makeComponentProps","makeDimensionProps","useDimension","computed","genericComponent","useRender","useAspectStyles","props","aspectStyles","ratio","Number","aspectRatio","paddingBottom","String","undefined","
|
1
|
+
{"version":3,"file":"VResponsive.mjs","names":["makeComponentProps","makeDimensionProps","useDimension","computed","genericComponent","propsFactory","useRender","useAspectStyles","props","aspectStyles","ratio","Number","aspectRatio","paddingBottom","String","undefined","makeVResponsiveProps","contentClass","inline","Boolean","VResponsive","name","setup","_ref","slots","dimensionStyles","_createVNode","class","value","style","additional","default"],"sources":["../../../src/components/VResponsive/VResponsive.tsx"],"sourcesContent":["// Styles\nimport './VResponsive.sass'\n\n// Composables\nimport { makeComponentProps } from '@/composables/component'\nimport { makeDimensionProps, useDimension } from '@/composables/dimensions'\n\n// Utilities\nimport { computed } from 'vue'\nimport { genericComponent, propsFactory, useRender } from '@/util'\n\nexport type VResponsiveSlots = {\n default: []\n additional: []\n}\n\nexport function useAspectStyles (props: { aspectRatio?: string | number }) {\n return {\n aspectStyles: computed(() => {\n const ratio = Number(props.aspectRatio)\n\n return ratio\n ? { paddingBottom: String(1 / ratio * 100) + '%' }\n : undefined\n }),\n }\n}\n\nexport const makeVResponsiveProps = propsFactory({\n aspectRatio: [String, Number],\n contentClass: String,\n inline: Boolean,\n\n ...makeComponentProps(),\n ...makeDimensionProps(),\n}, 'v-responsive')\n\nexport const VResponsive = genericComponent<VResponsiveSlots>()({\n name: 'VResponsive',\n\n props: makeVResponsiveProps(),\n\n setup (props, { slots }) {\n const { aspectStyles } = useAspectStyles(props)\n const { dimensionStyles } = useDimension(props)\n\n useRender(() => (\n <div\n class={[\n 'v-responsive',\n { 'v-responsive--inline': props.inline },\n props.class,\n ]}\n style={[\n dimensionStyles.value,\n props.style,\n ]}\n >\n <div class=\"v-responsive__sizer\" style={ aspectStyles.value } />\n\n { slots.additional?.() }\n\n { slots.default && (\n <div class={['v-responsive__content', props.contentClass]}>{ slots.default() }</div>\n )}\n </div>\n ))\n\n return {}\n },\n})\n\nexport type VResponsive = InstanceType<typeof VResponsive>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,kBAAkB;AAAA,SAClBC,kBAAkB,EAAEC,YAAY,4CAEzC;AACA,SAASC,QAAQ,QAAQ,KAAK;AAAA,SACrBC,gBAAgB,EAAEC,YAAY,EAAEC,SAAS;AAOlD,OAAO,SAASC,eAAeA,CAAEC,KAAwC,EAAE;EACzE,OAAO;IACLC,YAAY,EAAEN,QAAQ,CAAC,MAAM;MAC3B,MAAMO,KAAK,GAAGC,MAAM,CAACH,KAAK,CAACI,WAAW,CAAC;MAEvC,OAAOF,KAAK,GACR;QAAEG,aAAa,EAAEC,MAAM,CAAC,CAAC,GAAGJ,KAAK,GAAG,GAAG,CAAC,GAAG;MAAI,CAAC,GAChDK,SAAS;IACf,CAAC;EACH,CAAC;AACH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
grid-template-columns: 1fr
|
5
7
|
flex: 1 0 auto
|
6
8
|
max-height: 100%
|
7
9
|
max-width: 100%
|
8
10
|
overflow: hidden
|
9
11
|
position: relative
|
10
12
|
|
13
|
+
&--inline
|
14
|
+
display: inline-grid
|
15
|
+
flex: 0 0 auto
|
16
|
+
|
11
17
|
.v-responsive__content
|
12
18
|
flex: 1 0 0px
|
13
19
|
max-width: 100%
|
14
20
|
|
15
|
-
.v-responsive__sizer ~ .v-responsive__content
|
16
|
-
margin-inline-start: -100%
|
17
|
-
|
18
21
|
.v-responsive__sizer
|
19
22
|
flex: 1 0 0px
|
20
23
|
transition: padding-bottom 0.2s settings.$standard-easing
|
21
24
|
pointer-events: none
|
25
|
+
|
26
|
+
.v-responsive__sizer,
|
27
|
+
.v-responsive__content
|
28
|
+
grid-row-start: 1
|
29
|
+
grid-column-start: 1
|
@@ -10,8 +10,10 @@ declare const VResponsive: {
|
|
10
10
|
$: vue.ComponentInternalInstance;
|
11
11
|
$data: {};
|
12
12
|
$props: Partial<{
|
13
|
+
inline: boolean;
|
13
14
|
style: vue.StyleValue;
|
14
15
|
}> & Omit<{
|
16
|
+
inline: boolean;
|
15
17
|
style: vue.StyleValue;
|
16
18
|
} & {
|
17
19
|
height?: string | number | undefined;
|
@@ -35,7 +37,7 @@ declare const VResponsive: {
|
|
35
37
|
} & {
|
36
38
|
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
|
37
39
|
"v-slot:additional"?: false | (() => vue.VNodeChild) | undefined;
|
38
|
-
} & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, "style">;
|
40
|
+
} & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, "inline" | "style">;
|
39
41
|
$attrs: {
|
40
42
|
[x: string]: unknown;
|
41
43
|
};
|
@@ -50,6 +52,7 @@ declare const VResponsive: {
|
|
50
52
|
$emit: (event: string, ...args: any[]) => void;
|
51
53
|
$el: any;
|
52
54
|
$options: vue.ComponentOptionsBase<{
|
55
|
+
inline: boolean;
|
53
56
|
style: vue.StyleValue;
|
54
57
|
} & {
|
55
58
|
height?: string | number | undefined;
|
@@ -74,6 +77,7 @@ declare const VResponsive: {
|
|
74
77
|
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
|
75
78
|
"v-slot:additional"?: false | (() => vue.VNodeChild) | undefined;
|
76
79
|
}, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, string, {
|
80
|
+
inline: boolean;
|
77
81
|
style: vue.StyleValue;
|
78
82
|
}, {}, string> & {
|
79
83
|
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
@@ -96,6 +100,7 @@ declare const VResponsive: {
|
|
96
100
|
$nextTick: typeof vue.nextTick;
|
97
101
|
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: vue.WatchOptions<boolean> | undefined): vue.WatchStopHandle;
|
98
102
|
} & {
|
103
|
+
inline: boolean;
|
99
104
|
style: vue.StyleValue;
|
100
105
|
} & {
|
101
106
|
height?: string | number | undefined;
|
@@ -124,6 +129,7 @@ declare const VResponsive: {
|
|
124
129
|
__isTeleport?: undefined;
|
125
130
|
__isSuspense?: undefined;
|
126
131
|
} & vue.ComponentOptionsBase<{
|
132
|
+
inline: boolean;
|
127
133
|
style: vue.StyleValue;
|
128
134
|
} & {
|
129
135
|
height?: string | number | undefined;
|
@@ -148,6 +154,7 @@ declare const VResponsive: {
|
|
148
154
|
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
|
149
155
|
"v-slot:additional"?: false | (() => vue.VNodeChild) | undefined;
|
150
156
|
}, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, string, {
|
157
|
+
inline: boolean;
|
151
158
|
style: vue.StyleValue;
|
152
159
|
}, {}, string> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & FilterPropsOptions<{
|
153
160
|
height: (StringConstructor | NumberConstructor)[];
|
@@ -163,6 +170,7 @@ declare const VResponsive: {
|
|
163
170
|
};
|
164
171
|
aspectRatio: (StringConstructor | NumberConstructor)[];
|
165
172
|
contentClass: StringConstructor;
|
173
|
+
inline: BooleanConstructor;
|
166
174
|
}, vue.ExtractPropTypes<{
|
167
175
|
height: (StringConstructor | NumberConstructor)[];
|
168
176
|
maxHeight: (StringConstructor | NumberConstructor)[];
|
@@ -177,6 +185,7 @@ declare const VResponsive: {
|
|
177
185
|
};
|
178
186
|
aspectRatio: (StringConstructor | NumberConstructor)[];
|
179
187
|
contentClass: StringConstructor;
|
188
|
+
inline: BooleanConstructor;
|
180
189
|
}>>;
|
181
190
|
type VResponsive = InstanceType<typeof VResponsive>;
|
182
191
|
|
@@ -10,6 +10,7 @@ import { VDefaultsProvider } from "../VDefaultsProvider/index.mjs";
|
|
10
10
|
import { VDialogTransition } from "../transitions/index.mjs";
|
11
11
|
import { VList, VListItem } from "../VList/index.mjs";
|
12
12
|
import { VMenu } from "../VMenu/index.mjs";
|
13
|
+
import { VIcon } from "../VIcon/index.mjs";
|
13
14
|
import { VTextField } from "../VTextField/index.mjs"; // Composables
|
14
15
|
import { forwardRefs } from "../../composables/forwardRefs.mjs";
|
15
16
|
import { IconValue } from "../../composables/icons.mjs";
|
@@ -261,11 +262,13 @@ export const VSelect = genericComponent()({
|
|
261
262
|
let {
|
262
263
|
isSelected
|
263
264
|
} = _ref2;
|
264
|
-
return props.multiple && !props.hideSelected ? _createVNode(VCheckboxBtn, {
|
265
|
+
return _createVNode(_Fragment, null, [props.multiple && !props.hideSelected ? _createVNode(VCheckboxBtn, {
|
265
266
|
"modelValue": isSelected,
|
266
267
|
"ripple": false,
|
267
268
|
"tabindex": "-1"
|
268
|
-
}, null) : undefined
|
269
|
+
}, null) : undefined, item.props.prependIcon && _createVNode(VIcon, {
|
270
|
+
"icon": item.props.prependIcon
|
271
|
+
}, null)]);
|
269
272
|
}
|
270
273
|
});
|
271
274
|
}), slots['append-item']?.()]
|
@@ -278,6 +281,10 @@ export const VSelect = genericComponent()({
|
|
278
281
|
}
|
279
282
|
const slotProps = {
|
280
283
|
'onClick:close': onChipClose,
|
284
|
+
onMousedown(e) {
|
285
|
+
e.preventDefault();
|
286
|
+
e.stopPropagation();
|
287
|
+
},
|
281
288
|
modelValue: true,
|
282
289
|
'onUpdate:modelValue': undefined
|
283
290
|
};
|