vuetify 3.1.14 → 3.1.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 +193 -141
- package/dist/json/importMap.json +8 -8
- package/dist/json/tags.json +13 -0
- package/dist/json/web-types.json +513 -282
- package/dist/vuetify-labs.css +465 -457
- package/dist/vuetify-labs.d.ts +521 -163
- package/dist/vuetify-labs.esm.js +272 -179
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +272 -179
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +17 -9
- package/dist/vuetify.d.ts +470 -145
- package/dist/vuetify.esm.js +178 -106
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +178 -106
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +638 -624
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.css +9 -0
- package/lib/components/VAutocomplete/VAutocomplete.mjs +50 -6
- package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.sass +10 -0
- package/lib/components/VAutocomplete/index.d.ts +29 -17
- package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs +31 -16
- package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs.map +1 -1
- package/lib/components/VBreadcrumbs/index.d.ts +3 -3
- package/lib/components/VCard/VCard.mjs.map +1 -1
- package/lib/components/VCard/index.d.ts +21 -16
- package/lib/components/VCheckbox/VCheckbox.mjs +2 -2
- package/lib/components/VCheckbox/VCheckbox.mjs.map +1 -1
- package/lib/components/VCheckbox/index.d.ts +22 -1
- package/lib/components/VCombobox/VCombobox.css +1 -1
- package/lib/components/VCombobox/VCombobox.mjs +6 -4
- package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
- package/lib/components/VCombobox/VCombobox.sass +1 -1
- package/lib/components/VCombobox/index.d.ts +29 -17
- package/lib/components/VDialog/VDialog.mjs +2 -2
- package/lib/components/VDialog/VDialog.mjs.map +1 -1
- package/lib/components/VField/VField.css +0 -1
- package/lib/components/VField/VField.sass +0 -1
- package/lib/components/VField/index.d.ts +6 -0
- package/lib/components/VFileInput/VFileInput.mjs +13 -17
- package/lib/components/VFileInput/VFileInput.mjs.map +1 -1
- package/lib/components/VFileInput/index.d.ts +68 -23
- package/lib/components/VInput/VInput.mjs +14 -7
- package/lib/components/VInput/VInput.mjs.map +1 -1
- package/lib/components/VInput/index.d.ts +22 -1
- package/lib/components/VList/VList.mjs +3 -22
- package/lib/components/VList/VList.mjs.map +1 -1
- package/lib/components/VOverlay/locationStrategies.mjs +9 -4
- package/lib/components/VOverlay/locationStrategies.mjs.map +1 -1
- package/lib/components/VRadioGroup/VRadioGroup.mjs +2 -2
- package/lib/components/VRadioGroup/VRadioGroup.mjs.map +1 -1
- package/lib/components/VRadioGroup/index.d.ts +22 -1
- package/lib/components/VRangeSlider/VRangeSlider.mjs +2 -2
- package/lib/components/VRangeSlider/VRangeSlider.mjs.map +1 -1
- package/lib/components/VRangeSlider/index.d.ts +22 -1
- package/lib/components/VSelect/VSelect.mjs +6 -0
- package/lib/components/VSelect/VSelect.mjs.map +1 -1
- package/lib/components/VSelect/index.d.ts +32 -17
- package/lib/components/VSlideGroup/VSlideGroup.mjs +2 -2
- package/lib/components/VSlideGroup/VSlideGroup.mjs.map +1 -1
- package/lib/components/VSlider/VSlider.mjs +2 -2
- package/lib/components/VSlider/VSlider.mjs.map +1 -1
- package/lib/components/VSlider/index.d.ts +22 -1
- package/lib/components/VSwitch/VSwitch.mjs +5 -3
- package/lib/components/VSwitch/VSwitch.mjs.map +1 -1
- package/lib/components/VSwitch/index.d.ts +43 -1
- package/lib/components/VTextField/VTextField.mjs +4 -12
- package/lib/components/VTextField/VTextField.mjs.map +1 -1
- package/lib/components/VTextField/index.d.ts +70 -22
- package/lib/components/VTextarea/VTextarea.mjs +4 -12
- package/lib/components/VTextarea/VTextarea.mjs.map +1 -1
- package/lib/components/VTextarea/index.d.ts +61 -22
- package/lib/components/VTreeview/_mixins.sass +0 -0
- package/lib/components/VTreeview/util/filterTreeItems.mjs +0 -0
- package/lib/components/VValidation/index.d.ts +10 -1
- package/lib/components/index.d.ts +468 -143
- package/lib/composables/focus.mjs +3 -2
- package/lib/composables/focus.mjs.map +1 -1
- package/lib/composables/items.mjs +7 -2
- package/lib/composables/items.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/framework.mjs +1 -1
- package/lib/iconsets/mdi-svg.mjs +2 -2
- package/lib/iconsets/mdi-svg.mjs.map +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/labs/VDataTable/VDataTable.mjs +3 -3
- package/lib/labs/VDataTable/VDataTable.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableFooter.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableHeaders.mjs +34 -20
- package/lib/labs/VDataTable/VDataTableHeaders.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableRow.mjs +2 -4
- package/lib/labs/VDataTable/VDataTableRow.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableRows.mjs +52 -44
- package/lib/labs/VDataTable/VDataTableRows.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableServer.mjs +3 -2
- package/lib/labs/VDataTable/VDataTableServer.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableVirtual.mjs +0 -1
- package/lib/labs/VDataTable/VDataTableVirtual.mjs.map +1 -1
- package/lib/labs/VDataTable/composables/options.mjs +2 -1
- package/lib/labs/VDataTable/composables/options.mjs.map +1 -1
- package/lib/labs/VDataTable/index.d.ts +44 -11
- package/lib/labs/VSkeletonLoader/VSkeletonLoader.mjs +1 -0
- package/lib/labs/VSkeletonLoader/VSkeletonLoader.mjs.map +1 -1
- package/lib/labs/VSkeletonLoader/index.d.ts +9 -9
- package/lib/labs/components.d.ts +53 -20
- package/lib/locale/el.mjs +0 -0
- package/lib/locale/index.mjs +0 -0
- package/lib/util/helpers.mjs +26 -0
- package/lib/util/helpers.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -270,10 +270,10 @@ declare const VSelect: {
|
|
|
270
270
|
errorMessages: string | string[];
|
|
271
271
|
maxErrors: string | number;
|
|
272
272
|
rules: ValidationRule[];
|
|
273
|
+
persistentHint: boolean;
|
|
273
274
|
clearable: boolean;
|
|
274
275
|
persistentClear: boolean;
|
|
275
276
|
singleLine: boolean;
|
|
276
|
-
persistentHint: boolean;
|
|
277
277
|
persistentPlaceholder: boolean;
|
|
278
278
|
persistentCounter: boolean;
|
|
279
279
|
valueComparator: typeof deepEqual;
|
|
@@ -566,6 +566,7 @@ declare const VSelect: {
|
|
|
566
566
|
'onClick:appendInner': PropType<EventProp<[MouseEvent], (args_0: MouseEvent) => any>>;
|
|
567
567
|
'onClick:prependInner': PropType<EventProp<[MouseEvent], (args_0: MouseEvent) => any>>;
|
|
568
568
|
focused: BooleanConstructor;
|
|
569
|
+
'onUpdate:focused': PropType<EventProp<[FocusEvent], (args_0: FocusEvent) => any>>;
|
|
569
570
|
validateOn: PropType<"input" | "blur" | "submit" | undefined>;
|
|
570
571
|
errorMessages: {
|
|
571
572
|
type: PropType<string | string[]>;
|
|
@@ -579,12 +580,12 @@ declare const VSelect: {
|
|
|
579
580
|
type: PropType<ValidationRule[]>;
|
|
580
581
|
default: () => never[];
|
|
581
582
|
};
|
|
583
|
+
hint: StringConstructor;
|
|
584
|
+
persistentHint: BooleanConstructor;
|
|
582
585
|
hideDetails: PropType<boolean | "auto">;
|
|
583
586
|
clearable: BooleanConstructor;
|
|
584
587
|
persistentClear: BooleanConstructor;
|
|
585
588
|
singleLine: BooleanConstructor;
|
|
586
|
-
hint: StringConstructor;
|
|
587
|
-
persistentHint: BooleanConstructor;
|
|
588
589
|
persistentPlaceholder: BooleanConstructor;
|
|
589
590
|
persistentCounter: BooleanConstructor;
|
|
590
591
|
suffix: StringConstructor;
|
|
@@ -950,8 +951,9 @@ declare const VSelect: {
|
|
|
950
951
|
default: typeof deepEqual;
|
|
951
952
|
};
|
|
952
953
|
}, "multiple" | "$children" | "$slots" | "v-slots" | "items" | "v-slot:append" | "v-slot:prepend" | "modelValue" | "onUpdate:modelValue" | "v-slot:loader" | "v-slot:details" | "v-slot:clear" | "v-slot:label" | "v-slot:prepend-inner" | "v-slot:append-inner" | "v-slot:item" | "returnObject" | "v-slot:chip" | "v-slot:selection" | "v-slot:prepend-item" | "v-slot:append-item" | "v-slot:no-data">>> & {
|
|
954
|
+
"onUpdate:focused"?: ((focused: boolean) => any) | undefined;
|
|
953
955
|
"onUpdate:menu"?: ((val: boolean) => any) | undefined;
|
|
954
|
-
} & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, "reverse" | "type" | "error" | "active" | "direction" | "transition" | "menu" | "autofocus" | "eager" | "disabled" | "readonly" | "noDataText" | "messages" | "density" | "variant" | "clearIcon" | "focused" | "errorMessages" | "maxErrors" | "rules" | "
|
|
956
|
+
} & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, "reverse" | "type" | "error" | "active" | "direction" | "transition" | "menu" | "autofocus" | "eager" | "disabled" | "readonly" | "noDataText" | "messages" | "density" | "variant" | "clearIcon" | "focused" | "errorMessages" | "maxErrors" | "rules" | "persistentHint" | "clearable" | "persistentClear" | "singleLine" | "persistentPlaceholder" | "persistentCounter" | "valueComparator" | "itemTitle" | "itemValue" | "itemChildren" | "itemProps" | "chips" | "closableChips" | "hideNoData" | "hideSelected" | "menuIcon" | "openOnClear">;
|
|
955
957
|
$attrs: {
|
|
956
958
|
[x: string]: unknown;
|
|
957
959
|
};
|
|
@@ -963,7 +965,7 @@ declare const VSelect: {
|
|
|
963
965
|
}>;
|
|
964
966
|
$root: vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
965
967
|
$parent: vue.ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, vue.ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
966
|
-
$emit: (event: "update:menu", val: boolean) => void;
|
|
968
|
+
$emit: ((event: "update:focused", focused: boolean) => void) & ((event: "update:menu", val: boolean) => void);
|
|
967
969
|
$el: any;
|
|
968
970
|
$options: vue.ComponentOptionsBase<Readonly<vue.ExtractPropTypes<Omit<{
|
|
969
971
|
transition: Omit<{
|
|
@@ -1244,6 +1246,7 @@ declare const VSelect: {
|
|
|
1244
1246
|
'onClick:appendInner': PropType<EventProp<[MouseEvent], (args_0: MouseEvent) => any>>;
|
|
1245
1247
|
'onClick:prependInner': PropType<EventProp<[MouseEvent], (args_0: MouseEvent) => any>>;
|
|
1246
1248
|
focused: BooleanConstructor;
|
|
1249
|
+
'onUpdate:focused': PropType<EventProp<[FocusEvent], (args_0: FocusEvent) => any>>;
|
|
1247
1250
|
validateOn: PropType<"input" | "blur" | "submit" | undefined>;
|
|
1248
1251
|
errorMessages: {
|
|
1249
1252
|
type: PropType<string | string[]>;
|
|
@@ -1257,12 +1260,12 @@ declare const VSelect: {
|
|
|
1257
1260
|
type: PropType<ValidationRule[]>;
|
|
1258
1261
|
default: () => never[];
|
|
1259
1262
|
};
|
|
1263
|
+
hint: StringConstructor;
|
|
1264
|
+
persistentHint: BooleanConstructor;
|
|
1260
1265
|
hideDetails: PropType<boolean | "auto">;
|
|
1261
1266
|
clearable: BooleanConstructor;
|
|
1262
1267
|
persistentClear: BooleanConstructor;
|
|
1263
1268
|
singleLine: BooleanConstructor;
|
|
1264
|
-
hint: StringConstructor;
|
|
1265
|
-
persistentHint: BooleanConstructor;
|
|
1266
1269
|
persistentPlaceholder: BooleanConstructor;
|
|
1267
1270
|
persistentCounter: BooleanConstructor;
|
|
1268
1271
|
suffix: StringConstructor;
|
|
@@ -1628,11 +1631,14 @@ declare const VSelect: {
|
|
|
1628
1631
|
default: typeof deepEqual;
|
|
1629
1632
|
};
|
|
1630
1633
|
}, "multiple" | "$children" | "$slots" | "v-slots" | "items" | "v-slot:append" | "v-slot:prepend" | "modelValue" | "onUpdate:modelValue" | "v-slot:loader" | "v-slot:details" | "v-slot:clear" | "v-slot:label" | "v-slot:prepend-inner" | "v-slot:append-inner" | "v-slot:item" | "returnObject" | "v-slot:chip" | "v-slot:selection" | "v-slot:prepend-item" | "v-slot:append-item" | "v-slot:no-data">>> & {
|
|
1634
|
+
"onUpdate:focused"?: ((focused: boolean) => any) | undefined;
|
|
1631
1635
|
"onUpdate:menu"?: ((val: boolean) => any) | undefined;
|
|
1632
1636
|
}, {
|
|
1637
|
+
isFocused: vue.Ref<boolean>;
|
|
1633
1638
|
menu: vue.WritableComputedRef<boolean>;
|
|
1634
1639
|
select: (item: InternalItem) => void;
|
|
1635
1640
|
} & Omit<any, string | number | symbol>, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Omit<{
|
|
1641
|
+
'update:focused': (focused: boolean) => boolean;
|
|
1636
1642
|
'update:modelValue': (val: any) => boolean;
|
|
1637
1643
|
'update:menu': (val: boolean) => true;
|
|
1638
1644
|
}, "multiple" | "$children" | "$slots" | "v-slots" | "items" | "v-slot:append" | "v-slot:prepend" | "modelValue" | "update:modelValue" | "v-slot:loader" | "v-slot:details" | "v-slot:clear" | "v-slot:label" | "v-slot:prepend-inner" | "v-slot:append-inner" | "v-slot:item" | "returnObject" | "v-slot:chip" | "v-slot:selection" | "v-slot:prepend-item" | "v-slot:append-item" | "v-slot:no-data">, string, {
|
|
@@ -1762,10 +1768,10 @@ declare const VSelect: {
|
|
|
1762
1768
|
errorMessages: string | string[];
|
|
1763
1769
|
maxErrors: string | number;
|
|
1764
1770
|
rules: ValidationRule[];
|
|
1771
|
+
persistentHint: boolean;
|
|
1765
1772
|
clearable: boolean;
|
|
1766
1773
|
persistentClear: boolean;
|
|
1767
1774
|
singleLine: boolean;
|
|
1768
|
-
persistentHint: boolean;
|
|
1769
1775
|
persistentPlaceholder: boolean;
|
|
1770
1776
|
persistentCounter: boolean;
|
|
1771
1777
|
valueComparator: typeof deepEqual;
|
|
@@ -2078,6 +2084,7 @@ declare const VSelect: {
|
|
|
2078
2084
|
'onClick:appendInner': PropType<EventProp<[MouseEvent], (args_0: MouseEvent) => any>>;
|
|
2079
2085
|
'onClick:prependInner': PropType<EventProp<[MouseEvent], (args_0: MouseEvent) => any>>;
|
|
2080
2086
|
focused: BooleanConstructor;
|
|
2087
|
+
'onUpdate:focused': PropType<EventProp<[FocusEvent], (args_0: FocusEvent) => any>>;
|
|
2081
2088
|
validateOn: PropType<"input" | "blur" | "submit" | undefined>;
|
|
2082
2089
|
errorMessages: {
|
|
2083
2090
|
type: PropType<string | string[]>;
|
|
@@ -2091,12 +2098,12 @@ declare const VSelect: {
|
|
|
2091
2098
|
type: PropType<ValidationRule[]>;
|
|
2092
2099
|
default: () => never[];
|
|
2093
2100
|
};
|
|
2101
|
+
hint: StringConstructor;
|
|
2102
|
+
persistentHint: BooleanConstructor;
|
|
2094
2103
|
hideDetails: PropType<boolean | "auto">;
|
|
2095
2104
|
clearable: BooleanConstructor;
|
|
2096
2105
|
persistentClear: BooleanConstructor;
|
|
2097
2106
|
singleLine: BooleanConstructor;
|
|
2098
|
-
hint: StringConstructor;
|
|
2099
|
-
persistentHint: BooleanConstructor;
|
|
2100
2107
|
persistentPlaceholder: BooleanConstructor;
|
|
2101
2108
|
persistentCounter: BooleanConstructor;
|
|
2102
2109
|
suffix: StringConstructor;
|
|
@@ -2462,8 +2469,10 @@ declare const VSelect: {
|
|
|
2462
2469
|
default: typeof deepEqual;
|
|
2463
2470
|
};
|
|
2464
2471
|
}, "multiple" | "$children" | "$slots" | "v-slots" | "items" | "v-slot:append" | "v-slot:prepend" | "modelValue" | "onUpdate:modelValue" | "v-slot:loader" | "v-slot:details" | "v-slot:clear" | "v-slot:label" | "v-slot:prepend-inner" | "v-slot:append-inner" | "v-slot:item" | "returnObject" | "v-slot:chip" | "v-slot:selection" | "v-slot:prepend-item" | "v-slot:append-item" | "v-slot:no-data">>> & {
|
|
2472
|
+
"onUpdate:focused"?: ((focused: boolean) => any) | undefined;
|
|
2465
2473
|
"onUpdate:menu"?: ((val: boolean) => any) | undefined;
|
|
2466
2474
|
} & vue.ShallowUnwrapRef<{
|
|
2475
|
+
isFocused: vue.Ref<boolean>;
|
|
2467
2476
|
menu: vue.WritableComputedRef<boolean>;
|
|
2468
2477
|
select: (item: InternalItem) => void;
|
|
2469
2478
|
} & Omit<any, string | number | symbol>> & {} & vue.ComponentCustomProperties & {};
|
|
@@ -2749,6 +2758,7 @@ declare const VSelect: {
|
|
|
2749
2758
|
'onClick:appendInner': PropType<EventProp<[MouseEvent], (args_0: MouseEvent) => any>>;
|
|
2750
2759
|
'onClick:prependInner': PropType<EventProp<[MouseEvent], (args_0: MouseEvent) => any>>;
|
|
2751
2760
|
focused: BooleanConstructor;
|
|
2761
|
+
'onUpdate:focused': PropType<EventProp<[FocusEvent], (args_0: FocusEvent) => any>>;
|
|
2752
2762
|
validateOn: PropType<"input" | "blur" | "submit" | undefined>;
|
|
2753
2763
|
errorMessages: {
|
|
2754
2764
|
type: PropType<string | string[]>;
|
|
@@ -2762,12 +2772,12 @@ declare const VSelect: {
|
|
|
2762
2772
|
type: PropType<ValidationRule[]>;
|
|
2763
2773
|
default: () => never[];
|
|
2764
2774
|
};
|
|
2775
|
+
hint: StringConstructor;
|
|
2776
|
+
persistentHint: BooleanConstructor;
|
|
2765
2777
|
hideDetails: PropType<boolean | "auto">;
|
|
2766
2778
|
clearable: BooleanConstructor;
|
|
2767
2779
|
persistentClear: BooleanConstructor;
|
|
2768
2780
|
singleLine: BooleanConstructor;
|
|
2769
|
-
hint: StringConstructor;
|
|
2770
|
-
persistentHint: BooleanConstructor;
|
|
2771
2781
|
persistentPlaceholder: BooleanConstructor;
|
|
2772
2782
|
persistentCounter: BooleanConstructor;
|
|
2773
2783
|
suffix: StringConstructor;
|
|
@@ -3133,11 +3143,14 @@ declare const VSelect: {
|
|
|
3133
3143
|
default: typeof deepEqual;
|
|
3134
3144
|
};
|
|
3135
3145
|
}, "multiple" | "$children" | "$slots" | "v-slots" | "items" | "v-slot:append" | "v-slot:prepend" | "modelValue" | "onUpdate:modelValue" | "v-slot:loader" | "v-slot:details" | "v-slot:clear" | "v-slot:label" | "v-slot:prepend-inner" | "v-slot:append-inner" | "v-slot:item" | "returnObject" | "v-slot:chip" | "v-slot:selection" | "v-slot:prepend-item" | "v-slot:append-item" | "v-slot:no-data">>> & {
|
|
3146
|
+
"onUpdate:focused"?: ((focused: boolean) => any) | undefined;
|
|
3136
3147
|
"onUpdate:menu"?: ((val: boolean) => any) | undefined;
|
|
3137
3148
|
}, {
|
|
3149
|
+
isFocused: vue.Ref<boolean>;
|
|
3138
3150
|
menu: vue.WritableComputedRef<boolean>;
|
|
3139
3151
|
select: (item: InternalItem) => void;
|
|
3140
3152
|
} & Omit<any, string | number | symbol>, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Omit<{
|
|
3153
|
+
'update:focused': (focused: boolean) => boolean;
|
|
3141
3154
|
'update:modelValue': (val: any) => boolean;
|
|
3142
3155
|
'update:menu': (val: boolean) => true;
|
|
3143
3156
|
}, "multiple" | "$children" | "$slots" | "v-slots" | "items" | "v-slot:append" | "v-slot:prepend" | "modelValue" | "update:modelValue" | "v-slot:loader" | "v-slot:details" | "v-slot:clear" | "v-slot:label" | "v-slot:prepend-inner" | "v-slot:append-inner" | "v-slot:item" | "returnObject" | "v-slot:chip" | "v-slot:selection" | "v-slot:prepend-item" | "v-slot:append-item" | "v-slot:no-data">, string, {
|
|
@@ -3267,10 +3280,10 @@ declare const VSelect: {
|
|
|
3267
3280
|
errorMessages: string | string[];
|
|
3268
3281
|
maxErrors: string | number;
|
|
3269
3282
|
rules: ValidationRule[];
|
|
3283
|
+
persistentHint: boolean;
|
|
3270
3284
|
clearable: boolean;
|
|
3271
3285
|
persistentClear: boolean;
|
|
3272
3286
|
singleLine: boolean;
|
|
3273
|
-
persistentHint: boolean;
|
|
3274
3287
|
persistentPlaceholder: boolean;
|
|
3275
3288
|
persistentCounter: boolean;
|
|
3276
3289
|
valueComparator: typeof deepEqual;
|
|
@@ -3679,6 +3692,7 @@ declare const VSelect: {
|
|
|
3679
3692
|
'onClick:appendInner': PropType<EventProp<[MouseEvent], (args_0: MouseEvent) => any>>;
|
|
3680
3693
|
'onClick:prependInner': PropType<EventProp<[MouseEvent], (args_0: MouseEvent) => any>>;
|
|
3681
3694
|
focused: BooleanConstructor;
|
|
3695
|
+
'onUpdate:focused': PropType<EventProp<[FocusEvent], (args_0: FocusEvent) => any>>;
|
|
3682
3696
|
validateOn: PropType<"input" | "blur" | "submit" | undefined>;
|
|
3683
3697
|
errorMessages: {
|
|
3684
3698
|
type: PropType<string | string[]>;
|
|
@@ -3692,12 +3706,12 @@ declare const VSelect: {
|
|
|
3692
3706
|
type: PropType<ValidationRule[]>;
|
|
3693
3707
|
default: () => never[];
|
|
3694
3708
|
};
|
|
3709
|
+
hint: StringConstructor;
|
|
3710
|
+
persistentHint: BooleanConstructor;
|
|
3695
3711
|
hideDetails: PropType<boolean | "auto">;
|
|
3696
3712
|
clearable: BooleanConstructor;
|
|
3697
3713
|
persistentClear: BooleanConstructor;
|
|
3698
3714
|
singleLine: BooleanConstructor;
|
|
3699
|
-
hint: StringConstructor;
|
|
3700
|
-
persistentHint: BooleanConstructor;
|
|
3701
3715
|
persistentPlaceholder: BooleanConstructor;
|
|
3702
3716
|
persistentCounter: BooleanConstructor;
|
|
3703
3717
|
suffix: StringConstructor;
|
|
@@ -4341,6 +4355,7 @@ declare const VSelect: {
|
|
|
4341
4355
|
'onClick:appendInner': PropType<EventProp<[MouseEvent], (args_0: MouseEvent) => any>>;
|
|
4342
4356
|
'onClick:prependInner': PropType<EventProp<[MouseEvent], (args_0: MouseEvent) => any>>;
|
|
4343
4357
|
focused: BooleanConstructor;
|
|
4358
|
+
'onUpdate:focused': PropType<EventProp<[FocusEvent], (args_0: FocusEvent) => any>>;
|
|
4344
4359
|
validateOn: PropType<"input" | "blur" | "submit" | undefined>;
|
|
4345
4360
|
errorMessages: {
|
|
4346
4361
|
type: PropType<string | string[]>;
|
|
@@ -4354,12 +4369,12 @@ declare const VSelect: {
|
|
|
4354
4369
|
type: PropType<ValidationRule[]>;
|
|
4355
4370
|
default: () => never[];
|
|
4356
4371
|
};
|
|
4372
|
+
hint: StringConstructor;
|
|
4373
|
+
persistentHint: BooleanConstructor;
|
|
4357
4374
|
hideDetails: PropType<boolean | "auto">;
|
|
4358
4375
|
clearable: BooleanConstructor;
|
|
4359
4376
|
persistentClear: BooleanConstructor;
|
|
4360
4377
|
singleLine: BooleanConstructor;
|
|
4361
|
-
hint: StringConstructor;
|
|
4362
|
-
persistentHint: BooleanConstructor;
|
|
4363
4378
|
persistentPlaceholder: BooleanConstructor;
|
|
4364
4379
|
persistentCounter: BooleanConstructor;
|
|
4365
4380
|
suffix: StringConstructor;
|
|
@@ -12,7 +12,7 @@ import { useDisplay } from "../../composables/index.mjs";
|
|
|
12
12
|
import { useResizeObserver } from "../../composables/resizeObserver.mjs";
|
|
13
13
|
import { useRtl } from "../../composables/locale.mjs"; // Utilities
|
|
14
14
|
import { computed, ref, watch } from 'vue';
|
|
15
|
-
import { clamp, genericComponent, IN_BROWSER, propsFactory, useRender } from "../../util/index.mjs";
|
|
15
|
+
import { clamp, focusableChildren, genericComponent, IN_BROWSER, propsFactory, useRender } from "../../util/index.mjs";
|
|
16
16
|
import { bias, calculateCenteredOffset, calculateUpdatedOffset } from "./helpers.mjs"; // Types
|
|
17
17
|
export const VSlideGroupSymbol = Symbol.for('vuetify:v-slide-group');
|
|
18
18
|
export const makeVSlideGroupProps = propsFactory({
|
|
@@ -200,7 +200,7 @@ export const VSlideGroup = genericComponent()({
|
|
|
200
200
|
function focus(location) {
|
|
201
201
|
if (!contentRef.value) return;
|
|
202
202
|
if (!location) {
|
|
203
|
-
const focusable =
|
|
203
|
+
const focusable = focusableChildren(contentRef.value);
|
|
204
204
|
focusable[0]?.focus();
|
|
205
205
|
} else if (location === 'next') {
|
|
206
206
|
const el = contentRef.value.querySelector(':focus')?.nextElementSibling;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VSlideGroup.mjs","names":["VFadeTransition","VIcon","IconValue","makeGroupProps","useGroup","makeTagProps","useDisplay","useResizeObserver","useRtl","computed","ref","watch","clamp","genericComponent","IN_BROWSER","propsFactory","useRender","bias","calculateCenteredOffset","calculateUpdatedOffset","VSlideGroupSymbol","Symbol","for","makeVSlideGroupProps","centerActive","Boolean","direction","type","String","default","symbol","nextIcon","prevIcon","showArrows","validator","v","includes","selectedClass","VSlideGroup","name","props","emits","value","setup","_ref","slots","isRtl","mobile","group","isOverflowing","scrollOffset","containerSize","contentSize","isHorizontal","resizeRef","containerRef","contentRect","containerRect","contentRef","firstSelectedIndex","selected","length","items","findIndex","item","id","lastSelectedIndex","frame","cancelAnimationFrame","requestAnimationFrame","sizeProperty","selectedElement","children","currentScrollOffset","disableTransition","startTouch","startOffset","onTouchstart","e","sign","touches","onTouchmove","onTouchend","maxScrollOffset","onScroll","isFocused","onFocusin","el","composedPath","onFocusout","onFocus","relatedTarget","contains","focus","onKeydown","key","location","focusable","querySelectorAll","filter","hasAttribute","querySelector","nextElementSibling","previousElementSibling","firstElementChild","lastElementChild","scrollTo","newAbsoluteOffset","contentStyles","scrollAmount","transform","transition","willChange","slotProps","next","prev","select","isSelected","hasAffixes","Math","abs","hasPrev","hasNext","_createVNode","tag","onClick"],"sources":["../../../src/components/VSlideGroup/VSlideGroup.tsx"],"sourcesContent":["// Styles\nimport './VSlideGroup.sass'\n\n// Components\nimport { VFadeTransition } from '@/components/transitions'\nimport { VIcon } from '@/components/VIcon'\n\n// Composables\nimport { IconValue } from '@/composables/icons'\nimport { makeGroupProps, useGroup } from '@/composables/group'\nimport { makeTagProps } from '@/composables/tag'\nimport { useDisplay } from '@/composables'\nimport { useResizeObserver } from '@/composables/resizeObserver'\nimport { useRtl } from '@/composables/locale'\n\n// Utilities\nimport { computed, ref, watch } from 'vue'\nimport { clamp, genericComponent, IN_BROWSER, propsFactory, useRender } from '@/util'\nimport { bias, calculateCenteredOffset, calculateUpdatedOffset } from './helpers'\n\n// Types\nimport type { GroupProvide } from '@/composables/group'\nimport type { InjectionKey, PropType } from 'vue'\n\nexport const VSlideGroupSymbol: InjectionKey<GroupProvide> = Symbol.for('vuetify:v-slide-group')\n\ninterface SlideGroupSlot {\n next: GroupProvide['next']\n prev: GroupProvide['prev']\n select: GroupProvide['select']\n isSelected: GroupProvide['isSelected']\n}\n\ntype VSlideGroupSlots = {\n default: [SlideGroupSlot]\n prev: [SlideGroupSlot]\n next: [SlideGroupSlot]\n}\n\nexport const makeVSlideGroupProps = propsFactory({\n centerActive: Boolean,\n direction: {\n type: String as PropType<'horizontal' | 'vertical'>,\n default: 'horizontal',\n },\n symbol: {\n type: null,\n default: VSlideGroupSymbol,\n },\n nextIcon: {\n type: IconValue,\n default: '$next',\n },\n prevIcon: {\n type: IconValue,\n default: '$prev',\n },\n showArrows: {\n type: [Boolean, String],\n validator: (v: any) => (\n typeof v === 'boolean' || [\n 'always',\n 'desktop',\n 'mobile',\n ].includes(v)\n ),\n },\n\n ...makeTagProps(),\n ...makeGroupProps({\n selectedClass: 'v-slide-group-item--active',\n }),\n}, 'v-slide-group')\n\nexport const VSlideGroup = genericComponent<VSlideGroupSlots>()({\n name: 'VSlideGroup',\n\n props: makeVSlideGroupProps(),\n\n emits: {\n 'update:modelValue': (value: any) => true,\n },\n\n setup (props, { slots }) {\n const { isRtl } = useRtl()\n const { mobile } = useDisplay()\n const group = useGroup(props, props.symbol)\n const isOverflowing = ref(false)\n const scrollOffset = ref(0)\n const containerSize = ref(0)\n const contentSize = ref(0)\n const isHorizontal = computed(() => props.direction === 'horizontal')\n\n const { resizeRef: containerRef, contentRect: containerRect } = useResizeObserver()\n const { resizeRef: contentRef, contentRect } = useResizeObserver()\n\n const firstSelectedIndex = computed(() => {\n if (!group.selected.value.length) return -1\n\n return group.items.value.findIndex(item => item.id === group.selected.value[0])\n })\n\n const lastSelectedIndex = computed(() => {\n if (!group.selected.value.length) return -1\n\n return group.items.value.findIndex(item => item.id === group.selected.value[group.selected.value.length - 1])\n })\n\n if (IN_BROWSER) {\n let frame = -1\n watch(() => [group.selected.value, containerRect.value, contentRect.value, isHorizontal.value], () => {\n cancelAnimationFrame(frame)\n frame = requestAnimationFrame(() => {\n if (containerRect.value && contentRect.value) {\n const sizeProperty = isHorizontal.value ? 'width' : 'height'\n\n containerSize.value = containerRect.value[sizeProperty]\n contentSize.value = contentRect.value[sizeProperty]\n\n isOverflowing.value = containerSize.value + 1 < contentSize.value\n }\n\n if (firstSelectedIndex.value >= 0 && contentRef.value) {\n // TODO: Is this too naive? Should we store element references in group composable?\n const selectedElement = contentRef.value.children[lastSelectedIndex.value] as HTMLElement\n\n if (firstSelectedIndex.value === 0 || !isOverflowing.value) {\n scrollOffset.value = 0\n } else if (props.centerActive) {\n scrollOffset.value = calculateCenteredOffset({\n selectedElement,\n containerSize: containerSize.value,\n contentSize: contentSize.value,\n isRtl: isRtl.value,\n isHorizontal: isHorizontal.value,\n })\n } else if (isOverflowing.value) {\n scrollOffset.value = calculateUpdatedOffset({\n selectedElement,\n containerSize: containerSize.value,\n contentSize: contentSize.value,\n isRtl: isRtl.value,\n currentScrollOffset: scrollOffset.value,\n isHorizontal: isHorizontal.value,\n })\n }\n }\n })\n })\n }\n\n const disableTransition = ref(false)\n\n let startTouch = 0\n let startOffset = 0\n\n function onTouchstart (e: TouchEvent) {\n const sizeProperty = isHorizontal.value ? 'clientX' : 'clientY'\n const sign = isRtl.value && isHorizontal.value ? -1 : 1\n startOffset = sign * scrollOffset.value\n startTouch = e.touches[0][sizeProperty]\n disableTransition.value = true\n }\n\n function onTouchmove (e: TouchEvent) {\n if (!isOverflowing.value) return\n\n const sizeProperty = isHorizontal.value ? 'clientX' : 'clientY'\n const sign = isRtl.value && isHorizontal.value ? -1 : 1\n scrollOffset.value = sign * (startOffset + startTouch - e.touches[0][sizeProperty])\n }\n\n function onTouchend (e: TouchEvent) {\n const maxScrollOffset = contentSize.value - containerSize.value\n\n if (scrollOffset.value < 0 || !isOverflowing.value) {\n scrollOffset.value = 0\n } else if (scrollOffset.value >= maxScrollOffset) {\n scrollOffset.value = maxScrollOffset\n }\n\n disableTransition.value = false\n }\n\n function onScroll () {\n if (!containerRef.value) return\n\n containerRef.value[isHorizontal.value ? 'scrollLeft' : 'scrollTop'] = 0\n }\n\n const isFocused = ref(false)\n function onFocusin (e: FocusEvent) {\n isFocused.value = true\n\n if (!isOverflowing.value || !contentRef.value) return\n\n // Focused element is likely to be the root of an item, so a\n // breadth-first search will probably find it in the first iteration\n for (const el of e.composedPath()) {\n for (const item of contentRef.value.children) {\n if (item === el) {\n scrollOffset.value = calculateUpdatedOffset({\n selectedElement: item as HTMLElement,\n containerSize: containerSize.value,\n contentSize: contentSize.value,\n isRtl: isRtl.value,\n currentScrollOffset: scrollOffset.value,\n isHorizontal: isHorizontal.value,\n })\n return\n }\n }\n }\n }\n\n function onFocusout (e: FocusEvent) {\n isFocused.value = false\n }\n\n function onFocus (e: FocusEvent) {\n if (\n !isFocused.value &&\n !(e.relatedTarget && contentRef.value?.contains(e.relatedTarget as Node))\n ) focus()\n }\n\n function onKeydown (e: KeyboardEvent) {\n if (!contentRef.value) return\n\n if (isHorizontal.value) {\n if (e.key === 'ArrowRight') {\n focus(isRtl.value ? 'prev' : 'next')\n } else if (e.key === 'ArrowLeft') {\n focus(isRtl.value ? 'next' : 'prev')\n }\n } else {\n if (e.key === 'ArrowDown') {\n focus('next')\n } else if (e.key === 'ArrowUp') {\n focus('prev')\n }\n }\n\n if (e.key === 'Home') {\n focus('first')\n } else if (e.key === 'End') {\n focus('last')\n }\n }\n\n function focus (location?: 'next' | 'prev' | 'first' | 'last') {\n if (!contentRef.value) return\n\n if (!location) {\n const focusable = [...contentRef.value.querySelectorAll(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])'\n )].filter(el => !el.hasAttribute('disabled')) as HTMLElement[]\n focusable[0]?.focus()\n } else if (location === 'next') {\n const el = contentRef.value.querySelector(':focus')?.nextElementSibling as HTMLElement | undefined\n if (el) el.focus()\n else focus('first')\n } else if (location === 'prev') {\n const el = contentRef.value.querySelector(':focus')?.previousElementSibling as HTMLElement | undefined\n if (el) el.focus()\n else focus('last')\n } else if (location === 'first') {\n (contentRef.value.firstElementChild as HTMLElement)?.focus()\n } else if (location === 'last') {\n (contentRef.value.lastElementChild as HTMLElement)?.focus()\n }\n }\n\n function scrollTo (location: 'prev' | 'next') {\n const newAbsoluteOffset = scrollOffset.value + (location === 'prev' ? -1 : 1) * containerSize.value\n\n scrollOffset.value = clamp(newAbsoluteOffset, 0, contentSize.value - containerSize.value)\n }\n\n const contentStyles = computed(() => {\n // This adds friction when scrolling the 'wrong' way when at max offset\n let scrollAmount = scrollOffset.value > contentSize.value - containerSize.value\n ? -(contentSize.value - containerSize.value) + bias(contentSize.value - containerSize.value - scrollOffset.value)\n : -scrollOffset.value\n\n // This adds friction when scrolling the 'wrong' way when at min offset\n if (scrollOffset.value <= 0) {\n scrollAmount = bias(-scrollOffset.value)\n }\n\n const sign = isRtl.value && isHorizontal.value ? -1 : 1\n return {\n transform: `translate${isHorizontal.value ? 'X' : 'Y'}(${sign * scrollAmount}px)`,\n transition: disableTransition.value ? 'none' : '',\n willChange: disableTransition.value ? 'transform' : '',\n }\n })\n\n const slotProps = computed(() => ({\n next: group.next,\n prev: group.prev,\n select: group.select,\n isSelected: group.isSelected,\n }))\n\n const hasAffixes = computed(() => {\n switch (props.showArrows) {\n // Always show arrows on desktop & mobile\n case 'always': return true\n\n // Always show arrows on desktop\n case 'desktop': return !mobile.value\n\n // Show arrows on mobile when overflowing.\n // This matches the default 2.2 behavior\n case true: return isOverflowing.value || Math.abs(scrollOffset.value) > 0\n\n // Always show on mobile\n case 'mobile': return (\n mobile.value ||\n (isOverflowing.value || Math.abs(scrollOffset.value) > 0)\n )\n\n // https://material.io/components/tabs#scrollable-tabs\n // Always show arrows when\n // overflowed on desktop\n default: return (\n !mobile.value &&\n (isOverflowing.value || Math.abs(scrollOffset.value) > 0)\n )\n }\n })\n\n const hasPrev = computed(() => {\n return Math.abs(scrollOffset.value) > 0\n })\n\n const hasNext = computed(() => {\n // Check one scroll ahead to know the width of right-most item\n return contentSize.value > Math.abs(scrollOffset.value) + containerSize.value\n })\n\n useRender(() => (\n <props.tag\n class={[\n 'v-slide-group',\n {\n 'v-slide-group--vertical': !isHorizontal.value,\n 'v-slide-group--has-affixes': hasAffixes.value,\n 'v-slide-group--is-overflowing': isOverflowing.value,\n },\n ]}\n tabindex={ (isFocused.value || group.selected.value.length) ? -1 : 0 }\n onFocus={ onFocus }\n >\n { hasAffixes.value && (\n <div\n key=\"prev\"\n class={[\n 'v-slide-group__prev',\n { 'v-slide-group__prev--disabled': !hasPrev.value },\n ]}\n onClick={ () => scrollTo('prev') }\n >\n { slots.prev?.(slotProps.value) ?? (\n <VFadeTransition>\n <VIcon icon={ isRtl.value ? props.nextIcon : props.prevIcon }></VIcon>\n </VFadeTransition>\n )}\n </div>\n )}\n\n <div\n key=\"container\"\n ref={ containerRef }\n class=\"v-slide-group__container\"\n onScroll={ onScroll }\n >\n <div\n ref={ contentRef }\n class=\"v-slide-group__content\"\n style={ contentStyles.value }\n onTouchstartPassive={ onTouchstart }\n onTouchmovePassive={ onTouchmove }\n onTouchendPassive={ onTouchend }\n onFocusin={ onFocusin }\n onFocusout={ onFocusout }\n onKeydown={ onKeydown }\n >\n { slots.default?.(slotProps.value) }\n </div>\n </div>\n\n { hasAffixes.value && (\n <div\n key=\"next\"\n class={[\n 'v-slide-group__next',\n { 'v-slide-group__next--disabled': !hasNext.value },\n ]}\n onClick={ () => scrollTo('next') }\n >\n { slots.next?.(slotProps.value) ?? (\n <VFadeTransition>\n <VIcon icon={ isRtl.value ? props.prevIcon : props.nextIcon }></VIcon>\n </VFadeTransition>\n )}\n </div>\n )}\n </props.tag>\n ))\n\n return {\n selected: group.selected,\n scrollTo,\n scrollOffset,\n focus,\n }\n },\n})\n\nexport type VSlideGroup = InstanceType<typeof VSlideGroup>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,eAAe;AAAA,SACfC,KAAK,8BAEd;AAAA,SACSC,SAAS;AAAA,SACTC,cAAc,EAAEC,QAAQ;AAAA,SACxBC,YAAY;AAAA,SACZC,UAAU;AAAA,SACVC,iBAAiB;AAAA,SACjBC,MAAM,wCAEf;AACA,SAASC,QAAQ,EAAEC,GAAG,EAAEC,KAAK,QAAQ,KAAK;AAAA,SACjCC,KAAK,EAAEC,gBAAgB,EAAEC,UAAU,EAAEC,YAAY,EAAEC,SAAS;AAAA,SAC5DC,IAAI,EAAEC,uBAAuB,EAAEC,sBAAsB,yBAE9D;AAIA,OAAO,MAAMC,iBAA6C,GAAGC,MAAM,CAACC,GAAG,CAAC,uBAAuB,CAAC;AAehG,OAAO,MAAMC,oBAAoB,GAAGR,YAAY,CAAC;EAC/CS,YAAY,EAAEC,OAAO;EACrBC,SAAS,EAAE;IACTC,IAAI,EAAEC,MAA6C;IACnDC,OAAO,EAAE;EACX,CAAC;EACDC,MAAM,EAAE;IACNH,IAAI,EAAE,IAAI;IACVE,OAAO,EAAET;EACX,CAAC;EACDW,QAAQ,EAAE;IACRJ,IAAI,EAAEzB,SAAS;IACf2B,OAAO,EAAE;EACX,CAAC;EACDG,QAAQ,EAAE;IACRL,IAAI,EAAEzB,SAAS;IACf2B,OAAO,EAAE;EACX,CAAC;EACDI,UAAU,EAAE;IACVN,IAAI,EAAE,CAACF,OAAO,EAAEG,MAAM,CAAC;IACvBM,SAAS,EAAGC,CAAM,IAChB,OAAOA,CAAC,KAAK,SAAS,IAAI,CACxB,QAAQ,EACR,SAAS,EACT,QAAQ,CACT,CAACC,QAAQ,CAACD,CAAC;EAEhB,CAA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AA;QAAA,OAGXjE,UAAU;QAAA,SACV,wBAAwB;QAAA,SACtBkD,aAAa,CAAClE,KAAK;QAAA,uBACLmC,YAAY;QAAA,sBACbI,WAAW;QAAA,qBACZC,UAAU;QAAA,aAClBI,SAAS;QAAA,cACRG,UAAU;QAAA,aACXK;MAAS,IAEnBjD,KAAK,CAAChB,OAAO,GAAGoF,SAAS,CAACvE,KAAK,CAAC,MAIpC4E,UAAU,CAAC5E,KAAK,IAAAiF,YAAA;QAAA,OAEV,MAAM;QAAA,SACH,CACL,qBAAqB,EACrB;UAAE,+BAA+B,EAAE,CAACD,OAAO,CAAChF;QAAM,CAAC,CACpD;QAAA,WACSmF,CAAA,KAAMnB,QAAQ,CAAC,MAAM;MAAC,IAE9B7D,KAAK,CAACqE,IAAI,GAAGD,SAAS,CAACvE,KAAK,CAAC,IAAAiF,YAAA,CAAA3H,eAAA;QAAA6B,OAAA,EAAAA,CAAA,MAAA8F,YAAA,CAAA1H,KAAA;UAAA,QAEb6C,KAAK,CAACJ,KAAK,GAAGF,KAAK,CAACR,QAAQ,GAAGQ,KAAK,CAACT;QAAQ;MAAA,EAE9D,EAEJ;IAAA,EAEJ,CAAC;IAEF,OAAO;MACL6B,QAAQ,EAAEZ,KAAK,CAACY,QAAQ;MACxB8C,QAAQ;MACRxD,YAAY;MACZ2C;IACF,CAAC;EACH;AACF,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"VSlideGroup.mjs","names":["VFadeTransition","VIcon","IconValue","makeGroupProps","useGroup","makeTagProps","useDisplay","useResizeObserver","useRtl","computed","ref","watch","clamp","focusableChildren","genericComponent","IN_BROWSER","propsFactory","useRender","bias","calculateCenteredOffset","calculateUpdatedOffset","VSlideGroupSymbol","Symbol","for","makeVSlideGroupProps","centerActive","Boolean","direction","type","String","default","symbol","nextIcon","prevIcon","showArrows","validator","v","includes","selectedClass","VSlideGroup","name","props","emits","value","setup","_ref","slots","isRtl","mobile","group","isOverflowing","scrollOffset","containerSize","contentSize","isHorizontal","resizeRef","containerRef","contentRect","containerRect","contentRef","firstSelectedIndex","selected","length","items","findIndex","item","id","lastSelectedIndex","frame","cancelAnimationFrame","requestAnimationFrame","sizeProperty","selectedElement","children","currentScrollOffset","disableTransition","startTouch","startOffset","onTouchstart","e","sign","touches","onTouchmove","onTouchend","maxScrollOffset","onScroll","isFocused","onFocusin","el","composedPath","onFocusout","onFocus","relatedTarget","contains","focus","onKeydown","key","location","focusable","querySelector","nextElementSibling","previousElementSibling","firstElementChild","lastElementChild","scrollTo","newAbsoluteOffset","contentStyles","scrollAmount","transform","transition","willChange","slotProps","next","prev","select","isSelected","hasAffixes","Math","abs","hasPrev","hasNext","_createVNode","tag","onClick"],"sources":["../../../src/components/VSlideGroup/VSlideGroup.tsx"],"sourcesContent":["// Styles\nimport './VSlideGroup.sass'\n\n// Components\nimport { VFadeTransition } from '@/components/transitions'\nimport { VIcon } from '@/components/VIcon'\n\n// Composables\nimport { IconValue } from '@/composables/icons'\nimport { makeGroupProps, useGroup } from '@/composables/group'\nimport { makeTagProps } from '@/composables/tag'\nimport { useDisplay } from '@/composables'\nimport { useResizeObserver } from '@/composables/resizeObserver'\nimport { useRtl } from '@/composables/locale'\n\n// Utilities\nimport { computed, ref, watch } from 'vue'\nimport { clamp, focusableChildren, genericComponent, IN_BROWSER, propsFactory, useRender } from '@/util'\nimport { bias, calculateCenteredOffset, calculateUpdatedOffset } from './helpers'\n\n// Types\nimport type { GroupProvide } from '@/composables/group'\nimport type { InjectionKey, PropType } from 'vue'\n\nexport const VSlideGroupSymbol: InjectionKey<GroupProvide> = Symbol.for('vuetify:v-slide-group')\n\ninterface SlideGroupSlot {\n next: GroupProvide['next']\n prev: GroupProvide['prev']\n select: GroupProvide['select']\n isSelected: GroupProvide['isSelected']\n}\n\ntype VSlideGroupSlots = {\n default: [SlideGroupSlot]\n prev: [SlideGroupSlot]\n next: [SlideGroupSlot]\n}\n\nexport const makeVSlideGroupProps = propsFactory({\n centerActive: Boolean,\n direction: {\n type: String as PropType<'horizontal' | 'vertical'>,\n default: 'horizontal',\n },\n symbol: {\n type: null,\n default: VSlideGroupSymbol,\n },\n nextIcon: {\n type: IconValue,\n default: '$next',\n },\n prevIcon: {\n type: IconValue,\n default: '$prev',\n },\n showArrows: {\n type: [Boolean, String],\n validator: (v: any) => (\n typeof v === 'boolean' || [\n 'always',\n 'desktop',\n 'mobile',\n ].includes(v)\n ),\n },\n\n ...makeTagProps(),\n ...makeGroupProps({\n selectedClass: 'v-slide-group-item--active',\n }),\n}, 'v-slide-group')\n\nexport const VSlideGroup = genericComponent<VSlideGroupSlots>()({\n name: 'VSlideGroup',\n\n props: makeVSlideGroupProps(),\n\n emits: {\n 'update:modelValue': (value: any) => true,\n },\n\n setup (props, { slots }) {\n const { isRtl } = useRtl()\n const { mobile } = useDisplay()\n const group = useGroup(props, props.symbol)\n const isOverflowing = ref(false)\n const scrollOffset = ref(0)\n const containerSize = ref(0)\n const contentSize = ref(0)\n const isHorizontal = computed(() => props.direction === 'horizontal')\n\n const { resizeRef: containerRef, contentRect: containerRect } = useResizeObserver()\n const { resizeRef: contentRef, contentRect } = useResizeObserver()\n\n const firstSelectedIndex = computed(() => {\n if (!group.selected.value.length) return -1\n\n return group.items.value.findIndex(item => item.id === group.selected.value[0])\n })\n\n const lastSelectedIndex = computed(() => {\n if (!group.selected.value.length) return -1\n\n return group.items.value.findIndex(item => item.id === group.selected.value[group.selected.value.length - 1])\n })\n\n if (IN_BROWSER) {\n let frame = -1\n watch(() => [group.selected.value, containerRect.value, contentRect.value, isHorizontal.value], () => {\n cancelAnimationFrame(frame)\n frame = requestAnimationFrame(() => {\n if (containerRect.value && contentRect.value) {\n const sizeProperty = isHorizontal.value ? 'width' : 'height'\n\n containerSize.value = containerRect.value[sizeProperty]\n contentSize.value = contentRect.value[sizeProperty]\n\n isOverflowing.value = containerSize.value + 1 < contentSize.value\n }\n\n if (firstSelectedIndex.value >= 0 && contentRef.value) {\n // TODO: Is this too naive? Should we store element references in group composable?\n const selectedElement = contentRef.value.children[lastSelectedIndex.value] as HTMLElement\n\n if (firstSelectedIndex.value === 0 || !isOverflowing.value) {\n scrollOffset.value = 0\n } else if (props.centerActive) {\n scrollOffset.value = calculateCenteredOffset({\n selectedElement,\n containerSize: containerSize.value,\n contentSize: contentSize.value,\n isRtl: isRtl.value,\n isHorizontal: isHorizontal.value,\n })\n } else if (isOverflowing.value) {\n scrollOffset.value = calculateUpdatedOffset({\n selectedElement,\n containerSize: containerSize.value,\n contentSize: contentSize.value,\n isRtl: isRtl.value,\n currentScrollOffset: scrollOffset.value,\n isHorizontal: isHorizontal.value,\n })\n }\n }\n })\n })\n }\n\n const disableTransition = ref(false)\n\n let startTouch = 0\n let startOffset = 0\n\n function onTouchstart (e: TouchEvent) {\n const sizeProperty = isHorizontal.value ? 'clientX' : 'clientY'\n const sign = isRtl.value && isHorizontal.value ? -1 : 1\n startOffset = sign * scrollOffset.value\n startTouch = e.touches[0][sizeProperty]\n disableTransition.value = true\n }\n\n function onTouchmove (e: TouchEvent) {\n if (!isOverflowing.value) return\n\n const sizeProperty = isHorizontal.value ? 'clientX' : 'clientY'\n const sign = isRtl.value && isHorizontal.value ? -1 : 1\n scrollOffset.value = sign * (startOffset + startTouch - e.touches[0][sizeProperty])\n }\n\n function onTouchend (e: TouchEvent) {\n const maxScrollOffset = contentSize.value - containerSize.value\n\n if (scrollOffset.value < 0 || !isOverflowing.value) {\n scrollOffset.value = 0\n } else if (scrollOffset.value >= maxScrollOffset) {\n scrollOffset.value = maxScrollOffset\n }\n\n disableTransition.value = false\n }\n\n function onScroll () {\n if (!containerRef.value) return\n\n containerRef.value[isHorizontal.value ? 'scrollLeft' : 'scrollTop'] = 0\n }\n\n const isFocused = ref(false)\n function onFocusin (e: FocusEvent) {\n isFocused.value = true\n\n if (!isOverflowing.value || !contentRef.value) return\n\n // Focused element is likely to be the root of an item, so a\n // breadth-first search will probably find it in the first iteration\n for (const el of e.composedPath()) {\n for (const item of contentRef.value.children) {\n if (item === el) {\n scrollOffset.value = calculateUpdatedOffset({\n selectedElement: item as HTMLElement,\n containerSize: containerSize.value,\n contentSize: contentSize.value,\n isRtl: isRtl.value,\n currentScrollOffset: scrollOffset.value,\n isHorizontal: isHorizontal.value,\n })\n return\n }\n }\n }\n }\n\n function onFocusout (e: FocusEvent) {\n isFocused.value = false\n }\n\n function onFocus (e: FocusEvent) {\n if (\n !isFocused.value &&\n !(e.relatedTarget && contentRef.value?.contains(e.relatedTarget as Node))\n ) focus()\n }\n\n function onKeydown (e: KeyboardEvent) {\n if (!contentRef.value) return\n\n if (isHorizontal.value) {\n if (e.key === 'ArrowRight') {\n focus(isRtl.value ? 'prev' : 'next')\n } else if (e.key === 'ArrowLeft') {\n focus(isRtl.value ? 'next' : 'prev')\n }\n } else {\n if (e.key === 'ArrowDown') {\n focus('next')\n } else if (e.key === 'ArrowUp') {\n focus('prev')\n }\n }\n\n if (e.key === 'Home') {\n focus('first')\n } else if (e.key === 'End') {\n focus('last')\n }\n }\n\n function focus (location?: 'next' | 'prev' | 'first' | 'last') {\n if (!contentRef.value) return\n\n if (!location) {\n const focusable = focusableChildren(contentRef.value)\n focusable[0]?.focus()\n } else if (location === 'next') {\n const el = contentRef.value.querySelector(':focus')?.nextElementSibling as HTMLElement | undefined\n if (el) el.focus()\n else focus('first')\n } else if (location === 'prev') {\n const el = contentRef.value.querySelector(':focus')?.previousElementSibling as HTMLElement | undefined\n if (el) el.focus()\n else focus('last')\n } else if (location === 'first') {\n (contentRef.value.firstElementChild as HTMLElement)?.focus()\n } else if (location === 'last') {\n (contentRef.value.lastElementChild as HTMLElement)?.focus()\n }\n }\n\n function scrollTo (location: 'prev' | 'next') {\n const newAbsoluteOffset = scrollOffset.value + (location === 'prev' ? -1 : 1) * containerSize.value\n\n scrollOffset.value = clamp(newAbsoluteOffset, 0, contentSize.value - containerSize.value)\n }\n\n const contentStyles = computed(() => {\n // This adds friction when scrolling the 'wrong' way when at max offset\n let scrollAmount = scrollOffset.value > contentSize.value - containerSize.value\n ? -(contentSize.value - containerSize.value) + bias(contentSize.value - containerSize.value - scrollOffset.value)\n : -scrollOffset.value\n\n // This adds friction when scrolling the 'wrong' way when at min offset\n if (scrollOffset.value <= 0) {\n scrollAmount = bias(-scrollOffset.value)\n }\n\n const sign = isRtl.value && isHorizontal.value ? -1 : 1\n return {\n transform: `translate${isHorizontal.value ? 'X' : 'Y'}(${sign * scrollAmount}px)`,\n transition: disableTransition.value ? 'none' : '',\n willChange: disableTransition.value ? 'transform' : '',\n }\n })\n\n const slotProps = computed(() => ({\n next: group.next,\n prev: group.prev,\n select: group.select,\n isSelected: group.isSelected,\n }))\n\n const hasAffixes = computed(() => {\n switch (props.showArrows) {\n // Always show arrows on desktop & mobile\n case 'always': return true\n\n // Always show arrows on desktop\n case 'desktop': return !mobile.value\n\n // Show arrows on mobile when overflowing.\n // This matches the default 2.2 behavior\n case true: return isOverflowing.value || Math.abs(scrollOffset.value) > 0\n\n // Always show on mobile\n case 'mobile': return (\n mobile.value ||\n (isOverflowing.value || Math.abs(scrollOffset.value) > 0)\n )\n\n // https://material.io/components/tabs#scrollable-tabs\n // Always show arrows when\n // overflowed on desktop\n default: return (\n !mobile.value &&\n (isOverflowing.value || Math.abs(scrollOffset.value) > 0)\n )\n }\n })\n\n const hasPrev = computed(() => {\n return Math.abs(scrollOffset.value) > 0\n })\n\n const hasNext = computed(() => {\n // Check one scroll ahead to know the width of right-most item\n return contentSize.value > Math.abs(scrollOffset.value) + containerSize.value\n })\n\n useRender(() => (\n <props.tag\n class={[\n 'v-slide-group',\n {\n 'v-slide-group--vertical': !isHorizontal.value,\n 'v-slide-group--has-affixes': hasAffixes.value,\n 'v-slide-group--is-overflowing': isOverflowing.value,\n },\n ]}\n tabindex={ (isFocused.value || group.selected.value.length) ? -1 : 0 }\n onFocus={ onFocus }\n >\n { hasAffixes.value && (\n <div\n key=\"prev\"\n class={[\n 'v-slide-group__prev',\n { 'v-slide-group__prev--disabled': !hasPrev.value },\n ]}\n onClick={ () => scrollTo('prev') }\n >\n { slots.prev?.(slotProps.value) ?? (\n <VFadeTransition>\n <VIcon icon={ isRtl.value ? props.nextIcon : props.prevIcon }></VIcon>\n </VFadeTransition>\n )}\n </div>\n )}\n\n <div\n key=\"container\"\n ref={ containerRef }\n class=\"v-slide-group__container\"\n onScroll={ onScroll }\n >\n <div\n ref={ contentRef }\n class=\"v-slide-group__content\"\n style={ contentStyles.value }\n onTouchstartPassive={ onTouchstart }\n onTouchmovePassive={ onTouchmove }\n onTouchendPassive={ onTouchend }\n onFocusin={ onFocusin }\n onFocusout={ onFocusout }\n onKeydown={ onKeydown }\n >\n { slots.default?.(slotProps.value) }\n </div>\n </div>\n\n { hasAffixes.value && (\n <div\n key=\"next\"\n class={[\n 'v-slide-group__next',\n { 'v-slide-group__next--disabled': !hasNext.value },\n ]}\n onClick={ () => scrollTo('next') }\n >\n { slots.next?.(slotProps.value) ?? (\n <VFadeTransition>\n <VIcon icon={ isRtl.value ? props.prevIcon : props.nextIcon }></VIcon>\n </VFadeTransition>\n )}\n </div>\n )}\n </props.tag>\n ))\n\n return {\n selected: group.selected,\n scrollTo,\n scrollOffset,\n focus,\n }\n },\n})\n\nexport type VSlideGroup = InstanceType<typeof VSlideGroup>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,eAAe;AAAA,SACfC,KAAK,8BAEd;AAAA,SACSC,SAAS;AAAA,SACTC,cAAc,EAAEC,QAAQ;AAAA,SACxBC,YAAY;AAAA,SACZC,UAAU;AAAA,SACVC,iBAAiB;AAAA,SACjBC,MAAM,wCAEf;AACA,SAASC,QAAQ,EAAEC,GAAG,EAAEC,KAAK,QAAQ,KAAK;AAAA,SACjCC,KAAK,EAAEC,iBAAiB,EAAEC,gBAAgB,EAAEC,UAAU,EAAEC,YAAY,EAAEC,SAAS;AAAA,SAC/EC,IAAI,EAAEC,uBAAuB,EAAEC,sBAAsB,yBAE9D;AAIA,OAAO,MAAMC,iBAA6C,GAAGC,MAAM,CAACC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OAAO;MACL6B,QAAQ,EAAEZ,KAAK,CAACY,QAAQ;MACxB2C,QAAQ;MACRrD,YAAY;MACZ2C;IACF,CAAC;EACH;AACF,CAAC,CAAC"}
|
|
@@ -3,7 +3,7 @@ import { mergeProps as _mergeProps, createVNode as _createVNode, Fragment as _Fr
|
|
|
3
3
|
import "./VSlider.css";
|
|
4
4
|
|
|
5
5
|
// Components
|
|
6
|
-
import {
|
|
6
|
+
import { makeVInputProps, VInput } from "../VInput/VInput.mjs";
|
|
7
7
|
import { VLabel } from "../VLabel/index.mjs";
|
|
8
8
|
import { VSliderThumb } from "./VSliderThumb.mjs";
|
|
9
9
|
import { VSliderTrack } from "./VSliderTrack.mjs"; // Composables
|
|
@@ -62,7 +62,7 @@ export const VSlider = genericComponent()({
|
|
|
62
62
|
} = useFocus(props);
|
|
63
63
|
const trackStop = computed(() => position(model.value));
|
|
64
64
|
useRender(() => {
|
|
65
|
-
const [inputProps, _] =
|
|
65
|
+
const [inputProps, _] = VInput.filterProps(props);
|
|
66
66
|
const hasPrepend = !!(props.label || slots.label || slots.prepend);
|
|
67
67
|
return _createVNode(VInput, _mergeProps({
|
|
68
68
|
"class": ['v-slider', {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VSlider.mjs","names":["
|
|
1
|
+
{"version":3,"file":"VSlider.mjs","names":["makeVInputProps","VInput","VLabel","VSliderThumb","VSliderTrack","makeFocusProps","useFocus","makeSliderProps","useSlider","useProxiedModel","computed","ref","genericComponent","useRender","VSlider","name","props","modelValue","type","Number","String","default","emits","value","v","setup","_ref","slots","thumbContainerRef","min","max","mousePressed","roundValue","onSliderMousedown","onSliderTouchstart","trackContainerRef","position","hasLabels","readonly","handleSliderMouseUp","newValue","model","handleMouseMove","getActiveThumb","$el","undefined","parseFloat","isFocused","focus","blur","trackStop","inputProps","_","filterProps","hasPrepend","label","prepend","_createVNode","_mergeProps","disabled","slotProps","_Fragment","id","_ref2","messagesId","elevation"],"sources":["../../../src/components/VSlider/VSlider.tsx"],"sourcesContent":["// Styles\nimport './VSlider.sass'\n\n// Components\nimport { makeVInputProps, VInput } from '@/components/VInput/VInput'\nimport { VLabel } from '@/components/VLabel'\nimport { VSliderThumb } from './VSliderThumb'\nimport { VSliderTrack } from './VSliderTrack'\n\n// Composables\nimport { makeFocusProps, useFocus } from '@/composables/focus'\nimport { makeSliderProps, useSlider } from './slider'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, ref } from 'vue'\nimport { genericComponent, useRender } from '@/util'\n\n// Types\nimport type { MakeSlots } from '@/util'\nimport type { VInputSlots } from '@/components/VInput/VInput'\n\nexport type VSliderSlots = VInputSlots & MakeSlots<{\n 'tick-label': []\n 'thumb-label': []\n}>\n\nexport const VSlider = genericComponent<VSliderSlots>()({\n name: 'VSlider',\n\n props: {\n ...makeFocusProps(),\n ...makeSliderProps(),\n ...makeVInputProps(),\n\n modelValue: {\n type: [Number, String],\n default: 0,\n },\n },\n\n emits: {\n 'update:focused': (value: boolean) => true,\n 'update:modelValue': (v: number) => true,\n },\n\n setup (props, { slots }) {\n const thumbContainerRef = ref()\n\n const {\n min,\n max,\n mousePressed,\n roundValue,\n onSliderMousedown,\n onSliderTouchstart,\n trackContainerRef,\n position,\n hasLabels,\n readonly,\n } = useSlider({\n props,\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n handleSliderMouseUp: newValue => model.value = roundValue(newValue),\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n handleMouseMove: newValue => model.value = roundValue(newValue),\n getActiveThumb: () => thumbContainerRef.value?.$el,\n })\n\n const model = useProxiedModel(\n props,\n 'modelValue',\n undefined,\n v => {\n const value = typeof v === 'string' ? parseFloat(v) : v == null ? min.value : v\n\n return roundValue(value)\n },\n )\n\n const { isFocused, focus, blur } = useFocus(props)\n const trackStop = computed(() => position(model.value))\n\n useRender(() => {\n const [inputProps, _] = VInput.filterProps(props)\n const hasPrepend = !!(props.label || slots.label || slots.prepend)\n\n return (\n <VInput\n class={[\n 'v-slider',\n {\n 'v-slider--has-labels': !!slots['tick-label'] || hasLabels.value,\n 'v-slider--focused': isFocused.value,\n 'v-slider--pressed': mousePressed.value,\n 'v-slider--disabled': props.disabled,\n },\n ]}\n { ...inputProps }\n focused={ isFocused.value }\n >\n {{\n ...slots,\n prepend: hasPrepend ? slotProps => (\n <>\n { slots.label?.(slotProps) ?? props.label\n ? (\n <VLabel\n id={ slotProps.id.value }\n class=\"v-slider__label\"\n text={ props.label }\n />\n ) : undefined\n }\n\n { slots.prepend?.(slotProps) }\n </>\n ) : undefined,\n default: ({ id, messagesId }) => (\n <div\n class=\"v-slider__container\"\n onMousedown={ !readonly.value ? onSliderMousedown : undefined }\n onTouchstartPassive={ !readonly.value ? onSliderTouchstart : undefined }\n >\n <input\n id={ id.value }\n name={ props.name || id.value }\n disabled={ props.disabled }\n readonly={ props.readonly }\n tabindex=\"-1\"\n value={ model.value }\n />\n\n <VSliderTrack\n ref={ trackContainerRef }\n start={ 0 }\n stop={ trackStop.value }\n >\n {{ 'tick-label': slots['tick-label'] }}\n </VSliderTrack>\n\n <VSliderThumb\n ref={ thumbContainerRef }\n aria-describedby={ messagesId.value }\n focused={ isFocused.value }\n min={ min.value }\n max={ max.value }\n modelValue={ model.value }\n onUpdate:modelValue={ v => (model.value = v) }\n position={ trackStop.value }\n elevation={ props.elevation }\n onFocus={ focus }\n onBlur={ blur }\n >\n {{ 'thumb-label': slots['thumb-label'] }}\n </VSliderThumb>\n </div>\n ),\n }}\n </VInput>\n )\n })\n\n return {}\n },\n})\n\nexport type VSlider = InstanceType<typeof VSlider>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,eAAe,EAAEC,MAAM;AAAA,SACvBC,MAAM;AAAA,SACNC,YAAY;AAAA,SACZC,YAAY,8BAErB;AAAA,SACSC,cAAc,EAAEC,QAAQ;AAAA,SACxBC,eAAe,EAAEC,SAAS;AAAA,SAC1BC,eAAe,8CAExB;AACA,SAASC,QAAQ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
|
|
54
54
|
rules: ValidationRule[];
|
|
55
|
+
persistentHint: boolean;
|
|
55
56
|
showTicks: boolean | "always";
|
|
56
57
|
tickSize: string | number;
|
|
57
58
|
trackSize: string | number;
|
|
@@ -74,6 +75,7 @@ declare const VSlider: {
|
|
|
74
75
|
errorMessages: string | string[];
|
|
75
76
|
maxErrors: string | number;
|
|
76
77
|
rules: ValidationRule[];
|
|
78
|
+
persistentHint: boolean;
|
|
77
79
|
showTicks: boolean | "always";
|
|
78
80
|
tickSize: string | number;
|
|
79
81
|
trackSize: string | number;
|
|
@@ -88,8 +90,10 @@ declare const VSlider: {
|
|
|
88
90
|
appendIcon?: IconValue | undefined;
|
|
89
91
|
'onClick:append'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
|
|
90
92
|
'onClick:prepend'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
|
|
93
|
+
'onUpdate:focused'?: EventProp<[FocusEvent], (args_0: FocusEvent) => any> | undefined;
|
|
91
94
|
validateOn?: "input" | "blur" | "submit" | undefined;
|
|
92
95
|
validationValue?: any;
|
|
96
|
+
hint?: string | undefined;
|
|
93
97
|
hideDetails?: boolean | "auto" | undefined;
|
|
94
98
|
trackColor?: string | undefined;
|
|
95
99
|
trackFillColor?: string | undefined;
|
|
@@ -131,7 +135,7 @@ declare const VSlider: {
|
|
|
131
135
|
} & {
|
|
132
136
|
"onUpdate:modelValue"?: ((v: number) => any) | undefined;
|
|
133
137
|
"onUpdate:focused"?: ((value: boolean) => any) | undefined;
|
|
134
|
-
} & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, "reverse" | "max" | "error" | "direction" | "disabled" | "readonly" | "step" | "min" | "elevation" | "messages" | "rounded" | "density" | "modelValue" | "focused" | "errorMessages" | "maxErrors" | "rules" | "showTicks" | "tickSize" | "trackSize" | "thumbLabel" | "thumbSize">;
|
|
138
|
+
} & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, "reverse" | "max" | "error" | "direction" | "disabled" | "readonly" | "step" | "min" | "elevation" | "messages" | "rounded" | "density" | "modelValue" | "focused" | "errorMessages" | "maxErrors" | "rules" | "persistentHint" | "showTicks" | "tickSize" | "trackSize" | "thumbLabel" | "thumbSize">;
|
|
135
139
|
$attrs: {
|
|
136
140
|
[x: string]: unknown;
|
|
137
141
|
};
|
|
@@ -162,6 +166,7 @@ declare const VSlider: {
|
|
|
162
166
|
errorMessages: string | string[];
|
|
163
167
|
maxErrors: string | number;
|
|
164
168
|
rules: ValidationRule[];
|
|
169
|
+
persistentHint: boolean;
|
|
165
170
|
showTicks: boolean | "always";
|
|
166
171
|
tickSize: string | number;
|
|
167
172
|
trackSize: string | number;
|
|
@@ -176,8 +181,10 @@ declare const VSlider: {
|
|
|
176
181
|
appendIcon?: IconValue | undefined;
|
|
177
182
|
'onClick:append'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
|
|
178
183
|
'onClick:prepend'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
|
|
184
|
+
'onUpdate:focused'?: EventProp<[FocusEvent], (args_0: FocusEvent) => any> | undefined;
|
|
179
185
|
validateOn?: "input" | "blur" | "submit" | undefined;
|
|
180
186
|
validationValue?: any;
|
|
187
|
+
hint?: string | undefined;
|
|
181
188
|
hideDetails?: boolean | "auto" | undefined;
|
|
182
189
|
trackColor?: string | undefined;
|
|
183
190
|
trackFillColor?: string | undefined;
|
|
@@ -240,6 +247,7 @@ declare const VSlider: {
|
|
|
240
247
|
errorMessages: string | string[];
|
|
241
248
|
maxErrors: string | number;
|
|
242
249
|
rules: ValidationRule[];
|
|
250
|
+
persistentHint: boolean;
|
|
243
251
|
showTicks: boolean | "always";
|
|
244
252
|
tickSize: string | number;
|
|
245
253
|
trackSize: string | number;
|
|
@@ -282,6 +290,7 @@ declare const VSlider: {
|
|
|
282
290
|
errorMessages: string | string[];
|
|
283
291
|
maxErrors: string | number;
|
|
284
292
|
rules: ValidationRule[];
|
|
293
|
+
persistentHint: boolean;
|
|
285
294
|
showTicks: boolean | "always";
|
|
286
295
|
tickSize: string | number;
|
|
287
296
|
trackSize: string | number;
|
|
@@ -296,8 +305,10 @@ declare const VSlider: {
|
|
|
296
305
|
appendIcon?: IconValue | undefined;
|
|
297
306
|
'onClick:append'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
|
|
298
307
|
'onClick:prepend'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
|
|
308
|
+
'onUpdate:focused'?: EventProp<[FocusEvent], (args_0: FocusEvent) => any> | undefined;
|
|
299
309
|
validateOn?: "input" | "blur" | "submit" | undefined;
|
|
300
310
|
validationValue?: any;
|
|
311
|
+
hint?: string | undefined;
|
|
301
312
|
hideDetails?: boolean | "auto" | undefined;
|
|
302
313
|
trackColor?: string | undefined;
|
|
303
314
|
trackFillColor?: string | undefined;
|
|
@@ -360,6 +371,7 @@ declare const VSlider: {
|
|
|
360
371
|
errorMessages: string | string[];
|
|
361
372
|
maxErrors: string | number;
|
|
362
373
|
rules: ValidationRule[];
|
|
374
|
+
persistentHint: boolean;
|
|
363
375
|
showTicks: boolean | "always";
|
|
364
376
|
tickSize: string | number;
|
|
365
377
|
trackSize: string | number;
|
|
@@ -374,8 +386,10 @@ declare const VSlider: {
|
|
|
374
386
|
appendIcon?: IconValue | undefined;
|
|
375
387
|
'onClick:append'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
|
|
376
388
|
'onClick:prepend'?: EventProp<[MouseEvent], (args_0: MouseEvent) => any> | undefined;
|
|
389
|
+
'onUpdate:focused'?: EventProp<[FocusEvent], (args_0: FocusEvent) => any> | undefined;
|
|
377
390
|
validateOn?: "input" | "blur" | "submit" | undefined;
|
|
378
391
|
validationValue?: any;
|
|
392
|
+
hint?: string | undefined;
|
|
379
393
|
hideDetails?: boolean | "auto" | undefined;
|
|
380
394
|
trackColor?: string | undefined;
|
|
381
395
|
trackFillColor?: string | undefined;
|
|
@@ -438,6 +452,7 @@ declare const VSlider: {
|
|
|
438
452
|
errorMessages: string | string[];
|
|
439
453
|
maxErrors: string | number;
|
|
440
454
|
rules: ValidationRule[];
|
|
455
|
+
persistentHint: boolean;
|
|
441
456
|
showTicks: boolean | "always";
|
|
442
457
|
tickSize: string | number;
|
|
443
458
|
trackSize: string | number;
|
|
@@ -449,6 +464,7 @@ declare const VSlider: {
|
|
|
449
464
|
default: number;
|
|
450
465
|
};
|
|
451
466
|
focused: BooleanConstructor;
|
|
467
|
+
'onUpdate:focused': vue.PropType<EventProp<[FocusEvent], (args_0: FocusEvent) => any>>;
|
|
452
468
|
disabled: BooleanConstructor;
|
|
453
469
|
error: BooleanConstructor;
|
|
454
470
|
errorMessages: {
|
|
@@ -477,6 +493,8 @@ declare const VSlider: {
|
|
|
477
493
|
appendIcon: vue.PropType<IconValue>;
|
|
478
494
|
prependIcon: vue.PropType<IconValue>;
|
|
479
495
|
hideDetails: vue.PropType<boolean | "auto">;
|
|
496
|
+
hint: StringConstructor;
|
|
497
|
+
persistentHint: BooleanConstructor;
|
|
480
498
|
messages: {
|
|
481
499
|
type: vue.PropType<string | string[]>;
|
|
482
500
|
default: () => never[];
|
|
@@ -547,6 +565,7 @@ declare const VSlider: {
|
|
|
547
565
|
default: number;
|
|
548
566
|
};
|
|
549
567
|
focused: BooleanConstructor;
|
|
568
|
+
'onUpdate:focused': vue.PropType<EventProp<[FocusEvent], (args_0: FocusEvent) => any>>;
|
|
550
569
|
disabled: BooleanConstructor;
|
|
551
570
|
error: BooleanConstructor;
|
|
552
571
|
errorMessages: {
|
|
@@ -575,6 +594,8 @@ declare const VSlider: {
|
|
|
575
594
|
appendIcon: vue.PropType<IconValue>;
|
|
576
595
|
prependIcon: vue.PropType<IconValue>;
|
|
577
596
|
hideDetails: vue.PropType<boolean | "auto">;
|
|
597
|
+
hint: StringConstructor;
|
|
598
|
+
persistentHint: BooleanConstructor;
|
|
578
599
|
messages: {
|
|
579
600
|
type: vue.PropType<string | string[]>;
|
|
580
601
|
default: () => never[];
|
|
@@ -4,7 +4,7 @@ import "./VSwitch.css";
|
|
|
4
4
|
|
|
5
5
|
// Components
|
|
6
6
|
import { makeSelectionControlProps, VSelectionControl } from "../VSelectionControl/VSelectionControl.mjs";
|
|
7
|
-
import {
|
|
7
|
+
import { makeVInputProps, VInput } from "../VInput/VInput.mjs";
|
|
8
8
|
import { VProgressCircular } from "../VProgressCircular/index.mjs"; // Composables
|
|
9
9
|
import { LoaderSlot, useLoader } from "../../composables/loader.mjs";
|
|
10
10
|
import { useFocus } from "../../composables/focus.mjs";
|
|
@@ -57,10 +57,12 @@ export const VSwitch = genericComponent()({
|
|
|
57
57
|
}
|
|
58
58
|
useRender(() => {
|
|
59
59
|
const [inputAttrs, controlAttrs] = filterInputAttrs(attrs);
|
|
60
|
-
const [inputProps, _1] =
|
|
60
|
+
const [inputProps, _1] = VInput.filterProps(props);
|
|
61
61
|
const [controlProps, _2] = VSelectionControl.filterProps(props);
|
|
62
62
|
const control = ref();
|
|
63
|
-
function onClick() {
|
|
63
|
+
function onClick(e) {
|
|
64
|
+
e.stopPropagation();
|
|
65
|
+
e.preventDefault();
|
|
64
66
|
control.value?.input?.click();
|
|
65
67
|
}
|
|
66
68
|
return _createVNode(VInput, _mergeProps({
|