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
package/dist/vuetify.js CHANGED
@@ -1,5 +1,5 @@
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
  */
@@ -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 a an input component. Remaining
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
- return pick(attrs, ['class', 'style', 'id', /^data-/]);
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
- // Utilities
1017
-
1018
- // Types
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
- // Composables
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
- if (subComponents.length) _subcomponentDefaults.value = Object.fromEntries(subComponents);
1193
+ _subcomponentDefaults.value = subComponents.length ? Object.fromEntries(subComponents) : undefined;
1194
+ } else {
1195
+ _subcomponentDefaults.value = undefined;
1122
1196
  }
1123
1197
  });
1124
1198
  function provideSubDefaults() {
1125
- // If subcomponent defaults are provided, override any
1126
- // subcomponents provided by the component's setup function.
1127
- // This uses injectSelf so must be done after the original setup to work.
1128
- useToggleScope(_subcomponentDefaults, () => {
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
- } = getCurrentInstance('injectSelf');
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
@@ -2094,6 +2107,7 @@
2094
2107
  colors: {
2095
2108
  background: '#FFFFFF',
2096
2109
  surface: '#FFFFFF',
2110
+ 'surface-bright': '#FFFFFF',
2097
2111
  'surface-variant': '#424242',
2098
2112
  'on-surface-variant': '#EEEEEE',
2099
2113
  primary: '#6200EE',
@@ -2129,7 +2143,8 @@
2129
2143
  colors: {
2130
2144
  background: '#121212',
2131
2145
  surface: '#212121',
2132
- 'surface-variant': '#BDBDBD',
2146
+ 'surface-bright': '#ccbfd6',
2147
+ 'surface-variant': '#a3a3a3',
2133
2148
  'on-surface-variant': '#424242',
2134
2149
  primary: '#BB86FC',
2135
2150
  'primary-darken-1': '#3700B3',
@@ -2208,8 +2223,6 @@
2208
2223
  if (/^on-[a-z]/.test(color) || theme.colors[`on-${color}`]) continue;
2209
2224
  const onColor = `on-${color}`;
2210
2225
  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
2226
 
2214
2227
  // TODO: warn about poor color selections
2215
2228
  // const contrastAsText = Math.abs(APCAcontrast(colorVal, colorToInt(theme.colors.background)))
@@ -2221,7 +2234,7 @@
2221
2234
  // }
2222
2235
 
2223
2236
  // Prefer white text if both have an acceptable contrast ratio
2224
- theme.colors[onColor] = whiteContrast > Math.min(blackContrast, 50) ? '#fff' : '#000';
2237
+ theme.colors[onColor] = getForeground(colorVal);
2225
2238
  }
2226
2239
  }
2227
2240
  return acc;
@@ -2322,12 +2335,14 @@
2322
2335
  const theme = vue.inject(ThemeSymbol, null);
2323
2336
  if (!theme) throw new Error('Could not find Vuetify theme injection');
2324
2337
  const name = vue.computed(() => {
2325
- return props.theme ?? theme?.name.value;
2338
+ return props.theme ?? theme.name.value;
2326
2339
  });
2340
+ const current = vue.computed(() => theme.themes.value[name.value]);
2327
2341
  const themeClasses = vue.computed(() => theme.isDisabled ? undefined : `v-theme--${name.value}`);
2328
2342
  const newTheme = {
2329
2343
  ...theme,
2330
2344
  name,
2345
+ current,
2331
2346
  themeClasses
2332
2347
  };
2333
2348
  vue.provide(ThemeSymbol, newTheme);
@@ -3250,6 +3265,11 @@
3250
3265
  if (colors.value.background) {
3251
3266
  if (isCssColor(colors.value.background)) {
3252
3267
  styles.backgroundColor = colors.value.background;
3268
+ if (!colors.value.text) {
3269
+ const textColor = getForeground(styles.backgroundColor);
3270
+ styles.color = textColor;
3271
+ styles.caretColor = textColor;
3272
+ }
3253
3273
  } else {
3254
3274
  classes.push(`bg-${colors.value.background}`);
3255
3275
  }
@@ -5779,6 +5799,12 @@
5779
5799
  } = useTextColor(vue.computed(() => {
5780
5800
  return model.value && !props.error && !props.disabled ? props.color : undefined;
5781
5801
  }));
5802
+ const {
5803
+ backgroundColorClasses,
5804
+ backgroundColorStyles
5805
+ } = useBackgroundColor(vue.computed(() => {
5806
+ return model.value && !props.error && !props.disabled ? props.color : undefined;
5807
+ }));
5782
5808
  const icon = vue.computed(() => model.value ? props.trueIcon : props.falseIcon);
5783
5809
  return {
5784
5810
  group,
@@ -5788,6 +5814,8 @@
5788
5814
  model,
5789
5815
  textColorClasses,
5790
5816
  textColorStyles,
5817
+ backgroundColorClasses,
5818
+ backgroundColorStyles,
5791
5819
  icon
5792
5820
  };
5793
5821
  }
@@ -5813,6 +5841,8 @@
5813
5841
  model,
5814
5842
  textColorClasses,
5815
5843
  textColorStyles,
5844
+ backgroundColorClasses,
5845
+ backgroundColorStyles,
5816
5846
  trueValue
5817
5847
  } = useSelectionControl(props);
