vuetify 3.3.13 → 3.3.15

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.
Files changed (119) hide show
  1. package/dist/json/attributes.json +70 -66
  2. package/dist/json/importMap.json +12 -12
  3. package/dist/json/tags.json +5 -4
  4. package/dist/json/web-types.json +274 -185
  5. package/dist/vuetify-labs.css +565 -486
  6. package/dist/vuetify-labs.d.ts +831 -462
  7. package/dist/vuetify-labs.esm.js +453 -310
  8. package/dist/vuetify-labs.esm.js.map +1 -1
  9. package/dist/vuetify-labs.js +452 -309
  10. package/dist/vuetify-labs.min.css +2 -2
  11. package/dist/vuetify.css +318 -239
  12. package/dist/vuetify.d.ts +678 -301
  13. package/dist/vuetify.esm.js +253 -173
  14. package/dist/vuetify.esm.js.map +1 -1
  15. package/dist/vuetify.js +252 -172
  16. package/dist/vuetify.js.map +1 -1
  17. package/dist/vuetify.min.css +2 -2
  18. package/dist/vuetify.min.js +842 -830
  19. package/dist/vuetify.min.js.map +1 -1
  20. package/lib/components/VAppBar/VAppBar.mjs.map +1 -1
  21. package/lib/components/VAppBar/index.d.mts +6 -6
  22. package/lib/components/VAutocomplete/VAutocomplete.mjs +12 -2
  23. package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
  24. package/lib/components/VBadge/VBadge.css +1 -1
  25. package/lib/components/VBadge/_variables.scss +1 -1
  26. package/lib/components/VBtnToggle/VBtnToggle.css +13 -2
  27. package/lib/components/VBtnToggle/VBtnToggle.sass +3 -3
  28. package/lib/components/VBtnToggle/_variables.scss +2 -1
  29. package/lib/components/VCheckbox/VCheckbox.mjs +2 -2
  30. package/lib/components/VCheckbox/VCheckbox.mjs.map +1 -1
  31. package/lib/components/VCheckbox/VCheckboxBtn.mjs +14 -11
  32. package/lib/components/VCheckbox/VCheckboxBtn.mjs.map +1 -1
  33. package/lib/components/VCheckbox/index.d.mts +203 -87
  34. package/lib/components/VColorPicker/VColorPickerEdit.css +4 -2
  35. package/lib/components/VColorPicker/VColorPickerPreview.css +11 -6
  36. package/lib/components/VCombobox/VCombobox.mjs +11 -1
  37. package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
  38. package/lib/components/VField/VField.css +25 -7
  39. package/lib/components/VField/VField.sass +15 -1
  40. package/lib/components/VGrid/VGrid.css +153 -142
  41. package/lib/components/VIcon/VIcon.css +1 -0
  42. package/lib/components/VIcon/VIcon.sass +1 -0
  43. package/lib/components/VOverlay/useActivator.mjs +1 -1
  44. package/lib/components/VOverlay/useActivator.mjs.map +1 -1
  45. package/lib/components/VProgressLinear/VProgressLinear.css +3 -2
  46. package/lib/components/VRadio/index.d.mts +82 -23
  47. package/lib/components/VRadioGroup/VRadioGroup.mjs +2 -2
  48. package/lib/components/VRadioGroup/VRadioGroup.mjs.map +1 -1
  49. package/lib/components/VRadioGroup/index.d.mts +75 -109
  50. package/lib/components/VRangeSlider/index.d.mts +114 -33
  51. package/lib/components/VSelect/VSelect.mjs +12 -2
  52. package/lib/components/VSelect/VSelect.mjs.map +1 -1
  53. package/lib/components/VSelectionControl/VSelectionControl.mjs +19 -3
  54. package/lib/components/VSelectionControl/VSelectionControl.mjs.map +1 -1
  55. package/lib/components/VSelectionControl/index.d.mts +19 -5
  56. package/lib/components/VSlider/VSlider.mjs.map +1 -1
  57. package/lib/components/VSlider/VSliderThumb.css +8 -4
  58. package/lib/components/VSlider/VSliderTrack.css +22 -12
  59. package/lib/components/VSlider/index.d.mts +114 -33
  60. package/lib/components/VSwitch/VSwitch.css +7 -5
  61. package/lib/components/VSwitch/VSwitch.mjs +26 -16
  62. package/lib/components/VSwitch/VSwitch.mjs.map +1 -1
  63. package/lib/components/VSwitch/VSwitch.sass +6 -4
  64. package/lib/components/VSwitch/_variables.scss +5 -3
  65. package/lib/components/VSwitch/index.d.mts +82 -23
  66. package/lib/components/VTable/VTable.css +3 -0
  67. package/lib/components/VTable/VTable.sass +4 -0
  68. package/lib/components/VTable/_variables.scss +3 -0
  69. package/lib/components/VTabs/VTab.mjs +2 -2
  70. package/lib/components/VTabs/VTab.mjs.map +1 -1
  71. package/lib/components/VTextarea/VTextarea.mjs +1 -0
  72. package/lib/components/VTextarea/VTextarea.mjs.map +1 -1
  73. package/lib/components/VTimeline/VTimeline.css +19 -10
  74. package/lib/components/VTimeline/VTimeline.sass +5 -0
  75. package/lib/components/VToolbar/VToolbar.css +4 -2
  76. package/lib/components/index.d.mts +676 -299
  77. package/lib/composables/color.mjs +6 -1
  78. package/lib/composables/color.mjs.map +1 -1
  79. package/lib/composables/defaults.mjs +9 -9
  80. package/lib/composables/defaults.mjs.map +1 -1
  81. package/lib/composables/theme.mjs +8 -7
  82. package/lib/composables/theme.mjs.map +1 -1
  83. package/lib/entry-bundler.mjs +1 -1
  84. package/lib/framework.mjs +1 -1
  85. package/lib/index.d.mts +3 -3
  86. package/lib/labs/VDateInput/index.d.mts +2 -2
  87. package/lib/labs/VDatePicker/VDateCard.mjs +3 -0
  88. package/lib/labs/VDatePicker/VDateCard.mjs.map +1 -1
  89. package/lib/labs/VDatePicker/VDatePicker.mjs +51 -21
  90. package/lib/labs/VDatePicker/VDatePicker.mjs.map +1 -1
  91. package/lib/labs/VDatePicker/VDatePickerControls.css +1 -1
  92. package/lib/labs/VDatePicker/VDatePickerControls.mjs +53 -35
  93. package/lib/labs/VDatePicker/VDatePickerControls.mjs.map +1 -1
  94. package/lib/labs/VDatePicker/VDatePickerMonth.mjs +37 -28
  95. package/lib/labs/VDatePicker/VDatePickerMonth.mjs.map +1 -1
  96. package/lib/labs/VDatePicker/VDatePickerYears.mjs +19 -17
  97. package/lib/labs/VDatePicker/VDatePickerYears.mjs.map +1 -1
  98. package/lib/labs/VDatePicker/index.d.mts +148 -156
  99. package/lib/labs/VDateRangePicker/VDateRangeCard.mjs +3 -0
  100. package/lib/labs/VDateRangePicker/VDateRangeCard.mjs.map +1 -1
  101. package/lib/labs/VDateRangePicker/index.d.mts +59 -52
  102. package/lib/labs/VSkeletonLoader/VSkeletonLoader.mjs.map +1 -1
  103. package/lib/labs/VSkeletonLoader/index.d.mts +8 -8
  104. package/lib/labs/components.d.mts +156 -164
  105. package/lib/locale/bg.mjs +23 -23
  106. package/lib/locale/bg.mjs.map +1 -1
  107. package/lib/locale/fa.mjs +16 -16
  108. package/lib/locale/fa.mjs.map +1 -1
  109. package/lib/locale/no.mjs +1 -1
  110. package/lib/locale/no.mjs.map +1 -1
  111. package/lib/styles/tools/_rtl.sass +4 -2
  112. package/lib/styles/tools/_states.sass +5 -5
  113. package/lib/util/colorUtils.mjs +6 -0
  114. package/lib/util/colorUtils.mjs.map +1 -1
  115. package/lib/util/helpers.mjs +10 -4
  116. package/lib/util/helpers.mjs.map +1 -1
  117. package/lib/util/injectSelf.mjs +2 -1
  118. package/lib/util/injectSelf.mjs.map +1 -1
  119. package/package.json +2 -2
