@vuetify/nightly 3.7.5-dev.2024-12-03 → 3.7.5-dev.2024-12-16
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 +3779 -3779
- package/dist/json/importMap-labs.json +20 -20
- package/dist/json/importMap.json +136 -136
- package/dist/json/web-types.json +7026 -7026
- package/dist/vuetify-labs.css +4372 -4372
- package/dist/vuetify-labs.d.ts +40 -40
- package/dist/vuetify-labs.esm.js +21 -38
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +20 -37
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +4189 -4189
- package/dist/vuetify.d.ts +92 -92
- package/dist/vuetify.esm.js +21 -38
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +20 -37
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +876 -881
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VAppBar/index.d.mts +6 -6
- package/lib/components/VAutocomplete/index.d.mts +6 -6
- package/lib/components/VBtn/index.d.mts +7 -7
- package/lib/components/VBtnToggle/index.d.mts +9 -9
- package/lib/components/VCarousel/VCarousel.mjs.map +1 -1
- package/lib/components/VCarousel/index.d.mts +9 -9
- package/lib/components/VCheckbox/VCheckbox.mjs +3 -3
- package/lib/components/VCheckbox/VCheckbox.mjs.map +1 -1
- package/lib/components/VChipGroup/VChipGroup.mjs.map +1 -1
- package/lib/components/VChipGroup/index.d.mts +15 -15
- package/lib/components/VCombobox/index.d.mts +6 -6
- package/lib/components/VExpansionPanel/index.d.mts +7 -7
- package/lib/components/VFab/index.d.mts +6 -6
- package/lib/components/VField/VField.mjs +3 -3
- package/lib/components/VField/VField.mjs.map +1 -1
- package/lib/components/VInput/VInput.mjs +3 -3
- package/lib/components/VInput/VInput.mjs.map +1 -1
- package/lib/components/VItemGroup/VItemGroup.mjs.map +1 -1
- package/lib/components/VItemGroup/index.d.mts +9 -9
- package/lib/components/VMenu/VMenu.mjs +3 -3
- package/lib/components/VMenu/VMenu.mjs.map +1 -1
- package/lib/components/VMenu/index.d.mts +6 -6
- package/lib/components/VRadioGroup/VRadioGroup.mjs +3 -3
- package/lib/components/VRadioGroup/VRadioGroup.mjs.map +1 -1
- package/lib/components/VRating/VRating.mjs +4 -3
- package/lib/components/VRating/VRating.mjs.map +1 -1
- package/lib/components/VSelect/index.d.mts +6 -6
- package/lib/components/VSelectionControl/VSelectionControl.mjs +3 -3
- package/lib/components/VSelectionControl/VSelectionControl.mjs.map +1 -1
- package/lib/components/VSelectionControlGroup/VSelectionControlGroup.mjs +3 -3
- package/lib/components/VSelectionControlGroup/VSelectionControlGroup.mjs.map +1 -1
- package/lib/components/VSlideGroup/index.d.mts +10 -10
- package/lib/components/VSparkline/VBarline.mjs +3 -3
- package/lib/components/VSparkline/VBarline.mjs.map +1 -1
- package/lib/components/VSparkline/VTrendline.mjs +3 -3
- package/lib/components/VSparkline/VTrendline.mjs.map +1 -1
- package/lib/components/VSwitch/VSwitch.mjs +3 -3
- package/lib/components/VSwitch/VSwitch.mjs.map +1 -1
- package/lib/components/VTabs/index.d.mts +7 -7
- package/lib/components/VTooltip/VTooltip.mjs +3 -3
- package/lib/components/VTooltip/VTooltip.mjs.map +1 -1
- package/lib/components/VWindow/index.d.mts +7 -7
- package/lib/components/index.d.mts +40 -40
- package/lib/composables/group.mjs +3 -3
- package/lib/composables/group.mjs.map +1 -1
- package/lib/composables/layout.mjs +3 -3
- package/lib/composables/layout.mjs.map +1 -1
- package/lib/composables/nested/nested.mjs +2 -2
- package/lib/composables/nested/nested.mjs.map +1 -1
- package/lib/composables/validation.mjs +3 -3
- package/lib/composables/validation.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/framework.mjs +2 -3
- package/lib/framework.mjs.map +1 -1
- package/lib/index.d.mts +52 -52
- package/lib/util/getCurrentInstance.mjs +1 -15
- package/lib/util/getCurrentInstance.mjs.map +1 -1
- package/package.json +1 -1
@@ -419,22 +419,22 @@ type IconValue = string | (string | [path: string, opacity: number])[] | JSXComp
|
|
419
419
|
declare const IconValue: PropType<IconValue>;
|
420
420
|
|
421
421
|
interface GroupItem {
|
422
|
-
id:
|
422
|
+
id: string;
|
423
423
|
value: Ref<unknown>;
|
424
424
|
disabled: Ref<boolean | undefined>;
|
425
425
|
useIndexAsValue?: boolean;
|
426
426
|
}
|
427
427
|
interface GroupProvide {
|
428
428
|
register: (item: GroupItem, cmp: ComponentInternalInstance) => void;
|
429
|
-
unregister: (id:
|
430
|
-
select: (id:
|
431
|
-
selected: Ref<Readonly<
|
432
|
-
isSelected: (id:
|
429
|
+
unregister: (id: string) => void;
|
430
|
+
select: (id: string, value: boolean) => void;
|
431
|
+
selected: Ref<Readonly<string[]>>;
|
432
|
+
isSelected: (id: string) => boolean;
|
433
433
|
prev: () => void;
|
434
434
|
next: () => void;
|
435
435
|
selectedClass: Ref<string | undefined>;
|
436
436
|
items: ComputedRef<{
|
437
|
-
id:
|
437
|
+
id: string;
|
438
438
|
value: unknown;
|
439
439
|
disabled: boolean | undefined;
|
440
440
|
}[]>;
|
@@ -988,7 +988,7 @@ declare const VMenu: {
|
|
988
988
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
989
989
|
}, {
|
990
990
|
id: vue.ComputedRef<string>;
|
991
|
-
ΨopenChildren: vue.ShallowRef<Set<
|
991
|
+
ΨopenChildren: vue.ShallowRef<Set<string>, Set<string>>;
|
992
992
|
} & Omit<Omit<{
|
993
993
|
$: vue.ComponentInternalInstance;
|
994
994
|
$data: {};
|
@@ -1401,7 +1401,7 @@ declare const VMenu: {
|
|
1401
1401
|
updateLocation: vue.Ref<((e: Event) => void) | undefined, ((e: Event) => void) | undefined>;
|
1402
1402
|
} | {
|
1403
1403
|
id: vue.ComputedRef<string>;
|
1404
|
-
ΨopenChildren: vue.ShallowRef<Set<
|
1404
|
+
ΨopenChildren: vue.ShallowRef<Set<string>, Set<string>>;
|
1405
1405
|
};
|
1406
1406
|
}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
1407
1407
|
'update:modelValue': (value: boolean) => true;
|
@@ -1534,7 +1534,7 @@ declare const VMenu: {
|
|
1534
1534
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
1535
1535
|
}, {
|
1536
1536
|
id: vue.ComputedRef<string>;
|
1537
|
-
ΨopenChildren: vue.ShallowRef<Set<
|
1537
|
+
ΨopenChildren: vue.ShallowRef<Set<string>, Set<string>>;
|
1538
1538
|
} & Omit<Omit<{
|
1539
1539
|
$: vue.ComponentInternalInstance;
|
1540
1540
|
$data: {};
|
@@ -1947,7 +1947,7 @@ declare const VMenu: {
|
|
1947
1947
|
updateLocation: vue.Ref<((e: Event) => void) | undefined, ((e: Event) => void) | undefined>;
|
1948
1948
|
} | {
|
1949
1949
|
id: vue.ComputedRef<string>;
|
1950
|
-
ΨopenChildren: vue.ShallowRef<Set<
|
1950
|
+
ΨopenChildren: vue.ShallowRef<Set<string>, Set<string>>;
|
1951
1951
|
};
|
1952
1952
|
}, {}, {}, {}, {
|
1953
1953
|
location: Anchor | undefined;
|
@@ -2066,7 +2066,7 @@ declare const VMenu: {
|
|
2066
2066
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
2067
2067
|
}, {
|
2068
2068
|
id: vue.ComputedRef<string>;
|
2069
|
-
ΨopenChildren: vue.ShallowRef<Set<
|
2069
|
+
ΨopenChildren: vue.ShallowRef<Set<string>, Set<string>>;
|
2070
2070
|
} & Omit<Omit<{
|
2071
2071
|
$: vue.ComponentInternalInstance;
|
2072
2072
|
$data: {};
|
@@ -2479,7 +2479,7 @@ declare const VMenu: {
|
|
2479
2479
|
updateLocation: vue.Ref<((e: Event) => void) | undefined, ((e: Event) => void) | undefined>;
|
2480
2480
|
} | {
|
2481
2481
|
id: vue.ComputedRef<string>;
|
2482
|
-
ΨopenChildren: vue.ShallowRef<Set<
|
2482
|
+
ΨopenChildren: vue.ShallowRef<Set<string>, Set<string>>;
|
2483
2483
|
};
|
2484
2484
|
}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
2485
2485
|
'update:modelValue': (value: boolean) => true;
|
@@ -16,22 +16,22 @@ interface FilterPropsOptions<PropsOptions extends Readonly<ComponentPropsOptions
|
|
16
16
|
}
|
17
17
|
|
18
18
|
interface GroupItem {
|
19
|
-
id:
|
19
|
+
id: string;
|
20
20
|
value: Ref<unknown>;
|
21
21
|
disabled: Ref<boolean | undefined>;
|
22
22
|
useIndexAsValue?: boolean;
|
23
23
|
}
|
24
24
|
interface GroupProvide {
|
25
25
|
register: (item: GroupItem, cmp: ComponentInternalInstance) => void;
|
26
|
-
unregister: (id:
|
27
|
-
select: (id:
|
28
|
-
selected: Ref<Readonly<
|
29
|
-
isSelected: (id:
|
26
|
+
unregister: (id: string) => void;
|
27
|
+
select: (id: string, value: boolean) => void;
|
28
|
+
selected: Ref<Readonly<string[]>>;
|
29
|
+
isSelected: (id: string) => boolean;
|
30
30
|
prev: () => void;
|
31
31
|
next: () => void;
|
32
32
|
selectedClass: Ref<string | undefined>;
|
33
33
|
items: ComputedRef<{
|
34
|
-
id:
|
34
|
+
id: string;
|
35
35
|
value: unknown;
|
36
36
|
disabled: boolean | undefined;
|
37
37
|
}[]>;
|
@@ -39,7 +39,7 @@ interface GroupProvide {
|
|
39
39
|
getItemIndex: (value: unknown) => number;
|
40
40
|
}
|
41
41
|
interface GroupItemProvide {
|
42
|
-
id:
|
42
|
+
id: string;
|
43
43
|
isSelected: Ref<boolean>;
|
44
44
|
isFirst: Ref<boolean>;
|
45
45
|
isLast: Ref<boolean>;
|
@@ -38,22 +38,22 @@ declare const allowedVariants: readonly ["elevated", "flat", "tonal", "outlined"
|
|
38
38
|
type Variant = typeof allowedVariants[number];
|
39
39
|
|
40
40
|
interface GroupItem {
|
41
|
-
id:
|
41
|
+
id: string;
|
42
42
|
value: Ref<unknown>;
|
43
43
|
disabled: Ref<boolean | undefined>;
|
44
44
|
useIndexAsValue?: boolean;
|
45
45
|
}
|
46
46
|
interface GroupProvide {
|
47
47
|
register: (item: GroupItem, cmp: ComponentInternalInstance) => void;
|
48
|
-
unregister: (id:
|
49
|
-
select: (id:
|
50
|
-
selected: Ref<Readonly<
|
51
|
-
isSelected: (id:
|
48
|
+
unregister: (id: string) => void;
|
49
|
+
select: (id: string, value: boolean) => void;
|
50
|
+
selected: Ref<Readonly<string[]>>;
|
51
|
+
isSelected: (id: string) => boolean;
|
52
52
|
prev: () => void;
|
53
53
|
next: () => void;
|
54
54
|
selectedClass: Ref<string | undefined>;
|
55
55
|
items: ComputedRef<{
|
56
|
-
id:
|
56
|
+
id: string;
|
57
57
|
value: unknown;
|
58
58
|
disabled: boolean | undefined;
|
59
59
|
}[]>;
|
@@ -91,7 +91,7 @@ declare const VBtnToggle: {
|
|
91
91
|
} & {}, {
|
92
92
|
next: () => void;
|
93
93
|
prev: () => void;
|
94
|
-
select: (id:
|
94
|
+
select: (id: string, value: boolean) => void;
|
95
95
|
}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Omit<{
|
96
96
|
'update:modelValue': (value: any) => true;
|
97
97
|
}, "$children" | "v-slots" | "v-slot:default" | "modelValue" | "update:modelValue">, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, {
|
@@ -136,7 +136,7 @@ declare const VBtnToggle: {
|
|
136
136
|
} & {}, {
|
137
137
|
next: () => void;
|
138
138
|
prev: () => void;
|
139
|
-
select: (id:
|
139
|
+
select: (id: string, value: boolean) => void;
|
140
140
|
}, {}, {}, {}, {
|
141
141
|
variant: "flat" | "text" | "elevated" | "tonal" | "outlined" | "plain";
|
142
142
|
style: vue.StyleValue;
|
@@ -174,7 +174,7 @@ declare const VBtnToggle: {
|
|
174
174
|
} & {}, {
|
175
175
|
next: () => void;
|
176
176
|
prev: () => void;
|
177
|
-
select: (id:
|
177
|
+
select: (id: string, value: boolean) => void;
|
178
178
|
}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Omit<{
|
179
179
|
'update:modelValue': (value: any) => true;
|
180
180
|
}, "$children" | "v-slots" | "v-slot:default" | "modelValue" | "update:modelValue">, string, {
|
@@ -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<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,MAAM;EACbC,KAAK,EAAEC,OAAO;EACd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I,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;YAAA,SAGJ,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","ignoreList":[]}
|
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: string\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<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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,KAAK;cACvC,MAAMrC,KAAK,GAAG;gBACZsC,EAAE,EAAE,iBAAiBF,IAAI,CAACE,EAAE,EAAE;gBAC9B,YAAY,EAAEhC,CAAC,CAAC,uCAAuC,EAAE+B,KAAK,GAAG,CAAC,EAAEtB,KAAK,CAACe,KAAK,CAACtC,KAAK,CAACuC,MAAM,CAAC;gBAC7FR,KAAK,EAAE,CACL,4BAA4B,EAC5BR,KAAK,CAACwB,UAAU,CAACH,IAAI,CAACE,EAAE,CAAC,IAAI,eAAe,CAC7C;gBACDE,OAAO,EAAEA,CAAA,KAAMzB,KAAK,CAAC0B,MAAM,CAACL,IAAI,CAACE,EAAE,EAAE,IAAI;cAC3C,CAAC;cAED,OAAOlC,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;YAAA,SAGJ,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","ignoreList":[]}
|
@@ -65,22 +65,22 @@ type IconValue = string | (string | [path: string, opacity: number])[] | JSXComp
|
|
65
65
|
declare const IconValue: PropType<IconValue>;
|
66
66
|
|
67
67
|
interface GroupItem {
|
68
|
-
id:
|
68
|
+
id: string;
|
69
69
|
value: Ref<unknown>;
|
70
70
|
disabled: Ref<boolean | undefined>;
|
71
71
|
useIndexAsValue?: boolean;
|
72
72
|
}
|
73
73
|
interface GroupProvide {
|
74
74
|
register: (item: GroupItem, cmp: ComponentInternalInstance) => void;
|
75
|
-
unregister: (id:
|
76
|
-
select: (id:
|
77
|
-
selected: Ref<Readonly<
|
78
|
-
isSelected: (id:
|
75
|
+
unregister: (id: string) => void;
|
76
|
+
select: (id: string, value: boolean) => void;
|
77
|
+
selected: Ref<Readonly<string[]>>;
|
78
|
+
isSelected: (id: string) => boolean;
|
79
79
|
prev: () => void;
|
80
80
|
next: () => void;
|
81
81
|
selectedClass: Ref<string | undefined>;
|
82
82
|
items: ComputedRef<{
|
83
|
-
id:
|
83
|
+
id: string;
|
84
84
|
value: unknown;
|
85
85
|
disabled: boolean | undefined;
|
86
86
|
}[]>;
|
@@ -113,7 +113,7 @@ type VCarouselSlots = VWindowSlots & {
|
|
113
113
|
item: {
|
114
114
|
props: Record<string, any>;
|
115
115
|
item: {
|
116
|
-
id:
|
116
|
+
id: string;
|
117
117
|
value: unknown;
|
118
118
|
disabled: boolean | undefined;
|
119
119
|
};
|
@@ -192,7 +192,7 @@ declare const VCarousel: {
|
|
192
192
|
item: (arg: {
|
193
193
|
props: Record<string, any>;
|
194
194
|
item: {
|
195
|
-
id:
|
195
|
+
id: string;
|
196
196
|
value: unknown;
|
197
197
|
disabled: boolean | undefined;
|
198
198
|
};
|
@@ -324,7 +324,7 @@ declare const VCarousel: {
|
|
324
324
|
item: (arg: {
|
325
325
|
props: Record<string, any>;
|
326
326
|
item: {
|
327
|
-
id:
|
327
|
+
id: string;
|
328
328
|
value: unknown;
|
329
329
|
disabled: boolean | undefined;
|
330
330
|
};
|
@@ -7,8 +7,8 @@ import { makeVCheckboxBtnProps, VCheckboxBtn } from "./VCheckboxBtn.mjs";
|
|
7
7
|
import { makeVInputProps, VInput } from "../VInput/VInput.mjs"; // Composables
|
8
8
|
import { useFocus } from "../../composables/focus.mjs";
|
9
9
|
import { useProxiedModel } from "../../composables/proxiedModel.mjs"; // Utilities
|
10
|
-
import { computed } from 'vue';
|
11
|
-
import { filterInputAttrs, genericComponent,
|
10
|
+
import { computed, useId } from 'vue';
|
11
|
+
import { filterInputAttrs, genericComponent, omit, propsFactory, useRender } from "../../util/index.mjs"; // Types
|
12
12
|
export const makeVCheckboxProps = propsFactory({
|
13
13
|
...makeVInputProps(),
|
14
14
|
...omit(makeVCheckboxBtnProps(), ['inline'])
|
@@ -32,7 +32,7 @@ export const VCheckbox = genericComponent()({
|
|
32
32
|
focus,
|
33
33
|
blur
|
34
34
|
} = useFocus(props);
|
35
|
-
const uid =
|
35
|
+
const uid = useId();
|
36
36
|
const id = computed(() => props.id || `checkbox-${uid}`);
|
37
37
|
useRender(() => {
|
38
38
|
const [rootAttrs, controlAttrs] = filterInputAttrs(attrs);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"VCheckbox.mjs","names":["makeVCheckboxBtnProps","VCheckboxBtn","makeVInputProps","VInput","useFocus","useProxiedModel","computed","
|
1
|
+
{"version":3,"file":"VCheckbox.mjs","names":["makeVCheckboxBtnProps","VCheckboxBtn","makeVInputProps","VInput","useFocus","useProxiedModel","computed","useId","filterInputAttrs","genericComponent","omit","propsFactory","useRender","makeVCheckboxProps","VCheckbox","name","inheritAttrs","props","emits","value","focused","setup","_ref","attrs","slots","model","isFocused","focus","blur","uid","id","rootAttrs","controlAttrs","inputProps","filterProps","checkboxProps","_createVNode","_mergeProps","class","$event","style","default","_ref2","messagesId","isDisabled","isReadonly","isValid"],"sources":["../../../src/components/VCheckbox/VCheckbox.tsx"],"sourcesContent":["// Styles\nimport './VCheckbox.sass'\n\n// Components\nimport { makeVCheckboxBtnProps, VCheckboxBtn } from './VCheckboxBtn'\nimport { makeVInputProps, VInput } from '@/components/VInput/VInput'\n\n// Composables\nimport { useFocus } from '@/composables/focus'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, useId } from 'vue'\nimport { filterInputAttrs, genericComponent, omit, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { VSelectionControlSlots } from '../VSelectionControl/VSelectionControl'\nimport type { VInputSlots } from '@/components/VInput/VInput'\nimport type { GenericProps } from '@/util'\n\nexport type VCheckboxSlots = Omit<VInputSlots, 'default'> & VSelectionControlSlots\n\nexport const makeVCheckboxProps = propsFactory({\n ...makeVInputProps(),\n ...omit(makeVCheckboxBtnProps(), ['inline']),\n}, 'VCheckbox')\n\nexport const VCheckbox = genericComponent<new <T>(\n props: {\n modelValue?: T | null\n 'onUpdate:modelValue'?: (value: T | null) => void\n },\n slots: VCheckboxSlots,\n) => GenericProps<typeof props, typeof slots>>()({\n name: 'VCheckbox',\n\n inheritAttrs: false,\n\n props: makeVCheckboxProps(),\n\n emits: {\n 'update:modelValue': (value: any) => true,\n 'update:focused': (focused: boolean) => true,\n },\n\n setup (props, { attrs, slots }) {\n const model = useProxiedModel(props, 'modelValue')\n const { isFocused, focus, blur } = useFocus(props)\n\n const uid = useId()\n const id = computed(() => props.id || `checkbox-${uid}`)\n\n useRender(() => {\n const [rootAttrs, controlAttrs] = filterInputAttrs(attrs)\n const inputProps = VInput.filterProps(props)\n const checkboxProps = VCheckboxBtn.filterProps(props)\n\n return (\n <VInput\n class={[\n 'v-checkbox',\n props.class,\n ]}\n { ...rootAttrs }\n { ...inputProps }\n v-model={ model.value }\n id={ id.value }\n focused={ isFocused.value }\n style={ props.style }\n >\n {{\n ...slots,\n default: ({\n id,\n messagesId,\n isDisabled,\n isReadonly,\n isValid,\n }) => (\n <VCheckboxBtn\n { ...checkboxProps }\n id={ id.value }\n aria-describedby={ messagesId.value }\n disabled={ isDisabled.value }\n readonly={ isReadonly.value }\n { ...controlAttrs }\n error={ isValid.value === false }\n v-model={ model.value }\n onFocus={ focus }\n onBlur={ blur }\n v-slots={ slots }\n />\n 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","makeComponentProps","provideDefaults","makeGroupProps","useGroup","makeTagProps","makeThemeProps","provideTheme","makeVariantProps","toRef","deepEqual","genericComponent","propsFactory","useRender","VChipGroupSymbol","Symbol","for","makeVChipGroupProps","baseColor","String","column","Boolean","filter","valueComparator","type","Function","default","selectedClass","variant","VChipGroup","name","props","emits","value","setup","_ref","slots","themeClasses","isSelected","select","next","prev","selected","VChip","color","disabled","slideGroupProps","filterProps","_createVNode","_mergeProps","class","style"],"sources":["../../../src/components/VChipGroup/VChipGroup.tsx"],"sourcesContent":["// Styles\nimport './VChipGroup.sass'\n\n// Components\nimport { makeVSlideGroupProps, VSlideGroup } from '@/components/VSlideGroup/VSlideGroup'\n\n// Composables\nimport { makeComponentProps } from '@/composables/component'\nimport { provideDefaults } from '@/composables/defaults'\nimport { makeGroupProps, useGroup } from '@/composables/group'\nimport { makeTagProps } from '@/composables/tag'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\nimport { makeVariantProps } from '@/composables/variant'\n\n// Utilities\nimport { toRef } from 'vue'\nimport { deepEqual, genericComponent, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { GenericProps } from '@/util'\n\nexport const VChipGroupSymbol = Symbol.for('vuetify:v-chip-group')\n\nexport const makeVChipGroupProps = propsFactory({\n baseColor: String,\n column: Boolean,\n filter: Boolean,\n valueComparator: {\n type: Function as PropType<typeof deepEqual>,\n default: deepEqual,\n },\n\n ...makeVSlideGroupProps(),\n ...makeComponentProps(),\n ...makeGroupProps({ selectedClass: 'v-chip--selected' }),\n ...makeTagProps(),\n ...makeThemeProps(),\n ...makeVariantProps({ variant: 'tonal' } as const),\n}, 'VChipGroup')\n\ntype VChipGroupSlots = {\n default: {\n isSelected: (id:
|
1
|
+
{"version":3,"file":"VChipGroup.mjs","names":["makeVSlideGroupProps","VSlideGroup","makeComponentProps","provideDefaults","makeGroupProps","useGroup","makeTagProps","makeThemeProps","provideTheme","makeVariantProps","toRef","deepEqual","genericComponent","propsFactory","useRender","VChipGroupSymbol","Symbol","for","makeVChipGroupProps","baseColor","String","column","Boolean","filter","valueComparator","type","Function","default","selectedClass","variant","VChipGroup","name","props","emits","value","setup","_ref","slots","themeClasses","isSelected","select","next","prev","selected","VChip","color","disabled","slideGroupProps","filterProps","_createVNode","_mergeProps","class","style"],"sources":["../../../src/components/VChipGroup/VChipGroup.tsx"],"sourcesContent":["// Styles\nimport './VChipGroup.sass'\n\n// Components\nimport { makeVSlideGroupProps, VSlideGroup } from '@/components/VSlideGroup/VSlideGroup'\n\n// Composables\nimport { makeComponentProps } from '@/composables/component'\nimport { provideDefaults } from '@/composables/defaults'\nimport { makeGroupProps, useGroup } from '@/composables/group'\nimport { makeTagProps } from '@/composables/tag'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\nimport { makeVariantProps } from '@/composables/variant'\n\n// Utilities\nimport { toRef } from 'vue'\nimport { deepEqual, genericComponent, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { GenericProps } from '@/util'\n\nexport const VChipGroupSymbol = Symbol.for('vuetify:v-chip-group')\n\nexport const makeVChipGroupProps = propsFactory({\n baseColor: String,\n column: Boolean,\n filter: Boolean,\n valueComparator: {\n type: Function as PropType<typeof deepEqual>,\n default: deepEqual,\n },\n\n ...makeVSlideGroupProps(),\n ...makeComponentProps(),\n ...makeGroupProps({ selectedClass: 'v-chip--selected' }),\n ...makeTagProps(),\n ...makeThemeProps(),\n ...makeVariantProps({ variant: 'tonal' } as const),\n}, 'VChipGroup')\n\ntype VChipGroupSlots = {\n default: {\n isSelected: (id: string) => boolean\n select: (id: string, value: boolean) => void\n next: () => void\n prev: () => void\n selected: readonly string[]\n }\n}\n\nexport const VChipGroup = genericComponent<new <T>(\n props: {\n modelValue?: T\n 'onUpdate:modelValue'?: (value: T) => void\n },\n slots: VChipGroupSlots,\n) => GenericProps<typeof props, typeof slots>>()({\n name: 'VChipGroup',\n\n props: makeVChipGroupProps(),\n\n emits: {\n 'update:modelValue': (value: any) => true,\n },\n\n setup (props, { slots }) {\n const { themeClasses } = provideTheme(props)\n const { isSelected, select, next, prev, selected } = useGroup(props, VChipGroupSymbol)\n\n provideDefaults({\n VChip: {\n baseColor: toRef(props, 'baseColor'),\n color: toRef(props, 'color'),\n disabled: toRef(props, 'disabled'),\n filter: toRef(props, 'filter'),\n variant: toRef(props, 'variant'),\n },\n })\n\n useRender(() => {\n const slideGroupProps = VSlideGroup.filterProps(props)\n\n return (\n <VSlideGroup\n { ...slideGroupProps }\n class={[\n 'v-chip-group',\n {\n 'v-chip-group--column': props.column,\n },\n themeClasses.value,\n props.class,\n ]}\n style={ props.style }\n >\n { slots.default?.({\n isSelected,\n select,\n next,\n prev,\n selected: selected.value,\n })}\n </VSlideGroup>\n )\n })\n\n return {}\n },\n})\n\nexport type VChipGroup = InstanceType<typeof VChipGroup>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,oBAAoB,EAAEC,WAAW,0CAE1C;AAAA,SACSC,kBAAkB;AAAA,SAClBC,eAAe;AAAA,SACfC,cAAc,EAAEC,QAAQ;AAAA,SACxBC,YAAY;AAAA,SACZC,cAAc,EAAEC,YAAY;AAAA,SAC5BC,gBAAgB,yCAEzB;AACA,SAASC,KAAK,QAAQ,KAAK;AAAA,SAClBC,SAAS,EAAEC,gBAAgB,EAAEC,YAAY,EAAEC,SAAS,gCAE7D;AAIA,OAAO,MAAMC,gBAAgB,GAAGC,MAAM,CAACC,GAAG,CAAC,sBAAsB,CAAC;AAElE,OAAO,MAAMC,mBAAmB,GAAGL,YAAY,CAAC;EAC9CM,SAAS,EAAEC,MAAM;EACjBC,MAAM,EAAEC,OAAO;EACfC,MAAM,EAAED,OAAO;EACfE,eAAe,EAAE;IACfC,IAAI,EAAEC,QAAsC;IAC5CC,OAAO,EAAEhB;EACX,CAAC;EAED,GAAGX,oBAAoB,CAAC,CAAC;EACzB,GAAGE,kBAAkB,CAAC,CAAC;EACvB,GAAGE,cAAc,CAAC;IAA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EAAEf,KAAK,CAACX;QAChC,CAAC,EACDiB,YAAY,CAACJ,KAAK,EAClBF,KAAK,CAACmB,KAAK,CACZ;QAAA,SACOnB,KAAK,CAACoB;MAAK;QAAAzB,OAAA,EAAAA,CAAA,MAEjBU,KAAK,CAACV,OAAO,GAAG;UAChBY,UAAU;UACVC,MAAM;UACNC,IAAI;UACJC,IAAI;UACJC,QAAQ,EAAEA,QAAQ,CAACT;QACrB,CAAC,CAAC;MAAA;IAGR,CAAC,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC","ignoreList":[]}
|
@@ -41,22 +41,22 @@ type IconValue = string | (string | [path: string, opacity: number])[] | JSXComp
|
|
41
41
|
declare const IconValue: PropType<IconValue>;
|
42
42
|
|
43
43
|
interface GroupItem {
|
44
|
-
id:
|
44
|
+
id: string;
|
45
45
|
value: Ref<unknown>;
|
46
46
|
disabled: Ref<boolean | undefined>;
|
47
47
|
useIndexAsValue?: boolean;
|
48
48
|
}
|
49
49
|
interface GroupProvide {
|
50
50
|
register: (item: GroupItem, cmp: ComponentInternalInstance) => void;
|
51
|
-
unregister: (id:
|
52
|
-
select: (id:
|
53
|
-
selected: Ref<Readonly<
|
54
|
-
isSelected: (id:
|
51
|
+
unregister: (id: string) => void;
|
52
|
+
select: (id: string, value: boolean) => void;
|
53
|
+
selected: Ref<Readonly<string[]>>;
|
54
|
+
isSelected: (id: string) => boolean;
|
55
55
|
prev: () => void;
|
56
56
|
next: () => void;
|
57
57
|
selectedClass: Ref<string | undefined>;
|
58
58
|
items: ComputedRef<{
|
59
|
-
id:
|
59
|
+
id: string;
|
60
60
|
value: unknown;
|
61
61
|
disabled: boolean | undefined;
|
62
62
|
}[]>;
|
@@ -73,11 +73,11 @@ type Variant = typeof allowedVariants[number];
|
|
73
73
|
|
74
74
|
type VChipGroupSlots = {
|
75
75
|
default: {
|
76
|
-
isSelected: (id:
|
77
|
-
select: (id:
|
76
|
+
isSelected: (id: string) => boolean;
|
77
|
+
select: (id: string, value: boolean) => void;
|
78
78
|
next: () => void;
|
79
79
|
prev: () => void;
|
80
|
-
selected: readonly
|
80
|
+
selected: readonly string[];
|
81
81
|
};
|
82
82
|
};
|
83
83
|
declare const VChipGroup: {
|
@@ -126,11 +126,11 @@ declare const VChipGroup: {
|
|
126
126
|
prevIcon: IconValue;
|
127
127
|
}, true, {}, vue.SlotsType<Partial<{
|
128
128
|
default: (arg: {
|
129
|
-
isSelected: (id:
|
130
|
-
select: (id:
|
129
|
+
isSelected: (id: string) => boolean;
|
130
|
+
select: (id: string, value: boolean) => void;
|
131
131
|
next: () => void;
|
132
132
|
prev: () => void;
|
133
|
-
selected: readonly
|
133
|
+
selected: readonly string[];
|
134
134
|
}) => vue.VNode[];
|
135
135
|
}>>, vue.GlobalComponents, vue.GlobalDirectives, string, {}, any, vue.ComponentProvideOptions, {
|
136
136
|
P: {};
|
@@ -229,11 +229,11 @@ declare const VChipGroup: {
|
|
229
229
|
prevIcon: IconValue;
|
230
230
|
}, {}, string, vue.SlotsType<Partial<{
|
231
231
|
default: (arg: {
|
232
|
-
isSelected: (id:
|
233
|
-
select: (id:
|
232
|
+
isSelected: (id: string) => boolean;
|
233
|
+
select: (id: string, value: boolean) => void;
|
234
234
|
next: () => void;
|
235
235
|
prev: () => void;
|
236
|
-
selected: readonly
|
236
|
+
selected: readonly string[];
|
237
237
|
}) => vue.VNode[];
|
238
238
|
}>>, vue.GlobalComponents, vue.GlobalDirectives, string, vue.ComponentProvideOptions> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & (new <T>(props: {
|
239
239
|
modelValue?: T;
|
@@ -988,7 +988,7 @@ declare const VMenu: {
|
|
988
988
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
989
989
|
}, {
|
990
990
|
id: vue.ComputedRef<string>;
|
991
|
-
ΨopenChildren: vue.ShallowRef<Set<
|
991
|
+
ΨopenChildren: vue.ShallowRef<Set<string>, Set<string>>;
|
992
992
|
} & Omit<Omit<{
|
993
993
|
$: vue.ComponentInternalInstance;
|
994
994
|
$data: {};
|
@@ -1401,7 +1401,7 @@ declare const VMenu: {
|
|
1401
1401
|
updateLocation: vue.Ref<((e: Event) => void) | undefined, ((e: Event) => void) | undefined>;
|
1402
1402
|
} | {
|
1403
1403
|
id: vue.ComputedRef<string>;
|
1404
|
-
ΨopenChildren: vue.ShallowRef<Set<
|
1404
|
+
ΨopenChildren: vue.ShallowRef<Set<string>, Set<string>>;
|
1405
1405
|
};
|
1406
1406
|
}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
1407
1407
|
'update:modelValue': (value: boolean) => true;
|
@@ -1534,7 +1534,7 @@ declare const VMenu: {
|
|
1534
1534
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
1535
1535
|
}, {
|
1536
1536
|
id: vue.ComputedRef<string>;
|
1537
|
-
ΨopenChildren: vue.ShallowRef<Set<
|
1537
|
+
ΨopenChildren: vue.ShallowRef<Set<string>, Set<string>>;
|
1538
1538
|
} & Omit<Omit<{
|
1539
1539
|
$: vue.ComponentInternalInstance;
|
1540
1540
|
$data: {};
|
@@ -1947,7 +1947,7 @@ declare const VMenu: {
|
|
1947
1947
|
updateLocation: vue.Ref<((e: Event) => void) | undefined, ((e: Event) => void) | undefined>;
|
1948
1948
|
} | {
|
1949
1949
|
id: vue.ComputedRef<string>;
|
1950
|
-
ΨopenChildren: vue.ShallowRef<Set<
|
1950
|
+
ΨopenChildren: vue.ShallowRef<Set<string>, Set<string>>;
|
1951
1951
|
};
|
1952
1952
|
}, {}, {}, {}, {
|
1953
1953
|
location: Anchor | undefined;
|
@@ -2066,7 +2066,7 @@ declare const VMenu: {
|
|
2066
2066
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
2067
2067
|
}, {
|
2068
2068
|
id: vue.ComputedRef<string>;
|
2069
|
-
ΨopenChildren: vue.ShallowRef<Set<
|
2069
|
+
ΨopenChildren: vue.ShallowRef<Set<string>, Set<string>>;
|
2070
2070
|
} & Omit<Omit<{
|
2071
2071
|
$: vue.ComponentInternalInstance;
|
2072
2072
|
$data: {};
|
@@ -2479,7 +2479,7 @@ declare const VMenu: {
|
|
2479
2479
|
updateLocation: vue.Ref<((e: Event) => void) | undefined, ((e: Event) => void) | undefined>;
|
2480
2480
|
} | {
|
2481
2481
|
id: vue.ComputedRef<string>;
|
2482
|
-
ΨopenChildren: vue.ShallowRef<Set<
|
2482
|
+
ΨopenChildren: vue.ShallowRef<Set<string>, Set<string>>;
|
2483
2483
|
};
|
2484
2484
|
}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
2485
2485
|
'update:modelValue': (value: boolean) => true;
|
@@ -351,22 +351,22 @@ declare const VExpansionPanels: {
|
|
351
351
|
type VExpansionPanels = InstanceType<typeof VExpansionPanels>;
|
352
352
|
|
353
353
|
interface GroupItem {
|
354
|
-
id:
|
354
|
+
id: string;
|
355
355
|
value: Ref<unknown>;
|
356
356
|
disabled: Ref<boolean | undefined>;
|
357
357
|
useIndexAsValue?: boolean;
|
358
358
|
}
|
359
359
|
interface GroupProvide {
|
360
360
|
register: (item: GroupItem, cmp: ComponentInternalInstance) => void;
|
361
|
-
unregister: (id:
|
362
|
-
select: (id:
|
363
|
-
selected: Ref<Readonly<
|
364
|
-
isSelected: (id:
|
361
|
+
unregister: (id: string) => void;
|
362
|
+
select: (id: string, value: boolean) => void;
|
363
|
+
selected: Ref<Readonly<string[]>>;
|
364
|
+
isSelected: (id: string) => boolean;
|
365
365
|
prev: () => void;
|
366
366
|
next: () => void;
|
367
367
|
selectedClass: Ref<string | undefined>;
|
368
368
|
items: ComputedRef<{
|
369
|
-
id:
|
369
|
+
id: string;
|
370
370
|
value: unknown;
|
371
371
|
disabled: boolean | undefined;
|
372
372
|
}[]>;
|
@@ -374,7 +374,7 @@ interface GroupProvide {
|
|
374
374
|
getItemIndex: (value: unknown) => number;
|
375
375
|
}
|
376
376
|
interface GroupItemProvide {
|
377
|
-
id:
|
377
|
+
id: string;
|
378
378
|
isSelected: Ref<boolean>;
|
379
379
|
isFirst: Ref<boolean>;
|
380
380
|
isLast: Ref<boolean>;
|
@@ -38,22 +38,22 @@ declare const allowedVariants: readonly ["elevated", "flat", "tonal", "outlined"
|
|
38
38
|
type Variant = typeof allowedVariants[number];
|
39
39
|
|
40
40
|
interface GroupItem {
|
41
|
-
id:
|
41
|
+
id: string;
|
42
42
|
value: Ref<unknown>;
|
43
43
|
disabled: Ref<boolean | undefined>;
|
44
44
|
useIndexAsValue?: boolean;
|
45
45
|
}
|
46
46
|
interface GroupProvide {
|
47
47
|
register: (item: GroupItem, cmp: ComponentInternalInstance) => void;
|
48
|
-
unregister: (id:
|
49
|
-
select: (id:
|
50
|
-
selected: Ref<Readonly<
|
51
|
-
isSelected: (id:
|
48
|
+
unregister: (id: string) => void;
|
49
|
+
select: (id: string, value: boolean) => void;
|
50
|
+
selected: Ref<Readonly<string[]>>;
|
51
|
+
isSelected: (id: string) => boolean;
|
52
52
|
prev: () => void;
|
53
53
|
next: () => void;
|
54
54
|
selectedClass: Ref<string | undefined>;
|
55
55
|
items: ComputedRef<{
|
56
|
-
id:
|
56
|
+
id: string;
|
57
57
|
value: unknown;
|
58
58
|
disabled: boolean | undefined;
|
59
59
|
}[]>;
|
@@ -15,8 +15,8 @@ import { LoaderSlot, makeLoaderProps, useLoader } from "../../composables/loader
|
|
15
15
|
import { useRtl } from "../../composables/locale.mjs";
|
16
16
|
import { makeRoundedProps, useRounded } from "../../composables/rounded.mjs";
|
17
17
|
import { makeThemeProps, provideTheme } from "../../composables/theme.mjs"; // Utilities
|
18
|
-
import { computed, ref, toRef, watch } from 'vue';
|
19
|
-
import { animate, convertToUnit, EventProp, genericComponent,
|
18
|
+
import { computed, ref, toRef, useId, watch } from 'vue';
|
19
|
+
import { animate, convertToUnit, EventProp, genericComponent, isOn, nullifyTransforms, pick, propsFactory, standardEasing, useRender } from "../../util/index.mjs"; // Types
|
20
20
|
const allowedVariants = ['underlined', 'outlined', 'filled', 'solo', 'solo-inverted', 'solo-filled', 'plain'];
|
21
21
|
export const makeVFieldProps = propsFactory({
|
22
22
|
appendInnerIcon: IconValue,
|
@@ -99,7 +99,7 @@ export const VField = genericComponent()({
|
|
99
99
|
} = useRtl();
|
100
100
|
const isActive = computed(() => props.dirty || props.active);
|
101
101
|
const hasLabel = computed(() => !props.singleLine && !!(props.label || slots.label));
|
102
|
-
const uid =
|
102
|
+
const uid = useId();
|
103
103
|
const id = computed(() => props.id || `input-${uid}`);
|
104
104
|
const messagesId = computed(() => `${id.value}-messages`);
|
105
105
|
const labelRef = ref();
|