@vuetify/nightly 4.0.0-dev-20230427.0 → 4.0.0-dev-20230511.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -23
- package/dist/json/attributes.json +854 -658
- package/dist/json/importMap-labs.json +4 -4
- package/dist/json/tags.json +50 -1
- package/dist/json/web-types.json +1797 -1324
- package/dist/vuetify-labs.css +81 -69
- package/dist/vuetify-labs.d.ts +771 -257
- package/dist/vuetify-labs.esm.js +260 -224
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +259 -223
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +23 -11
- package/dist/vuetify.d.ts +884 -412
- package/dist/vuetify.esm.js +237 -215
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +236 -214
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +640 -645
- package/dist/vuetify.min.js.map +1 -1
- package/lib/blueprints/{index.d.ts → index.d.mts} +5 -1
- package/lib/blueprints/{md1.d.ts → md1.d.mts} +5 -1
- package/lib/blueprints/{md2.d.ts → md2.d.mts} +5 -1
- package/lib/blueprints/{md3.d.ts → md3.d.mts} +5 -1
- package/lib/components/VAppBar/VAppBar.mjs +7 -11
- package/lib/components/VAppBar/VAppBar.mjs.map +1 -1
- package/lib/components/VAppBar/VAppBarNavIcon.mjs +10 -16
- package/lib/components/VAppBar/VAppBarNavIcon.mjs.map +1 -1
- package/lib/components/VAppBar/{index.d.ts → index.d.mts} +394 -28
- package/lib/components/VAutocomplete/VAutocomplete.css +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.mjs +9 -2
- package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.sass +1 -1
- package/lib/components/VAutocomplete/{index.d.ts → index.d.mts} +6 -6
- package/lib/components/VBtn/VBtn.mjs +7 -6
- package/lib/components/VBtn/VBtn.mjs.map +1 -1
- package/lib/components/VCheckbox/VCheckboxBtn.mjs +0 -1
- package/lib/components/VCheckbox/VCheckboxBtn.mjs.map +1 -1
- package/lib/components/VCheckbox/{index.d.ts → index.d.mts} +6 -6
- package/lib/components/VColorPicker/VColorPicker.mjs +9 -4
- package/lib/components/VColorPicker/VColorPicker.mjs.map +1 -1
- package/lib/components/VColorPicker/VColorPickerEdit.mjs.map +1 -1
- package/lib/components/VColorPicker/VColorPickerSwatches.mjs +5 -4
- package/lib/components/VColorPicker/VColorPickerSwatches.mjs.map +1 -1
- package/lib/components/VColorPicker/{index.d.ts → index.d.mts} +97 -31
- package/lib/components/VColorPicker/util/index.mjs +2 -22
- package/lib/components/VColorPicker/util/index.mjs.map +1 -1
- package/lib/components/VCombobox/VCombobox.mjs +9 -2
- package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
- package/lib/components/VCombobox/{index.d.ts → index.d.mts} +6 -6
- package/lib/components/VField/{index.d.ts → index.d.mts} +6 -6
- package/lib/components/VFileInput/VFileInput.mjs +2 -1
- package/lib/components/VFileInput/VFileInput.mjs.map +1 -1
- package/lib/components/VFileInput/{index.d.ts → index.d.mts} +15 -15
- package/lib/components/VImg/VImg.css +2 -4
- package/lib/components/VImg/VImg.mjs +25 -24
- package/lib/components/VImg/VImg.mjs.map +1 -1
- package/lib/components/VImg/VImg.sass +4 -3
- package/lib/components/VImg/{index.d.ts → index.d.mts} +48 -3
- package/lib/components/VInput/{index.d.ts → index.d.mts} +6 -6
- package/lib/components/VList/VList.mjs +5 -0
- package/lib/components/VList/VList.mjs.map +1 -1
- package/lib/components/VList/VListGroup.mjs +3 -0
- package/lib/components/VList/VListGroup.mjs.map +1 -1
- package/lib/components/VList/VListItem.mjs +10 -5
- package/lib/components/VList/VListItem.mjs.map +1 -1
- package/lib/components/VList/{index.d.ts → index.d.mts} +18 -0
- package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs +1 -8
- package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs.map +1 -1
- package/lib/components/VRadioGroup/{index.d.ts → index.d.mts} +6 -6
- package/lib/components/VRangeSlider/{index.d.ts → index.d.mts} +6 -6
- package/lib/components/VResponsive/VResponsive.css +13 -5
- package/lib/components/VResponsive/VResponsive.mjs +12 -8
- package/lib/components/VResponsive/VResponsive.mjs.map +1 -1
- package/lib/components/VResponsive/VResponsive.sass +12 -4
- package/lib/components/VResponsive/{index.d.ts → index.d.mts} +10 -1
- package/lib/components/VSelect/VSelect.mjs +9 -2
- package/lib/components/VSelect/VSelect.mjs.map +1 -1
- package/lib/components/VSelect/{index.d.ts → index.d.mts} +6 -6
- package/lib/components/VSheet/VSheet.css +6 -0
- package/lib/components/VSheet/_variables.scss +1 -1
- package/lib/components/VSlider/{index.d.ts → index.d.mts} +6 -6
- package/lib/components/VSwitch/{index.d.ts → index.d.mts} +6 -6
- package/lib/components/VTextField/VTextField.mjs +1 -1
- package/lib/components/VTextField/VTextField.mjs.map +1 -1
- package/lib/components/VTextField/{index.d.ts → index.d.mts} +24 -24
- package/lib/components/VTextarea/VTextarea.mjs +1 -1
- package/lib/components/VTextarea/VTextarea.mjs.map +1 -1
- package/lib/components/VTextarea/{index.d.ts → index.d.mts} +15 -15
- package/lib/components/VValidation/{index.d.ts → index.d.mts} +6 -6
- package/lib/components/{index.d.ts → index.d.mts} +679 -208
- package/lib/composables/defaults.mjs +15 -3
- package/lib/composables/defaults.mjs.map +1 -1
- package/lib/composables/display.mjs +6 -6
- package/lib/composables/display.mjs.map +1 -1
- package/lib/composables/focus.mjs.map +1 -1
- package/lib/composables/scroll.mjs +18 -19
- package/lib/composables/scroll.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/framework.mjs +1 -1
- package/lib/framework.mjs.map +1 -1
- package/lib/{index.d.ts → index.d.mts} +7 -6
- package/lib/labs/VDataTable/VDataTable.mjs +11 -2
- package/lib/labs/VDataTable/VDataTable.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableServer.mjs +0 -5
- package/lib/labs/VDataTable/VDataTableServer.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableVirtual.mjs +7 -2
- package/lib/labs/VDataTable/VDataTableVirtual.mjs.map +1 -1
- package/lib/labs/VDataTable/composables/paginate.mjs +6 -1
- package/lib/labs/VDataTable/composables/paginate.mjs.map +1 -1
- package/lib/labs/VDataTable/{index.d.ts → index.d.mts} +54 -12
- package/lib/labs/{components.d.ts → components.d.mts} +54 -12
- package/lib/util/colorUtils.mjs +68 -3
- package/lib/util/colorUtils.mjs.map +1 -1
- package/lib/util/console.mjs +12 -81
- package/lib/util/console.mjs.map +1 -1
- package/lib/util/defineComponent.mjs +2 -2
- package/lib/util/defineComponent.mjs.map +1 -1
- package/lib/util/helpers.mjs +3 -0
- package/lib/util/helpers.mjs.map +1 -1
- package/package.json +10 -6
- /package/lib/components/VAlert/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VApp/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VAvatar/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VBadge/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VBanner/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VBottomNavigation/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VBreadcrumbs/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VBtn/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VBtnGroup/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VBtnToggle/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VCard/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VCarousel/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VChip/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VChipGroup/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VCode/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VCounter/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VDefaultsProvider/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VDialog/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VDivider/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VExpansionPanel/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VFooter/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VForm/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VGrid/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VHover/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VIcon/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VItemGroup/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VKbd/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VLabel/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VLayout/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VLazy/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VLocaleProvider/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VMain/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VMenu/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VMessages/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VNavigationDrawer/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VNoSsr/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VOverlay/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VPagination/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VParallax/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VProgressCircular/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VProgressLinear/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VRadio/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VRating/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VSelectionControl/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VSelectionControlGroup/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VSheet/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VSlideGroup/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VSnackbar/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VSystemBar/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VTable/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VTabs/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VThemeProvider/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VTimeline/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VToolbar/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VTooltip/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VVirtualScroll/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/VWindow/{index.d.ts → index.d.mts} +0 -0
- /package/lib/components/transitions/{index.d.ts → index.d.mts} +0 -0
- /package/lib/directives/{index.d.ts → index.d.mts} +0 -0
- /package/lib/iconsets/{fa-svg.d.ts → fa-svg.d.mts} +0 -0
- /package/lib/iconsets/{fa.d.ts → fa.d.mts} +0 -0
- /package/lib/iconsets/{fa4.d.ts → fa4.d.mts} +0 -0
- /package/lib/iconsets/{md.d.ts → md.d.mts} +0 -0
- /package/lib/iconsets/{mdi-svg.d.ts → mdi-svg.d.mts} +0 -0
- /package/lib/iconsets/{mdi.d.ts → mdi.d.mts} +0 -0
- /package/lib/labs/VInfiniteScroll/{index.d.ts → index.d.mts} +0 -0
- /package/lib/labs/VSkeletonLoader/{index.d.ts → index.d.mts} +0 -0
- /package/lib/labs/date/adapters/{vuetify.d.ts → vuetify.d.mts} +0 -0
- /package/lib/labs/date/{index.d.ts → index.d.mts} +0 -0
- /package/lib/locale/adapters/{vue-i18n.d.ts → vue-i18n.d.mts} +0 -0
- /package/lib/locale/adapters/{vuetify.d.ts → vuetify.d.mts} +0 -0
- /package/lib/locale/{index.d.ts → index.d.mts} +0 -0
package/dist/vuetify.esm.js
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
/*!
|
2
|
-
* Vuetify v4.0.0-dev-
|
2
|
+
* Vuetify v4.0.0-dev-20230511.0
|
3
3
|
* Forged by John Leider
|
4
4
|
* Released under the MIT License.
|
5
5
|
*/
|
6
6
|
|
7
|
-
import { ref, onBeforeUnmount, watch, readonly, reactive, computed, watchEffect, toRefs, capitalize, onScopeDispose, effectScope, shallowRef, inject as inject$1,
|
7
|
+
import { ref, onBeforeUnmount, watch, readonly, reactive, computed, watchEffect, toRefs, capitalize, warn, onScopeDispose, effectScope, unref, provide, shallowRef, inject as inject$1, defineComponent as defineComponent$1, camelize, h, getCurrentInstance as getCurrentInstance$1, onDeactivated, onActivated, onMounted, toRaw, createVNode, TransitionGroup, Transition, mergeProps, onBeforeMount, nextTick, withDirectives, Fragment, resolveDirective, vShow, isRef, toRef, Text, resolveDynamicComponent, cloneVNode, toHandlers, Teleport, createTextVNode, onBeforeUpdate, vModelText, onUpdated } from 'vue';
|
8
8
|
|
9
9
|
const IN_BROWSER = typeof window !== 'undefined';
|
10
10
|
const SUPPORTS_INTERSECTION = IN_BROWSER && 'IntersectionObserver' in window;
|
@@ -167,6 +167,9 @@ const keyValues = Object.freeze({
|
|
167
167
|
function keys(o) {
|
168
168
|
return Object.keys(o);
|
169
169
|
}
|
170
|
+
function has(obj, key) {
|
171
|
+
return key.every(k => obj.hasOwnProperty(k));
|
172
|
+
}
|
170
173
|
function pick(obj, paths, exclude) {
|
171
174
|
const found = Object.create(null);
|
172
175
|
const rest = Object.create(null);
|
@@ -534,79 +537,15 @@ function animate(el, keyframes, options) {
|
|
534
537
|
}
|
535
538
|
|
536
539
|
/* eslint-disable no-console */
|
537
|
-
|
538
|
-
|
539
|
-
function createMessage(message, vm, parent) {
|
540
|
-
// if (Vuetify.config.silent) return
|
541
|
-
|
542
|
-
if (parent) {
|
543
|
-
vm = {
|
544
|
-
__isVue: true,
|
545
|
-
$parent: parent,
|
546
|
-
$options: vm
|
547
|
-
};
|
548
|
-
}
|
549
|
-
if (vm) {
|
550
|
-
// Only show each message once per instance
|
551
|
-
vm.$_alreadyWarned = vm.$_alreadyWarned || [];
|
552
|
-
if (vm.$_alreadyWarned.includes(message)) return;
|
553
|
-
vm.$_alreadyWarned.push(message);
|
554
|
-
}
|
555
|
-
return `[Vuetify] ${message}` + (vm ? generateComponentTrace(vm) : '');
|
540
|
+
function consoleWarn(message) {
|
541
|
+
warn(`Vuetify: ${message}`);
|
556
542
|
}
|
557
|
-
function
|
558
|
-
|
559
|
-
newMessage != null && console.warn(newMessage);
|
543
|
+
function consoleError(message) {
|
544
|
+
warn(`Vuetify error: ${message}`);
|
560
545
|
}
|
561
|
-
function
|
562
|
-
|
563
|
-
|
564
|
-
}
|
565
|
-
|
566
|
-
/**
|
567
|
-
* Shamelessly stolen from vuejs/vue/blob/dev/src/core/util/debug.js
|
568
|
-
*/
|
569
|
-
|
570
|
-
const classifyRE = /(?:^|[-_])(\w)/g;
|
571
|
-
const classify = str => str.replace(classifyRE, c => c.toUpperCase()).replace(/[-_]/g, '');
|
572
|
-
function formatComponentName(vm, includeFile) {
|
573
|
-
if (vm.$root === vm) {
|
574
|
-
return '<Root>';
|
575
|
-
}
|
576
|
-
const options = typeof vm === 'function' && vm.cid != null ? vm.options : vm.__isVue ? vm.$options || vm.constructor.options : vm || {};
|
577
|
-
let name = options.name || options._componentTag;
|
578
|
-
const file = options.__file;
|
579
|
-
if (!name && file) {
|
580
|
-
const match = file.match(/([^/\\]+)\.vue$/);
|
581
|
-
name = match?.[1];
|
582
|
-
}
|
583
|
-
return (name ? `<${classify(name)}>` : `<Anonymous>`) + (file && includeFile !== false ? ` at ${file}` : '');
|
584
|
-
}
|
585
|
-
function generateComponentTrace(vm) {
|
586
|
-
if (vm.__isVue && vm.$parent) {
|
587
|
-
const tree = [];
|
588
|
-
let currentRecursiveSequence = 0;
|
589
|
-
while (vm) {
|
590
|
-
if (tree.length > 0) {
|
591
|
-
const last = tree[tree.length - 1];
|
592
|
-
if (last.constructor === vm.constructor) {
|
593
|
-
currentRecursiveSequence++;
|
594
|
-
vm = vm.$parent;
|
595
|
-
continue;
|
596
|
-
} else if (currentRecursiveSequence > 0) {
|
597
|
-
tree[tree.length - 1] = [last, currentRecursiveSequence];
|
598
|
-
currentRecursiveSequence = 0;
|
599
|
-
}
|
600
|
-
}
|
601
|
-
tree.push(vm);
|
602
|
-
vm = vm.$parent;
|
603
|
-
}
|
604
|
-
return '\n\nfound in\n\n' + tree.map((vm, i) => `${i === 0 ? '---> ' : ' '.repeat(5 + i * 2)}${Array.isArray(vm)
|
605
|
-
// eslint-disable-next-line sonarjs/no-nested-template-literals
|
606
|
-
? `${formatComponentName(vm[0])}... (${vm[1]} recursive calls)` : formatComponentName(vm)}`).join('\n');
|
607
|
-
} else {
|
608
|
-
return `\n\n(found in ${formatComponentName(vm)})`;
|
609
|
-
}
|
546
|
+
function deprecate(original, replacement) {
|
547
|
+
replacement = Array.isArray(replacement) ? replacement.slice(0, -1).map(s => `'${s}'`).join(', ') + ` or '${replacement.at(-1)}'` : `'${replacement}'`;
|
548
|
+
warn(`[Vuetify UPGRADE] '${original}' is deprecated, use ${replacement} instead.`);
|
610
549
|
}
|
611
550
|
|
612
551
|
// For converting XYZ to sRGB
|
@@ -680,7 +619,46 @@ function toXYZ(lab) {
|
|
680
619
|
function isCssColor(color) {
|
681
620
|
return !!color && /^(#|var\(--|(rgb|hsl)a?\()/.test(color);
|
682
621
|
}
|
683
|
-
|
622
|
+
const cssColorRe = /^(?<fn>(?:rgb|hsl)a?)\((?<values>.+)\)/;
|
623
|
+
const mappers = {
|
624
|
+
rgb: (r, g, b, a) => ({
|
625
|
+
r,
|
626
|
+
g,
|
627
|
+
b,
|
628
|
+
a
|
629
|
+
}),
|
630
|
+
rgba: (r, g, b, a) => ({
|
631
|
+
r,
|
632
|
+
g,
|
633
|
+
b,
|
634
|
+
a
|
635
|
+
}),
|
636
|
+
hsl: (h, s, l, a) => HSLtoRGB({
|
637
|
+
h,
|
638
|
+
s,
|
639
|
+
l,
|
640
|
+
a
|
641
|
+
}),
|
642
|
+
hsla: (h, s, l, a) => HSLtoRGB({
|
643
|
+
h,
|
644
|
+
s,
|
645
|
+
l,
|
646
|
+
a
|
647
|
+
}),
|
648
|
+
hsv: (h, s, v, a) => HSVtoRGB({
|
649
|
+
h,
|
650
|
+
s,
|
651
|
+
v,
|
652
|
+
a
|
653
|
+
}),
|
654
|
+
hsva: (h, s, v, a) => HSVtoRGB({
|
655
|
+
h,
|
656
|
+
s,
|
657
|
+
v,
|
658
|
+
a
|
659
|
+
})
|
660
|
+
};
|
661
|
+
function parseColor(color) {
|
684
662
|
if (typeof color === 'number') {
|
685
663
|
if (isNaN(color) || color < 0 || color > 0xFFFFFF) {
|
686
664
|
// int can't have opacity
|
@@ -691,6 +669,22 @@ function parseColor$1(color) {
|
|
691
669
|
g: (color & 0xFF00) >> 8,
|
692
670
|
b: color & 0xFF
|
693
671
|
};
|
672
|
+
} else if (typeof color === 'string' && cssColorRe.test(color)) {
|
673
|
+
const {
|
674
|
+
groups
|
675
|
+
} = color.match(cssColorRe);
|
676
|
+
const {
|
677
|
+
fn,
|
678
|
+
values
|
679
|
+
} = groups;
|
680
|
+
const realValues = values.split(/,\s*/).map(v => {
|
681
|
+
if (v.endsWith('%') && ['hsl', 'hsla', 'hsv', 'hsva'].includes(fn)) {
|
682
|
+
return parseFloat(v) / 100;
|
683
|
+
} else {
|
684
|
+
return parseFloat(v);
|
685
|
+
}
|
686
|
+
});
|
687
|
+
return mappers[fn](...realValues);
|
694
688
|
} else if (typeof color === 'string') {
|
695
689
|
let hex = color.startsWith('#') ? color.slice(1) : color;
|
696
690
|
if ([3, 4].includes(hex.length)) {
|
@@ -703,9 +697,16 @@ function parseColor$1(color) {
|
|
703
697
|
consoleWarn(`'${color}' is not a valid hex(a) color`);
|
704
698
|
}
|
705
699
|
return HexToRGB(hex);
|
706
|
-
} else {
|
707
|
-
|
700
|
+
} else if (typeof color === 'object') {
|
701
|
+
if (has(color, ['r', 'g', 'b'])) {
|
702
|
+
return color;
|
703
|
+
} else if (has(color, ['h', 's', 'l'])) {
|
704
|
+
return HSVtoRGB(HSLtoHSV(color));
|
705
|
+
} else if (has(color, ['h', 's', 'v'])) {
|
706
|
+
return HSVtoRGB(color);
|
707
|
+
}
|
708
708
|
}
|
709
|
+
throw new TypeError(`Invalid color: ${color == null ? color : String(color) || color.constructor.name}\nExpected #hex, #hexa, rgb(), rgba(), hsl(), hsla(), object or number`);
|
709
710
|
}
|
710
711
|
|
711
712
|
/** Converts HSVA to RGBA. Based on formula from https://en.wikipedia.org/wiki/HSL_and_HSV */
|
@@ -728,6 +729,9 @@ function HSVtoRGB(hsva) {
|
|
728
729
|
a
|
729
730
|
};
|
730
731
|
}
|
732
|
+
function HSLtoRGB(hsla) {
|
733
|
+
return HSVtoRGB(HSLtoHSV(hsla));
|
734
|
+
}
|
731
735
|
|
732
736
|
/** Converts RGBA to HSVA. Based on formula from https://en.wikipedia.org/wiki/HSL_and_HSV */
|
733
737
|
function RGBtoHSV(rgba) {
|
@@ -866,7 +870,7 @@ function darken(value, amount) {
|
|
866
870
|
* @see https://www.w3.org/TR/WCAG20/#relativeluminancedef
|
867
871
|
*/
|
868
872
|
function getLuma(color) {
|
869
|
-
const rgb = parseColor
|
873
|
+
const rgb = parseColor(color);
|
870
874
|
return toXYZ$1(rgb)[1];
|
871
875
|
}
|
872
876
|
|
@@ -1012,21 +1016,23 @@ function provideDefaults(defaults, options) {
|
|
1012
1016
|
function propIsDefined(vnode, prop) {
|
1013
1017
|
return typeof vnode.props?.[prop] !== 'undefined' || typeof vnode.props?.[toKebabCase(prop)] !== 'undefined';
|
1014
1018
|
}
|
1015
|
-
function
|
1019
|
+
function internalUseDefaults() {
|
1020
|
+
let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
1021
|
+
let name = arguments.length > 1 ? arguments[1] : undefined;
|
1016
1022
|
let defaults = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : injectDefaults();
|
1017
1023
|
const vm = getCurrentInstance('useDefaults');
|
1018
1024
|
name = name ?? vm.type.name ?? vm.type.__name;
|
1019
1025
|
if (!name) {
|
1020
1026
|
throw new Error('[Vuetify] Could not determine component name');
|
1021
1027
|
}
|
1022
|
-
const componentDefaults = computed(() => defaults.value[props._as ?? name]);
|
1028
|
+
const componentDefaults = computed(() => defaults.value?.[props._as ?? name]);
|
1023
1029
|
const _props = new Proxy(props, {
|
1024
1030
|
get(target, prop) {
|
1025
1031
|
const propValue = Reflect.get(target, prop);
|
1026
1032
|
if (prop === 'class' || prop === 'style') {
|
1027
1033
|
return [componentDefaults.value?.[prop], propValue].filter(v => v != null);
|
1028
1034
|
} else if (typeof prop === 'string' && !propIsDefined(vm.vnode, prop)) {
|
1029
|
-
return componentDefaults.value?.[prop] ?? defaults.value
|
1035
|
+
return componentDefaults.value?.[prop] ?? defaults.value?.global?.[prop] ?? propValue;
|
1030
1036
|
}
|
1031
1037
|
return propValue;
|
1032
1038
|
}
|
@@ -1054,6 +1060,16 @@ function useDefaults(props, name) {
|
|
1054
1060
|
provideSubDefaults
|
1055
1061
|
};
|
1056
1062
|
}
|
1063
|
+
function useDefaults() {
|
1064
|
+
let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
1065
|
+
let name = arguments.length > 1 ? arguments[1] : undefined;
|
1066
|
+
const {
|
1067
|
+
props: _props,
|
1068
|
+
provideSubDefaults
|
1069
|
+
} = internalUseDefaults(props, name);
|
1070
|
+
provideSubDefaults();
|
1071
|
+
return _props;
|
1072
|
+
}
|
1057
1073
|
|
1058
1074
|
// Utils
|
1059
1075
|
|
@@ -1081,7 +1097,7 @@ function defineComponent(options) {
|
|
1081
1097
|
const {
|
1082
1098
|
props: _props,
|
1083
1099
|
provideSubDefaults
|
1084
|
-
} =
|
1100
|
+
} = internalUseDefaults(props, props._as ?? options.name, defaults);
|
1085
1101
|
const setupBindings = options._setup(_props, ctx);
|
1086
1102
|
provideSubDefaults();
|
1087
1103
|
return setupBindings;
|
@@ -1714,7 +1730,7 @@ function createTheme(options) {
|
|
1714
1730
|
for (const variation of ['lighten', 'darken']) {
|
1715
1731
|
const fn = variation === 'lighten' ? lighten : darken;
|
1716
1732
|
for (const amount of createRange(parsedOptions.variations[variation], 1)) {
|
1717
|
-
theme.colors[`${name}-${variation}-${amount}`] = RGBtoHex(fn(parseColor
|
1733
|
+
theme.colors[`${name}-${variation}-${amount}`] = RGBtoHex(fn(parseColor(color), amount));
|
1718
1734
|
}
|
1719
1735
|
}
|
1720
1736
|
}
|
@@ -1722,9 +1738,9 @@ function createTheme(options) {
|
|
1722
1738
|
for (const color of Object.keys(theme.colors)) {
|
1723
1739
|
if (/^on-[a-z]/.test(color) || theme.colors[`on-${color}`]) continue;
|
1724
1740
|
const onColor = `on-${color}`;
|
1725
|
-
const colorVal = parseColor
|
1726
|
-
const blackContrast = Math.abs(APCAcontrast(parseColor
|
1727
|
-
const whiteContrast = Math.abs(APCAcontrast(parseColor
|
1741
|
+
const colorVal = parseColor(theme.colors[color]);
|
1742
|
+
const blackContrast = Math.abs(APCAcontrast(parseColor(0), colorVal));
|
1743
|
+
const whiteContrast = Math.abs(APCAcontrast(parseColor(0xffffff), colorVal));
|
1728
1744
|
|
1729
1745
|
// TODO: warn about poor color selections
|
1730
1746
|
// const contrastAsText = Math.abs(APCAcontrast(colorVal, colorToInt(theme.colors.background)))
|
@@ -1856,14 +1872,14 @@ function genCssVariables(theme) {
|
|
1856
1872
|
const darkOverlay = theme.dark ? 1 : 2;
|
1857
1873
|
const variables = [];
|
1858
1874
|
for (const [key, value] of Object.entries(theme.colors)) {
|
1859
|
-
const rgb = parseColor
|
1875
|
+
const rgb = parseColor(value);
|
1860
1876
|
variables.push(`--v-theme-${key}: ${rgb.r},${rgb.g},${rgb.b}`);
|
1861
1877
|
if (!key.startsWith('on-')) {
|
1862
1878
|
variables.push(`--v-theme-${key}-overlay-multiplier: ${getLuma(value) > 0.18 ? lightOverlay : darkOverlay}`);
|
1863
1879
|
}
|
1864
1880
|
}
|
1865
1881
|
for (const [key, value] of Object.entries(theme.variables)) {
|
1866
|
-
const color = typeof value === 'string' && value.startsWith('#') ? parseColor
|
1882
|
+
const color = typeof value === 'string' && value.startsWith('#') ? parseColor(value) : undefined;
|
1867
1883
|
const rgb = color ? `${color.r}, ${color.g}, ${color.b}` : undefined;
|
1868
1884
|
variables.push(`--v-${key}: ${rgb ?? value}`);
|
1869
1885
|
}
|
@@ -2636,14 +2652,16 @@ function useAspectStyles(props) {
|
|
2636
2652
|
})
|
2637
2653
|
};
|
2638
2654
|
}
|
2655
|
+
const makeVResponsiveProps = propsFactory({
|
2656
|
+
aspectRatio: [String, Number],
|
2657
|
+
contentClass: String,
|
2658
|
+
inline: Boolean,
|
2659
|
+
...makeComponentProps(),
|
2660
|
+
...makeDimensionProps()
|
2661
|
+
}, 'v-responsive');
|
2639
2662
|
const VResponsive = genericComponent()({
|
2640
2663
|
name: 'VResponsive',
|
2641
|
-
props:
|
2642
|
-
aspectRatio: [String, Number],
|
2643
|
-
contentClass: String,
|
2644
|
-
...makeComponentProps(),
|
2645
|
-
...makeDimensionProps()
|
2646
|
-
},
|
2664
|
+
props: makeVResponsiveProps(),
|
2647
2665
|
setup(props, _ref) {
|
2648
2666
|
let {
|
2649
2667
|
slots
|
@@ -2655,7 +2673,9 @@ const VResponsive = genericComponent()({
|
|
2655
2673
|
dimensionStyles
|
2656
2674
|
} = useDimension(props);
|
2657
2675
|
useRender(() => createVNode("div", {
|
2658
|
-
"class": ['v-responsive',
|
2676
|
+
"class": ['v-responsive', {
|
2677
|
+
'v-responsive--inline': props.inline
|
2678
|
+
}, props.class],
|
2659
2679
|
"style": [dimensionStyles.value, props.style]
|
2660
2680
|
}, [createVNode("div", {
|
2661
2681
|
"class": "v-responsive__sizer",
|
@@ -2751,7 +2771,6 @@ const VImg = genericComponent()({
|
|
2751
2771
|
intersect: Intersect
|
2752
2772
|
},
|
2753
2773
|
props: {
|
2754
|
-
aspectRatio: [String, Number],
|
2755
2774
|
alt: String,
|
2756
2775
|
cover: Boolean,
|
2757
2776
|
eager: Boolean,
|
@@ -2773,7 +2792,7 @@ const VImg = genericComponent()({
|
|
2773
2792
|
default: ''
|
2774
2793
|
},
|
2775
2794
|
srcset: String,
|
2776
|
-
|
2795
|
+
...makeVResponsiveProps(),
|
2777
2796
|
...makeComponentProps(),
|
2778
2797
|
...makeTransitionProps()
|
2779
2798
|
},
|
@@ -2959,25 +2978,27 @@ const VImg = genericComponent()({
|
|
2959
2978
|
}
|
2960
2979
|
});
|
2961
2980
|
}
|
2962
|
-
useRender(() =>
|
2963
|
-
|
2964
|
-
|
2965
|
-
|
2966
|
-
|
2967
|
-
|
2968
|
-
|
2969
|
-
|
2970
|
-
|
2971
|
-
|
2972
|
-
|
2973
|
-
|
2974
|
-
|
2975
|
-
|
2976
|
-
|
2977
|
-
|
2978
|
-
|
2979
|
-
|
2980
|
-
|
2981
|
+
useRender(() => {
|
2982
|
+
const [responsiveProps] = VResponsive.filterProps(props);
|
2983
|
+
return withDirectives(createVNode(VResponsive, mergeProps({
|
2984
|
+
"class": ['v-img', {
|
2985
|
+
'v-img--booting': !isBooted.value
|
2986
|
+
}, props.class],
|
2987
|
+
"style": props.style
|
2988
|
+
}, responsiveProps, {
|
2989
|
+
"aspectRatio": aspectRatio.value,
|
2990
|
+
"aria-label": props.alt,
|
2991
|
+
"role": props.alt ? 'img' : undefined
|
2992
|
+
}), {
|
2993
|
+
additional: () => createVNode(Fragment, null, [createVNode(__image, null, null), createVNode(__preloadImage, null, null), createVNode(__gradient, null, null), createVNode(__placeholder, null, null), createVNode(__error, null, null)]),
|
2994
|
+
default: slots.default
|
2995
|
+
}), [[resolveDirective("intersect"), {
|
2996
|
+
handler: init,
|
2997
|
+
options: props.options
|
2998
|
+
}, null, {
|
2999
|
+
once: true
|
3000
|
+
}]]);
|
3001
|
+
});
|
2981
3002
|
return {
|
2982
3003
|
currentSrc,
|
2983
3004
|
image,
|
@@ -3324,14 +3345,13 @@ const makeScrollProps = propsFactory({
|
|
3324
3345
|
type: String
|
3325
3346
|
},
|
3326
3347
|
scrollThreshold: {
|
3327
|
-
type: [String, Number]
|
3348
|
+
type: [String, Number],
|
3349
|
+
default: 300
|
3328
3350
|
}
|
3329
3351
|
}, 'scroll');
|
3330
3352
|
function useScroll(props) {
|
3331
3353
|
let args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
3332
3354
|
const {
|
3333
|
-
thresholdMetCallback,
|
3334
|
-
scrollThreshold,
|
3335
3355
|
canScroll
|
3336
3356
|
} = args;
|
3337
3357
|
let previousScroll = 0;
|
@@ -3341,8 +3361,16 @@ function useScroll(props) {
|
|
3341
3361
|
const currentThreshold = ref(0);
|
3342
3362
|
const isScrollActive = ref(false);
|
3343
3363
|
const isScrollingUp = ref(false);
|
3344
|
-
const
|
3345
|
-
return Number(props.scrollThreshold
|
3364
|
+
const scrollThreshold = computed(() => {
|
3365
|
+
return Number(props.scrollThreshold);
|
3366
|
+
});
|
3367
|
+
|
3368
|
+
/**
|
3369
|
+
* 1: at top
|
3370
|
+
* 0: at threshold
|
3371
|
+
*/
|
3372
|
+
const scrollRatio = computed(() => {
|
3373
|
+
return clamp((scrollThreshold.value - currentScroll.value) / scrollThreshold.value || 0);
|
3346
3374
|
});
|
3347
3375
|
const onScroll = () => {
|
3348
3376
|
const targetEl = target.value;
|
@@ -3350,7 +3378,7 @@ function useScroll(props) {
|
|
3350
3378
|
previousScroll = currentScroll.value;
|
3351
3379
|
currentScroll.value = 'window' in targetEl ? targetEl.pageYOffset : targetEl.scrollTop;
|
3352
3380
|
isScrollingUp.value = currentScroll.value < previousScroll;
|
3353
|
-
currentThreshold.value = Math.abs(currentScroll.value -
|
3381
|
+
currentThreshold.value = Math.abs(currentScroll.value - scrollThreshold.value);
|
3354
3382
|
};
|
3355
3383
|
watch(isScrollingUp, () => {
|
3356
3384
|
savedScroll.value = savedScroll.value || currentScroll.value;
|
@@ -3362,7 +3390,7 @@ function useScroll(props) {
|
|
3362
3390
|
watch(() => props.scrollTarget, scrollTarget => {
|
3363
3391
|
const newTarget = scrollTarget ? document.querySelector(scrollTarget) : window;
|
3364
3392
|
if (!newTarget) {
|
3365
|
-
consoleWarn(`Unable to locate element with identifier ${scrollTarget}
|
3393
|
+
consoleWarn(`Unable to locate element with identifier ${scrollTarget}`);
|
3366
3394
|
return;
|
3367
3395
|
}
|
3368
3396
|
if (newTarget === target.value) return;
|
@@ -3378,15 +3406,6 @@ function useScroll(props) {
|
|
3378
3406
|
onBeforeUnmount(() => {
|
3379
3407
|
target.value?.removeEventListener('scroll', onScroll);
|
3380
3408
|
});
|
3381
|
-
thresholdMetCallback && watch(() => Math.abs(currentScroll.value - savedScroll.value) > computedScrollThreshold.value, thresholdMet => {
|
3382
|
-
thresholdMet && thresholdMetCallback({
|
3383
|
-
currentThreshold: currentThreshold.value,
|
3384
|
-
isScrollingUp: isScrollingUp.value,
|
3385
|
-
savedScroll
|
3386
|
-
});
|
3387
|
-
}, {
|
3388
|
-
immediate: true
|
3389
|
-
});
|
3390
3409
|
|
3391
3410
|
// Do we need this? If yes - seems that
|
3392
3411
|
// there's no need to expose onScroll
|
@@ -3394,10 +3413,11 @@ function useScroll(props) {
|
|
3394
3413
|
immediate: true
|
3395
3414
|
});
|
3396
3415
|
return {
|
3397
|
-
|
3416
|
+
scrollThreshold,
|
3398
3417
|
currentScroll,
|
3399
3418
|
currentThreshold,
|
3400
3419
|
isScrollActive,
|
3420
|
+
scrollRatio,
|
3401
3421
|
// required only for testing
|
3402
3422
|
// probably can be removed
|
3403
3423
|
// later (2 chars chlng)
|
@@ -3480,15 +3500,14 @@ const VAppBar = genericComponent()({
|
|
3480
3500
|
});
|
3481
3501
|
const {
|
3482
3502
|
currentScroll,
|
3483
|
-
|
3484
|
-
|
3485
|
-
|
3503
|
+
scrollThreshold,
|
3504
|
+
isScrollingUp,
|
3505
|
+
scrollRatio
|
3486
3506
|
} = useScroll(props, {
|
3487
3507
|
canScroll
|
3488
3508
|
});
|
3489
|
-
const isCollapsed = computed(() => props.collapse || scrollBehavior.value.collapse && (scrollBehavior.value.inverted ?
|
3490
|
-
const isFlat = computed(() => props.flat || scrollBehavior.value.elevate &&
|
3491
|
-
const scrollRatio = computed(() => Math.min((currentThreshold.value - currentScroll.value) / currentThreshold.value || 1, 1));
|
3509
|
+
const isCollapsed = computed(() => props.collapse || scrollBehavior.value.collapse && (scrollBehavior.value.inverted ? scrollRatio.value > 0 : scrollRatio.value === 0));
|
3510
|
+
const isFlat = computed(() => props.flat || scrollBehavior.value.elevate && (scrollBehavior.value.inverted ? currentScroll.value > 0 : currentScroll.value === 0));
|
3492
3511
|
const opacity = computed(() => scrollBehavior.value.fadeImage ? scrollBehavior.value.inverted ? 1 - scrollRatio.value : scrollRatio.value : undefined);
|
3493
3512
|
const height = computed(() => {
|
3494
3513
|
if (scrollBehavior.value.hide && scrollBehavior.value.inverted) return 0;
|
@@ -3497,15 +3516,12 @@ const VAppBar = genericComponent()({
|
|
3497
3516
|
return height + extensionHeight;
|
3498
3517
|
});
|
3499
3518
|
function setActive() {
|
3500
|
-
const val = currentScroll.value;
|
3501
3519
|
if (scrollBehavior.value.hide) {
|
3502
3520
|
if (scrollBehavior.value.inverted) {
|
3503
|
-
isActive.value =
|
3521
|
+
isActive.value = currentScroll.value > scrollThreshold.value;
|
3504
3522
|
} else {
|
3505
|
-
isActive.value = isScrollingUp.value ||
|
3523
|
+
isActive.value = isScrollingUp.value || currentScroll.value < scrollThreshold.value;
|
3506
3524
|
}
|
3507
|
-
} else if (scrollBehavior.value.inverted) {
|
3508
|
-
isActive.value = currentScroll.value === 0;
|
3509
3525
|
} else {
|
3510
3526
|
isActive.value = true;
|
3511
3527
|
}
|
@@ -5045,7 +5061,7 @@ const makeVBtnProps = propsFactory({
|
|
5045
5061
|
...makeVariantProps({
|
5046
5062
|
variant: 'elevated'
|
5047
5063
|
})
|
5048
|
-
}, '
|
5064
|
+
}, 'v-btn');
|
5049
5065
|
const VBtn = genericComponent()({
|
5050
5066
|
name: 'VBtn',
|
5051
5067
|
directives: {
|
@@ -5115,6 +5131,11 @@ const VBtn = genericComponent()({
|
|
5115
5131
|
if (props.value === undefined) return undefined;
|
5116
5132
|
return Object(props.value) === props.value ? JSON.stringify(props.value, null, 0) : props.value;
|
5117
5133
|
});
|
5134
|
+
function onClick(e) {
|
5135
|
+
if (isDisabled.value) return;
|
5136
|
+
link.navigate?.(e);
|
5137
|
+
group?.toggle();
|
5138
|
+
}
|
5118
5139
|
useSelectLink(link, group?.select);
|
5119
5140
|
useRender(() => {
|
5120
5141
|
const Tag = link.isLink.value ? 'a' : props.tag;
|
@@ -5137,11 +5158,7 @@ const VBtn = genericComponent()({
|
|
5137
5158
|
"style": [hasColor ? colorStyles.value : undefined, dimensionStyles.value, locationStyles.value, sizeStyles.value, props.style],
|
5138
5159
|
"disabled": isDisabled.value || undefined,
|
5139
5160
|
"href": link.href.value,
|
5140
|
-
"onClick":
|
5141
|
-
if (isDisabled.value) return;
|
5142
|
-
link.navigate?.(e);
|
5143
|
-
group?.toggle();
|
5144
|
-
},
|
5161
|
+
"onClick": onClick,
|
5145
5162
|
"value": valueAttr.value
|
5146
5163
|
}, {
|
5147
5164
|
default: () => [genOverlays(true, 'v-btn'), !props.icon && hasPrepend && createVNode("span", {
|
@@ -5207,22 +5224,17 @@ const VBtn = genericComponent()({
|
|
5207
5224
|
|
5208
5225
|
const VAppBarNavIcon = genericComponent()({
|
5209
5226
|
name: 'VAppBarNavIcon',
|
5210
|
-
props: {
|
5211
|
-
icon:
|
5212
|
-
|
5213
|
-
|
5214
|
-
},
|
5215
|
-
...makeComponentProps()
|
5216
|
-
},
|
5227
|
+
props: makeVBtnProps({
|
5228
|
+
icon: '$menu',
|
5229
|
+
variant: 'text'
|
5230
|
+
}),
|
5217
5231
|
setup(props, _ref) {
|
5218
5232
|
let {
|
5219
5233
|
slots
|
5220
5234
|
} = _ref;
|
5221
|
-
useRender(() => createVNode(VBtn, {
|
5222
|
-
"class": ['v-app-bar-nav-icon'
|
5223
|
-
|
5224
|
-
"style": props.style
|
5225
|
-
}, slots));
|
5235
|
+
useRender(() => createVNode(VBtn, mergeProps(props, {
|
5236
|
+
"class": ['v-app-bar-nav-icon']
|
5237
|
+
}), slots));
|
5226
5238
|
return {};
|
5227
5239
|
}
|
5228
5240
|
});
|
@@ -6425,7 +6437,7 @@ const VTextField = genericComponent()({
|
|
6425
6437
|
const vInputRef = ref();
|
6426
6438
|
const vFieldRef = ref();
|
6427
6439
|
const inputRef = ref();
|
6428
|
-
const isActive = computed(() => activeTypes.includes(props.type) || props.persistentPlaceholder || isFocused.value);
|
6440
|
+
const isActive = computed(() => activeTypes.includes(props.type) || props.persistentPlaceholder || isFocused.value || props.active);
|
6429
6441
|
function onFocus() {
|
6430
6442
|
if (inputRef.value !== document.activeElement) {
|
6431
6443
|
inputRef.value?.focus();
|
@@ -6861,7 +6873,6 @@ const VCheckboxBtn = genericComponent()({
|
|
6861
6873
|
"class": ['v-checkbox-btn', props.class],
|
6862
6874
|
"style": props.style,
|
6863
6875
|
"type": "checkbox",
|
6864
|
-
"inline": true,
|
6865
6876
|
"falseIcon": falseIcon.value,
|
6866
6877
|
"trueIcon": trueIcon.value,
|
6867
6878
|
"aria-checked": props.indeterminate ? 'mixed' : undefined
|
@@ -7816,7 +7827,9 @@ const VListGroupActivator = defineComponent({
|
|
7816
7827
|
}
|
7817
7828
|
});
|
7818
7829
|
const makeVListGroupProps = propsFactory({
|
7830
|
+
/* @deprecated */
|
7819
7831
|
activeColor: String,
|
7832
|
+
baseColor: String,
|
7820
7833
|
color: String,
|
7821
7834
|
collapseIcon: {
|
7822
7835
|
type: IconValue,
|
@@ -7867,6 +7880,7 @@ const VListGroup = genericComponent()({
|
|
7867
7880
|
VListItem: {
|
7868
7881
|
active: isOpen.value,
|
7869
7882
|
activeColor: props.activeColor,
|
7883
|
+
baseColor: props.baseColor,
|
7870
7884
|
color: props.color,
|
7871
7885
|
prependIcon: props.prependIcon || props.subgroup && toggleIcon.value,
|
7872
7886
|
appendIcon: props.appendIcon || !props.subgroup && toggleIcon.value,
|
@@ -7926,9 +7940,11 @@ const VListItem = genericComponent()({
|
|
7926
7940
|
default: undefined
|
7927
7941
|
},
|
7928
7942
|
activeClass: String,
|
7943
|
+
/* @deprecated */
|
7929
7944
|
activeColor: String,
|
7930
7945
|
appendAvatar: String,
|
7931
7946
|
appendIcon: IconValue,
|
7947
|
+
baseColor: String,
|
7932
7948
|
disabled: Boolean,
|
7933
7949
|
lines: String,
|
7934
7950
|
link: {
|
@@ -7985,8 +8001,9 @@ const VListItem = genericComponent()({
|
|
7985
8001
|
const isLink = computed(() => props.link !== false && link.isLink.value);
|
7986
8002
|
const isClickable = computed(() => !props.disabled && props.link !== false && (props.link || link.isClickable.value || props.value != null && !!list));
|
7987
8003
|
const roundedProps = computed(() => props.rounded || props.nav);
|
8004
|
+
const color = computed(() => props.color ?? props.activeColor);
|
7988
8005
|
const variantProps = computed(() => ({
|
7989
|
-
color: isActive.value ?
|
8006
|
+
color: isActive.value ? color.value ?? props.baseColor : props.baseColor,
|
7990
8007
|
variant: props.variant
|
7991
8008
|
}));
|
7992
8009
|
watch(() => link.isActive?.value, val => {
|
@@ -8043,7 +8060,6 @@ const VListItem = genericComponent()({
|
|
8043
8060
|
}
|
8044
8061
|
useRender(() => {
|
8045
8062
|
const Tag = isLink.value ? 'a' : props.tag;
|
8046
|
-
const hasColor = !list || isSelected.value || isActive.value;
|
8047
8063
|
const hasTitle = slots.title || props.title;
|
8048
8064
|
const hasSubtitle = slots.subtitle || props.subtitle;
|
8049
8065
|
const hasAppendMedia = !!(props.appendAvatar || props.appendIcon);
|
@@ -8051,6 +8067,9 @@ const VListItem = genericComponent()({
|
|
8051
8067
|
const hasPrependMedia = !!(props.prependAvatar || props.prependIcon);
|
8052
8068
|
const hasPrepend = !!(hasPrependMedia || slots.prepend);
|
8053
8069
|
list?.updateHasPrepend(hasPrepend);
|
8070
|
+
if (props.activeColor) {
|
8071
|
+
deprecate('active-color', ['color', 'base-color']);
|
8072
|
+
}
|
8054
8073
|
return withDirectives(createVNode(Tag, {
|
8055
8074
|
"class": ['v-list-item', {
|
8056
8075
|
'v-list-item--active': isActive.value,
|
@@ -8059,8 +8078,8 @@ const VListItem = genericComponent()({
|
|
8059
8078
|
'v-list-item--nav': props.nav,
|
8060
8079
|
'v-list-item--prepend': !hasPrepend && list?.hasPrepend.value,
|
8061
8080
|
[`${props.activeClass}`]: props.activeClass && isActive.value
|
8062
|
-
}, themeClasses.value, borderClasses.value,
|
8063
|
-
"style": [
|
8081
|
+
}, themeClasses.value, borderClasses.value, colorClasses.value, densityClasses.value, elevationClasses.value, lineClasses.value, roundedClasses.value, variantClasses.value, props.class],
|
8082
|
+
"style": [colorStyles.value, dimensionStyles.value, props.style],
|
8064
8083
|
"href": link.href.value,
|
8065
8084
|
"tabindex": isClickable.value ? 0 : undefined,
|
8066
8085
|
"onClick": onClick,
|
@@ -8379,6 +8398,8 @@ function useListItems(props) {
|
|
8379
8398
|
const VList = genericComponent()({
|
8380
8399
|
name: 'VList',
|
8381
8400
|
props: {
|
8401
|
+
baseColor: String,
|
8402
|
+
/* @deprecated */
|
8382
8403
|
activeColor: String,
|
8383
8404
|
activeClass: String,
|
8384
8405
|
bgColor: String,
|
@@ -8450,16 +8471,19 @@ const VList = genericComponent()({
|
|
8450
8471
|
} = useNested(props);
|
8451
8472
|
const lineClasses = computed(() => props.lines ? `v-list--${props.lines}-line` : undefined);
|
8452
8473
|
const activeColor = toRef(props, 'activeColor');
|
8474
|
+
const baseColor = toRef(props, 'baseColor');
|
8453
8475
|
const color = toRef(props, 'color');
|
8454
8476
|
createList();
|
8455
8477
|
provideDefaults({
|
8456
8478
|
VListGroup: {
|
8457
8479
|
activeColor,
|
8480
|
+
baseColor,
|
8458
8481
|
color
|
8459
8482
|
},
|
8460
8483
|
VListItem: {
|
8461
8484
|
activeClass: toRef(props, 'activeClass'),
|
8462
8485
|
activeColor,
|
8486
|
+
baseColor,
|
8463
8487
|
color,
|
8464
8488
|
density: toRef(props, 'density'),
|
8465
8489
|
disabled: toRef(props, 'disabled'),
|
@@ -9480,14 +9504,14 @@ const parseDisplayOptions = function () {
|
|
9480
9504
|
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultDisplayOptions;
|
9481
9505
|
return mergeDeep(defaultDisplayOptions, options);
|
9482
9506
|
};
|
9483
|
-
function getClientWidth(
|
9484
|
-
return IN_BROWSER && !
|
9507
|
+
function getClientWidth(ssr) {
|
9508
|
+
return IN_BROWSER && !ssr ? window.innerWidth : typeof ssr === 'object' && ssr.clientWidth || 0;
|
9485
9509
|
}
|
9486
|
-
function getClientHeight(
|
9487
|
-
return IN_BROWSER && !
|
9510
|
+
function getClientHeight(ssr) {
|
9511
|
+
return IN_BROWSER && !ssr ? window.innerHeight : typeof ssr === 'object' && ssr.clientHeight || 0;
|
9488
9512
|
}
|
9489
|
-
function getPlatform(
|
9490
|
-
const userAgent = IN_BROWSER && !
|
9513
|
+
function getPlatform(ssr) {
|
9514
|
+
const userAgent = IN_BROWSER && !ssr ? window.navigator.userAgent : 'ssr';
|
9491
9515
|
function match(regexp) {
|
9492
9516
|
return Boolean(userAgent.match(regexp));
|
9493
9517
|
}
|
@@ -10360,11 +10384,13 @@ const VSelect = genericComponent()({
|
|
10360
10384
|
let {
|
10361
10385
|
isSelected
|
10362
10386
|
} = _ref2;
|
10363
|
-
return props.multiple && !props.hideSelected ? createVNode(VCheckboxBtn, {
|
10387
|
+
return createVNode(Fragment, null, [props.multiple && !props.hideSelected ? createVNode(VCheckboxBtn, {
|
10364
10388
|
"modelValue": isSelected,
|
10365
10389
|
"ripple": false,
|
10366
10390
|
"tabindex": "-1"
|
10367
|
-
}, null) : undefined
|
10391
|
+
}, null) : undefined, item.props.prependIcon && createVNode(VIcon, {
|
10392
|
+
"icon": item.props.prependIcon
|
10393
|
+
}, null)]);
|
10368
10394
|
}
|
10369
10395
|
});
|
10370
10396
|
}), slots['append-item']?.()]
|
@@ -10377,6 +10403,10 @@ const VSelect = genericComponent()({
|
|
10377
10403
|
}
|
10378
10404
|
const slotProps = {
|
10379
10405
|
'onClick:close': onChipClose,
|
10406
|
+
onMousedown(e) {
|
10407
|
+
e.preventDefault();
|
10408
|
+
e.stopPropagation();
|
10409
|
+
},
|
10380
10410
|
modelValue: true,
|
10381
10411
|
'onUpdate:modelValue': undefined
|
10382
10412
|
};
|
@@ -10799,11 +10829,13 @@ const VAutocomplete = genericComponent()({
|
|
10799
10829
|
let {
|
10800
10830
|
isSelected
|
10801
10831
|
} = _ref2;
|
10802
|
-
return props.multiple && !props.hideSelected ? createVNode(VCheckboxBtn, {
|
10832
|
+
return createVNode(Fragment, null, [props.multiple && !props.hideSelected ? createVNode(VCheckboxBtn, {
|
10803
10833
|
"modelValue": isSelected,
|
10804
10834
|
"ripple": false,
|
10805
10835
|
"tabindex": "-1"
|
10806
|
-
}, null) : undefined
|
10836
|
+
}, null) : undefined, item.props.prependIcon && createVNode(VIcon, {
|
10837
|
+
"icon": item.props.prependIcon
|
10838
|
+
}, null)]);
|
10807
10839
|
},
|
10808
10840
|
title: () => {
|
10809
10841
|
return isPristine.value ? item.title : highlightResult$1(item.title, getMatches(item)?.title, search.value?.length ?? 0);
|
@@ -10818,6 +10850,10 @@ const VAutocomplete = genericComponent()({
|
|
10818
10850
|
}
|
10819
10851
|
const slotProps = {
|
10820
10852
|
'onClick:close': onChipClose,
|
10853
|
+
onMousedown(e) {
|
10854
|
+
e.preventDefault();
|
10855
|
+
e.stopPropagation();
|
10856
|
+
},
|
10821
10857
|
modelValue: true,
|
10822
10858
|
'onUpdate:modelValue': undefined
|
10823
10859
|
};
|
@@ -12418,27 +12454,6 @@ const VColorPickerCanvas = defineComponent({
|
|
12418
12454
|
|
12419
12455
|
// Types
|
12420
12456
|
|
12421
|
-
function has(obj, key) {
|
12422
|
-
return key.every(k => obj.hasOwnProperty(k));
|
12423
|
-
}
|
12424
|
-
function parseColor(color) {
|
12425
|
-
if (!color) return null;
|
12426
|
-
let hsva = null;
|
12427
|
-
if (typeof color === 'string') {
|
12428
|
-
const hex = parseHex(color);
|
12429
|
-
hsva = HexToHSV(hex);
|
12430
|
-
}
|
12431
|
-
if (typeof color === 'object') {
|
12432
|
-
if (has(color, ['r', 'g', 'b'])) {
|
12433
|
-
hsva = RGBtoHSV(color);
|
12434
|
-
} else if (has(color, ['h', 's', 'l'])) {
|
12435
|
-
hsva = HSLtoHSV(color);
|
12436
|
-
} else if (has(color, ['h', 's', 'v'])) {
|
12437
|
-
hsva = color;
|
12438
|
-
}
|
12439
|
-
}
|
12440
|
-
return hsva;
|
12441
|
-
}
|
12442
12457
|
function stripAlpha(color, stripAlpha) {
|
12443
12458
|
if (stripAlpha) {
|
12444
12459
|
const {
|
@@ -13780,13 +13795,15 @@ const VColorPickerSwatches = defineComponent({
|
|
13780
13795
|
}, [createVNode("div", null, [props.swatches.map(swatch => createVNode("div", {
|
13781
13796
|
"class": "v-color-picker-swatches__swatch"
|
13782
13797
|
}, [swatch.map(color => {
|
13783
|
-
const
|
13798
|
+
const rgba = parseColor(color);
|
13799
|
+
const hsva = RGBtoHSV(rgba);
|
13800
|
+
const background = RGBtoCSS(rgba);
|
13784
13801
|
return createVNode("div", {
|
13785
13802
|
"class": "v-color-picker-swatches__color",
|
13786
13803
|
"onClick": () => hsva && emit('update:color', hsva)
|
13787
13804
|
}, [createVNode("div", {
|
13788
13805
|
"style": {
|
13789
|
-
background
|
13806
|
+
background
|
13790
13807
|
}
|
13791
13808
|
}, [props.color && deepEqual(props.color, hsva) ? createVNode(VIcon, {
|
13792
13809
|
"size": "x-small",
|
@@ -13846,8 +13863,13 @@ const VColorPicker = defineComponent({
|
|
13846
13863
|
const mode = useProxiedModel(props, 'mode');
|
13847
13864
|
const lastPickedColor = ref(null);
|
13848
13865
|
const currentColor = useProxiedModel(props, 'modelValue', undefined, v => {
|
13849
|
-
let c
|
13850
|
-
|
13866
|
+
let c;
|
13867
|
+
try {
|
13868
|
+
c = RGBtoHSV(parseColor(v));
|
13869
|
+
} catch (err) {
|
13870
|
+
consoleWarn(err);
|
13871
|
+
return null;
|
13872
|
+
}
|
13851
13873
|
if (lastPickedColor.value) {
|
13852
13874
|
c = {
|
13853
13875
|
...c,
|
@@ -14244,11 +14266,13 @@ const VCombobox = genericComponent()({
|
|
14244
14266
|
let {
|
14245
14267
|
isSelected
|
14246
14268
|
} = _ref2;
|
14247
|
-
return props.multiple && !props.hideSelected ? createVNode(VCheckboxBtn, {
|
14269
|
+
return createVNode(Fragment, null, [props.multiple && !props.hideSelected ? createVNode(VCheckboxBtn, {
|
14248
14270
|
"modelValue": isSelected,
|
14249
14271
|
"ripple": false,
|
14250
14272
|
"tabindex": "-1"
|
14251
|
-
}, null) : undefined
|
14273
|
+
}, null) : undefined, item.props.prependIcon && createVNode(VIcon, {
|
14274
|
+
"icon": item.props.prependIcon
|
14275
|
+
}, null)]);
|
14252
14276
|
},
|
14253
14277
|
title: () => {
|
14254
14278
|
return isPristine.value ? item.title : highlightResult(item.title, getMatches(item)?.title, search.value?.length ?? 0);
|
@@ -14263,6 +14287,10 @@ const VCombobox = genericComponent()({
|
|
14263
14287
|
}
|
14264
14288
|
const slotProps = {
|
14265
14289
|
'onClick:close': onChipClose,
|
14290
|
+
onMousedown(e) {
|
14291
|
+
e.preventDefault();
|
14292
|
+
e.stopPropagation();
|
14293
|
+
},
|
14266
14294
|
modelValue: true,
|
14267
14295
|
'onUpdate:modelValue': undefined
|
14268
14296
|
};
|
@@ -14726,6 +14754,7 @@ const VFileInput = genericComponent()({
|
|
14726
14754
|
const vInputRef = ref();
|
14727
14755
|
const vFieldRef = ref();
|
14728
14756
|
const inputRef = ref();
|
14757
|
+
const isActive = computed(() => isFocused.value || props.active);
|
14729
14758
|
function onFocus() {
|
14730
14759
|
if (inputRef.value !== document.activeElement) {
|
14731
14760
|
inputRef.value?.focus();
|
@@ -14794,7 +14823,7 @@ const VFileInput = genericComponent()({
|
|
14794
14823
|
"onClick:appendInner": props['onClick:appendInner']
|
14795
14824
|
}, fieldProps, {
|
14796
14825
|
"id": id.value,
|
14797
|
-
"active":
|
14826
|
+
"active": isActive.value || isDirty.value,
|
14798
14827
|
"dirty": isDirty.value,
|
14799
14828
|
"disabled": isDisabled.value,
|
14800
14829
|
"focused": isFocused.value,
|
@@ -15960,7 +15989,6 @@ const VNavigationDrawer = genericComponent()({
|
|
15960
15989
|
});
|
15961
15990
|
const {
|
15962
15991
|
layoutItemStyles,
|
15963
|
-
layoutRect,
|
15964
15992
|
layoutItemScrimStyles
|
15965
15993
|
} = useLayoutItem({
|
15966
15994
|
id: props.name,
|
@@ -15990,12 +16018,6 @@ const VNavigationDrawer = genericComponent()({
|
|
15990
16018
|
opacity: dragProgress.value * 0.2,
|
15991
16019
|
transition: 'none'
|
15992
16020
|
} : undefined),
|
15993
|
-
...(layoutRect.value ? {
|
15994
|
-
left: convertToUnit(layoutRect.value.left),
|
15995
|
-
right: convertToUnit(layoutRect.value.right),
|
15996
|
-
top: convertToUnit(layoutRect.value.top),
|
15997
|
-
bottom: convertToUnit(layoutRect.value.bottom)
|
15998
|
-
} : undefined),
|
15999
16021
|
...layoutItemScrimStyles.value
|
16000
16022
|
}));
|
16001
16023
|
provideDefaults({
|
@@ -17959,7 +17981,7 @@ const VTextarea = genericComponent()({
|
|
17959
17981
|
const vFieldRef = ref();
|
17960
17982
|
const controlHeight = ref('');
|
17961
17983
|
const textareaRef = ref();
|
17962
|
-
const isActive = computed(() => isFocused.value || props.
|
17984
|
+
const isActive = computed(() => props.persistentPlaceholder || isFocused.value || props.active);
|
17963
17985
|
function onFocus() {
|
17964
17986
|
if (textareaRef.value !== document.activeElement) {
|
17965
17987
|
textareaRef.value?.focus();
|
@@ -19415,7 +19437,7 @@ function createVuetify$1() {
|
|
19415
19437
|
date
|
19416
19438
|
};
|
19417
19439
|
}
|
19418
|
-
const version$1 = "4.0.0-dev-
|
19440
|
+
const version$1 = "4.0.0-dev-20230511.0";
|
19419
19441
|
createVuetify$1.version = version$1;
|
19420
19442
|
|
19421
19443
|
// Vue's inject() can only be used in setup
|
@@ -19435,7 +19457,7 @@ const createVuetify = function () {
|
|
19435
19457
|
...options
|
19436
19458
|
});
|
19437
19459
|
};
|
19438
|
-
const version = "4.0.0-dev-
|
19460
|
+
const version = "4.0.0-dev-20230511.0";
|
19439
19461
|
createVuetify.version = version;
|
19440
19462
|
|
19441
19463
|
export { components, createVuetify, directives, useDefaults, useDisplay, useLayout, useLocale, useRtl, useTheme, version };
|