@@ -1,10 +1,10 @@
1
1
  /*!
2
- * Vuetify v3.3.13
2
+ * Vuetify v3.3.15
3
3
  * Forged by John Leider
4
4
  * Released under the MIT License.
5
5
  */
6
6
 
7
- import { Fragment, reactive, computed, watchEffect, toRefs, capitalize, warn, watch, onScopeDispose, effectScope, ref, unref, provide, shallowRef, inject as inject$1, defineComponent as defineComponent$1, camelize, h, getCurrentInstance as getCurrentInstance$1, onBeforeUnmount, readonly, onDeactivated, onActivated, onMounted, toRaw, createVNode, TransitionGroup, Transition, mergeProps, onBeforeMount, nextTick, withDirectives, resolveDirective, vShow, isRef, toRef, Text, resolveDynamicComponent, Teleport, cloneVNode, createTextVNode, onBeforeUpdate, vModelText } from 'vue';
7
+ import { Fragment, reactive, computed, watchEffect, toRefs, capitalize, warn, ref, unref, provide, shallowRef, inject as inject$1, defineComponent as defineComponent$1, camelize, h, getCurrentInstance as getCurrentInstance$1, onBeforeUnmount, watch, readonly, onDeactivated, onActivated, onMounted, onScopeDispose, effectScope, toRaw, createVNode, TransitionGroup, Transition, mergeProps, onBeforeMount, nextTick, withDirectives, resolveDirective, vShow, isRef, toRef, Text, resolveDynamicComponent, Teleport, cloneVNode, createTextVNode, onBeforeUpdate, vModelText } from 'vue';
8
8
 
9
9
  // Types
10
10
  // eslint-disable-line vue/prefer-import-from-vue
@@ -224,14 +224,22 @@ function omit(obj, exclude) {
224
224
  exclude.forEach(prop => delete clone[prop]);
225
225
  return clone;
226
226
  }
227
+ const onRE = /^on[^a-z]/;
228
+ const isOn = key => onRE.test(key);
229
+ 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'];
227
230
 
228
231
  /**
229
232
  * Filter attributes that should be applied to
230
- * the root element of a an input component. Remaining
233
+ * the root element of an input component. Remaining
231
234
  * attributes should be passed to the <input> element inside.
232
235
  */
233
236
  function filterInputAttrs(attrs) {
234
- return pick(attrs, ['class', 'style', 'id', /^data-/]);
237
+ const [events, props] = pick(attrs, [onRE]);
238
+ const inputEvents = omit(events, bubblingEvents);
239
+ const [rootAttrs, inputAttrs] = pick(props, ['class', 'style', 'id', /^data-/]);
240
+ Object.assign(rootAttrs, events);
241
+ Object.assign(inputAttrs, inputEvents);
242
+ return [rootAttrs, inputAttrs];
235
243
  }
236
244
  function wrapInArray(v) {
237
245
  return v == null ? [] : Array.isArray(v) ? v : [v];
@@ -384,8 +392,6 @@ function destructComputed(getter) {
384
392
  function includes(arr, val) {
385
393
  return arr.includes(val);
386
394
  }
387
- const onRE = /^on[^a-z]/;
388
- const isOn = key => onRE.test(key);
389
395
  function eventName(propName) {
390
396
  return propName[2].toLowerCase() + propName.slice(3);
391
397
  }
@@ -652,6 +658,94 @@ function unbindProps(el, props) {
652
658
  });
653
659
  }
654
660
 