5818
5848
  const uid = getUid();
@@ -5877,12 +5907,17 @@
5877
5907
  }), [vue.createVNode("div", {
5878
5908
  "class": ['v-selection-control__wrapper', textColorClasses.value],
5879
5909
  "style": textColorStyles.value
5880
- }, [slots.default?.(), vue.withDirectives(vue.createVNode("div", {
5910
+ }, [slots.default?.({
5911
+ backgroundColorClasses,
5912
+ backgroundColorStyles
5913
+ }), vue.withDirectives(vue.createVNode("div", {
5881
5914
  "class": ['v-selection-control__input']
5882
5915
  }, [slots.input?.({
5883
5916
  model,
5884
5917
  textColorClasses,
5885
5918
  textColorStyles,
5919
+ backgroundColorClasses,
5920
+ backgroundColorStyles,
5886
5921
  inputNode,
5887
5922
  icon: icon.value,
5888
5923
  props: {
@@ -5895,7 +5930,8 @@
5895
5930
  "icon": icon.value
5896
5931
  }, null), inputNode])]), [[vue.resolveDirective("ripple"), props.ripple && [!props.disabled && !props.readonly, null, ['center', 'circle']]]])]), label && vue.createVNode(VLabel, {
5897
5932
  "for": id.value,
5898
- "clickable": true
5933
+ "clickable": true,
5934
+ "onClick": e => e.stopPropagation()
5899
5935
  }, {
5900
5936
  default: () => [label]
5901
5937
  })]);
@@ -5944,16 +5980,19 @@
5944
5980
  const trueIcon = vue.computed(() => {
5945
5981
  return indeterminate.value ? props.indeterminateIcon : props.trueIcon;
5946
5982
  });
5947
- useRender(() => vue.createVNode(VSelectionControl, vue.mergeProps(props, {
5948
- "modelValue": model.value,
5949
- "onUpdate:modelValue": [$event => model.value = $event, onChange],
5950
- "class": ['v-checkbox-btn', props.class],
5951
- "style": props.style,
5952
- "type": "checkbox",
5953
- "falseIcon": falseIcon.value,
5954
- "trueIcon": trueIcon.value,
5955
- "aria-checked": indeterminate.value ? 'mixed' : undefined
5956
- }), slots));
5983
+ useRender(() => {
5984
+ const controlProps = omit(VSelectionControl.filterProps(props)[0], ['modelValue']);
5985
+ return vue.createVNode(VSelectionControl, vue.mergeProps(controlProps, {
5986
+ "modelValue": model.value,
5987
+ "onUpdate:modelValue": [$event => model.value = $event, onChange],
5988
+ "class": ['v-checkbox-btn', props.class],
5989
+ "style": props.style,
5990
+ "type": "checkbox",
5991
+ "falseIcon": falseIcon.value,
5992
+ "trueIcon": trueIcon.value,
5993
+ "aria-checked": indeterminate.value ? 'mixed' : undefined
5994
+ }), slots);
5995
+ });
5957
5996
  return {};
5958
5997
  }
5959
5998
  });
@@ -6517,12 +6556,12 @@
6517
6556
  const uid = getUid();
6518
6557
  const id = vue.computed(() => props.id || `checkbox-${uid}`);
