@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.js
CHANGED
@@ -1,5 +1,5 @@
|
|
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
|
*/
|
@@ -171,6 +171,9 @@
|
|
171
171
|
function keys(o) {
|
172
172
|
return Object.keys(o);
|
173
173
|
}
|
174
|
+
function has(obj, key) {
|
175
|
+
return key.every(k => obj.hasOwnProperty(k));
|
176
|
+
}
|
174
177
|
function pick(obj, paths, exclude) {
|
175
178
|
const found = Object.create(null);
|
176
179
|
const rest = Object.create(null);
|
@@ -538,79 +541,15 @@
|
|
538
541
|
}
|
539
542
|
|
540
543
|
/* eslint-disable no-console */
|
541
|
-
|
542
|
-
|
543
|
-
function createMessage(message, vm, parent) {
|
544
|
-
// if (Vuetify.config.silent) return
|
545
|
-
|
546
|
-
if (parent) {
|
547
|
-
vm = {
|
548
|
-
__isVue: true,
|
549
|
-
$parent: parent,
|
550
|
-
$options: vm
|
551
|
-
};
|
552
|
-
}
|
553
|
-
if (vm) {
|
554
|
-
// Only show each message once per instance
|
555
|
-
vm.$_alreadyWarned = vm.$_alreadyWarned || [];
|
556
|
-
if (vm.$_alreadyWarned.includes(message)) return;
|
557
|
-
vm.$_alreadyWarned.push(message);
|
558
|
-
}
|
559
|
-
return `[Vuetify] ${message}` + (vm ? generateComponentTrace(vm) : '');
|
544
|
+
function consoleWarn(message) {
|
545
|
+
vue.warn(`Vuetify: ${message}`);
|
560
546
|
}
|
561
|
-
function
|
562
|
-
|
563
|
-
newMessage != null && console.warn(newMessage);
|
547
|
+
function consoleError(message) {
|
548
|
+
vue.warn(`Vuetify error: ${message}`);
|
564
549
|
}
|
565
|
-
function
|
566
|
-
|
567
|
-
|
568
|
-
}
|
569
|
-
|
570
|
-
/**
|
571
|
-
* Shamelessly stolen from vuejs/vue/blob/dev/src/core/util/debug.js
|
572
|
-
*/
|
573
|
-
|
574
|
-
const classifyRE = /(?:^|[-_])(\w)/g;
|
575
|
-
const classify = str => str.replace(classifyRE, c => c.toUpperCase()).replace(/[-_]/g, '');
|
576
|
-
function formatComponentName(vm, includeFile) {
|
577
|
-
if (vm.$root === vm) {
|
578
|
-
return '<Root>';
|
579
|
-
}
|
580
|
-
const options = typeof vm === 'function' && vm.cid != null ? vm.options : vm.__isVue ? vm.$options || vm.constructor.options : vm || {};
|
581
|
-
let name = options.name || options._componentTag;
|
582
|
-
const file = options.__file;
|
583
|
-
if (!name && file) {
|
584
|
-
const match = file.match(/([^/\\]+)\.vue$/);
|
585
|
-
name = match?.[1];
|
586
|
-
}
|
587
|
-
return (name ? `<${classify(name)}>` : `<Anonymous>`) + (file && includeFile !== false ? ` at ${file}` : '');
|
588
|
-
}
|
589
|
-
function generateComponentTrace(vm) {
|
590
|
-
if (vm.__isVue && vm.$parent) {
|
591
|
-
const tree = [];
|
592
|
-
let currentRecursiveSequence = 0;
|
593
|
-
while (vm) {
|
594
|
-
if (tree.length > 0) {
|
595
|
-
const last = tree[tree.length - 1];
|
596
|
-
if (last.constructor === vm.constructor) {
|
597
|
-
currentRecursiveSequence++;
|
598
|
-
vm = vm.$parent;
|
599
|
-
continue;
|
600
|
-
} else if (currentRecursiveSequence > 0) {
|
601
|
-
tree[tree.length - 1] = [last, currentRecursiveSequence];
|
602
|
-
currentRecursiveSequence = 0;
|
603
|
-
}
|
604
|
-
}
|
605
|
-
tree.push(vm);
|
606
|
-
vm = vm.$parent;
|
607
|
-
}
|
608
|
-
return '\n\nfound in\n\n' + tree.map((vm, i) => `${i === 0 ? '---> ' : ' '.repeat(5 + i * 2)}${Array.isArray(vm)
|
609
|
-
// eslint-disable-next-line sonarjs/no-nested-template-literals
|
610
|
-
? `${formatComponentName(vm[0])}... (${vm[1]} recursive calls)` : formatComponentName(vm)}`).join('\n');
|
611
|
-
} else {
|
612
|
-
return `\n\n(found in ${formatComponentName(vm)})`;
|
613
|
-
}
|
550
|
+
function deprecate(original, replacement) {
|
551
|
+
replacement = Array.isArray(replacement) ? replacement.slice(0, -1).map(s => `'${s}'`).join(', ') + ` or '${replacement.at(-1)}'` : `'${replacement}'`;
|
552
|
+
vue.warn(`[Vuetify UPGRADE] '${original}' is deprecated, use ${replacement} instead.`);
|
614
553
|
}
|
615
554
|
|
616
555
|
// For converting XYZ to sRGB
|
@@ -684,7 +623,46 @@
|
|
684
623
|
function isCssColor(color) {
|
685
624
|
return !!color && /^(#|var\(--|(rgb|hsl)a?\()/.test(color);
|
686
625
|
}
|
687
|
-
|
626
|
+
const cssColorRe = /^(?<fn>(?:rgb|hsl)a?)\((?<values>.+)\)/;
|
627
|
+
const mappers = {
|
628
|
+
rgb: (r, g, b, a) => ({
|
629
|
+
r,
|
630
|
+
g,
|
631
|
+
b,
|
632
|
+
a
|
633
|
+
}),
|
634
|
+
rgba: (r, g, b, a) => ({
|
635
|
+
r,
|
636
|
+
g,
|
637
|
+
b,
|
638
|
+
a
|
639
|
+
}),
|
640
|
+
hsl: (h, s, l, a) => HSLtoRGB({
|
641
|
+
h,
|
642
|
+
s,
|
643
|
+
l,
|
644
|
+
a
|
645
|
+
}),
|
646
|
+
hsla: (h, s, l, a) => HSLtoRGB({
|
647
|
+
h,
|
648
|
+
s,
|
649
|
+
l,
|
650
|
+
a
|
651
|
+
}),
|
652
|
+
hsv: (h, s, v, a) => HSVtoRGB({
|
653
|
+
h,
|
654
|
+
s,
|
655
|
+
v,
|
656
|
+
a
|
657
|
+
}),
|
658
|
+
hsva: (h, s, v, a) => HSVtoRGB({
|
659
|
+
h,
|
660
|
+
s,
|
661
|
+
v,
|
662
|
+
a
|
663
|
+
})
|
664
|
+
};
|
665
|
+
function parseColor(color) {
|
688
666
|
if (typeof color === 'number') {
|
689
667
|
if (isNaN(color) || color < 0 || color > 0xFFFFFF) {
|
690
668
|
// int can't have opacity
|
@@ -695,6 +673,22 @@
|
|
695
673
|
g: (color & 0xFF00) >> 8,
|
696
674
|
b: color & 0xFF
|
697
675
|
};
|
676
|
+
} else if (typeof color === 'string' && cssColorRe.test(color)) {
|
677
|
+
const {
|
678
|
+
groups
|
679
|
+
} = color.match(cssColorRe);
|
680
|
+
const {
|
681
|
+
fn,
|
682
|
+
values
|
683
|
+
} = groups;
|
684
|
+
const realValues = values.split(/,\s*/).map(v => {
|
685
|
+
if (v.endsWith('%') && ['hsl', 'hsla', 'hsv', 'hsva'].includes(fn)) {
|
686
|
+
return parseFloat(v) / 100;
|
687
|
+
} else {
|
688
|
+
return parseFloat(v);
|
689
|
+
}
|
690
|
+
});
|
691
|
+
return mappers[fn](...realValues);
|
698
692
|
} else if (typeof color === 'string') {
|
699
693
|
let hex = color.startsWith('#') ? color.slice(1) : color;
|
700
694
|
if ([3, 4].includes(hex.length)) {
|
@@ -707,9 +701,16 @@
|
|
707
701
|
consoleWarn(`'${color}' is not a valid hex(a) color`);
|
708
702
|
}
|
709
703
|
return HexToRGB(hex);
|
710
|
-
} else {
|
711
|
-
|
704
|
+
} else if (typeof color === 'object') {
|
705
|
+
if (has(color, ['r', 'g', 'b'])) {
|
706
|
+
return color;
|
707
|
+
} else if (has(color, ['h', 's', 'l'])) {
|
708
|
+
return HSVtoRGB(HSLtoHSV(color));
|
709
|
+
} else if (has(color, ['h', 's', 'v'])) {
|
710
|
+
return HSVtoRGB(color);
|
711
|
+
}
|
712
712
|
}
|
713
|
+
throw new TypeError(`Invalid color: ${color == null ? color : String(color) || color.constructor.name}\nExpected #hex, #hexa, rgb(), rgba(), hsl(), hsla(), object or number`);
|
713
714
|
}
|
714
715
|
|
715
716
|
/** Converts HSVA to RGBA. Based on formula from https://en.wikipedia.org/wiki/HSL_and_HSV */
|
@@ -732,6 +733,9 @@
|
|
732
733
|
a
|
733
734
|
};
|
734
735
|
}
|
736
|
+
function HSLtoRGB(hsla) {
|
737
|
+
return HSVtoRGB(HSLtoHSV(hsla));
|
738
|
+
}
|
735
739
|
|
736
740
|
/** Converts RGBA to HSVA. Based on formula from https://en.wikipedia.org/wiki/HSL_and_HSV */
|
737
741
|
function RGBtoHSV(rgba) {
|
@@ -870,7 +874,7 @@
|
|
870
874
|
* @see https://www.w3.org/TR/WCAG20/#relativeluminancedef
|
871
875
|
*/
|
872
876
|
function getLuma(color) {
|
873
|
-
const rgb = parseColor
|
877
|
+
const rgb = parseColor(color);
|
874
878
|
return toXYZ$1(rgb)[1];
|
875
879
|
}
|
876
880
|
|
@@ -1016,21 +1020,23 @@
|
|
1016
1020
|
function propIsDefined(vnode, prop) {
|
1017
1021
|
return typeof vnode.props?.[prop] !== 'undefined' || typeof vnode.props?.[toKebabCase(prop)] !== 'undefined';
|
1018
1022
|
}
|
1019
|
-
function
|
1023
|
+
function internalUseDefaults() {
|
1024
|
+
let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
1025
|
+
let name = arguments.length > 1 ? arguments[1] : undefined;
|
1020
1026
|
let defaults = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : injectDefaults();
|
1021
1027
|
const vm = getCurrentInstance('useDefaults');
|
1022
1028
|
name = name ?? vm.type.name ?? vm.type.__name;
|
1023
1029
|
if (!name) {
|
1024
1030
|
throw new Error('[Vuetify] Could not determine component name');
|
1025
1031
|
}
|
1026
|
-
const componentDefaults = vue.computed(() => defaults.value[props._as ?? name]);
|
1032
|
+
const componentDefaults = vue.computed(() => defaults.value?.[props._as ?? name]);
|
1027
1033
|
const _props = new Proxy(props, {
|
1028
1034
|
get(target, prop) {
|
1029
1035
|
const propValue = Reflect.get(target, prop);
|
1030
1036
|
if (prop === 'class' || prop === 'style') {
|
1031
1037
|
return [componentDefaults.value?.[prop], propValue].filter(v => v != null);
|
1032
1038
|
} else if (typeof prop === 'string' && !propIsDefined(vm.vnode, prop)) {
|
1033
|
-
return componentDefaults.value?.[prop] ?? defaults.value
|
1039
|
+
return componentDefaults.value?.[prop] ?? defaults.value?.global?.[prop] ?? propValue;
|
1034
1040
|
}
|
1035
1041
|
return propValue;
|
1036
1042
|
}
|
@@ -1058,6 +1064,16 @@
|
|
1058
1064
|
provideSubDefaults
|
1059
1065
|
};
|
1060
1066
|
}
|
1067
|
+
function useDefaults() {
|
1068
|
+
let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
1069
|
+
let name = arguments.length > 1 ? arguments[1] : undefined;
|
1070
|
+
const {
|
1071
|
+
props: _props,
|
1072
|
+
provideSubDefaults
|
1073
|
+
} = internalUseDefaults(props, name);
|
1074
|
+
provideSubDefaults();
|
1075
|
+
return _props;
|
1076
|
+
}
|
1061
1077
|
|
1062
1078
|
// Utils
|
1063
1079
|
|
@@ -1085,7 +1101,7 @@
|
|
1085
1101
|
const {
|
1086
1102
|
props: _props,
|
1087
1103
|
provideSubDefaults
|
1088
|
-
} =
|
1104
|
+
} = internalUseDefaults(props, props._as ?? options.name, defaults);
|
1089
1105
|
const setupBindings = options._setup(_props, ctx);
|
1090
1106
|
provideSubDefaults();
|
1091
1107
|
return setupBindings;
|
@@ -1722,7 +1738,7 @@
|
|
1722
1738
|
for (const variation of ['lighten', 'darken']) {
|
1723
1739
|
const fn = variation === 'lighten' ? lighten : darken;
|
1724
1740
|
for (const amount of createRange(parsedOptions.variations[variation], 1)) {
|
1725
|
-
theme.colors[`${name}-${variation}-${amount}`] = RGBtoHex(fn(parseColor
|
1741
|
+
theme.colors[`${name}-${variation}-${amount}`] = RGBtoHex(fn(parseColor(color), amount));
|
1726
1742
|
}
|
1727
1743
|
}
|
1728
1744
|
}
|
@@ -1730,9 +1746,9 @@
|
|
1730
1746
|
for (const color of Object.keys(theme.colors)) {
|
1731
1747
|
if (/^on-[a-z]/.test(color) || theme.colors[`on-${color}`]) continue;
|
1732
1748
|
const onColor = `on-${color}`;
|
1733
|
-
const colorVal = parseColor
|
1734
|
-
const blackContrast = Math.abs(APCAcontrast(parseColor
|
1735
|
-
const whiteContrast = Math.abs(APCAcontrast(parseColor
|
1749
|
+
const colorVal = parseColor(theme.colors[color]);
|
1750
|
+
const blackContrast = Math.abs(APCAcontrast(parseColor(0), colorVal));
|
1751
|
+
const whiteContrast = Math.abs(APCAcontrast(parseColor(0xffffff), colorVal));
|
1736
1752
|
|
1737
1753
|
// TODO: warn about poor color selections
|
1738
1754
|
// const contrastAsText = Math.abs(APCAcontrast(colorVal, colorToInt(theme.colors.background)))
|
@@ -1864,14 +1880,14 @@
|
|
1864
1880
|
const darkOverlay = theme.dark ? 1 : 2;
|
1865
1881
|
const variables = [];
|
1866
1882
|
for (const [key, value] of Object.entries(theme.colors)) {
|
1867
|
-
const rgb = parseColor
|
1883
|
+
const rgb = parseColor(value);
|
1868
1884
|
variables.push(`--v-theme-${key}: ${rgb.r},${rgb.g},${rgb.b}`);
|
1869
1885
|
if (!key.startsWith('on-')) {
|
1870
1886
|
variables.push(`--v-theme-${key}-overlay-multiplier: ${getLuma(value) > 0.18 ? lightOverlay : darkOverlay}`);
|
1871
1887
|
}
|
1872
1888
|
}
|
1873
1889
|
for (const [key, value] of Object.entries(theme.variables)) {
|
1874
|
-
const color = typeof value === 'string' && value.startsWith('#') ? parseColor
|
1890
|
+
const color = typeof value === 'string' && value.startsWith('#') ? parseColor(value) : undefined;
|
1875
1891
|
const rgb = color ? `${color.r}, ${color.g}, ${color.b}` : undefined;
|
1876
1892
|
variables.push(`--v-${key}: ${rgb ?? value}`);
|
1877
1893
|
}
|
@@ -2644,14 +2660,16 @@
|
|
2644
2660
|
})
|
2645
2661
|
};
|
2646
2662
|
}
|
2663
|
+
const makeVResponsiveProps = propsFactory({
|
2664
|
+
aspectRatio: [String, Number],
|
2665
|
+
contentClass: String,
|
2666
|
+
inline: Boolean,
|
2667
|
+
...makeComponentProps(),
|
2668
|
+
...makeDimensionProps()
|
2669
|
+
}, 'v-responsive');
|
2647
2670
|
const VResponsive = genericComponent()({
|
2648
2671
|
name: 'VResponsive',
|
2649
|
-
props:
|
2650
|
-
aspectRatio: [String, Number],
|
2651
|
-
contentClass: String,
|
2652
|
-
...makeComponentProps(),
|
2653
|
-
...makeDimensionProps()
|
2654
|
-
},
|
2672
|
+
props: makeVResponsiveProps(),
|
2655
2673
|
setup(props, _ref) {
|
2656
2674
|
let {
|
2657
2675
|
slots
|
@@ -2663,7 +2681,9 @@
|
|
2663
2681
|
dimensionStyles
|
2664
2682
|
} = useDimension(props);
|
2665
2683
|
useRender(() => vue.createVNode("div", {
|
2666
|
-
"class": ['v-responsive',
|
2684
|
+
"class": ['v-responsive', {
|
2685
|
+
'v-responsive--inline': props.inline
|
2686
|
+
}, props.class],
|
2667
2687
|
"style": [dimensionStyles.value, props.style]
|
2668
2688
|
}, [vue.createVNode("div", {
|
2669
2689
|
"class": "v-responsive__sizer",
|
@@ -2759,7 +2779,6 @@
|
|
2759
2779
|
intersect: Intersect
|
2760
2780
|
},
|
2761
2781
|
props: {
|
2762
|
-
aspectRatio: [String, Number],
|
2763
2782
|
alt: String,
|
2764
2783
|
cover: Boolean,
|
2765
2784
|
eager: Boolean,
|
@@ -2781,7 +2800,7 @@
|
|
2781
2800
|
default: ''
|
2782
2801
|
},
|
2783
2802
|
srcset: String,
|
2784
|
-
|
2803
|
+
...makeVResponsiveProps(),
|
2785
2804
|
...makeComponentProps(),
|
2786
2805
|
...makeTransitionProps()
|
2787
2806
|
},
|
@@ -2967,25 +2986,27 @@
|
|
2967
2986
|
}
|
2968
2987
|
});
|
2969
2988
|
}
|
2970
|
-
useRender(() =>
|
2971
|
-
|
2972
|
-
|
2973
|
-
|
2974
|
-
|
2975
|
-
|
2976
|
-
|
2977
|
-
|
2978
|
-
|
2979
|
-
|
2980
|
-
|
2981
|
-
|
2982
|
-
|
2983
|
-
|
2984
|
-
|
2985
|
-
|
2986
|
-
|
2987
|
-
|
2988
|
-
|
2989
|
+
useRender(() => {
|
2990
|
+
const [responsiveProps] = VResponsive.filterProps(props);
|
2991
|
+
return vue.withDirectives(vue.createVNode(VResponsive, vue.mergeProps({
|
2992
|
+
"class": ['v-img', {
|
2993
|
+
'v-img--booting': !isBooted.value
|
2994
|
+
}, props.class],
|
2995
|
+
"style": props.style
|
2996
|
+
}, responsiveProps, {
|
2997
|
+
"aspectRatio": aspectRatio.value,
|
2998
|
+
"aria-label": props.alt,
|
2999
|
+
"role": props.alt ? 'img' : undefined
|
3000
|
+
}), {
|
3001
|
+
additional: () => vue.createVNode(vue.Fragment, null, [vue.createVNode(__image, null, null), vue.createVNode(__preloadImage, null, null), vue.createVNode(__gradient, null, null), vue.createVNode(__placeholder, null, null), vue.createVNode(__error, null, null)]),
|
3002
|
+
default: slots.default
|
3003
|
+
}), [[vue.resolveDirective("intersect"), {
|
3004
|
+
handler: init,
|
3005
|
+
options: props.options
|
3006
|
+
}, null, {
|
3007
|
+
once: true
|
3008
|
+
}]]);
|
3009
|
+
});
|
2989
3010
|
return {
|
2990
3011
|
currentSrc,
|
2991
3012
|
image,
|
@@ -3332,14 +3353,13 @@
|
|
3332
3353
|
type: String
|
3333
3354
|
},
|
3334
3355
|
scrollThreshold: {
|
3335
|
-
type: [String, Number]
|
3356
|
+
type: [String, Number],
|
3357
|
+
default: 300
|
3336
3358
|
}
|
3337
3359
|
}, 'scroll');
|
3338
3360
|
function useScroll(props) {
|
3339
3361
|
let args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
3340
3362
|
const {
|
3341
|
-
thresholdMetCallback,
|
3342
|
-
scrollThreshold,
|
3343
3363
|
canScroll
|
3344
3364
|
} = args;
|
3345
3365
|
let previousScroll = 0;
|
@@ -3349,8 +3369,16 @@
|
|
3349
3369
|
const currentThreshold = vue.ref(0);
|
3350
3370
|
const isScrollActive = vue.ref(false);
|
3351
3371
|
const isScrollingUp = vue.ref(false);
|
3352
|
-
const
|
3353
|
-
return Number(props.scrollThreshold
|
3372
|
+
const scrollThreshold = vue.computed(() => {
|
3373
|
+
return Number(props.scrollThreshold);
|
3374
|
+
});
|
3375
|
+
|
3376
|
+
/**
|
3377
|
+
* 1: at top
|
3378
|
+
* 0: at threshold
|
3379
|
+
*/
|
3380
|
+
const scrollRatio = vue.computed(() => {
|
3381
|
+
return clamp((scrollThreshold.value - currentScroll.value) / scrollThreshold.value || 0);
|
3354
3382
|
});
|
3355
3383
|
const onScroll = () => {
|
3356
3384
|
const targetEl = target.value;
|
@@ -3358,7 +3386,7 @@
|
|
3358
3386
|
previousScroll = currentScroll.value;
|
3359
3387
|
currentScroll.value = 'window' in targetEl ? targetEl.pageYOffset : targetEl.scrollTop;
|
3360
3388
|
isScrollingUp.value = currentScroll.value < previousScroll;
|
3361
|
-
currentThreshold.value = Math.abs(currentScroll.value -
|
3389
|
+
currentThreshold.value = Math.abs(currentScroll.value - scrollThreshold.value);
|
3362
3390
|
};
|
3363
3391
|
vue.watch(isScrollingUp, () => {
|
3364
3392
|
savedScroll.value = savedScroll.value || currentScroll.value;
|
@@ -3370,7 +3398,7 @@
|
|
3370
3398
|
vue.watch(() => props.scrollTarget, scrollTarget => {
|
3371
3399
|
const newTarget = scrollTarget ? document.querySelector(scrollTarget) : window;
|
3372
3400
|
if (!newTarget) {
|
3373
|
-
consoleWarn(`Unable to locate element with identifier ${scrollTarget}
|
3401
|
+
consoleWarn(`Unable to locate element with identifier ${scrollTarget}`);
|
3374
3402
|
return;
|
3375
3403
|
}
|
3376
3404
|
if (newTarget === target.value) return;
|
@@ -3386,15 +3414,6 @@
|
|
3386
3414
|
vue.onBeforeUnmount(() => {
|
3387
3415
|
target.value?.removeEventListener('scroll', onScroll);
|
3388
3416
|
});
|
3389
|
-
thresholdMetCallback && vue.watch(() => Math.abs(currentScroll.value - savedScroll.value) > computedScrollThreshold.value, thresholdMet => {
|
3390
|
-
thresholdMet && thresholdMetCallback({
|
3391
|
-
currentThreshold: currentThreshold.value,
|
3392
|
-
isScrollingUp: isScrollingUp.value,
|
3393
|
-
savedScroll
|
3394
|
-
});
|
3395
|
-
}, {
|
3396
|
-
immediate: true
|
3397
|
-
});
|
3398
3417
|
|
3399
3418
|
// Do we need this? If yes - seems that
|
3400
3419
|
// there's no need to expose onScroll
|
@@ -3402,10 +3421,11 @@
|
|
3402
3421
|
immediate: true
|
3403
3422
|
});
|
3404
3423
|
return {
|
3405
|
-
|
3424
|
+
scrollThreshold,
|
3406
3425
|
currentScroll,
|
3407
3426
|
currentThreshold,
|
3408
3427
|
isScrollActive,
|
3428
|
+
scrollRatio,
|
3409
3429
|
// required only for testing
|
3410
3430
|
// probably can be removed
|
3411
3431
|
// later (2 chars chlng)
|
@@ -3488,15 +3508,14 @@
|
|
3488
3508
|
});
|
3489
3509
|
const {
|
3490
3510
|
currentScroll,
|
3491
|
-
|
3492
|
-
|
3493
|
-
|
3511
|
+
scrollThreshold,
|
3512
|
+
isScrollingUp,
|
3513
|
+
scrollRatio
|
3494
3514
|
} = useScroll(props, {
|
3495
3515
|
canScroll
|
3496
3516
|
});
|
3497
|
-
const isCollapsed = vue.computed(() => props.collapse || scrollBehavior.value.collapse && (scrollBehavior.value.inverted ?
|
3498
|
-
const isFlat = vue.computed(() => props.flat || scrollBehavior.value.elevate &&
|
3499
|
-
const scrollRatio = vue.computed(() => Math.min((currentThreshold.value - currentScroll.value) / currentThreshold.value || 1, 1));
|
3517
|
+
const isCollapsed = vue.computed(() => props.collapse || scrollBehavior.value.collapse && (scrollBehavior.value.inverted ? scrollRatio.value > 0 : scrollRatio.value === 0));
|
3518
|
+
const isFlat = vue.computed(() => props.flat || scrollBehavior.value.elevate && (scrollBehavior.value.inverted ? currentScroll.value > 0 : currentScroll.value === 0));
|
3500
3519
|
const opacity = vue.computed(() => scrollBehavior.value.fadeImage ? scrollBehavior.value.inverted ? 1 - scrollRatio.value : scrollRatio.value : undefined);
|
3501
3520
|
const height = vue.computed(() => {
|
3502
3521
|
if (scrollBehavior.value.hide && scrollBehavior.value.inverted) return 0;
|
@@ -3505,15 +3524,12 @@
|
|
3505
3524
|
return height + extensionHeight;
|
3506
3525
|
});
|
3507
3526
|
function setActive() {
|
3508
|
-
const val = currentScroll.value;
|
3509
3527
|
if (scrollBehavior.value.hide) {
|
3510
3528
|
if (scrollBehavior.value.inverted) {
|
3511
|
-
isActive.value =
|
3529
|
+
isActive.value = currentScroll.value > scrollThreshold.value;
|
3512
3530
|
} else {
|
3513
|
-
isActive.value = isScrollingUp.value ||
|
3531
|
+
isActive.value = isScrollingUp.value || currentScroll.value < scrollThreshold.value;
|
3514
3532
|
}
|
3515
|
-
} else if (scrollBehavior.value.inverted) {
|
3516
|
-
isActive.value = currentScroll.value === 0;
|
3517
3533
|
} else {
|
3518
3534
|
isActive.value = true;
|
3519
3535
|
}
|
@@ -5053,7 +5069,7 @@
|
|
5053
5069
|
...makeVariantProps({
|
5054
5070
|
variant: 'elevated'
|
5055
5071
|
})
|
5056
|
-
}, '
|
5072
|
+
}, 'v-btn');
|
5057
5073
|
const VBtn = genericComponent()({
|
5058
5074
|
name: 'VBtn',
|
5059
5075
|
directives: {
|
@@ -5123,6 +5139,11 @@
|
|
5123
5139
|
if (props.value === undefined) return undefined;
|
5124
5140
|
return Object(props.value) === props.value ? JSON.stringify(props.value, null, 0) : props.value;
|
5125
5141
|
});
|
5142
|
+
function onClick(e) {
|
5143
|
+
if (isDisabled.value) return;
|
5144
|
+
link.navigate?.(e);
|
5145
|
+
group?.toggle();
|
5146
|
+
}
|
5126
5147
|
useSelectLink(link, group?.select);
|
5127
5148
|
useRender(() => {
|
5128
5149
|
const Tag = link.isLink.value ? 'a' : props.tag;
|
@@ -5145,11 +5166,7 @@
|
|
5145
5166
|
"style": [hasColor ? colorStyles.value : undefined, dimensionStyles.value, locationStyles.value, sizeStyles.value, props.style],
|
5146
5167
|
"disabled": isDisabled.value || undefined,
|
5147
5168
|
"href": link.href.value,
|
5148
|
-
"onClick":
|
5149
|
-
if (isDisabled.value) return;
|
5150
|
-
link.navigate?.(e);
|
5151
|
-
group?.toggle();
|
5152
|
-
},
|
5169
|
+
"onClick": onClick,
|
5153
5170
|
"value": valueAttr.value
|
5154
5171
|
}, {
|
5155
5172
|
default: () => [genOverlays(true, 'v-btn'), !props.icon && hasPrepend && vue.createVNode("span", {
|
@@ -5215,22 +5232,17 @@
|
|
5215
5232
|
|
5216
5233
|
const VAppBarNavIcon = genericComponent()({
|
5217
5234
|
name: 'VAppBarNavIcon',
|
5218
|
-
props: {
|
5219
|
-
icon:
|
5220
|
-
|
5221
|
-
|
5222
|
-
},
|
5223
|
-
...makeComponentProps()
|
5224
|
-
},
|
5235
|
+
props: makeVBtnProps({
|
5236
|
+
icon: '$menu',
|
5237
|
+
variant: 'text'
|
5238
|
+
}),
|
5225
5239
|
setup(props, _ref) {
|
5226
5240
|
let {
|
5227
5241
|
slots
|
5228
5242
|
} = _ref;
|
5229
|
-
useRender(() => vue.createVNode(VBtn, {
|
5230
|
-
"class": ['v-app-bar-nav-icon'
|
5231
|
-
|
5232
|
-
"style": props.style
|
5233
|
-
}, slots));
|
5243
|
+
useRender(() => vue.createVNode(VBtn, vue.mergeProps(props, {
|
5244
|
+
"class": ['v-app-bar-nav-icon']
|
5245
|
+
}), slots));
|
5234
5246
|
return {};
|
5235
5247
|
}
|
5236
5248
|
});
|
@@ -6433,7 +6445,7 @@
|
|
6433
6445
|
const vInputRef = vue.ref();
|
6434
6446
|
const vFieldRef = vue.ref();
|
6435
6447
|
const inputRef = vue.ref();
|
6436
|
-
const isActive = vue.computed(() => activeTypes.includes(props.type) || props.persistentPlaceholder || isFocused.value);
|
6448
|
+
const isActive = vue.computed(() => activeTypes.includes(props.type) || props.persistentPlaceholder || isFocused.value || props.active);
|
6437
6449
|
function onFocus() {
|
6438
6450
|
if (inputRef.value !== document.activeElement) {
|
6439
6451
|
inputRef.value?.focus();
|
@@ -6869,7 +6881,6 @@
|
|
6869
6881
|
"class": ['v-checkbox-btn', props.class],
|
6870
6882
|
"style": props.style,
|
6871
6883
|
"type": "checkbox",
|
6872
|
-
"inline": true,
|
6873
6884
|
"falseIcon": falseIcon.value,
|
6874
6885
|
"trueIcon": trueIcon.value,
|
6875
6886
|
"aria-checked": props.indeterminate ? 'mixed' : undefined
|
@@ -7824,7 +7835,9 @@
|
|
7824
7835
|
}
|
7825
7836
|
});
|
7826
7837
|
const makeVListGroupProps = propsFactory({
|
7838
|
+
/* @deprecated */
|
7827
7839
|
activeColor: String,
|
7840
|
+
baseColor: String,
|
7828
7841
|
color: String,
|
7829
7842
|
collapseIcon: {
|
7830
7843
|
type: IconValue,
|
@@ -7875,6 +7888,7 @@
|
|
7875
7888
|
VListItem: {
|
7876
7889
|
active: isOpen.value,
|
7877
7890
|
activeColor: props.activeColor,
|
7891
|
+
baseColor: props.baseColor,
|
7878
7892
|
color: props.color,
|
7879
7893
|
prependIcon: props.prependIcon || props.subgroup && toggleIcon.value,
|
7880
7894
|
appendIcon: props.appendIcon || !props.subgroup && toggleIcon.value,
|
@@ -7934,9 +7948,11 @@
|
|
7934
7948
|
default: undefined
|
7935
7949
|
},
|
7936
7950
|
activeClass: String,
|
7951
|
+
/* @deprecated */
|
7937
7952
|
activeColor: String,
|
7938
7953
|
appendAvatar: String,
|
7939
7954
|
appendIcon: IconValue,
|
7955
|
+
baseColor: String,
|
7940
7956
|
disabled: Boolean,
|
7941
7957
|
lines: String,
|
7942
7958
|
link: {
|
@@ -7993,8 +8009,9 @@
|
|
7993
8009
|
const isLink = vue.computed(() => props.link !== false && link.isLink.value);
|
7994
8010
|
const isClickable = vue.computed(() => !props.disabled && props.link !== false && (props.link || link.isClickable.value || props.value != null && !!list));
|
7995
8011
|
const roundedProps = vue.computed(() => props.rounded || props.nav);
|
8012
|
+
const color = vue.computed(() => props.color ?? props.activeColor);
|
7996
8013
|
const variantProps = vue.computed(() => ({
|
7997
|
-
color: isActive.value ?
|
8014
|
+
color: isActive.value ? color.value ?? props.baseColor : props.baseColor,
|
7998
8015
|
variant: props.variant
|
7999
8016
|
}));
|
8000
8017
|
vue.watch(() => link.isActive?.value, val => {
|
@@ -8051,7 +8068,6 @@
|
|
8051
8068
|
}
|
8052
8069
|
useRender(() => {
|
8053
8070
|
const Tag = isLink.value ? 'a' : props.tag;
|
8054
|
-
const hasColor = !list || isSelected.value || isActive.value;
|
8055
8071
|
const hasTitle = slots.title || props.title;
|
8056
8072
|
const hasSubtitle = slots.subtitle || props.subtitle;
|
8057
8073
|
const hasAppendMedia = !!(props.appendAvatar || props.appendIcon);
|
@@ -8059,6 +8075,9 @@
|
|
8059
8075
|
const hasPrependMedia = !!(props.prependAvatar || props.prependIcon);
|
8060
8076
|
const hasPrepend = !!(hasPrependMedia || slots.prepend);
|
8061
8077
|
list?.updateHasPrepend(hasPrepend);
|
8078
|
+
if (props.activeColor) {
|
8079
|
+
deprecate('active-color', ['color', 'base-color']);
|
8080
|
+
}
|
8062
8081
|
return vue.withDirectives(vue.createVNode(Tag, {
|
8063
8082
|
"class": ['v-list-item', {
|
8064
8083
|
'v-list-item--active': isActive.value,
|
@@ -8067,8 +8086,8 @@
|
|
8067
8086
|
'v-list-item--nav': props.nav,
|
8068
8087
|
'v-list-item--prepend': !hasPrepend && list?.hasPrepend.value,
|
8069
8088
|
[`${props.activeClass}`]: props.activeClass && isActive.value
|
8070
|
-
}, themeClasses.value, borderClasses.value,
|
8071
|
-
"style": [
|
8089
|
+
}, themeClasses.value, borderClasses.value, colorClasses.value, densityClasses.value, elevationClasses.value, lineClasses.value, roundedClasses.value, variantClasses.value, props.class],
|
8090
|
+
"style": [colorStyles.value, dimensionStyles.value, props.style],
|
8072
8091
|
"href": link.href.value,
|
8073
8092
|
"tabindex": isClickable.value ? 0 : undefined,
|
8074
8093
|
"onClick": onClick,
|
@@ -8387,6 +8406,8 @@
|
|
8387
8406
|
const VList = genericComponent()({
|
8388
8407
|
name: 'VList',
|
8389
8408
|
props: {
|
8409
|
+
baseColor: String,
|
8410
|
+
/* @deprecated */
|
8390
8411
|
activeColor: String,
|
8391
8412
|
activeClass: String,
|
8392
8413
|
bgColor: String,
|
@@ -8458,16 +8479,19 @@
|
|
8458
8479
|
} = useNested(props);
|
8459
8480
|
const lineClasses = vue.computed(() => props.lines ? `v-list--${props.lines}-line` : undefined);
|
8460
8481
|
const activeColor = vue.toRef(props, 'activeColor');
|
8482
|
+
const baseColor = vue.toRef(props, 'baseColor');
|
8461
8483
|
const color = vue.toRef(props, 'color');
|
8462
8484
|
createList();
|
8463
8485
|
provideDefaults({
|
8464
8486
|
VListGroup: {
|
8465
8487
|
activeColor,
|
8488
|
+
baseColor,
|
8466
8489
|
color
|
8467
8490
|
},
|
8468
8491
|
VListItem: {
|
8469
8492
|
activeClass: vue.toRef(props, 'activeClass'),
|
8470
8493
|
activeColor,
|
8494
|
+
baseColor,
|
8471
8495
|
color,
|
8472
8496
|
density: vue.toRef(props, 'density'),
|
8473
8497
|
disabled: vue.toRef(props, 'disabled'),
|
@@ -9488,14 +9512,14 @@
|
|
9488
9512
|
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultDisplayOptions;
|
9489
9513
|
return mergeDeep(defaultDisplayOptions, options);
|
9490
9514
|
};
|
9491
|
-
function getClientWidth(
|
9492
|
-
return IN_BROWSER && !
|
9515
|
+
function getClientWidth(ssr) {
|
9516
|
+
return IN_BROWSER && !ssr ? window.innerWidth : typeof ssr === 'object' && ssr.clientWidth || 0;
|
9493
9517
|
}
|
9494
|
-
function getClientHeight(
|
9495
|
-
return IN_BROWSER && !
|
9518
|
+
function getClientHeight(ssr) {
|
9519
|
+
return IN_BROWSER && !ssr ? window.innerHeight : typeof ssr === 'object' && ssr.clientHeight || 0;
|
9496
9520
|
}
|
9497
|
-
function getPlatform(
|
9498
|
-
const userAgent = IN_BROWSER && !
|
9521
|
+
function getPlatform(ssr) {
|
9522
|
+
const userAgent = IN_BROWSER && !ssr ? window.navigator.userAgent : 'ssr';
|
9499
9523
|
function match(regexp) {
|
9500
9524
|
return Boolean(userAgent.match(regexp));
|
9501
9525
|
}
|
@@ -10368,11 +10392,13 @@
|
|
10368
10392
|
let {
|
10369
10393
|
isSelected
|
10370
10394
|
} = _ref2;
|
10371
|
-
return props.multiple && !props.hideSelected ? vue.createVNode(VCheckboxBtn, {
|
10395
|
+
return vue.createVNode(vue.Fragment, null, [props.multiple && !props.hideSelected ? vue.createVNode(VCheckboxBtn, {
|
10372
10396
|
"modelValue": isSelected,
|
10373
10397
|
"ripple": false,
|
10374
10398
|
"tabindex": "-1"
|
10375
|
-
}, null) : undefined
|
10399
|
+
}, null) : undefined, item.props.prependIcon && vue.createVNode(VIcon, {
|
10400
|
+
"icon": item.props.prependIcon
|
10401
|
+
}, null)]);
|
10376
10402
|
}
|
10377
10403
|
});
|
10378
10404
|
}), slots['append-item']?.()]
|
@@ -10385,6 +10411,10 @@
|
|
10385
10411
|
}
|
10386
10412
|
const slotProps = {
|
10387
10413
|
'onClick:close': onChipClose,
|
10414
|
+
onMousedown(e) {
|
10415
|
+
e.preventDefault();
|
10416
|
+
e.stopPropagation();
|
10417
|
+
},
|
10388
10418
|
modelValue: true,
|
10389
10419
|
'onUpdate:modelValue': undefined
|
10390
10420
|
};
|
@@ -10807,11 +10837,13 @@
|
|
10807
10837
|
let {
|
10808
10838
|
isSelected
|
10809
10839
|
} = _ref2;
|
10810
|
-
return props.multiple && !props.hideSelected ? vue.createVNode(VCheckboxBtn, {
|
10840
|
+
return vue.createVNode(vue.Fragment, null, [props.multiple && !props.hideSelected ? vue.createVNode(VCheckboxBtn, {
|
10811
10841
|
"modelValue": isSelected,
|
10812
10842
|
"ripple": false,
|
10813
10843
|
"tabindex": "-1"
|
10814
|
-
}, null) : undefined
|
10844
|
+
}, null) : undefined, item.props.prependIcon && vue.createVNode(VIcon, {
|
10845
|
+
"icon": item.props.prependIcon
|
10846
|
+
}, null)]);
|
10815
10847
|
},
|
10816
10848
|
title: () => {
|
10817
10849
|
return isPristine.value ? item.title : highlightResult$1(item.title, getMatches(item)?.title, search.value?.length ?? 0);
|
@@ -10826,6 +10858,10 @@
|
|
10826
10858
|
}
|
10827
10859
|
const slotProps = {
|
10828
10860
|
'onClick:close': onChipClose,
|
10861
|
+
onMousedown(e) {
|
10862
|
+
e.preventDefault();
|
10863
|
+
e.stopPropagation();
|
10864
|
+
},
|
10829
10865
|
modelValue: true,
|
10830
10866
|
'onUpdate:modelValue': undefined
|
10831
10867
|
};
|
@@ -12426,27 +12462,6 @@
|
|
12426
12462
|
|
12427
12463
|
// Types
|
12428
12464
|
|
12429
|
-
function has(obj, key) {
|
12430
|
-
return key.every(k => obj.hasOwnProperty(k));
|
12431
|
-
}
|
12432
|
-
function parseColor(color) {
|
12433
|
-
if (!color) return null;
|
12434
|
-
let hsva = null;
|
12435
|
-
if (typeof color === 'string') {
|
12436
|
-
const hex = parseHex(color);
|
12437
|
-
hsva = HexToHSV(hex);
|
12438
|
-
}
|
12439
|
-
if (typeof color === 'object') {
|
12440
|
-
if (has(color, ['r', 'g', 'b'])) {
|
12441
|
-
hsva = RGBtoHSV(color);
|
12442
|
-
} else if (has(color, ['h', 's', 'l'])) {
|
12443
|
-
hsva = HSLtoHSV(color);
|
12444
|
-
} else if (has(color, ['h', 's', 'v'])) {
|
12445
|
-
hsva = color;
|
12446
|
-
}
|
12447
|
-
}
|
12448
|
-
return hsva;
|
12449
|
-
}
|
12450
12465
|
function stripAlpha(color, stripAlpha) {
|
12451
12466
|
if (stripAlpha) {
|
12452
12467
|
const {
|
@@ -13788,13 +13803,15 @@
|
|
13788
13803
|
}, [vue.createVNode("div", null, [props.swatches.map(swatch => vue.createVNode("div", {
|
13789
13804
|
"class": "v-color-picker-swatches__swatch"
|
13790
13805
|
}, [swatch.map(color => {
|
13791
|
-
const
|
13806
|
+
const rgba = parseColor(color);
|
13807
|
+
const hsva = RGBtoHSV(rgba);
|
13808
|
+
const background = RGBtoCSS(rgba);
|
13792
13809
|
return vue.createVNode("div", {
|
13793
13810
|
"class": "v-color-picker-swatches__color",
|
13794
13811
|
"onClick": () => hsva && emit('update:color', hsva)
|
13795
13812
|
}, [vue.createVNode("div", {
|
13796
13813
|
"style": {
|
13797
|
-
background
|
13814
|
+
background
|
13798
13815
|
}
|
13799
13816
|
}, [props.color && deepEqual(props.color, hsva) ? vue.createVNode(VIcon, {
|
13800
13817
|
"size": "x-small",
|
@@ -13854,8 +13871,13 @@
|
|
13854
13871
|
const mode = useProxiedModel(props, 'mode');
|
13855
13872
|
const lastPickedColor = vue.ref(null);
|
13856
13873
|
const currentColor = useProxiedModel(props, 'modelValue', undefined, v => {
|
13857
|
-
let c
|
13858
|
-
|
13874
|
+
let c;
|
13875
|
+
try {
|
13876
|
+
c = RGBtoHSV(parseColor(v));
|
13877
|
+
} catch (err) {
|
13878
|
+
consoleWarn(err);
|
13879
|
+
return null;
|
13880
|
+
}
|
13859
13881
|
if (lastPickedColor.value) {
|
13860
13882
|
c = {
|
13861
13883
|
...c,
|
@@ -14252,11 +14274,13 @@
|
|
14252
14274
|
let {
|
14253
14275
|
isSelected
|
14254
14276
|
} = _ref2;
|
14255
|
-
return props.multiple && !props.hideSelected ? vue.createVNode(VCheckboxBtn, {
|
14277
|
+
return vue.createVNode(vue.Fragment, null, [props.multiple && !props.hideSelected ? vue.createVNode(VCheckboxBtn, {
|
14256
14278
|
"modelValue": isSelected,
|
14257
14279
|
"ripple": false,
|
14258
14280
|
"tabindex": "-1"
|
14259
|
-
}, null) : undefined
|
14281
|
+
}, null) : undefined, item.props.prependIcon && vue.createVNode(VIcon, {
|
14282
|
+
"icon": item.props.prependIcon
|
14283
|
+
}, null)]);
|
14260
14284
|
},
|
14261
14285
|
title: () => {
|
14262
14286
|
return isPristine.value ? item.title : highlightResult(item.title, getMatches(item)?.title, search.value?.length ?? 0);
|
@@ -14271,6 +14295,10 @@
|
|
14271
14295
|
}
|
14272
14296
|
const slotProps = {
|
14273
14297
|
'onClick:close': onChipClose,
|
14298
|
+
onMousedown(e) {
|
14299
|
+
e.preventDefault();
|
14300
|
+
e.stopPropagation();
|
14301
|
+
},
|
14274
14302
|
modelValue: true,
|
14275
14303
|
'onUpdate:modelValue': undefined
|
14276
14304
|
};
|
@@ -14734,6 +14762,7 @@
|
|
14734
14762
|
const vInputRef = vue.ref();
|
14735
14763
|
const vFieldRef = vue.ref();
|
14736
14764
|
const inputRef = vue.ref();
|
14765
|
+
const isActive = vue.computed(() => isFocused.value || props.active);
|
14737
14766
|
function onFocus() {
|
14738
14767
|
if (inputRef.value !== document.activeElement) {
|
14739
14768
|
inputRef.value?.focus();
|
@@ -14802,7 +14831,7 @@
|
|
14802
14831
|
"onClick:appendInner": props['onClick:appendInner']
|
14803
14832
|
}, fieldProps, {
|
14804
14833
|
"id": id.value,
|
14805
|
-
"active":
|
14834
|
+
"active": isActive.value || isDirty.value,
|
14806
14835
|
"dirty": isDirty.value,
|
14807
14836
|
"disabled": isDisabled.value,
|
14808
14837
|
"focused": isFocused.value,
|
@@ -15968,7 +15997,6 @@
|
|
15968
15997
|
});
|
15969
15998
|
const {
|
15970
15999
|
layoutItemStyles,
|
15971
|
-
layoutRect,
|
15972
16000
|
layoutItemScrimStyles
|
15973
16001
|
} = useLayoutItem({
|
15974
16002
|
id: props.name,
|
@@ -15998,12 +16026,6 @@
|
|
15998
16026
|
opacity: dragProgress.value * 0.2,
|
15999
16027
|
transition: 'none'
|
16000
16028
|
} : undefined),
|
16001
|
-
...(layoutRect.value ? {
|
16002
|
-
left: convertToUnit(layoutRect.value.left),
|
16003
|
-
right: convertToUnit(layoutRect.value.right),
|
16004
|
-
top: convertToUnit(layoutRect.value.top),
|
16005
|
-
bottom: convertToUnit(layoutRect.value.bottom)
|
16006
|
-
} : undefined),
|
16007
16029
|
...layoutItemScrimStyles.value
|
16008
16030
|
}));
|
16009
16031
|
provideDefaults({
|
@@ -17967,7 +17989,7 @@
|
|
17967
17989
|
const vFieldRef = vue.ref();
|
17968
17990
|
const controlHeight = vue.ref('');
|
17969
17991
|
const textareaRef = vue.ref();
|
17970
|
-
const isActive = vue.computed(() => isFocused.value || props.
|
17992
|
+
const isActive = vue.computed(() => props.persistentPlaceholder || isFocused.value || props.active);
|
17971
17993
|
function onFocus() {
|
17972
17994
|
if (textareaRef.value !== document.activeElement) {
|
17973
17995
|
textareaRef.value?.focus();
|
@@ -19658,6 +19680,11 @@
|
|
19658
19680
|
if (itemsPerPage.value === -1 || itemsLength.value === 0) return 1;
|
19659
19681
|
return Math.ceil(itemsLength.value / itemsPerPage.value);
|
19660
19682
|
});
|
19683
|
+
vue.watchEffect(() => {
|
19684
|
+
if (page.value > pageCount.value) {
|
19685
|
+
page.value = pageCount.value;
|
19686
|
+
}
|
19687
|
+
});
|
19661
19688
|
function setItemsPerPage(value) {
|
19662
19689
|
itemsPerPage.value = value;
|
19663
19690
|
page.value = 1;
|
@@ -19921,6 +19948,11 @@
|
|
19921
19948
|
width: [String, Number],
|
19922
19949
|
fixedHeader: Boolean,
|
19923
19950
|
fixedFooter: Boolean,
|
19951
|
+
loading: [Boolean, String],
|
19952
|
+
loadingText: {
|
19953
|
+
type: String,
|
19954
|
+
default: '$vuetify.dataIterator.loadingText'
|
19955
|
+
},
|
19924
19956
|
'onClick:row': Function,
|
19925
19957
|
search: String
|
19926
19958
|
}, 'v-data-table');
|
@@ -20028,12 +20060,15 @@
|
|
20028
20060
|
provideDefaults({
|
20029
20061
|
VDataTableRows: {
|
20030
20062
|
hideNoData: vue.toRef(props, 'hideNoData'),
|
20031
|
-
noDataText: vue.toRef(props, 'noDataText')
|
20063
|
+
noDataText: vue.toRef(props, 'noDataText'),
|
20064
|
+
loading: vue.toRef(props, 'loading'),
|
20065
|
+
loadingText: vue.toRef(props, 'loadingText')
|
20032
20066
|
}
|
20033
20067
|
});
|
20034
20068
|
useRender(() => vue.createVNode(VTable, {
|
20035
20069
|
"class": ['v-data-table', {
|
20036
|
-
'v-data-table--show-select': props.showSelect
|
20070
|
+
'v-data-table--show-select': props.showSelect,
|
20071
|
+
'v-data-table--loading': props.loading
|
20037
20072
|
}],
|
20038
20073
|
"fixedHeader": props.fixedHeader,
|
20039
20074
|
"fixedFooter": props.fixedFooter,
|
@@ -20045,6 +20080,7 @@
|
|
20045
20080
|
columns
|
20046
20081
|
}), vue.createVNode("thead", null, [vue.createVNode(VDataTableHeaders, {
|
20047
20082
|
"sticky": props.fixedHeader,
|
20083
|
+
"loading": props.loading,
|
20048
20084
|
"multiSort": props.multiSort
|
20049
20085
|
}, slots)]), slots.thead?.(), vue.createVNode("tbody", null, [slots.body ? slots.body() : vue.createVNode(VDataTableRows, {
|
20050
20086
|
"items": paginatedItems.value,
|
@@ -20234,11 +20270,15 @@
|
|
20234
20270
|
provideDefaults({
|
20235
20271
|
VDataTableRows: {
|
20236
20272
|
hideNoData: vue.toRef(props, 'hideNoData'),
|
20237
|
-
noDataText: vue.toRef(props, 'noDataText')
|
20273
|
+
noDataText: vue.toRef(props, 'noDataText'),
|
20274
|
+
loading: vue.toRef(props, 'loading'),
|
20275
|
+
loadingText: vue.toRef(props, 'loadingText')
|
20238
20276
|
}
|
20239
20277
|
});
|
20240
20278
|
useRender(() => vue.createVNode(VTable, {
|
20241
|
-
"class":
|
20279
|
+
"class": ['v-data-table', {
|
20280
|
+
'v-data-table--loading': props.loading
|
20281
|
+
}],
|
20242
20282
|
"style": {
|
20243
20283
|
'--v-table-row-height': convertToUnit(itemHeight.value)
|
20244
20284
|
},
|
@@ -20257,6 +20297,7 @@
|
|
20257
20297
|
}
|
20258
20298
|
}, [vue.createVNode("table", null, [vue.createVNode("thead", null, [vue.createVNode(VDataTableHeaders, {
|
20259
20299
|
"sticky": props.fixedHeader,
|
20300
|
+
"loading": props.loading,
|
20260
20301
|
"multiSort": props.multiSort
|
20261
20302
|
}, slots)]), vue.createVNode("tbody", null, [vue.createVNode("tr", {
|
20262
20303
|
"style": {
|
@@ -20295,11 +20336,6 @@
|
|
20295
20336
|
name: 'VDataTableServer',
|
20296
20337
|
props: {
|
20297
20338
|
color: String,
|
20298
|
-
loading: [Boolean, String],
|
20299
|
-
loadingText: {
|
20300
|
-
type: String,
|
20301
|
-
default: '$vuetify.dataIterator.loadingText'
|
20302
|
-
},
|
20303
20339
|
itemsLength: {
|
20304
20340
|
type: [Number, String],
|
20305
20341
|
required: true
|
@@ -21533,7 +21569,7 @@
|
|
21533
21569
|
date
|
21534
21570
|
};
|
21535
21571
|
}
|
21536
|
-
const version$1 = "4.0.0-dev-
|
21572
|
+
const version$1 = "4.0.0-dev-20230511.0";
|
21537
21573
|
createVuetify$1.version = version$1;
|
21538
21574
|
|
21539
21575
|
// Vue's inject() can only be used in setup
|
@@ -21545,7 +21581,7 @@
|
|
21545
21581
|
}
|
21546
21582
|
}
|
21547
21583
|
|
21548
|
-
const version = "4.0.0-dev-
|
21584
|
+
const version = "4.0.0-dev-20230511.0";
|
21549
21585
|
|
21550
21586
|
const createVuetify = function () {
|
21551
21587
|
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|