@vuetify/nightly 3.6.13-3.7.0-beta.0.0-dev.2024-07-12 → 3.6.13-3.7.0-beta.0.0-dev.2024-07-25
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 +0 -13
- package/dist/json/attributes.json +30 -22
- package/dist/json/importMap-labs.json +18 -18
- package/dist/json/importMap.json +152 -152
- package/dist/json/tags.json +2 -0
- package/dist/json/web-types.json +53 -42
- package/dist/vuetify-labs.css +1255 -1257
- package/dist/vuetify-labs.d.ts +12304 -12192
- package/dist/vuetify-labs.esm.js +118 -68
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +118 -68
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +1293 -1295
- package/dist/vuetify.d.ts +10496 -10404
- package/dist/vuetify.esm.js +110 -64
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +110 -64
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +1078 -1080
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VAlert/index.d.mts +55 -55
- package/lib/components/VAppBar/VAppBar.mjs.map +1 -1
- package/lib/components/VAppBar/index.d.mts +169 -169
- package/lib/components/VAutocomplete/VAutocomplete.mjs +15 -8
- package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
- package/lib/components/VAutocomplete/index.d.mts +615 -609
- package/lib/components/VAvatar/index.d.mts +36 -36
- package/lib/components/VBadge/index.d.mts +58 -58
- package/lib/components/VBanner/index.d.mts +59 -59
- package/lib/components/VBottomNavigation/index.d.mts +58 -58
- package/lib/components/VBottomSheet/index.d.mts +118 -118
- package/lib/components/VBreadcrumbs/index.d.mts +34 -34
- package/lib/components/VBtn/VBtn.css +3 -0
- package/lib/components/VBtn/VBtn.sass +3 -0
- package/lib/components/VBtn/index.d.mts +107 -107
- package/lib/components/VBtnGroup/index.d.mts +23 -23
- package/lib/components/VBtnToggle/index.d.mts +40 -40
- package/lib/components/VCard/index.d.mts +93 -93
- package/lib/components/VCarousel/index.d.mts +128 -128
- package/lib/components/VCheckbox/index.d.mts +174 -168
- package/lib/components/VChip/index.d.mts +86 -86
- package/lib/components/VChipGroup/index.d.mts +46 -46
- package/lib/components/VColorPicker/index.d.mts +96 -96
- package/lib/components/VCombobox/VCombobox.mjs +15 -8
- package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
- package/lib/components/VCombobox/index.d.mts +615 -609
- package/lib/components/VConfirmEdit/index.d.mts +2 -2
- package/lib/components/VCounter/index.d.mts +27 -27
- package/lib/components/VDataIterator/index.d.mts +51 -50
- package/lib/components/VDataTable/VDataTable.mjs +10 -3
- package/lib/components/VDataTable/VDataTable.mjs.map +1 -1
- package/lib/components/VDataTable/VDataTableServer.mjs +6 -2
- package/lib/components/VDataTable/VDataTableServer.mjs.map +1 -1
- package/lib/components/VDataTable/VDataTableVirtual.mjs +10 -3
- package/lib/components/VDataTable/VDataTableVirtual.mjs.map +1 -1
- package/lib/components/VDataTable/composables/group.mjs +2 -1
- package/lib/components/VDataTable/composables/group.mjs.map +1 -1
- package/lib/components/VDataTable/composables/sort.mjs +4 -4
- package/lib/components/VDataTable/composables/sort.mjs.map +1 -1
- package/lib/components/VDataTable/index.d.mts +275 -274
- package/lib/components/VDatePicker/VDatePickerMonth.mjs +3 -0
- package/lib/components/VDatePicker/VDatePickerMonth.mjs.map +1 -1
- package/lib/components/VDatePicker/index.d.mts +134 -134
- package/lib/components/VDialog/index.d.mts +353 -353
- package/lib/components/VDivider/index.d.mts +15 -15
- package/lib/components/VEmptyState/index.d.mts +47 -47
- package/lib/components/VExpansionPanel/index.d.mts +134 -134
- package/lib/components/VFab/index.d.mts +227 -227
- package/lib/components/VField/VField.css +6 -11
- package/lib/components/VField/VField.mjs +7 -5
- package/lib/components/VField/VField.mjs.map +1 -1
- package/lib/components/VField/VField.sass +2 -6
- package/lib/components/VField/index.d.mts +58 -52
- package/lib/components/VFileInput/index.d.mts +255 -249
- package/lib/components/VFooter/index.d.mts +50 -50
- package/lib/components/VForm/index.d.mts +9 -9
- package/lib/components/VGrid/index.d.mts +150 -150
- package/lib/components/VIcon/index.d.mts +24 -24
- package/lib/components/VImg/index.d.mts +85 -85
- package/lib/components/VInfiniteScroll/index.d.mts +22 -22
- package/lib/components/VInput/VInput.css +5 -5
- package/lib/components/VInput/VInput.mjs +4 -1
- package/lib/components/VInput/VInput.mjs.map +1 -1
- package/lib/components/VInput/VInput.sass +1 -1
- package/lib/components/VInput/index.d.mts +61 -55
- package/lib/components/VItemGroup/index.d.mts +17 -17
- package/lib/components/VLabel/index.d.mts +8 -8
- package/lib/components/VLayout/index.d.mts +36 -36
- package/lib/components/VLazy/index.d.mts +31 -31
- package/lib/components/VList/index.d.mts +178 -178
- package/lib/components/VLocaleProvider/index.d.mts +7 -7
- package/lib/components/VMain/index.d.mts +10 -10
- package/lib/components/VMenu/VMenu.mjs +7 -5
- package/lib/components/VMenu/VMenu.mjs.map +1 -1
- package/lib/components/VMenu/index.d.mts +396 -396
- package/lib/components/VMessages/index.d.mts +20 -20
- package/lib/components/VNavigationDrawer/index.d.mts +72 -72
- package/lib/components/VNavigationDrawer/sticky.mjs.map +1 -1
- package/lib/components/VOtpInput/VOtpInput.mjs +1 -1
- package/lib/components/VOtpInput/VOtpInput.mjs.map +1 -1
- package/lib/components/VOtpInput/index.d.mts +88 -88
- package/lib/components/VOverlay/index.d.mts +97 -97
- package/lib/components/VOverlay/locationStrategies.mjs +0 -6
- package/lib/components/VOverlay/locationStrategies.mjs.map +1 -1
- package/lib/components/VPagination/index.d.mts +55 -55
- package/lib/components/VParallax/index.d.mts +7 -7
- package/lib/components/VProgressCircular/index.d.mts +24 -24
- package/lib/components/VProgressLinear/index.d.mts +52 -52
- package/lib/components/VRadio/index.d.mts +41 -41
- package/lib/components/VRadioGroup/index.d.mts +105 -99
- package/lib/components/VRangeSlider/index.d.mts +102 -96
- package/lib/components/VRating/index.d.mts +22 -22
- package/lib/components/VResponsive/index.d.mts +23 -23
- package/lib/components/VSelect/VSelect.mjs +15 -13
- package/lib/components/VSelect/VSelect.mjs.map +1 -1
- package/lib/components/VSelect/index.d.mts +615 -609
- package/lib/components/VSelect/useScrolling.mjs +3 -3
- package/lib/components/VSelect/useScrolling.mjs.map +1 -1
- package/lib/components/VSelectionControl/index.d.mts +43 -43
- package/lib/components/VSelectionControlGroup/index.d.mts +39 -39
- package/lib/components/VSheet/index.d.mts +34 -34
- package/lib/components/VSkeletonLoader/index.d.mts +17 -17
- package/lib/components/VSlideGroup/index.d.mts +33 -33
- package/lib/components/VSlider/index.d.mts +95 -89
- package/lib/components/VSnackbar/index.d.mts +411 -411
- package/lib/components/VSparkline/index.d.mts +38 -38
- package/lib/components/VSpeedDial/index.d.mts +176 -176
- package/lib/components/VStepper/index.d.mts +119 -119
- package/lib/components/VSwitch/index.d.mts +108 -102
- package/lib/components/VSystemBar/index.d.mts +39 -39
- package/lib/components/VTable/index.d.mts +4 -4
- package/lib/components/VTabs/index.d.mts +512 -512
- package/lib/components/VTextField/VTextField.mjs +1 -1
- package/lib/components/VTextField/VTextField.mjs.map +1 -1
- package/lib/components/VTextField/index.d.mts +421 -415
- package/lib/components/VTextarea/VTextarea.mjs +5 -5
- package/lib/components/VTextarea/VTextarea.mjs.map +1 -1
- package/lib/components/VTextarea/index.d.mts +359 -344
- package/lib/components/VTimeline/index.d.mts +26 -26
- package/lib/components/VToolbar/index.d.mts +53 -53
- package/lib/components/VTooltip/index.d.mts +424 -424
- package/lib/components/VValidation/index.d.mts +19 -19
- package/lib/components/VVirtualScroll/VVirtualScroll.mjs +2 -0
- package/lib/components/VVirtualScroll/VVirtualScroll.mjs.map +1 -1
- package/lib/components/VVirtualScroll/index.d.mts +13 -10
- package/lib/components/VWindow/index.d.mts +31 -31
- package/lib/components/index.d.mts +10657 -10566
- package/lib/components/transitions/index.d.mts +200 -200
- package/lib/composables/nested/nested.mjs +0 -1
- package/lib/composables/nested/nested.mjs.map +1 -1
- package/lib/composables/virtual.mjs +1 -0
- package/lib/composables/virtual.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/framework.mjs +1 -1
- package/lib/index.d.mts +81 -80
- package/lib/labs/VCalendar/index.d.mts +52 -52
- package/lib/labs/VDateInput/VDateInput.mjs +6 -3
- package/lib/labs/VDateInput/VDateInput.mjs.map +1 -1
- package/lib/labs/VDateInput/index.d.mts +256 -250
- package/lib/labs/VNumberInput/index.d.mts +247 -241
- package/lib/labs/VPicker/index.d.mts +45 -45
- package/lib/labs/VSnackbarQueue/index.d.mts +611 -611
- package/lib/labs/VStepperVertical/index.d.mts +212 -212
- package/lib/labs/VTimePicker/VTimePickerClock.mjs +0 -1
- package/lib/labs/VTimePicker/VTimePickerClock.mjs.map +1 -1
- package/lib/labs/VTimePicker/VTimePickerControls.mjs +2 -1
- package/lib/labs/VTimePicker/VTimePickerControls.mjs.map +1 -1
- package/lib/labs/VTimePicker/index.d.mts +131 -122
- package/lib/labs/VTreeview/index.d.mts +199 -199
- package/lib/labs/components.d.mts +1754 -1733
- package/lib/util/helpers.mjs +5 -0
- package/lib/util/helpers.mjs.map +1 -1
- package/package.json +9 -4
@@ -10,9 +10,7 @@ type VMessageSlot = {
|
|
10
10
|
};
|
11
11
|
declare const VMessages: {
|
12
12
|
new (...args: any[]): vue.CreateComponentPublicInstance<{
|
13
|
-
style: vue.StyleValue;
|
14
13
|
active: boolean;
|
15
|
-
messages: string | readonly string[];
|
16
14
|
transition: {
|
17
15
|
component: Component;
|
18
16
|
leaveAbsolute: boolean;
|
@@ -20,9 +18,11 @@ declare const VMessages: {
|
|
20
18
|
} | NonNullable<string | boolean | (vue.TransitionProps & {
|
21
19
|
component?: Component | undefined;
|
22
20
|
})>;
|
21
|
+
style: vue.StyleValue;
|
22
|
+
messages: string | readonly string[];
|
23
23
|
} & {
|
24
|
-
class?: any;
|
25
24
|
color?: string | undefined;
|
25
|
+
class?: any;
|
26
26
|
} & {
|
27
27
|
$children?: {} | vue.VNodeChild | {
|
28
28
|
message?: ((arg: VMessageSlot) => vue.VNodeChild) | undefined;
|
@@ -33,9 +33,7 @@ declare const VMessages: {
|
|
33
33
|
} & {
|
34
34
|
"v-slot:message"?: false | ((arg: VMessageSlot) => vue.VNodeChild) | undefined;
|
35
35
|
}, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & {
|
36
|
-
style: vue.StyleValue;
|
37
36
|
active: boolean;
|
38
|
-
messages: string | readonly string[];
|
39
37
|
transition: {
|
40
38
|
component: Component;
|
41
39
|
leaveAbsolute: boolean;
|
@@ -43,9 +41,11 @@ declare const VMessages: {
|
|
43
41
|
} | NonNullable<string | boolean | (vue.TransitionProps & {
|
44
42
|
component?: Component | undefined;
|
45
43
|
})>;
|
44
|
+
style: vue.StyleValue;
|
45
|
+
messages: string | readonly string[];
|
46
46
|
} & {
|
47
|
-
class?: any;
|
48
47
|
color?: string | undefined;
|
48
|
+
class?: any;
|
49
49
|
} & {
|
50
50
|
$children?: {} | vue.VNodeChild | {
|
51
51
|
message?: ((arg: VMessageSlot) => vue.VNodeChild) | undefined;
|
@@ -56,9 +56,7 @@ declare const VMessages: {
|
|
56
56
|
} & {
|
57
57
|
"v-slot:message"?: false | ((arg: VMessageSlot) => vue.VNodeChild) | undefined;
|
58
58
|
}, {
|
59
|
-
style: vue.StyleValue;
|
60
59
|
active: boolean;
|
61
|
-
messages: string | readonly string[];
|
62
60
|
transition: {
|
63
61
|
component: Component;
|
64
62
|
leaveAbsolute: boolean;
|
@@ -66,6 +64,8 @@ declare const VMessages: {
|
|
66
64
|
} | NonNullable<string | boolean | (vue.TransitionProps & {
|
67
65
|
component?: Component | undefined;
|
68
66
|
})>;
|
67
|
+
style: vue.StyleValue;
|
68
|
+
messages: string | readonly string[];
|
69
69
|
}, true, {}, vue.SlotsType<Partial<{
|
70
70
|
message: (arg: VMessageSlot) => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
71
71
|
[key: string]: any;
|
@@ -78,9 +78,7 @@ declare const VMessages: {
|
|
78
78
|
M: {};
|
79
79
|
Defaults: {};
|
80
80
|
}, {
|
81
|
-
style: vue.StyleValue;
|
82
81
|
active: boolean;
|
83
|
-
messages: string | readonly string[];
|
84
82
|
transition: {
|
85
83
|
component: Component;
|
86
84
|
leaveAbsolute: boolean;
|
@@ -88,9 +86,11 @@ declare const VMessages: {
|
|
88
86
|
} | NonNullable<string | boolean | (vue.TransitionProps & {
|
89
87
|
component?: Component | undefined;
|
90
88
|
})>;
|
89
|
+
style: vue.StyleValue;
|
90
|
+
messages: string | readonly string[];
|
91
91
|
} & {
|
92
|
-
class?: any;
|
93
92
|
color?: string | undefined;
|
93
|
+
class?: any;
|
94
94
|
} & {
|
95
95
|
$children?: {} | vue.VNodeChild | {
|
96
96
|
message?: ((arg: VMessageSlot) => vue.VNodeChild) | undefined;
|
@@ -101,9 +101,7 @@ declare const VMessages: {
|
|
101
101
|
} & {
|
102
102
|
"v-slot:message"?: false | ((arg: VMessageSlot) => vue.VNodeChild) | undefined;
|
103
103
|
}, {}, {}, {}, {}, {
|
104
|
-
style: vue.StyleValue;
|
105
104
|
active: boolean;
|
106
|
-
messages: string | readonly string[];
|
107
105
|
transition: {
|
108
106
|
component: Component;
|
109
107
|
leaveAbsolute: boolean;
|
@@ -111,14 +109,14 @@ declare const VMessages: {
|
|
111
109
|
} | NonNullable<string | boolean | (vue.TransitionProps & {
|
112
110
|
component?: Component | undefined;
|
113
111
|
})>;
|
112
|
+
style: vue.StyleValue;
|
113
|
+
messages: string | readonly string[];
|
114
114
|
}>;
|
115
115
|
__isFragment?: undefined;
|
116
116
|
__isTeleport?: undefined;
|
117
117
|
__isSuspense?: undefined;
|
118
118
|
} & vue.ComponentOptionsBase<{
|
119
|
-
style: vue.StyleValue;
|
120
119
|
active: boolean;
|
121
|
-
messages: string | readonly string[];
|
122
120
|
transition: {
|
123
121
|
component: Component;
|
124
122
|
leaveAbsolute: boolean;
|
@@ -126,9 +124,11 @@ declare const VMessages: {
|
|
126
124
|
} | NonNullable<string | boolean | (vue.TransitionProps & {
|
127
125
|
component?: Component | undefined;
|
128
126
|
})>;
|
127
|
+
style: vue.StyleValue;
|
128
|
+
messages: string | readonly string[];
|
129
129
|
} & {
|
130
|
-
class?: any;
|
131
130
|
color?: string | undefined;
|
131
|
+
class?: any;
|
132
132
|
} & {
|
133
133
|
$children?: {} | vue.VNodeChild | {
|
134
134
|
message?: ((arg: VMessageSlot) => vue.VNodeChild) | undefined;
|
@@ -139,9 +139,7 @@ declare const VMessages: {
|
|
139
139
|
} & {
|
140
140
|
"v-slot:message"?: false | ((arg: VMessageSlot) => vue.VNodeChild) | undefined;
|
141
141
|
}, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, string, {
|
142
|
-
style: vue.StyleValue;
|
143
142
|
active: boolean;
|
144
|
-
messages: string | readonly string[];
|
145
143
|
transition: {
|
146
144
|
component: Component;
|
147
145
|
leaveAbsolute: boolean;
|
@@ -149,6 +147,8 @@ declare const VMessages: {
|
|
149
147
|
} | NonNullable<string | boolean | (vue.TransitionProps & {
|
150
148
|
component?: Component | undefined;
|
151
149
|
})>;
|
150
|
+
style: vue.StyleValue;
|
151
|
+
messages: string | readonly string[];
|
152
152
|
}, {}, string, vue.SlotsType<Partial<{
|
153
153
|
message: (arg: VMessageSlot) => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
154
154
|
[key: string]: any;
|
@@ -160,7 +160,7 @@ declare const VMessages: {
|
|
160
160
|
})>;
|
161
161
|
default: string;
|
162
162
|
validator: (val: unknown) => boolean;
|
163
|
-
}, "
|
163
|
+
}, "type" | "default"> & {
|
164
164
|
type: PropType<{
|
165
165
|
component: Component;
|
166
166
|
leaveAbsolute: boolean;
|
@@ -194,7 +194,7 @@ declare const VMessages: {
|
|
194
194
|
})>;
|
195
195
|
default: string;
|
196
196
|
validator: (val: unknown) => boolean;
|
197
|
-
}, "
|
197
|
+
}, "type" | "default"> & {
|
198
198
|
type: PropType<{
|
199
199
|
component: Component;
|
200
200
|
leaveAbsolute: boolean;
|
@@ -14,17 +14,18 @@ type VNavigationDrawerImageSlot = {
|
|
14
14
|
};
|
15
15
|
declare const VNavigationDrawer: {
|
16
16
|
new (...args: any[]): vue.CreateComponentPublicInstance<{
|
17
|
-
|
17
|
+
absolute: boolean;
|
18
|
+
location: "end" | "start" | "left" | "top" | "bottom" | "right";
|
18
19
|
width: string | number;
|
19
|
-
tag: string;
|
20
|
-
mobile: NonNullable<boolean | null> | null;
|
21
20
|
order: string | number;
|
22
|
-
|
21
|
+
style: vue.StyleValue;
|
22
|
+
mobile: NonNullable<boolean | null> | null;
|
23
|
+
temporary: boolean;
|
24
|
+
tag: string;
|
23
25
|
sticky: boolean;
|
24
26
|
modelValue: boolean | null;
|
25
27
|
tile: boolean;
|
26
28
|
floating: boolean;
|
27
|
-
location: "left" | "right" | "end" | "top" | "bottom" | "start";
|
28
29
|
persistent: boolean;
|
29
30
|
scrim: string | boolean;
|
30
31
|
touchless: boolean;
|
@@ -34,17 +35,16 @@ declare const VNavigationDrawer: {
|
|
34
35
|
permanent: boolean;
|
35
36
|
rail: boolean | null;
|
36
37
|
railWidth: string | number;
|
37
|
-
temporary: boolean;
|
38
38
|
} & {
|
39
|
-
|
39
|
+
name?: string | undefined;
|
40
|
+
border?: string | number | boolean | undefined;
|
41
|
+
color?: string | undefined;
|
40
42
|
image?: string | undefined;
|
43
|
+
class?: any;
|
44
|
+
elevation?: string | number | undefined;
|
41
45
|
theme?: string | undefined;
|
42
|
-
color?: string | undefined;
|
43
|
-
name?: string | undefined;
|
44
46
|
mobileBreakpoint?: number | DisplayBreakpoint | undefined;
|
45
|
-
border?: string | number | boolean | undefined;
|
46
47
|
rounded?: string | number | boolean | undefined;
|
47
|
-
elevation?: string | number | undefined;
|
48
48
|
closeDelay?: string | number | undefined;
|
49
49
|
openDelay?: string | number | undefined;
|
50
50
|
} & {
|
@@ -74,17 +74,18 @@ declare const VNavigationDrawer: {
|
|
74
74
|
'update:modelValue': (val: boolean) => true;
|
75
75
|
'update:rail': (val: boolean) => true;
|
76
76
|
}, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & {
|
77
|
-
|
77
|
+
absolute: boolean;
|
78
|
+
location: "end" | "start" | "left" | "top" | "bottom" | "right";
|
78
79
|
width: string | number;
|
79
|
-
tag: string;
|
80
|
-
mobile: NonNullable<boolean | null> | null;
|
81
80
|
order: string | number;
|
82
|
-
|
81
|
+
style: vue.StyleValue;
|
82
|
+
mobile: NonNullable<boolean | null> | null;
|
83
|
+
temporary: boolean;
|
84
|
+
tag: string;
|
83
85
|
sticky: boolean;
|
84
86
|
modelValue: boolean | null;
|
85
87
|
tile: boolean;
|
86
88
|
floating: boolean;
|
87
|
-
location: "left" | "right" | "end" | "top" | "bottom" | "start";
|
88
89
|
persistent: boolean;
|
89
90
|
scrim: string | boolean;
|
90
91
|
touchless: boolean;
|
@@ -94,17 +95,16 @@ declare const VNavigationDrawer: {
|
|
94
95
|
permanent: boolean;
|
95
96
|
rail: boolean | null;
|
96
97
|
railWidth: string | number;
|
97
|
-
temporary: boolean;
|
98
98
|
} & {
|
99
|
-
|
99
|
+
name?: string | undefined;
|
100
|
+
border?: string | number | boolean | undefined;
|
101
|
+
color?: string | undefined;
|
100
102
|
image?: string | undefined;
|
103
|
+
class?: any;
|
104
|
+
elevation?: string | number | undefined;
|
101
105
|
theme?: string | undefined;
|
102
|
-
color?: string | undefined;
|
103
|
-
name?: string | undefined;
|
104
106
|
mobileBreakpoint?: number | DisplayBreakpoint | undefined;
|
105
|
-
border?: string | number | boolean | undefined;
|
106
107
|
rounded?: string | number | boolean | undefined;
|
107
|
-
elevation?: string | number | undefined;
|
108
108
|
closeDelay?: string | number | undefined;
|
109
109
|
openDelay?: string | number | undefined;
|
110
110
|
} & {
|
@@ -129,18 +129,19 @@ declare const VNavigationDrawer: {
|
|
129
129
|
"onUpdate:modelValue"?: ((val: boolean) => any) | undefined;
|
130
130
|
"onUpdate:rail"?: ((val: boolean) => any) | undefined;
|
131
131
|
}, {
|
132
|
-
|
132
|
+
absolute: boolean;
|
133
|
+
location: "end" | "start" | "left" | "top" | "bottom" | "right";
|
133
134
|
width: string | number;
|
134
|
-
tag: string;
|
135
|
-
mobile: NonNullable<boolean | null> | null;
|
136
135
|
order: string | number;
|
137
|
-
|
136
|
+
style: vue.StyleValue;
|
137
|
+
mobile: NonNullable<boolean | null> | null;
|
138
|
+
temporary: boolean;
|
139
|
+
tag: string;
|
138
140
|
sticky: boolean;
|
139
141
|
modelValue: boolean | null;
|
140
142
|
rounded: string | number | boolean;
|
141
143
|
tile: boolean;
|
142
144
|
floating: boolean;
|
143
|
-
location: "left" | "right" | "end" | "top" | "bottom" | "start";
|
144
145
|
persistent: boolean;
|
145
146
|
scrim: string | boolean;
|
146
147
|
touchless: boolean;
|
@@ -150,7 +151,6 @@ declare const VNavigationDrawer: {
|
|
150
151
|
permanent: boolean;
|
151
152
|
rail: boolean | null;
|
152
153
|
railWidth: string | number;
|
153
|
-
temporary: boolean;
|
154
154
|
}, true, {}, vue.SlotsType<Partial<{
|
155
155
|
default: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
156
156
|
[key: string]: any;
|
@@ -172,17 +172,18 @@ declare const VNavigationDrawer: {
|
|
172
172
|
M: {};
|
173
173
|
Defaults: {};
|
174
174
|
}, {
|
175
|
-
|
175
|
+
absolute: boolean;
|
176
|
+
location: "end" | "start" | "left" | "top" | "bottom" | "right";
|
176
177
|
width: string | number;
|
177
|
-
tag: string;
|
178
|
-
mobile: NonNullable<boolean | null> | null;
|
179
178
|
order: string | number;
|
180
|
-
|
179
|
+
style: vue.StyleValue;
|
180
|
+
mobile: NonNullable<boolean | null> | null;
|
181
|
+
temporary: boolean;
|
182
|
+
tag: string;
|
181
183
|
sticky: boolean;
|
182
184
|
modelValue: boolean | null;
|
183
185
|
tile: boolean;
|
184
186
|
floating: boolean;
|
185
|
-
location: "left" | "right" | "end" | "top" | "bottom" | "start";
|
186
187
|
persistent: boolean;
|
187
188
|
scrim: string | boolean;
|
188
189
|
touchless: boolean;
|
@@ -192,17 +193,16 @@ declare const VNavigationDrawer: {
|
|
192
193
|
permanent: boolean;
|
193
194
|
rail: boolean | null;
|
194
195
|
railWidth: string | number;
|
195
|
-
temporary: boolean;
|
196
196
|
} & {
|
197
|
-
|
197
|
+
name?: string | undefined;
|
198
|
+
border?: string | number | boolean | undefined;
|
199
|
+
color?: string | undefined;
|
198
200
|
image?: string | undefined;
|
201
|
+
class?: any;
|
202
|
+
elevation?: string | number | undefined;
|
199
203
|
theme?: string | undefined;
|
200
|
-
color?: string | undefined;
|
201
|
-
name?: string | undefined;
|
202
204
|
mobileBreakpoint?: number | DisplayBreakpoint | undefined;
|
203
|
-
border?: string | number | boolean | undefined;
|
204
205
|
rounded?: string | number | boolean | undefined;
|
205
|
-
elevation?: string | number | undefined;
|
206
206
|
closeDelay?: string | number | undefined;
|
207
207
|
openDelay?: string | number | undefined;
|
208
208
|
} & {
|
@@ -229,18 +229,19 @@ declare const VNavigationDrawer: {
|
|
229
229
|
}, {
|
230
230
|
isStuck: vue.ShallowRef<boolean | "top" | "bottom">;
|
231
231
|
}, {}, {}, {}, {
|
232
|
-
|
232
|
+
absolute: boolean;
|
233
|
+
location: "end" | "start" | "left" | "top" | "bottom" | "right";
|
233
234
|
width: string | number;
|
234
|
-
tag: string;
|
235
|
-
mobile: NonNullable<boolean | null> | null;
|
236
235
|
order: string | number;
|
237
|
-
|
236
|
+
style: vue.StyleValue;
|
237
|
+
mobile: NonNullable<boolean | null> | null;
|
238
|
+
temporary: boolean;
|
239
|
+
tag: string;
|
238
240
|
sticky: boolean;
|
239
241
|
modelValue: boolean | null;
|
240
242
|
rounded: string | number | boolean;
|
241
243
|
tile: boolean;
|
242
244
|
floating: boolean;
|
243
|
-
location: "left" | "right" | "end" | "top" | "bottom" | "start";
|
244
245
|
persistent: boolean;
|
245
246
|
scrim: string | boolean;
|
246
247
|
touchless: boolean;
|
@@ -250,23 +251,23 @@ declare const VNavigationDrawer: {
|
|
250
251
|
permanent: boolean;
|
251
252
|
rail: boolean | null;
|
252
253
|
railWidth: string | number;
|
253
|
-
temporary: boolean;
|
254
254
|
}>;
|
255
255
|
__isFragment?: undefined;
|
256
256
|
__isTeleport?: undefined;
|
257
257
|
__isSuspense?: undefined;
|
258
258
|
} & vue.ComponentOptionsBase<{
|
259
|
-
|
259
|
+
absolute: boolean;
|
260
|
+
location: "end" | "start" | "left" | "top" | "bottom" | "right";
|
260
261
|
width: string | number;
|
261
|
-
tag: string;
|
262
|
-
mobile: NonNullable<boolean | null> | null;
|
263
262
|
order: string | number;
|
264
|
-
|
263
|
+
style: vue.StyleValue;
|
264
|
+
mobile: NonNullable<boolean | null> | null;
|
265
|
+
temporary: boolean;
|
266
|
+
tag: string;
|
265
267
|
sticky: boolean;
|
266
268
|
modelValue: boolean | null;
|
267
269
|
tile: boolean;
|
268
270
|
floating: boolean;
|
269
|
-
location: "left" | "right" | "end" | "top" | "bottom" | "start";
|
270
271
|
persistent: boolean;
|
271
272
|
scrim: string | boolean;
|
272
273
|
touchless: boolean;
|
@@ -276,17 +277,16 @@ declare const VNavigationDrawer: {
|
|
276
277
|
permanent: boolean;
|
277
278
|
rail: boolean | null;
|
278
279
|
railWidth: string | number;
|
279
|
-
temporary: boolean;
|
280
280
|
} & {
|
281
|
-
|
281
|
+
name?: string | undefined;
|
282
|
+
border?: string | number | boolean | undefined;
|
283
|
+
color?: string | undefined;
|
282
284
|
image?: string | undefined;
|
285
|
+
class?: any;
|
286
|
+
elevation?: string | number | undefined;
|
283
287
|
theme?: string | undefined;
|
284
|
-
color?: string | undefined;
|
285
|
-
name?: string | undefined;
|
286
288
|
mobileBreakpoint?: number | DisplayBreakpoint | undefined;
|
287
|
-
border?: string | number | boolean | undefined;
|
288
289
|
rounded?: string | number | boolean | undefined;
|
289
|
-
elevation?: string | number | undefined;
|
290
290
|
closeDelay?: string | number | undefined;
|
291
291
|
openDelay?: string | number | undefined;
|
292
292
|
} & {
|
@@ -316,18 +316,19 @@ declare const VNavigationDrawer: {
|
|
316
316
|
'update:modelValue': (val: boolean) => true;
|
317
317
|
'update:rail': (val: boolean) => true;
|
318
318
|
}, string, {
|
319
|
-
|
319
|
+
absolute: boolean;
|
320
|
+
location: "end" | "start" | "left" | "top" | "bottom" | "right";
|
320
321
|
width: string | number;
|
321
|
-
tag: string;
|
322
|
-
mobile: NonNullable<boolean | null> | null;
|
323
322
|
order: string | number;
|
324
|
-
|
323
|
+
style: vue.StyleValue;
|
324
|
+
mobile: NonNullable<boolean | null> | null;
|
325
|
+
temporary: boolean;
|
326
|
+
tag: string;
|
325
327
|
sticky: boolean;
|
326
328
|
modelValue: boolean | null;
|
327
329
|
rounded: string | number | boolean;
|
328
330
|
tile: boolean;
|
329
331
|
floating: boolean;
|
330
|
-
location: "left" | "right" | "end" | "top" | "bottom" | "start";
|
331
332
|
persistent: boolean;
|
332
333
|
scrim: string | boolean;
|
333
334
|
touchless: boolean;
|
@@ -337,7 +338,6 @@ declare const VNavigationDrawer: {
|
|
337
338
|
permanent: boolean;
|
338
339
|
rail: boolean | null;
|
339
340
|
railWidth: string | number;
|
340
|
-
temporary: boolean;
|
341
341
|
}, {}, string, vue.SlotsType<Partial<{
|
342
342
|
default: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
343
343
|
[key: string]: any;
|
@@ -356,12 +356,12 @@ declare const VNavigationDrawer: {
|
|
356
356
|
tag: Omit<{
|
357
357
|
type: StringConstructor;
|
358
358
|
default: string;
|
359
|
-
}, "
|
359
|
+
}, "type" | "default"> & {
|
360
360
|
type: PropType<string>;
|
361
361
|
default: string;
|
362
362
|
};
|
363
363
|
rounded: {
|
364
|
-
type: (StringConstructor |
|
364
|
+
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
365
365
|
default: undefined;
|
366
366
|
};
|
367
367
|
tile: BooleanConstructor;
|
@@ -380,7 +380,7 @@ declare const VNavigationDrawer: {
|
|
380
380
|
mobile: Omit<{
|
381
381
|
type: PropType<boolean | null>;
|
382
382
|
default: boolean;
|
383
|
-
}, "
|
383
|
+
}, "type" | "default"> & {
|
384
384
|
type: PropType<NonNullable<boolean | null> | null>;
|
385
385
|
default: NonNullable<boolean | null> | null;
|
386
386
|
};
|
@@ -392,7 +392,7 @@ declare const VNavigationDrawer: {
|
|
392
392
|
type: PropType<vue.StyleValue>;
|
393
393
|
default: null;
|
394
394
|
};
|
395
|
-
border: (StringConstructor |
|
395
|
+
border: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
396
396
|
color: StringConstructor;
|
397
397
|
disableResizeWatcher: BooleanConstructor;
|
398
398
|
disableRouteWatcher: BooleanConstructor;
|
@@ -424,7 +424,7 @@ declare const VNavigationDrawer: {
|
|
424
424
|
default: number;
|
425
425
|
};
|
426
426
|
location: {
|
427
|
-
type: PropType<"
|
427
|
+
type: PropType<"end" | "start" | "left" | "top" | "bottom" | "right">;
|
428
428
|
default: string;
|
429
429
|
validator: (value: any) => boolean;
|
430
430
|
};
|
@@ -434,12 +434,12 @@ declare const VNavigationDrawer: {
|
|
434
434
|
tag: Omit<{
|
435
435
|
type: StringConstructor;
|
436
436
|
default: string;
|
437
|
-
}, "
|
437
|
+
}, "type" | "default"> & {
|
438
438
|
type: PropType<string>;
|
439
439
|
default: string;
|
440
440
|
};
|
441
441
|
rounded: {
|
442
|
-
type: (StringConstructor |
|
442
|
+
type: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
443
443
|
default: undefined;
|
444
444
|
};
|
445
445
|
tile: BooleanConstructor;
|
@@ -458,7 +458,7 @@ declare const VNavigationDrawer: {
|
|
458
458
|
mobile: Omit<{
|
459
459
|
type: PropType<boolean | null>;
|
460
460
|
default: boolean;
|
461
|
-
}, "
|
461
|
+
}, "type" | "default"> & {
|
462
462
|
type: PropType<NonNullable<boolean | null> | null>;
|
463
463
|
default: NonNullable<boolean | null> | null;
|
464
464
|
};
|
@@ -470,7 +470,7 @@ declare const VNavigationDrawer: {
|
|
470
470
|
type: PropType<vue.StyleValue>;
|
471
471
|
default: null;
|
472
472
|
};
|
473
|
-
border: (StringConstructor |
|
473
|
+
border: (StringConstructor | BooleanConstructor | NumberConstructor)[];
|
474
474
|
color: StringConstructor;
|
475
475
|
disableResizeWatcher: BooleanConstructor;
|
476
476
|
disableRouteWatcher: BooleanConstructor;
|
@@ -502,7 +502,7 @@ declare const VNavigationDrawer: {
|
|
502
502
|
default: number;
|
503
503
|
};
|
504
504
|
location: {
|
505
|
-
type: PropType<"
|
505
|
+
type: PropType<"end" | "start" | "left" | "top" | "bottom" | "right">;
|
506
506
|
default: string;
|
507
507
|
validator: (value: any) => boolean;
|
508
508
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"sticky.mjs","names":["computed","onBeforeUnmount","onMounted","shallowRef","watch","convertToUnit","useSticky","_ref","rootEl","isSticky","layoutItemStyles","isStuck","stuckPosition","stickyStyles","side","value","top","bottom","height","undefined","val","window","addEventListener","onScroll","passive","removeEventListener","immediate","lastScrollTop","direction","scrollY","rect","getBoundingClientRect","layoutTop","parseFloat","Math","max","innerHeight","bodyScroll","getComputedStyle","getPropertyValue"],"sources":["../../../src/components/VNavigationDrawer/sticky.ts"],"sourcesContent":["// Utilities\nimport { computed, onBeforeUnmount, onMounted, shallowRef, watch } from 'vue'\nimport { convertToUnit } from '@/util'\n\n// Types\nimport type { CSSProperties, Ref } from 'vue'\n\ninterface StickyProps {\n rootEl: Ref<HTMLElement | undefined>\n isSticky: Ref<boolean>\n layoutItemStyles: Ref<CSSProperties>\n}\n\nexport function useSticky ({ rootEl, isSticky, layoutItemStyles }: StickyProps) {\n const isStuck = shallowRef<boolean | 'top' | 'bottom'>(false)\n const stuckPosition = shallowRef(0)\n\n const stickyStyles = computed(() => {\n const side = typeof isStuck.value === 'boolean' ? 'top' : isStuck.value\n return [\n isSticky.value ? { top: 'auto', bottom: 'auto', height: undefined } : undefined,\n isStuck.value\n ? { [side]: convertToUnit(stuckPosition.value) }\n : { top: layoutItemStyles.value.top },\n ]\n })\n\n onMounted(() => {\n watch(isSticky, val => {\n if (val) {\n window.addEventListener('scroll', onScroll, { passive: true })\n } else {\n window.removeEventListener('scroll', onScroll)\n }\n }, { immediate: true })\n })\n\n onBeforeUnmount(() => {\n window.removeEventListener('scroll', onScroll)\n })\n\n let lastScrollTop = 0\n function onScroll () {\n const direction = lastScrollTop > window.scrollY ? 'up' : 'down'\n const rect = rootEl.value!.getBoundingClientRect()\n const layoutTop = parseFloat(layoutItemStyles.value.top ?? 0)\n const top = window.scrollY - Math.max(0, stuckPosition.value - layoutTop)\n const bottom =\n rect.height +\n Math.max(stuckPosition.value, layoutTop) -\n window.scrollY -\n window.innerHeight\n const bodyScroll = parseFloat(getComputedStyle(rootEl.value!).getPropertyValue('--v-body-scroll-y')) || 0\n\n if (rect.height < window.innerHeight - layoutTop) {\n isStuck.value = 'top'\n stuckPosition.value = layoutTop\n } else if (\n (direction === 'up' && isStuck.value === 'bottom') ||\n (direction === 'down' && isStuck.value === 'top')\n ) {\n stuckPosition.value = window.scrollY + rect.top - bodyScroll\n isStuck.value = true\n } else if (direction === 'down' && bottom <= 0) {\n stuckPosition.value = 0\n isStuck.value = 'bottom'\n } else if (direction === 'up' && top <= 0) {\n if (!bodyScroll) {\n stuckPosition.value = rect.top + top\n isStuck.value = 'top'\n } else if (isStuck.value !== 'top') {\n stuckPosition.value = -top + bodyScroll + layoutTop\n isStuck.value = 'top'\n }\n }\n\n lastScrollTop = window.scrollY\n }\n\n return { isStuck, stickyStyles }\n}\n"],"mappings":"AAAA;AACA,SAASA,QAAQ,EAAEC,eAAe,EAAEC,SAAS,EAAEC,UAAU,EAAEC,KAAK,QAAQ,KAAK;AAAA,SACpEC,aAAa,gCAEtB;AASA,OAAO,SAASC,SAASA,CAAAC,IAAA,EAAuD;EAAA,IAArD;IAAEC,MAAM;IAAEC,QAAQ;IAAEC;EAA8B,CAAC,GAAAH,IAAA;EAC5E,MAAMI,OAAO,GAAGR,UAAU,CAA6B,KAAK,CAAC;EAC7D,MAAMS,aAAa,GAAGT,UAAU,CAAC,CAAC,CAAC;EAEnC,MAAMU,YAAY,GAAGb,QAAQ,
|
1
|
+
{"version":3,"file":"sticky.mjs","names":["computed","onBeforeUnmount","onMounted","shallowRef","watch","convertToUnit","useSticky","_ref","rootEl","isSticky","layoutItemStyles","isStuck","stuckPosition","stickyStyles","side","value","top","bottom","height","undefined","val","window","addEventListener","onScroll","passive","removeEventListener","immediate","lastScrollTop","direction","scrollY","rect","getBoundingClientRect","layoutTop","parseFloat","Math","max","innerHeight","bodyScroll","getComputedStyle","getPropertyValue"],"sources":["../../../src/components/VNavigationDrawer/sticky.ts"],"sourcesContent":["// Utilities\nimport { computed, onBeforeUnmount, onMounted, shallowRef, watch } from 'vue'\nimport { convertToUnit } from '@/util'\n\n// Types\nimport type { CSSProperties, Ref, StyleValue } from 'vue'\n\ninterface StickyProps {\n rootEl: Ref<HTMLElement | undefined>\n isSticky: Ref<boolean>\n layoutItemStyles: Ref<CSSProperties>\n}\n\nexport function useSticky ({ rootEl, isSticky, layoutItemStyles }: StickyProps) {\n const isStuck = shallowRef<boolean | 'top' | 'bottom'>(false)\n const stuckPosition = shallowRef(0)\n\n const stickyStyles = computed<StyleValue>(() => {\n const side = typeof isStuck.value === 'boolean' ? 'top' : isStuck.value\n return [\n isSticky.value ? { top: 'auto', bottom: 'auto', height: undefined } : undefined,\n isStuck.value\n ? { [side]: convertToUnit(stuckPosition.value) }\n : { top: layoutItemStyles.value.top },\n ]\n })\n\n onMounted(() => {\n watch(isSticky, val => {\n if (val) {\n window.addEventListener('scroll', onScroll, { passive: true })\n } else {\n window.removeEventListener('scroll', onScroll)\n }\n }, { immediate: true })\n })\n\n onBeforeUnmount(() => {\n window.removeEventListener('scroll', onScroll)\n })\n\n let lastScrollTop = 0\n function onScroll () {\n const direction = lastScrollTop > window.scrollY ? 'up' : 'down'\n const rect = rootEl.value!.getBoundingClientRect()\n const layoutTop = parseFloat(layoutItemStyles.value.top ?? 0)\n const top = window.scrollY - Math.max(0, stuckPosition.value - layoutTop)\n const bottom =\n rect.height +\n Math.max(stuckPosition.value, layoutTop) -\n window.scrollY -\n window.innerHeight\n const bodyScroll = parseFloat(getComputedStyle(rootEl.value!).getPropertyValue('--v-body-scroll-y')) || 0\n\n if (rect.height < window.innerHeight - layoutTop) {\n isStuck.value = 'top'\n stuckPosition.value = layoutTop\n } else if (\n (direction === 'up' && isStuck.value === 'bottom') ||\n (direction === 'down' && isStuck.value === 'top')\n ) {\n stuckPosition.value = window.scrollY + rect.top - bodyScroll\n isStuck.value = true\n } else if (direction === 'down' && bottom <= 0) {\n stuckPosition.value = 0\n isStuck.value = 'bottom'\n } else if (direction === 'up' && top <= 0) {\n if (!bodyScroll) {\n stuckPosition.value = rect.top + top\n isStuck.value = 'top'\n } else if (isStuck.value !== 'top') {\n stuckPosition.value = -top + bodyScroll + layoutTop\n isStuck.value = 'top'\n }\n }\n\n lastScrollTop = window.scrollY\n }\n\n return { isStuck, stickyStyles }\n}\n"],"mappings":"AAAA;AACA,SAASA,QAAQ,EAAEC,eAAe,EAAEC,SAAS,EAAEC,UAAU,EAAEC,KAAK,QAAQ,KAAK;AAAA,SACpEC,aAAa,gCAEtB;AASA,OAAO,SAASC,SAASA,CAAAC,IAAA,EAAuD;EAAA,IAArD;IAAEC,MAAM;IAAEC,QAAQ;IAAEC;EAA8B,CAAC,GAAAH,IAAA;EAC5E,MAAMI,OAAO,GAAGR,UAAU,CAA6B,KAAK,CAAC;EAC7D,MAAMS,aAAa,GAAGT,UAAU,CAAC,CAAC,CAAC;EAEnC,MAAMU,YAAY,GAAGb,QAAQ,CAAa,MAAM;IAC9C,MAAMc,IAAI,GAAG,OAAOH,OAAO,CAACI,KAAK,KAAK,SAAS,GAAG,K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,GAAGqB,UAAU,GAAGL,SAAS;QACnDrB,OAAO,CAACI,KAAK,GAAG,KAAK;MACvB;IACF;IAEAY,aAAa,GAAGN,MAAM,CAACQ,OAAO;EAChC;EAEA,OAAO;IAAElB,OAAO;IAAEE;EAAa,CAAC;AAClC","ignoreList":[]}
|
@@ -122,7 +122,7 @@ export const VOtpInput = genericComponent()({
|
|
122
122
|
function onPaste(index, e) {
|
123
123
|
e.preventDefault();
|
124
124
|
e.stopPropagation();
|
125
|
-
const clipboardText = e?.clipboardData?.getData('Text') ?? '';
|
125
|
+
const clipboardText = e?.clipboardData?.getData('Text').slice(0, length.value) ?? '';
|
126
126
|
if (isValidNumber(clipboardText)) return;
|
127
127
|
model.value = clipboardText.split('');
|
128
128
|
inputRef.value?.[index].blur();
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"VOtpInput.mjs","names":["makeVFieldProps","VField","VOverlay","VProgressCircular","provideDefaults","makeDimensionProps","useDimension","makeFocusProps","useFocus","useLocale","useProxiedModel","computed","nextTick","ref","watch","filterInputAttrs","focusChild","genericComponent","only","propsFactory","useRender","makeVOtpInputProps","autofocus","Boolean","divider","String","focusAll","label","type","default","length","Number","modelValue","undefined","placeholder","variant","VOtpInput","name","props","emits","finish","val","setup","_ref","attrs","emit","slots","dimensionStyles","isFocused","focus","blur","model","split","join","t","fields","Array","value","fill","focusIndex","contentRef","inputRef","current","onInput","isValidNumber","array","slice","target","onKeydown","e","index","includes","key","preventDefault","requestAnimationFrame","select","onPaste","stopPropagation","clipboardText","clipboardData","getData","reset","onFocus","onBlur","test","color","bgColor","baseColor","disabled","error","scoped","deep","rootAttrs","inputAttrs","_createVNode","_mergeProps","class","style","map","_","i","_Fragment","loader","event","loading","some","input"],"sources":["../../../src/components/VOtpInput/VOtpInput.tsx"],"sourcesContent":["// Styles\nimport './VOtpInput.sass'\n\n// Components\nimport { makeVFieldProps, VField } from '@/components/VField/VField'\nimport { VOverlay } from '@/components/VOverlay/VOverlay'\nimport { VProgressCircular } from '@/components/VProgressCircular/VProgressCircular'\n\n// Composables\nimport { provideDefaults } from '@/composables/defaults'\nimport { makeDimensionProps, useDimension } from '@/composables/dimensions'\nimport { makeFocusProps, useFocus } from '@/composables/focus'\nimport { useLocale } from '@/composables/locale'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, nextTick, ref, watch } from 'vue'\nimport { filterInputAttrs, focusChild, genericComponent, only, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\n\n// Types\nexport type VOtpInputSlots = {\n default: never\n loader: never\n}\n\nexport const makeVOtpInputProps = propsFactory({\n autofocus: Boolean,\n divider: String,\n focusAll: Boolean,\n label: {\n type: String,\n default: '$vuetify.input.otp',\n },\n length: {\n type: [Number, String],\n default: 6,\n },\n modelValue: {\n type: [Number, String],\n default: undefined,\n },\n placeholder: String,\n type: {\n type: String as PropType<'text' | 'password' | 'number'>,\n default: 'number',\n },\n\n ...makeDimensionProps(),\n ...makeFocusProps(),\n ...only(makeVFieldProps({\n variant: 'outlined' as const,\n }), [\n 'baseColor',\n 'bgColor',\n 'class',\n 'color',\n 'disabled',\n 'error',\n 'loading',\n 'rounded',\n 'style',\n 'theme',\n 'variant',\n ]),\n}, 'VOtpInput')\n\nexport const VOtpInput = genericComponent<VOtpInputSlots>()({\n name: 'VOtpInput',\n\n props: makeVOtpInputProps(),\n\n emits: {\n finish: (val: string) => true,\n 'update:focused': (val: boolean) => true,\n 'update:modelValue': (val: string) => true,\n },\n\n setup (props, { attrs, emit, slots }) {\n const { dimensionStyles } = useDimension(props)\n const { isFocused, focus, blur } = useFocus(props)\n const model = useProxiedModel(\n props,\n 'modelValue',\n '',\n val => val == null ? [] : String(val).split(''),\n val => val.join('')\n )\n const { t } = useLocale()\n\n const length = computed(() => Number(props.length))\n const fields = computed(() => Array(length.value).fill(0))\n const focusIndex = ref(-1)\n const contentRef = ref<HTMLElement>()\n const inputRef = ref<HTMLInputElement[]>([])\n const current = computed(() => inputRef.value[focusIndex.value])\n\n function onInput () {\n // The maxlength attribute doesn't work for the number type input, so the text type is used.\n // The following logic simulates the behavior of a number input.\n if (isValidNumber(current.value.value)) {\n current.value.value = ''\n return\n }\n\n const array = model.value.slice()\n const value = current.value.value\n\n array[focusIndex.value] = value\n\n let target: any = null\n\n if (focusIndex.value > model.value.length) {\n target = model.value.length + 1\n } else if (focusIndex.value + 1 !== length.value) {\n target = 'next'\n }\n\n model.value = array\n\n if (target) focusChild(contentRef.value!, target)\n }\n\n function onKeydown (e: KeyboardEvent) {\n const array = model.value.slice()\n const index = focusIndex.value\n let target: 'next' | 'prev' | 'first' | 'last' | number | null = null\n\n if (![\n 'ArrowLeft',\n 'ArrowRight',\n 'Backspace',\n 'Delete',\n ].includes(e.key)) return\n\n e.preventDefault()\n\n if (e.key === 'ArrowLeft') {\n target = 'prev'\n } else if (e.key === 'ArrowRight') {\n target = 'next'\n } else if (['Backspace', 'Delete'].includes(e.key)) {\n array[focusIndex.value] = ''\n\n model.value = array\n\n if (focusIndex.value > 0 && e.key === 'Backspace') {\n target = 'prev'\n } else {\n requestAnimationFrame(() => {\n inputRef.value[index]?.select()\n })\n }\n }\n\n requestAnimationFrame(() => {\n if (target != null) {\n focusChild(contentRef.value!, target)\n }\n })\n }\n\n function onPaste (index: number, e: ClipboardEvent) {\n e.preventDefault()\n e.stopPropagation()\n\n const clipboardText = e?.clipboardData?.getData('Text') ?? ''\n\n if (isValidNumber(clipboardText)) return\n\n model.value = clipboardText.split('')\n\n inputRef.value?.[index].blur()\n }\n\n function reset () {\n model.value = []\n }\n\n function onFocus (e: FocusEvent, index: number) {\n focus()\n\n focusIndex.value = index\n }\n\n function onBlur () {\n blur()\n\n focusIndex.value = -1\n }\n\n function isValidNumber (value: string) {\n return props.type === 'number' && /[^0-9]/g.test(value)\n }\n\n provideDefaults({\n VField: {\n color: computed(() => props.color),\n bgColor: computed(() => props.color),\n baseColor: computed(() => props.baseColor),\n disabled: computed(() => props.disabled),\n error: computed(() => props.error),\n variant: computed(() => props.variant),\n },\n }, { scoped: true })\n\n watch(model, val => {\n if (val.length === length.value) emit('finish', val.join(''))\n }, { deep: true })\n\n watch(focusIndex, val => {\n if (val < 0) return\n\n nextTick(() => {\n inputRef.value[val]?.select()\n })\n })\n\n useRender(() => {\n const [rootAttrs, inputAttrs] = filterInputAttrs(attrs)\n\n return (\n <div\n class={[\n 'v-otp-input',\n {\n 'v-otp-input--divided': !!props.divider,\n },\n props.class,\n ]}\n style={[\n props.style,\n ]}\n { ...rootAttrs }\n >\n <div\n ref={ contentRef }\n class=\"v-otp-input__content\"\n style={[\n dimensionStyles.value,\n ]}\n >\n { fields.value.map((_, i) => (\n <>\n { props.divider && i !== 0 && (\n <span class=\"v-otp-input__divider\">{ props.divider }</span>\n )}\n\n <VField\n focused={ (isFocused.value && props.focusAll) || focusIndex.value === i }\n key={ i }\n >\n {{\n ...slots,\n loader: undefined,\n default: () => {\n return (\n <input\n ref={ val => inputRef.value[i] = val as HTMLInputElement }\n aria-label={ t(props.label, i + 1) }\n autofocus={ i === 0 && props.autofocus }\n autocomplete=\"one-time-code\"\n class={[\n 'v-otp-input__field',\n ]}\n disabled={ props.disabled }\n inputmode={ props.type === 'number' ? 'numeric' : 'text' }\n min={ props.type === 'number' ? 0 : undefined }\n maxlength=\"1\"\n placeholder={ props.placeholder }\n type={ props.type === 'number' ? 'text' : props.type }\n value={ model.value[i] }\n onInput={ onInput }\n onFocus={ e => onFocus(e, i) }\n onBlur={ onBlur }\n onKeydown={ onKeydown }\n onPaste={ event => onPaste(i, event) }\n />\n )\n },\n }}\n </VField>\n </>\n ))}\n\n <input\n class=\"v-otp-input-input\"\n type=\"hidden\"\n { ...inputAttrs }\n value={ model.value.join('') }\n />\n\n <VOverlay\n contained\n content-class=\"v-otp-input__loader\"\n model-value={ !!props.loading }\n persistent\n >\n { slots.loader?.() ?? (\n <VProgressCircular\n color={ typeof props.loading === 'boolean' ? undefined : props.loading }\n indeterminate\n size=\"24\"\n width=\"2\"\n />\n )}\n </VOverlay>\n\n { slots.default?.() }\n </div>\n </div>\n )\n })\n\n return {\n blur: () => {\n inputRef.value?.some(input => input.blur())\n },\n focus: () => {\n inputRef.value?.[0].focus()\n },\n reset,\n isFocused,\n }\n },\n})\n\nexport type VOtpInput = InstanceType<typeof VOtpInput>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,eAAe,EAAEC,MAAM;AAAA,SACvBC,QAAQ;AAAA,SACRC,iBAAiB,sDAE1B;AAAA,SACSC,eAAe;AAAA,SACfC,kBAAkB,EAAEC,YAAY;AAAA,SAChCC,cAAc,EAAEC,QAAQ;AAAA,SACxBC,SAAS;AAAA,SACTC,eAAe,8CAExB;AACA,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,GAAG,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAC3CC,gBAAgB,EAAEC,UAAU,EAAEC,gBAAgB,EAAEC,IAAI,EAAEC,YAAY,EAAEC,SAAS,gCAEtF;AAGA;AAMA,OAAO,MAAMC,kBAAkB,GAAGF,YAAY,CAAC;EAC7CG,SAAS,EAAEC,OAAO;EAClBC,OAAO,EAAEC,MAAM;EACfC,QAAQ,EAAEH,OAAO;EACjBI,KAAK,EAAE;IACLC,IAAI,EAAEH,MAAM;IACZI,OAAO,EAAE;EACX,CAAC;EACDC,MAAM,EAAE;IACNF,IAAI,EAAE,CAACG,MAAM,EAAEN,MAAM,CAAC;IACtBI,OAAO,EAAE;EACX,CAAC;EACDG,UAAU,EAAE;IACVJ,IAAI,EAAE,CAACG,MAAM,EAAEN,MAAM,CAAC;IACtBI,OAAO,EAAEI;EACX,CAAC;EACDC,WAAW,EAAET,MAAM;EACnBG,IAAI,EAAE;IACJA,IAAI,EAAEH,MAAkD;IACxDI,OAAO,EAAE;EACX,CAAC;EAED,GAAGxB,kBAAkB,CAAC,CAAC;EACvB,GAAGE,cAAc,CAAC,CAAC;EACnB,GAAGW,IAAI,CAAClB,eAAe,CAAC;IACtBmC,O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AKzE;MAAA,IAGD1D,KAAK,CAACjB,OAAO,GAAG,CAAC;IAI3B,CAAC,CAAC;IAEF,OAAO;MACLqB,IAAI,EAAEA,CAAA,KAAM;QACVW,QAAQ,CAACJ,KAAK,EAAEgD,IAAI,CAACC,KAAK,IAAIA,KAAK,CAACxD,IAAI,CAAC,CAAC,CAAC;MAC7C,CAAC;MACDD,KAAK,EAAEA,CAAA,KAAM;QACXY,QAAQ,CAACJ,KAAK,GAAG,CAAC,CAAC,CAACR,KAAK,CAAC,CAAC;MAC7B,CAAC;MACDgC,KAAK;MACLjC;IACF,CAAC;EACH;AACF,CAAC,CAAC","ignoreList":[]}
|
1
|
+
{"version":3,"file":"VOtpInput.mjs","names":["makeVFieldProps","VField","VOverlay","VProgressCircular","provideDefaults","makeDimensionProps","useDimension","makeFocusProps","useFocus","useLocale","useProxiedModel","computed","nextTick","ref","watch","filterInputAttrs","focusChild","genericComponent","only","propsFactory","useRender","makeVOtpInputProps","autofocus","Boolean","divider","String","focusAll","label","type","default","length","Number","modelValue","undefined","placeholder","variant","VOtpInput","name","props","emits","finish","val","setup","_ref","attrs","emit","slots","dimensionStyles","isFocused","focus","blur","model","split","join","t","fields","Array","value","fill","focusIndex","contentRef","inputRef","current","onInput","isValidNumber","array","slice","target","onKeydown","e","index","includes","key","preventDefault","requestAnimationFrame","select","onPaste","stopPropagation","clipboardText","clipboardData","getData","reset","onFocus","onBlur","test","color","bgColor","baseColor","disabled","error","scoped","deep","rootAttrs","inputAttrs","_createVNode","_mergeProps","class","style","map","_","i","_Fragment","loader","event","loading","some","input"],"sources":["../../../src/components/VOtpInput/VOtpInput.tsx"],"sourcesContent":["// Styles\nimport './VOtpInput.sass'\n\n// Components\nimport { makeVFieldProps, VField } from '@/components/VField/VField'\nimport { VOverlay } from '@/components/VOverlay/VOverlay'\nimport { VProgressCircular } from '@/components/VProgressCircular/VProgressCircular'\n\n// Composables\nimport { provideDefaults } from '@/composables/defaults'\nimport { makeDimensionProps, useDimension } from '@/composables/dimensions'\nimport { makeFocusProps, useFocus } from '@/composables/focus'\nimport { useLocale } from '@/composables/locale'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, nextTick, ref, watch } from 'vue'\nimport { filterInputAttrs, focusChild, genericComponent, only, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\n\n// Types\nexport type VOtpInputSlots = {\n default: never\n loader: never\n}\n\nexport const makeVOtpInputProps = propsFactory({\n autofocus: Boolean,\n divider: String,\n focusAll: Boolean,\n label: {\n type: String,\n default: '$vuetify.input.otp',\n },\n length: {\n type: [Number, String],\n default: 6,\n },\n modelValue: {\n type: [Number, String],\n default: undefined,\n },\n placeholder: String,\n type: {\n type: String as PropType<'text' | 'password' | 'number'>,\n default: 'number',\n },\n\n ...makeDimensionProps(),\n ...makeFocusProps(),\n ...only(makeVFieldProps({\n variant: 'outlined' as const,\n }), [\n 'baseColor',\n 'bgColor',\n 'class',\n 'color',\n 'disabled',\n 'error',\n 'loading',\n 'rounded',\n 'style',\n 'theme',\n 'variant',\n ]),\n}, 'VOtpInput')\n\nexport const VOtpInput = genericComponent<VOtpInputSlots>()({\n name: 'VOtpInput',\n\n props: makeVOtpInputProps(),\n\n emits: {\n finish: (val: string) => true,\n 'update:focused': (val: boolean) => true,\n 'update:modelValue': (val: string) => true,\n },\n\n setup (props, { attrs, emit, slots }) {\n const { dimensionStyles } = useDimension(props)\n const { isFocused, focus, blur } = useFocus(props)\n const model = useProxiedModel(\n props,\n 'modelValue',\n '',\n val => val == null ? [] : String(val).split(''),\n val => val.join('')\n )\n const { t } = useLocale()\n\n const length = computed(() => Number(props.length))\n const fields = computed(() => Array(length.value).fill(0))\n const focusIndex = ref(-1)\n const contentRef = ref<HTMLElement>()\n const inputRef = ref<HTMLInputElement[]>([])\n const current = computed(() => inputRef.value[focusIndex.value])\n\n function onInput () {\n // The maxlength attribute doesn't work for the number type input, so the text type is used.\n // The following logic simulates the behavior of a number input.\n if (isValidNumber(current.value.value)) {\n current.value.value = ''\n return\n }\n\n const array = model.value.slice()\n const value = current.value.value\n\n array[focusIndex.value] = value\n\n let target: any = null\n\n if (focusIndex.value > model.value.length) {\n target = model.value.length + 1\n } else if (focusIndex.value + 1 !== length.value) {\n target = 'next'\n }\n\n model.value = array\n\n if (target) focusChild(contentRef.value!, target)\n }\n\n function onKeydown (e: KeyboardEvent) {\n const array = model.value.slice()\n const index = focusIndex.value\n let target: 'next' | 'prev' | 'first' | 'last' | number | null = null\n\n if (![\n 'ArrowLeft',\n 'ArrowRight',\n 'Backspace',\n 'Delete',\n ].includes(e.key)) return\n\n e.preventDefault()\n\n if (e.key === 'ArrowLeft') {\n target = 'prev'\n } else if (e.key === 'ArrowRight') {\n target = 'next'\n } else if (['Backspace', 'Delete'].includes(e.key)) {\n array[focusIndex.value] = ''\n\n model.value = array\n\n if (focusIndex.value > 0 && e.key === 'Backspace') {\n target = 'prev'\n } else {\n requestAnimationFrame(() => {\n inputRef.value[index]?.select()\n })\n }\n }\n\n requestAnimationFrame(() => {\n if (target != null) {\n focusChild(contentRef.value!, target)\n }\n })\n }\n\n function onPaste (index: number, e: ClipboardEvent) {\n e.preventDefault()\n e.stopPropagation()\n\n const clipboardText = e?.clipboardData?.getData('Text').slice(0, length.value) ?? ''\n\n if (isValidNumber(clipboardText)) return\n\n model.value = clipboardText.split('')\n\n inputRef.value?.[index].blur()\n }\n\n function reset () {\n model.value = []\n }\n\n function onFocus (e: FocusEvent, index: number) {\n focus()\n\n focusIndex.value = index\n }\n\n function onBlur () {\n blur()\n\n focusIndex.value = -1\n }\n\n function isValidNumber (value: string) {\n return props.type === 'number' && /[^0-9]/g.test(value)\n }\n\n provideDefaults({\n VField: {\n color: computed(() => props.color),\n bgColor: computed(() => props.color),\n baseColor: computed(() => props.baseColor),\n disabled: computed(() => props.disabled),\n error: computed(() => props.error),\n variant: computed(() => props.variant),\n },\n }, { scoped: true })\n\n watch(model, val => {\n if (val.length === length.value) emit('finish', val.join(''))\n }, { deep: true })\n\n watch(focusIndex, val => {\n if (val < 0) return\n\n nextTick(() => {\n inputRef.value[val]?.select()\n })\n })\n\n useRender(() => {\n const [rootAttrs, inputAttrs] = filterInputAttrs(attrs)\n\n return (\n <div\n class={[\n 'v-otp-input',\n {\n 'v-otp-input--divided': !!props.divider,\n },\n props.class,\n ]}\n style={[\n props.style,\n ]}\n { ...rootAttrs }\n >\n <div\n ref={ contentRef }\n class=\"v-otp-input__content\"\n style={[\n dimensionStyles.value,\n ]}\n >\n { fields.value.map((_, i) => (\n <>\n { props.divider && i !== 0 && (\n <span class=\"v-otp-input__divider\">{ props.divider }</span>\n )}\n\n <VField\n focused={ (isFocused.value && props.focusAll) || focusIndex.value === i }\n key={ i }\n >\n {{\n ...slots,\n loader: undefined,\n default: () => {\n return (\n <input\n ref={ val => inputRef.value[i] = val as HTMLInputElement }\n aria-label={ t(props.label, i + 1) }\n autofocus={ i === 0 && props.autofocus }\n autocomplete=\"one-time-code\"\n class={[\n 'v-otp-input__field',\n ]}\n disabled={ props.disabled }\n inputmode={ props.type === 'number' ? 'numeric' : 'text' }\n min={ props.type === 'number' ? 0 : undefined }\n maxlength=\"1\"\n placeholder={ props.placeholder }\n type={ props.type === 'number' ? 'text' : props.type }\n value={ model.value[i] }\n onInput={ onInput }\n onFocus={ e => onFocus(e, i) }\n onBlur={ onBlur }\n onKeydown={ onKeydown }\n onPaste={ event => onPaste(i, event) }\n />\n )\n },\n }}\n </VField>\n </>\n ))}\n\n <input\n class=\"v-otp-input-input\"\n type=\"hidden\"\n { ...inputAttrs }\n value={ model.value.join('') }\n />\n\n <VOverlay\n contained\n content-class=\"v-otp-input__loader\"\n model-value={ !!props.loading }\n persistent\n >\n { slots.loader?.() ?? (\n <VProgressCircular\n color={ typeof props.loading === 'boolean' ? undefined : props.loading }\n indeterminate\n size=\"24\"\n width=\"2\"\n />\n )}\n </VOverlay>\n\n { slots.default?.() }\n </div>\n </div>\n )\n })\n\n return {\n blur: () => {\n inputRef.value?.some(input => input.blur())\n },\n focus: () => {\n inputRef.value?.[0].focus()\n },\n reset,\n isFocused,\n }\n },\n})\n\nexport type VOtpInput = InstanceType<typeof VOtpInput>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,eAAe,EAAEC,MAAM;AAAA,SACvBC,QAAQ;AAAA,SACRC,iBAAiB,sDAE1B;AAAA,SACSC,eAAe;AAAA,SACfC,kBAAkB,EAAEC,YAAY;AAAA,SAChCC,cAAc,EAAEC,QAAQ;AAAA,SACxBC,SAAS;AAAA,SACTC,eAAe,8CAExB;AACA,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,GAAG,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAC3CC,gBAAgB,EAAEC,UAAU,EAAEC,gBAAgB,EAAEC,IAAI,EAAEC,YAAY,EAAEC,SAAS,gCAEtF;AAGA;AAMA,OAAO,MAAMC,kBAAkB,GAAGF,YAAY,CAAC;EAC7CG,SAAS,EAAEC,OAAO;EAClBC,OAAO,EAAEC,MAAM;EACfC,QAAQ,EAAEH,OAAO;EACjBI,KAAK,EAAE;IACLC,IAAI,EAAEH,MAAM;IACZI,OAAO,EAAE;EACX,CAAC;EACDC,MAAM,EAAE;IACNF,IAAI,EAAE,CAACG,MAAM,EAAEN,MAAM,CAAC;IACtBI,OAAO,EAAE;EACX,CAAC;EACDG,UAAU,EAAE;IACVJ,IAAI,EAAE,CAACG,MAAM,EAAEN,MAAM,CAAC;IACtBI,OAAO,EAAEI;EACX,CAAC;EACDC,WAAW,EAAET,MAAM;EACnBG,IAAI,EAAE;IACJA,IAAI,EAAEH,MAAkD;IACxDI,OAAO,EAAE;EACX,CAAC;EAED,GAAGxB,kBAAkB,CAAC,CAAC;EACvB,GAAGE,cAAc,CAAC,CAAC;EACnB,GAAGW,IAAI,CAAClB,eAAe,CAAC;IACtBmC,OAAO,EAAE;EACX,CAAC,CAAC,EAAE,CACF,WAAW,EACX,SAAS,EACT,OAAO,EACP,OAAO,EACP,UAAU,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