661
+ /**
662
+ * WCAG 3.0 APCA perceptual contrast algorithm from https://github.com/Myndex/SAPC-APCA
663
+ * @licence https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
664
+ * @see https://www.w3.org/WAI/GL/task-forces/silver/wiki/Visual_Contrast_of_Text_Subgroup
665
+ */
666
+ // Types
667
+
668
+ // MAGICAL NUMBERS
669
+
670
+ // sRGB Conversion to Relative Luminance (Y)
671
+
672
+ // Transfer Curve (aka "Gamma") for sRGB linearization
673
+ // Simple power curve vs piecewise described in docs
674
+ // Essentially, 2.4 best models actual display
675
+ // characteristics in combination with the total method
676
+ const mainTRC = 2.4;
677
+ const Rco = 0.2126729; // sRGB Red Coefficient (from matrix)
678
+ const Gco = 0.7151522; // sRGB Green Coefficient (from matrix)
679
+ const Bco = 0.0721750; // sRGB Blue Coefficient (from matrix)
680
+
681
+ // For Finding Raw SAPC Contrast from Relative Luminance (Y)
682
+
683
+ // Constants for SAPC Power Curve Exponents
684
+ // One pair for normal text, and one for reverse
685
+ // These are the "beating heart" of SAPC
686
+ const normBG = 0.55;
687
+ const normTXT = 0.58;
688
+ const revTXT = 0.57;
689
+ const revBG = 0.62;
690
+
691
+ // For Clamping and Scaling Values
692
+
693
+ const blkThrs = 0.03; // Level that triggers the soft black clamp
694
+ const blkClmp = 1.45; // Exponent for the soft black clamp curve
695
+ const deltaYmin = 0.0005; // Lint trap
696
+ const scaleBoW = 1.25; // Scaling for dark text on light
697
+ const scaleWoB = 1.25; // Scaling for light text on dark
698
+ const loConThresh = 0.078; // Threshold for new simple offset scale
699
+ const loConFactor = 12.82051282051282; // = 1/0.078,
700
+ const loConOffset = 0.06; // The simple offset
701
+ const loClip = 0.001; // Output clip (lint trap #2)
702
+
703
+ function APCAcontrast(text, background) {
704
+ // Linearize sRGB
705
+ const Rtxt = (text.r / 255) ** mainTRC;
706
+ const Gtxt = (text.g / 255) ** mainTRC;
707
+ const Btxt = (text.b / 255) ** mainTRC;
708
+ const Rbg = (background.r / 255) ** mainTRC;
709
+ const Gbg = (background.g / 255) ** mainTRC;
710
+ const Bbg = (background.b / 255) ** mainTRC;
711
+
712
+ // Apply the standard coefficients and sum to Y
713
+ let Ytxt = Rtxt * Rco + Gtxt * Gco + Btxt * Bco;
714
+ let Ybg = Rbg * Rco + Gbg * Gco + Bbg * Bco;
715
+
716
+ // Soft clamp Y when near black.
717
+ // Now clamping all colors to prevent crossover errors
718
+ if (Ytxt <= blkThrs) Ytxt += (blkThrs - Ytxt) ** blkClmp;
719
+ if (Ybg <= blkThrs) Ybg += (blkThrs - Ybg) ** blkClmp;
720
+
721
+ // Return 0 Early for extremely low ∆Y (lint trap #1)
722
+ if (Math.abs(Ybg - Ytxt) < deltaYmin) return 0.0;
723
+
724
+ // SAPC CONTRAST
725
+
726
+ let outputContrast; // For weighted final values
727
+ if (Ybg > Ytxt) {
728
+ // For normal polarity, black text on white
729
+ // Calculate the SAPC contrast value and scale
730
+
731
+ const SAPC = (Ybg ** normBG - Ytxt ** normTXT) * scaleBoW;
732
+
733
+ // NEW! SAPC SmoothScale™
734
+ // Low Contrast Smooth Scale Rollout to prevent polarity reversal
735
+ // and also a low clip for very low contrasts (lint trap #2)
736
+ // much of this is for very low contrasts, less than 10
737
+ // therefore for most reversing needs, only loConOffset is important
738
+ outputContrast = SAPC < loClip ? 0.0 : SAPC < loConThresh ? SAPC - SAPC * loConFactor * loConOffset : SAPC - loConOffset;
739
+ } else {
740
+ // For reverse polarity, light text on dark
741
+ // WoB should always return negative value.
742
+
743
+ const SAPC = (Ybg ** revBG - Ytxt ** revTXT) * scaleWoB;
744
+ outputContrast = SAPC > -loClip ? 0.0 : SAPC > -loConThresh ? SAPC - SAPC * loConFactor * loConOffset : SAPC + loConOffset;
745
+ }
746
+ return outputContrast * 100;
747
+ }
748
+
655
749
  /* eslint-disable no-console */
656
750
 
657
751
  function consoleWarn(message) {
@@ -1008,36 +1102,13 @@ function getContrast(first, second) {
1008
1102
  const dark = Math.min(l1, l2);
1009
1103
  return (light + 0.05) / (dark + 0.05);
1010
1104
  }
1011
-
1012
- // Utilities
1013
-
1014
- // Types
1015
-
1016
- function useToggleScope(source, fn) {
1017
- let scope;
1018
- function start() {
1019
- scope = effectScope();
1020
- scope.run(() => fn.length ? fn(() => {
1021
- scope?.stop();
1022
- start();
1023
- }) : fn());
1024
- }
1025
- watch(source, active => {
1026
- if (active && !scope) {
1027
- start();
1028
- } else if (!active) {
1029
- scope?.stop();
1030
- scope = undefined;
1031
- }
1032
- }, {
1033
- immediate: true
1034
- });
1035
- onScopeDispose(() => {
1036
- scope?.stop();
1037
- });
1105
+ function getForeground(color) {
1106
+ const blackContrast = Math.abs(APCAcontrast(parseColor(0), parseColor(color)));
1107
+ const whiteContrast = Math.abs(APCAcontrast(parseColor(0xffffff), parseColor(color)));
1108
+ return whiteContrast > Math.min(blackContrast, 50) ? '#fff' : '#000';
1038
1109
  }
1039
1110
 
1040
- // Composables
1111
+ // Utilities
1041
1112
 
1042
1113
  // Types
1043
1114
 
@@ -1059,6 +1130,7 @@ function provideDefaults(defaults, options) {
1059
1130
  const scoped = unref(options?.scoped);
1060
1131
  const reset = unref(options?.reset);
1061
1132
  const root = unref(options?.root);
1133
+ if (providedDefaults.value == null && !(scoped || reset || root)) return injectedDefaults.value;
1062
1134
  let properties = mergeDeep(providedDefaults.value, {
1063
1135
  prev: injectedDefaults.value
1064
1136
  });
@@ -1114,16 +1186,16 @@ function internalUseDefaults() {
1114
1186
  let [key] = _ref;
1115
1187
  return key.startsWith(key[0].toUpperCase());
1116
1188
  });
1117
- if (subComponents.length) _subcomponentDefaults.value = Object.fromEntries(subComponents);
1189
+ _subcomponentDefaults.value = subComponents.length ? Object.fromEntries(subComponents) : undefined;
1190
+ } else {
1191
+ _subcomponentDefaults.value = undefined;
1118
1192
  }
1119
1193
  });