6519
6558
  useRender(() => {
6520
- const [inputAttrs, controlAttrs] = filterInputAttrs(attrs);
6559
+ const [rootAttrs, controlAttrs] = filterInputAttrs(attrs);
6521
6560
  const [inputProps, _1] = VInput.filterProps(props);
6522
6561
  const [checkboxProps, _2] = VCheckboxBtn.filterProps(props);
6523
6562
  return vue.createVNode(VInput, vue.mergeProps({
6524
6563
  "class": ['v-checkbox', props.class]
6525
- }, inputAttrs, inputProps, {
6564
+ }, rootAttrs, inputProps, {
6526
6565
  "modelValue": model.value,
6527
6566
  "onUpdate:modelValue": $event => model.value = $event,
6528
6567
  "id": id.value,
@@ -9089,7 +9128,7 @@
9089
9128
  if (selector) {
9090
9129
  if (selector === 'parent') {
9091
9130
  let el = vm?.proxy?.$el?.parentNode;
9092
- while (el.hasAttribute('data-no-activator')) {
9131
+ while (el?.hasAttribute('data-no-activator')) {
9093
9132
  el = el.parentNode;
9094
9133
  }
9095
9134
  activator = el;
@@ -10850,6 +10889,7 @@
10850
10889
  } = useLocale();
10851
10890
  const vTextFieldRef = vue.ref();
10852
10891
  const vMenuRef = vue.ref();
10892
+ const vVirtualScrollRef = vue.ref();
10853
10893
  const _menu = useProxiedModel(props, 'menu');
10854
10894
  const menu = vue.computed({
10855
10895
  get: () => _menu.value,
@@ -10979,6 +11019,14 @@
10979
11019
  vTextFieldRef.value.value = '';
10980
11020
  }
10981
11021
  }
11022
+ vue.watch(menu, () => {
11023
+ if (!props.hideSelected && menu.value && selections.value.length) {
11024
+ const index = displayItems.value.findIndex(item => selections.value.some(s => item.value === s.value));
11025
+ IN_BROWSER && window.requestAnimationFrame(() => {
11026
+ index >= 0 && vVirtualScrollRef.value?.scrollToIndex(index);
11027
+ });
11028
+ }
11029
+ });
10982
11030
  useRender(() => {
10983
11031
  const hasChips = !!(props.chips || slots.chip);
10984
11032
  const hasList = !!(!props.hideNoData || displayItems.value.length || slots['prepend-item'] || slots['append-item'] || slots['no-data']);
@@ -11040,6 +11088,7 @@
11040
11088
  default: () => [slots['prepend-item']?.(), !displayItems.value.length && !props.hideNoData && (slots['no-data']?.() ?? vue.createVNode(VListItem, {
11041
11089
  "title": t(props.noDataText)
11042
11090
  }, null)), vue.createVNode(VVirtualScroll, {
11091
+ "ref": vVirtualScrollRef,
11043
11092
  "renderless": true,
11044
11093
  "items": displayItems.value
11045
11094
  }, {
@@ -11300,6 +11349,7 @@
11300
11349
  const isPristine = vue.shallowRef(true);
11301
11350
  const listHasFocus = vue.shallowRef(false);
11302
11351
  const vMenuRef = vue.ref();
11352
+ const vVirtualScrollRef = vue.ref();
11303
11353
  const _menu = useProxiedModel(props, 'menu');
11304
11354
  const menu = vue.computed({
11305
11355
  get: () => _menu.value,
@@ -11390,7 +11440,7 @@
11390
11440
  menu.value = false;
11391
11441
  }
11392
11442
  if (highlightFirst.value && ['Enter', 'Tab'].includes(e.key)) {
11393
- select(filteredItems.value[0]);
11443
+ select(displayItems.value[0]);
11394
11444
  }
11395
11445
  if (e.key === 'ArrowDown' && highlightFirst.value) {
11396
11446
  listRef.value?.focus('next');
@@ -11503,6 +11553,14 @@
11503
11553
  if (val) menu.value = true;
11504
11554
  isPristine.value = !val;
11505
11555
  });
11556
+ vue.watch(menu, () => {
11557
+ if (!props.hideSelected && menu.value && selections.value.length) {
11558
+ const index = displayItems.value.findIndex(item => selections.value.some(s => item.value === s.value));
11559
+ IN_BROWSER && window.requestAnimationFrame(() => {
11560
+ index >= 0 && vVirtualScrollRef.value?.scrollToIndex(index);
11561
+ });
11562
+ }
11563
+ });
11506
11564
  useRender(() => {
11507
11565
  const hasChips = !!(props.chips || slots.chip);
11508
11566
  const hasList = !!(!props.hideNoData || displayItems.value.length || slots['prepend-item'] || slots['append-item'] || slots['no-data']);
@@ -11562,6 +11620,7 @@
11562
11620
  default: () => [slots['prepend-item']?.(), !displayItems.value.length && !props.hideNoData && (slots['no-data']?.() ?? vue.createVNode(VListItem, {
11563
11621
  "title": t(props.noDataText)
11564
11622
  }, null)), vue.createVNode(VVirtualScroll, {
11623
+ "ref": vVirtualScrollRef,
11565
11624
  "renderless": true,
11566
11625
  "items": displayItems.value
11567
11626
  }, {
@@ -14833,6 +14892,7 @@
14833
14892
  const isPristine = vue.shallowRef(true);
14834
14893
  const listHasFocus = vue.shallowRef(false);
14835
14894
  const vMenuRef = vue.ref();
14895
+ const vVirtualScrollRef = vue.ref();
14836
14896
  const _menu = useProxiedModel(props, 'menu');
14837
14897
  const menu = vue.computed({
14838
14898
  get: () => _menu.value,
@@ -15066,6 +15126,14 @@
15066
15126
  search.value = '';
15067
15127
  }
15068
15128
  });
15129
+ vue.watch(menu, () => {
15130
+ if (!props.hideSelected && menu.value && selections.value.length) {
15131
+ const index = displayItems.value.findIndex(item => selections.value.some(s => item.value === s.value));
15132
+ IN_BROWSER && window.requestAnimationFrame(() => {
15133
+ index >= 0 && vVirtualScrollRef.value?.scrollToIndex(index);
15134
+ });
15135
+ }
15136
+ });
15069
15137
  useRender(() => {
15070
15138
  const hasChips = !!(props.chips || slots.chip);
15071
15139
  const hasList = !!(!props.hideNoData || displayItems.value.length || slots['prepend-item'] || slots['append-item'] || slots['no-data']);
@@ -15124,6 +15192,7 @@
15124
15192
  default: () => [slots['prepend-item']?.(), !displayItems.value.length && !props.hideNoData && (slots['no-data']?.() ?? vue.createVNode(VListItem, {
15125
15193
  "title": t(props.noDataText)
15126
15194
  }, null)), vue.createVNode(VVirtualScroll, {
15195
+ "ref": vVirtualScrollRef,
15127
15196
  "renderless": true,
15128
15197
  "items": displayItems.value
15129
15198
  }, {
@@ -17515,7 +17584,7 @@
17515
17584
  const id = vue.computed(() => props.id || `radio-group-${uid}`);
17516
17585
  const model = useProxiedModel(props, 'modelValue');
17517
17586
  useRender(() => {
17518
- const [inputAttrs, controlAttrs] = filterInputAttrs(attrs);
17587
+ const [rootAttrs, controlAttrs] = filterInputAttrs(attrs);
17519
17588
  const [inputProps, _1] = VInput.filterProps(props);
17520
17589
  const [controlProps, _2] = VSelectionControl.filterProps(props);
17521
17590
  const label = slots.label ? slots.label({
@@ -17527,7 +17596,7 @@
17527
17596
  return vue.createVNode(VInput, vue.mergeProps({
17528
17597
  "class": ['v-radio-group', props.class],
17529
17598
  "style": props.style
17530
- }, inputAttrs, inputProps, {
17599
+ }, rootAttrs, inputProps, {
17531
17600
  "modelValue": model.value,
17532
17601
  "onUpdate:modelValue": $event => model.value = $event,
17533
17602
  "id": id.value
@@ -18504,6 +18573,7 @@
18504
18573
  focus,
18505
18574
  blur
18506
18575
  } = useFocus(props);
18576
+ const control = vue.ref();
18507
18577
  const loaderColor = vue.computed(() => {
18508
18578
  return typeof props.loading === 'string' && props.loading !== '' ? props.loading : props.color;
18509
18579
  });
@@ -18514,16 +18584,15 @@
18514
18584
  indeterminate.value = false;
18515
18585
  }
18516
18586
  }
18587
+ function onTrackClick(e) {
18588
+ e.stopPropagation();
18589
+ e.preventDefault();
18590
+ control.value?.input?.click();
18591
+ }
18517
18592
  useRender(() => {
18518
- const [inputAttrs, controlAttrs] = filterInputAttrs(attrs);
18593
+ const [rootAttrs, controlAttrs] = filterInputAttrs(attrs);
18519
18594
  const [inputProps, _1] = VInput.filterProps(props);
18520
18595
  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
18596
  return vue.createVNode(VInput, vue.mergeProps({
18528
18597
  "class": ['v-switch', {
18529
18598
  'v-switch--inset': props.inset
@@ -18531,7 +18600,7 @@
18531
18600
  'v-switch--indeterminate': indeterminate.value
18532
18601
  }, loaderClasses.value, props.class],
18533
18602
  "style": props.style
18534
- }, inputAttrs, inputProps, {
18603
+ }, rootAttrs, inputProps, {
18535
18604
  "id": id.value,
18536
18605
  "focused": isFocused.value
18537
18606
  }), {
@@ -18559,19 +18628,29 @@
18559
18628
  "onBlur": blur
18560
18629
  }, controlAttrs), {
18561
18630
  ...slots,
18562
- default: () => vue.createVNode("div", {
18563
- "class": "v-switch__track",
18564
- "onClick": onClick
18565
- }, null),
18566
- input: _ref3 => {
18631
+ default: _ref3 => {
18567
18632
  let {
18568
- inputNode,
18569
- icon
18633
+ backgroundColorClasses,
18634
+ backgroundColorStyles
18570
18635
  } = _ref3;
18636
+ return vue.createVNode("div", {
18637
+ "class": ['v-switch__track', ...backgroundColorClasses.value],
18638
+ "style": backgroundColorStyles.value,
18639
+ "onClick": onTrackClick
18640
+ }, null);
18641
+ },
18642
+ input: _ref4 => {
18643
+ let {
18644
+ inputNode,
18645
+ icon,
18646
+ backgroundColorClasses,
18647
+ backgroundColorStyles
18648
+ } = _ref4;
18571
18649
  return vue.createVNode(vue.Fragment, null, [inputNode, vue.createVNode("div", {
18572
18650
  "class": ['v-switch__thumb', {
18573
18651
  'v-switch__thumb--filled': icon || props.loading
18574
- }]
18652
+ }, props.inset ? undefined : backgroundColorClasses.value],
18653
+ "style": props.inset ? undefined : backgroundColorStyles.value
18575
18654
  }, [vue.createVNode(VScaleTransition, null, {
18576
18655
  default: () => [!props.loading ? icon && vue.createVNode(VIcon, {
18577
18656
  "key": icon,
@@ -18712,8 +18791,8 @@
18712
18791
  const delta = prevPos > nextPos ? prevBox[rightBottom] - nextBox[rightBottom] : prevBox[xy] - nextBox[xy];
18713
18792
  const origin = Math.sign(delta) > 0 ? isHorizontal.value ? 'right' : 'bottom' : Math.sign(delta) < 0 ? isHorizontal.value ? 'left' : 'top' : 'center';
18714
18793
  const size = Math.abs(delta) + (Math.sign(delta) < 0 ? prevBox[widthHeight] : nextBox[widthHeight]);
18715
- const scale = size / Math.max(prevBox[widthHeight], nextBox[widthHeight]);
18716
- const initialScale = prevBox[widthHeight] / nextBox[widthHeight];
18794
+ const scale = size / Math.max(prevBox[widthHeight], nextBox[widthHeight]) || 0;
18795
+ const initialScale = prevBox[widthHeight] / nextBox[widthHeight] || 0;
18717
18796
  const sigma = 1.5;
18718
18797
  animate(nextEl, {
18719
18798
  backgroundColor: [color, 'currentcolor'],
@@ -19109,6 +19188,7 @@
19109
19188
  once: true
19110
19189
  }]]), props.autoGrow && vue.withDirectives(vue.createVNode("textarea", {
19111
19190
  "class": [fieldClass, 'v-textarea__sizer'],
19191
+ "id": `${slotProps.id}-sizer`,
19112
19192
  "onUpdate:modelValue": $event => model.value = $event,
19113
19193
  "ref": sizerRef,
19114
19194
  "readonly": true,
@@ -20332,7 +20412,7 @@
20332
20412
  date
20333
20413
  };
20334
20414
  }
20335
- const version$1 = "3.3.13";
20415
+ const version$1 = "3.3.15";
20336
20416
  createVuetify$1.version = version$1;
20337
20417
 
20338
20418
  // Vue's inject() can only be used in setup
@@ -20357,7 +20437,7 @@
20357
20437
  ...options
20358
20438
  });
20359
20439
  };
20360
- const version = "3.3.13";
20440
+ const version = "3.3.15";
20361
20441
  createVuetify.version = version;
20362
20442
 
20363
20443
  exports.components = components;