vuetify 3.4.2 → 3.4.3
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 +2187 -2187
- package/dist/json/importMap.json +114 -114
- package/dist/json/web-types.json +3977 -3962
- package/dist/vuetify-labs.css +1645 -1636
- package/dist/vuetify-labs.d.ts +298 -151
- package/dist/vuetify-labs.esm.js +710 -696
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +709 -695
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +915 -906
- package/dist/vuetify.d.ts +332 -185
- package/dist/vuetify.esm.js +710 -696
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +709 -695
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +222 -221
- package/dist/vuetify.min.js.map +1 -1
- package/lib/blueprints/index.d.mts +48 -48
- package/lib/blueprints/md1.d.mts +48 -48
- package/lib/blueprints/md2.d.mts +48 -48
- package/lib/blueprints/md3.d.mts +48 -48
- package/lib/components/VBtn/VBtn.css +3 -0
- package/lib/components/VBtn/VBtn.sass +4 -0
- package/lib/components/VBtn/_variables.scss +1 -0
- package/lib/components/VCarousel/VCarousel.css +2 -1
- package/lib/components/VCarousel/VCarousel.mjs +1 -1
- package/lib/components/VCarousel/VCarousel.mjs.map +1 -1
- package/lib/components/VCarousel/VCarousel.sass +3 -1
- package/lib/components/VCarousel/_variables.scss +6 -0
- package/lib/components/VCheckbox/index.d.mts +32 -20
- package/lib/components/VDataTable/VDataTable.mjs +2 -1
- package/lib/components/VDataTable/VDataTable.mjs.map +1 -1
- package/lib/components/VDataTable/VDataTableFooter.css +1 -1
- package/lib/components/VDataTable/VDataTableFooter.mjs +18 -31
- package/lib/components/VDataTable/VDataTableFooter.mjs.map +1 -1
- package/lib/components/VDataTable/VDataTableHeaders.mjs +1 -1
- package/lib/components/VDataTable/VDataTableHeaders.mjs.map +1 -1
- package/lib/components/VDataTable/_variables.scss +1 -1
- package/lib/components/VDataTable/index.d.mts +3 -3
- package/lib/components/VDatePicker/VDatePicker.mjs +3 -3
- package/lib/components/VDatePicker/VDatePicker.mjs.map +1 -1
- package/lib/components/VDatePicker/VDatePickerMonth.mjs +18 -15
- package/lib/components/VDatePicker/VDatePickerMonth.mjs.map +1 -1
- package/lib/components/VOtpInput/VOtpInput.mjs +1 -0
- package/lib/components/VOtpInput/VOtpInput.mjs.map +1 -1
- package/lib/components/VPagination/VPagination.mjs +2 -2
- package/lib/components/VPagination/VPagination.mjs.map +1 -1
- package/lib/components/VRadio/index.d.mts +16 -10
- package/lib/components/VRadioGroup/index.d.mts +16 -10
- package/lib/components/VSelect/VSelect.mjs +3 -1
- package/lib/components/VSelect/VSelect.mjs.map +1 -1
- package/lib/components/VSelectionControl/index.d.mts +16 -10
- package/lib/components/VSelectionControlGroup/VSelectionControlGroup.mjs +4 -1
- package/lib/components/VSelectionControlGroup/VSelectionControlGroup.mjs.map +1 -1
- package/lib/components/VSelectionControlGroup/index.d.mts +16 -10
- package/lib/components/VSlideGroup/VSlideGroup.mjs +2 -2
- package/lib/components/VSlideGroup/VSlideGroup.mjs.map +1 -1
- package/lib/components/VSwitch/index.d.mts +16 -10
- package/lib/components/VTable/VTable.css +6 -1
- package/lib/components/VTable/VTable.sass +6 -1
- package/lib/components/VTable/_variables.scss +2 -0
- package/lib/components/VTabs/VTab.mjs +4 -3
- package/lib/components/VTabs/VTab.mjs.map +1 -1
- package/lib/components/VTabs/index.d.mts +72 -0
- package/lib/components/index.d.mts +187 -73
- package/lib/composables/date/date.mjs +21 -13
- package/lib/composables/date/date.mjs.map +1 -1
- package/lib/composables/router.mjs +7 -2
- package/lib/composables/router.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/framework.mjs +4 -3
- package/lib/framework.mjs.map +1 -1
- package/lib/index.d.mts +145 -112
- package/lib/locale/fr.mjs +1 -1
- package/lib/locale/fr.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
import { Ref, JSXComponent, PropType } from 'vue';
|
|
2
2
|
|
|
3
|
+
interface DateAdapter<T = unknown> {
|
|
4
|
+
date(value?: any): T | null;
|
|
5
|
+
format(date: T, formatString: string): string;
|
|
6
|
+
toJsDate(value: T): Date;
|
|
7
|
+
parseISO(date: string): T;
|
|
8
|
+
toISO(date: T): string;
|
|
9
|
+
startOfDay(date: T): T;
|
|
10
|
+
endOfDay(date: T): T;
|
|
11
|
+
startOfMonth(date: T): T;
|
|
12
|
+
endOfMonth(date: T): T;
|
|
13
|
+
startOfYear(date: T): T;
|
|
14
|
+
endOfYear(date: T): T;
|
|
15
|
+
isBefore(date: T, comparing: T): boolean;
|
|
16
|
+
isAfter(date: T, comparing: T): boolean;
|
|
17
|
+
isEqual(date: T, comparing: T): boolean;
|
|
18
|
+
isSameDay(date: T, comparing: T): boolean;
|
|
19
|
+
isSameMonth(date: T, comparing: T): boolean;
|
|
20
|
+
isValid(date: any): boolean;
|
|
21
|
+
isWithinRange(date: T, range: [T, T]): boolean;
|
|
22
|
+
addDays(date: T, amount: number): T;
|
|
23
|
+
addMonths(date: T, amount: number): T;
|
|
24
|
+
getYear(date: T): number;
|
|
25
|
+
setYear(date: T, year: number): T;
|
|
26
|
+
getDiff(date: T, comparing: T | string, unit?: string): number;
|
|
27
|
+
getWeekArray(date: T): T[][];
|
|
28
|
+
getWeekdays(): string[];
|
|
29
|
+
getMonth(date: T): number;
|
|
30
|
+
setMonth(date: T, month: number): T;
|
|
31
|
+
getNextMonth(date: T): T;
|
|
32
|
+
}
|
|
33
|
+
|
|
3
34
|
interface LocaleMessages {
|
|
4
35
|
[key: string]: LocaleMessages | string;
|
|
5
36
|
}
|
|
@@ -22,6 +53,23 @@ interface RtlOptions {
|
|
|
22
53
|
rtl?: Record<string, boolean>;
|
|
23
54
|
}
|
|
24
55
|
|
|
56
|
+
interface DateInstance<T = DateInstanceType['instanceType']> extends DateAdapter<T> {
|
|
57
|
+
locale?: any;
|
|
58
|
+
}
|
|
59
|
+
/** Supports module augmentation to specify date object types */
|
|
60
|
+
interface DateInstanceType {
|
|
61
|
+
instanceType: unknown;
|
|
62
|
+
}
|
|
63
|
+
type InternalDateOptions<T = unknown> = {
|
|
64
|
+
adapter: (new (options: {
|
|
65
|
+
locale: any;
|
|
66
|
+
formats?: any;
|
|
67
|
+
}) => DateInstance<T>) | DateInstance<T>;
|
|
68
|
+
formats?: Record<string, any>;
|
|
69
|
+
locale: Record<string, any>;
|
|
70
|
+
};
|
|
71
|
+
type DateOptions<T = any> = Partial<InternalDateOptions<T>>;
|
|
72
|
+
|
|
25
73
|
type DeepPartial<T> = T extends object ? {
|
|
26
74
|
[P in keyof T]?: DeepPartial<T[P]>;
|
|
27
75
|
} : T;
|
|
@@ -87,54 +135,6 @@ type DefaultsInstance = undefined | {
|
|
|
87
135
|
};
|
|
88
136
|
type DefaultsOptions = Partial<DefaultsInstance>;
|
|
89
137
|
|
|
90
|
-
interface DateAdapter<T = unknown> {
|
|
91
|
-
date(value?: any): T | null;
|
|
92
|
-
format(date: T, formatString: string): string;
|
|
93
|
-
toJsDate(value: T): Date;
|
|
94
|
-
parseISO(date: string): T;
|
|
95
|
-
toISO(date: T): string;
|
|
96
|
-
startOfDay(date: T): T;
|
|
97
|
-
endOfDay(date: T): T;
|
|
98
|
-
startOfMonth(date: T): T;
|
|
99
|
-
endOfMonth(date: T): T;
|
|
100
|
-
startOfYear(date: T): T;
|
|
101
|
-
endOfYear(date: T): T;
|
|
102
|
-
isBefore(date: T, comparing: T): boolean;
|
|
103
|
-
isAfter(date: T, comparing: T): boolean;
|
|
104
|
-
isEqual(date: T, comparing: T): boolean;
|
|
105
|
-
isSameDay(date: T, comparing: T): boolean;
|
|
106
|
-
isSameMonth(date: T, comparing: T): boolean;
|
|
107
|
-
isValid(date: any): boolean;
|
|
108
|
-
isWithinRange(date: T, range: [T, T]): boolean;
|
|
109
|
-
addDays(date: T, amount: number): T;
|
|
110
|
-
addMonths(date: T, amount: number): T;
|
|
111
|
-
getYear(date: T): number;
|
|
112
|
-
setYear(date: T, year: number): T;
|
|
113
|
-
getDiff(date: T, comparing: T | string, unit?: string): number;
|
|
114
|
-
getWeekArray(date: T): T[][];
|
|
115
|
-
getWeekdays(): string[];
|
|
116
|
-
getMonth(date: T): number;
|
|
117
|
-
setMonth(date: T, month: number): T;
|
|
118
|
-
getNextMonth(date: T): T;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
interface DateInstance<T = DateInstanceType['instanceType']> extends DateAdapter<T> {
|
|
122
|
-
locale?: any;
|
|
123
|
-
}
|
|
124
|
-
/** Supports module augmentation to specify date object types */
|
|
125
|
-
interface DateInstanceType {
|
|
126
|
-
instanceType: unknown;
|
|
127
|
-
}
|
|
128
|
-
type InternalDateOptions<T = unknown> = {
|
|
129
|
-
adapter: (new (options: {
|
|
130
|
-
locale: any;
|
|
131
|
-
formats?: any;
|
|
132
|
-
}) => DateInstance<T>) | DateInstance<T>;
|
|
133
|
-
formats?: Record<string, any>;
|
|
134
|
-
locale: Record<string, any>;
|
|
135
|
-
};
|
|
136
|
-
type DateOptions<T = any> = Partial<InternalDateOptions<T>>;
|
|
137
|
-
|
|
138
138
|
type IconValue = string | (string | [path: string, opacity: number])[] | JSXComponent;
|
|
139
139
|
declare const IconValue: PropType<IconValue>;
|
|
140
140
|
interface IconAliases {
|
package/lib/blueprints/md1.d.mts
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
import { Ref, JSXComponent, PropType } from 'vue';
|
|
2
2
|
|
|
3
|
+
interface DateAdapter<T = unknown> {
|
|
4
|
+
date(value?: any): T | null;
|
|
5
|
+
format(date: T, formatString: string): string;
|
|
6
|
+
toJsDate(value: T): Date;
|
|
7
|
+
parseISO(date: string): T;
|
|
8
|
+
toISO(date: T): string;
|
|
9
|
+
startOfDay(date: T): T;
|
|
10
|
+
endOfDay(date: T): T;
|
|
11
|
+
startOfMonth(date: T): T;
|
|
12
|
+
endOfMonth(date: T): T;
|
|
13
|
+
startOfYear(date: T): T;
|
|
14
|
+
endOfYear(date: T): T;
|
|
15
|
+
isBefore(date: T, comparing: T): boolean;
|
|
16
|
+
isAfter(date: T, comparing: T): boolean;
|
|
17
|
+
isEqual(date: T, comparing: T): boolean;
|
|
18
|
+
isSameDay(date: T, comparing: T): boolean;
|
|
19
|
+
isSameMonth(date: T, comparing: T): boolean;
|
|
20
|
+
isValid(date: any): boolean;
|
|
21
|
+
isWithinRange(date: T, range: [T, T]): boolean;
|
|
22
|
+
addDays(date: T, amount: number): T;
|
|
23
|
+
addMonths(date: T, amount: number): T;
|
|
24
|
+
getYear(date: T): number;
|
|
25
|
+
setYear(date: T, year: number): T;
|
|
26
|
+
getDiff(date: T, comparing: T | string, unit?: string): number;
|
|
27
|
+
getWeekArray(date: T): T[][];
|
|
28
|
+
getWeekdays(): string[];
|
|
29
|
+
getMonth(date: T): number;
|
|
30
|
+
setMonth(date: T, month: number): T;
|
|
31
|
+
getNextMonth(date: T): T;
|
|
32
|
+
}
|
|
33
|
+
|
|
3
34
|
interface LocaleMessages {
|
|
4
35
|
[key: string]: LocaleMessages | string;
|
|
5
36
|
}
|
|
@@ -22,6 +53,23 @@ interface RtlOptions {
|
|
|
22
53
|
rtl?: Record<string, boolean>;
|
|
23
54
|
}
|
|
24
55
|
|
|
56
|
+
interface DateInstance<T = DateInstanceType['instanceType']> extends DateAdapter<T> {
|
|
57
|
+
locale?: any;
|
|
58
|
+
}
|
|
59
|
+
/** Supports module augmentation to specify date object types */
|
|
60
|
+
interface DateInstanceType {
|
|
61
|
+
instanceType: unknown;
|
|
62
|
+
}
|
|
63
|
+
type InternalDateOptions<T = unknown> = {
|
|
64
|
+
adapter: (new (options: {
|
|
65
|
+
locale: any;
|
|
66
|
+
formats?: any;
|
|
67
|
+
}) => DateInstance<T>) | DateInstance<T>;
|
|
68
|
+
formats?: Record<string, any>;
|
|
69
|
+
locale: Record<string, any>;
|
|
70
|
+
};
|
|
71
|
+
type DateOptions<T = any> = Partial<InternalDateOptions<T>>;
|
|
72
|
+
|
|
25
73
|
type DeepPartial<T> = T extends object ? {
|
|
26
74
|
[P in keyof T]?: DeepPartial<T[P]>;
|
|
27
75
|
} : T;
|
|
@@ -87,54 +135,6 @@ type DefaultsInstance = undefined | {
|
|
|
87
135
|
};
|
|
88
136
|
type DefaultsOptions = Partial<DefaultsInstance>;
|
|
89
137
|
|
|
90
|
-
interface DateAdapter<T = unknown> {
|
|
91
|
-
date(value?: any): T | null;
|
|
92
|
-
format(date: T, formatString: string): string;
|
|
93
|
-
toJsDate(value: T): Date;
|
|
94
|
-
parseISO(date: string): T;
|
|
95
|
-
toISO(date: T): string;
|
|
96
|
-
startOfDay(date: T): T;
|
|
97
|
-
endOfDay(date: T): T;
|
|
98
|
-
startOfMonth(date: T): T;
|
|
99
|
-
endOfMonth(date: T): T;
|
|
100
|
-
startOfYear(date: T): T;
|
|
101
|
-
endOfYear(date: T): T;
|
|
102
|
-
isBefore(date: T, comparing: T): boolean;
|
|
103
|
-
isAfter(date: T, comparing: T): boolean;
|
|
104
|
-
isEqual(date: T, comparing: T): boolean;
|
|
105
|
-
isSameDay(date: T, comparing: T): boolean;
|
|
106
|
-
isSameMonth(date: T, comparing: T): boolean;
|
|
107
|
-
isValid(date: any): boolean;
|
|
108
|
-
isWithinRange(date: T, range: [T, T]): boolean;
|
|
109
|
-
addDays(date: T, amount: number): T;
|
|
110
|
-
addMonths(date: T, amount: number): T;
|
|
111
|
-
getYear(date: T): number;
|
|
112
|
-
setYear(date: T, year: number): T;
|
|
113
|
-
getDiff(date: T, comparing: T | string, unit?: string): number;
|
|
114
|
-
getWeekArray(date: T): T[][];
|
|
115
|
-
getWeekdays(): string[];
|
|
116
|
-
getMonth(date: T): number;
|
|
117
|
-
setMonth(date: T, month: number): T;
|
|
118
|
-
getNextMonth(date: T): T;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
interface DateInstance<T = DateInstanceType['instanceType']> extends DateAdapter<T> {
|
|
122
|
-
locale?: any;
|
|
123
|
-
}
|
|
124
|
-
/** Supports module augmentation to specify date object types */
|
|
125
|
-
interface DateInstanceType {
|
|
126
|
-
instanceType: unknown;
|
|
127
|
-
}
|
|
128
|
-
type InternalDateOptions<T = unknown> = {
|
|
129
|
-
adapter: (new (options: {
|
|
130
|
-
locale: any;
|
|
131
|
-
formats?: any;
|
|
132
|
-
}) => DateInstance<T>) | DateInstance<T>;
|
|
133
|
-
formats?: Record<string, any>;
|
|
134
|
-
locale: Record<string, any>;
|
|
135
|
-
};
|
|
136
|
-
type DateOptions<T = any> = Partial<InternalDateOptions<T>>;
|
|
137
|
-
|
|
138
138
|
type IconValue = string | (string | [path: string, opacity: number])[] | JSXComponent;
|
|
139
139
|
declare const IconValue: PropType<IconValue>;
|
|
140
140
|
interface IconAliases {
|
package/lib/blueprints/md2.d.mts
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
import { Ref, JSXComponent, PropType } from 'vue';
|
|
2
2
|
|
|
3
|
+
interface DateAdapter<T = unknown> {
|
|
4
|
+
date(value?: any): T | null;
|
|
5
|
+
format(date: T, formatString: string): string;
|
|
6
|
+
toJsDate(value: T): Date;
|
|
7
|
+
parseISO(date: string): T;
|
|
8
|
+
toISO(date: T): string;
|
|
9
|
+
startOfDay(date: T): T;
|
|
10
|
+
endOfDay(date: T): T;
|
|
11
|
+
startOfMonth(date: T): T;
|
|
12
|
+
endOfMonth(date: T): T;
|
|
13
|
+
startOfYear(date: T): T;
|
|
14
|
+
endOfYear(date: T): T;
|
|
15
|
+
isBefore(date: T, comparing: T): boolean;
|
|
16
|
+
isAfter(date: T, comparing: T): boolean;
|
|
17
|
+
isEqual(date: T, comparing: T): boolean;
|
|
18
|
+
isSameDay(date: T, comparing: T): boolean;
|
|
19
|
+
isSameMonth(date: T, comparing: T): boolean;
|
|
20
|
+
isValid(date: any): boolean;
|
|
21
|
+
isWithinRange(date: T, range: [T, T]): boolean;
|
|
22
|
+
addDays(date: T, amount: number): T;
|
|
23
|
+
addMonths(date: T, amount: number): T;
|
|
24
|
+
getYear(date: T): number;
|
|
25
|
+
setYear(date: T, year: number): T;
|
|
26
|
+
getDiff(date: T, comparing: T | string, unit?: string): number;
|
|
27
|
+
getWeekArray(date: T): T[][];
|
|
28
|
+
getWeekdays(): string[];
|
|
29
|
+
getMonth(date: T): number;
|
|
30
|
+
setMonth(date: T, month: number): T;
|
|
31
|
+
getNextMonth(date: T): T;
|
|
32
|
+
}
|
|
33
|
+
|
|
3
34
|
interface LocaleMessages {
|
|
4
35
|
[key: string]: LocaleMessages | string;
|
|
5
36
|
}
|
|
@@ -22,6 +53,23 @@ interface RtlOptions {
|
|
|
22
53
|
rtl?: Record<string, boolean>;
|
|
23
54
|
}
|
|
24
55
|
|
|
56
|
+
interface DateInstance<T = DateInstanceType['instanceType']> extends DateAdapter<T> {
|
|
57
|
+
locale?: any;
|
|
58
|
+
}
|
|
59
|
+
/** Supports module augmentation to specify date object types */
|
|
60
|
+
interface DateInstanceType {
|
|
61
|
+
instanceType: unknown;
|
|
62
|
+
}
|
|
63
|
+
type InternalDateOptions<T = unknown> = {
|
|
64
|
+
adapter: (new (options: {
|
|
65
|
+
locale: any;
|
|
66
|
+
formats?: any;
|
|
67
|
+
}) => DateInstance<T>) | DateInstance<T>;
|
|
68
|
+
formats?: Record<string, any>;
|
|
69
|
+
locale: Record<string, any>;
|
|
70
|
+
};
|
|
71
|
+
type DateOptions<T = any> = Partial<InternalDateOptions<T>>;
|
|
72
|
+
|
|
25
73
|
type DeepPartial<T> = T extends object ? {
|
|
26
74
|
[P in keyof T]?: DeepPartial<T[P]>;
|
|
27
75
|
} : T;
|
|
@@ -87,54 +135,6 @@ type DefaultsInstance = undefined | {
|
|
|
87
135
|
};
|
|
88
136
|
type DefaultsOptions = Partial<DefaultsInstance>;
|
|
89
137
|
|
|
90
|
-
interface DateAdapter<T = unknown> {
|
|
91
|
-
date(value?: any): T | null;
|
|
92
|
-
format(date: T, formatString: string): string;
|
|
93
|
-
toJsDate(value: T): Date;
|
|
94
|
-
parseISO(date: string): T;
|
|
95
|
-
toISO(date: T): string;
|
|
96
|
-
startOfDay(date: T): T;
|
|
97
|
-
endOfDay(date: T): T;
|
|
98
|
-
startOfMonth(date: T): T;
|
|
99
|
-
endOfMonth(date: T): T;
|
|
100
|
-
startOfYear(date: T): T;
|
|
101
|
-
endOfYear(date: T): T;
|
|
102
|
-
isBefore(date: T, comparing: T): boolean;
|
|
103
|
-
isAfter(date: T, comparing: T): boolean;
|
|
104
|
-
isEqual(date: T, comparing: T): boolean;
|
|
105
|
-
isSameDay(date: T, comparing: T): boolean;
|
|
106
|
-
isSameMonth(date: T, comparing: T): boolean;
|
|
107
|
-
isValid(date: any): boolean;
|
|
108
|
-
isWithinRange(date: T, range: [T, T]): boolean;
|
|
109
|
-
addDays(date: T, amount: number): T;
|
|
110
|
-
addMonths(date: T, amount: number): T;
|
|
111
|
-
getYear(date: T): number;
|
|
112
|
-
setYear(date: T, year: number): T;
|
|
113
|
-
getDiff(date: T, comparing: T | string, unit?: string): number;
|
|
114
|
-
getWeekArray(date: T): T[][];
|
|
115
|
-
getWeekdays(): string[];
|
|
116
|
-
getMonth(date: T): number;
|
|
117
|
-
setMonth(date: T, month: number): T;
|
|
118
|
-
getNextMonth(date: T): T;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
interface DateInstance<T = DateInstanceType['instanceType']> extends DateAdapter<T> {
|
|
122
|
-
locale?: any;
|
|
123
|
-
}
|
|
124
|
-
/** Supports module augmentation to specify date object types */
|
|
125
|
-
interface DateInstanceType {
|
|
126
|
-
instanceType: unknown;
|
|
127
|
-
}
|
|
128
|
-
type InternalDateOptions<T = unknown> = {
|
|
129
|
-
adapter: (new (options: {
|
|
130
|
-
locale: any;
|
|
131
|
-
formats?: any;
|
|
132
|
-
}) => DateInstance<T>) | DateInstance<T>;
|
|
133
|
-
formats?: Record<string, any>;
|
|
134
|
-
locale: Record<string, any>;
|
|
135
|
-
};
|
|
136
|
-
type DateOptions<T = any> = Partial<InternalDateOptions<T>>;
|
|
137
|
-
|
|
138
138
|
type IconValue = string | (string | [path: string, opacity: number])[] | JSXComponent;
|
|
139
139
|
declare const IconValue: PropType<IconValue>;
|
|
140
140
|
interface IconAliases {
|
package/lib/blueprints/md3.d.mts
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
import { Ref, JSXComponent, PropType } from 'vue';
|
|
2
2
|
|
|
3
|
+
interface DateAdapter<T = unknown> {
|
|
4
|
+
date(value?: any): T | null;
|
|
5
|
+
format(date: T, formatString: string): string;
|
|
6
|
+
toJsDate(value: T): Date;
|
|
7
|
+
parseISO(date: string): T;
|
|
8
|
+
toISO(date: T): string;
|
|
9
|
+
startOfDay(date: T): T;
|
|
10
|
+
endOfDay(date: T): T;
|
|
11
|
+
startOfMonth(date: T): T;
|
|
12
|
+
endOfMonth(date: T): T;
|
|
13
|
+
startOfYear(date: T): T;
|
|
14
|
+
endOfYear(date: T): T;
|
|
15
|
+
isBefore(date: T, comparing: T): boolean;
|
|
16
|
+
isAfter(date: T, comparing: T): boolean;
|
|
17
|
+
isEqual(date: T, comparing: T): boolean;
|
|
18
|
+
isSameDay(date: T, comparing: T): boolean;
|
|
19
|
+
isSameMonth(date: T, comparing: T): boolean;
|
|
20
|
+
isValid(date: any): boolean;
|
|
21
|
+
isWithinRange(date: T, range: [T, T]): boolean;
|
|
22
|
+
addDays(date: T, amount: number): T;
|
|
23
|
+
addMonths(date: T, amount: number): T;
|
|
24
|
+
getYear(date: T): number;
|
|
25
|
+
setYear(date: T, year: number): T;
|
|
26
|
+
getDiff(date: T, comparing: T | string, unit?: string): number;
|
|
27
|
+
getWeekArray(date: T): T[][];
|
|
28
|
+
getWeekdays(): string[];
|
|
29
|
+
getMonth(date: T): number;
|
|
30
|
+
setMonth(date: T, month: number): T;
|
|
31
|
+
getNextMonth(date: T): T;
|
|
32
|
+
}
|
|
33
|
+
|
|
3
34
|
interface LocaleMessages {
|
|
4
35
|
[key: string]: LocaleMessages | string;
|
|
5
36
|
}
|
|
@@ -22,6 +53,23 @@ interface RtlOptions {
|
|
|
22
53
|
rtl?: Record<string, boolean>;
|
|
23
54
|
}
|
|
24
55
|
|
|
56
|
+
interface DateInstance<T = DateInstanceType['instanceType']> extends DateAdapter<T> {
|
|
57
|
+
locale?: any;
|
|
58
|
+
}
|
|
59
|
+
/** Supports module augmentation to specify date object types */
|
|
60
|
+
interface DateInstanceType {
|
|
61
|
+
instanceType: unknown;
|
|
62
|
+
}
|
|
63
|
+
type InternalDateOptions<T = unknown> = {
|
|
64
|
+
adapter: (new (options: {
|
|
65
|
+
locale: any;
|
|
66
|
+
formats?: any;
|
|
67
|
+
}) => DateInstance<T>) | DateInstance<T>;
|
|
68
|
+
formats?: Record<string, any>;
|
|
69
|
+
locale: Record<string, any>;
|
|
70
|
+
};
|
|
71
|
+
type DateOptions<T = any> = Partial<InternalDateOptions<T>>;
|
|
72
|
+
|
|
25
73
|
type DeepPartial<T> = T extends object ? {
|
|
26
74
|
[P in keyof T]?: DeepPartial<T[P]>;
|
|
27
75
|
} : T;
|
|
@@ -87,54 +135,6 @@ type DefaultsInstance = undefined | {
|
|
|
87
135
|
};
|
|
88
136
|
type DefaultsOptions = Partial<DefaultsInstance>;
|
|
89
137
|
|
|
90
|
-
interface DateAdapter<T = unknown> {
|
|
91
|
-
date(value?: any): T | null;
|
|
92
|
-
format(date: T, formatString: string): string;
|
|
93
|
-
toJsDate(value: T): Date;
|
|
94
|
-
parseISO(date: string): T;
|
|
95
|
-
toISO(date: T): string;
|
|
96
|
-
startOfDay(date: T): T;
|
|
97
|
-
endOfDay(date: T): T;
|
|
98
|
-
startOfMonth(date: T): T;
|
|
99
|
-
endOfMonth(date: T): T;
|
|
100
|
-
startOfYear(date: T): T;
|
|
101
|
-
endOfYear(date: T): T;
|
|
102
|
-
isBefore(date: T, comparing: T): boolean;
|
|
103
|
-
isAfter(date: T, comparing: T): boolean;
|
|
104
|
-
isEqual(date: T, comparing: T): boolean;
|
|
105
|
-
isSameDay(date: T, comparing: T): boolean;
|
|
106
|
-
isSameMonth(date: T, comparing: T): boolean;
|
|
107
|
-
isValid(date: any): boolean;
|
|
108
|
-
isWithinRange(date: T, range: [T, T]): boolean;
|
|
109
|
-
addDays(date: T, amount: number): T;
|
|
110
|
-
addMonths(date: T, amount: number): T;
|
|
111
|
-
getYear(date: T): number;
|
|
112
|
-
setYear(date: T, year: number): T;
|
|
113
|
-
getDiff(date: T, comparing: T | string, unit?: string): number;
|
|
114
|
-
getWeekArray(date: T): T[][];
|
|
115
|
-
getWeekdays(): string[];
|
|
116
|
-
getMonth(date: T): number;
|
|
117
|
-
setMonth(date: T, month: number): T;
|
|
118
|
-
getNextMonth(date: T): T;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
interface DateInstance<T = DateInstanceType['instanceType']> extends DateAdapter<T> {
|
|
122
|
-
locale?: any;
|
|
123
|
-
}
|
|
124
|
-
/** Supports module augmentation to specify date object types */
|
|
125
|
-
interface DateInstanceType {
|
|
126
|
-
instanceType: unknown;
|
|
127
|
-
}
|
|
128
|
-
type InternalDateOptions<T = unknown> = {
|
|
129
|
-
adapter: (new (options: {
|
|
130
|
-
locale: any;
|
|
131
|
-
formats?: any;
|
|
132
|
-
}) => DateInstance<T>) | DateInstance<T>;
|
|
133
|
-
formats?: Record<string, any>;
|
|
134
|
-
locale: Record<string, any>;
|
|
135
|
-
};
|
|
136
|
-
type DateOptions<T = any> = Partial<InternalDateOptions<T>>;
|
|
137
|
-
|
|
138
138
|
type IconValue = string | (string | [path: string, opacity: number])[] | JSXComponent;
|
|
139
139
|
declare const IconValue: PropType<IconValue>;
|
|
140
140
|
interface IconAliases {
|
|
@@ -12,6 +12,7 @@ $button-color: rgba(var(--v-theme-on-surface), var(--v-high-emphasis-opacity)) !
|
|
|
12
12
|
$button-banner-actions-padding: 0 8px !default; // @deprecated
|
|
13
13
|
$button-pagination-active-overlay-opacity: var(--v-border-opacity) !default;
|
|
14
14
|
$button-pagination-border-radius: settings.$border-radius-root !default;
|
|
15
|
+
$button-pagination-rounded-border-radius: map.get(settings.$rounded, 'circle') !default;
|
|
15
16
|
$button-border-color: settings.$border-color-root !default;
|
|
16
17
|
$button-border-radius: settings.$border-radius-root !default;
|
|
17
18
|
$button-border-style: settings.$border-style-root !default;
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
}
|
|
6
6
|
.v-carousel__controls {
|
|
7
7
|
align-items: center;
|
|
8
|
-
background: rgba(var(--v-theme-surface-variant), 0.3);
|
|
9
8
|
bottom: 0;
|
|
10
9
|
display: flex;
|
|
11
10
|
height: 50px;
|
|
@@ -14,6 +13,8 @@
|
|
|
14
13
|
position: absolute;
|
|
15
14
|
width: 100%;
|
|
16
15
|
z-index: 1;
|
|
16
|
+
background: rgba(var(--v-theme-surface-variant), 0.3);
|
|
17
|
+
color: rgb(var(--v-theme-on-surface-variant));
|
|
17
18
|
}
|
|
18
19
|
.v-carousel__controls > .v-item-group {
|
|
19
20
|
flex: 0 1 auto;
|
|
@@ -109,7 +109,7 @@ export const VCarousel = genericComponent()({
|
|
|
109
109
|
const props = {
|
|
110
110
|
id: `carousel-item-${item.id}`,
|
|
111
111
|
'aria-label': t('$vuetify.carousel.ariaLabel.delimiter', index + 1, group.items.value.length),
|
|
112
|
-
class: [group.isSelected(item.id) && 'v-btn--active'],
|
|
112
|
+
class: ['v-carousel__controls__item', group.isSelected(item.id) && 'v-btn--active'],
|
|
113
113
|
onClick: () => group.select(item.id, true)
|
|
114
114
|
};
|
|
115
115
|
return slots.item ? slots.item({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VCarousel.mjs","names":["VBtn","VDefaultsProvider","VProgressLinear","makeVWindowProps","VWindow","IconValue","useLocale","useProxiedModel","onMounted","ref","watch","convertToUnit","genericComponent","propsFactory","useRender","makeVCarouselProps","color","String","cycle","Boolean","delimiterIcon","type","default","height","Number","hideDelimiters","hideDelimiterBackground","interval","validator","value","progress","verticalDelimiters","continuous","mandatory","showArrows","VCarousel","name","props","emits","setup","_ref","slots","model","t","windowRef","slideTimeout","restartTimeout","val","window","clearTimeout","startTimeout","setTimeout","group","next","requestAnimationFrame","windowProps","filterProps","_createVNode","_mergeProps","$event","class","style","additional","_ref2","_Fragment","left","right","items","length","icon","size","variant","map","item","index","id","isSelected","onClick","select","undefined","getItemIndex","prev"],"sources":["../../../src/components/VCarousel/VCarousel.tsx"],"sourcesContent":["// Styles\nimport './VCarousel.sass'\n\n// Components\nimport { VBtn } from '@/components/VBtn'\nimport { VDefaultsProvider } from '@/components/VDefaultsProvider'\nimport { VProgressLinear } from '@/components/VProgressLinear'\nimport { makeVWindowProps, VWindow } from '@/components/VWindow/VWindow'\n\n// Composables\nimport { IconValue } from '@/composables/icons'\nimport { useLocale } from '@/composables/locale'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { onMounted, ref, watch } from 'vue'\nimport { convertToUnit, genericComponent, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { VWindowSlots } from '@/components/VWindow/VWindow'\nimport type { GroupProvide } from '@/composables/group'\nimport type { GenericProps } from '@/util'\n\nexport const makeVCarouselProps = propsFactory({\n color: String,\n cycle: Boolean,\n delimiterIcon: {\n type: IconValue,\n default: '$delimiter',\n },\n height: {\n type: [Number, String],\n default: 500,\n },\n hideDelimiters: Boolean,\n hideDelimiterBackground: Boolean,\n interval: {\n type: [Number, String],\n default: 6000,\n validator: (value: string | number) => Number(value) > 0,\n },\n progress: [Boolean, String],\n verticalDelimiters: [Boolean, String] as PropType<boolean | 'left' | 'right'>,\n\n ...makeVWindowProps({\n continuous: true,\n mandatory: 'force' as const,\n showArrows: true,\n }),\n}, 'VCarousel')\n\ntype VCarouselSlots = VWindowSlots & {\n item: {\n props: Record<string, any>\n item: {\n id: number\n value: unknown\n disabled: boolean | undefined\n }\n }\n}\n\nexport const VCarousel = genericComponent<new <T>(\n props: {\n modelValue?: T\n 'onUpdate:modelValue'?: (value: T) => void\n },\n slots: VCarouselSlots,\n) => GenericProps<typeof props, typeof slots>>()({\n name: 'VCarousel',\n\n props: makeVCarouselProps(),\n\n emits: {\n 'update:modelValue': (value: any) => true,\n },\n\n setup (props, { slots }) {\n const model = useProxiedModel(props, 'modelValue')\n const { t } = useLocale()\n const windowRef = ref<typeof VWindow>()\n\n let slideTimeout = -1\n watch(model, restartTimeout)\n watch(() => props.interval, restartTimeout)\n watch(() => props.cycle, val => {\n if (val) restartTimeout()\n else window.clearTimeout(slideTimeout)\n })\n\n onMounted(startTimeout)\n\n function startTimeout () {\n if (!props.cycle || !windowRef.value) return\n\n slideTimeout = window.setTimeout(windowRef.value.group.next, +props.interval > 0 ? +props.interval : 6000)\n }\n\n function restartTimeout () {\n window.clearTimeout(slideTimeout)\n window.requestAnimationFrame(startTimeout)\n }\n\n useRender(() => {\n const windowProps = VWindow.filterProps(props)\n\n return (\n <VWindow\n ref={ windowRef }\n { ...windowProps }\n v-model={ model.value }\n class={[\n 'v-carousel',\n {\n 'v-carousel--hide-delimiter-background': props.hideDelimiterBackground,\n 'v-carousel--vertical-delimiters': props.verticalDelimiters,\n },\n props.class,\n ]}\n style={[\n { height: convertToUnit(props.height) },\n props.style,\n ]}\n >\n {{\n default: slots.default,\n additional: ({ group }: { group: GroupProvide }) => (\n <>\n { !props.hideDelimiters && (\n <div\n class=\"v-carousel__controls\"\n style={{\n left: props.verticalDelimiters === 'left' && props.verticalDelimiters ? 0 : 'auto',\n right: props.verticalDelimiters === 'right' ? 0 : 'auto',\n }}\n >\n { group.items.value.length > 0 && (\n <VDefaultsProvider\n defaults={{\n VBtn: {\n color: props.color,\n icon: props.delimiterIcon,\n size: 'x-small',\n variant: 'text',\n },\n }}\n scoped\n >\n { group.items.value.map((item, index) => {\n const props = {\n id: `carousel-item-${item.id}`,\n 'aria-label': t('$vuetify.carousel.ariaLabel.delimiter', index + 1, group.items.value.length),\n class: [group.isSelected(item.id) && 'v-btn--active'],\n onClick: () => group.select(item.id, true),\n }\n\n return slots.item\n ? slots.item({ props, item })\n : (<VBtn { ...item } { ...props } />)\n })}\n </VDefaultsProvider>\n )}\n </div>\n )}\n\n { props.progress && (\n <VProgressLinear\n class=\"v-carousel__progress\"\n color={ typeof props.progress === 'string' ? props.progress : undefined }\n modelValue={ (group.getItemIndex(model.value) + 1) / group.items.value.length * 100 }\n />\n )}\n </>\n ),\n prev: slots.prev,\n next: slots.next,\n }}\n </VWindow>\n )\n })\n\n return {}\n },\n})\n\nexport type VCarousel = InstanceType<typeof VCarousel>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,IAAI;AAAA,SACJC,iBAAiB;AAAA,SACjBC,eAAe;AAAA,SACfC,gBAAgB,EAAEC,OAAO,kCAElC;AAAA,SACSC,SAAS;AAAA,SACTC,SAAS;AAAA,SACTC,eAAe,8CAExB;AACA,SAASC,SAAS,EAAEC,GAAG,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAClCC,aAAa,EAAEC,gBAAgB,EAAEC,YAAY,EAAEC,SAAS,gCAEjE;AAMA,OAAO,MAAMC,kBAAkB,GAAGF,YAAY,CAAC;EAC7CG,KAAK,EAAEC,MAAM;EACbC,KAAK,EAAEC,OAAO;EACdC,aAAa,EAAE;IACbC,IAAI,EAAEhB,SAAS;IACfiB,OAAO,EAAE;EACX,CAAC;EACDC,MAAM,EAAE;IACNF,IAAI,EAAE,CAACG,MAAM,EAAEP,MAAM,CAAC;IACtBK,OAAO,EAAE;EACX,CAAC;EACDG,cAAc,EAAEN,OAAO;EACvBO,uBAAuB,EAAEP,OAAO;EAChCQ,QAAQ,EAAE;IACRN,IAAI,EAAE,CAACG,MAAM,EAAEP,MAAM,CAAC;IACtBK,OAAO,EAAE,IAAI;IACbM,SAAS,EAAGC,KAAsB,IAAKL,MAAM,CAACK,KAAK,CAAC,GAAG;EACzD,CAAC;EACDC,QAAQ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G,CAAC,IAAIuB,KAAK,CAACe,KAAK,CAACtC,KAAK,CAACuC,MAAM,GAAG;UAAG,QAEtF;QAAA,CAEJ;QACDa,IAAI,EAAExC,KAAK,CAACwC,IAAI;QAChB5B,IAAI,EAAEZ,KAAK,CAACY;MAAI;IAIxB,CAAC,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"VCarousel.mjs","names":["VBtn","VDefaultsProvider","VProgressLinear","makeVWindowProps","VWindow","IconValue","useLocale","useProxiedModel","onMounted","ref","watch","convertToUnit","genericComponent","propsFactory","useRender","makeVCarouselProps","color","String","cycle","Boolean","delimiterIcon","type","default","height","Number","hideDelimiters","hideDelimiterBackground","interval","validator","value","progress","verticalDelimiters","continuous","mandatory","showArrows","VCarousel","name","props","emits","setup","_ref","slots","model","t","windowRef","slideTimeout","restartTimeout","val","window","clearTimeout","startTimeout","setTimeout","group","next","requestAnimationFrame","windowProps","filterProps","_createVNode","_mergeProps","$event","class","style","additional","_ref2","_Fragment","left","right","items","length","icon","size","variant","map","item","index","id","isSelected","onClick","select","undefined","getItemIndex","prev"],"sources":["../../../src/components/VCarousel/VCarousel.tsx"],"sourcesContent":["// Styles\nimport './VCarousel.sass'\n\n// Components\nimport { VBtn } from '@/components/VBtn'\nimport { VDefaultsProvider } from '@/components/VDefaultsProvider'\nimport { VProgressLinear } from '@/components/VProgressLinear'\nimport { makeVWindowProps, VWindow } from '@/components/VWindow/VWindow'\n\n// Composables\nimport { IconValue } from '@/composables/icons'\nimport { useLocale } from '@/composables/locale'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { onMounted, ref, watch } from 'vue'\nimport { convertToUnit, genericComponent, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { VWindowSlots } from '@/components/VWindow/VWindow'\nimport type { GroupProvide } from '@/composables/group'\nimport type { GenericProps } from '@/util'\n\nexport const makeVCarouselProps = propsFactory({\n color: String,\n cycle: Boolean,\n delimiterIcon: {\n type: IconValue,\n default: '$delimiter',\n },\n height: {\n type: [Number, String],\n default: 500,\n },\n hideDelimiters: Boolean,\n hideDelimiterBackground: Boolean,\n interval: {\n type: [Number, String],\n default: 6000,\n validator: (value: string | number) => Number(value) > 0,\n },\n progress: [Boolean, String],\n verticalDelimiters: [Boolean, String] as PropType<boolean | 'left' | 'right'>,\n\n ...makeVWindowProps({\n continuous: true,\n mandatory: 'force' as const,\n showArrows: true,\n }),\n}, 'VCarousel')\n\ntype VCarouselSlots = VWindowSlots & {\n item: {\n props: Record<string, any>\n item: {\n id: number\n value: unknown\n disabled: boolean | undefined\n }\n }\n}\n\nexport const VCarousel = genericComponent<new <T>(\n props: {\n modelValue?: T\n 'onUpdate:modelValue'?: (value: T) => void\n },\n slots: VCarouselSlots,\n) => GenericProps<typeof props, typeof slots>>()({\n name: 'VCarousel',\n\n props: makeVCarouselProps(),\n\n emits: {\n 'update:modelValue': (value: any) => true,\n },\n\n setup (props, { slots }) {\n const model = useProxiedModel(props, 'modelValue')\n const { t } = useLocale()\n const windowRef = ref<typeof VWindow>()\n\n let slideTimeout = -1\n watch(model, restartTimeout)\n watch(() => props.interval, restartTimeout)\n watch(() => props.cycle, val => {\n if (val) restartTimeout()\n else window.clearTimeout(slideTimeout)\n })\n\n onMounted(startTimeout)\n\n function startTimeout () {\n if (!props.cycle || !windowRef.value) return\n\n slideTimeout = window.setTimeout(windowRef.value.group.next, +props.interval > 0 ? +props.interval : 6000)\n }\n\n function restartTimeout () {\n window.clearTimeout(slideTimeout)\n window.requestAnimationFrame(startTimeout)\n }\n\n useRender(() => {\n const windowProps = VWindow.filterProps(props)\n\n return (\n <VWindow\n ref={ windowRef }\n { ...windowProps }\n v-model={ model.value }\n class={[\n 'v-carousel',\n {\n 'v-carousel--hide-delimiter-background': props.hideDelimiterBackground,\n 'v-carousel--vertical-delimiters': props.verticalDelimiters,\n },\n props.class,\n ]}\n style={[\n { height: convertToUnit(props.height) },\n props.style,\n ]}\n >\n {{\n default: slots.default,\n additional: ({ group }: { group: GroupProvide }) => (\n <>\n { !props.hideDelimiters && (\n <div\n class=\"v-carousel__controls\"\n style={{\n left: props.verticalDelimiters === 'left' && props.verticalDelimiters ? 0 : 'auto',\n right: props.verticalDelimiters === 'right' ? 0 : 'auto',\n }}\n >\n { group.items.value.length > 0 && (\n <VDefaultsProvider\n defaults={{\n VBtn: {\n color: props.color,\n icon: props.delimiterIcon,\n size: 'x-small',\n variant: 'text',\n },\n }}\n scoped\n >\n { group.items.value.map((item, index) => {\n const props = {\n id: `carousel-item-${item.id}`,\n 'aria-label': t('$vuetify.carousel.ariaLabel.delimiter', index + 1, group.items.value.length),\n class: [\n 'v-carousel__controls__item',\n group.isSelected(item.id) && 'v-btn--active',\n ],\n onClick: () => group.select(item.id, true),\n }\n\n return slots.item\n ? slots.item({ props, item })\n : (<VBtn { ...item } { ...props } />)\n })}\n </VDefaultsProvider>\n )}\n </div>\n )}\n\n { props.progress && (\n <VProgressLinear\n class=\"v-carousel__progress\"\n color={ typeof props.progress === 'string' ? props.progress : undefined }\n modelValue={ (group.getItemIndex(model.value) + 1) / group.items.value.length * 100 }\n />\n )}\n </>\n ),\n prev: slots.prev,\n next: slots.next,\n }}\n </VWindow>\n )\n })\n\n return {}\n },\n})\n\nexport type VCarousel = InstanceType<typeof VCarousel>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,IAAI;AAAA,SACJC,iBAAiB;AAAA,SACjBC,eAAe;AAAA,SACfC,gBAAgB,EAAEC,OAAO,kCAElC;AAAA,SACSC,SAAS;AAAA,SACTC,SAAS;AAAA,SACTC,eAAe,8CAExB;AACA,SAASC,SAAS,EAAEC,GAAG,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAClCC,aAAa,EAAEC,gBAAgB,EAAEC,YAAY,EAAEC,SAAS,gCAEjE;AAMA,OAAO,MAAMC,kBAAkB,GAAGF,YAAY,CAAC;EAC7CG,KAAK,EAAEC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lC,KAAK,CAACgC,IAAI,GACbhC,KAAK,CAACgC,IAAI,CAAC;gBAAEpC,KAAK;gBAAEoC;cAAK,CAAC,CAAC,GAAAhB,YAAA,CAAAzD,IAAA,EAAA0D,WAAA,CACfe,IAAI,EAAQpC,KAAK,QAAM;YACzC,CAAC,CAAC;UAAA,EAEL,EAEJ,EAECA,KAAK,CAACP,QAAQ,IAAA2B,YAAA,CAAAvD,eAAA;YAAA,SAEN,sBAAsB;YAAA,SACpB,OAAOmC,KAAK,CAACP,QAAQ,KAAK,QAAQ,GAAGO,KAAK,CAACP,QAAQ,GAAGiD,SAAS;YAAA,cAC1D,CAAC3B,KAAK,CAAC4B,YAAY,CAACtC,KAAK,CAACb,KAAK,CAAC,GAAG,CAAC,IAAIuB,KAAK,CAACe,KAAK,CAACtC,KAAK,CAACuC,MAAM,GAAG;UAAG,QAEtF;QAAA,CAEJ;QACDa,IAAI,EAAExC,KAAK,CAACwC,IAAI;QAChB5B,IAAI,EAAEZ,KAAK,CAACY;MAAI;IAIxB,CAAC,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
@use '../../styles/tools'
|
|
1
2
|
@use './variables' as *
|
|
2
3
|
|
|
3
4
|
.v-carousel
|
|
@@ -7,7 +8,6 @@
|
|
|
7
8
|
|
|
8
9
|
&__controls
|
|
9
10
|
align-items: center
|
|
10
|
-
background: $carousel-controls-bg
|
|
11
11
|
bottom: 0
|
|
12
12
|
display: flex
|
|
13
13
|
height: $carousel-controls-size
|
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
width: 100%
|
|
18
18
|
z-index: 1
|
|
19
19
|
|
|
20
|
+
@include tools.theme($carousel-controls-theme...)
|
|
21
|
+
|
|
20
22
|
> .v-item-group
|
|
21
23
|
flex: 0 1 auto
|
|
22
24
|
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
// VCarousel
|
|
2
2
|
$carousel-controls-bg: rgba(var(--v-theme-surface-variant), .3) !default;
|
|
3
|
+
$carousel-controls-color: rgb(var(--v-theme-on-surface-variant)) !default;
|
|
3
4
|
$carousel-controls-size: 50px !default;
|
|
4
5
|
$carousel-dot-margin: 0 8px !default;
|
|
5
6
|
$carousel-dot-inactive-opacity: .5 !default;
|
|
6
7
|
$carousel-dot-active-opacity: 1 !default;
|
|
7
8
|
$carousel-dot-hover-opacity: .8 !default;
|
|
9
|
+
|
|
10
|
+
$carousel-controls-theme: (
|
|
11
|
+
$carousel-controls-bg,
|
|
12
|
+
$carousel-controls-color
|
|
13
|
+
) !default;
|