1120
1194
  function provideSubDefaults() {
1121
- // If subcomponent defaults are provided, override any
1122
- // subcomponents provided by the component's setup function.
1123
- // This uses injectSelf so must be done after the original setup to work.
1124
- useToggleScope(_subcomponentDefaults, () => {
1125
- provideDefaults(mergeDeep(injectSelf(DefaultsSymbol)?.value ?? {}, _subcomponentDefaults.value));
1126
- });
1195
+ const injected = injectSelf(DefaultsSymbol, vm);
1196
+ provide(DefaultsSymbol, computed(() => {
1197
+ return _subcomponentDefaults.value ? mergeDeep(injected?.value ?? {}, _subcomponentDefaults.value) : injected?.value;
1198
+ }));
1127
1199
  }
1128
1200
  return {
1129
1201
  props: _props,
@@ -1301,9 +1373,10 @@ function isPotentiallyScrollable(el) {
1301
1373
  // Types
1302
1374
 
1303
1375
  function injectSelf(key) {
1376
+ let vm = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getCurrentInstance('injectSelf');
1304
1377
  const {
1305
1378
  provides
1306
- } = getCurrentInstance('injectSelf');
1379
+ } = vm;
1307
1380
  if (provides && key in provides) {
1308
1381
  // TS doesn't allow symbol as index type
1309
1382
  return provides[key];
@@ -1780,6 +1853,34 @@ const defaultRtl = {
1780
1853
  zhHant: false
1781
1854
  };
1782
1855
 
1856
+ // Utilities
1857
+
1858
+ // Types
1859
+
1860
+ function useToggleScope(source, fn) {
1861
+ let scope;
1862
+ function start() {
1863
+ scope = effectScope();
1864
+ scope.run(() => fn.length ? fn(() => {
1865
+ scope?.stop();
1866
+ start();
1867
+ }) : fn());
1868
+ }
1869
+ watch(source, active => {
1870
+ if (active && !scope) {
1871
+ start();
1872
+ } else if (!active) {
1873
+ scope?.stop();
1874
+ scope = undefined;
1875
+ }
1876
+ }, {
1877
+ immediate: true
1878
+ });
1879
+ onScopeDispose(() => {
1880
+ scope?.stop();
1881
+ });
1882
+ }
1883
+
1783
1884
  // Composables
1784
1885
 
1785
1886
  // Types
@@ -1981,94 +2082,6 @@ function useRtl() {
1981
2082
  };
1982
2083
  }
1983
2084
 
1984
- /**
1985
- * WCAG 3.0 APCA perceptual contrast algorithm from https://github.com/Myndex/SAPC-APCA
1986
- * @licence https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
1987
- * @see https://www.w3.org/WAI/GL/task-forces/silver/wiki/Visual_Contrast_of_Text_Subgroup
1988
- */
1989
- // Types
1990
-
1991
- // MAGICAL NUMBERS
1992
-
1993
- // sRGB Conversion to Relative Luminance (Y)
1994
-
1995
- // Transfer Curve (aka "Gamma") for sRGB linearization
1996
- // Simple power curve vs piecewise described in docs
1997
- // Essentially, 2.4 best models actual display
1998
- // characteristics in combination with the total method
1999
- const mainTRC = 2.4;
2000
- const Rco = 0.2126729; // sRGB Red Coefficient (from matrix)
2001
- const Gco = 0.7151522; // sRGB Green Coefficient (from matrix)
2002
- const Bco = 0.0721750; // sRGB Blue Coefficient (from matrix)
2003
-
2004
- // For Finding Raw SAPC Contrast from Relative Luminance (Y)
2005
-
2006
- // Constants for SAPC Power Curve Exponents
2007
- // One pair for normal text, and one for reverse
2008
- // These are the "beating heart" of SAPC
2009
- const normBG = 0.55;
2010
- const normTXT = 0.58;
2011
- const revTXT = 0.57;
2012
- const revBG = 0.62;
2013
-
2014
- // For Clamping and Scaling Values
2015
-
2016
- const blkThrs = 0.03; // Level that triggers the soft black clamp
2017
- const blkClmp = 1.45; // Exponent for the soft black clamp curve
2018
- const deltaYmin = 0.0005; // Lint trap
2019
- const scaleBoW = 1.25; // Scaling for dark text on light
2020
- const scaleWoB = 1.25; // Scaling for light text on dark
2021
- const loConThresh = 0.078; // Threshold for new simple offset scale
2022
- const loConFactor = 12.82051282051282; // = 1/0.078,
2023
- const loConOffset = 0.06; // The simple offset
2024
- const loClip = 0.001; // Output clip (lint trap #2)
2025
-
2026
- function APCAcontrast(text, background) {
2027
- // Linearize sRGB
2028
- const Rtxt = (text.r / 255) ** mainTRC;
2029
- const Gtxt = (text.g / 255) ** mainTRC;
2030
- const Btxt = (text.b / 255) ** mainTRC;
2031
- const Rbg = (background.r / 255) ** mainTRC;
2032
- const Gbg = (background.g / 255) ** mainTRC;
2033
- const Bbg = (background.b / 255) ** mainTRC;
2034
-
2035
- // Apply the standard coefficients and sum to Y
2036
- let Ytxt = Rtxt * Rco + Gtxt * Gco + Btxt * Bco;
2037
- let Ybg = Rbg * Rco + Gbg * Gco + Bbg * Bco;
2038
-
2039
- // Soft clamp Y when near black.
2040
- // Now clamping all colors to prevent crossover errors
2041
- if (Ytxt <= blkThrs) Ytxt += (blkThrs - Ytxt) ** blkClmp;
2042
- if (Ybg <= blkThrs) Ybg += (blkThrs - Ybg) ** blkClmp;
2043
-
2044
- // Return 0 Early for extremely low ∆Y (lint trap #1)
2045
- if (Math.abs(Ybg - Ytxt) < deltaYmin) return 0.0;
2046
-
2047
- // SAPC CONTRAST
2048
-
2049
- let outputContrast; // For weighted final values
2050
- if (Ybg > Ytxt) {
2051
- // For normal polarity, black text on white
2052
- // Calculate the SAPC contrast value and scale
2053
-
2054
- const SAPC = (Ybg ** normBG - Ytxt ** normTXT) * scaleBoW;
2055
-
2056
- // NEW! SAPC SmoothScale™
2057
- // Low Contrast Smooth Scale Rollout to prevent polarity reversal
2058
- // and also a low clip for very low contrasts (lint trap #2)
2059
- // much of this is for very low contrasts, less than 10
2060
- // therefore for most reversing needs, only loConOffset is important
2061
- outputContrast = SAPC < loClip ? 0.0 : SAPC < loConThresh ? SAPC - SAPC * loConFactor * loConOffset : SAPC - loConOffset;
2062
- } else {
2063
- // For reverse polarity, light text on dark
2064
- // WoB should always return negative value.
2065
-
2066
- const SAPC = (Ybg ** revBG - Ytxt ** revTXT) * scaleWoB;
2067
- outputContrast = SAPC > -loClip ? 0.0 : SAPC > -loConThresh ? SAPC - SAPC * loConFactor * loConOffset : SAPC + loConOffset;
2068
- }
2069
- return outputContrast * 100;
2070
- }
2071
-
2072
2085
  // Utilities
2073
2086
 
2074
2087
  // Types
@@ -2090,6 +2103,7 @@ const defaultThemeOptions = {
2090
2103
  colors: {
2091
2104
  background: '#FFFFFF',
2092
2105
  surface: '#FFFFFF',
2106
+ 'surface-bright': '#FFFFFF',
2093
2107
  'surface-variant': '#424242',
2094
2108
  'on-surface-variant': '#EEEEEE',
2095
2109
  primary: '#6200EE',
@@ -2125,7 +2139,8 @@ const defaultThemeOptions = {
2125
2139
  colors: {
2126
2140
  background: '#121212',
2127
2141
  surface: '#212121',
2128
- 'surface-variant': '#BDBDBD',
2142
+ 'surface-bright': '#ccbfd6',
2143
+ 'surface-variant': '#a3a3a3',
2129
2144
  'on-surface-variant': '#424242',
2130
2145
  primary: '#BB86FC',
2131
2146
  'primary-darken-1': '#3700B3',
@@ -2204,8 +2219,6 @@ function createTheme(options) {
2204
2219
  if (/^on-[a-z]/.test(color) || theme.colors[`on-${color}`]) continue;
2205
2220
  const onColor = `on-${color}`;
2206
2221
  const colorVal = parseColor(theme.colors[color]);
2207
- const blackContrast = Math.abs(APCAcontrast(parseColor(0), colorVal));
2208
- const whiteContrast = Math.abs(APCAcontrast(parseColor(0xffffff), colorVal));
2209
2222
 
2210
2223
  // TODO: warn about poor color selections
2211
2224
  // const contrastAsText = Math.abs(APCAcontrast(colorVal, colorToInt(theme.colors.background)))
@@ -2217,7 +2230,7 @@ function createTheme(options) {
2217
2230
  // }
2218
2231
 
2219
2232
  // Prefer white text if both have an acceptable contrast ratio
2220
- theme.colors[onColor] = whiteContrast > Math.min(blackContrast, 50) ? '#fff' : '#000';
2233
+ theme.colors[onColor] = getForeground(colorVal);
2221
2234
  }
2222
2235
  }
2223
2236
  return acc;
@@ -2318,12 +2331,14 @@ function provideTheme(props) {
2318
2331
  const theme = inject$1(ThemeSymbol, null);
2319
2332
  if (!theme) throw new Error('Could not find Vuetify theme injection');
2320
2333
  const name = computed(() => {
2321
- return props.theme ?? theme?.name.value;
2334
+ return props.theme ?? theme.name.value;
2322
2335
  });
2336
+ const current = computed(() => theme.themes.value[name.value]);
2323
2337
  const themeClasses = computed(() => theme.isDisabled ? undefined : `v-theme--${name.value}`);
2324
2338
  const newTheme = {
2325
2339
  ...theme,
2326
2340
  name,
2341
+ current,
2327
2342
  themeClasses
2328
2343
  };
2329
2344
  provide(ThemeSymbol, newTheme);
@@ -3246,6 +3261,11 @@ function useColor(colors) {
3246
3261
  if (colors.value.background) {
3247
3262
  if (isCssColor(colors.value.background)) {
3248
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
+ }
3249
3269
  } else {
3250
3270
  classes.push(`bg-${colors.value.background}`);
3251
3271
  }
@@ -5775,6 +5795,12 @@ function useSelectionControl(props) {
5775
5795
  } = useTextColor(computed(() => {
5776
5796
  return model.value && !props.error && !props.disabled ? props.color : undefined;
5777
5797
  }));
5798
+ const {
5799
+ backgroundColorClasses,
5800
+ backgroundColorStyles
5801
+ } = useBackgroundColor(computed(() => {
5802
+ return model.value && !props.error && !props.disabled ? props.color : undefined;
5803
+ }));
5778
5804
  const icon = computed(() => model.value ? props.trueIcon : props.falseIcon);
5779
5805
  return {
5780
5806
  group,
@@ -5784,6 +5810,8 @@ function useSelectionControl(props) {
5784
5810
  model,
5785
5811
  textColorClasses,
5786
5812
  textColorStyles,
5813
+ backgroundColorClasses,
5814
+ backgroundColorStyles,
5787
5815
  icon
5788
5816
  };
5789
5817
  }
@@ -5809,6 +5837,8 @@ const VSelectionControl = genericComponent()({
5809
5837
  model,
5810
5838
  textColorClasses,
5811
5839
  textColorStyles,
5840
+ backgroundColorClasses,
5841
+ backgroundColorStyles,
5812
5842
  trueValue
5813
5843
  } = useSelectionControl(props);
5814
5844
  const uid = getUid();
@@ -5873,12 +5903,17 @@ const VSelectionControl = genericComponent()({
5873
5903
  }), [createVNode("div", {
5874
5904
  "class": ['v-selection-control__wrapper', textColorClasses.value],
5875
5905
  "style": textColorStyles.value
5876
- }, [slots.default?.(), withDirectives(createVNode("div", {
5906
+ }, [slots.default?.({
5907
+ backgroundColorClasses,
5908
+ backgroundColorStyles
5909
+ }), withDirectives(createVNode("div", {
5877
5910
  "class": ['v-selection-control__input']
5878
5911
  }, [slots.input?.({
5879
5912
  model,
5880
5913
  textColorClasses,
5881
5914
  textColorStyles,
5915
+ backgroundColorClasses,
5916
+ backgroundColorStyles,
5882
5917
  inputNode,
5883
5918
  icon: icon.value,
5884
5919
  props: {
@@ -5891,7 +5926,8 @@ const VSelectionControl = genericComponent()({
5891
5926
  "icon": icon.value
5892
5927
  }, null), inputNode])]), [[resolveDirective("ripple"), props.ripple && [!props.disabled && !props.readonly, null, ['center', 'circle']]]])]), label && createVNode(VLabel, {
5893
5928
  "for": id.value,
5894
- "clickable": true
5929
+ "clickable": true,
5930
+ "onClick": e => e.stopPropagation()
5895
5931
  }, {
5896
5932
  default: () => [label]
5897
5933
  })]);
@@ -5940,16 +5976,19 @@ const VCheckboxBtn = genericComponent()({
5940
5976
  const trueIcon = computed(() => {
5941
5977
  return indeterminate.value ? props.indeterminateIcon : props.trueIcon;
5942
5978
  });
5943
- useRender(() => createVNode(VSelectionControl, mergeProps(props, {
5944
- "modelValue": model.value,
5945
- "onUpdate:modelValue": [$event => model.value = $event, onChange],
5946
- "class": ['v-checkbox-btn', props.class],
5947
- "style": props.style,
5948
- "type": "checkbox",
5949
- "falseIcon": falseIcon.value,
5950
- "trueIcon": trueIcon.value,
5951
- "aria-checked": indeterminate.value ? 'mixed' : undefined
5952
- }), slots));
5979
+ useRender(() => {
5980
+ const controlProps = omit(VSelectionControl.filterProps(props)[0], ['modelValue']);
5981
+ return createVNode(VSelectionControl, mergeProps(controlProps, {
5982
+ "modelValue": model.value,
5983
+ "onUpdate:modelValue": [$event => model.value = $event, onChange],
5984
+ "class": ['v-checkbox-btn', props.class],
5985
+ "style": props.style,
5986
+ "type": "checkbox",
5987
+ "falseIcon": falseIcon.value,
5988
+ "trueIcon": trueIcon.value,
5989
+ "aria-checked": indeterminate.value ? 'mixed' : undefined
5990
+ }), slots);
5991
+ });
5953
5992
  return {};
5954
5993
  }
5955
5994
  });
@@ -6513,12 +6552,12 @@ const VCheckbox = genericComponent()({
6513
6552
  const uid = getUid();
6514
6553
  const id = computed(() => props.id || `checkbox-${uid}`);
6515
6554
  useRender(() => {
6516
- const [inputAttrs, controlAttrs] = filterInputAttrs(attrs);
6555
+ const [rootAttrs, controlAttrs] = filterInputAttrs(attrs);
6517
6556
  const [inputProps, _1] = VInput.filterProps(props);
6518
6557
  const [checkboxProps, _2] = VCheckboxBtn.filterProps(props);
6519
6558
  return createVNode(VInput, mergeProps({
6520
6559
  "class": ['v-checkbox', props.class]
6521
- }, inputAttrs, inputProps, {
6560
+ }, rootAttrs, inputProps, {
6522
6561
  "modelValue": model.value,
6523
6562
  "onUpdate:modelValue": $event => model.value = $event,
6524
6563
  "id": id.value,
@@ -9085,7 +9124,7 @@ function _useActivator(props, vm, _ref2) {
9085
9124
  if (selector) {
9086
9125
  if (selector === 'parent') {
9087
9126
  let el = vm?.proxy?.$el?.parentNode;
9088
- while (el.hasAttribute('data-no-activator')) {
9127
+ while (el?.hasAttribute('data-no-activator')) {
9089
9128
  el = el.parentNode;
9090
9129
  }
9091
9130
  activator = el;
@@ -10846,6 +10885,7 @@ const VSelect = genericComponent()({
10846
10885
  } = useLocale();
10847
10886
  const vTextFieldRef = ref();
10848
10887
  const vMenuRef = ref();
10888
+ const vVirtualScrollRef = ref();
10849
10889
  const _menu = useProxiedModel(props, 'menu');
10850
10890
  const menu = computed({
10851
10891
  get: () => _menu.value,
@@ -10975,6 +11015,14 @@ const VSelect = genericComponent()({
10975
11015
  vTextFieldRef.value.value = '';
10976
11016
  }
10977
11017
  }
11018
+ watch(menu, () => {
11019
+ if (!props.hideSelected && menu.value && selections.value.length) {
11020
+ const index = displayItems.value.findIndex(item => selections.value.some(s => item.value === s.value));
11021
+ IN_BROWSER && window.requestAnimationFrame(() => {
11022
+ index >= 0 && vVirtualScrollRef.value?.scrollToIndex(index);
11023
+ });
11024
+ }
11025
+ });
10978
11026
  useRender(() => {
10979
11027
  const hasChips = !!(props.chips || slots.chip);
10980
11028
  const hasList = !!(!props.hideNoData || displayItems.value.length || slots['prepend-item'] || slots['append-item'] || slots['no-data']);
@@ -11036,6 +11084,7 @@ const VSelect = genericComponent()({
11036
11084
  default: () => [slots['prepend-item']?.(), !displayItems.value.length && !props.hideNoData && (slots['no-data']?.() ?? createVNode(VListItem, {
11037
11085
  "title": t(props.noDataText)
11038
11086
  }, null)), createVNode(VVirtualScroll, {
11087
+ "ref": vVirtualScrollRef,
11039
11088
  "renderless": true,
11040
11089
  "items": displayItems.value
11041
11090
  }, {
@@ -11296,6 +11345,7 @@ const VAutocomplete = genericComponent()({
11296
11345
  const isPristine = shallowRef(true);
11297
11346
  const listHasFocus = shallowRef(false);
11298
11347
  const vMenuRef = ref();
11348
+ const vVirtualScrollRef = ref();
11299
11349
  const _menu = useProxiedModel(props, 'menu');
11300
11350
  const menu = computed({
11301
11351
  get: () => _menu.value,
@@ -11386,7 +11436,7 @@ const VAutocomplete = genericComponent()({
11386
11436
  menu.value = false;
11387
11437
  }
11388
11438
  if (highlightFirst.value && ['Enter', 'Tab'].includes(e.key)) {
11389
- select(filteredItems.value[0]);
11439
+ select(displayItems.value[0]);
11390
11440
  }
11391
11441
  if (e.key === 'ArrowDown' && highlightFirst.value) {
11392
11442
  listRef.value?.focus('next');
@@ -11499,6 +11549,14 @@ const VAutocomplete = genericComponent()({
11499
11549
  if (val) menu.value = true;
11500
11550
  isPristine.value = !val;
11501
11551
  });
11552
+ watch(menu, () => {
11553
+ if (!props.hideSelected && menu.value && selections.value.length) {
11554
+ const index = displayItems.value.findIndex(item => selections.value.some(s => item.value === s.value));
11555
+ IN_BROWSER && window.requestAnimationFrame(() => {
11556
+ index >= 0 && vVirtualScrollRef.value?.scrollToIndex(index);
11557
+ });
11558
+ }
11559
+ });
11502
11560
  useRender(() => {
11503
11561
  const hasChips = !!(props.chips || slots.chip);
11504
11562
  const hasList = !!(!props.hideNoData || displayItems.value.length || slots['prepend-item'] || slots['append-item'] || slots['no-data']);
@@ -11558,6 +11616,7 @@ const VAutocomplete = genericComponent()({
11558
11616
  default: () => [slots['prepend-item']?.(), !displayItems.value.length && !props.hideNoData && (slots['no-data']?.() ?? createVNode(VListItem, {
11559
11617
  "title": t(props.noDataText)
11560
11618
  }, null)), createVNode(VVirtualScroll, {
11619
+ "ref": vVirtualScrollRef,
11561
11620
  "renderless": true,
11562
11621
  "items": displayItems.value
11563
11622
  }, {
@@ -14829,6 +14888,7 @@ const VCombobox = genericComponent()({
14829
14888
  const isPristine = shallowRef(true);
14830
14889
  const listHasFocus = shallowRef(false);
14831
14890
  const vMenuRef = ref();
14891
+ const vVirtualScrollRef = ref();
14832
14892
  const _menu = useProxiedModel(props, 'menu');
14833
14893
  const menu = computed({
14834
14894
  get: () => _menu.value,
@@ -15062,6 +15122,14 @@ const VCombobox = genericComponent()({
15062
15122
  search.value = '';
15063
15123
  }
15064
15124
  });
15125
+ watch(menu, () => {
15126
+ if (!props.hideSelected && menu.value && selections.value.length) {
15127
+ const index = displayItems.value.findIndex(item => selections.value.some(s => item.value === s.value));
15128
+ IN_BROWSER && window.requestAnimationFrame(() => {
15129
+ index >= 0 && vVirtualScrollRef.value?.scrollToIndex(index);
15130
+ });
15131
+ }
15132
+ });
15065
15133
  useRender(() => {
15066
15134
  const hasChips = !!(props.chips || slots.chip);
15067
15135
  const hasList = !!(!props.hideNoData || displayItems.value.length || slots['prepend-item'] || slots['append-item'] || slots['no-data']);
@@ -15120,6 +15188,7 @@ const VCombobox = genericComponent()({
15120
15188
  default: () => [slots['prepend-item']?.(), !displayItems.value.length && !props.hideNoData && (slots['no-data']?.() ?? createVNode(VListItem, {
15121
15189
  "title": t(props.noDataText)
15122
15190
  }, null)), createVNode(VVirtualScroll, {
15191
+ "ref": vVirtualScrollRef,
15123
15192
  "renderless": true,
15124
15193
  "items": displayItems.value
15125
15194
  }, {
@@ -17511,7 +17580,7 @@ const VRadioGroup = genericComponent()({
17511
17580
  const id = computed(() => props.id || `radio-group-${uid}`);
17512
17581
  const model = useProxiedModel(props, 'modelValue');
17513
17582
  useRender(() => {
17514
- const [inputAttrs, controlAttrs] = filterInputAttrs(attrs);
17583
+ const [rootAttrs, controlAttrs] = filterInputAttrs(attrs);
17515
17584
  const [inputProps, _1] = VInput.filterProps(props);
17516
17585
  const [controlProps, _2] = VSelectionControl.filterProps(props);
17517
17586
  const label = slots.label ? slots.label({
@@ -17523,7 +17592,7 @@ const VRadioGroup = genericComponent()({
17523
17592
  return createVNode(VInput, mergeProps({
17524
17593
  "class": ['v-radio-group', props.class],
17525
17594
  "style": props.style
17526
- }, inputAttrs, inputProps, {
17595
+ }, rootAttrs, inputProps, {
17527
17596
  "modelValue": model.value,
17528
17597
  "onUpdate:modelValue": $event => model.value = $event,
17529
17598
  "id": id.value
@@ -18500,6 +18569,7 @@ const VSwitch = genericComponent()({
18500
18569
  focus,
18501
18570
  blur
18502
18571
  } = useFocus(props);
18572
+ const control = ref();
18503
18573
  const loaderColor = computed(() => {
18504
18574
  return typeof props.loading === 'string' && props.loading !== '' ? props.loading : props.color;
18505
18575
  });
@@ -18510,16 +18580,15 @@ const VSwitch = genericComponent()({
18510
18580
  indeterminate.value = false;
18511
18581
  }
18512
18582
  }
18583
+ function onTrackClick(e) {
18584
+ e.stopPropagation();
18585
+ e.preventDefault();
18586
+ control.value?.input?.click();
18587
+ }
18513
18588
  useRender(() => {
18514
- const [inputAttrs, controlAttrs] = filterInputAttrs(attrs);
18589
+ const [rootAttrs, controlAttrs] = filterInputAttrs(attrs);
18515
18590
  const [inputProps, _1] = VInput.filterProps(props);
18516
18591
  const [controlProps, _2] = VSelectionControl.filterProps(props);
18517
- const control = ref();
18518
- function onClick(e) {
18519
- e.stopPropagation();
18520
- e.preventDefault();
18521
- control.value?.input?.click();
18522
- }
18523
18592
  return createVNode(VInput, mergeProps({
18524
18593
  "class": ['v-switch', {
18525
18594
  'v-switch--inset': props.inset
@@ -18527,7 +18596,7 @@ const VSwitch = genericComponent()({
18527
18596
  'v-switch--indeterminate': indeterminate.value
18528
18597
  }, loaderClasses.value, props.class],
18529
18598
  "style": props.style
18530
- }, inputAttrs, inputProps, {
18599
+ }, rootAttrs, inputProps, {
18531
18600
  "id": id.value,
18532
18601
  "focused": isFocused.value
18533
18602
  }), {
@@ -18555,19 +18624,29 @@ const VSwitch = genericComponent()({
18555
18624
  "onBlur": blur
18556
18625
  }, controlAttrs), {
18557
18626
  ...slots,
18558
- default: () => createVNode("div", {
18559
- "class": "v-switch__track",
18560
- "onClick": onClick
18561
- }, null),
18562
- input: _ref3 => {
18627
+ default: _ref3 => {
18563
18628
  let {
18564
- inputNode,
18565
- icon
18629
+ backgroundColorClasses,
18630
+ backgroundColorStyles
18566
18631
  } = _ref3;
18632
+ return createVNode("div", {
18633
+ "class": ['v-switch__track', ...backgroundColorClasses.value],
18634
+ "style": backgroundColorStyles.value,
18635
+ "onClick": onTrackClick
18636
+ }, null);
18637
+ },
18638
+ input: _ref4 => {
18639
+ let {
18640
+ inputNode,
18641
+ icon,
18642
+ backgroundColorClasses,
18643
+ backgroundColorStyles
18644
+ } = _ref4;
18567
18645
  return createVNode(Fragment, null, [inputNode, createVNode("div", {
18568
18646
  "class": ['v-switch__thumb', {
18569
18647
  'v-switch__thumb--filled': icon || props.loading
18570
- }]
18648
+ }, props.inset ? undefined : backgroundColorClasses.value],
18649
+ "style": props.inset ? undefined : backgroundColorStyles.value
18571
18650
  }, [createVNode(VScaleTransition, null, {
18572
18651
  default: () => [!props.loading ? icon && createVNode(VIcon, {
18573
18652
  "key": icon,
@@ -18708,8 +18787,8 @@ const VTab = genericComponent()({
18708
18787
  const delta = prevPos > nextPos ? prevBox[rightBottom] - nextBox[rightBottom] : prevBox[xy] - nextBox[xy];
18709
18788
  const origin = Math.sign(delta) > 0 ? isHorizontal.value ? 'right' : 'bottom' : Math.sign(delta) < 0 ? isHorizontal.value ? 'left' : 'top' : 'center';
18710
18789
  const size = Math.abs(delta) + (Math.sign(delta) < 0 ? prevBox[widthHeight] : nextBox[widthHeight]);
18711
- const scale = size / Math.max(prevBox[widthHeight], nextBox[widthHeight]);
18712
- const initialScale = prevBox[widthHeight] / nextBox[widthHeight];
18790
+ const scale = size / Math.max(prevBox[widthHeight], nextBox[widthHeight]) || 0;
18791
+ const initialScale = prevBox[widthHeight] / nextBox[widthHeight] || 0;
18713
18792
  const sigma = 1.5;
18714
18793
  animate(nextEl, {
18715
18794
  backgroundColor: [color, 'currentcolor'],
@@ -19105,6 +19184,7 @@ const VTextarea = genericComponent()({
19105
19184
  once: true
19106
19185
  }]]), props.autoGrow && withDirectives(createVNode("textarea", {
19107
19186
  "class": [fieldClass, 'v-textarea__sizer'],
19187
+ "id": `${slotProps.id}-sizer`,
19108
19188
  "onUpdate:modelValue": $event => model.value = $event,
19109
19189
  "ref": sizerRef,
19110
19190
  "readonly": true,
@@ -20328,7 +20408,7 @@ function createVuetify$1() {
20328
20408
  date
20329
20409
  };
20330
20410
  }
20331
- const version$1 = "3.3.13";
20411
+ const version$1 = "3.3.15";
20332
20412
  createVuetify$1.version = version$1;
20333
20413
 
20334
20414
  // Vue's inject() can only be used in setup
@@ -20353,7 +20433,7 @@ const createVuetify = function () {
20353
20433
  ...options
20354
20434
  });
20355
20435
  };
20356
- const version = "3.3.13";
20436
+ const version = "3.3.15";
20357
20437
  createVuetify.version = version;
20358
20438
 
20359
20439
  export { components, createVuetify, directives, useDefaults, useDisplay, useLayout, useLocale, useRtl, useTheme, version };