vuetify 3.3.13 → 3.3.14
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 +70 -66
- package/dist/json/importMap-labs.json +4 -4
- package/dist/json/importMap.json +12 -12
- package/dist/json/tags.json +5 -4
- package/dist/json/web-types.json +180 -140
- package/dist/vuetify-labs.css +363 -304
- package/dist/vuetify-labs.d.ts +384 -236
- package/dist/vuetify-labs.esm.js +410 -297
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +409 -296
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +291 -232
- package/dist/vuetify.d.ts +232 -76
- package/dist/vuetify.esm.js +210 -160
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +209 -159
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +838 -827
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VAppBar/VAppBar.mjs.map +1 -1
- package/lib/components/VAppBar/index.d.mts +6 -6
- package/lib/components/VAutocomplete/VAutocomplete.mjs +12 -2
- package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
- package/lib/components/VBadge/VBadge.css +1 -1
- package/lib/components/VBadge/_variables.scss +1 -1
- package/lib/components/VCheckbox/VCheckbox.mjs +2 -2
- package/lib/components/VCheckbox/VCheckbox.mjs.map +1 -1
- package/lib/components/VCheckbox/VCheckboxBtn.mjs +14 -11
- package/lib/components/VCheckbox/VCheckboxBtn.mjs.map +1 -1
- package/lib/components/VColorPicker/VColorPickerEdit.css +4 -2
- package/lib/components/VColorPicker/VColorPickerPreview.css +11 -6
- package/lib/components/VCombobox/VCombobox.mjs +11 -1
- package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
- package/lib/components/VField/VField.css +22 -7
- package/lib/components/VField/VField.sass +8 -1
- package/lib/components/VField/_variables.scss +1 -0
- package/lib/components/VGrid/VGrid.css +153 -142
- package/lib/components/VProgressLinear/VProgressLinear.css +3 -2
- package/lib/components/VRadioGroup/VRadioGroup.mjs +2 -2
- package/lib/components/VRadioGroup/VRadioGroup.mjs.map +1 -1
- package/lib/components/VRangeSlider/index.d.mts +114 -33
- package/lib/components/VSelect/VSelect.mjs +12 -2
- package/lib/components/VSelect/VSelect.mjs.map +1 -1
- package/lib/components/VSelectionControl/VSelectionControl.mjs +2 -1
- package/lib/components/VSelectionControl/VSelectionControl.mjs.map +1 -1
- package/lib/components/VSlider/VSlider.mjs.map +1 -1
- package/lib/components/VSlider/VSliderThumb.css +8 -4
- package/lib/components/VSlider/VSliderTrack.css +22 -12
- package/lib/components/VSlider/index.d.mts +114 -33
- package/lib/components/VSwitch/VSwitch.mjs +9 -9
- package/lib/components/VSwitch/VSwitch.mjs.map +1 -1
- package/lib/components/VTimeline/VTimeline.css +19 -10
- package/lib/components/VTimeline/VTimeline.sass +5 -0
- package/lib/components/VToolbar/VToolbar.css +4 -2
- package/lib/components/index.d.mts +228 -72
- package/lib/composables/color.mjs +6 -1
- package/lib/composables/color.mjs.map +1 -1
- package/lib/composables/defaults.mjs +9 -9
- package/lib/composables/defaults.mjs.map +1 -1
- package/lib/composables/theme.mjs +2 -5
- package/lib/composables/theme.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/framework.mjs +1 -1
- package/lib/index.d.mts +4 -4
- package/lib/labs/VDateInput/index.d.mts +2 -2
- package/lib/labs/VDatePicker/VDateCard.mjs +3 -0
- package/lib/labs/VDatePicker/VDateCard.mjs.map +1 -1
- package/lib/labs/VDatePicker/VDatePicker.mjs +51 -21
- package/lib/labs/VDatePicker/VDatePicker.mjs.map +1 -1
- package/lib/labs/VDatePicker/VDatePickerControls.css +1 -1
- package/lib/labs/VDatePicker/VDatePickerControls.mjs +53 -35
- package/lib/labs/VDatePicker/VDatePickerControls.mjs.map +1 -1
- package/lib/labs/VDatePicker/VDatePickerMonth.mjs +37 -28
- package/lib/labs/VDatePicker/VDatePickerMonth.mjs.map +1 -1
- package/lib/labs/VDatePicker/VDatePickerYears.mjs +19 -17
- package/lib/labs/VDatePicker/VDatePickerYears.mjs.map +1 -1
- package/lib/labs/VDatePicker/index.d.mts +148 -156
- package/lib/labs/VDateRangePicker/VDateRangeCard.mjs +3 -0
- package/lib/labs/VDateRangePicker/VDateRangeCard.mjs.map +1 -1
- package/lib/labs/VDateRangePicker/index.d.mts +59 -52
- package/lib/labs/VSkeletonLoader/VSkeletonLoader.mjs.map +1 -1
- package/lib/labs/VSkeletonLoader/index.d.mts +8 -8
- package/lib/labs/components.d.mts +156 -164
- package/lib/locale/no.mjs +1 -1
- package/lib/locale/no.mjs.map +1 -1
- package/lib/styles/tools/_rtl.sass +4 -2
- package/lib/util/colorUtils.mjs +6 -0
- package/lib/util/colorUtils.mjs.map +1 -1
- package/lib/util/helpers.mjs +10 -4
- package/lib/util/helpers.mjs.map +1 -1
- package/lib/util/injectSelf.mjs +2 -1
- package/lib/util/injectSelf.mjs.map +1 -1
- package/package.json +2 -2
package/dist/vuetify.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Vuetify v3.3.
|
|
2
|
+
* Vuetify v3.3.14
|
|
3
3
|
* Forged by John Leider
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -228,14 +228,22 @@
|
|
|
228
228
|
exclude.forEach(prop => delete clone[prop]);
|
|
229
229
|
return clone;
|
|
230
230
|
}
|
|
231
|
+
const onRE = /^on[^a-z]/;
|
|
232
|
+
const isOn = key => onRE.test(key);
|
|
233
|
+
const bubblingEvents = ['onAfterscriptexecute', 'onAnimationcancel', 'onAnimationend', 'onAnimationiteration', 'onAnimationstart', 'onAuxclick', 'onBeforeinput', 'onBeforescriptexecute', 'onChange', 'onClick', 'onCompositionend', 'onCompositionstart', 'onCompositionupdate', 'onContextmenu', 'onCopy', 'onCut', 'onDblclick', 'onFocusin', 'onFocusout', 'onFullscreenchange', 'onFullscreenerror', 'onGesturechange', 'onGestureend', 'onGesturestart', 'onGotpointercapture', 'onInput', 'onKeydown', 'onKeypress', 'onKeyup', 'onLostpointercapture', 'onMousedown', 'onMousemove', 'onMouseout', 'onMouseover', 'onMouseup', 'onMousewheel', 'onPaste', 'onPointercancel', 'onPointerdown', 'onPointerenter', 'onPointerleave', 'onPointermove', 'onPointerout', 'onPointerover', 'onPointerup', 'onReset', 'onSelect', 'onSubmit', 'onTouchcancel', 'onTouchend', 'onTouchmove', 'onTouchstart', 'onTransitioncancel', 'onTransitionend', 'onTransitionrun', 'onTransitionstart', 'onWheel'];
|
|
231
234
|
|
|
232
235
|
/**
|
|
233
236
|
* Filter attributes that should be applied to
|
|
234
|
-
* the root element of
|
|
237
|
+
* the root element of an input component. Remaining
|
|
235
238
|
* attributes should be passed to the <input> element inside.
|
|
236
239
|
*/
|
|
237
240
|
function filterInputAttrs(attrs) {
|
|
238
|
-
|
|
241
|
+
const [events, props] = pick(attrs, [onRE]);
|
|
242
|
+
const inputEvents = omit(events, bubblingEvents);
|
|
243
|
+
const [rootAttrs, inputAttrs] = pick(props, ['class', 'style', 'id', /^data-/]);
|
|
244
|
+
Object.assign(rootAttrs, events);
|
|
245
|
+
Object.assign(inputAttrs, inputEvents);
|
|
246
|
+
return [rootAttrs, inputAttrs];
|
|
239
247
|
}
|
|
240
248
|
function wrapInArray(v) {
|
|
241
249
|
return v == null ? [] : Array.isArray(v) ? v : [v];
|
|
@@ -388,8 +396,6 @@
|
|
|
388
396
|
function includes(arr, val) {
|
|
389
397
|
return arr.includes(val);
|
|
390
398
|
}
|
|
391
|
-
const onRE = /^on[^a-z]/;
|
|
392
|
-
const isOn = key => onRE.test(key);
|
|
393
399
|
function eventName(propName) {
|
|
394
400
|
return propName[2].toLowerCase() + propName.slice(3);
|
|
395
401
|
}
|
|
@@ -656,6 +662,94 @@
|
|
|
656
662
|
});
|
|
657
663
|
}
|
|
658
664
|
|
|
665
|
+
/**
|
|
666
|
+
* WCAG 3.0 APCA perceptual contrast algorithm from https://github.com/Myndex/SAPC-APCA
|
|
667
|
+
* @licence https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
|
|
668
|
+
* @see https://www.w3.org/WAI/GL/task-forces/silver/wiki/Visual_Contrast_of_Text_Subgroup
|
|
669
|
+
*/
|
|
670
|
+
// Types
|
|
671
|
+
|
|
672
|
+
// MAGICAL NUMBERS
|
|
673
|
+
|
|
674
|
+
// sRGB Conversion to Relative Luminance (Y)
|
|
675
|
+
|
|
676
|
+
// Transfer Curve (aka "Gamma") for sRGB linearization
|
|
677
|
+
// Simple power curve vs piecewise described in docs
|
|
678
|
+
// Essentially, 2.4 best models actual display
|
|
679
|
+
// characteristics in combination with the total method
|
|
680
|
+
const mainTRC = 2.4;
|
|
681
|
+
const Rco = 0.2126729; // sRGB Red Coefficient (from matrix)
|
|
682
|
+
const Gco = 0.7151522; // sRGB Green Coefficient (from matrix)
|
|
683
|
+
const Bco = 0.0721750; // sRGB Blue Coefficient (from matrix)
|
|
684
|
+
|
|
685
|
+
// For Finding Raw SAPC Contrast from Relative Luminance (Y)
|
|
686
|
+
|
|
687
|
+
// Constants for SAPC Power Curve Exponents
|
|
688
|
+
// One pair for normal text, and one for reverse
|
|
689
|
+
// These are the "beating heart" of SAPC
|
|
690
|
+
const normBG = 0.55;
|
|
691
|
+
const normTXT = 0.58;
|
|
692
|
+
const revTXT = 0.57;
|
|
693
|
+
const revBG = 0.62;
|
|
694
|
+
|
|
695
|
+
// For Clamping and Scaling Values
|
|
696
|
+
|
|
697
|
+
const blkThrs = 0.03; // Level that triggers the soft black clamp
|
|
698
|
+
const blkClmp = 1.45; // Exponent for the soft black clamp curve
|
|
699
|
+
const deltaYmin = 0.0005; // Lint trap
|
|
700
|
+
const scaleBoW = 1.25; // Scaling for dark text on light
|
|
701
|
+
const scaleWoB = 1.25; // Scaling for light text on dark
|
|
702
|
+
const loConThresh = 0.078; // Threshold for new simple offset scale
|
|
703
|
+
const loConFactor = 12.82051282051282; // = 1/0.078,
|
|
704
|
+
const loConOffset = 0.06; // The simple offset
|
|
705
|
+
const loClip = 0.001; // Output clip (lint trap #2)
|
|
706
|
+
|
|
707
|
+
function APCAcontrast(text, background) {
|
|
708
|
+
// Linearize sRGB
|
|
709
|
+
const Rtxt = (text.r / 255) ** mainTRC;
|
|
710
|
+
const Gtxt = (text.g / 255) ** mainTRC;
|
|
711
|
+
const Btxt = (text.b / 255) ** mainTRC;
|
|
712
|
+
const Rbg = (background.r / 255) ** mainTRC;
|
|
713
|
+
const Gbg = (background.g / 255) ** mainTRC;
|
|
714
|
+
const Bbg = (background.b / 255) ** mainTRC;
|
|
715
|
+
|
|
716
|
+
// Apply the standard coefficients and sum to Y
|
|
717
|
+
let Ytxt = Rtxt * Rco + Gtxt * Gco + Btxt * Bco;
|
|
718
|
+
let Ybg = Rbg * Rco + Gbg * Gco + Bbg * Bco;
|
|
719
|
+
|
|
720
|
+
// Soft clamp Y when near black.
|
|
721
|
+
// Now clamping all colors to prevent crossover errors
|
|
722
|
+
if (Ytxt <= blkThrs) Ytxt += (blkThrs - Ytxt) ** blkClmp;
|
|
723
|
+
if (Ybg <= blkThrs) Ybg += (blkThrs - Ybg) ** blkClmp;
|
|
724
|
+
|
|
725
|
+
// Return 0 Early for extremely low ∆Y (lint trap #1)
|
|
726
|
+
if (Math.abs(Ybg - Ytxt) < deltaYmin) return 0.0;
|
|
727
|
+
|
|
728
|
+
// SAPC CONTRAST
|
|
729
|
+
|
|
730
|
+
let outputContrast; // For weighted final values
|
|
731
|
+
if (Ybg > Ytxt) {
|
|
732
|
+
// For normal polarity, black text on white
|
|
733
|
+
// Calculate the SAPC contrast value and scale
|
|
734
|
+
|
|
735
|
+
const SAPC = (Ybg ** normBG - Ytxt ** normTXT) * scaleBoW;
|
|
736
|
+
|
|
737
|
+
// NEW! SAPC SmoothScale™
|
|
738
|
+
// Low Contrast Smooth Scale Rollout to prevent polarity reversal
|
|
739
|
+
// and also a low clip for very low contrasts (lint trap #2)
|
|
740
|
+
// much of this is for very low contrasts, less than 10
|
|
741
|
+
// therefore for most reversing needs, only loConOffset is important
|
|
742
|
+
outputContrast = SAPC < loClip ? 0.0 : SAPC < loConThresh ? SAPC - SAPC * loConFactor * loConOffset : SAPC - loConOffset;
|
|
743
|
+
} else {
|
|
744
|
+
// For reverse polarity, light text on dark
|
|
745
|
+
// WoB should always return negative value.
|
|
746
|
+
|
|
747
|
+
const SAPC = (Ybg ** revBG - Ytxt ** revTXT) * scaleWoB;
|
|
748
|
+
outputContrast = SAPC > -loClip ? 0.0 : SAPC > -loConThresh ? SAPC - SAPC * loConFactor * loConOffset : SAPC + loConOffset;
|
|
749
|
+
}
|
|
750
|
+
return outputContrast * 100;
|
|
751
|
+
}
|
|
752
|
+
|
|
659
753
|
/* eslint-disable no-console */
|
|
660
754
|
|
|
661
755
|
function consoleWarn(message) {
|
|
@@ -1012,36 +1106,13 @@
|
|
|
1012
1106
|
const dark = Math.min(l1, l2);
|
|
1013
1107
|
return (light + 0.05) / (dark + 0.05);
|
|
1014
1108
|
}
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
function useToggleScope(source, fn) {
|
|
1021
|
-
let scope;
|
|
1022
|
-
function start() {
|
|
1023
|
-
scope = vue.effectScope();
|
|
1024
|
-
scope.run(() => fn.length ? fn(() => {
|
|
1025
|
-
scope?.stop();
|
|
1026
|
-
start();
|
|
1027
|
-
}) : fn());
|
|
1028
|
-
}
|
|
1029
|
-
vue.watch(source, active => {
|
|
1030
|
-
if (active && !scope) {
|
|
1031
|
-
start();
|
|
1032
|
-
} else if (!active) {
|
|
1033
|
-
scope?.stop();
|
|
1034
|
-
scope = undefined;
|
|
1035
|
-
}
|
|
1036
|
-
}, {
|
|
1037
|
-
immediate: true
|
|
1038
|
-
});
|
|
1039
|
-
vue.onScopeDispose(() => {
|
|
1040
|
-
scope?.stop();
|
|
1041
|
-
});
|
|
1109
|
+
function getForeground(color) {
|
|
1110
|
+
const blackContrast = Math.abs(APCAcontrast(parseColor(0), parseColor(color)));
|
|
1111
|
+
const whiteContrast = Math.abs(APCAcontrast(parseColor(0xffffff), parseColor(color)));
|
|
1112
|
+
return whiteContrast > Math.min(blackContrast, 50) ? '#fff' : '#000';
|
|
1042
1113
|
}
|
|
1043
1114
|
|
|
1044
|
-
//
|
|
1115
|
+
// Utilities
|
|
1045
1116
|
|
|
1046
1117
|
// Types
|
|
1047
1118
|
|
|
@@ -1063,6 +1134,7 @@
|
|
|
1063
1134
|
const scoped = vue.unref(options?.scoped);
|
|
1064
1135
|
const reset = vue.unref(options?.reset);
|
|
1065
1136
|
const root = vue.unref(options?.root);
|
|
1137
|
+
if (providedDefaults.value == null && !(scoped || reset || root)) return injectedDefaults.value;
|
|
1066
1138
|
let properties = mergeDeep(providedDefaults.value, {
|
|
1067
1139
|
prev: injectedDefaults.value
|
|
1068
1140
|
});
|
|
@@ -1118,16 +1190,16 @@
|
|
|
1118
1190
|
let [key] = _ref;
|
|
1119
1191
|
return key.startsWith(key[0].toUpperCase());
|
|
1120
1192
|
});
|
|
1121
|
-
|
|
1193
|
+
_subcomponentDefaults.value = subComponents.length ? Object.fromEntries(subComponents) : undefined;
|
|
1194
|
+
} else {
|
|
1195
|
+
_subcomponentDefaults.value = undefined;
|
|
1122
1196
|
}
|
|
1123
1197
|
});
|
|
1124
1198
|
function provideSubDefaults() {
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
provideDefaults(mergeDeep(injectSelf(DefaultsSymbol)?.value ?? {}, _subcomponentDefaults.value));
|
|
1130
|
-
});
|
|
1199
|
+
const injected = injectSelf(DefaultsSymbol, vm);
|
|
1200
|
+
vue.provide(DefaultsSymbol, vue.computed(() => {
|
|
1201
|
+
return _subcomponentDefaults.value ? mergeDeep(injected?.value ?? {}, _subcomponentDefaults.value) : injected?.value;
|
|
1202
|
+
}));
|
|
1131
1203
|
}
|
|
1132
1204
|
return {
|
|
1133
1205
|
props: _props,
|
|
@@ -1305,9 +1377,10 @@
|
|
|
1305
1377
|
// Types
|
|
1306
1378
|
|
|
1307
1379
|
function injectSelf(key) {
|
|
1380
|
+
let vm = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getCurrentInstance('injectSelf');
|
|
1308
1381
|
const {
|
|
1309
1382
|
provides
|
|
1310
|
-
} =
|
|
1383
|
+
} = vm;
|
|
1311
1384
|
if (provides && key in provides) {
|
|
1312
1385
|
// TS doesn't allow symbol as index type
|
|
1313
1386
|
return provides[key];
|
|
@@ -1784,6 +1857,34 @@
|
|
|
1784
1857
|
zhHant: false
|
|
1785
1858
|
};
|
|
1786
1859
|
|
|
1860
|
+
// Utilities
|
|
1861
|
+
|
|
1862
|
+
// Types
|
|
1863
|
+
|
|
1864
|
+
function useToggleScope(source, fn) {
|
|
1865
|
+
let scope;
|
|
1866
|
+
function start() {
|
|
1867
|
+
scope = vue.effectScope();
|
|
1868
|
+
scope.run(() => fn.length ? fn(() => {
|
|
1869
|
+
scope?.stop();
|
|
1870
|
+
start();
|
|
1871
|
+
}) : fn());
|
|
1872
|
+
}
|
|
1873
|
+
vue.watch(source, active => {
|
|
1874
|
+
if (active && !scope) {
|
|
1875
|
+
start();
|
|
1876
|
+
} else if (!active) {
|
|
1877
|
+
scope?.stop();
|
|
1878
|
+
scope = undefined;
|
|
1879
|
+
}
|
|
1880
|
+
}, {
|
|
1881
|
+
immediate: true
|
|
1882
|
+
});
|
|
1883
|
+
vue.onScopeDispose(() => {
|
|
1884
|
+
scope?.stop();
|
|
1885
|
+
});
|
|
1886
|
+
}
|
|
1887
|
+
|
|
1787
1888
|
// Composables
|
|
1788
1889
|
|
|
1789
1890
|
// Types
|
|
@@ -1985,94 +2086,6 @@
|
|
|
1985
2086
|
};
|
|
1986
2087
|
}
|
|
1987
2088
|
|
|
1988
|
-
/**
|
|
1989
|
-
* WCAG 3.0 APCA perceptual contrast algorithm from https://github.com/Myndex/SAPC-APCA
|
|
1990
|
-
* @licence https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
|
|
1991
|
-
* @see https://www.w3.org/WAI/GL/task-forces/silver/wiki/Visual_Contrast_of_Text_Subgroup
|
|
1992
|
-
*/
|
|
1993
|
-
// Types
|
|
1994
|
-
|
|
1995
|
-
// MAGICAL NUMBERS
|
|
1996
|
-
|
|
1997
|
-
// sRGB Conversion to Relative Luminance (Y)
|
|
1998
|
-
|
|
1999
|
-
// Transfer Curve (aka "Gamma") for sRGB linearization
|
|
2000
|
-
// Simple power curve vs piecewise described in docs
|
|
2001
|
-
// Essentially, 2.4 best models actual display
|
|
2002
|
-
// characteristics in combination with the total method
|
|
2003
|
-
const mainTRC = 2.4;
|
|
2004
|
-
const Rco = 0.2126729; // sRGB Red Coefficient (from matrix)
|
|
2005
|
-
const Gco = 0.7151522; // sRGB Green Coefficient (from matrix)
|
|
2006
|
-
const Bco = 0.0721750; // sRGB Blue Coefficient (from matrix)
|
|
2007
|
-
|
|
2008
|
-
// For Finding Raw SAPC Contrast from Relative Luminance (Y)
|
|
2009
|
-
|
|
2010
|
-
// Constants for SAPC Power Curve Exponents
|
|
2011
|
-
// One pair for normal text, and one for reverse
|
|
2012
|
-
// These are the "beating heart" of SAPC
|
|
2013
|
-
const normBG = 0.55;
|
|
2014
|
-
const normTXT = 0.58;
|
|
2015
|
-
const revTXT = 0.57;
|
|
2016
|
-
const revBG = 0.62;
|
|
2017
|
-
|
|
2018
|
-
// For Clamping and Scaling Values
|
|
2019
|
-
|
|
2020
|
-
const blkThrs = 0.03; // Level that triggers the soft black clamp
|
|
2021
|
-
const blkClmp = 1.45; // Exponent for the soft black clamp curve
|
|
2022
|
-
const deltaYmin = 0.0005; // Lint trap
|
|
2023
|
-
const scaleBoW = 1.25; // Scaling for dark text on light
|
|
2024
|
-
const scaleWoB = 1.25; // Scaling for light text on dark
|
|
2025
|
-
const loConThresh = 0.078; // Threshold for new simple offset scale
|
|
2026
|
-
const loConFactor = 12.82051282051282; // = 1/0.078,
|
|
2027
|
-
const loConOffset = 0.06; // The simple offset
|
|
2028
|
-
const loClip = 0.001; // Output clip (lint trap #2)
|
|
2029
|
-
|
|
2030
|
-
function APCAcontrast(text, background) {
|
|
2031
|
-
// Linearize sRGB
|
|
2032
|
-
const Rtxt = (text.r / 255) ** mainTRC;
|
|
2033
|
-
const Gtxt = (text.g / 255) ** mainTRC;
|
|
2034
|
-
const Btxt = (text.b / 255) ** mainTRC;
|
|
2035
|
-
const Rbg = (background.r / 255) ** mainTRC;
|
|
2036
|
-
const Gbg = (background.g / 255) ** mainTRC;
|
|
2037
|
-
const Bbg = (background.b / 255) ** mainTRC;
|
|
2038
|
-
|
|
2039
|
-
// Apply the standard coefficients and sum to Y
|
|
2040
|
-
let Ytxt = Rtxt * Rco + Gtxt * Gco + Btxt * Bco;
|
|
2041
|
-
let Ybg = Rbg * Rco + Gbg * Gco + Bbg * Bco;
|
|
2042
|
-
|
|
2043
|
-
// Soft clamp Y when near black.
|
|
2044
|
-
// Now clamping all colors to prevent crossover errors
|
|
2045
|
-
if (Ytxt <= blkThrs) Ytxt += (blkThrs - Ytxt) ** blkClmp;
|
|
2046
|
-
if (Ybg <= blkThrs) Ybg += (blkThrs - Ybg) ** blkClmp;
|
|
2047
|
-
|
|
2048
|
-
// Return 0 Early for extremely low ∆Y (lint trap #1)
|
|
2049
|
-
if (Math.abs(Ybg - Ytxt) < deltaYmin) return 0.0;
|
|
2050
|
-
|
|
2051
|
-
// SAPC CONTRAST
|
|
2052
|
-
|
|
2053
|
-
let outputContrast; // For weighted final values
|
|
2054
|
-
if (Ybg > Ytxt) {
|
|
2055
|
-
// For normal polarity, black text on white
|
|
2056
|
-
// Calculate the SAPC contrast value and scale
|
|
2057
|
-
|
|
2058
|
-
const SAPC = (Ybg ** normBG - Ytxt ** normTXT) * scaleBoW;
|
|
2059
|
-
|
|
2060
|
-
// NEW! SAPC SmoothScale™
|
|
2061
|
-
// Low Contrast Smooth Scale Rollout to prevent polarity reversal
|
|
2062
|
-
// and also a low clip for very low contrasts (lint trap #2)
|
|
2063
|
-
// much of this is for very low contrasts, less than 10
|
|
2064
|
-
// therefore for most reversing needs, only loConOffset is important
|
|
2065
|
-
outputContrast = SAPC < loClip ? 0.0 : SAPC < loConThresh ? SAPC - SAPC * loConFactor * loConOffset : SAPC - loConOffset;
|
|
2066
|
-
} else {
|
|
2067
|
-
// For reverse polarity, light text on dark
|
|
2068
|
-
// WoB should always return negative value.
|
|
2069
|
-
|
|
2070
|
-
const SAPC = (Ybg ** revBG - Ytxt ** revTXT) * scaleWoB;
|
|
2071
|
-
outputContrast = SAPC > -loClip ? 0.0 : SAPC > -loConThresh ? SAPC - SAPC * loConFactor * loConOffset : SAPC + loConOffset;
|
|
2072
|
-
}
|
|
2073
|
-
return outputContrast * 100;
|
|
2074
|
-
}
|
|
2075
|
-
|
|
2076
2089
|
// Utilities
|
|
2077
2090
|
|
|
2078
2091
|
// Types
|
|
@@ -2208,8 +2221,6 @@
|
|
|
2208
2221
|
if (/^on-[a-z]/.test(color) || theme.colors[`on-${color}`]) continue;
|
|
2209
2222
|
const onColor = `on-${color}`;
|
|
2210
2223
|
const colorVal = parseColor(theme.colors[color]);
|
|
2211
|
-
const blackContrast = Math.abs(APCAcontrast(parseColor(0), colorVal));
|
|
2212
|
-
const whiteContrast = Math.abs(APCAcontrast(parseColor(0xffffff), colorVal));
|
|
2213
2224
|
|
|
2214
2225
|
// TODO: warn about poor color selections
|
|
2215
2226
|
// const contrastAsText = Math.abs(APCAcontrast(colorVal, colorToInt(theme.colors.background)))
|
|
@@ -2221,7 +2232,7 @@
|
|
|
2221
2232
|
// }
|
|
2222
2233
|
|
|
2223
2234
|
// Prefer white text if both have an acceptable contrast ratio
|
|
2224
|
-
theme.colors[onColor] =
|
|
2235
|
+
theme.colors[onColor] = getForeground(colorVal);
|
|
2225
2236
|
}
|
|
2226
2237
|
}
|
|
2227
2238
|
return acc;
|
|
@@ -3250,6 +3261,11 @@
|
|
|
3250
3261
|
if (colors.value.background) {
|
|
3251
3262
|
if (isCssColor(colors.value.background)) {
|
|
3252
3263
|
styles.backgroundColor = colors.value.background;
|
|
3264
|
+
if (!colors.value.text) {
|
|
3265
|
+
const textColor = getForeground(styles.backgroundColor);
|
|
3266
|
+
styles.color = textColor;
|
|
3267
|
+
styles.caretColor = textColor;
|
|
3268
|
+
}
|
|
3253
3269
|
} else {
|
|
3254
3270
|
classes.push(`bg-${colors.value.background}`);
|
|
3255
3271
|
}
|
|
@@ -5895,7 +5911,8 @@
|
|
|
5895
5911
|
"icon": icon.value
|
|
5896
5912
|
}, null), inputNode])]), [[vue.resolveDirective("ripple"), props.ripple && [!props.disabled && !props.readonly, null, ['center', 'circle']]]])]), label && vue.createVNode(VLabel, {
|
|
5897
5913
|
"for": id.value,
|
|
5898
|
-
"clickable": true
|
|
5914
|
+
"clickable": true,
|
|
5915
|
+
"onClick": e => e.stopPropagation()
|
|
5899
5916
|
}, {
|
|
5900
5917
|
default: () => [label]
|
|
5901
5918
|
})]);
|
|
@@ -5944,16 +5961,19 @@
|
|
|
5944
5961
|
const trueIcon = vue.computed(() => {
|
|
5945
5962
|
return indeterminate.value ? props.indeterminateIcon : props.trueIcon;
|
|
5946
5963
|
});
|
|
5947
|
-
useRender(() =>
|
|
5948
|
-
|
|
5949
|
-
|
|
5950
|
-
|
|
5951
|
-
|
|
5952
|
-
|
|
5953
|
-
|
|
5954
|
-
|
|
5955
|
-
|
|
5956
|
-
|
|
5964
|
+
useRender(() => {
|
|
5965
|
+
const controlProps = omit(VSelectionControl.filterProps(props)[0], ['modelValue']);
|
|
5966
|
+
return vue.createVNode(VSelectionControl, vue.mergeProps(controlProps, {
|
|
5967
|
+
"modelValue": model.value,
|
|
5968
|
+
"onUpdate:modelValue": [$event => model.value = $event, onChange],
|
|
5969
|
+
"class": ['v-checkbox-btn', props.class],
|
|
5970
|
+
"style": props.style,
|
|
5971
|
+
"type": "checkbox",
|
|
5972
|
+
"falseIcon": falseIcon.value,
|
|
5973
|
+
"trueIcon": trueIcon.value,
|
|
5974
|
+
"aria-checked": indeterminate.value ? 'mixed' : undefined
|
|
5975
|
+
}), slots);
|
|
5976
|
+
});
|
|
5957
5977
|
return {};
|
|
5958
5978
|
}
|
|
5959
5979
|
});
|
|
@@ -6517,12 +6537,12 @@
|
|
|
6517
6537
|
const uid = getUid();
|
|
6518
6538
|
const id = vue.computed(() => props.id || `checkbox-${uid}`);
|
|
6519
6539
|
useRender(() => {
|
|
6520
|
-
const [
|
|
6540
|
+
const [rootAttrs, controlAttrs] = filterInputAttrs(attrs);
|
|
6521
6541
|
const [inputProps, _1] = VInput.filterProps(props);
|
|
6522
6542
|
const [checkboxProps, _2] = VCheckboxBtn.filterProps(props);
|
|
6523
6543
|
return vue.createVNode(VInput, vue.mergeProps({
|
|
6524
6544
|
"class": ['v-checkbox', props.class]
|
|
6525
|
-
},
|
|
6545
|
+
}, rootAttrs, inputProps, {
|
|
6526
6546
|
"modelValue": model.value,
|
|
6527
6547
|
"onUpdate:modelValue": $event => model.value = $event,
|
|
6528
6548
|
"id": id.value,
|
|
@@ -10850,6 +10870,7 @@
|
|
|
10850
10870
|
} = useLocale();
|
|
10851
10871
|
const vTextFieldRef = vue.ref();
|
|
10852
10872
|
const vMenuRef = vue.ref();
|
|
10873
|
+
const vVirtualScrollRef = vue.ref();
|
|
10853
10874
|
const _menu = useProxiedModel(props, 'menu');
|
|
10854
10875
|
const menu = vue.computed({
|
|
10855
10876
|
get: () => _menu.value,
|
|
@@ -10979,6 +11000,14 @@
|
|
|
10979
11000
|
vTextFieldRef.value.value = '';
|
|
10980
11001
|
}
|
|
10981
11002
|
}
|
|
11003
|
+
vue.watch(menu, () => {
|
|
11004
|
+
if (!props.hideSelected && menu.value && selections.value.length) {
|
|
11005
|
+
const index = displayItems.value.findIndex(item => selections.value.some(s => item.value === s.value));
|
|
11006
|
+
IN_BROWSER && window.requestAnimationFrame(() => {
|
|
11007
|
+
index >= 0 && vVirtualScrollRef.value?.scrollToIndex(index);
|
|
11008
|
+
});
|
|
11009
|
+
}
|
|
11010
|
+
});
|
|
10982
11011
|
useRender(() => {
|
|
10983
11012
|
const hasChips = !!(props.chips || slots.chip);
|
|
10984
11013
|
const hasList = !!(!props.hideNoData || displayItems.value.length || slots['prepend-item'] || slots['append-item'] || slots['no-data']);
|
|
@@ -11040,6 +11069,7 @@
|
|
|
11040
11069
|
default: () => [slots['prepend-item']?.(), !displayItems.value.length && !props.hideNoData && (slots['no-data']?.() ?? vue.createVNode(VListItem, {
|
|
11041
11070
|
"title": t(props.noDataText)
|
|
11042
11071
|
}, null)), vue.createVNode(VVirtualScroll, {
|
|
11072
|
+
"ref": vVirtualScrollRef,
|
|
11043
11073
|
"renderless": true,
|
|
11044
11074
|
"items": displayItems.value
|
|
11045
11075
|
}, {
|
|
@@ -11300,6 +11330,7 @@
|
|
|
11300
11330
|
const isPristine = vue.shallowRef(true);
|
|
11301
11331
|
const listHasFocus = vue.shallowRef(false);
|
|
11302
11332
|
const vMenuRef = vue.ref();
|
|
11333
|
+
const vVirtualScrollRef = vue.ref();
|
|
11303
11334
|
const _menu = useProxiedModel(props, 'menu');
|
|
11304
11335
|
const menu = vue.computed({
|
|
11305
11336
|
get: () => _menu.value,
|
|
@@ -11390,7 +11421,7 @@
|
|
|
11390
11421
|
menu.value = false;
|
|
11391
11422
|
}
|
|
11392
11423
|
if (highlightFirst.value && ['Enter', 'Tab'].includes(e.key)) {
|
|
11393
|
-
select(
|
|
11424
|
+
select(displayItems.value[0]);
|
|
11394
11425
|
}
|
|
11395
11426
|
if (e.key === 'ArrowDown' && highlightFirst.value) {
|
|
11396
11427
|
listRef.value?.focus('next');
|
|
@@ -11503,6 +11534,14 @@
|
|
|
11503
11534
|
if (val) menu.value = true;
|
|
11504
11535
|
isPristine.value = !val;
|
|
11505
11536
|
});
|
|
11537
|
+
vue.watch(menu, () => {
|
|
11538
|
+
if (!props.hideSelected && menu.value && selections.value.length) {
|
|
11539
|
+
const index = displayItems.value.findIndex(item => selections.value.some(s => item.value === s.value));
|
|
11540
|
+
IN_BROWSER && window.requestAnimationFrame(() => {
|
|
11541
|
+
index >= 0 && vVirtualScrollRef.value?.scrollToIndex(index);
|
|
11542
|
+
});
|
|
11543
|
+
}
|
|
11544
|
+
});
|
|
11506
11545
|
useRender(() => {
|
|
11507
11546
|
const hasChips = !!(props.chips || slots.chip);
|
|
11508
11547
|
const hasList = !!(!props.hideNoData || displayItems.value.length || slots['prepend-item'] || slots['append-item'] || slots['no-data']);
|
|
@@ -11562,6 +11601,7 @@
|
|
|
11562
11601
|
default: () => [slots['prepend-item']?.(), !displayItems.value.length && !props.hideNoData && (slots['no-data']?.() ?? vue.createVNode(VListItem, {
|
|
11563
11602
|
"title": t(props.noDataText)
|
|
11564
11603
|
}, null)), vue.createVNode(VVirtualScroll, {
|
|
11604
|
+
"ref": vVirtualScrollRef,
|
|
11565
11605
|
"renderless": true,
|
|
11566
11606
|
"items": displayItems.value
|
|
11567
11607
|
}, {
|
|
@@ -14833,6 +14873,7 @@
|
|
|
14833
14873
|
const isPristine = vue.shallowRef(true);
|
|
14834
14874
|
const listHasFocus = vue.shallowRef(false);
|
|
14835
14875
|
const vMenuRef = vue.ref();
|
|
14876
|
+
const vVirtualScrollRef = vue.ref();
|
|
14836
14877
|
const _menu = useProxiedModel(props, 'menu');
|
|
14837
14878
|
const menu = vue.computed({
|
|
14838
14879
|
get: () => _menu.value,
|
|
@@ -15066,6 +15107,14 @@
|
|
|
15066
15107
|
search.value = '';
|
|
15067
15108
|
}
|
|
15068
15109
|
});
|
|
15110
|
+
vue.watch(menu, () => {
|
|
15111
|
+
if (!props.hideSelected && menu.value && selections.value.length) {
|
|
15112
|
+
const index = displayItems.value.findIndex(item => selections.value.some(s => item.value === s.value));
|
|
15113
|
+
IN_BROWSER && window.requestAnimationFrame(() => {
|
|
15114
|
+
index >= 0 && vVirtualScrollRef.value?.scrollToIndex(index);
|
|
15115
|
+
});
|
|
15116
|
+
}
|
|
15117
|
+
});
|
|
15069
15118
|
useRender(() => {
|
|
15070
15119
|
const hasChips = !!(props.chips || slots.chip);
|
|
15071
15120
|
const hasList = !!(!props.hideNoData || displayItems.value.length || slots['prepend-item'] || slots['append-item'] || slots['no-data']);
|
|
@@ -15124,6 +15173,7 @@
|
|
|
15124
15173
|
default: () => [slots['prepend-item']?.(), !displayItems.value.length && !props.hideNoData && (slots['no-data']?.() ?? vue.createVNode(VListItem, {
|
|
15125
15174
|
"title": t(props.noDataText)
|
|
15126
15175
|
}, null)), vue.createVNode(VVirtualScroll, {
|
|
15176
|
+
"ref": vVirtualScrollRef,
|
|
15127
15177
|
"renderless": true,
|
|
15128
15178
|
"items": displayItems.value
|
|
15129
15179
|
}, {
|
|
@@ -17515,7 +17565,7 @@
|
|
|
17515
17565
|
const id = vue.computed(() => props.id || `radio-group-${uid}`);
|
|
17516
17566
|
const model = useProxiedModel(props, 'modelValue');
|
|
17517
17567
|
useRender(() => {
|
|
17518
|
-
const [
|
|
17568
|
+
const [rootAttrs, controlAttrs] = filterInputAttrs(attrs);
|
|
17519
17569
|
const [inputProps, _1] = VInput.filterProps(props);
|
|
17520
17570
|
const [controlProps, _2] = VSelectionControl.filterProps(props);
|
|
17521
17571
|
const label = slots.label ? slots.label({
|
|
@@ -17527,7 +17577,7 @@
|
|
|
17527
17577
|
return vue.createVNode(VInput, vue.mergeProps({
|
|
17528
17578
|
"class": ['v-radio-group', props.class],
|
|
17529
17579
|
"style": props.style
|
|
17530
|
-
},
|
|
17580
|
+
}, rootAttrs, inputProps, {
|
|
17531
17581
|
"modelValue": model.value,
|
|
17532
17582
|
"onUpdate:modelValue": $event => model.value = $event,
|
|
17533
17583
|
"id": id.value
|
|
@@ -18504,6 +18554,7 @@
|
|
|
18504
18554
|
focus,
|
|
18505
18555
|
blur
|
|
18506
18556
|
} = useFocus(props);
|
|
18557
|
+
const control = vue.ref();
|
|
18507
18558
|
const loaderColor = vue.computed(() => {
|
|
18508
18559
|
return typeof props.loading === 'string' && props.loading !== '' ? props.loading : props.color;
|
|
18509
18560
|
});
|
|
@@ -18514,16 +18565,15 @@
|
|
|
18514
18565
|
indeterminate.value = false;
|
|
18515
18566
|
}
|
|
18516
18567
|
}
|
|
18568
|
+
function onTrackClick(e) {
|
|
18569
|
+
e.stopPropagation();
|
|
18570
|
+
e.preventDefault();
|
|
18571
|
+
control.value?.input?.click();
|
|
18572
|
+
}
|
|
18517
18573
|
useRender(() => {
|
|
18518
|
-
const [
|
|
18574
|
+
const [rootAttrs, controlAttrs] = filterInputAttrs(attrs);
|
|
18519
18575
|
const [inputProps, _1] = VInput.filterProps(props);
|
|
18520
18576
|
const [controlProps, _2] = VSelectionControl.filterProps(props);
|
|
18521
|
-
const control = vue.ref();
|
|
18522
|
-
function onClick(e) {
|
|
18523
|
-
e.stopPropagation();
|
|
18524
|
-
e.preventDefault();
|
|
18525
|
-
control.value?.input?.click();
|
|
18526
|
-
}
|
|
18527
18577
|
return vue.createVNode(VInput, vue.mergeProps({
|
|
18528
18578
|
"class": ['v-switch', {
|
|
18529
18579
|
'v-switch--inset': props.inset
|
|
@@ -18531,7 +18581,7 @@
|
|
|
18531
18581
|
'v-switch--indeterminate': indeterminate.value
|
|
18532
18582
|
}, loaderClasses.value, props.class],
|
|
18533
18583
|
"style": props.style
|
|
18534
|
-
},
|
|
18584
|
+
}, rootAttrs, inputProps, {
|
|
18535
18585
|
"id": id.value,
|
|
18536
18586
|
"focused": isFocused.value
|
|
18537
18587
|
}), {
|
|
@@ -18561,7 +18611,7 @@
|
|
|
18561
18611
|
...slots,
|
|
18562
18612
|
default: () => vue.createVNode("div", {
|
|
18563
18613
|
"class": "v-switch__track",
|
|
18564
|
-
"onClick":
|
|
18614
|
+
"onClick": onTrackClick
|
|
18565
18615
|
}, null),
|
|
18566
18616
|
input: _ref3 => {
|
|
18567
18617
|
let {
|
|
@@ -20332,7 +20382,7 @@
|
|
|
20332
20382
|
date
|
|
20333
20383
|
};
|
|
20334
20384
|
}
|
|
20335
|
-
const version$1 = "3.3.
|
|
20385
|
+
const version$1 = "3.3.14";
|
|
20336
20386
|
createVuetify$1.version = version$1;
|
|
20337
20387
|
|
|
20338
20388
|
// Vue's inject() can only be used in setup
|
|
@@ -20357,7 +20407,7 @@
|
|
|
20357
20407
|
...options
|
|
20358
20408
|
});
|
|
20359
20409
|
};
|
|
20360
|
-
const version = "3.3.
|
|
20410
|
+
const version = "3.3.14";
|
|
20361
20411
|
createVuetify.version = version;
|
|
20362
20412
|
|
|
20363
20413
|
exports.components = components;
|