@vuetify/nightly 3.6.11-master.2024-07-07 → 3.6.12-master.2024-07-10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -7
- package/dist/json/attributes.json +58 -70
- package/dist/json/importMap-labs.json +12 -12
- package/dist/json/importMap.json +114 -114
- package/dist/json/tags.json +4 -7
- package/dist/json/web-types.json +98 -117
- package/dist/vuetify-labs.css +3483 -3461
- package/dist/vuetify-labs.d.ts +640 -751
- package/dist/vuetify-labs.esm.js +80 -70
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +80 -70
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +1390 -1368
- package/dist/vuetify.d.ts +604 -697
- package/dist/vuetify.esm.js +63 -54
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +63 -54
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +48 -46
- package/dist/vuetify.min.js.map +1 -1
- package/lib/blueprints/index.d.mts +3 -3
- package/lib/blueprints/md1.d.mts +3 -3
- package/lib/blueprints/md2.d.mts +3 -3
- package/lib/blueprints/md3.d.mts +3 -3
- package/lib/components/VAutocomplete/index.d.mts +25 -31
- package/lib/components/VBottomSheet/index.d.mts +10 -10
- package/lib/components/VCheckbox/index.d.mts +2 -8
- package/lib/components/VCombobox/index.d.mts +25 -31
- package/lib/components/VDataTable/VDataTableFooter.mjs +5 -4
- package/lib/components/VDataTable/VDataTableFooter.mjs.map +1 -1
- package/lib/components/VDataTable/index.d.mts +108 -108
- package/lib/components/VDatePicker/VDatePickerControls.mjs +5 -4
- package/lib/components/VDatePicker/VDatePickerControls.mjs.map +1 -1
- package/lib/components/VDatePicker/VDatePickerMonth.mjs +1 -1
- package/lib/components/VDatePicker/VDatePickerMonth.mjs.map +1 -1
- package/lib/components/VDatePicker/index.d.mts +70 -55
- package/lib/components/VDialog/index.d.mts +28 -28
- package/lib/components/VExpansionPanel/VExpansionPanels.mjs +6 -2
- package/lib/components/VExpansionPanel/VExpansionPanels.mjs.map +1 -1
- package/lib/components/VExpansionPanel/index.d.mts +48 -66
- package/lib/components/VField/VField.css +11 -6
- package/lib/components/VField/VField.mjs +5 -7
- package/lib/components/VField/VField.mjs.map +1 -1
- package/lib/components/VField/VField.sass +6 -2
- package/lib/components/VField/index.d.mts +6 -12
- package/lib/components/VFileInput/index.d.mts +6 -12
- package/lib/components/VInput/VInput.css +5 -5
- package/lib/components/VInput/VInput.mjs +1 -4
- package/lib/components/VInput/VInput.mjs.map +1 -1
- package/lib/components/VInput/VInput.sass +1 -1
- package/lib/components/VInput/index.d.mts +2 -8
- package/lib/components/VMenu/index.d.mts +32 -32
- package/lib/components/VOverlay/index.d.mts +10 -10
- package/lib/components/VOverlay/locationStrategies.mjs.map +1 -1
- package/lib/components/VProgressLinear/VProgressLinear.css +17 -0
- package/lib/components/VProgressLinear/VProgressLinear.mjs +6 -5
- package/lib/components/VProgressLinear/VProgressLinear.mjs.map +1 -1
- package/lib/components/VProgressLinear/VProgressLinear.sass +11 -0
- package/lib/components/VRadio/VRadio.mjs +8 -5
- package/lib/components/VRadio/VRadio.mjs.map +1 -1
- package/lib/components/VRadioGroup/index.d.mts +2 -8
- package/lib/components/VRangeSlider/index.d.mts +2 -8
- package/lib/components/VSelect/index.d.mts +25 -31
- package/lib/components/VSlider/index.d.mts +2 -8
- package/lib/components/VSnackbar/index.d.mts +28 -28
- package/lib/components/VSpeedDial/index.d.mts +14 -14
- package/lib/components/VSwitch/index.d.mts +2 -8
- package/lib/components/VTextField/VTextField.mjs +1 -1
- package/lib/components/VTextField/VTextField.mjs.map +1 -1
- package/lib/components/VTextField/index.d.mts +18 -24
- package/lib/components/VTextarea/VTextarea.mjs +5 -5
- package/lib/components/VTextarea/VTextarea.mjs.map +1 -1
- package/lib/components/VTextarea/index.d.mts +72 -87
- package/lib/components/VTooltip/index.d.mts +32 -32
- package/lib/components/index.d.mts +646 -739
- package/lib/composables/calendar.mjs +10 -4
- package/lib/composables/calendar.mjs.map +1 -1
- package/lib/composables/date/DateAdapter.mjs.map +1 -1
- package/lib/composables/date/adapters/vuetify.mjs +15 -13
- package/lib/composables/date/adapters/vuetify.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/framework.mjs +1 -1
- package/lib/index.d.mts +48 -48
- package/lib/labs/VCalendar/VCalendar.mjs +7 -6
- package/lib/labs/VCalendar/VCalendar.mjs.map +1 -1
- package/lib/labs/VCalendar/index.d.mts +6 -0
- package/lib/labs/VDateInput/index.d.mts +39 -39
- package/lib/labs/VNumberInput/VNumberInput.mjs +1 -1
- package/lib/labs/VNumberInput/VNumberInput.mjs.map +1 -1
- package/lib/labs/VNumberInput/index.d.mts +6 -12
- package/lib/labs/VSnackbarQueue/index.d.mts +37 -37
- package/lib/labs/VStepperVertical/index.d.mts +0 -18
- package/lib/labs/VTimePicker/VTimePicker.mjs +5 -5
- package/lib/labs/VTimePicker/VTimePicker.mjs.map +1 -1
- package/lib/labs/VTimePicker/VTimePickerClock.mjs +2 -2
- package/lib/labs/VTimePicker/VTimePickerClock.mjs.map +1 -1
- package/lib/labs/VTimePicker/VTimePickerControls.mjs +2 -2
- package/lib/labs/VTimePicker/VTimePickerControls.mjs.map +1 -1
- package/lib/labs/VTimePicker/index.d.mts +18 -18
- package/lib/labs/components.d.mts +106 -124
- package/package.json +1 -1
@@ -63,7 +63,7 @@ interface LocationStrategyData {
|
|
63
63
|
isRtl: Ref<boolean>;
|
64
64
|
}
|
65
65
|
type LocationStrategyFn = (data: LocationStrategyData, props: StrategyProps, contentStyles: Ref<Record<string, string>>) => undefined | {
|
66
|
-
updateLocation: (e
|
66
|
+
updateLocation: (e?: Event) => void;
|
67
67
|
};
|
68
68
|
declare const locationStrategies: {
|
69
69
|
static: typeof staticLocationStrategy;
|
@@ -105,7 +105,7 @@ declare const VMenu: {
|
|
105
105
|
eager: boolean;
|
106
106
|
location: Anchor;
|
107
107
|
locationStrategy: NonNullable<"static" | ((data: LocationStrategyData, props: StrategyProps, contentStyles: vue.Ref<Record<string, string>>) => {
|
108
|
-
updateLocation: (e
|
108
|
+
updateLocation: (e?: Event | undefined) => void;
|
109
109
|
} | undefined) | "connected">;
|
110
110
|
scrollStrategy: NonNullable<"close" | "none" | "block" | ((data: ScrollStrategyData, props: StrategyProps$1, scope: vue.EffectScope) => void) | "reposition">;
|
111
111
|
closeDelay: NonNullable<string | number>;
|
@@ -190,7 +190,7 @@ declare const VMenu: {
|
|
190
190
|
eager: boolean;
|
191
191
|
location: Anchor;
|
192
192
|
locationStrategy: "static" | ((data: LocationStrategyData, props: StrategyProps, contentStyles: vue.Ref<Record<string, string>>) => {
|
193
|
-
updateLocation: (e
|
193
|
+
updateLocation: (e?: Event | undefined) => void;
|
194
194
|
} | undefined) | "connected";
|
195
195
|
scrollStrategy: "close" | "none" | "block" | ((data: ScrollStrategyData, props: StrategyProps$1, scope: vue.EffectScope) => void) | "reposition";
|
196
196
|
activatorProps: Record<string, any>;
|
@@ -217,7 +217,7 @@ declare const VMenu: {
|
|
217
217
|
eager: boolean;
|
218
218
|
location: Anchor;
|
219
219
|
locationStrategy: "static" | ((data: LocationStrategyData, props: StrategyProps, contentStyles: vue.Ref<Record<string, string>>) => {
|
220
|
-
updateLocation: (e
|
220
|
+
updateLocation: (e?: Event | undefined) => void;
|
221
221
|
} | undefined) | "connected";
|
222
222
|
scrollStrategy: "close" | "none" | "block" | ((data: ScrollStrategyData, props: StrategyProps$1, scope: vue.EffectScope) => void) | "reposition";
|
223
223
|
activatorProps: Record<string, any>;
|
@@ -295,7 +295,7 @@ declare const VMenu: {
|
|
295
295
|
eager: boolean;
|
296
296
|
location: Anchor;
|
297
297
|
locationStrategy: "static" | ((data: LocationStrategyData, props: StrategyProps, contentStyles: vue.Ref<Record<string, string>>) => {
|
298
|
-
updateLocation: (e
|
298
|
+
updateLocation: (e?: Event | undefined) => void;
|
299
299
|
} | undefined) | "connected";
|
300
300
|
scrollStrategy: "close" | "none" | "block" | ((data: ScrollStrategyData, props: StrategyProps$1, scope: vue.EffectScope) => void) | "reposition";
|
301
301
|
activatorProps: Record<string, any>;
|
@@ -402,7 +402,7 @@ declare const VMenu: {
|
|
402
402
|
eager: boolean;
|
403
403
|
location: Anchor;
|
404
404
|
locationStrategy: "static" | ((data: LocationStrategyData, props: StrategyProps, contentStyles: vue.Ref<Record<string, string>>) => {
|
405
|
-
updateLocation: (e
|
405
|
+
updateLocation: (e?: Event | undefined) => void;
|
406
406
|
} | undefined) | "connected";
|
407
407
|
scrollStrategy: "close" | "none" | "block" | ((data: ScrollStrategyData, props: StrategyProps$1, scope: vue.EffectScope) => void) | "reposition";
|
408
408
|
activatorProps: Record<string, any>;
|
@@ -498,7 +498,7 @@ declare const VMenu: {
|
|
498
498
|
eager: boolean;
|
499
499
|
location: Anchor;
|
500
500
|
locationStrategy: "static" | ((data: LocationStrategyData, props: StrategyProps, contentStyles: vue.Ref<Record<string, string>>) => {
|
501
|
-
updateLocation: (e
|
501
|
+
updateLocation: (e?: Event | undefined) => void;
|
502
502
|
} | undefined) | "connected";
|
503
503
|
scrollStrategy: "close" | "none" | "block" | ((data: ScrollStrategyData, props: StrategyProps$1, scope: vue.EffectScope) => void) | "reposition";
|
504
504
|
activatorProps: Record<string, any>;
|
@@ -558,7 +558,7 @@ declare const VMenu: {
|
|
558
558
|
eager: boolean;
|
559
559
|
location: Anchor;
|
560
560
|
locationStrategy: "static" | ((data: LocationStrategyData, props: StrategyProps, contentStyles: vue.Ref<Record<string, string>>) => {
|
561
|
-
updateLocation: (e
|
561
|
+
updateLocation: (e?: Event | undefined) => void;
|
562
562
|
} | undefined) | "connected";
|
563
563
|
scrollStrategy: "close" | "none" | "block" | ((data: ScrollStrategyData, props: StrategyProps$1, scope: vue.EffectScope) => void) | "reposition";
|
564
564
|
activatorProps: Record<string, any>;
|
@@ -652,7 +652,7 @@ declare const VMenu: {
|
|
652
652
|
eager: boolean;
|
653
653
|
location: Anchor;
|
654
654
|
locationStrategy: NonNullable<"static" | ((data: LocationStrategyData, props: StrategyProps, contentStyles: vue.Ref<Record<string, string>>) => {
|
655
|
-
updateLocation: (e
|
655
|
+
updateLocation: (e?: Event | undefined) => void;
|
656
656
|
} | undefined) | "connected">;
|
657
657
|
scrollStrategy: NonNullable<"close" | "none" | "block" | ((data: ScrollStrategyData, props: StrategyProps$1, scope: vue.EffectScope) => void) | "reposition">;
|
658
658
|
closeDelay: NonNullable<string | number>;
|
@@ -732,7 +732,7 @@ declare const VMenu: {
|
|
732
732
|
eager: boolean;
|
733
733
|
location: Anchor;
|
734
734
|
locationStrategy: NonNullable<"static" | ((data: LocationStrategyData, props: StrategyProps, contentStyles: vue.Ref<Record<string, string>>) => {
|
735
|
-
updateLocation: (e
|
735
|
+
updateLocation: (e?: Event | undefined) => void;
|
736
736
|
} | undefined) | "connected">;
|
737
737
|
scrollStrategy: NonNullable<"close" | "none" | "block" | ((data: ScrollStrategyData, props: StrategyProps$1, scope: vue.EffectScope) => void) | "reposition">;
|
738
738
|
closeDelay: NonNullable<string | number>;
|
@@ -781,7 +781,7 @@ declare const VMenu: {
|
|
781
781
|
eager: boolean;
|
782
782
|
location: Anchor;
|
783
783
|
locationStrategy: NonNullable<"static" | ((data: LocationStrategyData, props: StrategyProps, contentStyles: vue.Ref<Record<string, string>>) => {
|
784
|
-
updateLocation: (e
|
784
|
+
updateLocation: (e?: Event | undefined) => void;
|
785
785
|
} | undefined) | "connected">;
|
786
786
|
scrollStrategy: NonNullable<"close" | "none" | "block" | ((data: ScrollStrategyData, props: StrategyProps$1, scope: vue.EffectScope) => void) | "reposition">;
|
787
787
|
closeDelay: NonNullable<string | number>;
|
@@ -866,7 +866,7 @@ declare const VMenu: {
|
|
866
866
|
eager: boolean;
|
867
867
|
location: Anchor;
|
868
868
|
locationStrategy: "static" | ((data: LocationStrategyData, props: StrategyProps, contentStyles: vue.Ref<Record<string, string>>) => {
|
869
|
-
updateLocation: (e
|
869
|
+
updateLocation: (e?: Event | undefined) => void;
|
870
870
|
} | undefined) | "connected";
|
871
871
|
scrollStrategy: "close" | "none" | "block" | ((data: ScrollStrategyData, props: StrategyProps$1, scope: vue.EffectScope) => void) | "reposition";
|
872
872
|
activatorProps: Record<string, any>;
|
@@ -893,7 +893,7 @@ declare const VMenu: {
|
|
893
893
|
eager: boolean;
|
894
894
|
location: Anchor;
|
895
895
|
locationStrategy: "static" | ((data: LocationStrategyData, props: StrategyProps, contentStyles: vue.Ref<Record<string, string>>) => {
|
896
|
-
updateLocation: (e
|
896
|
+
updateLocation: (e?: Event | undefined) => void;
|
897
897
|
} | undefined) | "connected";
|
898
898
|
scrollStrategy: "close" | "none" | "block" | ((data: ScrollStrategyData, props: StrategyProps$1, scope: vue.EffectScope) => void) | "reposition";
|
899
899
|
activatorProps: Record<string, any>;
|
@@ -971,7 +971,7 @@ declare const VMenu: {
|
|
971
971
|
eager: boolean;
|
972
972
|
location: Anchor;
|
973
973
|
locationStrategy: "static" | ((data: LocationStrategyData, props: StrategyProps, contentStyles: vue.Ref<Record<string, string>>) => {
|
974
|
-
updateLocation: (e
|
974
|
+
updateLocation: (e?: Event | undefined) => void;
|
975
975
|
} | undefined) | "connected";
|
976
976
|
scrollStrategy: "close" | "none" | "block" | ((data: ScrollStrategyData, props: StrategyProps$1, scope: vue.EffectScope) => void) | "reposition";
|
977
977
|
activatorProps: Record<string, any>;
|
@@ -1078,7 +1078,7 @@ declare const VMenu: {
|
|
1078
1078
|
eager: boolean;
|
1079
1079
|
location: Anchor;
|
1080
1080
|
locationStrategy: "static" | ((data: LocationStrategyData, props: StrategyProps, contentStyles: vue.Ref<Record<string, string>>) => {
|
1081
|
-
updateLocation: (e
|
1081
|
+
updateLocation: (e?: Event | undefined) => void;
|
1082
1082
|
} | undefined) | "connected";
|
1083
1083
|
scrollStrategy: "close" | "none" | "block" | ((data: ScrollStrategyData, props: StrategyProps$1, scope: vue.EffectScope) => void) | "reposition";
|
1084
1084
|
activatorProps: Record<string, any>;
|
@@ -1174,7 +1174,7 @@ declare const VMenu: {
|
|
1174
1174
|
eager: boolean;
|
1175
1175
|
location: Anchor;
|
1176
1176
|
locationStrategy: "static" | ((data: LocationStrategyData, props: StrategyProps, contentStyles: vue.Ref<Record<string, string>>) => {
|
1177
|
-
updateLocation: (e
|
1177
|
+
updateLocation: (e?: Event | undefined) => void;
|
1178
1178
|
} | undefined) | "connected";
|
1179
1179
|
scrollStrategy: "close" | "none" | "block" | ((data: ScrollStrategyData, props: StrategyProps$1, scope: vue.EffectScope) => void) | "reposition";
|
1180
1180
|
activatorProps: Record<string, any>;
|
@@ -1234,7 +1234,7 @@ declare const VMenu: {
|
|
1234
1234
|
eager: boolean;
|
1235
1235
|
location: Anchor;
|
1236
1236
|
locationStrategy: "static" | ((data: LocationStrategyData, props: StrategyProps, contentStyles: vue.Ref<Record<string, string>>) => {
|
1237
|
-
updateLocation: (e
|
1237
|
+
updateLocation: (e?: Event | undefined) => void;
|
1238
1238
|
} | undefined) | "connected";
|
1239
1239
|
scrollStrategy: "close" | "none" | "block" | ((data: ScrollStrategyData, props: StrategyProps$1, scope: vue.EffectScope) => void) | "reposition";
|
1240
1240
|
activatorProps: Record<string, any>;
|
@@ -1326,7 +1326,7 @@ declare const VMenu: {
|
|
1326
1326
|
eager: boolean;
|
1327
1327
|
location: Anchor;
|
1328
1328
|
locationStrategy: NonNullable<"static" | ((data: LocationStrategyData, props: StrategyProps, contentStyles: vue.Ref<Record<string, string>>) => {
|
1329
|
-
updateLocation: (e
|
1329
|
+
updateLocation: (e?: Event | undefined) => void;
|
1330
1330
|
} | undefined) | "connected">;
|
1331
1331
|
scrollStrategy: NonNullable<"close" | "none" | "block" | ((data: ScrollStrategyData, props: StrategyProps$1, scope: vue.EffectScope) => void) | "reposition">;
|
1332
1332
|
closeDelay: NonNullable<string | number>;
|
@@ -1359,7 +1359,7 @@ declare const VMenu: {
|
|
1359
1359
|
eager: boolean;
|
1360
1360
|
location: Anchor;
|
1361
1361
|
locationStrategy: NonNullable<"static" | ((data: LocationStrategyData, props: StrategyProps, contentStyles: vue.Ref<Record<string, string>>) => {
|
1362
|
-
updateLocation: (e
|
1362
|
+
updateLocation: (e?: Event | undefined) => void;
|
1363
1363
|
} | undefined) | "connected">;
|
1364
1364
|
scrollStrategy: NonNullable<"close" | "none" | "block" | ((data: ScrollStrategyData, props: StrategyProps$1, scope: vue.EffectScope) => void) | "reposition">;
|
1365
1365
|
closeDelay: NonNullable<string | number>;
|
@@ -1444,7 +1444,7 @@ declare const VMenu: {
|
|
1444
1444
|
eager: boolean;
|
1445
1445
|
location: Anchor;
|
1446
1446
|
locationStrategy: "static" | ((data: LocationStrategyData, props: StrategyProps, contentStyles: vue.Ref<Record<string, string>>) => {
|
1447
|
-
updateLocation: (e
|
1447
|
+
updateLocation: (e?: Event | undefined) => void;
|
1448
1448
|
} | undefined) | "connected";
|
1449
1449
|
scrollStrategy: "close" | "none" | "block" | ((data: ScrollStrategyData, props: StrategyProps$1, scope: vue.EffectScope) => void) | "reposition";
|
1450
1450
|
activatorProps: Record<string, any>;
|
@@ -1471,7 +1471,7 @@ declare const VMenu: {
|
|
1471
1471
|
eager: boolean;
|
1472
1472
|
location: Anchor;
|
1473
1473
|
locationStrategy: "static" | ((data: LocationStrategyData, props: StrategyProps, contentStyles: vue.Ref<Record<string, string>>) => {
|
1474
|
-
updateLocation: (e
|
1474
|
+
updateLocation: (e?: Event | undefined) => void;
|
1475
1475
|
} | undefined) | "connected";
|
1476
1476
|
scrollStrategy: "close" | "none" | "block" | ((data: ScrollStrategyData, props: StrategyProps$1, scope: vue.EffectScope) => void) | "reposition";
|
1477
1477
|
activatorProps: Record<string, any>;
|
@@ -1549,7 +1549,7 @@ declare const VMenu: {
|
|
1549
1549
|
eager: boolean;
|
1550
1550
|
location: Anchor;
|
1551
1551
|
locationStrategy: "static" | ((data: LocationStrategyData, props: StrategyProps, contentStyles: vue.Ref<Record<string, string>>) => {
|
1552
|
-
updateLocation: (e
|
1552
|
+
updateLocation: (e?: Event | undefined) => void;
|
1553
1553
|
} | undefined) | "connected";
|
1554
1554
|
scrollStrategy: "close" | "none" | "block" | ((data: ScrollStrategyData, props: StrategyProps$1, scope: vue.EffectScope) => void) | "reposition";
|
1555
1555
|
activatorProps: Record<string, any>;
|
@@ -1656,7 +1656,7 @@ declare const VMenu: {
|
|
1656
1656
|
eager: boolean;
|
1657
1657
|
location: Anchor;
|
1658
1658
|
locationStrategy: "static" | ((data: LocationStrategyData, props: StrategyProps, contentStyles: vue.Ref<Record<string, string>>) => {
|
1659
|
-
updateLocation: (e
|
1659
|
+
updateLocation: (e?: Event | undefined) => void;
|
1660
1660
|
} | undefined) | "connected";
|
1661
1661
|
scrollStrategy: "close" | "none" | "block" | ((data: ScrollStrategyData, props: StrategyProps$1, scope: vue.EffectScope) => void) | "reposition";
|
1662
1662
|
activatorProps: Record<string, any>;
|
@@ -1752,7 +1752,7 @@ declare const VMenu: {
|
|
1752
1752
|
eager: boolean;
|
1753
1753
|
location: Anchor;
|
1754
1754
|
locationStrategy: "static" | ((data: LocationStrategyData, props: StrategyProps, contentStyles: vue.Ref<Record<string, string>>) => {
|
1755
|
-
updateLocation: (e
|
1755
|
+
updateLocation: (e?: Event | undefined) => void;
|
1756
1756
|
} | undefined) | "connected";
|
1757
1757
|
scrollStrategy: "close" | "none" | "block" | ((data: ScrollStrategyData, props: StrategyProps$1, scope: vue.EffectScope) => void) | "reposition";
|
1758
1758
|
activatorProps: Record<string, any>;
|
@@ -1812,7 +1812,7 @@ declare const VMenu: {
|
|
1812
1812
|
eager: boolean;
|
1813
1813
|
location: Anchor;
|
1814
1814
|
locationStrategy: "static" | ((data: LocationStrategyData, props: StrategyProps, contentStyles: vue.Ref<Record<string, string>>) => {
|
1815
|
-
updateLocation: (e
|
1815
|
+
updateLocation: (e?: Event | undefined) => void;
|
1816
1816
|
} | undefined) | "connected";
|
1817
1817
|
scrollStrategy: "close" | "none" | "block" | ((data: ScrollStrategyData, props: StrategyProps$1, scope: vue.EffectScope) => void) | "reposition";
|
1818
1818
|
activatorProps: Record<string, any>;
|
@@ -1906,7 +1906,7 @@ declare const VMenu: {
|
|
1906
1906
|
eager: boolean;
|
1907
1907
|
location: Anchor;
|
1908
1908
|
locationStrategy: NonNullable<"static" | ((data: LocationStrategyData, props: StrategyProps, contentStyles: vue.Ref<Record<string, string>>) => {
|
1909
|
-
updateLocation: (e
|
1909
|
+
updateLocation: (e?: Event | undefined) => void;
|
1910
1910
|
} | undefined) | "connected">;
|
1911
1911
|
scrollStrategy: NonNullable<"close" | "none" | "block" | ((data: ScrollStrategyData, props: StrategyProps$1, scope: vue.EffectScope) => void) | "reposition">;
|
1912
1912
|
closeDelay: NonNullable<string | number>;
|
@@ -1987,16 +1987,16 @@ declare const VMenu: {
|
|
1987
1987
|
activator: vue.PropType<Element | vue.ComponentPublicInstance | (string & {}) | "parent" | undefined>;
|
1988
1988
|
locationStrategy: Omit<{
|
1989
1989
|
type: vue.PropType<"static" | ((data: LocationStrategyData, props: StrategyProps, contentStyles: vue.Ref<Record<string, string>>) => {
|
1990
|
-
updateLocation: (e
|
1990
|
+
updateLocation: (e?: Event | undefined) => void;
|
1991
1991
|
} | undefined) | "connected">;
|
1992
1992
|
default: string;
|
1993
1993
|
validator: (val: any) => boolean;
|
1994
1994
|
}, "default" | "type"> & {
|
1995
1995
|
type: vue.PropType<NonNullable<"static" | ((data: LocationStrategyData, props: StrategyProps, contentStyles: vue.Ref<Record<string, string>>) => {
|
1996
|
-
updateLocation: (e
|
1996
|
+
updateLocation: (e?: Event | undefined) => void;
|
1997
1997
|
} | undefined) | "connected">>;
|
1998
1998
|
default: NonNullable<"static" | ((data: LocationStrategyData, props: StrategyProps, contentStyles: vue.Ref<Record<string, string>>) => {
|
1999
|
-
updateLocation: (e
|
1999
|
+
updateLocation: (e?: Event | undefined) => void;
|
2000
2000
|
} | undefined) | "connected">;
|
2001
2001
|
};
|
2002
2002
|
scrollStrategy: Omit<{
|
@@ -2102,16 +2102,16 @@ declare const VMenu: {
|
|
2102
2102
|
activator: vue.PropType<Element | vue.ComponentPublicInstance | (string & {}) | "parent" | undefined>;
|
2103
2103
|
locationStrategy: Omit<{
|
2104
2104
|
type: vue.PropType<"static" | ((data: LocationStrategyData, props: StrategyProps, contentStyles: vue.Ref<Record<string, string>>) => {
|
2105
|
-
updateLocation: (e
|
2105
|
+
updateLocation: (e?: Event | undefined) => void;
|
2106
2106
|
} | undefined) | "connected">;
|
2107
2107
|
default: string;
|
2108
2108
|
validator: (val: any) => boolean;
|
2109
2109
|
}, "default" | "type"> & {
|
2110
2110
|
type: vue.PropType<NonNullable<"static" | ((data: LocationStrategyData, props: StrategyProps, contentStyles: vue.Ref<Record<string, string>>) => {
|
2111
|
-
updateLocation: (e
|
2111
|
+
updateLocation: (e?: Event | undefined) => void;
|
2112
2112
|
} | undefined) | "connected">>;
|
2113
2113
|
default: NonNullable<"static" | ((data: LocationStrategyData, props: StrategyProps, contentStyles: vue.Ref<Record<string, string>>) => {
|
2114
|
-
updateLocation: (e
|
2114
|
+
updateLocation: (e?: Event | undefined) => void;
|
2115
2115
|
} | undefined) | "connected">;
|
2116
2116
|
};
|
2117
2117
|
scrollStrategy: Omit<{
|
@@ -41,7 +41,7 @@ interface LocationStrategyData {
|
|
41
41
|
isRtl: Ref<boolean>;
|
42
42
|
}
|
43
43
|
type LocationStrategyFn = (data: LocationStrategyData, props: StrategyProps$1, contentStyles: Ref<Record<string, string>>) => undefined | {
|
44
|
-
updateLocation: (e
|
44
|
+
updateLocation: (e?: Event) => void;
|
45
45
|
};
|
46
46
|
declare const locationStrategies: {
|
47
47
|
static: typeof staticLocationStrategy;
|
@@ -104,7 +104,7 @@ declare const VOverlay: {
|
|
104
104
|
eager: boolean;
|
105
105
|
location: Anchor;
|
106
106
|
locationStrategy: "static" | ((data: LocationStrategyData, props: StrategyProps$1, contentStyles: Ref<Record<string, string>>) => {
|
107
|
-
updateLocation: (e
|
107
|
+
updateLocation: (e?: Event | undefined) => void;
|
108
108
|
} | undefined) | "connected";
|
109
109
|
scrollStrategy: "close" | "none" | "block" | ((data: ScrollStrategyData, props: StrategyProps, scope: vue.EffectScope) => void) | "reposition";
|
110
110
|
activatorProps: Record<string, any>;
|
@@ -200,7 +200,7 @@ declare const VOverlay: {
|
|
200
200
|
eager: boolean;
|
201
201
|
location: Anchor;
|
202
202
|
locationStrategy: "static" | ((data: LocationStrategyData, props: StrategyProps$1, contentStyles: Ref<Record<string, string>>) => {
|
203
|
-
updateLocation: (e
|
203
|
+
updateLocation: (e?: Event | undefined) => void;
|
204
204
|
} | undefined) | "connected";
|
205
205
|
scrollStrategy: "close" | "none" | "block" | ((data: ScrollStrategyData, props: StrategyProps, scope: vue.EffectScope) => void) | "reposition";
|
206
206
|
activatorProps: Record<string, any>;
|
@@ -282,7 +282,7 @@ declare const VOverlay: {
|
|
282
282
|
eager: boolean;
|
283
283
|
location: Anchor;
|
284
284
|
locationStrategy: "static" | ((data: LocationStrategyData, props: StrategyProps$1, contentStyles: Ref<Record<string, string>>) => {
|
285
|
-
updateLocation: (e
|
285
|
+
updateLocation: (e?: Event | undefined) => void;
|
286
286
|
} | undefined) | "connected";
|
287
287
|
scrollStrategy: "close" | "none" | "block" | ((data: ScrollStrategyData, props: StrategyProps, scope: vue.EffectScope) => void) | "reposition";
|
288
288
|
activatorProps: Record<string, any>;
|
@@ -329,7 +329,7 @@ declare const VOverlay: {
|
|
329
329
|
eager: boolean;
|
330
330
|
location: Anchor;
|
331
331
|
locationStrategy: "static" | ((data: LocationStrategyData, props: StrategyProps$1, contentStyles: Ref<Record<string, string>>) => {
|
332
|
-
updateLocation: (e
|
332
|
+
updateLocation: (e?: Event | undefined) => void;
|
333
333
|
} | undefined) | "connected";
|
334
334
|
scrollStrategy: "close" | "none" | "block" | ((data: ScrollStrategyData, props: StrategyProps, scope: vue.EffectScope) => void) | "reposition";
|
335
335
|
activatorProps: Record<string, any>;
|
@@ -420,7 +420,7 @@ declare const VOverlay: {
|
|
420
420
|
eager: boolean;
|
421
421
|
location: Anchor;
|
422
422
|
locationStrategy: "static" | ((data: LocationStrategyData, props: StrategyProps$1, contentStyles: Ref<Record<string, string>>) => {
|
423
|
-
updateLocation: (e
|
423
|
+
updateLocation: (e?: Event | undefined) => void;
|
424
424
|
} | undefined) | "connected";
|
425
425
|
scrollStrategy: "close" | "none" | "block" | ((data: ScrollStrategyData, props: StrategyProps, scope: vue.EffectScope) => void) | "reposition";
|
426
426
|
activatorProps: Record<string, any>;
|
@@ -451,7 +451,7 @@ declare const VOverlay: {
|
|
451
451
|
eager: boolean;
|
452
452
|
location: Anchor;
|
453
453
|
locationStrategy: "static" | ((data: LocationStrategyData, props: StrategyProps$1, contentStyles: Ref<Record<string, string>>) => {
|
454
|
-
updateLocation: (e
|
454
|
+
updateLocation: (e?: Event | undefined) => void;
|
455
455
|
} | undefined) | "connected";
|
456
456
|
scrollStrategy: "close" | "none" | "block" | ((data: ScrollStrategyData, props: StrategyProps, scope: vue.EffectScope) => void) | "reposition";
|
457
457
|
activatorProps: Record<string, any>;
|
@@ -547,7 +547,7 @@ declare const VOverlay: {
|
|
547
547
|
eager: boolean;
|
548
548
|
location: Anchor;
|
549
549
|
locationStrategy: "static" | ((data: LocationStrategyData, props: StrategyProps$1, contentStyles: Ref<Record<string, string>>) => {
|
550
|
-
updateLocation: (e
|
550
|
+
updateLocation: (e?: Event | undefined) => void;
|
551
551
|
} | undefined) | "connected";
|
552
552
|
scrollStrategy: "close" | "none" | "block" | ((data: ScrollStrategyData, props: StrategyProps, scope: vue.EffectScope) => void) | "reposition";
|
553
553
|
activatorProps: Record<string, any>;
|
@@ -590,7 +590,7 @@ declare const VOverlay: {
|
|
590
590
|
};
|
591
591
|
locationStrategy: {
|
592
592
|
type: PropType<"static" | ((data: LocationStrategyData, props: StrategyProps$1, contentStyles: Ref<Record<string, string>>) => {
|
593
|
-
updateLocation: (e
|
593
|
+
updateLocation: (e?: Event | undefined) => void;
|
594
594
|
} | undefined) | "connected">;
|
595
595
|
default: string;
|
596
596
|
validator: (val: any) => boolean;
|
@@ -673,7 +673,7 @@ declare const VOverlay: {
|
|
673
673
|
};
|
674
674
|
locationStrategy: {
|
675
675
|
type: PropType<"static" | ((data: LocationStrategyData, props: StrategyProps$1, contentStyles: Ref<Record<string, string>>) => {
|
676
|
-
updateLocation: (e
|
676
|
+
updateLocation: (e?: Event | undefined) => void;
|
677
677
|
} | undefined) | "connected">;
|
678
678
|
default: string;
|
679
679
|
validator: (val: any) => boolean;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"locationStrategies.mjs","names":["useToggleScope","computed","nextTick","onScopeDispose","ref","watch","anchorToPoint","getOffset","clamp","consoleError","convertToUnit","destructComputed","flipAlign","flipCorner","flipSide","getAxis","getScrollParents","IN_BROWSER","isFixedPosition","nullifyTransforms","parseAnchor","propsFactory","Box","getOverflow","getTargetBox","locationStrategies","static","staticLocationStrategy","connected","connectedLocationStrategy","makeLocationStrategyProps","locationStrategy","type","String","Function","default","validator","val","location","origin","offset","Number","Array","useLocationStrategies","props","data","contentStyles","updateLocation","isActive","value","reset","window","removeEventListener","onResize","undefined","addEventListener","passive","e","getIntrinsicSize","el","isRtl","style","removeProperty","contentBox","x","parseFloat","right","left","y","top","activatorFixed","isArray","target","Object","assign","position","preferredAnchor","preferredOrigin","parsedAnchor","parsedOrigin","side","align","minWidth","minHeight","maxWidth","maxHeight","map","key","isNaN","Infinity","split","length","push","observe","observer","ResizeObserver","contentEl","_ref","_ref2","newTarget","newContentEl","oldTarget","oldContentEl","unobserve","immediate","disconnect","requestAnimationFrame","targetBox","scrollParents","viewportMargin","document","documentElement","getPropertyValue","viewport","reduce","box","rect","getBoundingClientRect","scrollBox","width","clientWidth","height","clientHeight","Math","max","min","bottom","placement","anchor","checkOverflow","_placement","targetPoint","contentPoint","overflows","available","flipped","resets","_x","_y","axis","hasOverflowX","before","after","hasOverflowY","forEach","newPlacement","flip","newOverflows","transformOrigin","pixelRound","pixelCeil","result","round","devicePixelRatio","ceil"],"sources":["../../../src/components/VOverlay/locationStrategies.ts"],"sourcesContent":["// Composables\nimport { useToggleScope } from '@/composables/toggleScope'\n\n// Utilities\nimport { computed, nextTick, onScopeDispose, ref, watch } from 'vue'\nimport { anchorToPoint, getOffset } from './util/point'\nimport {\n clamp,\n consoleError,\n convertToUnit,\n destructComputed,\n flipAlign,\n flipCorner,\n flipSide,\n getAxis,\n getScrollParents,\n IN_BROWSER,\n isFixedPosition,\n nullifyTransforms,\n parseAnchor,\n propsFactory,\n} from '@/util'\nimport { Box, getOverflow, getTargetBox } from '@/util/box'\n\n// Types\nimport type { PropType, Ref } from 'vue'\nimport type { Anchor } from '@/util'\n\nexport interface LocationStrategyData {\n contentEl: Ref<HTMLElement | undefined>\n target: Ref<HTMLElement | [x: number, y: number] | undefined>\n isActive: Ref<boolean>\n isRtl: Ref<boolean>\n}\n\ntype LocationStrategyFn = (\n data: LocationStrategyData,\n props: StrategyProps,\n contentStyles: Ref<Record<string, string>>\n) => undefined | { updateLocation: (e: Event) => void }\n\nconst locationStrategies = {\n static: staticLocationStrategy, // specific viewport position, usually centered\n connected: connectedLocationStrategy, // connected to a certain element\n}\n\nexport interface StrategyProps {\n locationStrategy: keyof typeof locationStrategies | LocationStrategyFn\n location: Anchor\n origin: Anchor | 'auto' | 'overlap'\n offset?: number | string | number[]\n maxHeight?: number | string\n maxWidth?: number | string\n minHeight?: number | string\n minWidth?: number | string\n}\n\nexport const makeLocationStrategyProps = propsFactory({\n locationStrategy: {\n type: [String, Function] as PropType<StrategyProps['locationStrategy']>,\n default: 'static',\n validator: (val: any) => typeof val === 'function' || val in locationStrategies,\n },\n location: {\n type: String as PropType<StrategyProps['location']>,\n default: 'bottom',\n },\n origin: {\n type: String as PropType<StrategyProps['origin']>,\n default: 'auto',\n },\n offset: [Number, String, Array] as PropType<StrategyProps['offset']>,\n}, 'VOverlay-location-strategies')\n\nexport function useLocationStrategies (\n props: StrategyProps,\n data: LocationStrategyData\n) {\n const contentStyles = ref({})\n const updateLocation = ref<(e: Event) => void>()\n\n if (IN_BROWSER) {\n useToggleScope(() => !!(data.isActive.value && props.locationStrategy), reset => {\n watch(() => props.locationStrategy, reset)\n onScopeDispose(() => {\n window.removeEventListener('resize', onResize)\n updateLocation.value = undefined\n })\n\n window.addEventListener('resize', onResize, { passive: true })\n\n if (typeof props.locationStrategy === 'function') {\n updateLocation.value = props.locationStrategy(data, props, contentStyles)?.updateLocation\n } else {\n updateLocation.value = locationStrategies[props.locationStrategy](data, props, contentStyles)?.updateLocation\n }\n })\n }\n\n function onResize (e: Event) {\n updateLocation.value?.(e)\n }\n\n return {\n contentStyles,\n updateLocation,\n }\n}\n\nfunction staticLocationStrategy () {\n // TODO\n}\n\n/** Get size of element ignoring max-width/max-height */\nfunction getIntrinsicSize (el: HTMLElement, isRtl: boolean) {\n // const scrollables = new Map<Element, [number, number]>()\n // el.querySelectorAll('*').forEach(el => {\n // const x = el.scrollLeft\n // const y = el.scrollTop\n // if (x || y) {\n // scrollables.set(el, [x, y])\n // }\n // })\n\n // const initialMaxWidth = el.style.maxWidth\n // const initialMaxHeight = el.style.maxHeight\n // el.style.removeProperty('max-width')\n // el.style.removeProperty('max-height')\n\n if (isRtl) {\n el.style.removeProperty('left')\n } else {\n el.style.removeProperty('right')\n }\n\n /* eslint-disable-next-line sonarjs/prefer-immediate-return */\n const contentBox = nullifyTransforms(el)\n\n if (isRtl) {\n contentBox.x += parseFloat(el.style.right || 0)\n } else {\n contentBox.x -= parseFloat(el.style.left || 0)\n }\n contentBox.y -= parseFloat(el.style.top || 0)\n\n // el.style.maxWidth = initialMaxWidth\n // el.style.maxHeight = initialMaxHeight\n // scrollables.forEach((position, el) => {\n // el.scrollTo(...position)\n // })\n\n return contentBox\n}\n\nfunction connectedLocationStrategy (data: LocationStrategyData, props: StrategyProps, contentStyles: Ref<Record<string, string>>) {\n const activatorFixed = Array.isArray(data.target.value) || isFixedPosition(data.target.value)\n if (activatorFixed) {\n Object.assign(contentStyles.value, {\n position: 'fixed',\n top: 0,\n [data.isRtl.value ? 'right' : 'left']: 0,\n })\n }\n\n const { preferredAnchor, preferredOrigin } = destructComputed(() => {\n const parsedAnchor = parseAnchor(props.location, data.isRtl.value)\n const parsedOrigin =\n props.origin === 'overlap' ? parsedAnchor\n : props.origin === 'auto' ? flipSide(parsedAnchor)\n : parseAnchor(props.origin, data.isRtl.value)\n\n // Some combinations of props may produce an invalid origin\n if (parsedAnchor.side === parsedOrigin.side && parsedAnchor.align === flipAlign(parsedOrigin).align) {\n return {\n preferredAnchor: flipCorner(parsedAnchor),\n preferredOrigin: flipCorner(parsedOrigin),\n }\n } else {\n return {\n preferredAnchor: parsedAnchor,\n preferredOrigin: parsedOrigin,\n }\n }\n })\n\n const [minWidth, minHeight, maxWidth, maxHeight] =\n (['minWidth', 'minHeight', 'maxWidth', 'maxHeight'] as const).map(key => {\n return computed(() => {\n const val = parseFloat(props[key]!)\n return isNaN(val) ? Infinity : val\n })\n })\n\n const offset = computed(() => {\n if (Array.isArray(props.offset)) {\n return props.offset\n }\n if (typeof props.offset === 'string') {\n const offset = props.offset.split(' ').map(parseFloat)\n if (offset.length < 2) offset.push(0)\n return offset\n }\n return typeof props.offset === 'number' ? [props.offset, 0] : [0, 0]\n })\n\n let observe = false\n const observer = new ResizeObserver(() => {\n if (observe) updateLocation()\n })\n\n watch([data.target, data.contentEl], ([newTarget, newContentEl], [oldTarget, oldContentEl]) => {\n if (oldTarget && !Array.isArray(oldTarget)) observer.unobserve(oldTarget)\n if (newTarget && !Array.isArray(newTarget)) observer.observe(newTarget)\n\n if (oldContentEl) observer.unobserve(oldContentEl)\n if (newContentEl) observer.observe(newContentEl)\n }, {\n immediate: true,\n })\n\n onScopeDispose(() => {\n observer.disconnect()\n })\n\n // eslint-disable-next-line max-statements\n function updateLocation () {\n observe = false\n requestAnimationFrame(() => observe = true)\n\n if (!data.target.value || !data.contentEl.value) return\n\n const targetBox = getTargetBox(data.target.value)\n const contentBox = getIntrinsicSize(data.contentEl.value, data.isRtl.value)\n const scrollParents = getScrollParents(data.contentEl.value)\n const viewportMargin = 12\n\n if (!scrollParents.length) {\n scrollParents.push(document.documentElement)\n if (!(data.contentEl.value.style.top && data.contentEl.value.style.left)) {\n contentBox.x -= parseFloat(document.documentElement.style.getPropertyValue('--v-body-scroll-x') || 0)\n contentBox.y -= parseFloat(document.documentElement.style.getPropertyValue('--v-body-scroll-y') || 0)\n }\n }\n\n const viewport = scrollParents.reduce<Box>((box: Box | undefined, el) => {\n const rect = el.getBoundingClientRect()\n const scrollBox = new Box({\n x: el === document.documentElement ? 0 : rect.x,\n y: el === document.documentElement ? 0 : rect.y,\n width: el.clientWidth,\n height: el.clientHeight,\n })\n\n if (box) {\n return new Box({\n x: Math.max(box.left, scrollBox.left),\n y: Math.max(box.top, scrollBox.top),\n width: Math.min(box.right, scrollBox.right) - Math.max(box.left, scrollBox.left),\n height: Math.min(box.bottom, scrollBox.bottom) - Math.max(box.top, scrollBox.top),\n })\n }\n return scrollBox\n }, undefined!)\n viewport.x += viewportMargin\n viewport.y += viewportMargin\n viewport.width -= viewportMargin * 2\n viewport.height -= viewportMargin * 2\n\n let placement = {\n anchor: preferredAnchor.value,\n origin: preferredOrigin.value,\n }\n\n function checkOverflow (_placement: typeof placement) {\n const box = new Box(contentBox)\n const targetPoint = anchorToPoint(_placement.anchor, targetBox)\n const contentPoint = anchorToPoint(_placement.origin, box)\n\n let { x, y } = getOffset(targetPoint, contentPoint)\n\n switch (_placement.anchor.side) {\n case 'top': y -= offset.value[0]; break\n case 'bottom': y += offset.value[0]; break\n case 'left': x -= offset.value[0]; break\n case 'right': x += offset.value[0]; break\n }\n\n switch (_placement.anchor.align) {\n case 'top': y -= offset.value[1]; break\n case 'bottom': y += offset.value[1]; break\n case 'left': x -= offset.value[1]; break\n case 'right': x += offset.value[1]; break\n }\n\n box.x += x\n box.y += y\n\n box.width = Math.min(box.width, maxWidth.value)\n box.height = Math.min(box.height, maxHeight.value)\n\n const overflows = getOverflow(box, viewport)\n\n return { overflows, x, y }\n }\n\n let x = 0; let y = 0\n const available = { x: 0, y: 0 }\n const flipped = { x: false, y: false }\n let resets = -1\n while (true) {\n if (resets++ > 10) {\n consoleError('Infinite loop detected in connectedLocationStrategy')\n break\n }\n\n const { x: _x, y: _y, overflows } = checkOverflow(placement)\n\n x += _x\n y += _y\n\n contentBox.x += _x\n contentBox.y += _y\n\n // flip\n {\n const axis = getAxis(placement.anchor)\n const hasOverflowX = overflows.x.before || overflows.x.after\n const hasOverflowY = overflows.y.before || overflows.y.after\n\n let reset = false\n ;['x', 'y'].forEach(key => {\n if (\n (key === 'x' && hasOverflowX && !flipped.x) ||\n (key === 'y' && hasOverflowY && !flipped.y)\n ) {\n const newPlacement = { anchor: { ...placement.anchor }, origin: { ...placement.origin } }\n const flip = key === 'x'\n ? axis === 'y' ? flipAlign : flipSide\n : axis === 'y' ? flipSide : flipAlign\n newPlacement.anchor = flip(newPlacement.anchor)\n newPlacement.origin = flip(newPlacement.origin)\n const { overflows: newOverflows } = checkOverflow(newPlacement)\n if (\n (newOverflows[key].before <= overflows[key].before &&\n newOverflows[key].after <= overflows[key].after) ||\n (newOverflows[key].before + newOverflows[key].after <\n (overflows[key].before + overflows[key].after) / 2)\n ) {\n placement = newPlacement\n reset = flipped[key] = true\n }\n }\n })\n if (reset) continue\n }\n\n // shift\n if (overflows.x.before) {\n x += overflows.x.before\n contentBox.x += overflows.x.before\n }\n if (overflows.x.after) {\n x -= overflows.x.after\n contentBox.x -= overflows.x.after\n }\n if (overflows.y.before) {\n y += overflows.y.before\n contentBox.y += overflows.y.before\n }\n if (overflows.y.after) {\n y -= overflows.y.after\n contentBox.y -= overflows.y.after\n }\n\n // size\n {\n const overflows = getOverflow(contentBox, viewport)\n available.x = viewport.width - overflows.x.before - overflows.x.after\n available.y = viewport.height - overflows.y.before - overflows.y.after\n\n x += overflows.x.before\n contentBox.x += overflows.x.before\n y += overflows.y.before\n contentBox.y += overflows.y.before\n }\n\n break\n }\n\n const axis = getAxis(placement.anchor)\n\n Object.assign(contentStyles.value, {\n '--v-overlay-anchor-origin': `${placement.anchor.side} ${placement.anchor.align}`,\n transformOrigin: `${placement.origin.side} ${placement.origin.align}`,\n // transform: `translate(${pixelRound(x)}px, ${pixelRound(y)}px)`,\n top: convertToUnit(pixelRound(y)),\n left: data.isRtl.value ? undefined : convertToUnit(pixelRound(x)),\n right: data.isRtl.value ? convertToUnit(pixelRound(-x)) : undefined,\n minWidth: convertToUnit(axis === 'y' ? Math.min(minWidth.value, targetBox.width) : minWidth.value),\n maxWidth: convertToUnit(pixelCeil(clamp(available.x, minWidth.value === Infinity ? 0 : minWidth.value, maxWidth.value))),\n maxHeight: convertToUnit(pixelCeil(clamp(available.y, minHeight.value === Infinity ? 0 : minHeight.value, maxHeight.value))),\n })\n\n return {\n available,\n contentBox,\n }\n }\n\n watch(\n () => [\n preferredAnchor.value,\n preferredOrigin.value,\n props.offset,\n props.minWidth,\n props.minHeight,\n props.maxWidth,\n props.maxHeight,\n ],\n () => updateLocation(),\n )\n\n nextTick(() => {\n const result = updateLocation()\n\n // TODO: overflowing content should only require a single updateLocation call\n // Icky hack to make sure the content is positioned consistently\n if (!result) return\n const { available, contentBox } = result\n if (contentBox.height > available.y) {\n requestAnimationFrame(() => {\n updateLocation()\n requestAnimationFrame(() => {\n updateLocation()\n })\n })\n }\n })\n\n return { updateLocation }\n}\n\nfunction pixelRound (val: number) {\n return Math.round(val * devicePixelRatio) / devicePixelRatio\n}\n\nfunction pixelCeil (val: number) {\n return Math.ceil(val * devicePixelRatio) / devicePixelRatio\n}\n"],"mappings":"AAAA;AAAA,SACSA,cAAc,6CAEvB;AACA,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,cAAc,EAAEC,GAAG,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAC3DC,aAAa,EAAEC,SAAS;AAAA,SAE/BC,KAAK,EACLC,YAAY,EACZC,aAAa,EACbC,g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K,CAAC,CAAC;IAC7H,CAAC,CAAC;IAEF,OAAO;MACLqF,SAAS;MACTvE;IACF,CAAC;EACH;EAEA1D,KAAK,CACH,MAAM,CACJuE,eAAe,CAAC3B,KAAK,EACrB4B,eAAe,CAAC5B,KAAK,EACrBL,KAAK,CAACJ,MAAM,EACZI,KAAK,CAACsC,QAAQ,EACdtC,KAAK,CAACuC,SAAS,EACfvC,KAAK,CAACwC,QAAQ,EACdxC,KAAK,CAACyC,SAAS,CAChB,EACD,MAAMtC,cAAc,CAAC,CACvB,CAAC;EAED7C,QAAQ,CAAC,MAAM;IACb,MAAMqJ,MAAM,GAAGxG,cAAc,CAAC,CAAC;;IAE/B;IACA;IACA,IAAI,CAACwG,MAAM,EAAE;IACb,MAAM;MAAEjB,SAAS;MAAEvE;IAAW,CAAC,GAAGwF,MAAM;IACxC,IAAIxF,UAAU,CAAC0D,MAAM,GAAGa,SAAS,CAAClE,CAAC,EAAE;MACnCsC,qBAAqB,CAAC,MAAM;QAC1B3D,cAAc,CAAC,CAAC;QAChB2D,qBAAqB,CAAC,MAAM;UAC1B3D,cAAc,CAAC,CAAC;QAClB,CAAC,CAAC;MACJ,CAAC,CAAC;IACJ;EACF,CAAC,CAAC;EAEF,OAAO;IAAEA;EAAe,CAAC;AAC3B;AAEA,SAASsG,UAAUA,CAAEhH,GAAW,EAAE;EAChC,OAAOsF,IAAI,CAAC6B,KAAK,CAACnH,GAAG,GAAGoH,gBAAgB,CAAC,GAAGA,gBAAgB;AAC9D;AAEA,SAASH,SAASA,CAAEjH,GAAW,EAAE;EAC/B,OAAOsF,IAAI,CAAC+B,IAAI,CAACrH,GAAG,GAAGoH,gBAAgB,CAAC,GAAGA,gBAAgB;AAC7D","ignoreList":[]}
|
1
|
+
{"version":3,"file":"locationStrategies.mjs","names":["useToggleScope","computed","nextTick","onScopeDispose","ref","watch","anchorToPoint","getOffset","clamp","consoleError","convertToUnit","destructComputed","flipAlign","flipCorner","flipSide","getAxis","getScrollParents","IN_BROWSER","isFixedPosition","nullifyTransforms","parseAnchor","propsFactory","Box","getOverflow","getTargetBox","locationStrategies","static","staticLocationStrategy","connected","connectedLocationStrategy","makeLocationStrategyProps","locationStrategy","type","String","Function","default","validator","val","location","origin","offset","Number","Array","useLocationStrategies","props","data","contentStyles","updateLocation","isActive","value","reset","window","removeEventListener","onResize","undefined","addEventListener","passive","e","getIntrinsicSize","el","isRtl","style","removeProperty","contentBox","x","parseFloat","right","left","y","top","activatorFixed","isArray","target","Object","assign","position","preferredAnchor","preferredOrigin","parsedAnchor","parsedOrigin","side","align","minWidth","minHeight","maxWidth","maxHeight","map","key","isNaN","Infinity","split","length","push","observe","observer","ResizeObserver","contentEl","_ref","_ref2","newTarget","newContentEl","oldTarget","oldContentEl","unobserve","immediate","disconnect","requestAnimationFrame","targetBox","scrollParents","viewportMargin","document","documentElement","getPropertyValue","viewport","reduce","box","rect","getBoundingClientRect","scrollBox","width","clientWidth","height","clientHeight","Math","max","min","bottom","placement","anchor","checkOverflow","_placement","targetPoint","contentPoint","overflows","available","flipped","resets","_x","_y","axis","hasOverflowX","before","after","hasOverflowY","forEach","newPlacement","flip","newOverflows","transformOrigin","pixelRound","pixelCeil","result","round","devicePixelRatio","ceil"],"sources":["../../../src/components/VOverlay/locationStrategies.ts"],"sourcesContent":["// Composables\nimport { useToggleScope } from '@/composables/toggleScope'\n\n// Utilities\nimport { computed, nextTick, onScopeDispose, ref, watch } from 'vue'\nimport { anchorToPoint, getOffset } from './util/point'\nimport {\n clamp,\n consoleError,\n convertToUnit,\n destructComputed,\n flipAlign,\n flipCorner,\n flipSide,\n getAxis,\n getScrollParents,\n IN_BROWSER,\n isFixedPosition,\n nullifyTransforms,\n parseAnchor,\n propsFactory,\n} from '@/util'\nimport { Box, getOverflow, getTargetBox } from '@/util/box'\n\n// Types\nimport type { PropType, Ref } from 'vue'\nimport type { Anchor } from '@/util'\n\nexport interface LocationStrategyData {\n contentEl: Ref<HTMLElement | undefined>\n target: Ref<HTMLElement | [x: number, y: number] | undefined>\n isActive: Ref<boolean>\n isRtl: Ref<boolean>\n}\n\ntype LocationStrategyFn = (\n data: LocationStrategyData,\n props: StrategyProps,\n contentStyles: Ref<Record<string, string>>\n) => undefined | { updateLocation: (e?: Event) => void }\n\nconst locationStrategies = {\n static: staticLocationStrategy, // specific viewport position, usually centered\n connected: connectedLocationStrategy, // connected to a certain element\n}\n\nexport interface StrategyProps {\n locationStrategy: keyof typeof locationStrategies | LocationStrategyFn\n location: Anchor\n origin: Anchor | 'auto' | 'overlap'\n offset?: number | string | number[]\n maxHeight?: number | string\n maxWidth?: number | string\n minHeight?: number | string\n minWidth?: number | string\n}\n\nexport const makeLocationStrategyProps = propsFactory({\n locationStrategy: {\n type: [String, Function] as PropType<StrategyProps['locationStrategy']>,\n default: 'static',\n validator: (val: any) => typeof val === 'function' || val in locationStrategies,\n },\n location: {\n type: String as PropType<StrategyProps['location']>,\n default: 'bottom',\n },\n origin: {\n type: String as PropType<StrategyProps['origin']>,\n default: 'auto',\n },\n offset: [Number, String, Array] as PropType<StrategyProps['offset']>,\n}, 'VOverlay-location-strategies')\n\nexport function useLocationStrategies (\n props: StrategyProps,\n data: LocationStrategyData\n) {\n const contentStyles = ref({})\n const updateLocation = ref<(e: Event) => void>()\n\n if (IN_BROWSER) {\n useToggleScope(() => !!(data.isActive.value && props.locationStrategy), reset => {\n watch(() => props.locationStrategy, reset)\n onScopeDispose(() => {\n window.removeEventListener('resize', onResize)\n updateLocation.value = undefined\n })\n\n window.addEventListener('resize', onResize, { passive: true })\n\n if (typeof props.locationStrategy === 'function') {\n updateLocation.value = props.locationStrategy(data, props, contentStyles)?.updateLocation\n } else {\n updateLocation.value = locationStrategies[props.locationStrategy](data, props, contentStyles)?.updateLocation\n }\n })\n }\n\n function onResize (e: Event) {\n updateLocation.value?.(e)\n }\n\n return {\n contentStyles,\n updateLocation,\n }\n}\n\nfunction staticLocationStrategy () {\n // TODO\n}\n\n/** Get size of element ignoring max-width/max-height */\nfunction getIntrinsicSize (el: HTMLElement, isRtl: boolean) {\n // const scrollables = new Map<Element, [number, number]>()\n // el.querySelectorAll('*').forEach(el => {\n // const x = el.scrollLeft\n // const y = el.scrollTop\n // if (x || y) {\n // scrollables.set(el, [x, y])\n // }\n // })\n\n // const initialMaxWidth = el.style.maxWidth\n // const initialMaxHeight = el.style.maxHeight\n // el.style.removeProperty('max-width')\n // el.style.removeProperty('max-height')\n\n if (isRtl) {\n el.style.removeProperty('left')\n } else {\n el.style.removeProperty('right')\n }\n\n /* eslint-disable-next-line sonarjs/prefer-immediate-return */\n const contentBox = nullifyTransforms(el)\n\n if (isRtl) {\n contentBox.x += parseFloat(el.style.right || 0)\n } else {\n contentBox.x -= parseFloat(el.style.left || 0)\n }\n contentBox.y -= parseFloat(el.style.top || 0)\n\n // el.style.maxWidth = initialMaxWidth\n // el.style.maxHeight = initialMaxHeight\n // scrollables.forEach((position, el) => {\n // el.scrollTo(...position)\n // })\n\n return contentBox\n}\n\nfunction connectedLocationStrategy (data: LocationStrategyData, props: StrategyProps, contentStyles: Ref<Record<string, string>>) {\n const activatorFixed = Array.isArray(data.target.value) || isFixedPosition(data.target.value)\n if (activatorFixed) {\n Object.assign(contentStyles.value, {\n position: 'fixed',\n top: 0,\n [data.isRtl.value ? 'right' : 'left']: 0,\n })\n }\n\n const { preferredAnchor, preferredOrigin } = destructComputed(() => {\n const parsedAnchor = parseAnchor(props.location, data.isRtl.value)\n const parsedOrigin =\n props.origin === 'overlap' ? parsedAnchor\n : props.origin === 'auto' ? flipSide(parsedAnchor)\n : parseAnchor(props.origin, data.isRtl.value)\n\n // Some combinations of props may produce an invalid origin\n if (parsedAnchor.side === parsedOrigin.side && parsedAnchor.align === flipAlign(parsedOrigin).align) {\n return {\n preferredAnchor: flipCorner(parsedAnchor),\n preferredOrigin: flipCorner(parsedOrigin),\n }\n } else {\n return {\n preferredAnchor: parsedAnchor,\n preferredOrigin: parsedOrigin,\n }\n }\n })\n\n const [minWidth, minHeight, maxWidth, maxHeight] =\n (['minWidth', 'minHeight', 'maxWidth', 'maxHeight'] as const).map(key => {\n return computed(() => {\n const val = parseFloat(props[key]!)\n return isNaN(val) ? Infinity : val\n })\n })\n\n const offset = computed(() => {\n if (Array.isArray(props.offset)) {\n return props.offset\n }\n if (typeof props.offset === 'string') {\n const offset = props.offset.split(' ').map(parseFloat)\n if (offset.length < 2) offset.push(0)\n return offset\n }\n return typeof props.offset === 'number' ? [props.offset, 0] : [0, 0]\n })\n\n let observe = false\n const observer = new ResizeObserver(() => {\n if (observe) updateLocation()\n })\n\n watch([data.target, data.contentEl], ([newTarget, newContentEl], [oldTarget, oldContentEl]) => {\n if (oldTarget && !Array.isArray(oldTarget)) observer.unobserve(oldTarget)\n if (newTarget && !Array.isArray(newTarget)) observer.observe(newTarget)\n\n if (oldContentEl) observer.unobserve(oldContentEl)\n if (newContentEl) observer.observe(newContentEl)\n }, {\n immediate: true,\n })\n\n onScopeDispose(() => {\n observer.disconnect()\n })\n\n // eslint-disable-next-line max-statements\n function updateLocation () {\n observe = false\n requestAnimationFrame(() => observe = true)\n\n if (!data.target.value || !data.contentEl.value) return\n\n const targetBox = getTargetBox(data.target.value)\n const contentBox = getIntrinsicSize(data.contentEl.value, data.isRtl.value)\n const scrollParents = getScrollParents(data.contentEl.value)\n const viewportMargin = 12\n\n if (!scrollParents.length) {\n scrollParents.push(document.documentElement)\n if (!(data.contentEl.value.style.top && data.contentEl.value.style.left)) {\n contentBox.x -= parseFloat(document.documentElement.style.getPropertyValue('--v-body-scroll-x') || 0)\n contentBox.y -= parseFloat(document.documentElement.style.getPropertyValue('--v-body-scroll-y') || 0)\n }\n }\n\n const viewport = scrollParents.reduce<Box>((box: Box | undefined, el) => {\n const rect = el.getBoundingClientRect()\n const scrollBox = new Box({\n x: el === document.documentElement ? 0 : rect.x,\n y: el === document.documentElement ? 0 : rect.y,\n width: el.clientWidth,\n height: el.clientHeight,\n })\n\n if (box) {\n return new Box({\n x: Math.max(box.left, scrollBox.left),\n y: Math.max(box.top, scrollBox.top),\n width: Math.min(box.right, scrollBox.right) - Math.max(box.left, scrollBox.left),\n height: Math.min(box.bottom, scrollBox.bottom) - Math.max(box.top, scrollBox.top),\n })\n }\n return scrollBox\n }, undefined!)\n viewport.x += viewportMargin\n viewport.y += viewportMargin\n viewport.width -= viewportMargin * 2\n viewport.height -= viewportMargin * 2\n\n let placement = {\n anchor: preferredAnchor.value,\n origin: preferredOrigin.value,\n }\n\n function checkOverflow (_placement: typeof placement) {\n const box = new Box(contentBox)\n const targetPoint = anchorToPoint(_placement.anchor, targetBox)\n const contentPoint = anchorToPoint(_placement.origin, box)\n\n let { x, y } = getOffset(targetPoint, contentPoint)\n\n switch (_placement.anchor.side) {\n case 'top': y -= offset.value[0]; break\n case 'bottom': y += offset.value[0]; break\n case 'left': x -= offset.value[0]; break\n case 'right': x += offset.value[0]; break\n }\n\n switch (_placement.anchor.align) {\n case 'top': y -= offset.value[1]; break\n case 'bottom': y += offset.value[1]; break\n case 'left': x -= offset.value[1]; break\n case 'right': x += offset.value[1]; break\n }\n\n box.x += x\n box.y += y\n\n box.width = Math.min(box.width, maxWidth.value)\n box.height = Math.min(box.height, maxHeight.value)\n\n const overflows = getOverflow(box, viewport)\n\n return { overflows, x, y }\n }\n\n let x = 0; let y = 0\n const available = { x: 0, y: 0 }\n const flipped = { x: false, y: false }\n let resets = -1\n while (true) {\n if (resets++ > 10) {\n consoleError('Infinite loop detected in connectedLocationStrategy')\n break\n }\n\n const { x: _x, y: _y, overflows } = checkOverflow(placement)\n\n x += _x\n y += _y\n\n contentBox.x += _x\n contentBox.y += _y\n\n // flip\n {\n const axis = getAxis(placement.anchor)\n const hasOverflowX = overflows.x.before || overflows.x.after\n const hasOverflowY = overflows.y.before || overflows.y.after\n\n let reset = false\n ;['x', 'y'].forEach(key => {\n if (\n (key === 'x' && hasOverflowX && !flipped.x) ||\n (key === 'y' && hasOverflowY && !flipped.y)\n ) {\n const newPlacement = { anchor: { ...placement.anchor }, origin: { ...placement.origin } }\n const flip = key === 'x'\n ? axis === 'y' ? flipAlign : flipSide\n : axis === 'y' ? flipSide : flipAlign\n newPlacement.anchor = flip(newPlacement.anchor)\n newPlacement.origin = flip(newPlacement.origin)\n const { overflows: newOverflows } = checkOverflow(newPlacement)\n if (\n (newOverflows[key].before <= overflows[key].before &&\n newOverflows[key].after <= overflows[key].after) ||\n (newOverflows[key].before + newOverflows[key].after <\n (overflows[key].before + overflows[key].after) / 2)\n ) {\n placement = newPlacement\n reset = flipped[key] = true\n }\n }\n })\n if (reset) continue\n }\n\n // shift\n if (overflows.x.before) {\n x += overflows.x.before\n contentBox.x += overflows.x.before\n }\n if (overflows.x.after) {\n x -= overflows.x.after\n contentBox.x -= overflows.x.after\n }\n if (overflows.y.before) {\n y += overflows.y.before\n contentBox.y += overflows.y.before\n }\n if (overflows.y.after) {\n y -= overflows.y.after\n contentBox.y -= overflows.y.after\n }\n\n // size\n {\n const overflows = getOverflow(contentBox, viewport)\n available.x = viewport.width - overflows.x.before - overflows.x.after\n available.y = viewport.height - overflows.y.before - overflows.y.after\n\n x += overflows.x.before\n contentBox.x += overflows.x.before\n y += overflows.y.before\n contentBox.y += overflows.y.before\n }\n\n break\n }\n\n const axis = getAxis(placement.anchor)\n\n Object.assign(contentStyles.value, {\n '--v-overlay-anchor-origin': `${placement.anchor.side} ${placement.anchor.align}`,\n transformOrigin: `${placement.origin.side} ${placement.origin.align}`,\n // transform: `translate(${pixelRound(x)}px, ${pixelRound(y)}px)`,\n top: convertToUnit(pixelRound(y)),\n left: data.isRtl.value ? undefined : convertToUnit(pixelRound(x)),\n right: data.isRtl.value ? convertToUnit(pixelRound(-x)) : undefined,\n minWidth: convertToUnit(axis === 'y' ? Math.min(minWidth.value, targetBox.width) : minWidth.value),\n maxWidth: convertToUnit(pixelCeil(clamp(available.x, minWidth.value === Infinity ? 0 : minWidth.value, maxWidth.value))),\n maxHeight: convertToUnit(pixelCeil(clamp(available.y, minHeight.value === Infinity ? 0 : minHeight.value, maxHeight.value))),\n })\n\n return {\n available,\n contentBox,\n }\n }\n\n watch(\n () => [\n preferredAnchor.value,\n preferredOrigin.value,\n props.offset,\n props.minWidth,\n props.minHeight,\n props.maxWidth,\n props.maxHeight,\n ],\n () => updateLocation(),\n )\n\n nextTick(() => {\n const result = updateLocation()\n\n // TODO: overflowing content should only require a single updateLocation call\n // Icky hack to make sure the content is positioned consistently\n if (!result) return\n const { available, contentBox } = result\n if (contentBox.height > available.y) {\n requestAnimationFrame(() => {\n updateLocation()\n requestAnimationFrame(() => {\n updateLocation()\n })\n })\n }\n })\n\n return { updateLocation }\n}\n\nfunction pixelRound (val: number) {\n return Math.round(val * devicePixelRatio) / devicePixelRatio\n}\n\nfunction pixelCeil (val: number) {\n return Math.ceil(val * devicePixelRatio) / devicePixelRatio\n}\n"],"mappings":"AAAA;AAAA,SACSA,cAAc,6CAEvB;AACA,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,cAAc,EAAEC,GAAG,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAC3DC,aAAa,EAAEC,SAAS;AAAA,SAE/BC,KAAK,EACLC,YAAY,EACZC,aAAa,EACbC,gBAAgB,EAChBC,SAAS,EACTC,UAAU,EACVC,QAAQ,EACRC,OAAO,EACPC,gBAAgB,EAChBC,UAAU,EACVC,eAAe,EACfC,iBAAiB,EACjBC,WAAW,EACXC,YAAY;AAAA,SAELC,GAAG,EAAEC,WAAW,EAAEC,YAAY,8BAEvC;AAiBA,MAAMC,kBAAkB,GAAG;EACzBC,MAAM,EAAEC,sBAAsB;EAAE;EAChCC,SAAS,EAAEC,yBAAyB,CAAE;AACxC,CAAC;AAaD,OAAO,MAAMC,yBAAyB,GAAGT,YAAY,CAAC;EACpDU,gBAAgB,EAAE;IAChBC,IAAI,EAAE,CAACC,MAAM,EAAEC,QAAQ,CAAgD;IACvEC,OAAO,EAAE,QAAQ;IACjBC,SAAS,EAAGC,GAAQ,IAAK,OAAOA,GAAG,KAAK,UAAU,IAAIA,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M;IACxC,IAAIxF,UAAU,CAAC0D,MAAM,GAAGa,SAAS,CAAClE,CAAC,EAAE;MACnCsC,qBAAqB,CAAC,MAAM;QAC1B3D,cAAc,CAAC,CAAC;QAChB2D,qBAAqB,CAAC,MAAM;UAC1B3D,cAAc,CAAC,CAAC;QAClB,CAAC,CAAC;MACJ,CAAC,CAAC;IACJ;EACF,CAAC,CAAC;EAEF,OAAO;IAAEA;EAAe,CAAC;AAC3B;AAEA,SAASsG,UAAUA,CAAEhH,GAAW,EAAE;EAChC,OAAOsF,IAAI,CAAC6B,KAAK,CAACnH,GAAG,GAAGoH,gBAAgB,CAAC,GAAGA,gBAAgB;AAC9D;AAEA,SAASH,SAASA,CAAEjH,GAAW,EAAE;EAC/B,OAAOsF,IAAI,CAAC+B,IAAI,CAACrH,GAAG,GAAGoH,gBAAgB,CAAC,GAAGA,gBAAgB;AAC7D","ignoreList":[]}
|
@@ -8,6 +8,11 @@
|
|
8
8
|
.v-progress-linear--rounded {
|
9
9
|
border-radius: 9999px;
|
10
10
|
}
|
11
|
+
@media (forced-colors: active) {
|
12
|
+
.v-progress-linear {
|
13
|
+
border: thin solid buttontext;
|
14
|
+
}
|
15
|
+
}
|
11
16
|
|
12
17
|
.v-progress-linear__background,
|
13
18
|
.v-progress-linear__buffer {
|
@@ -22,6 +27,12 @@
|
|
22
27
|
transition: inherit;
|
23
28
|
}
|
24
29
|
|
30
|
+
@media (forced-colors: active) {
|
31
|
+
.v-progress-linear__buffer {
|
32
|
+
background-color: highlight;
|
33
|
+
opacity: 0.3;
|
34
|
+
}
|
35
|
+
}
|
25
36
|
.v-progress-linear__content {
|
26
37
|
align-items: center;
|
27
38
|
display: flex;
|
@@ -38,6 +49,12 @@
|
|
38
49
|
.v-progress-linear__indeterminate {
|
39
50
|
background: currentColor;
|
40
51
|
}
|
52
|
+
@media (forced-colors: active) {
|
53
|
+
.v-progress-linear__determinate,
|
54
|
+
.v-progress-linear__indeterminate {
|
55
|
+
background-color: highlight;
|
56
|
+
}
|
57
|
+
}
|
41
58
|
|
42
59
|
.v-progress-linear__determinate {
|
43
60
|
height: inherit;
|
@@ -13,7 +13,7 @@ import { makeRoundedProps, useRounded } from "../../composables/rounded.mjs";
|
|
13
13
|
import { makeTagProps } from "../../composables/tag.mjs";
|
14
14
|
import { makeThemeProps, provideTheme } from "../../composables/theme.mjs"; // Utilities
|
15
15
|
import { computed, Transition } from 'vue';
|
16
|
-
import { clamp, convertToUnit, genericComponent, propsFactory, useRender } from "../../util/index.mjs";
|
16
|
+
import { clamp, convertToUnit, genericComponent, IN_BROWSER, propsFactory, useRender } from "../../util/index.mjs";
|
17
17
|
export const makeVProgressLinearProps = propsFactory({
|
18
18
|
absolute: Boolean,
|
19
19
|
active: {
|
@@ -106,6 +106,7 @@ export const VProgressLinear = genericComponent()({
|
|
106
106
|
const normalizedValue = computed(() => clamp(parseFloat(progress.value) / max.value * 100, 0, 100));
|
107
107
|
const isReversed = computed(() => isRtl.value !== props.reverse);
|
108
108
|
const transition = computed(() => props.indeterminate ? 'fade-transition' : 'slide-x-transition');
|
109
|
+
const isForcedColorsModeActive = IN_BROWSER && window.matchMedia?.('(forced-colors: active)').matches;
|
109
110
|
function handleClick(e) {
|
110
111
|
if (!intersectionRef.value) return;
|
111
112
|
const {
|
@@ -153,13 +154,13 @@ export const VProgressLinear = genericComponent()({
|
|
153
154
|
'--v-progress-linear-stream-to': convertToUnit(height.value * (isReversed.value ? 1 : -1))
|
154
155
|
}
|
155
156
|
}, null), _createVNode("div", {
|
156
|
-
"class": ['v-progress-linear__background', backgroundColorClasses.value],
|
157
|
+
"class": ['v-progress-linear__background', !isForcedColorsModeActive ? backgroundColorClasses.value : undefined],
|
157
158
|
"style": [backgroundColorStyles.value, {
|
158
159
|
opacity: parseFloat(props.bgOpacity),
|
159
160
|
width: props.stream ? 0 : undefined
|
160
161
|
}]
|
161
162
|
}, null), _createVNode("div", {
|
162
|
-
"class": ['v-progress-linear__buffer', bufferColorClasses.value],
|
163
|
+
"class": ['v-progress-linear__buffer', !isForcedColorsModeActive ? bufferColorClasses.value : undefined],
|
163
164
|
"style": [bufferColorStyles.value, {
|
164
165
|
opacity: parseFloat(props.bufferOpacity),
|
165
166
|
width: convertToUnit(normalizedBuffer.value, '%')
|
@@ -168,7 +169,7 @@ export const VProgressLinear = genericComponent()({
|
|
168
169
|
"name": transition.value
|
169
170
|
}, {
|
170
171
|
default: () => [!props.indeterminate ? _createVNode("div", {
|
171
|
-
"class": ['v-progress-linear__determinate', barColorClasses.value],
|
172
|
+
"class": ['v-progress-linear__determinate', !isForcedColorsModeActive ? barColorClasses.value : undefined],
|
172
173
|
"style": [barColorStyles.value, {
|
173
174
|
width: convertToUnit(normalizedValue.value, '%')
|
174
175
|
}]
|
@@ -176,7 +177,7 @@ export const VProgressLinear = genericComponent()({
|
|
176
177
|
"class": "v-progress-linear__indeterminate"
|
177
178
|
}, [['long', 'short'].map(bar => _createVNode("div", {
|
178
179
|
"key": bar,
|
179
|
-
"class": ['v-progress-linear__indeterminate', bar, barColorClasses.value],
|
180
|
+
"class": ['v-progress-linear__indeterminate', bar, !isForcedColorsModeActive ? barColorClasses.value : undefined],
|
180
181
|
"style": barColorStyles.value
|
181
182
|
}, null))])]
|
182
183
|
}), slots.default && _createVNode("div", {
|