@vuetify/nightly 3.7.12-master.2025-02-15 → 3.7.12-master.2025-02-18
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 +17 -3
- package/dist/json/attributes.json +3373 -3361
- package/dist/json/importMap-labs.json +16 -16
- package/dist/json/importMap.json +184 -184
- package/dist/json/tags.json +3 -0
- package/dist/json/web-types.json +6346 -6318
- package/dist/vuetify-labs.css +3661 -3656
- package/dist/vuetify-labs.d.ts +190 -139
- package/dist/vuetify-labs.esm.js +135 -72
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +134 -71
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +3856 -3859
- package/dist/vuetify.d.ts +168 -156
- package/dist/vuetify.esm.js +36 -34
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +35 -33
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +16 -16
- package/dist/vuetify.min.js.map +1 -1
- package/lib/blueprints/index.d.mts +1 -1
- package/lib/blueprints/md1.d.mts +1 -1
- package/lib/blueprints/md2.d.mts +1 -1
- package/lib/blueprints/md3.d.mts +1 -1
- package/lib/components/VAlert/VAlert.mjs +1 -1
- package/lib/components/VAlert/index.d.mts +1 -1
- package/lib/components/VAppBar/VAppBar.mjs +1 -1
- package/lib/components/VAppBar/VAppBarNavIcon.mjs +1 -1
- package/lib/components/VAppBar/VAppBarTitle.mjs +1 -1
- package/lib/components/VAppBar/index.d.mts +5 -5
- package/lib/components/VAutocomplete/VAutocomplete.mjs +1 -1
- package/lib/components/VAutocomplete/index.d.mts +4 -4
- package/lib/components/VAvatar/index.d.mts +1 -1
- package/lib/components/VBadge/VBadge.mjs +1 -1
- package/lib/components/VBadge/index.d.mts +1 -1
- package/lib/components/VBanner/VBanner.mjs +1 -1
- package/lib/components/VBanner/index.d.mts +1 -1
- package/lib/components/VBottomNavigation/VBottomNavigation.css +1 -0
- package/lib/components/VBottomNavigation/VBottomNavigation.sass +1 -0
- package/lib/components/VBottomNavigation/index.d.mts +1 -1
- package/lib/components/VBottomSheet/VBottomSheet.mjs +1 -1
- package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs +1 -1
- package/lib/components/VBreadcrumbs/VBreadcrumbsItem.mjs +1 -1
- package/lib/components/VBreadcrumbs/index.d.mts +5 -5
- package/lib/components/VBtn/VBtn.mjs +1 -1
- package/lib/components/VBtn/index.d.mts +5 -5
- package/lib/components/VBtnGroup/VBtnGroup.mjs +1 -1
- package/lib/components/VBtnToggle/VBtnToggle.mjs +1 -1
- package/lib/components/VBtnToggle/index.d.mts +1 -1
- package/lib/components/VCard/VCard.mjs +1 -1
- package/lib/components/VCard/VCardItem.mjs +1 -1
- package/lib/components/VCard/VCardSubtitle.mjs +1 -1
- package/lib/components/VCard/VCardText.mjs +1 -1
- package/lib/components/VCard/index.d.mts +5 -5
- package/lib/components/VCarousel/VCarousel.mjs +1 -1
- package/lib/components/VCarousel/VCarouselItem.mjs +1 -1
- package/lib/components/VCarousel/index.d.mts +1 -1
- package/lib/components/VCheckbox/VCheckbox.mjs +1 -1
- package/lib/components/VCheckbox/VCheckboxBtn.mjs +1 -1
- package/lib/components/VCheckbox/index.d.mts +1 -1
- package/lib/components/VChip/VChip.mjs +1 -1
- package/lib/components/VChip/index.d.mts +5 -5
- package/lib/components/VChipGroup/VChipGroup.mjs +1 -1
- package/lib/components/VChipGroup/index.d.mts +1 -1
- package/lib/components/VColorPicker/VColorPicker.mjs +1 -1
- package/lib/components/VColorPicker/index.d.mts +10 -10
- package/lib/components/VCombobox/VCombobox.mjs +1 -1
- package/lib/components/VCombobox/index.d.mts +4 -4
- package/lib/components/VConfirmEdit/VConfirmEdit.mjs +1 -1
- package/lib/components/VConfirmEdit/__test__/VConfirmEdit.spec.browser.mjs +5 -5
- package/lib/components/VConfirmEdit/__test__/VConfirmEdit.spec.browser.mjs.map +1 -1
- package/lib/components/VConfirmEdit/index.d.mts +1 -1
- package/lib/components/VCounter/VCounter.mjs +1 -1
- package/lib/components/VDataIterator/index.d.mts +1 -1
- package/lib/components/VDataTable/VDataTable.mjs +1 -1
- package/lib/components/VDataTable/VDataTableFooter.mjs +1 -1
- package/lib/components/VDataTable/VDataTableGroupHeaderRow.mjs +1 -1
- package/lib/components/VDataTable/VDataTableHeaders.mjs +1 -1
- package/lib/components/VDataTable/VDataTableRow.mjs +1 -1
- package/lib/components/VDataTable/VDataTableRows.mjs +1 -1
- package/lib/components/VDataTable/VDataTableServer.mjs +1 -1
- package/lib/components/VDataTable/VDataTableVirtual.mjs +1 -1
- package/lib/components/VDataTable/composables/sort.mjs +12 -8
- package/lib/components/VDataTable/composables/sort.mjs.map +1 -1
- package/lib/components/VDataTable/index.d.mts +1 -1
- package/lib/components/VDatePicker/VDatePicker.mjs +1 -1
- package/lib/components/VDatePicker/VDatePickerControls.mjs +1 -1
- package/lib/components/VDatePicker/VDatePickerControls.mjs.map +1 -1
- package/lib/components/VDatePicker/VDatePickerMonth.mjs +1 -1
- package/lib/components/VDatePicker/VDatePickerMonths.mjs +1 -1
- package/lib/components/VDatePicker/VDatePickerYears.mjs +1 -1
- package/lib/components/VDatePicker/index.d.mts +28 -16
- package/lib/components/VDialog/VDialog.mjs +1 -1
- package/lib/components/VDialog/__test__/VDialog.spec.cy.mjs +1 -1
- package/lib/components/VDialog/index.d.mts +3 -3
- package/lib/components/VEmptyState/VEmptyState.mjs +1 -1
- package/lib/components/VEmptyState/index.d.mts +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanelText.mjs +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanelTitle.mjs +1 -1
- package/lib/components/VExpansionPanel/index.d.mts +1 -1
- package/lib/components/VFab/VFab.mjs +1 -1
- package/lib/components/VFab/index.d.mts +5 -5
- package/lib/components/VField/VField.mjs +1 -1
- package/lib/components/VField/VFieldLabel.mjs +1 -1
- package/lib/components/VField/index.d.mts +1 -1
- package/lib/components/VFileInput/VFileInput.mjs +2 -3
- package/lib/components/VFileInput/VFileInput.mjs.map +1 -1
- package/lib/components/VFileInput/index.d.mts +4 -4
- package/lib/components/VFooter/VFooter.mjs +1 -1
- package/lib/components/VGrid/VContainer.mjs +1 -1
- package/lib/components/VIcon/index.d.mts +1 -1
- package/lib/components/VImg/VImg.mjs +1 -1
- package/lib/components/VInfiniteScroll/VInfiniteScroll.mjs +1 -1
- package/lib/components/VInput/VInput.mjs +1 -1
- package/lib/components/VInput/index.d.mts +1 -1
- package/lib/components/VItemGroup/index.d.mts +1 -1
- package/lib/components/VLazy/VLazy.mjs +1 -1
- package/lib/components/VList/VList.mjs +1 -1
- package/lib/components/VList/VListChildren.mjs +1 -1
- package/lib/components/VList/VListGroup.mjs +1 -1
- package/lib/components/VList/VListItem.mjs +1 -1
- package/lib/components/VList/VListItemAction.mjs +1 -1
- package/lib/components/VList/VListItemMedia.mjs +1 -1
- package/lib/components/VList/VListItemSubtitle.mjs +1 -1
- package/lib/components/VList/index.d.mts +5 -5
- package/lib/components/VMenu/VMenu.mjs +1 -1
- package/lib/components/VMenu/index.d.mts +3 -3
- package/lib/components/VNavigationDrawer/VNavigationDrawer.css +0 -4
- package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs +3 -6
- package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs.map +1 -1
- package/lib/components/VNavigationDrawer/VNavigationDrawer.sass +0 -5
- package/lib/components/VOtpInput/VOtpInput.mjs +1 -1
- package/lib/components/VOverlay/VOverlay.mjs +1 -1
- package/lib/components/VPagination/VPagination.mjs +1 -1
- package/lib/components/VPagination/index.d.mts +1 -1
- package/lib/components/VParallax/VParallax.mjs +1 -1
- package/lib/components/VRadio/VRadio.mjs +1 -1
- package/lib/components/VRadio/index.d.mts +1 -1
- package/lib/components/VRadioGroup/VRadioGroup.mjs +1 -1
- package/lib/components/VRadioGroup/index.d.mts +1 -1
- package/lib/components/VRangeSlider/VRangeSlider.mjs +1 -1
- package/lib/components/VRating/VRating.mjs +1 -1
- package/lib/components/VRating/index.d.mts +1 -1
- package/lib/components/VSelect/VSelect.mjs +1 -1
- package/lib/components/VSelect/index.d.mts +4 -4
- package/lib/components/VSelectionControl/VSelectionControl.mjs +1 -1
- package/lib/components/VSelectionControl/index.d.mts +1 -1
- package/lib/components/VSelectionControlGroup/index.d.mts +1 -1
- package/lib/components/VSheet/VSheet.mjs +1 -1
- package/lib/components/VSkeletonLoader/VSkeletonLoader.mjs +1 -1
- package/lib/components/VSlideGroup/index.d.mts +1 -1
- package/lib/components/VSlider/VSlider.mjs +1 -1
- package/lib/components/VSlider/VSliderThumb.mjs +1 -1
- package/lib/components/VSnackbar/VSnackbar.mjs +1 -1
- package/lib/components/VSnackbar/index.d.mts +3 -3
- package/lib/components/VSparkline/VBarline.mjs +1 -2
- package/lib/components/VSparkline/VBarline.mjs.map +1 -1
- package/lib/components/VSparkline/VSparkline.mjs +1 -1
- package/lib/components/VSparkline/VTrendline.mjs +1 -2
- package/lib/components/VSparkline/VTrendline.mjs.map +1 -1
- package/lib/components/VSpeedDial/VSpeedDial.mjs +1 -1
- package/lib/components/VStepper/VStepper.mjs +1 -1
- package/lib/components/VStepper/VStepperItem.mjs +1 -1
- package/lib/components/VStepper/VStepperWindow.mjs +1 -1
- package/lib/components/VStepper/VStepperWindowItem.mjs +1 -1
- package/lib/components/VStepper/index.d.mts +1 -1
- package/lib/components/VSwitch/VSwitch.mjs +1 -1
- package/lib/components/VSwitch/index.d.mts +1 -1
- package/lib/components/VSystemBar/VSystemBar.mjs +1 -1
- package/lib/components/VTabs/VTab.mjs +1 -1
- package/lib/components/VTabs/VTabs.mjs +1 -1
- package/lib/components/VTabs/VTabsWindow.mjs +1 -1
- package/lib/components/VTabs/VTabsWindowItem.mjs +1 -1
- package/lib/components/VTabs/index.d.mts +20 -20
- package/lib/components/VTextField/VTextField.mjs +1 -1
- package/lib/components/VTextField/index.d.mts +7 -7
- package/lib/components/VTextarea/VTextarea.mjs +1 -1
- package/lib/components/VTextarea/index.d.mts +4 -4
- package/lib/components/VTimeline/VTimeline.mjs +1 -1
- package/lib/components/VTimeline/VTimelineDivider.mjs +1 -1
- package/lib/components/VTimeline/VTimelineItem.mjs +1 -1
- package/lib/components/VTimeline/index.d.mts +1 -1
- package/lib/components/VToolbar/VToolbar.mjs +1 -1
- package/lib/components/VTooltip/VTooltip.mjs +1 -1
- package/lib/components/VTooltip/index.d.mts +3 -3
- package/lib/components/VValidation/index.d.mts +1 -1
- package/lib/components/VVirtualScroll/VVirtualScroll.mjs +1 -1
- package/lib/components/VVirtualScroll/VVirtualScrollItem.mjs +1 -1
- package/lib/components/VVirtualScroll/index.d.mts +1 -1
- package/lib/components/VWindow/VWindow.mjs +1 -1
- package/lib/components/VWindow/VWindowItem.mjs +1 -1
- package/lib/components/VWindow/index.d.mts +1 -1
- package/lib/components/index.d.mts +109 -97
- package/lib/components/transitions/dialog-transition.mjs +1 -2
- package/lib/components/transitions/dialog-transition.mjs.map +1 -1
- package/lib/composables/calendar.mjs +4 -1
- package/lib/composables/calendar.mjs.map +1 -1
- package/lib/composables/icons.mjs +1 -1
- package/lib/composables/variant.mjs +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/framework.mjs +1 -1
- package/lib/iconsets/fa-svg.d.mts +1 -1
- package/lib/iconsets/fa.d.mts +1 -1
- package/lib/iconsets/fa4.d.mts +1 -1
- package/lib/iconsets/md.d.mts +1 -1
- package/lib/iconsets/mdi-svg.d.mts +1 -1
- package/lib/iconsets/mdi.d.mts +1 -1
- package/lib/index.d.mts +60 -60
- package/lib/labs/VCalendar/VCalendar.mjs +1 -1
- package/lib/labs/VCalendar/VCalendarDay.mjs +1 -1
- package/lib/labs/VCalendar/index.d.mts +8 -2
- package/lib/labs/VDateInput/VDateInput.mjs +4 -3
- package/lib/labs/VDateInput/VDateInput.mjs.map +1 -1
- package/lib/labs/VDateInput/index.d.mts +8 -2
- package/lib/labs/VFileUpload/VFileUpload.mjs +1 -1
- package/lib/labs/VFileUpload/VFileUploadItem.mjs +1 -1
- package/lib/labs/VFileUpload/index.d.mts +5 -5
- package/lib/labs/VNumberInput/VNumberInput.css +10 -2
- package/lib/labs/VNumberInput/VNumberInput.mjs +94 -36
- package/lib/labs/VNumberInput/VNumberInput.mjs.map +1 -1
- package/lib/labs/VNumberInput/VNumberInput.sass +12 -2
- package/lib/labs/VNumberInput/index.d.mts +59 -32
- package/lib/labs/VPicker/VPicker.mjs +1 -1
- package/lib/labs/VSnackbarQueue/VSnackbarQueue.mjs +1 -1
- package/lib/labs/VSnackbarQueue/index.d.mts +3 -3
- package/lib/labs/VStepperVertical/VStepperVertical.mjs +1 -1
- package/lib/labs/VStepperVertical/VStepperVerticalActions.mjs +1 -1
- package/lib/labs/VStepperVertical/VStepperVerticalItem.mjs +1 -1
- package/lib/labs/VStepperVertical/index.d.mts +1 -1
- package/lib/labs/VTimePicker/VTimePicker.mjs +1 -1
- package/lib/labs/VTimePicker/VTimePickerControls.mjs +1 -1
- package/lib/labs/VTreeview/VTreeview.mjs +1 -1
- package/lib/labs/VTreeview/VTreeviewChildren.mjs +1 -1
- package/lib/labs/VTreeview/VTreeviewGroup.mjs +1 -1
- package/lib/labs/VTreeview/VTreeviewItem.mjs +1 -1
- package/lib/labs/VTreeview/index.d.mts +5 -5
- package/lib/labs/components.d.mts +85 -46
- package/lib/locale/adapters/vue-i18n.mjs +0 -1
- package/lib/locale/adapters/vue-i18n.mjs.map +1 -1
- package/package.json +16 -15
@@ -540,7 +540,7 @@ declare const VDialog: {
|
|
540
540
|
};
|
541
541
|
$forceUpdate: () => void;
|
542
542
|
$nextTick: typeof nextTick;
|
543
|
-
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R]) => any : (...args: any) => any, options?: vue.WatchOptions): vue.WatchStopHandle;
|
543
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, (cleanupFn: () => void) => void]) => any : (...args: [any, any, (cleanupFn: () => void) => void]) => any, options?: vue.WatchOptions): vue.WatchStopHandle;
|
544
544
|
} & Omit<{
|
545
545
|
absolute: boolean;
|
546
546
|
location: Anchor;
|
@@ -1226,7 +1226,7 @@ declare const VDialog: {
|
|
1226
1226
|
};
|
1227
1227
|
$forceUpdate: () => void;
|
1228
1228
|
$nextTick: typeof nextTick;
|
1229
|
-
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R]) => any : (...args: any) => any, options?: vue.WatchOptions): vue.WatchStopHandle;
|
1229
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, (cleanupFn: () => void) => void]) => any : (...args: [any, any, (cleanupFn: () => void) => void]) => any, options?: vue.WatchOptions): vue.WatchStopHandle;
|
1230
1230
|
} & Omit<{
|
1231
1231
|
absolute: boolean;
|
1232
1232
|
location: Anchor;
|
@@ -1811,7 +1811,7 @@ declare const VDialog: {
|
|
1811
1811
|
};
|
1812
1812
|
$forceUpdate: () => void;
|
1813
1813
|
$nextTick: typeof nextTick;
|
1814
|
-
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R]) => any : (...args: any) => any, options?: vue.WatchOptions): vue.WatchStopHandle;
|
1814
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, (cleanupFn: () => void) => void]) => any : (...args: [any, any, (cleanupFn: () => void) => void]) => any, options?: vue.WatchOptions): vue.WatchStopHandle;
|
1815
1815
|
} & Omit<{
|
1816
1816
|
absolute: boolean;
|
1817
1817
|
location: Anchor;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as vue from 'vue';
|
2
|
-
import { ComponentPropsOptions, ExtractPropTypes,
|
2
|
+
import { ComponentPropsOptions, ExtractPropTypes, ComponentPublicInstance, FunctionalComponent, PropType } from 'vue';
|
3
3
|
|
4
4
|
interface FilterPropsOptions<PropsOptions extends Readonly<ComponentPropsOptions>, Props = ExtractPropTypes<PropsOptions>> {
|
5
5
|
filterProps<T extends Partial<Props>, U extends Exclude<keyof Props, Exclude<keyof Props, keyof T>>>(props: T): Partial<Pick<T, U>>;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { createVNode as _createVNode, vShow as _vShow, withDirectives as _withDirectives } from "vue";
|
2
2
|
// Components
|
3
3
|
import { VExpansionPanelSymbol } from "./shared.mjs";
|
4
4
|
import { VExpandTransition } from "../transitions/index.mjs"; // Composables
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { createVNode as _createVNode, resolveDirective as _resolveDirective, withDirectives as _withDirectives } from "vue";
|
2
2
|
// Components
|
3
3
|
import { VExpansionPanelSymbol } from "./shared.mjs";
|
4
4
|
import { VDefaultsProvider } from "../VDefaultsProvider/index.mjs";
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as vue from 'vue';
|
2
|
-
import { ComponentPropsOptions, ExtractPropTypes,
|
2
|
+
import { ComponentPropsOptions, ExtractPropTypes, ComponentPublicInstance, FunctionalComponent, PropType, DirectiveBinding, Ref, ComponentInternalInstance, ComputedRef } from 'vue';
|
3
3
|
|
4
4
|
interface FilterPropsOptions<PropsOptions extends Readonly<ComponentPropsOptions>, Props = ExtractPropTypes<PropsOptions>> {
|
5
5
|
filterProps<T extends Partial<Props>, U extends Exclude<keyof Props, Exclude<keyof Props, keyof T>>>(props: T): Partial<Pick<T, U>>;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { vShow as _vShow, mergeProps as _mergeProps, createVNode as _createVNode, withDirectives as _withDirectives } from "vue";
|
2
2
|
// Styles
|
3
3
|
import "./VFab.css";
|
4
4
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as vue from 'vue';
|
2
|
-
import { DirectiveBinding, ComponentPropsOptions, ExtractPropTypes,
|
2
|
+
import { DirectiveBinding, ComponentPropsOptions, ExtractPropTypes, ComponentPublicInstance, FunctionalComponent, PropType, Ref, ComponentInternalInstance, ComputedRef } from 'vue';
|
3
3
|
// @ts-ignore
|
4
4
|
import * as vue_router from 'vue-router';
|
5
5
|
|
@@ -110,7 +110,7 @@ declare const VFab: {
|
|
110
110
|
text?: string | undefined;
|
111
111
|
class?: any;
|
112
112
|
theme?: string | undefined;
|
113
|
-
to?: vue_router.
|
113
|
+
to?: string | vue_router.RouteLocationAsRelativeGeneric | vue_router.RouteLocationAsPathGeneric | undefined;
|
114
114
|
icon?: boolean | IconValue | undefined;
|
115
115
|
href?: string | undefined;
|
116
116
|
elevation?: string | number | undefined;
|
@@ -181,7 +181,7 @@ declare const VFab: {
|
|
181
181
|
text?: string | undefined;
|
182
182
|
class?: any;
|
183
183
|
theme?: string | undefined;
|
184
|
-
to?: vue_router.
|
184
|
+
to?: string | vue_router.RouteLocationAsRelativeGeneric | vue_router.RouteLocationAsPathGeneric | undefined;
|
185
185
|
icon?: boolean | IconValue | undefined;
|
186
186
|
href?: string | undefined;
|
187
187
|
elevation?: string | number | undefined;
|
@@ -291,7 +291,7 @@ declare const VFab: {
|
|
291
291
|
text?: string | undefined;
|
292
292
|
class?: any;
|
293
293
|
theme?: string | undefined;
|
294
|
-
to?: vue_router.
|
294
|
+
to?: string | vue_router.RouteLocationAsRelativeGeneric | vue_router.RouteLocationAsPathGeneric | undefined;
|
295
295
|
icon?: boolean | IconValue | undefined;
|
296
296
|
href?: string | undefined;
|
297
297
|
elevation?: string | number | undefined;
|
@@ -396,7 +396,7 @@ declare const VFab: {
|
|
396
396
|
text?: string | undefined;
|
397
397
|
class?: any;
|
398
398
|
theme?: string | undefined;
|
399
|
-
to?: vue_router.
|
399
|
+
to?: string | vue_router.RouteLocationAsRelativeGeneric | vue_router.RouteLocationAsPathGeneric | undefined;
|
400
400
|
icon?: boolean | IconValue | undefined;
|
401
401
|
href?: string | undefined;
|
402
402
|
elevation?: string | number | undefined;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { createVNode as _createVNode, vShow as _vShow, withDirectives as _withDirectives, Fragment as _Fragment, mergeProps as _mergeProps } from "vue";
|
2
2
|
// Styles
|
3
3
|
import "./VField.css";
|
4
4
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { createVNode as _createVNode
|
1
|
+
import { createVNode as _createVNode } from "vue";
|
2
2
|
// Components
|
3
3
|
import { VLabel } from "../VLabel/index.mjs"; // Composables
|
4
4
|
import { makeComponentProps } from "../../composables/component.mjs"; // Utilities
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as vue from 'vue';
|
2
|
-
import {
|
2
|
+
import { VNodeChild, VNode, ComponentPropsOptions, ExtractPropTypes, ComponentPublicInstance, FunctionalComponent, PropType, Ref } from 'vue';
|
3
3
|
|
4
4
|
type SlotsToProps<U extends RawSlots, T = MakeInternalSlots<U>> = {
|
5
5
|
$children?: (VNodeChild | (T extends {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { Fragment as _Fragment, mergeProps as _mergeProps, createVNode as _createVNode } from "vue";
|
2
2
|
// Styles
|
3
3
|
import "./VFileInput.css";
|
4
4
|
|
@@ -138,8 +138,7 @@ export const VFileInput = genericComponent()({
|
|
138
138
|
const fieldProps = filterFieldProps(props);
|
139
139
|
return _createVNode(VInput, _mergeProps({
|
140
140
|
"ref": vInputRef,
|
141
|
-
"modelValue": model.value,
|
142
|
-
"onUpdate:modelValue": $event => model.value = $event,
|
141
|
+
"modelValue": props.multiple ? model.value : model.value[0],
|
143
142
|
"class": ['v-file-input', {
|
144
143
|
'v-file-input--chips': !!props.chips,
|
145
144
|
'v-file-input--hide': props.hideInput,
|
@@ -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","dirty","_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(val)) ? val[0] : val,\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 || props.dirty }\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,SACSA,KAAK;AAAA,SACLC,QAAQ;AAAA,SACRC,MAAM;AAAA,SACNC,gBAAgB,EAAEC,eAAe;AAAA,SACjCC,eAAe,EAAEC,MAAM,gCAEhC;AAAA,SACSC,QAAQ;AAAA,SACRC,WAAW;AAAA,SACXC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Ja;cAAU,IACnB,CAAC,CAAC5D,KAAK,CAACQ,KAAK,EAAEW,MAAM,IAAI,CAACpC,KAAK,CAACX,SAAS,KACzC0B,KAAK,CAACmE,SAAS,GAAGnE,KAAK,CAACmE,SAAS,CAAC;gBAChCnD,SAAS,EAAEA,SAAS,CAACN,KAAK;gBAC1BD,UAAU,EAAEA,UAAU,CAACC,KAAK;gBAC5BK,kBAAkB,EAAEA,kBAAkB,CAACL;cACzC,CAAC,CAAC,GACAzB,KAAK,CAACnB,KAAK,GAAGkD,SAAS,CAACN,KAAK,CAACO,GAAG,CAACmD,IAAI,IAAAnB,YAAA,CAAA1G,KAAA;gBAAA,OAE9B6H,IAAI;gBAAA;gBAAA,QAEHA;cAAI,QAEd,CAAC,GACApD,SAAS,CAACN,KAAK,CAAC2D,IAAI,CAAC,IAAI,CAAC,CAC7B;YAAA;UAGN;QAAA,CAGN;QACD3B,OAAO,EAAED,UAAU,GAAGsB,SAAS,IAAAd,YAAA,CAAAe,SAAA,SAEzBhE,KAAK,CAAC0C,OAAO,GAAGqB,SAAS,CAAC,EAE1BvB,UAAU,IAAAS,YAAA,CAAAe,SAAA,SAAAf,YAAA,sBAAAA,YAAA,CAAAzG,QAAA;UAAA,UAKG,CAAC,CAAC0D,KAAK,CAACQ,KAAK,EAAEW,MAAM;UAAA,SACtBF,YAAY,CAACT,KAAK;UAAA,YACfzB,KAAK,CAACqF;QAAQ,GACPtE,KAAK,CAAChC,OAAO,GAGpC,EAEJ,GAAGwC;MAAS;IAIrB,CAAC,CAAC;IAEF,OAAOzD,WAAW,CAAC,CAAC,CAAC,EAAEuE,SAAS,EAAEC,SAAS,EAAEC,QAAQ,CAAC;EACxD;AACF,CAAC,CAAC","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","class","style","_ref3","id","isDisabled","isDirty","isReadonly","isValid","dirty","_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(val)) ? val[0] : val,\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 modelValue={ props.multiple ? model.value : model.value[0] }\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 || props.dirty }\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,SACSA,KAAK;AAAA,SACLC,QAAQ;AAAA,SACRC,MAAM;AAAA,SACNC,gBAAgB,EAAEC,eAAe;AAAA,SACjCC,eAAe,EAAEC,MAAM,gCAEhC;AAAA,SACSC,QAAQ;AAAA,SACRC,WAAW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UAAAK,YAAA;gBAAA,SAGJY;cAAU,IACnB,CAAC,CAAC3D,KAAK,CAACQ,KAAK,EAAEW,MAAM,IAAI,CAACpC,KAAK,CAACX,SAAS,KACzC0B,KAAK,CAACkE,SAAS,GAAGlE,KAAK,CAACkE,SAAS,CAAC;gBAChClD,SAAS,EAAEA,SAAS,CAACN,KAAK;gBAC1BD,UAAU,EAAEA,UAAU,CAACC,KAAK;gBAC5BK,kBAAkB,EAAEA,kBAAkB,CAACL;cACzC,CAAC,CAAC,GACAzB,KAAK,CAACnB,KAAK,GAAGkD,SAAS,CAACN,KAAK,CAACO,GAAG,CAACkD,IAAI,IAAAlB,YAAA,CAAA1G,KAAA;gBAAA,OAE9B4H,IAAI;gBAAA;gBAAA,QAEHA;cAAI,QAEd,CAAC,GACAnD,SAAS,CAACN,KAAK,CAAC0D,IAAI,CAAC,IAAI,CAAC,CAC7B;YAAA;UAGN;QAAA,CAGN;QACD1B,OAAO,EAAED,UAAU,GAAGqB,SAAS,IAAAb,YAAA,CAAAc,SAAA,SAEzB/D,KAAK,CAAC0C,OAAO,GAAGoB,SAAS,CAAC,EAE1BtB,UAAU,IAAAS,YAAA,CAAAc,SAAA,SAAAd,YAAA,sBAAAA,YAAA,CAAAzG,QAAA;UAAA,UAKG,CAAC,CAAC0D,KAAK,CAACQ,KAAK,EAAEW,MAAM;UAAA,SACtBF,YAAY,CAACT,KAAK;UAAA,YACfzB,KAAK,CAACoF;QAAQ,GACPrE,KAAK,CAAChC,OAAO,GAGpC,EAEJ,GAAGwC;MAAS;IAIrB,CAAC,CAAC;IAEF,OAAOzD,WAAW,CAAC,CAAC,CAAC,EAAEuE,SAAS,EAAEC,SAAS,EAAEC,QAAQ,CAAC;EACxD;AACF,CAAC,CAAC","ignoreList":[]}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as vue from 'vue';
|
2
|
-
import {
|
2
|
+
import { VNodeChild, VNode, ComponentPropsOptions, ExtractPropTypes, PropType, ComponentPublicInstance, FunctionalComponent, Ref, ComputedRef, nextTick } from 'vue';
|
3
3
|
|
4
4
|
type ClassValue = any;
|
5
5
|
|
@@ -422,7 +422,7 @@ declare const VFileInput: {
|
|
422
422
|
};
|
423
423
|
$forceUpdate: () => void;
|
424
424
|
$nextTick: typeof nextTick;
|
425
|
-
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R]) => any : (...args: any) => any, options?: vue.WatchOptions): vue.WatchStopHandle;
|
425
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, (cleanupFn: () => void) => void]) => any : (...args: [any, any, (cleanupFn: () => void) => void]) => any, options?: vue.WatchOptions): vue.WatchStopHandle;
|
426
426
|
} & Omit<{
|
427
427
|
error: boolean;
|
428
428
|
direction: "horizontal" | "vertical";
|
@@ -994,7 +994,7 @@ declare const VFileInput: {
|
|
994
994
|
};
|
995
995
|
$forceUpdate: () => void;
|
996
996
|
$nextTick: typeof nextTick;
|
997
|
-
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R]) => any : (...args: any) => any, options?: vue.WatchOptions): vue.WatchStopHandle;
|
997
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, (cleanupFn: () => void) => void]) => any : (...args: [any, any, (cleanupFn: () => void) => void]) => any, options?: vue.WatchOptions): vue.WatchStopHandle;
|
998
998
|
} & Omit<{
|
999
999
|
error: boolean;
|
1000
1000
|
direction: "horizontal" | "vertical";
|
@@ -1401,7 +1401,7 @@ declare const VFileInput: {
|
|
1401
1401
|
};
|
1402
1402
|
$forceUpdate: () => void;
|
1403
1403
|
$nextTick: typeof nextTick;
|
1404
|
-
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R]) => any : (...args: any) => any, options?: vue.WatchOptions): vue.WatchStopHandle;
|
1404
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, (cleanupFn: () => void) => void]) => any : (...args: [any, any, (cleanupFn: () => void) => void]) => any, options?: vue.WatchOptions): vue.WatchStopHandle;
|
1405
1405
|
} & Omit<{
|
1406
1406
|
error: boolean;
|
1407
1407
|
direction: "horizontal" | "vertical";
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as vue from 'vue';
|
2
|
-
import { ComponentPropsOptions, ExtractPropTypes,
|
2
|
+
import { ComponentPropsOptions, ExtractPropTypes, ComponentPublicInstance, FunctionalComponent, PropType } from 'vue';
|
3
3
|
|
4
4
|
interface FilterPropsOptions<PropsOptions extends Readonly<ComponentPropsOptions>, Props = ExtractPropTypes<PropsOptions>> {
|
5
5
|
filterProps<T extends Partial<Props>, U extends Exclude<keyof Props, Exclude<keyof Props, keyof T>>>(props: T): Partial<Pick<T, U>>;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { createVNode as _createVNode, Fragment as _Fragment, resolveDirective as _resolveDirective, mergeProps as _mergeProps, withDirectives as _withDirectives } from "vue";
|
2
2
|
// Styles
|
3
3
|
import "./VImg.css";
|
4
4
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as vue from 'vue';
|
2
|
-
import {
|
2
|
+
import { VNodeChild, VNode, ComponentPropsOptions, ExtractPropTypes, PropType, ComponentPublicInstance, FunctionalComponent, ComputedRef, Ref } from 'vue';
|
3
3
|
|
4
4
|
type SlotsToProps<U extends RawSlots, T = MakeInternalSlots<U>> = {
|
5
5
|
$children?: (VNodeChild | (T extends {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as vue from 'vue';
|
2
|
-
import {
|
2
|
+
import { VNodeChild, VNode, ComponentPropsOptions, ExtractPropTypes } from 'vue';
|
3
3
|
|
4
4
|
type SlotsToProps<U extends RawSlots, T = MakeInternalSlots<U>> = {
|
5
5
|
$children?: (VNodeChild | (T extends {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { createVNode as _createVNode, resolveDirective as _resolveDirective, withDirectives as _withDirectives } from "vue";
|
2
2
|
// Composables
|
3
3
|
import { makeComponentProps } from "../../composables/component.mjs";
|
4
4
|
import { makeDimensionProps, useDimension } from "../../composables/dimensions.mjs";
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { createVNode as _createVNode, mergeProps as _mergeProps } from "vue";
|
2
2
|
// Components
|
3
3
|
import { VListGroup } from "./VListGroup.mjs";
|
4
4
|
import { VListItem } from "./VListItem.mjs";
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { createVNode as _createVNode, vShow as _vShow, withDirectives as _withDirectives } from "vue";
|
2
2
|
// Components
|
3
3
|
import { VExpandTransition } from "../transitions/index.mjs";
|
4
4
|
import { VDefaultsProvider } from "../VDefaultsProvider/index.mjs"; // Composables
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { Fragment as _Fragment, createVNode as _createVNode, resolveDirective as _resolveDirective, mergeProps as _mergeProps, withDirectives as _withDirectives } from "vue";
|
2
2
|
// Styles
|
3
3
|
import "./VListItem.css";
|
4
4
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { createVNode as _createVNode
|
1
|
+
import { createVNode as _createVNode } from "vue";
|
2
2
|
// Composables
|
3
3
|
import { makeComponentProps } from "../../composables/component.mjs";
|
4
4
|
import { makeTagProps } from "../../composables/tag.mjs"; // Utilities
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { createVNode as _createVNode
|
1
|
+
import { createVNode as _createVNode } from "vue";
|
2
2
|
// Composables
|
3
3
|
import { makeComponentProps } from "../../composables/component.mjs";
|
4
4
|
import { makeTagProps } from "../../composables/tag.mjs"; // Utilities
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { createVNode as _createVNode
|
1
|
+
import { createVNode as _createVNode } from "vue";
|
2
2
|
// Composables
|
3
3
|
import { makeComponentProps } from "../../composables/component.mjs";
|
4
4
|
import { makeTagProps } from "../../composables/tag.mjs"; // Utilities
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as vue from 'vue';
|
2
|
-
import {
|
2
|
+
import { VNodeChild, VNode, ComponentPropsOptions, ExtractPropTypes, ComponentPublicInstance, FunctionalComponent, PropType, DirectiveBinding } from 'vue';
|
3
3
|
// @ts-ignore
|
4
4
|
import * as vue_router from 'vue-router';
|
5
5
|
|
@@ -109,7 +109,7 @@ declare const VListItem: {
|
|
109
109
|
title?: string | number | undefined;
|
110
110
|
class?: any;
|
111
111
|
theme?: string | undefined;
|
112
|
-
to?: vue_router.
|
112
|
+
to?: string | vue_router.RouteLocationAsRelativeGeneric | vue_router.RouteLocationAsPathGeneric | undefined;
|
113
113
|
lines?: false | "one" | "two" | "three" | undefined;
|
114
114
|
onClick?: ((args_0: MouseEvent | KeyboardEvent) => void) | undefined;
|
115
115
|
onClickOnce?: ((args_0: MouseEvent) => void) | undefined;
|
@@ -206,7 +206,7 @@ declare const VListItem: {
|
|
206
206
|
title?: string | number | undefined;
|
207
207
|
class?: any;
|
208
208
|
theme?: string | undefined;
|
209
|
-
to?: vue_router.
|
209
|
+
to?: string | vue_router.RouteLocationAsRelativeGeneric | vue_router.RouteLocationAsPathGeneric | undefined;
|
210
210
|
lines?: false | "one" | "two" | "three" | undefined;
|
211
211
|
onClick?: ((args_0: MouseEvent | KeyboardEvent) => void) | undefined;
|
212
212
|
onClickOnce?: ((args_0: MouseEvent) => void) | undefined;
|
@@ -303,7 +303,7 @@ declare const VListItem: {
|
|
303
303
|
title?: string | number | undefined;
|
304
304
|
class?: any;
|
305
305
|
theme?: string | undefined;
|
306
|
-
to?: vue_router.
|
306
|
+
to?: string | vue_router.RouteLocationAsRelativeGeneric | vue_router.RouteLocationAsPathGeneric | undefined;
|
307
307
|
lines?: false | "one" | "two" | "three" | undefined;
|
308
308
|
onClick?: ((args_0: MouseEvent | KeyboardEvent) => void) | undefined;
|
309
309
|
onClickOnce?: ((args_0: MouseEvent) => void) | undefined;
|
@@ -419,7 +419,7 @@ declare const VListItem: {
|
|
419
419
|
title?: string | number | undefined;
|
420
420
|
class?: any;
|
421
421
|
theme?: string | undefined;
|
422
|
-
to?: vue_router.
|
422
|
+
to?: string | vue_router.RouteLocationAsRelativeGeneric | vue_router.RouteLocationAsPathGeneric | undefined;
|
423
423
|
lines?: false | "one" | "two" | "three" | undefined;
|
424
424
|
onClick?: ((args_0: MouseEvent | KeyboardEvent) => void) | undefined;
|
425
425
|
onClickOnce?: ((args_0: MouseEvent) => void) | undefined;
|
@@ -539,7 +539,7 @@ declare const VMenu: {
|
|
539
539
|
};
|
540
540
|
$forceUpdate: () => void;
|
541
541
|
$nextTick: typeof nextTick;
|
542
|
-
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R]) => any : (...args: any) => any, options?: vue.WatchOptions): vue.WatchStopHandle;
|
542
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, (cleanupFn: () => void) => void]) => any : (...args: [any, any, (cleanupFn: () => void) => void]) => any, options?: vue.WatchOptions): vue.WatchStopHandle;
|
543
543
|
} & Omit<{
|
544
544
|
absolute: boolean;
|
545
545
|
location: Anchor;
|
@@ -1220,7 +1220,7 @@ declare const VMenu: {
|
|
1220
1220
|
};
|
1221
1221
|
$forceUpdate: () => void;
|
1222
1222
|
$nextTick: typeof nextTick;
|
1223
|
-
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R]) => any : (...args: any) => any, options?: vue.WatchOptions): vue.WatchStopHandle;
|
1223
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, (cleanupFn: () => void) => void]) => any : (...args: [any, any, (cleanupFn: () => void) => void]) => any, options?: vue.WatchOptions): vue.WatchStopHandle;
|
1224
1224
|
} & Omit<{
|
1225
1225
|
absolute: boolean;
|
1226
1226
|
location: Anchor;
|
@@ -1806,7 +1806,7 @@ declare const VMenu: {
|
|
1806
1806
|
};
|
1807
1807
|
$forceUpdate: () => void;
|
1808
1808
|
$nextTick: typeof nextTick;
|
1809
|
-
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R]) => any : (...args: any) => any, options?: vue.WatchOptions): vue.WatchStopHandle;
|
1809
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, (cleanupFn: () => void) => void]) => any : (...args: [any, any, (cleanupFn: () => void) => void]) => any, options?: vue.WatchOptions): vue.WatchStopHandle;
|
1810
1810
|
} & Omit<{
|
1811
1811
|
absolute: boolean;
|
1812
1812
|
location: Anchor;
|
@@ -30,10 +30,6 @@
|
|
30
30
|
.v-navigation-drawer--rounded {
|
31
31
|
border-radius: 4px;
|
32
32
|
}
|
33
|
-
.v-navigation-drawer--top, .v-navigation-drawer--bottom {
|
34
|
-
max-height: -webkit-fill-available;
|
35
|
-
overflow-y: auto;
|
36
|
-
}
|
37
33
|
.v-navigation-drawer--top {
|
38
34
|
top: 0;
|
39
35
|
border-bottom-width: thin;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { Fragment as _Fragment, createVNode as _createVNode, mergeProps as _mergeProps } from "vue";
|
2
2
|
// Styles
|
3
3
|
import "./VNavigationDrawer.css";
|
4
4
|
|
@@ -169,7 +169,6 @@ export const VNavigationDrawer = genericComponent()({
|
|
169
169
|
const size = isTemporary.value ? 0 : props.rail && props.expandOnHover ? Number(props.railWidth) : width.value;
|
170
170
|
return isDragging.value ? size * dragProgress.value : size;
|
171
171
|
});
|
172
|
-
const elementSize = computed(() => ['top', 'bottom'].includes(props.location) ? 0 : width.value);
|
173
172
|
const {
|
174
173
|
layoutItemStyles,
|
175
174
|
layoutItemScrimStyles
|
@@ -178,7 +177,7 @@ export const VNavigationDrawer = genericComponent()({
|
|
178
177
|
order: computed(() => parseInt(props.order, 10)),
|
179
178
|
position: location,
|
180
179
|
layoutSize,
|
181
|
-
elementSize,
|
180
|
+
elementSize: width,
|
182
181
|
active: computed(() => isActive.value || isDragging.value),
|
183
182
|
disableTransitions: computed(() => isDragging.value),
|
184
183
|
absolute: computed(() =>
|
@@ -224,9 +223,7 @@ export const VNavigationDrawer = genericComponent()({
|
|
224
223
|
'v-navigation-drawer--active': isActive.value,
|
225
224
|
'v-navigation-drawer--sticky': isSticky.value
|
226
225
|
}, themeClasses.value, backgroundColorClasses.value, borderClasses.value, displayClasses.value, elevationClasses.value, roundedClasses.value, props.class],
|
227
|
-
"style": [backgroundColorStyles.value, layoutItemStyles.value, ssrBootStyles.value, stickyStyles.value, props.style
|
228
|
-
height: 'auto'
|
229
|
-
} : {}]
|
226
|
+
"style": [backgroundColorStyles.value, layoutItemStyles.value, ssrBootStyles.value, stickyStyles.value, props.style]
|
230
227
|
}, scopeId, attrs), {
|
231
228
|
default: () => [hasImage && _createVNode("div", {
|
232
229
|
"key": "image",
|