@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-labs.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, withModifiers } 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;
|
@@ -1718,7 +1734,7 @@ function createTheme(options) {
|
|
1718
1734
|
for (const variation of ['lighten', 'darken']) {
|
1719
1735
|
const fn = variation === 'lighten' ? lighten : darken;
|
1720
1736
|
for (const amount of createRange(parsedOptions.variations[variation], 1)) {
|
1721
|
-
theme.colors[`${name}-${variation}-${amount}`] = RGBtoHex(fn(parseColor
|
1737
|
+
theme.colors[`${name}-${variation}-${amount}`] = RGBtoHex(fn(parseColor(color), amount));
|
1722
1738
|
}
|
1723
1739
|
}
|
1724
1740
|
}
|
@@ -1726,9 +1742,9 @@ function createTheme(options) {
|
|
1726
1742
|
for (const color of Object.keys(theme.colors)) {
|
1727
1743
|
if (/^on-[a-z]/.test(color) || theme.colors[`on-${color}`]) continue;
|
1728
1744
|
const onColor = `on-${color}`;
|
1729
|
-
const colorVal = parseColor
|
1730
|
-
const blackContrast = Math.abs(APCAcontrast(parseColor
|
1731
|
-
const whiteContrast = Math.abs(APCAcontrast(parseColor
|
1745
|
+
const colorVal = parseColor(theme.colors[color]);
|
1746
|
+
const blackContrast = Math.abs(APCAcontrast(parseColor(0), colorVal));
|
1747
|
+
const whiteContrast = Math.abs(APCAcontrast(parseColor(0xffffff), colorVal));
|
1732
1748
|
|
1733
1749
|
// TODO: warn about poor color selections
|
1734
1750
|
// const contrastAsText = Math.abs(APCAcontrast(colorVal, colorToInt(theme.colors.background)))
|
@@ -1860,14 +1876,14 @@ function genCssVariables(theme) {
|
|
1860
1876
|
const darkOverlay = theme.dark ? 1 : 2;
|
1861
1877
|
const variables = [];
|
1862
1878
|
for (const [key, value] of Object.entries(theme.colors)) {
|
1863
|
-
const rgb = parseColor
|
1879
|
+
const rgb = parseColor(value);
|
1864
1880
|
variables.push(`--v-theme-${key}: ${rgb.r},${rgb.g},${rgb.b}`);
|
1865
1881
|
if (!key.startsWith('on-')) {
|
1866
1882
|
variables.push(`--v-theme-${key}-overlay-multiplier: ${getLuma(value) > 0.18 ? lightOverlay : darkOverlay}`);
|
1867
1883
|
}
|
1868
1884
|
}
|
1869
1885
|
for (const [key, value] of Object.entries(theme.variables)) {
|
1870
|
-
const color = typeof value === 'string' && value.startsWith('#') ? parseColor
|
1886
|
+
const color = typeof value === 'string' && value.startsWith('#') ? parseColor(value) : undefined;
|
1871
1887
|
const rgb = color ? `${color.r}, ${color.g}, ${color.b}` : undefined;
|
1872
1888
|
variables.push(`--v-${key}: ${rgb ?? value}`);
|
1873
1889
|
}
|
@@ -2640,14 +2656,16 @@ function useAspectStyles(props) {
|
|
2640
2656
|
})
|
2641
2657
|
};
|
2642
2658
|
}
|
2659
|
+
const makeVResponsiveProps = propsFactory({
|
2660
|
+
aspectRatio: [String, Number],
|
2661
|
+
contentClass: String,
|
2662
|
+
inline: Boolean,
|
2663
|
+
...makeComponentProps(),
|
2664
|
+
...makeDimensionProps()
|
2665
|
+
}, 'v-responsive');
|
2643
2666
|
const VResponsive = genericComponent()({
|
2644
2667
|
name: 'VResponsive',
|
2645
|
-
props:
|
2646
|
-
aspectRatio: [String, Number],
|
2647
|
-
contentClass: String,
|
2648
|
-
...makeComponentProps(),
|
2649
|
-
...makeDimensionProps()
|
2650
|
-
},
|
2668
|
+
props: makeVResponsiveProps(),
|
2651
2669
|
setup(props, _ref) {
|
2652
2670
|
let {
|
2653
2671
|
slots
|
@@ -2659,7 +2677,9 @@ const VResponsive = genericComponent()({
|
|
2659
2677
|
dimensionStyles
|
2660
2678
|
} = useDimension(props);
|
2661
2679
|
useRender(() => createVNode("div", {
|
2662
|
-
"class": ['v-responsive',
|
2680
|
+
"class": ['v-responsive', {
|
2681
|
+
'v-responsive--inline': props.inline
|
2682
|
+
}, props.class],
|
2663
2683
|
"style": [dimensionStyles.value, props.style]
|
2664
2684
|
}, [createVNode("div", {
|
2665
2685
|
"class": "v-responsive__sizer",
|
@@ -2755,7 +2775,6 @@ const VImg = genericComponent()({
|
|
2755
2775
|
intersect: Intersect
|
2756
2776
|
},
|
2757
2777
|
props: {
|
2758
|
-
aspectRatio: [String, Number],
|
2759
2778
|
alt: String,
|
2760
2779
|
cover: Boolean,
|
2761
2780
|
eager: Boolean,
|
@@ -2777,7 +2796,7 @@ const VImg = genericComponent()({
|
|
2777
2796
|
default: ''
|
2778
2797
|
},
|
2779
2798
|
srcset: String,
|
2780
|
-
|
2799
|
+
...makeVResponsiveProps(),
|
2781
2800
|
...makeComponentProps(),
|
2782
2801
|
...makeTransitionProps()
|
2783
2802
|
},
|
@@ -2963,25 +2982,27 @@ const VImg = genericComponent()({
|
|
2963
2982
|
}
|
2964
2983
|
});
|
2965
2984
|
}
|
2966
|
-
useRender(() =>
|
2967
|
-
|
2968
|
-
|
2969
|
-
|
2970
|
-
|
2971
|
-
|
2972
|
-
|
2973
|
-
|
2974
|
-
|
2975
|
-
|
2976
|
-
|
2977
|
-
|
2978
|
-
|
2979
|
-
|
2980
|
-
|
2981
|
-
|
2982
|
-
|
2983
|
-
|
2984
|
-
|
2985
|
+
useRender(() => {
|
2986
|
+
const [responsiveProps] = VResponsive.filterProps(props);
|
2987
|
+
return withDirectives(createVNode(VResponsive, mergeProps({
|
2988
|
+
"class": ['v-img', {
|
2989
|
+
'v-img--booting': !isBooted.value
|
2990
|
+
}, props.class],
|
2991
|
+
"style": props.style
|
2992
|
+
}, responsiveProps, {
|
2993
|
+
"aspectRatio": aspectRatio.value,
|
2994
|
+
"aria-label": props.alt,
|
2995
|
+
"role": props.alt ? 'img' : undefined
|
2996
|
+
}), {
|
2997
|
+
additional: () => createVNode(Fragment, null, [createVNode(__image, null, null), createVNode(__preloadImage, null, null), createVNode(__gradient, null, null), createVNode(__placeholder, null, null), createVNode(__error, null, null)]),
|
2998
|
+
default: slots.default
|
2999
|
+
}), [[resolveDirective("intersect"), {
|
3000
|
+
handler: init,
|
3001
|
+
options: props.options
|
3002
|
+
}, null, {
|
3003
|
+
once: true
|
3004
|
+
}]]);
|
3005
|
+
});
|
2985
3006
|
return {
|
2986
3007
|
currentSrc,
|
2987
3008
|
image,
|
@@ -3328,14 +3349,13 @@ const makeScrollProps = propsFactory({
|
|
3328
3349
|
type: String
|
3329
3350
|
},
|
3330
3351
|
scrollThreshold: {
|
3331
|
-
type: [String, Number]
|
3352
|
+
type: [String, Number],
|
3353
|
+
default: 300
|
3332
3354
|
}
|
3333
3355
|
}, 'scroll');
|
3334
3356
|
function useScroll(props) {
|
3335
3357
|
let args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
3336
3358
|
const {
|
3337
|
-
thresholdMetCallback,
|
3338
|
-
scrollThreshold,
|
3339
3359
|
canScroll
|
3340
3360
|
} = args;
|
3341
3361
|
let previousScroll = 0;
|
@@ -3345,8 +3365,16 @@ function useScroll(props) {
|
|
3345
3365
|
const currentThreshold = ref(0);
|
3346
3366
|
const isScrollActive = ref(false);
|
3347
3367
|
const isScrollingUp = ref(false);
|
3348
|
-
const
|
3349
|
-
return Number(props.scrollThreshold
|
3368
|
+
const scrollThreshold = computed(() => {
|
3369
|
+
return Number(props.scrollThreshold);
|
3370
|
+
});
|
3371
|
+
|
3372
|
+
/**
|
3373
|
+
* 1: at top
|
3374
|
+
* 0: at threshold
|
3375
|
+
*/
|
3376
|
+
const scrollRatio = computed(() => {
|
3377
|
+
return clamp((scrollThreshold.value - currentScroll.value) / scrollThreshold.value || 0);
|
3350
3378
|
});
|
3351
3379
|
const onScroll = () => {
|
3352
3380
|
const targetEl = target.value;
|
@@ -3354,7 +3382,7 @@ function useScroll(props) {
|
|
3354
3382
|
previousScroll = currentScroll.value;
|
3355
3383
|
currentScroll.value = 'window' in targetEl ? targetEl.pageYOffset : targetEl.scrollTop;
|
3356
3384
|
isScrollingUp.value = currentScroll.value < previousScroll;
|
3357
|
-
currentThreshold.value = Math.abs(currentScroll.value -
|
3385
|
+
currentThreshold.value = Math.abs(currentScroll.value - scrollThreshold.value);
|
3358
3386
|
};
|
3359
3387
|
watch(isScrollingUp, () => {
|
3360
3388
|
savedScroll.value = savedScroll.value || currentScroll.value;
|
@@ -3366,7 +3394,7 @@ function useScroll(props) {
|
|
3366
3394
|
watch(() => props.scrollTarget, scrollTarget => {
|
3367
3395
|
const newTarget = scrollTarget ? document.querySelector(scrollTarget) : window;
|
3368
3396
|
if (!newTarget) {
|
3369
|
-
consoleWarn(`Unable to locate element with identifier ${scrollTarget}
|
3397
|
+
consoleWarn(`Unable to locate element with identifier ${scrollTarget}`);
|
3370
3398
|
return;
|
3371
3399
|
}
|
3372
3400
|
if (newTarget === target.value) return;
|
@@ -3382,15 +3410,6 @@ function useScroll(props) {
|
|
3382
3410
|
onBeforeUnmount(() => {
|
3383
3411
|
target.value?.removeEventListener('scroll', onScroll);
|
3384
3412
|
});
|
3385
|
-
thresholdMetCallback && watch(() => Math.abs(currentScroll.value - savedScroll.value) > computedScrollThreshold.value, thresholdMet => {
|
3386
|
-
thresholdMet && thresholdMetCallback({
|
3387
|
-
currentThreshold: currentThreshold.value,
|
3388
|
-
isScrollingUp: isScrollingUp.value,
|
3389
|
-
savedScroll
|
3390
|
-
});
|
3391
|
-
}, {
|
3392
|
-
immediate: true
|
3393
|
-
});
|
3394
3413
|
|
3395
3414
|
// Do we need this? If yes - seems that
|
3396
3415
|
// there's no need to expose onScroll
|
@@ -3398,10 +3417,11 @@ function useScroll(props) {
|
|
3398
3417
|
immediate: true
|
3399
3418
|
});
|
3400
3419
|
return {
|
3401
|
-
|
3420
|
+
scrollThreshold,
|
3402
3421
|
currentScroll,
|
3403
3422
|
currentThreshold,
|
3404
3423
|
isScrollActive,
|
3424
|
+
scrollRatio,
|
3405
3425
|
// required only for testing
|
3406
3426
|
// probably can be removed
|
3407
3427
|
// later (2 chars chlng)
|
@@ -3484,15 +3504,14 @@ const VAppBar = genericComponent()({
|
|
3484
3504
|
});
|
3485
3505
|
const {
|
3486
3506
|
currentScroll,
|
3487
|
-
|
3488
|
-
|
3489
|
-
|
3507
|
+
scrollThreshold,
|
3508
|
+
isScrollingUp,
|
3509
|
+
scrollRatio
|
3490
3510
|
} = useScroll(props, {
|
3491
3511
|
canScroll
|
3492
3512
|
});
|
3493
|
-
const isCollapsed = computed(() => props.collapse || scrollBehavior.value.collapse && (scrollBehavior.value.inverted ?
|
3494
|
-
const isFlat = computed(() => props.flat || scrollBehavior.value.elevate &&
|
3495
|
-
const scrollRatio = computed(() => Math.min((currentThreshold.value - currentScroll.value) / currentThreshold.value || 1, 1));
|
3513
|
+
const isCollapsed = computed(() => props.collapse || scrollBehavior.value.collapse && (scrollBehavior.value.inverted ? scrollRatio.value > 0 : scrollRatio.value === 0));
|
3514
|
+
const isFlat = computed(() => props.flat || scrollBehavior.value.elevate && (scrollBehavior.value.inverted ? currentScroll.value > 0 : currentScroll.value === 0));
|
3496
3515
|
const opacity = computed(() => scrollBehavior.value.fadeImage ? scrollBehavior.value.inverted ? 1 - scrollRatio.value : scrollRatio.value : undefined);
|
3497
3516
|
const height = computed(() => {
|
3498
3517
|
if (scrollBehavior.value.hide && scrollBehavior.value.inverted) return 0;
|
@@ -3501,15 +3520,12 @@ const VAppBar = genericComponent()({
|
|
3501
3520
|
return height + extensionHeight;
|
3502
3521
|
});
|
3503
3522
|
function setActive() {
|
3504
|
-
const val = currentScroll.value;
|
3505
3523
|
if (scrollBehavior.value.hide) {
|
3506
3524
|
if (scrollBehavior.value.inverted) {
|
3507
|
-
isActive.value =
|
3525
|
+
isActive.value = currentScroll.value > scrollThreshold.value;
|
3508
3526
|
} else {
|
3509
|
-
isActive.value = isScrollingUp.value ||
|
3527
|
+
isActive.value = isScrollingUp.value || currentScroll.value < scrollThreshold.value;
|
3510
3528
|
}
|
3511
|
-
} else if (scrollBehavior.value.inverted) {
|
3512
|
-
isActive.value = currentScroll.value === 0;
|
3513
3529
|
} else {
|
3514
3530
|
isActive.value = true;
|
3515
3531
|
}
|
@@ -5049,7 +5065,7 @@ const makeVBtnProps = propsFactory({
|
|
5049
5065
|
...makeVariantProps({
|
5050
5066
|
variant: 'elevated'
|
5051
5067
|
})
|
5052
|
-
}, '
|
5068
|
+
}, 'v-btn');
|
5053
5069
|
const VBtn = genericComponent()({
|
5054
5070
|
name: 'VBtn',
|
5055
5071
|
directives: {
|
@@ -5119,6 +5135,11 @@ const VBtn = genericComponent()({
|
|
5119
5135
|
if (props.value === undefined) return undefined;
|
5120
5136
|
return Object(props.value) === props.value ? JSON.stringify(props.value, null, 0) : props.value;
|
5121
5137
|
});
|
5138
|
+
function onClick(e) {
|
5139
|
+
if (isDisabled.value) return;
|
5140
|
+
link.navigate?.(e);
|
5141
|
+
group?.toggle();
|
5142
|
+
}
|
5122
5143
|
useSelectLink(link, group?.select);
|
5123
5144
|
useRender(() => {
|
5124
5145
|
const Tag = link.isLink.value ? 'a' : props.tag;
|
@@ -5141,11 +5162,7 @@ const VBtn = genericComponent()({
|
|
5141
5162
|
"style": [hasColor ? colorStyles.value : undefined, dimensionStyles.value, locationStyles.value, sizeStyles.value, props.style],
|
5142
5163
|
"disabled": isDisabled.value || undefined,
|
5143
5164
|
"href": link.href.value,
|
5144
|
-
"onClick":
|
5145
|
-
if (isDisabled.value) return;
|
5146
|
-
link.navigate?.(e);
|
5147
|
-
group?.toggle();
|
5148
|
-
},
|
5165
|
+
"onClick": onClick,
|
5149
5166
|
"value": valueAttr.value
|
5150
5167
|
}, {
|
5151
5168
|
default: () => [genOverlays(true, 'v-btn'), !props.icon && hasPrepend && createVNode("span", {
|
@@ -5211,22 +5228,17 @@ const VBtn = genericComponent()({
|
|
5211
5228
|
|
5212
5229
|
const VAppBarNavIcon = genericComponent()({
|
5213
5230
|
name: 'VAppBarNavIcon',
|
5214
|
-
props: {
|
5215
|
-
icon:
|
5216
|
-
|
5217
|
-
|
5218
|
-
},
|
5219
|
-
...makeComponentProps()
|
5220
|
-
},
|
5231
|
+
props: makeVBtnProps({
|
5232
|
+
icon: '$menu',
|
5233
|
+
variant: 'text'
|
5234
|
+
}),
|
5221
5235
|
setup(props, _ref) {
|
5222
5236
|
let {
|
5223
5237
|
slots
|
5224
5238
|
} = _ref;
|
5225
|
-
useRender(() => createVNode(VBtn, {
|
5226
|
-
"class": ['v-app-bar-nav-icon'
|
5227
|
-
|
5228
|
-
"style": props.style
|
5229
|
-
}, slots));
|
5239
|
+
useRender(() => createVNode(VBtn, mergeProps(props, {
|
5240
|
+
"class": ['v-app-bar-nav-icon']
|
5241
|
+
}), slots));
|
5230
5242
|
return {};
|
5231
5243
|
}
|
5232
5244
|
});
|
@@ -6429,7 +6441,7 @@ const VTextField = genericComponent()({
|
|
6429
6441
|
const vInputRef = ref();
|
6430
6442
|
const vFieldRef = ref();
|
6431
6443
|
const inputRef = ref();
|
6432
|
-
const isActive = computed(() => activeTypes.includes(props.type) || props.persistentPlaceholder || isFocused.value);
|
6444
|
+
const isActive = computed(() => activeTypes.includes(props.type) || props.persistentPlaceholder || isFocused.value || props.active);
|
6433
6445
|
function onFocus() {
|
6434
6446
|
if (inputRef.value !== document.activeElement) {
|
6435
6447
|
inputRef.value?.focus();
|
@@ -6865,7 +6877,6 @@ const VCheckboxBtn = genericComponent()({
|
|
6865
6877
|
"class": ['v-checkbox-btn', props.class],
|
6866
6878
|
"style": props.style,
|
6867
6879
|
"type": "checkbox",
|
6868
|
-
"inline": true,
|
6869
6880
|
"falseIcon": falseIcon.value,
|
6870
6881
|
"trueIcon": trueIcon.value,
|
6871
6882
|
"aria-checked": props.indeterminate ? 'mixed' : undefined
|
@@ -7820,7 +7831,9 @@ const VListGroupActivator = defineComponent({
|
|
7820
7831
|
}
|
7821
7832
|
});
|
7822
7833
|
const makeVListGroupProps = propsFactory({
|
7834
|
+
/* @deprecated */
|
7823
7835
|
activeColor: String,
|
7836
|
+
baseColor: String,
|
7824
7837
|
color: String,
|
7825
7838
|
collapseIcon: {
|
7826
7839
|
type: IconValue,
|
@@ -7871,6 +7884,7 @@ const VListGroup = genericComponent()({
|
|
7871
7884
|
VListItem: {
|
7872
7885
|
active: isOpen.value,
|
7873
7886
|
activeColor: props.activeColor,
|
7887
|
+
baseColor: props.baseColor,
|
7874
7888
|
color: props.color,
|
7875
7889
|
prependIcon: props.prependIcon || props.subgroup && toggleIcon.value,
|
7876
7890
|
appendIcon: props.appendIcon || !props.subgroup && toggleIcon.value,
|
@@ -7930,9 +7944,11 @@ const VListItem = genericComponent()({
|
|
7930
7944
|
default: undefined
|
7931
7945
|
},
|
7932
7946
|
activeClass: String,
|
7947
|
+
/* @deprecated */
|
7933
7948
|
activeColor: String,
|
7934
7949
|
appendAvatar: String,
|
7935
7950
|
appendIcon: IconValue,
|
7951
|
+
baseColor: String,
|
7936
7952
|
disabled: Boolean,
|
7937
7953
|
lines: String,
|
7938
7954
|
link: {
|
@@ -7989,8 +8005,9 @@ const VListItem = genericComponent()({
|
|
7989
8005
|
const isLink = computed(() => props.link !== false && link.isLink.value);
|
7990
8006
|
const isClickable = computed(() => !props.disabled && props.link !== false && (props.link || link.isClickable.value || props.value != null && !!list));
|
7991
8007
|
const roundedProps = computed(() => props.rounded || props.nav);
|
8008
|
+
const color = computed(() => props.color ?? props.activeColor);
|
7992
8009
|
const variantProps = computed(() => ({
|
7993
|
-
color: isActive.value ?
|
8010
|
+
color: isActive.value ? color.value ?? props.baseColor : props.baseColor,
|
7994
8011
|
variant: props.variant
|
7995
8012
|
}));
|
7996
8013
|
watch(() => link.isActive?.value, val => {
|
@@ -8047,7 +8064,6 @@ const VListItem = genericComponent()({
|
|
8047
8064
|
}
|
8048
8065
|
useRender(() => {
|
8049
8066
|
const Tag = isLink.value ? 'a' : props.tag;
|
8050
|
-
const hasColor = !list || isSelected.value || isActive.value;
|
8051
8067
|
const hasTitle = slots.title || props.title;
|
8052
8068
|
const hasSubtitle = slots.subtitle || props.subtitle;
|
8053
8069
|
const hasAppendMedia = !!(props.appendAvatar || props.appendIcon);
|
@@ -8055,6 +8071,9 @@ const VListItem = genericComponent()({
|
|
8055
8071
|
const hasPrependMedia = !!(props.prependAvatar || props.prependIcon);
|
8056
8072
|
const hasPrepend = !!(hasPrependMedia || slots.prepend);
|
8057
8073
|
list?.updateHasPrepend(hasPrepend);
|
8074
|
+
if (props.activeColor) {
|
8075
|
+
deprecate('active-color', ['color', 'base-color']);
|
8076
|
+
}
|
8058
8077
|
return withDirectives(createVNode(Tag, {
|
8059
8078
|
"class": ['v-list-item', {
|
8060
8079
|
'v-list-item--active': isActive.value,
|
@@ -8063,8 +8082,8 @@ const VListItem = genericComponent()({
|
|
8063
8082
|
'v-list-item--nav': props.nav,
|
8064
8083
|
'v-list-item--prepend': !hasPrepend && list?.hasPrepend.value,
|
8065
8084
|
[`${props.activeClass}`]: props.activeClass && isActive.value
|
8066
|
-
}, themeClasses.value, borderClasses.value,
|
8067
|
-
"style": [
|
8085
|
+
}, themeClasses.value, borderClasses.value, colorClasses.value, densityClasses.value, elevationClasses.value, lineClasses.value, roundedClasses.value, variantClasses.value, props.class],
|
8086
|
+
"style": [colorStyles.value, dimensionStyles.value, props.style],
|
8068
8087
|
"href": link.href.value,
|
8069
8088
|
"tabindex": isClickable.value ? 0 : undefined,
|
8070
8089
|
"onClick": onClick,
|
@@ -8383,6 +8402,8 @@ function useListItems(props) {
|
|
8383
8402
|
const VList = genericComponent()({
|
8384
8403
|
name: 'VList',
|
8385
8404
|
props: {
|
8405
|
+
baseColor: String,
|
8406
|
+
/* @deprecated */
|
8386
8407
|
activeColor: String,
|
8387
8408
|
activeClass: String,
|
8388
8409
|
bgColor: String,
|
@@ -8454,16 +8475,19 @@ const VList = genericComponent()({
|
|
8454
8475
|
} = useNested(props);
|
8455
8476
|
const lineClasses = computed(() => props.lines ? `v-list--${props.lines}-line` : undefined);
|
8456
8477
|
const activeColor = toRef(props, 'activeColor');
|
8478
|
+
const baseColor = toRef(props, 'baseColor');
|
8457
8479
|
const color = toRef(props, 'color');
|
8458
8480
|
createList();
|
8459
8481
|
provideDefaults({
|
8460
8482
|
VListGroup: {
|
8461
8483
|
activeColor,
|
8484
|
+
baseColor,
|
8462
8485
|
color
|
8463
8486
|
},
|
8464
8487
|
VListItem: {
|
8465
8488
|
activeClass: toRef(props, 'activeClass'),
|
8466
8489
|
activeColor,
|
8490
|
+
baseColor,
|
8467
8491
|
color,
|
8468
8492
|
density: toRef(props, 'density'),
|
8469
8493
|
disabled: toRef(props, 'disabled'),
|
@@ -9484,14 +9508,14 @@ const parseDisplayOptions = function () {
|
|
9484
9508
|
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultDisplayOptions;
|
9485
9509
|
return mergeDeep(defaultDisplayOptions, options);
|
9486
9510
|
};
|
9487
|
-
function getClientWidth(
|
9488
|
-
return IN_BROWSER && !
|
9511
|
+
function getClientWidth(ssr) {
|
9512
|
+
return IN_BROWSER && !ssr ? window.innerWidth : typeof ssr === 'object' && ssr.clientWidth || 0;
|
9489
9513
|
}
|
9490
|
-
function getClientHeight(
|
9491
|
-
return IN_BROWSER && !
|
9514
|
+
function getClientHeight(ssr) {
|
9515
|
+
return IN_BROWSER && !ssr ? window.innerHeight : typeof ssr === 'object' && ssr.clientHeight || 0;
|
9492
9516
|
}
|
9493
|
-
function getPlatform(
|
9494
|
-
const userAgent = IN_BROWSER && !
|
9517
|
+
function getPlatform(ssr) {
|
9518
|
+
const userAgent = IN_BROWSER && !ssr ? window.navigator.userAgent : 'ssr';
|
9495
9519
|
function match(regexp) {
|
9496
9520
|
return Boolean(userAgent.match(regexp));
|
9497
9521
|
}
|
@@ -10364,11 +10388,13 @@ const VSelect = genericComponent()({
|
|
10364
10388
|
let {
|
10365
10389
|
isSelected
|
10366
10390
|
} = _ref2;
|
10367
|
-
return props.multiple && !props.hideSelected ? createVNode(VCheckboxBtn, {
|
10391
|
+
return createVNode(Fragment, null, [props.multiple && !props.hideSelected ? createVNode(VCheckboxBtn, {
|
10368
10392
|
"modelValue": isSelected,
|
10369
10393
|
"ripple": false,
|
10370
10394
|
"tabindex": "-1"
|
10371
|
-
}, null) : undefined
|
10395
|
+
}, null) : undefined, item.props.prependIcon && createVNode(VIcon, {
|
10396
|
+
"icon": item.props.prependIcon
|
10397
|
+
}, null)]);
|
10372
10398
|
}
|
10373
10399
|
});
|
10374
10400
|
}), slots['append-item']?.()]
|
@@ -10381,6 +10407,10 @@ const VSelect = genericComponent()({
|
|
10381
10407
|
}
|
10382
10408
|
const slotProps = {
|
10383
10409
|
'onClick:close': onChipClose,
|
10410
|
+
onMousedown(e) {
|
10411
|
+
e.preventDefault();
|
10412
|
+
e.stopPropagation();
|
10413
|
+
},
|
10384
10414
|
modelValue: true,
|
10385
10415
|
'onUpdate:modelValue': undefined
|
10386
10416
|
};
|
@@ -10803,11 +10833,13 @@ const VAutocomplete = genericComponent()({
|
|
10803
10833
|
let {
|
10804
10834
|
isSelected
|
10805
10835
|
} = _ref2;
|
10806
|
-
return props.multiple && !props.hideSelected ? createVNode(VCheckboxBtn, {
|
10836
|
+
return createVNode(Fragment, null, [props.multiple && !props.hideSelected ? createVNode(VCheckboxBtn, {
|
10807
10837
|
"modelValue": isSelected,
|
10808
10838
|
"ripple": false,
|
10809
10839
|
"tabindex": "-1"
|
10810
|
-
}, null) : undefined
|
10840
|
+
}, null) : undefined, item.props.prependIcon && createVNode(VIcon, {
|
10841
|
+
"icon": item.props.prependIcon
|
10842
|
+
}, null)]);
|
10811
10843
|
},
|
10812
10844
|
title: () => {
|
10813
10845
|
return isPristine.value ? item.title : highlightResult$1(item.title, getMatches(item)?.title, search.value?.length ?? 0);
|
@@ -10822,6 +10854,10 @@ const VAutocomplete = genericComponent()({
|
|
10822
10854
|
}
|
10823
10855
|
const slotProps = {
|
10824
10856
|
'onClick:close': onChipClose,
|
10857
|
+
onMousedown(e) {
|
10858
|
+
e.preventDefault();
|
10859
|
+
e.stopPropagation();
|
10860
|
+
},
|
10825
10861
|
modelValue: true,
|
10826
10862
|
'onUpdate:modelValue': undefined
|
10827
10863
|
};
|
@@ -12422,27 +12458,6 @@ const VColorPickerCanvas = defineComponent({
|
|
12422
12458
|
|
12423
12459
|
// Types
|
12424
12460
|
|
12425
|
-
function has(obj, key) {
|
12426
|
-
return key.every(k => obj.hasOwnProperty(k));
|
12427
|
-
}
|
12428
|
-
function parseColor(color) {
|
12429
|
-
if (!color) return null;
|
12430
|
-
let hsva = null;
|
12431
|
-
if (typeof color === 'string') {
|
12432
|
-
const hex = parseHex(color);
|
12433
|
-
hsva = HexToHSV(hex);
|
12434
|
-
}
|
12435
|
-
if (typeof color === 'object') {
|
12436
|
-
if (has(color, ['r', 'g', 'b'])) {
|
12437
|
-
hsva = RGBtoHSV(color);
|
12438
|
-
} else if (has(color, ['h', 's', 'l'])) {
|
12439
|
-
hsva = HSLtoHSV(color);
|
12440
|
-
} else if (has(color, ['h', 's', 'v'])) {
|
12441
|
-
hsva = color;
|
12442
|
-
}
|
12443
|
-
}
|
12444
|
-
return hsva;
|
12445
|
-
}
|
12446
12461
|
function stripAlpha(color, stripAlpha) {
|
12447
12462
|
if (stripAlpha) {
|
12448
12463
|
const {
|
@@ -13784,13 +13799,15 @@ const VColorPickerSwatches = defineComponent({
|
|
13784
13799
|
}, [createVNode("div", null, [props.swatches.map(swatch => createVNode("div", {
|
13785
13800
|
"class": "v-color-picker-swatches__swatch"
|
13786
13801
|
}, [swatch.map(color => {
|
13787
|
-
const
|
13802
|
+
const rgba = parseColor(color);
|
13803
|
+
const hsva = RGBtoHSV(rgba);
|
13804
|
+
const background = RGBtoCSS(rgba);
|
13788
13805
|
return createVNode("div", {
|
13789
13806
|
"class": "v-color-picker-swatches__color",
|
13790
13807
|
"onClick": () => hsva && emit('update:color', hsva)
|
13791
13808
|
}, [createVNode("div", {
|
13792
13809
|
"style": {
|
13793
|
-
background
|
13810
|
+
background
|
13794
13811
|
}
|
13795
13812
|
}, [props.color && deepEqual(props.color, hsva) ? createVNode(VIcon, {
|
13796
13813
|
"size": "x-small",
|
@@ -13850,8 +13867,13 @@ const VColorPicker = defineComponent({
|
|
13850
13867
|
const mode = useProxiedModel(props, 'mode');
|
13851
13868
|
const lastPickedColor = ref(null);
|
13852
13869
|
const currentColor = useProxiedModel(props, 'modelValue', undefined, v => {
|
13853
|
-
let c
|
13854
|
-
|
13870
|
+
let c;
|
13871
|
+
try {
|
13872
|
+
c = RGBtoHSV(parseColor(v));
|
13873
|
+
} catch (err) {
|
13874
|
+
consoleWarn(err);
|
13875
|
+
return null;
|
13876
|
+
}
|
13855
13877
|
if (lastPickedColor.value) {
|
13856
13878
|
c = {
|
13857
13879
|
...c,
|
@@ -14248,11 +14270,13 @@ const VCombobox = genericComponent()({
|
|
14248
14270
|
let {
|
14249
14271
|
isSelected
|
14250
14272
|
} = _ref2;
|
14251
|
-
return props.multiple && !props.hideSelected ? createVNode(VCheckboxBtn, {
|
14273
|
+
return createVNode(Fragment, null, [props.multiple && !props.hideSelected ? createVNode(VCheckboxBtn, {
|
14252
14274
|
"modelValue": isSelected,
|
14253
14275
|
"ripple": false,
|
14254
14276
|
"tabindex": "-1"
|
14255
|
-
}, null) : undefined
|
14277
|
+
}, null) : undefined, item.props.prependIcon && createVNode(VIcon, {
|
14278
|
+
"icon": item.props.prependIcon
|
14279
|
+
}, null)]);
|
14256
14280
|
},
|
14257
14281
|
title: () => {
|
14258
14282
|
return isPristine.value ? item.title : highlightResult(item.title, getMatches(item)?.title, search.value?.length ?? 0);
|
@@ -14267,6 +14291,10 @@ const VCombobox = genericComponent()({
|
|
14267
14291
|
}
|
14268
14292
|
const slotProps = {
|
14269
14293
|
'onClick:close': onChipClose,
|
14294
|
+
onMousedown(e) {
|
14295
|
+
e.preventDefault();
|
14296
|
+
e.stopPropagation();
|
14297
|
+
},
|
14270
14298
|
modelValue: true,
|
14271
14299
|
'onUpdate:modelValue': undefined
|
14272
14300
|
};
|
@@ -14730,6 +14758,7 @@ const VFileInput = genericComponent()({
|
|
14730
14758
|
const vInputRef = ref();
|
14731
14759
|
const vFieldRef = ref();
|
14732
14760
|
const inputRef = ref();
|
14761
|
+
const isActive = computed(() => isFocused.value || props.active);
|
14733
14762
|
function onFocus() {
|
14734
14763
|
if (inputRef.value !== document.activeElement) {
|
14735
14764
|
inputRef.value?.focus();
|
@@ -14798,7 +14827,7 @@ const VFileInput = genericComponent()({
|
|
14798
14827
|
"onClick:appendInner": props['onClick:appendInner']
|
14799
14828
|
}, fieldProps, {
|
14800
14829
|
"id": id.value,
|
14801
|
-
"active":
|
14830
|
+
"active": isActive.value || isDirty.value,
|
14802
14831
|
"dirty": isDirty.value,
|
14803
14832
|
"disabled": isDisabled.value,
|
14804
14833
|
"focused": isFocused.value,
|
@@ -15964,7 +15993,6 @@ const VNavigationDrawer = genericComponent()({
|
|
15964
15993
|
});
|
15965
15994
|
const {
|
15966
15995
|
layoutItemStyles,
|
15967
|
-
layoutRect,
|
15968
15996
|
layoutItemScrimStyles
|
15969
15997
|
} = useLayoutItem({
|
15970
15998
|
id: props.name,
|
@@ -15994,12 +16022,6 @@ const VNavigationDrawer = genericComponent()({
|
|
15994
16022
|
opacity: dragProgress.value * 0.2,
|
15995
16023
|
transition: 'none'
|
15996
16024
|
} : undefined),
|
15997
|
-
...(layoutRect.value ? {
|
15998
|
-
left: convertToUnit(layoutRect.value.left),
|
15999
|
-
right: convertToUnit(layoutRect.value.right),
|
16000
|
-
top: convertToUnit(layoutRect.value.top),
|
16001
|
-
bottom: convertToUnit(layoutRect.value.bottom)
|
16002
|
-
} : undefined),
|
16003
16025
|
...layoutItemScrimStyles.value
|
16004
16026
|
}));
|
16005
16027
|
provideDefaults({
|
@@ -17963,7 +17985,7 @@ const VTextarea = genericComponent()({
|
|
17963
17985
|
const vFieldRef = ref();
|
17964
17986
|
const controlHeight = ref('');
|
17965
17987
|
const textareaRef = ref();
|
17966
|
-
const isActive = computed(() => isFocused.value || props.
|
17988
|
+
const isActive = computed(() => props.persistentPlaceholder || isFocused.value || props.active);
|
17967
17989
|
function onFocus() {
|
17968
17990
|
if (textareaRef.value !== document.activeElement) {
|
17969
17991
|
textareaRef.value?.focus();
|
@@ -19654,6 +19676,11 @@ function providePagination(options) {
|
|
19654
19676
|
if (itemsPerPage.value === -1 || itemsLength.value === 0) return 1;
|
19655
19677
|
return Math.ceil(itemsLength.value / itemsPerPage.value);
|
19656
19678
|
});
|
19679
|
+
watchEffect(() => {
|
19680
|
+
if (page.value > pageCount.value) {
|
19681
|
+
page.value = pageCount.value;
|
19682
|
+
}
|
19683
|
+
});
|
19657
19684
|
function setItemsPerPage(value) {
|
19658
19685
|
itemsPerPage.value = value;
|
19659
19686
|
page.value = 1;
|
@@ -19917,6 +19944,11 @@ const makeVDataTableProps = propsFactory({
|
|
19917
19944
|
width: [String, Number],
|
19918
19945
|
fixedHeader: Boolean,
|
19919
19946
|
fixedFooter: Boolean,
|
19947
|
+
loading: [Boolean, String],
|
19948
|
+
loadingText: {
|
19949
|
+
type: String,
|
19950
|
+
default: '$vuetify.dataIterator.loadingText'
|
19951
|
+
},
|
19920
19952
|
'onClick:row': Function,
|
19921
19953
|
search: String
|
19922
19954
|
}, 'v-data-table');
|
@@ -20024,12 +20056,15 @@ const VDataTable = genericComponent()({
|
|
20024
20056
|
provideDefaults({
|
20025
20057
|
VDataTableRows: {
|
20026
20058
|
hideNoData: toRef(props, 'hideNoData'),
|
20027
|
-
noDataText: toRef(props, 'noDataText')
|
20059
|
+
noDataText: toRef(props, 'noDataText'),
|
20060
|
+
loading: toRef(props, 'loading'),
|
20061
|
+
loadingText: toRef(props, 'loadingText')
|
20028
20062
|
}
|
20029
20063
|
});
|
20030
20064
|
useRender(() => createVNode(VTable, {
|
20031
20065
|
"class": ['v-data-table', {
|
20032
|
-
'v-data-table--show-select': props.showSelect
|
20066
|
+
'v-data-table--show-select': props.showSelect,
|
20067
|
+
'v-data-table--loading': props.loading
|
20033
20068
|
}],
|
20034
20069
|
"fixedHeader": props.fixedHeader,
|
20035
20070
|
"fixedFooter": props.fixedFooter,
|
@@ -20041,6 +20076,7 @@ const VDataTable = genericComponent()({
|
|
20041
20076
|
columns
|
20042
20077
|
}), createVNode("thead", null, [createVNode(VDataTableHeaders, {
|
20043
20078
|
"sticky": props.fixedHeader,
|
20079
|
+
"loading": props.loading,
|
20044
20080
|
"multiSort": props.multiSort
|
20045
20081
|
}, slots)]), slots.thead?.(), createVNode("tbody", null, [slots.body ? slots.body() : createVNode(VDataTableRows, {
|
20046
20082
|
"items": paginatedItems.value,
|
@@ -20230,11 +20266,15 @@ const VDataTableVirtual = genericComponent()({
|
|
20230
20266
|
provideDefaults({
|
20231
20267
|
VDataTableRows: {
|
20232
20268
|
hideNoData: toRef(props, 'hideNoData'),
|
20233
|
-
noDataText: toRef(props, 'noDataText')
|
20269
|
+
noDataText: toRef(props, 'noDataText'),
|
20270
|
+
loading: toRef(props, 'loading'),
|
20271
|
+
loadingText: toRef(props, 'loadingText')
|
20234
20272
|
}
|
20235
20273
|
});
|
20236
20274
|
useRender(() => createVNode(VTable, {
|
20237
|
-
"class":
|
20275
|
+
"class": ['v-data-table', {
|
20276
|
+
'v-data-table--loading': props.loading
|
20277
|
+
}],
|
20238
20278
|
"style": {
|
20239
20279
|
'--v-table-row-height': convertToUnit(itemHeight.value)
|
20240
20280
|
},
|
@@ -20253,6 +20293,7 @@ const VDataTableVirtual = genericComponent()({
|
|
20253
20293
|
}
|
20254
20294
|
}, [createVNode("table", null, [createVNode("thead", null, [createVNode(VDataTableHeaders, {
|
20255
20295
|
"sticky": props.fixedHeader,
|
20296
|
+
"loading": props.loading,
|
20256
20297
|
"multiSort": props.multiSort
|
20257
20298
|
}, slots)]), createVNode("tbody", null, [createVNode("tr", {
|
20258
20299
|
"style": {
|
@@ -20291,11 +20332,6 @@ const VDataTableServer = genericComponent()({
|
|
20291
20332
|
name: 'VDataTableServer',
|
20292
20333
|
props: {
|
20293
20334
|
color: String,
|
20294
|
-
loading: [Boolean, String],
|
20295
|
-
loadingText: {
|
20296
|
-
type: String,
|
20297
|
-
default: '$vuetify.dataIterator.loadingText'
|
20298
|
-
},
|
20299
20335
|
itemsLength: {
|
20300
20336
|
type: [Number, String],
|
20301
20337
|
required: true
|
@@ -21529,7 +21565,7 @@ function createVuetify$1() {
|
|
21529
21565
|
date
|
21530
21566
|
};
|
21531
21567
|
}
|
21532
|
-
const version$1 = "4.0.0-dev-
|
21568
|
+
const version$1 = "4.0.0-dev-20230511.0";
|
21533
21569
|
createVuetify$1.version = version$1;
|
21534
21570
|
|
21535
21571
|
// Vue's inject() can only be used in setup
|
@@ -21541,7 +21577,7 @@ function inject(key) {
|
|
21541
21577
|
}
|
21542
21578
|
}
|
21543
21579
|
|
21544
|
-
const version = "4.0.0-dev-
|
21580
|
+
const version = "4.0.0-dev-20230511.0";
|
21545
21581
|
|
21546
21582
|
const createVuetify = function () {
|
21547
21583
|
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|