vuetify 3.1.10 → 3.1.11
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/dist/json/attributes.json +203 -27
- package/dist/json/importMap.json +98 -98
- package/dist/json/tags.json +46 -2
- package/dist/json/web-types.json +481 -49
- package/dist/vuetify-labs.css +224 -204
- package/dist/vuetify-labs.d.ts +56923 -14294
- package/dist/vuetify-labs.esm.js +121 -129
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +121 -129
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +47 -39
- package/dist/vuetify.d.ts +55374 -15927
- package/dist/vuetify.esm.js +118 -129
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +118 -129
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +640 -642
- package/dist/vuetify.min.js.map +1 -1
- package/lib/blueprints/index.d.ts +6 -9
- package/lib/blueprints/md1.d.ts +6 -9
- package/lib/blueprints/md2.d.ts +6 -9
- package/lib/blueprints/md3.d.ts +6 -9
- package/lib/blueprints/md3.mjs +6 -0
- package/lib/blueprints/md3.mjs.map +1 -1
- package/lib/components/VAlert/index.d.ts +509 -83
- package/lib/components/VApp/VApp.css +1 -0
- package/lib/components/VApp/VApp.sass +1 -0
- package/lib/components/VApp/index.d.ts +158 -20
- package/lib/components/VAppBar/VAppBar.mjs +2 -2
- package/lib/components/VAppBar/VAppBar.mjs.map +1 -1
- package/lib/components/VAppBar/index.d.ts +616 -110
- package/lib/components/VAutocomplete/VAutocomplete.mjs +2 -2
- package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
- package/lib/components/VAutocomplete/index.d.ts +1656 -130
- package/lib/components/VAvatar/index.d.ts +205 -29
- package/lib/components/VBadge/index.d.ts +284 -42
- package/lib/components/VBanner/index.d.ts +478 -84
- package/lib/components/VBottomNavigation/index.d.ts +321 -40
- package/lib/components/VBreadcrumbs/index.d.ts +325 -45
- package/lib/components/VBtn/VBtn.css +0 -5
- package/lib/components/VBtn/VBtn.mjs +40 -39
- package/lib/components/VBtn/VBtn.mjs.map +1 -1
- package/lib/components/VBtn/VBtn.sass +0 -7
- package/lib/components/VBtn/_variables.scss +0 -2
- package/lib/components/VBtn/index.d.ts +452 -69
- package/lib/components/VBtnGroup/VBtnGroup.mjs +1 -7
- package/lib/components/VBtnGroup/VBtnGroup.mjs.map +1 -1
- package/lib/components/VBtnGroup/index.d.ts +185 -26
- package/lib/components/VBtnToggle/VBtnToggle.mjs +2 -2
- package/lib/components/VBtnToggle/VBtnToggle.mjs.map +1 -1
- package/lib/components/VBtnToggle/index.d.ts +245 -35
- package/lib/components/VCard/index.d.ts +938 -172
- package/lib/components/VCarousel/index.d.ts +561 -123
- package/lib/components/VCheckbox/VCheckbox.mjs +2 -2
- package/lib/components/VCheckbox/VCheckbox.mjs.map +1 -1
- package/lib/components/VCheckbox/VCheckboxBtn.mjs +1 -4
- package/lib/components/VCheckbox/VCheckboxBtn.mjs.map +1 -1
- package/lib/components/VCheckbox/index.d.ts +831 -147
- package/lib/components/VChip/index.d.ts +473 -75
- package/lib/components/VChipGroup/index.d.ts +227 -32
- package/lib/components/VCode/index.d.ts +109 -16
- package/lib/components/VColorPicker/index.d.ts +284 -20
- package/lib/components/VCombobox/VCombobox.mjs +2 -2
- package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
- package/lib/components/VCombobox/index.d.ts +1668 -130
- package/lib/components/VCounter/index.d.ts +1894 -87
- package/lib/components/VDefaultsProvider/index.d.ts +131 -22
- package/lib/components/VDialog/VDialog.css +31 -24
- package/lib/components/VDialog/VDialog.mjs +2 -2
- package/lib/components/VDialog/VDialog.mjs.map +1 -1
- package/lib/components/VDialog/VDialog.sass +19 -12
- package/lib/components/VDialog/index.d.ts +2362 -146
- package/lib/components/VDivider/index.d.ts +130 -23
- package/lib/components/VExpansionPanel/index.d.ts +719 -119
- package/lib/components/VField/index.d.ts +163 -21
- package/lib/components/VFileInput/index.d.ts +1038 -104
- package/lib/components/VFooter/index.d.ts +203 -28
- package/lib/components/VForm/index.d.ts +204 -23
- package/lib/components/VGrid/VCol.mjs +6 -5
- package/lib/components/VGrid/VCol.mjs.map +1 -1
- package/lib/components/VGrid/VRow.mjs +4 -4
- package/lib/components/VGrid/VRow.mjs.map +1 -1
- package/lib/components/VGrid/index.d.ts +733 -76
- package/lib/components/VHover/index.d.ts +182 -35
- package/lib/components/VIcon/index.d.ts +494 -50
- package/lib/components/VImg/index.d.ts +275 -46
- package/lib/components/VInput/index.d.ts +315 -53
- package/lib/components/VItemGroup/index.d.ts +308 -52
- package/lib/components/VKbd/VKbd.css +1 -0
- package/lib/components/VKbd/VKbd.sass +1 -0
- package/lib/components/VKbd/_variables.scss +1 -0
- package/lib/components/VKbd/index.d.ts +109 -16
- package/lib/components/VLabel/index.d.ts +113 -20
- package/lib/components/VLayout/index.d.ts +296 -41
- package/lib/components/VLazy/VLazy.mjs +4 -1
- package/lib/components/VLazy/VLazy.mjs.map +1 -1
- package/lib/components/VLazy/index.d.ts +219 -30
- package/lib/components/VList/VListChildren.mjs +2 -2
- package/lib/components/VList/VListChildren.mjs.map +1 -1
- package/lib/components/VList/VListGroup.mjs +1 -4
- package/lib/components/VList/VListGroup.mjs.map +1 -1
- package/lib/components/VList/index.d.ts +1461 -223
- package/lib/components/VLocaleProvider/index.d.ts +121 -20
- package/lib/components/VMain/index.d.ts +118 -17
- package/lib/components/VMenu/VMenu.css +4 -4
- package/lib/components/VMenu/VMenu.mjs +2 -2
- package/lib/components/VMenu/VMenu.mjs.map +1 -1
- package/lib/components/VMenu/VMenu.sass +1 -1
- package/lib/components/VMenu/index.d.ts +2368 -142
- package/lib/components/VMessages/index.d.ts +1921 -98
- package/lib/components/VNavigationDrawer/index.d.ts +379 -56
- package/lib/components/VOverlay/VOverlay.css +2 -2
- package/lib/components/VOverlay/VOverlay.mjs +1 -4
- package/lib/components/VOverlay/VOverlay.mjs.map +1 -1
- package/lib/components/VOverlay/VOverlay.sass +1 -1
- package/lib/components/VOverlay/_variables.scss +1 -1
- package/lib/components/VOverlay/index.d.ts +519 -85
- package/lib/components/VPagination/index.d.ts +502 -68
- package/lib/components/VParallax/VParallax.mjs +3 -3
- package/lib/components/VParallax/VParallax.mjs.map +1 -1
- package/lib/components/VParallax/index.d.ts +141 -28
- package/lib/components/VProgressCircular/index.d.ts +186 -25
- package/lib/components/VProgressLinear/index.d.ts +319 -48
- package/lib/components/VRadio/index.d.ts +313 -57
- package/lib/components/VRadioGroup/VRadioGroup.mjs +4 -6
- package/lib/components/VRadioGroup/VRadioGroup.mjs.map +1 -1
- package/lib/components/VRadioGroup/index.d.ts +463 -83
- package/lib/components/VRangeSlider/index.d.ts +528 -80
- package/lib/components/VRating/index.d.ts +305 -43
- package/lib/components/VResponsive/index.d.ts +142 -27
- package/lib/components/VSelect/VSelect.mjs +2 -2
- package/lib/components/VSelect/VSelect.mjs.map +1 -1
- package/lib/components/VSelect/index.d.ts +3060 -328
- package/lib/components/VSelectionControl/VSelectionControl.mjs +1 -4
- package/lib/components/VSelectionControl/VSelectionControl.mjs.map +1 -1
- package/lib/components/VSelectionControl/index.d.ts +76 -4
- package/lib/components/VSelectionControlGroup/index.d.ts +242 -38
- package/lib/components/VSheet/VSheet.mjs +1 -7
- package/lib/components/VSheet/VSheet.mjs.map +1 -1
- package/lib/components/VSheet/index.d.ts +194 -31
- package/lib/components/VSlideGroup/index.d.ts +475 -83
- package/lib/components/VSlider/index.d.ts +521 -79
- package/lib/components/VSlider/slider.mjs +2 -5
- package/lib/components/VSlider/slider.mjs.map +1 -1
- package/lib/components/VSnackbar/VSnackbar.mjs +2 -2
- package/lib/components/VSnackbar/VSnackbar.mjs.map +1 -1
- package/lib/components/VSnackbar/index.d.ts +1219 -81
- package/lib/components/VSwitch/VSwitch.mjs +2 -2
- package/lib/components/VSwitch/VSwitch.mjs.map +1 -1
- package/lib/components/VSwitch/index.d.ts +498 -92
- package/lib/components/VSystemBar/index.d.ts +184 -27
- package/lib/components/VTable/index.d.ts +190 -35
- package/lib/components/VTabs/VTab.mjs +7 -23
- package/lib/components/VTabs/VTab.mjs.map +1 -1
- package/lib/components/VTabs/index.d.ts +623 -71
- package/lib/components/VTextField/VTextField.mjs +8 -5
- package/lib/components/VTextField/VTextField.mjs.map +1 -1
- package/lib/components/VTextField/index.d.ts +1404 -106
- package/lib/components/VTextarea/VTextarea.mjs +7 -1
- package/lib/components/VTextarea/VTextarea.mjs.map +1 -1
- package/lib/components/VTextarea/index.d.ts +1014 -102
- package/lib/components/VThemeProvider/index.d.ts +124 -19
- package/lib/components/VTimeline/index.d.ts +441 -71
- package/lib/components/VToolbar/VToolbar.mjs +1 -4
- package/lib/components/VToolbar/VToolbar.mjs.map +1 -1
- package/lib/components/VToolbar/index.d.ts +542 -93
- package/lib/components/VTooltip/VTooltip.css +3 -3
- package/lib/components/VTooltip/VTooltip.mjs +2 -2
- package/lib/components/VTooltip/VTooltip.mjs.map +1 -1
- package/lib/components/VTooltip/VTooltip.sass +1 -1
- package/lib/components/VTooltip/index.d.ts +1263 -81
- package/lib/components/VValidation/index.d.ts +201 -30
- package/lib/components/VWindow/index.d.ts +527 -95
- package/lib/components/index.d.ts +55131 -15681
- package/lib/components/transitions/index.d.ts +2097 -308
- package/lib/composables/display.mjs +2 -0
- package/lib/composables/display.mjs.map +1 -1
- package/lib/composables/form.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/framework.mjs +1 -1
- package/lib/index.d.ts +32 -35
- package/lib/labs/VDataTable/VDataTable.css +12 -0
- package/lib/labs/VDataTable/VDataTable.sass +6 -0
- package/lib/labs/VDataTable/VDataTableRow.mjs +2 -0
- package/lib/labs/VDataTable/VDataTableRow.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableRows.mjs +1 -0
- package/lib/labs/VDataTable/VDataTableRows.mjs.map +1 -1
- package/lib/labs/VDataTable/index.d.ts +4176 -1016
- package/lib/labs/VVirtualScroll/index.d.ts +32 -1
- package/lib/labs/components.d.ts +4212 -1026
- package/lib/styles/main.css +4 -0
- package/lib/styles/settings/_utilities.scss +7 -0
- package/lib/util/animation.mjs +8 -1
- package/lib/util/animation.mjs.map +1 -1
- package/lib/util/defineComponent.mjs +12 -5
- package/lib/util/defineComponent.mjs.map +1 -1
- package/lib/util/helpers.mjs +4 -0
- package/lib/util/helpers.mjs.map +1 -1
- package/package.json +3 -2
|
@@ -1,9 +1,260 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
|
+
import { ComponentPropsOptions, ExtractPropTypes, nextTick, PropType } from 'vue';
|
|
3
|
+
|
|
4
|
+
interface FilterPropsOptions<PropsOptions extends Readonly<ComponentPropsOptions>, Props = ExtractPropTypes<PropsOptions>> {
|
|
5
|
+
filterProps<T extends Partial<Props>, U extends Exclude<keyof Props, Exclude<keyof Props, keyof T>>>(props: T): [yes: Partial<Pick<T, U>>, no: Omit<T, U>];
|
|
6
|
+
}
|
|
2
7
|
|
|
3
8
|
type VNavigationDrawerImageSlot = {
|
|
4
9
|
image: string;
|
|
5
10
|
};
|
|
6
|
-
declare const VNavigationDrawer:
|
|
11
|
+
declare const VNavigationDrawer: {
|
|
12
|
+
new (...args: any[]): {
|
|
13
|
+
$: vue.ComponentInternalInstance;
|
|
14
|
+
$data: {};
|
|
15
|
+
$props: Partial<{
|
|
16
|
+
absolute: boolean;
|
|
17
|
+
location: "end" | "start" | "left" | "top" | "bottom" | "right";
|
|
18
|
+
width: string | number;
|
|
19
|
+
order: string | number;
|
|
20
|
+
temporary: boolean;
|
|
21
|
+
tag: string;
|
|
22
|
+
sticky: boolean;
|
|
23
|
+
rounded: string | number | boolean;
|
|
24
|
+
floating: boolean;
|
|
25
|
+
modelValue: boolean | null;
|
|
26
|
+
scrim: string | boolean;
|
|
27
|
+
touchless: boolean;
|
|
28
|
+
disableResizeWatcher: boolean;
|
|
29
|
+
disableRouteWatcher: boolean;
|
|
30
|
+
expandOnHover: boolean;
|
|
31
|
+
permanent: boolean;
|
|
32
|
+
rail: boolean | null;
|
|
33
|
+
railWidth: string | number;
|
|
34
|
+
}> & Omit<{
|
|
35
|
+
absolute: boolean;
|
|
36
|
+
location: "end" | "start" | "left" | "top" | "bottom" | "right";
|
|
37
|
+
width: string | number;
|
|
38
|
+
order: string | number;
|
|
39
|
+
temporary: boolean;
|
|
40
|
+
tag: string;
|
|
41
|
+
sticky: boolean;
|
|
42
|
+
floating: boolean;
|
|
43
|
+
modelValue: boolean | null;
|
|
44
|
+
scrim: string | boolean;
|
|
45
|
+
touchless: boolean;
|
|
46
|
+
disableResizeWatcher: boolean;
|
|
47
|
+
disableRouteWatcher: boolean;
|
|
48
|
+
expandOnHover: boolean;
|
|
49
|
+
permanent: boolean;
|
|
50
|
+
rail: boolean | null;
|
|
51
|
+
railWidth: string | number;
|
|
52
|
+
} & {
|
|
53
|
+
name?: string | undefined;
|
|
54
|
+
border?: string | number | boolean | undefined;
|
|
55
|
+
color?: string | undefined;
|
|
56
|
+
image?: string | undefined;
|
|
57
|
+
elevation?: string | number | undefined;
|
|
58
|
+
theme?: string | undefined;
|
|
59
|
+
rounded?: string | number | boolean | undefined;
|
|
60
|
+
} & {
|
|
61
|
+
$children?: {} | vue.VNodeChild | {
|
|
62
|
+
default?: (() => vue.VNodeChild) | undefined;
|
|
63
|
+
prepend?: (() => vue.VNodeChild) | undefined;
|
|
64
|
+
append?: (() => vue.VNodeChild) | undefined;
|
|
65
|
+
image?: ((args_0: VNavigationDrawerImageSlot) => vue.VNodeChild) | undefined;
|
|
66
|
+
};
|
|
67
|
+
$slots?: {
|
|
68
|
+
default?: (() => vue.VNodeChild) | undefined;
|
|
69
|
+
prepend?: (() => vue.VNodeChild) | undefined;
|
|
70
|
+
append?: (() => vue.VNodeChild) | undefined;
|
|
71
|
+
image?: ((args_0: VNavigationDrawerImageSlot) => vue.VNodeChild) | undefined;
|
|
72
|
+
} | undefined;
|
|
73
|
+
'v-slots'?: {
|
|
74
|
+
default?: false | (() => vue.VNodeChild) | undefined;
|
|
75
|
+
prepend?: false | (() => vue.VNodeChild) | undefined;
|
|
76
|
+
append?: false | (() => vue.VNodeChild) | undefined;
|
|
77
|
+
image?: false | ((args_0: VNavigationDrawerImageSlot) => vue.VNodeChild) | undefined;
|
|
78
|
+
} | undefined;
|
|
79
|
+
} & {
|
|
80
|
+
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
|
|
81
|
+
"v-slot:prepend"?: false | (() => vue.VNodeChild) | undefined;
|
|
82
|
+
"v-slot:append"?: false | (() => vue.VNodeChild) | undefined;
|
|
83
|
+
"v-slot:image"?: false | ((args_0: VNavigationDrawerImageSlot) => vue.VNodeChild) | undefined;
|
|
84
|
+
} & {
|
|
85
|
+
"onUpdate:modelValue"?: ((val: boolean) => any) | undefined;
|
|
86
|
+
"onUpdate:rail"?: ((val: boolean) => any) | undefined;
|
|
87
|
+
} & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, "absolute" | "location" | "width" | "order" | "temporary" | "tag" | "sticky" | "rounded" | "floating" | "modelValue" | "scrim" | "touchless" | "disableResizeWatcher" | "disableRouteWatcher" | "expandOnHover" | "permanent" | "rail" | "railWidth">;
|
|
88
|
+
$attrs: {
|
|
89
|
+
[x: string]: unknown;
|
|
90
|
+
};
|
|
91
|
+
$refs: {
|
|
92
|
+
[x: string]: unknown;
|
|
93
|
+
};
|
|
94
|
+
$slots: Readonly<{
|
|
95
|
+
[name: string]: vue.Slot | undefined;
|
|
96
|
+
}>;
|
|
97
|
+
$root: vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
98
|
+
$parent: vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
99
|
+
$emit: ((event: "update:modelValue", val: boolean) => void) & ((event: "update:rail", val: boolean) => void);
|
|
100
|
+
$el: any;
|
|
101
|
+
$options: vue.ComponentOptionsBase<{
|
|
102
|
+
absolute: boolean;
|
|
103
|
+
location: "end" | "start" | "left" | "top" | "bottom" | "right";
|
|
104
|
+
width: string | number;
|
|
105
|
+
order: string | number;
|
|
106
|
+
temporary: boolean;
|
|
107
|
+
tag: string;
|
|
108
|
+
sticky: boolean;
|
|
109
|
+
floating: boolean;
|
|
110
|
+
modelValue: boolean | null;
|
|
111
|
+
scrim: string | boolean;
|
|
112
|
+
touchless: boolean;
|
|
113
|
+
disableResizeWatcher: boolean;
|
|
114
|
+
disableRouteWatcher: boolean;
|
|
115
|
+
expandOnHover: boolean;
|
|
116
|
+
permanent: boolean;
|
|
117
|
+
rail: boolean | null;
|
|
118
|
+
railWidth: string | number;
|
|
119
|
+
} & {
|
|
120
|
+
name?: string | undefined;
|
|
121
|
+
border?: string | number | boolean | undefined;
|
|
122
|
+
color?: string | undefined;
|
|
123
|
+
image?: string | undefined;
|
|
124
|
+
elevation?: string | number | undefined;
|
|
125
|
+
theme?: string | undefined;
|
|
126
|
+
rounded?: string | number | boolean | undefined;
|
|
127
|
+
} & {
|
|
128
|
+
$children?: {} | vue.VNodeChild | {
|
|
129
|
+
default?: (() => vue.VNodeChild) | undefined;
|
|
130
|
+
prepend?: (() => vue.VNodeChild) | undefined;
|
|
131
|
+
append?: (() => vue.VNodeChild) | undefined;
|
|
132
|
+
image?: ((args_0: VNavigationDrawerImageSlot) => vue.VNodeChild) | undefined;
|
|
133
|
+
};
|
|
134
|
+
$slots?: {
|
|
135
|
+
default?: (() => vue.VNodeChild) | undefined;
|
|
136
|
+
prepend?: (() => vue.VNodeChild) | undefined;
|
|
137
|
+
append?: (() => vue.VNodeChild) | undefined;
|
|
138
|
+
image?: ((args_0: VNavigationDrawerImageSlot) => vue.VNodeChild) | undefined;
|
|
139
|
+
} | undefined;
|
|
140
|
+
'v-slots'?: {
|
|
141
|
+
default?: false | (() => vue.VNodeChild) | undefined;
|
|
142
|
+
prepend?: false | (() => vue.VNodeChild) | undefined;
|
|
143
|
+
append?: false | (() => vue.VNodeChild) | undefined;
|
|
144
|
+
image?: false | ((args_0: VNavigationDrawerImageSlot) => vue.VNodeChild) | undefined;
|
|
145
|
+
} | undefined;
|
|
146
|
+
} & {
|
|
147
|
+
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
|
|
148
|
+
"v-slot:prepend"?: false | (() => vue.VNodeChild) | undefined;
|
|
149
|
+
"v-slot:append"?: false | (() => vue.VNodeChild) | undefined;
|
|
150
|
+
"v-slot:image"?: false | ((args_0: VNavigationDrawerImageSlot) => vue.VNodeChild) | undefined;
|
|
151
|
+
} & {
|
|
152
|
+
"onUpdate:modelValue"?: ((val: boolean) => any) | undefined;
|
|
153
|
+
"onUpdate:rail"?: ((val: boolean) => any) | undefined;
|
|
154
|
+
}, {
|
|
155
|
+
isStuck: vue.Ref<boolean | "top" | "bottom">;
|
|
156
|
+
}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
157
|
+
'update:modelValue': (val: boolean) => true;
|
|
158
|
+
'update:rail': (val: boolean) => true;
|
|
159
|
+
}, string, {
|
|
160
|
+
absolute: boolean;
|
|
161
|
+
location: "end" | "start" | "left" | "top" | "bottom" | "right";
|
|
162
|
+
width: string | number;
|
|
163
|
+
order: string | number;
|
|
164
|
+
temporary: boolean;
|
|
165
|
+
tag: string;
|
|
166
|
+
sticky: boolean;
|
|
167
|
+
rounded: string | number | boolean;
|
|
168
|
+
floating: boolean;
|
|
169
|
+
modelValue: boolean | null;
|
|
170
|
+
scrim: string | boolean;
|
|
171
|
+
touchless: boolean;
|
|
172
|
+
disableResizeWatcher: boolean;
|
|
173
|
+
disableRouteWatcher: boolean;
|
|
174
|
+
expandOnHover: boolean;
|
|
175
|
+
permanent: boolean;
|
|
176
|
+
rail: boolean | null;
|
|
177
|
+
railWidth: string | number;
|
|
178
|
+
}, {}, string> & {
|
|
179
|
+
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
180
|
+
created?: ((() => void) | (() => void)[]) | undefined;
|
|
181
|
+
beforeMount?: ((() => void) | (() => void)[]) | undefined;
|
|
182
|
+
mounted?: ((() => void) | (() => void)[]) | undefined;
|
|
183
|
+
beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
|
|
184
|
+
updated?: ((() => void) | (() => void)[]) | undefined;
|
|
185
|
+
activated?: ((() => void) | (() => void)[]) | undefined;
|
|
186
|
+
deactivated?: ((() => void) | (() => void)[]) | undefined;
|
|
187
|
+
beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
|
|
188
|
+
beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
|
|
189
|
+
destroyed?: ((() => void) | (() => void)[]) | undefined;
|
|
190
|
+
unmounted?: ((() => void) | (() => void)[]) | undefined;
|
|
191
|
+
renderTracked?: (((e: vue.DebuggerEvent) => void) | ((e: vue.DebuggerEvent) => void)[]) | undefined;
|
|
192
|
+
renderTriggered?: (((e: vue.DebuggerEvent) => void) | ((e: vue.DebuggerEvent) => void)[]) | undefined;
|
|
193
|
+
errorCaptured?: (((err: unknown, instance: vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void) | ((err: unknown, instance: vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void)[]) | undefined;
|
|
194
|
+
};
|
|
195
|
+
$forceUpdate: () => void;
|
|
196
|
+
$nextTick: typeof nextTick;
|
|
197
|
+
$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;
|
|
198
|
+
} & {
|
|
199
|
+
absolute: boolean;
|
|
200
|
+
location: "end" | "start" | "left" | "top" | "bottom" | "right";
|
|
201
|
+
width: string | number;
|
|
202
|
+
order: string | number;
|
|
203
|
+
temporary: boolean;
|
|
204
|
+
tag: string;
|
|
205
|
+
sticky: boolean;
|
|
206
|
+
floating: boolean;
|
|
207
|
+
modelValue: boolean | null;
|
|
208
|
+
scrim: string | boolean;
|
|
209
|
+
touchless: boolean;
|
|
210
|
+
disableResizeWatcher: boolean;
|
|
211
|
+
disableRouteWatcher: boolean;
|
|
212
|
+
expandOnHover: boolean;
|
|
213
|
+
permanent: boolean;
|
|
214
|
+
rail: boolean | null;
|
|
215
|
+
railWidth: string | number;
|
|
216
|
+
} & {
|
|
217
|
+
name?: string | undefined;
|
|
218
|
+
border?: string | number | boolean | undefined;
|
|
219
|
+
color?: string | undefined;
|
|
220
|
+
image?: string | undefined;
|
|
221
|
+
elevation?: string | number | undefined;
|
|
222
|
+
theme?: string | undefined;
|
|
223
|
+
rounded?: string | number | boolean | undefined;
|
|
224
|
+
} & {
|
|
225
|
+
$children?: {} | vue.VNodeChild | {
|
|
226
|
+
default?: (() => vue.VNodeChild) | undefined;
|
|
227
|
+
prepend?: (() => vue.VNodeChild) | undefined;
|
|
228
|
+
append?: (() => vue.VNodeChild) | undefined;
|
|
229
|
+
image?: ((args_0: VNavigationDrawerImageSlot) => vue.VNodeChild) | undefined;
|
|
230
|
+
};
|
|
231
|
+
$slots?: {
|
|
232
|
+
default?: (() => vue.VNodeChild) | undefined;
|
|
233
|
+
prepend?: (() => vue.VNodeChild) | undefined;
|
|
234
|
+
append?: (() => vue.VNodeChild) | undefined;
|
|
235
|
+
image?: ((args_0: VNavigationDrawerImageSlot) => vue.VNodeChild) | undefined;
|
|
236
|
+
} | undefined;
|
|
237
|
+
'v-slots'?: {
|
|
238
|
+
default?: false | (() => vue.VNodeChild) | undefined;
|
|
239
|
+
prepend?: false | (() => vue.VNodeChild) | undefined;
|
|
240
|
+
append?: false | (() => vue.VNodeChild) | undefined;
|
|
241
|
+
image?: false | ((args_0: VNavigationDrawerImageSlot) => vue.VNodeChild) | undefined;
|
|
242
|
+
} | undefined;
|
|
243
|
+
} & {
|
|
244
|
+
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
|
|
245
|
+
"v-slot:prepend"?: false | (() => vue.VNodeChild) | undefined;
|
|
246
|
+
"v-slot:append"?: false | (() => vue.VNodeChild) | undefined;
|
|
247
|
+
"v-slot:image"?: false | ((args_0: VNavigationDrawerImageSlot) => vue.VNodeChild) | undefined;
|
|
248
|
+
} & {
|
|
249
|
+
"onUpdate:modelValue"?: ((val: boolean) => any) | undefined;
|
|
250
|
+
"onUpdate:rail"?: ((val: boolean) => any) | undefined;
|
|
251
|
+
} & vue.ShallowUnwrapRef<{
|
|
252
|
+
isStuck: vue.Ref<boolean | "top" | "bottom">;
|
|
253
|
+
}> & {} & vue.ComponentCustomProperties & {};
|
|
254
|
+
__isFragment?: undefined;
|
|
255
|
+
__isTeleport?: undefined;
|
|
256
|
+
__isSuspense?: undefined;
|
|
257
|
+
} & vue.ComponentOptionsBase<{
|
|
7
258
|
absolute: boolean;
|
|
8
259
|
location: "end" | "start" | "left" | "top" | "bottom" | "right";
|
|
9
260
|
width: string | number;
|
|
@@ -53,65 +304,15 @@ declare const VNavigationDrawer: vue.DefineComponent<{
|
|
|
53
304
|
"v-slot:prepend"?: false | (() => vue.VNodeChild) | undefined;
|
|
54
305
|
"v-slot:append"?: false | (() => vue.VNodeChild) | undefined;
|
|
55
306
|
"v-slot:image"?: false | ((args_0: VNavigationDrawerImageSlot) => vue.VNodeChild) | undefined;
|
|
307
|
+
} & {
|
|
308
|
+
"onUpdate:modelValue"?: ((val: boolean) => any) | undefined;
|
|
309
|
+
"onUpdate:rail"?: ((val: boolean) => any) | undefined;
|
|
56
310
|
}, {
|
|
57
311
|
isStuck: vue.Ref<boolean | "top" | "bottom">;
|
|
58
312
|
}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
59
313
|
'update:modelValue': (val: boolean) => true;
|
|
60
314
|
'update:rail': (val: boolean) => true;
|
|
61
|
-
}, string,
|
|
62
|
-
absolute: boolean;
|
|
63
|
-
location: "end" | "start" | "left" | "top" | "bottom" | "right";
|
|
64
|
-
width: string | number;
|
|
65
|
-
order: string | number;
|
|
66
|
-
temporary: boolean;
|
|
67
|
-
tag: string;
|
|
68
|
-
sticky: boolean;
|
|
69
|
-
floating: boolean;
|
|
70
|
-
modelValue: boolean | null;
|
|
71
|
-
scrim: string | boolean;
|
|
72
|
-
touchless: boolean;
|
|
73
|
-
disableResizeWatcher: boolean;
|
|
74
|
-
disableRouteWatcher: boolean;
|
|
75
|
-
expandOnHover: boolean;
|
|
76
|
-
permanent: boolean;
|
|
77
|
-
rail: boolean | null;
|
|
78
|
-
railWidth: string | number;
|
|
79
|
-
} & {
|
|
80
|
-
name?: string | undefined;
|
|
81
|
-
border?: string | number | boolean | undefined;
|
|
82
|
-
color?: string | undefined;
|
|
83
|
-
image?: string | undefined;
|
|
84
|
-
elevation?: string | number | undefined;
|
|
85
|
-
theme?: string | undefined;
|
|
86
|
-
rounded?: string | number | boolean | undefined;
|
|
87
|
-
} & {
|
|
88
|
-
$children?: {} | vue.VNodeChild | {
|
|
89
|
-
default?: (() => vue.VNodeChild) | undefined;
|
|
90
|
-
prepend?: (() => vue.VNodeChild) | undefined;
|
|
91
|
-
append?: (() => vue.VNodeChild) | undefined;
|
|
92
|
-
image?: ((args_0: VNavigationDrawerImageSlot) => vue.VNodeChild) | undefined;
|
|
93
|
-
};
|
|
94
|
-
$slots?: {
|
|
95
|
-
default?: (() => vue.VNodeChild) | undefined;
|
|
96
|
-
prepend?: (() => vue.VNodeChild) | undefined;
|
|
97
|
-
append?: (() => vue.VNodeChild) | undefined;
|
|
98
|
-
image?: ((args_0: VNavigationDrawerImageSlot) => vue.VNodeChild) | undefined;
|
|
99
|
-
} | undefined;
|
|
100
|
-
'v-slots'?: {
|
|
101
|
-
default?: false | (() => vue.VNodeChild) | undefined;
|
|
102
|
-
prepend?: false | (() => vue.VNodeChild) | undefined;
|
|
103
|
-
append?: false | (() => vue.VNodeChild) | undefined;
|
|
104
|
-
image?: false | ((args_0: VNavigationDrawerImageSlot) => vue.VNodeChild) | undefined;
|
|
105
|
-
} | undefined;
|
|
106
|
-
} & {
|
|
107
|
-
"v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
|
|
108
|
-
"v-slot:prepend"?: false | (() => vue.VNodeChild) | undefined;
|
|
109
|
-
"v-slot:append"?: false | (() => vue.VNodeChild) | undefined;
|
|
110
|
-
"v-slot:image"?: false | ((args_0: VNavigationDrawerImageSlot) => vue.VNodeChild) | undefined;
|
|
111
|
-
} & {
|
|
112
|
-
"onUpdate:modelValue"?: ((val: boolean) => any) | undefined;
|
|
113
|
-
"onUpdate:rail"?: ((val: boolean) => any) | undefined;
|
|
114
|
-
}, {
|
|
315
|
+
}, string, {
|
|
115
316
|
absolute: boolean;
|
|
116
317
|
location: "end" | "start" | "left" | "top" | "bottom" | "right";
|
|
117
318
|
width: string | number;
|
|
@@ -130,7 +331,129 @@ declare const VNavigationDrawer: vue.DefineComponent<{
|
|
|
130
331
|
permanent: boolean;
|
|
131
332
|
rail: boolean | null;
|
|
132
333
|
railWidth: string | number;
|
|
133
|
-
}
|
|
334
|
+
}, {}, string> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & FilterPropsOptions<{
|
|
335
|
+
theme: StringConstructor;
|
|
336
|
+
tag: Omit<{
|
|
337
|
+
type: StringConstructor;
|
|
338
|
+
default: string;
|
|
339
|
+
}, "type" | "default"> & {
|
|
340
|
+
type: PropType<string>;
|
|
341
|
+
default: string;
|
|
342
|
+
};
|
|
343
|
+
rounded: {
|
|
344
|
+
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
345
|
+
default: undefined;
|
|
346
|
+
};
|
|
347
|
+
name: {
|
|
348
|
+
type: StringConstructor;
|
|
349
|
+
};
|
|
350
|
+
order: {
|
|
351
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
352
|
+
default: number;
|
|
353
|
+
};
|
|
354
|
+
absolute: BooleanConstructor;
|
|
355
|
+
elevation: {
|
|
356
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
357
|
+
validator(v: any): boolean;
|
|
358
|
+
};
|
|
359
|
+
border: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
360
|
+
color: StringConstructor;
|
|
361
|
+
disableResizeWatcher: BooleanConstructor;
|
|
362
|
+
disableRouteWatcher: BooleanConstructor;
|
|
363
|
+
expandOnHover: BooleanConstructor;
|
|
364
|
+
floating: BooleanConstructor;
|
|
365
|
+
modelValue: {
|
|
366
|
+
type: PropType<boolean | null>;
|
|
367
|
+
default: null;
|
|
368
|
+
};
|
|
369
|
+
permanent: BooleanConstructor;
|
|
370
|
+
rail: {
|
|
371
|
+
type: PropType<boolean | null>;
|
|
372
|
+
default: null;
|
|
373
|
+
};
|
|
374
|
+
railWidth: {
|
|
375
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
376
|
+
default: number;
|
|
377
|
+
};
|
|
378
|
+
scrim: {
|
|
379
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
380
|
+
default: boolean;
|
|
381
|
+
};
|
|
382
|
+
image: StringConstructor;
|
|
383
|
+
temporary: BooleanConstructor;
|
|
384
|
+
touchless: BooleanConstructor;
|
|
385
|
+
width: {
|
|
386
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
387
|
+
default: number;
|
|
388
|
+
};
|
|
389
|
+
location: {
|
|
390
|
+
type: PropType<"end" | "start" | "left" | "top" | "bottom" | "right">;
|
|
391
|
+
default: string;
|
|
392
|
+
validator: (value: any) => boolean;
|
|
393
|
+
};
|
|
394
|
+
sticky: BooleanConstructor;
|
|
395
|
+
}, vue.ExtractPropTypes<{
|
|
396
|
+
theme: StringConstructor;
|
|
397
|
+
tag: Omit<{
|
|
398
|
+
type: StringConstructor;
|
|
399
|
+
default: string;
|
|
400
|
+
}, "type" | "default"> & {
|
|
401
|
+
type: PropType<string>;
|
|
402
|
+
default: string;
|
|
403
|
+
};
|
|
404
|
+
rounded: {
|
|
405
|
+
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
406
|
+
default: undefined;
|
|
407
|
+
};
|
|
408
|
+
name: {
|
|
409
|
+
type: StringConstructor;
|
|
410
|
+
};
|
|
411
|
+
order: {
|
|
412
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
413
|
+
default: number;
|
|
414
|
+
};
|
|
415
|
+
absolute: BooleanConstructor;
|
|
416
|
+
elevation: {
|
|
417
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
418
|
+
validator(v: any): boolean;
|
|
419
|
+
};
|
|
420
|
+
border: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
|
421
|
+
color: StringConstructor;
|
|
422
|
+
disableResizeWatcher: BooleanConstructor;
|
|
423
|
+
disableRouteWatcher: BooleanConstructor;
|
|
424
|
+
expandOnHover: BooleanConstructor;
|
|
425
|
+
floating: BooleanConstructor;
|
|
426
|
+
modelValue: {
|
|
427
|
+
type: PropType<boolean | null>;
|
|
428
|
+
default: null;
|
|
429
|
+
};
|
|
430
|
+
permanent: BooleanConstructor;
|
|
431
|
+
rail: {
|
|
432
|
+
type: PropType<boolean | null>;
|
|
433
|
+
default: null;
|
|
434
|
+
};
|
|
435
|
+
railWidth: {
|
|
436
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
437
|
+
default: number;
|
|
438
|
+
};
|
|
439
|
+
scrim: {
|
|
440
|
+
type: (StringConstructor | BooleanConstructor)[];
|
|
441
|
+
default: boolean;
|
|
442
|
+
};
|
|
443
|
+
image: StringConstructor;
|
|
444
|
+
temporary: BooleanConstructor;
|
|
445
|
+
touchless: BooleanConstructor;
|
|
446
|
+
width: {
|
|
447
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
448
|
+
default: number;
|
|
449
|
+
};
|
|
450
|
+
location: {
|
|
451
|
+
type: PropType<"end" | "start" | "left" | "top" | "bottom" | "right">;
|
|
452
|
+
default: string;
|
|
453
|
+
validator: (value: any) => boolean;
|
|
454
|
+
};
|
|
455
|
+
sticky: BooleanConstructor;
|
|
456
|
+
}>>;
|
|
134
457
|
type VNavigationDrawer = InstanceType<typeof VNavigationDrawer>;
|
|
135
458
|
|
|
136
459
|
export { VNavigationDrawer };
|
|
@@ -43,7 +43,7 @@ html.v-overlay-scroll-blocked {
|
|
|
43
43
|
border-radius: inherit;
|
|
44
44
|
bottom: 0;
|
|
45
45
|
left: 0;
|
|
46
|
-
opacity: 32
|
|
46
|
+
opacity: 0.32;
|
|
47
47
|
position: fixed;
|
|
48
48
|
right: 0;
|
|
49
49
|
top: 0;
|
|
@@ -58,5 +58,5 @@ html.v-overlay-scroll-blocked {
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
.v-overlay--scroll-blocked {
|
|
61
|
-
|
|
61
|
+
margin-inline-end: var(--v-scrollbar-offset);
|
|
62
62
|
}
|
|
@@ -20,7 +20,7 @@ import { useStack } from "../../composables/stack.mjs";
|
|
|
20
20
|
import { useTeleport } from "../../composables/teleport.mjs";
|
|
21
21
|
import { useToggleScope } from "../../composables/toggleScope.mjs"; // Directives
|
|
22
22
|
import { ClickOutside } from "../../directives/click-outside/index.mjs"; // Utilities
|
|
23
|
-
import { animate, convertToUnit, genericComponent, getScrollParent, IN_BROWSER,
|
|
23
|
+
import { animate, convertToUnit, genericComponent, getScrollParent, IN_BROWSER, propsFactory, standardEasing, useRender } from "../../util/index.mjs";
|
|
24
24
|
import { computed, mergeProps, ref, Teleport, toHandlers, toRef, Transition, watch } from 'vue';
|
|
25
25
|
|
|
26
26
|
// Types
|
|
@@ -272,7 +272,4 @@ export const VOverlay = genericComponent()({
|
|
|
272
272
|
};
|
|
273
273
|
}
|
|
274
274
|
});
|
|
275
|
-
export function filterVOverlayProps(props) {
|
|
276
|
-
return pick(props, Object.keys(VOverlay.props));
|
|
277
|
-
}
|
|
278
275
|
//# sourceMappingURL=VOverlay.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VOverlay.mjs","names":["makeActivatorProps","useActivator","makeDimensionProps","useDimension","makeLazyProps","useLazy","makeLocationStrategyProps","useLocationStrategies","makeScrollStrategyProps","useScrollStrategies","makeThemeProps","provideTheme","makeTransitionProps","MaybeTransition","useBackButton","useRouter","useBackgroundColor","useProxiedModel","useHydration","useRtl","useScopeId","useStack","useTeleport","useToggleScope","ClickOutside","animate","convertToUnit","genericComponent","getScrollParent","IN_BROWSER","pick","propsFactory","standardEasing","useRender","computed","mergeProps","ref","Teleport","toHandlers","toRef","Transition","watch","Scrim","props","modelValue","color","rest","backgroundColorClasses","value","backgroundColorStyles","makeVOverlayProps","absolute","Boolean","attach","String","Object","closeOnBack","type","default","contained","contentClass","contentProps","disabled","noClickAnimation","persistent","scrim","zIndex","Number","VOverlay","name","directives","inheritAttrs","_disableGlobalStack","emits","e","afterLeave","setup","slots","attrs","emit","model","isActive","get","set","v","teleportTarget","themeClasses","rtlClasses","isRtl","hasContent","onAfterLeave","scrimColor","globalTop","localTop","stackStyles","activatorEl","activatorRef","activatorEvents","contentEvents","scrimEvents","isTop","dimensionStyles","isMounted","scopeId","root","contentEl","contentStyles","updateLocation","onClickOutside","animateClick","closeConditional","val","window","addEventListener","onKeydown","removeEventListener","immediate","key","router","next","top","scrollParent","document","scrollingElement","scrollTop","transformOrigin","transform","duration","easing","activator","activatorProps","transition","handler","include","filterVOverlayProps","keys"],"sources":["../../../src/components/VOverlay/VOverlay.tsx"],"sourcesContent":["// Styles\nimport './VOverlay.sass'\n\n// Composables\nimport { makeActivatorProps, useActivator } from './useActivator'\nimport { makeDimensionProps, useDimension } from '@/composables/dimensions'\nimport { makeLazyProps, useLazy } from '@/composables/lazy'\nimport { makeLocationStrategyProps, useLocationStrategies } from './locationStrategies'\nimport { makeScrollStrategyProps, useScrollStrategies } from './scrollStrategies'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\nimport { makeTransitionProps, MaybeTransition } from '@/composables/transition'\nimport { useBackButton, useRouter } from '@/composables/router'\nimport { useBackgroundColor } from '@/composables/color'\nimport { useProxiedModel } from '@/composables/proxiedModel'\nimport { useHydration } from '@/composables/hydration'\nimport { useRtl } from '@/composables/locale'\nimport { useScopeId } from '@/composables/scopeId'\nimport { useStack } from '@/composables/stack'\nimport { useTeleport } from '@/composables/teleport'\nimport { useToggleScope } from '@/composables/toggleScope'\n\n// Directives\nimport { ClickOutside } from '@/directives/click-outside'\n\n// Utilities\nimport {\n animate,\n convertToUnit,\n genericComponent,\n getScrollParent,\n IN_BROWSER,\n pick,\n propsFactory,\n standardEasing,\n useRender,\n} from '@/util'\nimport {\n computed,\n mergeProps,\n ref,\n Teleport,\n toHandlers,\n toRef,\n Transition,\n watch,\n} from 'vue'\n\n// Types\nimport type { BackgroundColorData } from '@/composables/color'\nimport type { MakeSlots } from '@/util'\nimport type { ExtractPropTypes, PropType, Ref } from 'vue'\n\ninterface ScrimProps {\n [key: string]: unknown\n modelValue: boolean\n color: BackgroundColorData\n}\nfunction Scrim (props: ScrimProps) {\n const { modelValue, color, ...rest } = props\n return (\n <Transition name=\"fade-transition\" appear>\n { props.modelValue && (\n <div\n class={[\n 'v-overlay__scrim',\n props.color.backgroundColorClasses.value,\n ]}\n style={ props.color.backgroundColorStyles.value }\n { ...rest }\n />\n )}\n </Transition>\n )\n}\n\nexport type OverlaySlots = MakeSlots<{\n default: [{ isActive: Ref<boolean> }]\n activator: [{ isActive: boolean, props: Record<string, any> }]\n}>\n\nexport const makeVOverlayProps = propsFactory({\n absolute: Boolean,\n attach: [Boolean, String, Object] as PropType<boolean | string | Element>,\n closeOnBack: {\n type: Boolean,\n default: true,\n },\n contained: Boolean,\n contentClass: null,\n contentProps: null,\n disabled: Boolean,\n noClickAnimation: Boolean,\n modelValue: Boolean,\n persistent: Boolean,\n scrim: {\n type: [String, Boolean],\n default: true,\n },\n zIndex: {\n type: [Number, String],\n default: 2000,\n },\n\n ...makeActivatorProps(),\n ...makeDimensionProps(),\n ...makeLazyProps(),\n ...makeLocationStrategyProps(),\n ...makeScrollStrategyProps(),\n ...makeThemeProps(),\n ...makeTransitionProps(),\n}, 'v-overlay')\n\nexport const VOverlay = genericComponent<OverlaySlots>()({\n name: 'VOverlay',\n\n directives: { ClickOutside },\n\n inheritAttrs: false,\n\n props: {\n _disableGlobalStack: Boolean,\n\n ...makeVOverlayProps(),\n },\n\n emits: {\n 'click:outside': (e: MouseEvent) => true,\n 'update:modelValue': (value: boolean) => true,\n afterLeave: () => true,\n },\n\n setup (props, { slots, attrs, emit }) {\n const model = useProxiedModel(props, 'modelValue')\n const isActive = computed({\n get: () => model.value,\n set: v => {\n if (!(v && props.disabled)) model.value = v\n },\n })\n const { teleportTarget } = useTeleport(computed(() => props.attach || props.contained))\n const { themeClasses } = provideTheme(props)\n const { rtlClasses, isRtl } = useRtl()\n const { hasContent, onAfterLeave } = useLazy(props, isActive)\n const scrimColor = useBackgroundColor(computed(() => {\n return typeof props.scrim === 'string' ? props.scrim : null\n }))\n const { globalTop, localTop, stackStyles } = useStack(isActive, toRef(props, 'zIndex'), props._disableGlobalStack)\n const { activatorEl, activatorRef, activatorEvents, contentEvents, scrimEvents } = useActivator(props, { isActive, isTop: localTop })\n const { dimensionStyles } = useDimension(props)\n const isMounted = useHydration()\n const { scopeId } = useScopeId()\n\n watch(() => props.disabled, v => {\n if (v) isActive.value = false\n })\n\n const root = ref<HTMLElement>()\n const contentEl = ref<HTMLElement>()\n const { contentStyles, updateLocation } = useLocationStrategies(props, {\n isRtl,\n contentEl,\n activatorEl,\n isActive,\n })\n useScrollStrategies(props, {\n root,\n contentEl,\n activatorEl,\n isActive,\n updateLocation,\n })\n\n function onClickOutside (e: MouseEvent) {\n emit('click:outside', e)\n\n if (!props.persistent) isActive.value = false\n else animateClick()\n }\n\n function closeConditional () {\n return isActive.value && globalTop.value\n }\n\n IN_BROWSER && watch(isActive, val => {\n if (val) {\n window.addEventListener('keydown', onKeydown)\n } else {\n window.removeEventListener('keydown', onKeydown)\n }\n }, { immediate: true })\n\n function onKeydown (e: KeyboardEvent) {\n if (e.key === 'Escape' && globalTop.value) {\n if (!props.persistent) {\n isActive.value = false\n } else animateClick()\n }\n }\n\n const router = useRouter()\n useToggleScope(() => props.closeOnBack, () => {\n useBackButton(router, next => {\n if (globalTop.value && isActive.value) {\n next(false)\n if (!props.persistent) isActive.value = false\n else animateClick()\n } else {\n next()\n }\n })\n })\n\n const top = ref<number>()\n watch(() => isActive.value && (props.absolute || props.contained) && teleportTarget.value == null, val => {\n if (val) {\n const scrollParent = getScrollParent(root.value)\n if (scrollParent && scrollParent !== document.scrollingElement) {\n top.value = scrollParent.scrollTop\n }\n }\n })\n\n // Add a quick \"bounce\" animation to the content\n function animateClick () {\n if (props.noClickAnimation) return\n\n contentEl.value && animate(contentEl.value, [\n { transformOrigin: 'center' },\n { transform: 'scale(1.03)' },\n { transformOrigin: 'center' },\n ], {\n duration: 150,\n easing: standardEasing,\n })\n }\n\n useRender(() => (\n <>\n { slots.activator?.({\n isActive: isActive.value,\n props: mergeProps({\n ref: activatorRef,\n }, toHandlers(activatorEvents.value), props.activatorProps),\n })}\n\n { isMounted.value && (\n <Teleport\n disabled={ !teleportTarget.value }\n to={ teleportTarget.value }\n >\n { hasContent.value && (\n <div\n class={[\n 'v-overlay',\n {\n 'v-overlay--absolute': props.absolute || props.contained,\n 'v-overlay--active': isActive.value,\n 'v-overlay--contained': props.contained,\n },\n themeClasses.value,\n rtlClasses.value,\n ]}\n style={[stackStyles.value, { top: convertToUnit(top.value) }]}\n ref={ root }\n { ...scopeId }\n { ...attrs }\n >\n <Scrim\n color={ scrimColor }\n modelValue={ isActive.value && !!props.scrim }\n { ...toHandlers(scrimEvents.value) }\n />\n <MaybeTransition\n appear\n persisted\n transition={ props.transition }\n target={ activatorEl.value }\n onAfterLeave={ () => { onAfterLeave(); emit('afterLeave') } }\n >\n <div\n ref={ contentEl }\n v-show={ isActive.value }\n v-click-outside={{ handler: onClickOutside, closeConditional, include: () => [activatorEl.value] }}\n class={[\n 'v-overlay__content',\n props.contentClass,\n ]}\n style={[\n dimensionStyles.value,\n contentStyles.value,\n ]}\n { ...toHandlers(contentEvents.value) }\n { ...props.contentProps }\n >\n { slots.default?.({ isActive }) }\n </div>\n </MaybeTransition>\n </div>\n )}\n </Teleport>\n )}\n </>\n ))\n\n return {\n activatorEl,\n animateClick,\n contentEl,\n globalTop,\n localTop,\n updateLocation,\n }\n },\n})\n\nexport type VOverlay = InstanceType<typeof VOverlay>\n\nexport function filterVOverlayProps (props: Partial<ExtractPropTypes<ReturnType<typeof makeVOverlayProps>>>) {\n return pick(props, Object.keys(VOverlay.props) as any)\n}\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,kBAAkB,EAAEC,YAAY;AAAA,SAChCC,kBAAkB,EAAEC,YAAY;AAAA,SAChCC,aAAa,EAAEC,OAAO;AAAA,SACtBC,yBAAyB,EAAEC,qBAAqB;AAAA,SAChDC,uBAAuB,EAAEC,mBAAmB;AAAA,SAC5CC,cAAc,EAAEC,YAAY;AAAA,SAC5BC,mBAAmB,EAAEC,eAAe;AAAA,SACpCC,aAAa,EAAEC,SAAS;AAAA,SACxBC,kBAAkB;AAAA,SAClBC,eAAe;AAAA,SACfC,YAAY;AAAA,SACZC,MAAM;AAAA,SACNC,UAAU;AAAA,SACVC,QAAQ;AAAA,SACRC,WAAW;AAAA,SACXC,cAAc,6CAEvB;AAAA,SACSC,YAAY,oDAErB;AAAA,SAEEC,OAAO,EACPC,aAAa,EACbC,gBAAgB,EAChBC,eAAe,EACfC,UAAU,EACVC,IAAI,EACJC,YAAY,EACZC,cAAc,EACdC,SAAS;AAEX,SACEC,QAAQ,EACRC,UAAU,EACVC,GAAG,EACHC,QAAQ,EACRC,UAAU,EACVC,KAAK,EACLC,UAAU,EACVC,KAAK,QACA,KAAK;;AAEZ;;AAUA,SAASC,KAAK,CAAEC,KAAiB,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ay.mjs","names":["makeActivatorProps","useActivator","makeDimensionProps","useDimension","makeLazyProps","useLazy","makeLocationStrategyProps","useLocationStrategies","makeScrollStrategyProps","useScrollStrategies","makeThemeProps","provideTheme","makeTransitionProps","MaybeTransition","useBackButton","useRouter","useBackgroundColor","useProxiedModel","useHydration","useRtl","useScopeId","useStack","useTeleport","useToggleScope","ClickOutside","animate","convertToUnit","genericComponent","getScrollParent","IN_BROWSER","propsFactory","standardEasing","useRender","computed","mergeProps","ref","Teleport","toHandlers","toRef","Transition","watch","Scrim","props","modelValue","color","rest","backgroundColorClasses","value","backgroundColorStyles","makeVOverlayProps","absolute","Boolean","attach","String","Object","closeOnBack","type","default","contained","contentClass","contentProps","disabled","noClickAnimation","persistent","scrim","zIndex","Number","VOverlay","name","directives","inheritAttrs","_disableGlobalStack","emits","e","afterLeave","setup","slots","attrs","emit","model","isActive","get","set","v","teleportTarget","themeClasses","rtlClasses","isRtl","hasContent","onAfterLeave","scrimColor","globalTop","localTop","stackStyles","activatorEl","activatorRef","activatorEvents","contentEvents","scrimEvents","isTop","dimensionStyles","isMounted","scopeId","root","contentEl","contentStyles","updateLocation","onClickOutside","animateClick","closeConditional","val","window","addEventListener","onKeydown","removeEventListener","immediate","key","router","next","top","scrollParent","document","scrollingElement","scrollTop","transformOrigin","transform","duration","easing","activator","activatorProps","transition","handler","include"],"sources":["../../../src/components/VOverlay/VOverlay.tsx"],"sourcesContent":["// Styles\nimport './VOverlay.sass'\n\n// Composables\nimport { makeActivatorProps, useActivator } from './useActivator'\nimport { makeDimensionProps, useDimension } from '@/composables/dimensions'\nimport { makeLazyProps, useLazy } from '@/composables/lazy'\nimport { makeLocationStrategyProps, useLocationStrategies } from './locationStrategies'\nimport { makeScrollStrategyProps, useScrollStrategies } from './scrollStrategies'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\nimport { makeTransitionProps, MaybeTransition } from '@/composables/transition'\nimport { useBackButton, useRouter } from '@/composables/router'\nimport { useBackgroundColor } from '@/composables/color'\nimport { useProxiedModel } from '@/composables/proxiedModel'\nimport { useHydration } from '@/composables/hydration'\nimport { useRtl } from '@/composables/locale'\nimport { useScopeId } from '@/composables/scopeId'\nimport { useStack } from '@/composables/stack'\nimport { useTeleport } from '@/composables/teleport'\nimport { useToggleScope } from '@/composables/toggleScope'\n\n// Directives\nimport { ClickOutside } from '@/directives/click-outside'\n\n// Utilities\nimport {\n animate,\n convertToUnit,\n genericComponent,\n getScrollParent,\n IN_BROWSER,\n propsFactory,\n standardEasing,\n useRender,\n} from '@/util'\nimport {\n computed,\n mergeProps,\n ref,\n Teleport,\n toHandlers,\n toRef,\n Transition,\n watch,\n} from 'vue'\n\n// Types\nimport type { BackgroundColorData } from '@/composables/color'\nimport type { MakeSlots } from '@/util'\nimport type { PropType, Ref } from 'vue'\n\ninterface ScrimProps {\n [key: string]: unknown\n modelValue: boolean\n color: BackgroundColorData\n}\nfunction Scrim (props: ScrimProps) {\n const { modelValue, color, ...rest } = props\n return (\n <Transition name=\"fade-transition\" appear>\n { props.modelValue && (\n <div\n class={[\n 'v-overlay__scrim',\n props.color.backgroundColorClasses.value,\n ]}\n style={ props.color.backgroundColorStyles.value }\n { ...rest }\n />\n )}\n </Transition>\n )\n}\n\nexport type OverlaySlots = MakeSlots<{\n default: [{ isActive: Ref<boolean> }]\n activator: [{ isActive: boolean, props: Record<string, any> }]\n}>\n\nexport const makeVOverlayProps = propsFactory({\n absolute: Boolean,\n attach: [Boolean, String, Object] as PropType<boolean | string | Element>,\n closeOnBack: {\n type: Boolean,\n default: true,\n },\n contained: Boolean,\n contentClass: null,\n contentProps: null,\n disabled: Boolean,\n noClickAnimation: Boolean,\n modelValue: Boolean,\n persistent: Boolean,\n scrim: {\n type: [String, Boolean],\n default: true,\n },\n zIndex: {\n type: [Number, String],\n default: 2000,\n },\n\n ...makeActivatorProps(),\n ...makeDimensionProps(),\n ...makeLazyProps(),\n ...makeLocationStrategyProps(),\n ...makeScrollStrategyProps(),\n ...makeThemeProps(),\n ...makeTransitionProps(),\n}, 'v-overlay')\n\nexport const VOverlay = genericComponent<OverlaySlots>()({\n name: 'VOverlay',\n\n directives: { ClickOutside },\n\n inheritAttrs: false,\n\n props: {\n _disableGlobalStack: Boolean,\n\n ...makeVOverlayProps(),\n },\n\n emits: {\n 'click:outside': (e: MouseEvent) => true,\n 'update:modelValue': (value: boolean) => true,\n afterLeave: () => true,\n },\n\n setup (props, { slots, attrs, emit }) {\n const model = useProxiedModel(props, 'modelValue')\n const isActive = computed({\n get: () => model.value,\n set: v => {\n if (!(v && props.disabled)) model.value = v\n },\n })\n const { teleportTarget } = useTeleport(computed(() => props.attach || props.contained))\n const { themeClasses } = provideTheme(props)\n const { rtlClasses, isRtl } = useRtl()\n const { hasContent, onAfterLeave } = useLazy(props, isActive)\n const scrimColor = useBackgroundColor(computed(() => {\n return typeof props.scrim === 'string' ? props.scrim : null\n }))\n const { globalTop, localTop, stackStyles } = useStack(isActive, toRef(props, 'zIndex'), props._disableGlobalStack)\n const { activatorEl, activatorRef, activatorEvents, contentEvents, scrimEvents } = useActivator(props, { isActive, isTop: localTop })\n const { dimensionStyles } = useDimension(props)\n const isMounted = useHydration()\n const { scopeId } = useScopeId()\n\n watch(() => props.disabled, v => {\n if (v) isActive.value = false\n })\n\n const root = ref<HTMLElement>()\n const contentEl = ref<HTMLElement>()\n const { contentStyles, updateLocation } = useLocationStrategies(props, {\n isRtl,\n contentEl,\n activatorEl,\n isActive,\n })\n useScrollStrategies(props, {\n root,\n contentEl,\n activatorEl,\n isActive,\n updateLocation,\n })\n\n function onClickOutside (e: MouseEvent) {\n emit('click:outside', e)\n\n if (!props.persistent) isActive.value = false\n else animateClick()\n }\n\n function closeConditional () {\n return isActive.value && globalTop.value\n }\n\n IN_BROWSER && watch(isActive, val => {\n if (val) {\n window.addEventListener('keydown', onKeydown)\n } else {\n window.removeEventListener('keydown', onKeydown)\n }\n }, { immediate: true })\n\n function onKeydown (e: KeyboardEvent) {\n if (e.key === 'Escape' && globalTop.value) {\n if (!props.persistent) {\n isActive.value = false\n } else animateClick()\n }\n }\n\n const router = useRouter()\n useToggleScope(() => props.closeOnBack, () => {\n useBackButton(router, next => {\n if (globalTop.value && isActive.value) {\n next(false)\n if (!props.persistent) isActive.value = false\n else animateClick()\n } else {\n next()\n }\n })\n })\n\n const top = ref<number>()\n watch(() => isActive.value && (props.absolute || props.contained) && teleportTarget.value == null, val => {\n if (val) {\n const scrollParent = getScrollParent(root.value)\n if (scrollParent && scrollParent !== document.scrollingElement) {\n top.value = scrollParent.scrollTop\n }\n }\n })\n\n // Add a quick \"bounce\" animation to the content\n function animateClick () {\n if (props.noClickAnimation) return\n\n contentEl.value && animate(contentEl.value, [\n { transformOrigin: 'center' },\n { transform: 'scale(1.03)' },\n { transformOrigin: 'center' },\n ], {\n duration: 150,\n easing: standardEasing,\n })\n }\n\n useRender(() => (\n <>\n { slots.activator?.({\n isActive: isActive.value,\n props: mergeProps({\n ref: activatorRef,\n }, toHandlers(activatorEvents.value), props.activatorProps),\n })}\n\n { isMounted.value && (\n <Teleport\n disabled={ !teleportTarget.value }\n to={ teleportTarget.value }\n >\n { hasContent.value && (\n <div\n class={[\n 'v-overlay',\n {\n 'v-overlay--absolute': props.absolute || props.contained,\n 'v-overlay--active': isActive.value,\n 'v-overlay--contained': props.contained,\n },\n themeClasses.value,\n rtlClasses.value,\n ]}\n style={[stackStyles.value, { top: convertToUnit(top.value) }]}\n ref={ root }\n { ...scopeId }\n { ...attrs }\n >\n <Scrim\n color={ scrimColor }\n modelValue={ isActive.value && !!props.scrim }\n { ...toHandlers(scrimEvents.value) }\n />\n <MaybeTransition\n appear\n persisted\n transition={ props.transition }\n target={ activatorEl.value }\n onAfterLeave={ () => { onAfterLeave(); emit('afterLeave') } }\n >\n <div\n ref={ contentEl }\n v-show={ isActive.value }\n v-click-outside={{ handler: onClickOutside, closeConditional, include: () => [activatorEl.value] }}\n class={[\n 'v-overlay__content',\n props.contentClass,\n ]}\n style={[\n dimensionStyles.value,\n contentStyles.value,\n ]}\n { ...toHandlers(contentEvents.value) }\n { ...props.contentProps }\n >\n { slots.default?.({ isActive }) }\n </div>\n </MaybeTransition>\n </div>\n )}\n </Teleport>\n )}\n </>\n ))\n\n return {\n activatorEl,\n animateClick,\n contentEl,\n globalTop,\n localTop,\n updateLocation,\n }\n },\n})\n\nexport type VOverlay = InstanceType<typeof VOverlay>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,kBAAkB,EAAEC,YAAY;AAAA,SAChCC,kBAAkB,EAAEC,YAAY;AAAA,SAChCC,aAAa,EAAEC,OAAO;AAAA,SACtBC,yBAAyB,EAAEC,qBAAqB;AAAA,SAChDC,uBAAuB,EAAEC,mBAAmB;AAAA,SAC5CC,cAAc,EAAEC,YAAY;AAAA,SAC5BC,mBAAmB,EAAEC,eAAe;AAAA,SACpCC,aAAa,EAAEC,SAAS;AAAA,SACxBC,kBAAkB;AAAA,SAClBC,eAAe;AAAA,SACfC,YAAY;AAAA,SACZC,MAAM;AAAA,SACNC,UAAU;AAAA,SACVC,QAAQ;AAAA,SACRC,WAAW;AAAA,SACXC,cAAc,6CAEvB;AAAA,SACSC,YAAY,oDAErB;AAAA,SAEEC,OAAO,EACPC,aAAa,EACbC,gBAAgB,EAChBC,eAAe,EACfC,UAAU,EACVC,YAAY,EACZC,cAAc,EACdC,SAAS;AAEX,SACEC,QAAQ,EACRC,UAAU,EACVC,GAAG,EACHC,QAAQ,EACRC,UAAU,EACVC,KAAK,EACLC,UAAU,EACVC,KAAK,QACA,KAAK;;AAEZ;;AAUA,SAASC,KAAK,CAAEC,KAAiB,EAAE;EACjC,MAAM;IAAEC,UAAU;IAAEC,KAAK;IAAE,GAAGC;EAAK,CAAC,GAAGH,KAAK;EAC5C;IAAA,QACmB,iBAAiB;IAAA;EAAA;IAAA,gBAC9BA,KAAK,CAACC,UAAU;MAAA,SAEP,CACL,kBAAkB,EAClBD,KAAK,CAACE,KAAK,CAACE,sBAAsB,CAACC,KAAK,CACzC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