vuetify 3.5.3 → 3.5.5
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/dist/json/attributes.json +2771 -2523
- package/dist/json/importMap-labs.json +12 -8
- package/dist/json/importMap.json +100 -100
- package/dist/json/tags.json +236 -169
- package/dist/json/web-types.json +3218 -2563
- package/dist/vuetify-labs.css +2265 -2242
- package/dist/vuetify-labs.d.ts +1234 -152
- package/dist/vuetify-labs.esm.js +582 -88
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +582 -88
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +1316 -1293
- package/dist/vuetify.d.ts +894 -187
- package/dist/vuetify.esm.js +148 -87
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +148 -87
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +652 -647
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VAlert/index.d.mts +9 -0
- package/lib/components/VAppBar/index.d.mts +18 -0
- package/lib/components/VAutocomplete/VAutocomplete.mjs +4 -4
- package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
- package/lib/components/VAutocomplete/index.d.mts +33 -6
- package/lib/components/VAvatar/VAvatar.mjs +2 -2
- package/lib/components/VAvatar/VAvatar.mjs.map +1 -1
- package/lib/components/VAvatar/index.d.mts +9 -0
- package/lib/components/VBadge/index.d.mts +9 -0
- package/lib/components/VBanner/index.d.mts +9 -0
- package/lib/components/VBottomNavigation/index.d.mts +9 -0
- package/lib/components/VBreadcrumbs/index.d.mts +9 -0
- package/lib/components/VBtn/index.d.mts +9 -0
- package/lib/components/VBtnGroup/index.d.mts +9 -0
- package/lib/components/VBtnToggle/index.d.mts +9 -0
- package/lib/components/VCard/index.d.mts +9 -0
- package/lib/components/VCarousel/index.d.mts +9 -0
- package/lib/components/VChip/index.d.mts +9 -0
- package/lib/components/VColorPicker/VColorPicker.mjs +24 -12
- package/lib/components/VColorPicker/VColorPicker.mjs.map +1 -1
- package/lib/components/VColorPicker/index.d.mts +9 -0
- package/lib/components/VCombobox/index.d.mts +33 -6
- package/lib/components/VDataIterator/index.d.mts +3 -3
- package/lib/components/VDataTable/VDataTable.mjs.map +1 -1
- package/lib/components/VDataTable/VDataTableHeaders.mjs.map +1 -1
- package/lib/components/VDataTable/index.d.mts +355 -117
- package/lib/components/VDataTable/types.mjs.map +1 -1
- package/lib/components/VDatePicker/VDatePicker.css +2 -21
- package/lib/components/VDatePicker/VDatePicker.mjs +15 -11
- package/lib/components/VDatePicker/VDatePicker.mjs.map +1 -1
- package/lib/components/VDatePicker/VDatePicker.sass +3 -18
- package/lib/components/VDatePicker/VDatePickerHeader.css +2 -0
- package/lib/components/VDatePicker/VDatePickerHeader.sass +3 -0
- package/lib/components/VDatePicker/VDatePickerMonth.css +11 -5
- package/lib/components/VDatePicker/VDatePickerMonth.mjs +2 -1
- package/lib/components/VDatePicker/VDatePickerMonth.mjs.map +1 -1
- package/lib/components/VDatePicker/VDatePickerMonth.sass +13 -5
- package/lib/components/VDatePicker/VDatePickerMonths.css +2 -3
- package/lib/components/VDatePicker/VDatePickerMonths.mjs +6 -3
- package/lib/components/VDatePicker/VDatePickerMonths.mjs.map +1 -1
- package/lib/components/VDatePicker/VDatePickerMonths.sass +4 -3
- package/lib/components/VDatePicker/VDatePickerYears.css +2 -2
- package/lib/components/VDatePicker/VDatePickerYears.mjs +8 -1
- package/lib/components/VDatePicker/VDatePickerYears.mjs.map +1 -1
- package/lib/components/VDatePicker/VDatePickerYears.sass +4 -2
- package/lib/components/VDatePicker/_variables.scss +14 -34
- package/lib/components/VDatePicker/index.d.mts +13 -4
- package/lib/components/VExpansionPanel/VExpansionPanel.css +14 -0
- package/lib/components/VExpansionPanel/VExpansionPanel.sass +14 -0
- package/lib/components/VExpansionPanel/VExpansionPanels.mjs +9 -2
- package/lib/components/VExpansionPanel/VExpansionPanels.mjs.map +1 -1
- package/lib/components/VExpansionPanel/index.d.mts +27 -0
- package/lib/components/VField/VField.css +20 -1
- package/lib/components/VField/VField.sass +19 -1
- package/lib/components/VField/index.d.mts +9 -0
- package/lib/components/VFileInput/VFileInput.mjs +1 -1
- package/lib/components/VFileInput/VFileInput.mjs.map +1 -1
- package/lib/components/VFileInput/index.d.mts +9 -0
- package/lib/components/VFooter/index.d.mts +9 -0
- package/lib/components/VImg/index.d.mts +9 -0
- package/lib/components/VList/VListItem.css +2 -1
- package/lib/components/VList/VListItem.sass +1 -0
- package/lib/components/VList/_variables.scss +2 -1
- package/lib/components/VList/index.d.mts +18 -0
- package/lib/components/VMenu/VMenu.mjs +5 -5
- package/lib/components/VMenu/VMenu.mjs.map +1 -1
- package/lib/components/VMenu/shared.mjs.map +1 -1
- package/lib/components/VNavigationDrawer/index.d.mts +9 -0
- package/lib/components/VPagination/index.d.mts +9 -0
- package/lib/components/VProgressLinear/index.d.mts +9 -0
- package/lib/components/VRangeSlider/index.d.mts +9 -0
- package/lib/components/VSelect/VSelect.mjs +4 -3
- package/lib/components/VSelect/VSelect.mjs.map +1 -1
- package/lib/components/VSelect/index.d.mts +33 -6
- package/lib/components/VSheet/index.d.mts +9 -0
- package/lib/components/VSlider/index.d.mts +9 -0
- package/lib/components/VSnackbar/VSnackbar.mjs +1 -2
- package/lib/components/VSnackbar/VSnackbar.mjs.map +1 -1
- package/lib/components/VSnackbar/index.d.mts +9 -0
- package/lib/components/VStepper/index.d.mts +9 -0
- package/lib/components/VSystemBar/index.d.mts +9 -0
- package/lib/components/VTabs/index.d.mts +33 -6
- package/lib/components/VTextField/index.d.mts +33 -6
- package/lib/components/VTextarea/index.d.mts +9 -0
- package/lib/components/VTimeline/index.d.mts +9 -0
- package/lib/components/VToolbar/index.d.mts +9 -0
- package/lib/components/VTooltip/VTooltip.css +1 -0
- package/lib/components/VTooltip/VTooltip.sass +1 -0
- package/lib/components/VTooltip/_variables.scss +1 -0
- package/lib/components/index.d.mts +857 -151
- package/lib/composables/form.mjs +2 -1
- package/lib/composables/form.mjs.map +1 -1
- package/lib/composables/goto.mjs +16 -18
- package/lib/composables/goto.mjs.map +1 -1
- package/lib/composables/group.mjs +2 -0
- package/lib/composables/group.mjs.map +1 -1
- package/lib/composables/icons.mjs +17 -13
- package/lib/composables/icons.mjs.map +1 -1
- package/lib/composables/rounded.mjs +5 -1
- package/lib/composables/rounded.mjs.map +1 -1
- package/lib/composables/virtual.mjs +11 -3
- package/lib/composables/virtual.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/framework.mjs +1 -1
- package/lib/iconsets/fa-svg.mjs +2 -1
- package/lib/iconsets/fa-svg.mjs.map +1 -1
- package/lib/index.d.mts +37 -36
- package/lib/labs/VCalendar/VCalendar.mjs +1 -1
- package/lib/labs/VCalendar/VCalendar.mjs.map +1 -1
- package/lib/labs/VConfirmEdit/__test__/VConfirmEdit.spec.cy.mjs +1 -1
- package/lib/labs/VConfirmEdit/__test__/VConfirmEdit.spec.cy.mjs.map +1 -1
- package/lib/labs/VPicker/VPicker.css +2 -2
- package/lib/labs/VPicker/VPicker.sass +2 -2
- package/lib/labs/VPicker/_variables.scss +2 -4
- package/lib/labs/VPicker/index.d.mts +9 -0
- package/lib/labs/VSparkline/VBarline.mjs +138 -0
- package/lib/labs/VSparkline/VBarline.mjs.map +1 -0
- package/lib/labs/VSparkline/VSparkline.mjs +49 -0
- package/lib/labs/VSparkline/VSparkline.mjs.map +1 -0
- package/lib/labs/VSparkline/VTrendline.mjs +143 -0
- package/lib/labs/VSparkline/VTrendline.mjs.map +1 -0
- package/lib/labs/VSparkline/index.d.mts +374 -0
- package/lib/labs/VSparkline/index.mjs +2 -0
- package/lib/labs/VSparkline/index.mjs.map +1 -0
- package/lib/labs/VSparkline/util/line.mjs +52 -0
- package/lib/labs/VSparkline/util/line.mjs.map +1 -0
- package/lib/labs/VSparkline/util/path.mjs +60 -0
- package/lib/labs/VSparkline/util/path.mjs.map +1 -0
- package/lib/labs/components.d.mts +376 -1
- package/lib/labs/components.mjs +1 -0
- package/lib/labs/components.mjs.map +1 -1
- package/lib/locale/nl.mjs +1 -1
- package/lib/locale/nl.mjs.map +1 -1
- package/lib/util/helpers.mjs +10 -0
- package/lib/util/helpers.mjs.map +1 -1
- package/package.json +2 -2
- package/lib/components/VDatePicker/VDatePickerTitle.mjs +0 -81
- package/lib/components/VDatePicker/VDatePickerTitle.mjs.map +0 -1
- package/lib/components/VDatePicker/VDatePickerTitle.sass +0 -33
package/dist/vuetify-labs.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Vuetify v3.5.
|
|
2
|
+
* Vuetify v3.5.5
|
|
3
3
|
* Forged by John Leider
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -545,6 +545,16 @@ function defer(timeout, cb) {
|
|
|
545
545
|
const timeoutId = window.setTimeout(cb, timeout);
|
|
546
546
|
return () => window.clearTimeout(timeoutId);
|
|
547
547
|
}
|
|
548
|
+
function isClickInsideElement(event, targetDiv) {
|
|
549
|
+
const mouseX = event.clientX;
|
|
550
|
+
const mouseY = event.clientY;
|
|
551
|
+
const divRect = targetDiv.getBoundingClientRect();
|
|
552
|
+
const divLeft = divRect.left;
|
|
553
|
+
const divTop = divRect.top;
|
|
554
|
+
const divRight = divRect.right;
|
|
555
|
+
const divBottom = divRect.bottom;
|
|
556
|
+
return mouseX >= divLeft && mouseX <= divRight && mouseY >= divTop && mouseY <= divBottom;
|
|
557
|
+
}
|
|
548
558
|
|
|
549
559
|
// Utilities
|
|
550
560
|
const block = ['top', 'bottom'];
|
|
@@ -2156,7 +2166,7 @@ function provideLocale(props) {
|
|
|
2156
2166
|
provide(LocaleSymbol, data);
|
|
2157
2167
|
return data;
|
|
2158
2168
|
}
|
|
2159
|
-
function genDefaults$
|
|
2169
|
+
function genDefaults$3() {
|
|
2160
2170
|
return {
|
|
2161
2171
|
af: false,
|
|
2162
2172
|
ar: true,
|
|
@@ -2203,7 +2213,7 @@ function genDefaults$2() {
|
|
|
2203
2213
|
};
|
|
2204
2214
|
}
|
|
2205
2215
|
function createRtl(i18n, options) {
|
|
2206
|
-
const rtl = ref(options?.rtl ?? genDefaults$
|
|
2216
|
+
const rtl = ref(options?.rtl ?? genDefaults$3());
|
|
2207
2217
|
const isRtl = computed(() => rtl.value[i18n.current.value] ?? false);
|
|
2208
2218
|
return {
|
|
2209
2219
|
isRtl,
|
|
@@ -2236,7 +2246,7 @@ const ThemeSymbol = Symbol.for('vuetify:theme');
|
|
|
2236
2246
|
const makeThemeProps = propsFactory({
|
|
2237
2247
|
theme: String
|
|
2238
2248
|
}, 'theme');
|
|
2239
|
-
function genDefaults$
|
|
2249
|
+
function genDefaults$2() {
|
|
2240
2250
|
return {
|
|
2241
2251
|
defaultTheme: 'light',
|
|
2242
2252
|
variations: {
|
|
@@ -2323,8 +2333,8 @@ function genDefaults$1() {
|
|
|
2323
2333
|
};
|
|
2324
2334
|
}
|
|
2325
2335
|
function parseThemeOptions() {
|
|
2326
|
-
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : genDefaults$
|
|
2327
|
-
const defaults = genDefaults$
|
|
2336
|
+
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : genDefaults$2();
|
|
2337
|
+
const defaults = genDefaults$2();
|
|
2328
2338
|
if (!options) return {
|
|
2329
2339
|
...defaults,
|
|
2330
2340
|
isDisabled: true
|
|
@@ -3107,12 +3117,14 @@ const makeRoundedProps = propsFactory({
|
|
|
3107
3117
|
rounded: {
|
|
3108
3118
|
type: [Boolean, Number, String],
|
|
3109
3119
|
default: undefined
|
|
3110
|
-
}
|
|
3120
|
+
},
|
|
3121
|
+
tile: Boolean
|
|
3111
3122
|
}, 'rounded');
|
|
3112
3123
|
function useRounded(props) {
|
|
3113
3124
|
let name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getCurrentInstanceName();
|
|
3114
3125
|
const roundedClasses = computed(() => {
|
|
3115
3126
|
const rounded = isRef(props) ? props.value : props.rounded;
|
|
3127
|
+
const tile = isRef(props) ? props.value : props.tile;
|
|
3116
3128
|
const classes = [];
|
|
3117
3129
|
if (rounded === true || rounded === '') {
|
|
3118
3130
|
classes.push(`${name}--rounded`);
|
|
@@ -3120,6 +3132,8 @@ function useRounded(props) {
|
|
|
3120
3132
|
for (const value of String(rounded).split(' ')) {
|
|
3121
3133
|
classes.push(`rounded-${value}`);
|
|
3122
3134
|
}
|
|
3135
|
+
} else if (tile) {
|
|
3136
|
+
classes.push('rounded-0');
|
|
3123
3137
|
}
|
|
3124
3138
|
return classes;
|
|
3125
3139
|
});
|
|
@@ -4110,6 +4124,8 @@ function useGroupItem(props, injectKey) {
|
|
|
4110
4124
|
vm.emit('group:selected', {
|
|
4111
4125
|
value
|
|
4112
4126
|
});
|
|
4127
|
+
}, {
|
|
4128
|
+
flush: 'sync'
|
|
4113
4129
|
});
|
|
4114
4130
|
return {
|
|
4115
4131
|
id,
|
|
@@ -4445,23 +4461,27 @@ const VClassIcon = defineComponent({
|
|
|
4445
4461
|
};
|
|
4446
4462
|
}
|
|
4447
4463
|
});
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
}
|
|
4464
|
+
function genDefaults$1() {
|
|
4465
|
+
return {
|
|
4466
|
+
svg: {
|
|
4467
|
+
component: VSvgIcon
|
|
4468
|
+
},
|
|
4469
|
+
class: {
|
|
4470
|
+
component: VClassIcon
|
|
4471
|
+
}
|
|
4472
|
+
};
|
|
4473
|
+
}
|
|
4456
4474
|
|
|
4457
4475
|
// Composables
|
|
4458
4476
|
function createIcons(options) {
|
|
4477
|
+
const sets = genDefaults$1();
|
|
4478
|
+
const defaultSet = options?.defaultSet ?? 'mdi';
|
|
4479
|
+
if (defaultSet === 'mdi' && !sets.mdi) {
|
|
4480
|
+
sets.mdi = mdi;
|
|
4481
|
+
}
|
|
4459
4482
|
return mergeDeep({
|
|
4460
|
-
defaultSet
|
|
4461
|
-
sets
|
|
4462
|
-
...defaultSets,
|
|
4463
|
-
mdi
|
|
4464
|
-
},
|
|
4483
|
+
defaultSet,
|
|
4484
|
+
sets,
|
|
4465
4485
|
aliases: {
|
|
4466
4486
|
...aliases,
|
|
4467
4487
|
/* eslint-disable max-len */
|
|
@@ -5897,7 +5917,7 @@ const VAvatar = genericComponent()({
|
|
|
5897
5917
|
}, null) : props.text : createVNode(VDefaultsProvider, {
|
|
5898
5918
|
"key": "content-defaults",
|
|
5899
5919
|
"defaults": {
|
|
5900
|
-
|
|
5920
|
+
VImg: {
|
|
5901
5921
|
cover: true,
|
|
5902
5922
|
image: props.image
|
|
5903
5923
|
},
|
|
@@ -5906,7 +5926,7 @@ const VAvatar = genericComponent()({
|
|
|
5906
5926
|
}
|
|
5907
5927
|
}
|
|
5908
5928
|
}, {
|
|
5909
|
-
default: () => [slots.default
|
|
5929
|
+
default: () => [slots.default()]
|
|
5910
5930
|
}), genOverlays(false, 'v-avatar')]
|
|
5911
5931
|
}));
|
|
5912
5932
|
return {};
|
|
@@ -6465,7 +6485,8 @@ function createForm(props) {
|
|
|
6465
6485
|
errors.value = results;
|
|
6466
6486
|
model.value = invalid > 0 ? false : valid === items.value.length ? true : null;
|
|
6467
6487
|
}, {
|
|
6468
|
-
deep: true
|
|
6488
|
+
deep: true,
|
|
6489
|
+
flush: 'post'
|
|
6469
6490
|
});
|
|
6470
6491
|
provide(FormKey, {
|
|
6471
6492
|
register: _ref => {
|
|
@@ -10569,9 +10590,9 @@ const VMenu = genericComponent()({
|
|
|
10569
10590
|
unregister() {
|
|
10570
10591
|
--openChildren.value;
|
|
10571
10592
|
},
|
|
10572
|
-
closeParents() {
|
|
10593
|
+
closeParents(e) {
|
|
10573
10594
|
setTimeout(() => {
|
|
10574
|
-
if (!openChildren.value) {
|
|
10595
|
+
if (!openChildren.value && (e == null || e && !isClickInsideElement(e, overlay.value.contentEl))) {
|
|
10575
10596
|
isActive.value = false;
|
|
10576
10597
|
parent?.closeParents();
|
|
10577
10598
|
}
|
|
@@ -10604,8 +10625,8 @@ const VMenu = genericComponent()({
|
|
|
10604
10625
|
document.removeEventListener('focusin', onFocusIn);
|
|
10605
10626
|
}
|
|
10606
10627
|
});
|
|
10607
|
-
function onClickOutside() {
|
|
10608
|
-
parent?.closeParents();
|
|
10628
|
+
function onClickOutside(e) {
|
|
10629
|
+
parent?.closeParents(e);
|
|
10609
10630
|
}
|
|
10610
10631
|
function onKeydown(e) {
|
|
10611
10632
|
if (props.disabled) return;
|
|
@@ -11339,9 +11360,6 @@ function useVirtual(props, items) {
|
|
|
11339
11360
|
});
|
|
11340
11361
|
});
|
|
11341
11362
|
});
|
|
11342
|
-
watch(viewportHeight, (val, oldVal) => {
|
|
11343
|
-
oldVal && calculateVisibleItems();
|
|
11344
|
-
});
|
|
11345
11363
|
onScopeDispose(() => {
|
|
11346
11364
|
updateOffsets.clear();
|
|
11347
11365
|
});
|
|
@@ -11364,6 +11382,17 @@ function useVirtual(props, items) {
|
|
|
11364
11382
|
let lastScrollTop = 0;
|
|
11365
11383
|
let scrollVelocity = 0;
|
|
11366
11384
|
let lastScrollTime = 0;
|
|
11385
|
+
watch(viewportHeight, (val, oldVal) => {
|
|
11386
|
+
if (oldVal) {
|
|
11387
|
+
calculateVisibleItems();
|
|
11388
|
+
if (val < oldVal) {
|
|
11389
|
+
requestAnimationFrame(() => {
|
|
11390
|
+
scrollVelocity = 0;
|
|
11391
|
+
calculateVisibleItems();
|
|
11392
|
+
});
|
|
11393
|
+
}
|
|
11394
|
+
}
|
|
11395
|
+
});
|
|
11367
11396
|
function handleScroll() {
|
|
11368
11397
|
if (!containerRef.value || !markerRef.value) return;
|
|
11369
11398
|
const scrollTop = containerRef.value.scrollTop;
|
|
@@ -11816,9 +11845,10 @@ const VSelect = genericComponent()({
|
|
|
11816
11845
|
}
|
|
11817
11846
|
}
|
|
11818
11847
|
function select(item) {
|
|
11848
|
+
const index = model.value.findIndex(selection => props.valueComparator(selection.value, item.value));
|
|
11849
|
+
const add = index === -1;
|
|
11819
11850
|
if (props.multiple) {
|
|
11820
|
-
|
|
11821
|
-
if (index === -1) {
|
|
11851
|
+
if (add) {
|
|
11822
11852
|
model.value = [...model.value, item];
|
|
11823
11853
|
} else {
|
|
11824
11854
|
const value = [...model.value];
|
|
@@ -11826,7 +11856,7 @@ const VSelect = genericComponent()({
|
|
|
11826
11856
|
model.value = value;
|
|
11827
11857
|
}
|
|
11828
11858
|
} else {
|
|
11829
|
-
model.value = [item];
|
|
11859
|
+
model.value = add ? [item] : [];
|
|
11830
11860
|
menu.value = false;
|
|
11831
11861
|
}
|
|
11832
11862
|
}
|
|
@@ -12363,11 +12393,11 @@ const VAutocomplete = genericComponent()({
|
|
|
12363
12393
|
}
|
|
12364
12394
|
const isSelecting = shallowRef(false);
|
|
12365
12395
|
function select(item) {
|
|
12366
|
-
let add = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
12367
12396
|
if (item.props.disabled) return;
|
|
12397
|
+
const index = model.value.findIndex(selection => props.valueComparator(selection.value, item.value));
|
|
12398
|
+
const add = index === -1;
|
|
12368
12399
|
if (props.multiple) {
|
|
12369
|
-
|
|
12370
|
-
if (index === -1) {
|
|
12400
|
+
if (add) {
|
|
12371
12401
|
model.value = [...model.value, item];
|
|
12372
12402
|
} else {
|
|
12373
12403
|
const value = [...model.value];
|
|
@@ -12536,7 +12566,7 @@ const VAutocomplete = genericComponent()({
|
|
|
12536
12566
|
function onChipClose(e) {
|
|
12537
12567
|
e.stopPropagation();
|
|
12538
12568
|
e.preventDefault();
|
|
12539
|
-
select(item
|
|
12569
|
+
select(item);
|
|
12540
12570
|
}
|
|
12541
12571
|
const slotProps = {
|
|
12542
12572
|
'onClick:close': onChipClose,
|
|
@@ -15808,8 +15838,8 @@ const VColorPicker = defineComponent({
|
|
|
15808
15838
|
},
|
|
15809
15839
|
setup(props) {
|
|
15810
15840
|
const mode = useProxiedModel(props, 'mode');
|
|
15811
|
-
const
|
|
15812
|
-
const
|
|
15841
|
+
const hue = ref(null);
|
|
15842
|
+
const model = useProxiedModel(props, 'modelValue', undefined, v => {
|
|
15813
15843
|
if (v == null || v === '') return null;
|
|
15814
15844
|
let c;
|
|
15815
15845
|
try {
|
|
@@ -15818,24 +15848,36 @@ const VColorPicker = defineComponent({
|
|
|
15818
15848
|
consoleWarn(err);
|
|
15819
15849
|
return null;
|
|
15820
15850
|
}
|
|
15821
|
-
if (lastPickedColor.value) {
|
|
15822
|
-
c = {
|
|
15823
|
-
...c,
|
|
15824
|
-
h: lastPickedColor.value.h
|
|
15825
|
-
};
|
|
15826
|
-
lastPickedColor.value = null;
|
|
15827
|
-
}
|
|
15828
15851
|
return c;
|
|
15829
15852
|
}, v => {
|
|
15830
15853
|
if (!v) return null;
|
|
15831
15854
|
return extractColor(v, props.modelValue);
|
|
15832
15855
|
});
|
|
15856
|
+
const currentColor = computed(() => {
|
|
15857
|
+
return model.value ? {
|
|
15858
|
+
...model.value,
|
|
15859
|
+
h: hue.value ?? model.value.h
|
|
15860
|
+
} : null;
|
|
15861
|
+
});
|
|
15833
15862
|
const {
|
|
15834
15863
|
rtlClasses
|
|
15835
15864
|
} = useRtl();
|
|
15865
|
+
let externalChange = true;
|
|
15866
|
+
watch(model, v => {
|
|
15867
|
+
if (!externalChange) {
|
|
15868
|
+
// prevent hue shift from rgb conversion inaccuracy
|
|
15869
|
+
externalChange = true;
|
|
15870
|
+
return;
|
|
15871
|
+
}
|
|
15872
|
+
if (!v) return;
|
|
15873
|
+
hue.value = v.h;
|
|
15874
|
+
}, {
|
|
15875
|
+
immediate: true
|
|
15876
|
+
});
|
|
15836
15877
|
const updateColor = hsva => {
|
|
15837
|
-
|
|
15838
|
-
|
|
15878
|
+
externalChange = false;
|
|
15879
|
+
hue.value = hsva.h;
|
|
15880
|
+
model.value = hsva;
|
|
15839
15881
|
};
|
|
15840
15882
|
onMounted(() => {
|
|
15841
15883
|
if (!props.modes.includes(mode.value)) mode.value = props.modes[0];
|
|
@@ -17605,7 +17647,8 @@ function createGoTo(options, locale) {
|
|
|
17605
17647
|
};
|
|
17606
17648
|
}
|
|
17607
17649
|
async function scrollTo(_target, _options, horizontal, goTo) {
|
|
17608
|
-
const
|
|
17650
|
+
const property = horizontal ? 'scrollLeft' : 'scrollTop';
|
|
17651
|
+
const options = mergeDeep(goTo?.options ?? genDefaults(), _options);
|
|
17609
17652
|
const rtl = goTo?.rtl.value;
|
|
17610
17653
|
const target = (typeof _target === 'number' ? _target : getTarget(_target)) ?? 0;
|
|
17611
17654
|
const container = options.container === 'parent' && target instanceof HTMLElement ? target.parentElement : getContainer(options.container);
|
|
@@ -17623,25 +17666,22 @@ async function scrollTo(_target, _options, horizontal, goTo) {
|
|
|
17623
17666
|
}
|
|
17624
17667
|
}
|
|
17625
17668
|
targetLocation += options.offset;
|
|
17626
|
-
const startLocation =
|
|
17669
|
+
const startLocation = container[property] ?? 0;
|
|
17627
17670
|
if (targetLocation === startLocation) return Promise.resolve(targetLocation);
|
|
17628
17671
|
const startTime = performance.now();
|
|
17629
17672
|
return new Promise(resolve => requestAnimationFrame(function step(currentTime) {
|
|
17630
17673
|
const timeElapsed = currentTime - startTime;
|
|
17631
|
-
const progress =
|
|
17632
|
-
const location = Math.floor(startLocation + (targetLocation - startLocation) * ease(progress));
|
|
17633
|
-
container[
|
|
17634
|
-
|
|
17635
|
-
|
|
17636
|
-
|
|
17637
|
-
|
|
17638
|
-
|
|
17639
|
-
|
|
17640
|
-
|
|
17641
|
-
|
|
17642
|
-
clientSize = container === document.body ? document.documentElement.clientWidth : container.clientWidth;
|
|
17643
|
-
reachEnd = clientSize + container.scrollLeft >= container.scrollWidth;
|
|
17644
|
-
if (targetLocation > container.scrollLeft && reachEnd) return resolve(targetLocation);
|
|
17674
|
+
const progress = timeElapsed / options.duration;
|
|
17675
|
+
const location = Math.floor(startLocation + (targetLocation - startLocation) * ease(Math.max(progress, 1)));
|
|
17676
|
+
container[property] = location;
|
|
17677
|
+
|
|
17678
|
+
// Allow for some jitter if target time has elapsed
|
|
17679
|
+
if (progress >= 1 && Math.abs(location - container[property]) < 10) {
|
|
17680
|
+
return resolve(targetLocation);
|
|
17681
|
+
} else if (progress > 2) {
|
|
17682
|
+
// The target might not be reachable
|
|
17683
|
+
consoleWarn('Scroll target is not reachable');
|
|
17684
|
+
return resolve(container[property]);
|
|
17645
17685
|
}
|
|
17646
17686
|
requestAnimationFrame(step);
|
|
17647
17687
|
}));
|
|
@@ -20578,12 +20618,13 @@ const VDatePickerMonth = genericComponent()({
|
|
|
20578
20618
|
}, [(props.showAdjacentMonths || !item.isAdjacent) && createVNode(VDefaultsProvider, {
|
|
20579
20619
|
"defaults": {
|
|
20580
20620
|
VBtn: {
|
|
20621
|
+
class: 'v-date-picker-month__day-btn',
|
|
20581
20622
|
color: (item.isSelected || item.isToday) && !item.isDisabled ? props.color : undefined,
|
|
20582
20623
|
disabled: item.isDisabled,
|
|
20583
20624
|
icon: true,
|
|
20584
20625
|
ripple: false,
|
|
20585
20626
|
text: item.localized,
|
|
20586
|
-
variant: item.isDisabled ? 'text' : item.isToday && !item.isSelected ? 'outlined' : 'flat',
|
|
20627
|
+
variant: item.isDisabled ? item.isToday ? 'outlined' : 'text' : item.isToday && !item.isSelected ? 'outlined' : 'flat',
|
|
20587
20628
|
onClick: () => onClick(item.date)
|
|
20588
20629
|
}
|
|
20589
20630
|
}
|
|
@@ -20609,6 +20650,7 @@ const VDatePickerMonths = genericComponent()({
|
|
|
20609
20650
|
},
|
|
20610
20651
|
setup(props, _ref) {
|
|
20611
20652
|
let {
|
|
20653
|
+
emit,
|
|
20612
20654
|
slots
|
|
20613
20655
|
} = _ref;
|
|
20614
20656
|
const adapter = useDate();
|
|
@@ -20644,6 +20686,10 @@ const VDatePickerMonths = genericComponent()({
|
|
|
20644
20686
|
onClick: () => onClick(i)
|
|
20645
20687
|
};
|
|
20646
20688
|
function onClick(i) {
|
|
20689
|
+
if (model.value === i) {
|
|
20690
|
+
emit('update:modelValue', model.value);
|
|
20691
|
+
return;
|
|
20692
|
+
}
|
|
20647
20693
|
model.value = i;
|
|
20648
20694
|
}
|
|
20649
20695
|
return slots.month?.({
|
|
@@ -20652,9 +20698,7 @@ const VDatePickerMonths = genericComponent()({
|
|
|
20652
20698
|
props: btnProps
|
|
20653
20699
|
}) ?? createVNode(VBtn, mergeProps({
|
|
20654
20700
|
"key": "month"
|
|
20655
|
-
}, btnProps,
|
|
20656
|
-
"onClick": () => onClick(i)
|
|
20657
|
-
}), null);
|
|
20701
|
+
}, btnProps), null);
|
|
20658
20702
|
})])]));
|
|
20659
20703
|
return {};
|
|
20660
20704
|
}
|
|
@@ -20679,6 +20723,7 @@ const VDatePickerYears = genericComponent()({
|
|
|
20679
20723
|
},
|
|
20680
20724
|
setup(props, _ref) {
|
|
20681
20725
|
let {
|
|
20726
|
+
emit,
|
|
20682
20727
|
slots
|
|
20683
20728
|
} = _ref;
|
|
20684
20729
|
const adapter = useDate();
|
|
@@ -20729,7 +20774,13 @@ const VDatePickerYears = genericComponent()({
|
|
|
20729
20774
|
rounded: true,
|
|
20730
20775
|
text: year.text,
|
|
20731
20776
|
variant: model.value === year.value ? 'flat' : 'text',
|
|
20732
|
-
onClick: () =>
|
|
20777
|
+
onClick: () => {
|
|
20778
|
+
if (model.value === year.value) {
|
|
20779
|
+
emit('update:modelValue', model.value);
|
|
20780
|
+
return;
|
|
20781
|
+
}
|
|
20782
|
+
model.value = year.value;
|
|
20783
|
+
}
|
|
20733
20784
|
};
|
|
20734
20785
|
return slots.year?.({
|
|
20735
20786
|
year,
|
|
@@ -20879,7 +20930,7 @@ const VDatePicker = genericComponent()({
|
|
|
20879
20930
|
return props.multiple && model.value.length > 1 ? t('$vuetify.datePicker.itemsSelected', model.value.length) : model.value[0] && adapter.isValid(model.value[0]) ? adapter.format(model.value[0], 'normalDateWithWeekday') : t(props.header);
|
|
20880
20931
|
});
|
|
20881
20932
|
const text = computed(() => {
|
|
20882
|
-
return adapter.format(adapter.
|
|
20933
|
+
return adapter.format(adapter.date(new Date(year.value, month.value, 1)), 'monthAndYear');
|
|
20883
20934
|
});
|
|
20884
20935
|
// const headerIcon = computed(() => props.inputMode === 'calendar' ? props.keyboardIcon : props.calendarIcon)
|
|
20885
20936
|
const headerTransition = computed(() => `date-picker-header${isReversing.value ? '-reverse' : ''}-transition`);
|
|
@@ -20922,7 +20973,9 @@ const VDatePicker = genericComponent()({
|
|
|
20922
20973
|
} else {
|
|
20923
20974
|
year.value++;
|
|
20924
20975
|
month.value = 0;
|
|
20976
|
+
onUpdateYear(year.value);
|
|
20925
20977
|
}
|
|
20978
|
+
onUpdateMonth(month.value);
|
|
20926
20979
|
}
|
|
20927
20980
|
function onClickPrev() {
|
|
20928
20981
|
if (month.value > 0) {
|
|
@@ -20930,7 +20983,9 @@ const VDatePicker = genericComponent()({
|
|
|
20930
20983
|
} else {
|
|
20931
20984
|
year.value--;
|
|
20932
20985
|
month.value = 11;
|
|
20986
|
+
onUpdateYear(year.value);
|
|
20933
20987
|
}
|
|
20988
|
+
onUpdateMonth(month.value);
|
|
20934
20989
|
}
|
|
20935
20990
|
function onClickDate() {
|
|
20936
20991
|
viewMode.value = 'month';
|
|
@@ -20941,14 +20996,14 @@ const VDatePicker = genericComponent()({
|
|
|
20941
20996
|
function onClickYear() {
|
|
20942
20997
|
viewMode.value = viewMode.value === 'year' ? 'month' : 'year';
|
|
20943
20998
|
}
|
|
20944
|
-
|
|
20999
|
+
function onUpdateMonth(value) {
|
|
20945
21000
|
if (viewMode.value === 'months') onClickMonth();
|
|
20946
|
-
emit('update:month',
|
|
20947
|
-
}
|
|
20948
|
-
|
|
21001
|
+
emit('update:month', value);
|
|
21002
|
+
}
|
|
21003
|
+
function onUpdateYear(value) {
|
|
20949
21004
|
if (viewMode.value === 'year') onClickYear();
|
|
20950
|
-
emit('update:year',
|
|
20951
|
-
}
|
|
21005
|
+
emit('update:year', value);
|
|
21006
|
+
}
|
|
20952
21007
|
watch(model, (val, oldVal) => {
|
|
20953
21008
|
const before = adapter.date(wrapInArray(val)[0]);
|
|
20954
21009
|
const after = adapter.date(wrapInArray(oldVal)[0]);
|
|
@@ -21004,14 +21059,14 @@ const VDatePicker = genericComponent()({
|
|
|
21004
21059
|
"key": "date-picker-months"
|
|
21005
21060
|
}, datePickerMonthsProps, {
|
|
21006
21061
|
"modelValue": month.value,
|
|
21007
|
-
"onUpdate:modelValue": $event => month.value = $event,
|
|
21062
|
+
"onUpdate:modelValue": [$event => month.value = $event, onUpdateMonth],
|
|
21008
21063
|
"min": minDate.value,
|
|
21009
21064
|
"max": maxDate.value
|
|
21010
21065
|
}), null) : viewMode.value === 'year' ? createVNode(VDatePickerYears, mergeProps({
|
|
21011
21066
|
"key": "date-picker-years"
|
|
21012
21067
|
}, datePickerYearsProps, {
|
|
21013
21068
|
"modelValue": year.value,
|
|
21014
|
-
"onUpdate:modelValue": $event => year.value = $event,
|
|
21069
|
+
"onUpdate:modelValue": [$event => year.value = $event, onUpdateYear],
|
|
21015
21070
|
"min": minDate.value,
|
|
21016
21071
|
"max": maxDate.value
|
|
21017
21072
|
}), null) : createVNode(VDatePickerMonth, mergeProps({
|
|
@@ -21020,9 +21075,9 @@ const VDatePicker = genericComponent()({
|
|
|
21020
21075
|
"modelValue": model.value,
|
|
21021
21076
|
"onUpdate:modelValue": $event => model.value = $event,
|
|
21022
21077
|
"month": month.value,
|
|
21023
|
-
"onUpdate:month": $event => month.value = $event,
|
|
21078
|
+
"onUpdate:month": [$event => month.value = $event, onUpdateMonth],
|
|
21024
21079
|
"year": year.value,
|
|
21025
|
-
"onUpdate:year": $event => year.value = $event,
|
|
21080
|
+
"onUpdate:year": [$event => year.value = $event, onUpdateYear],
|
|
21026
21081
|
"min": minDate.value,
|
|
21027
21082
|
"max": maxDate.value
|
|
21028
21083
|
}), null)]
|
|
@@ -21040,7 +21095,9 @@ const VExpansionPanelSymbol = Symbol.for('vuetify:v-expansion-panel');
|
|
|
21040
21095
|
const allowedVariants = ['default', 'accordion', 'inset', 'popout'];
|
|
21041
21096
|
const makeVExpansionPanelsProps = propsFactory({
|
|
21042
21097
|
color: String,
|
|
21098
|
+
flat: Boolean,
|
|
21043
21099
|
static: Boolean,
|
|
21100
|
+
tile: Boolean,
|
|
21044
21101
|
variant: {
|
|
21045
21102
|
type: String,
|
|
21046
21103
|
default: 'default',
|
|
@@ -21070,12 +21127,17 @@ const VExpansionPanels = genericComponent()({
|
|
|
21070
21127
|
provideDefaults({
|
|
21071
21128
|
VExpansionPanel: {
|
|
21072
21129
|
color: toRef(props, 'color'),
|
|
21073
|
-
readonly: toRef(props, 'readonly')
|
|
21130
|
+
readonly: toRef(props, 'readonly')
|
|
21131
|
+
},
|
|
21132
|
+
VExpansionPanelTitle: {
|
|
21074
21133
|
static: toRef(props, 'static')
|
|
21075
21134
|
}
|
|
21076
21135
|
});
|
|
21077
21136
|
useRender(() => createVNode(props.tag, {
|
|
21078
|
-
"class": ['v-expansion-panels',
|
|
21137
|
+
"class": ['v-expansion-panels', {
|
|
21138
|
+
'v-expansion-panels--flat': props.flat,
|
|
21139
|
+
'v-expansion-panels--tile': props.tile
|
|
21140
|
+
}, themeClasses.value, variantClass.value, props.class],
|
|
21079
21141
|
"style": props.style
|
|
21080
21142
|
}, slots));
|
|
21081
21143
|
return {};
|
|
@@ -21359,7 +21421,7 @@ const VFileInput = genericComponent()({
|
|
|
21359
21421
|
if (!isFocused.value) focus();
|
|
21360
21422
|
}
|
|
21361
21423
|
function onClickPrepend(e) {
|
|
21362
|
-
|
|
21424
|
+
inputRef.value?.click();
|
|
21363
21425
|
}
|
|
21364
21426
|
function onControlMousedown(e) {
|
|
21365
21427
|
emit('mousedown:control', e);
|
|
@@ -23813,12 +23875,11 @@ const VSnackbar = genericComponent()({
|
|
|
23813
23875
|
"scrollStrategy": "none",
|
|
23814
23876
|
"_disableGlobalStack": true
|
|
23815
23877
|
}, scopeId), {
|
|
23816
|
-
default: () => [genOverlays(false, 'v-snackbar'), props.timer && createVNode("div", {
|
|
23878
|
+
default: () => [genOverlays(false, 'v-snackbar'), props.timer && !isHovering.value && createVNode("div", {
|
|
23817
23879
|
"key": "timer",
|
|
23818
23880
|
"class": "v-snackbar__timer"
|
|
23819
23881
|
}, [createVNode(VProgressLinear, {
|
|
23820
23882
|
"ref": timerRef,
|
|
23821
|
-
"active": !isHovering.value,
|
|
23822
23883
|
"color": typeof props.timer === 'string' ? props.timer : 'info',
|
|
23823
23884
|
"max": props.timeout,
|
|
23824
23885
|
"model-value": countdown.time.value
|
|
@@ -25802,7 +25863,7 @@ const VCalendar = genericComponent()({
|
|
|
25802
25863
|
}, [!props.hideWeekNumber ? createVNode("div", {
|
|
25803
25864
|
"key": "weekNumber0",
|
|
25804
25865
|
"class": "v-calendar-weekly__head-weeknumber"
|
|
25805
|
-
}, null) : '', props.weekdays.
|
|
25866
|
+
}, null) : '', props.weekdays.map(weekday => createVNode("div", {
|
|
25806
25867
|
"class": `v-calendar-weekly__head-weekday${!props.hideWeekNumber ? '-with-weeknumber' : ''}`
|
|
25807
25868
|
}, [dayNames[weekday]]))]), props.viewMode === 'month' && createVNode("div", {
|
|
25808
25869
|
"key": "VCalendarMonth",
|
|
@@ -25831,6 +25892,438 @@ const VCalendar = genericComponent()({
|
|
|
25831
25892
|
}
|
|
25832
25893
|
});
|
|
25833
25894
|
|
|
25895
|
+
// Utilities
|
|
25896
|
+
|
|
25897
|
+
// Types
|
|
25898
|
+
|
|
25899
|
+
const makeLineProps = propsFactory({
|
|
25900
|
+
autoDraw: Boolean,
|
|
25901
|
+
autoDrawDuration: [Number, String],
|
|
25902
|
+
autoDrawEasing: {
|
|
25903
|
+
type: String,
|
|
25904
|
+
default: 'ease'
|
|
25905
|
+
},
|
|
25906
|
+
color: String,
|
|
25907
|
+
gradient: {
|
|
25908
|
+
type: Array,
|
|
25909
|
+
default: () => []
|
|
25910
|
+
},
|
|
25911
|
+
gradientDirection: {
|
|
25912
|
+
type: String,
|
|
25913
|
+
validator: val => ['top', 'bottom', 'left', 'right'].includes(val),
|
|
25914
|
+
default: 'top'
|
|
25915
|
+
},
|
|
25916
|
+
height: {
|
|
25917
|
+
type: [String, Number],
|
|
25918
|
+
default: 75
|
|
25919
|
+
},
|
|
25920
|
+
labels: {
|
|
25921
|
+
type: Array,
|
|
25922
|
+
default: () => []
|
|
25923
|
+
},
|
|
25924
|
+
labelSize: {
|
|
25925
|
+
type: [Number, String],
|
|
25926
|
+
default: 7
|
|
25927
|
+
},
|
|
25928
|
+
lineWidth: {
|
|
25929
|
+
type: [String, Number],
|
|
25930
|
+
default: 4
|
|
25931
|
+
},
|
|
25932
|
+
id: String,
|
|
25933
|
+
modelValue: {
|
|
25934
|
+
type: Array,
|
|
25935
|
+
default: () => []
|
|
25936
|
+
},
|
|
25937
|
+
padding: {
|
|
25938
|
+
type: [String, Number],
|
|
25939
|
+
default: 8
|
|
25940
|
+
},
|
|
25941
|
+
showLabels: Boolean,
|
|
25942
|
+
smooth: Boolean,
|
|
25943
|
+
width: {
|
|
25944
|
+
type: [Number, String],
|
|
25945
|
+
default: 300
|
|
25946
|
+
}
|
|
25947
|
+
}, 'Line');
|
|
25948
|
+
|
|
25949
|
+
// Types
|
|
25950
|
+
|
|
25951
|
+
const makeVBarlineProps = propsFactory({
|
|
25952
|
+
autoLineWidth: Boolean,
|
|
25953
|
+
...makeLineProps()
|
|
25954
|
+
}, 'VBarline');
|
|
25955
|
+
const VBarline = genericComponent()({
|
|
25956
|
+
name: 'VBarline',
|
|
25957
|
+
props: makeVBarlineProps(),
|
|
25958
|
+
setup(props, _ref) {
|
|
25959
|
+
let {
|
|
25960
|
+
slots
|
|
25961
|
+
} = _ref;
|
|
25962
|
+
const uid = getUid();
|
|
25963
|
+
const id = computed(() => props.id || `barline-${uid}`);
|
|
25964
|
+
const autoDrawDuration = computed(() => Number(props.autoDrawDuration) || 500);
|
|
25965
|
+
const hasLabels = computed(() => {
|
|
25966
|
+
return Boolean(props.showLabels || props.labels.length > 0 || !!slots?.label);
|
|
25967
|
+
});
|
|
25968
|
+
const lineWidth = computed(() => parseFloat(props.lineWidth) || 4);
|
|
25969
|
+
const totalWidth = computed(() => Math.max(props.modelValue.length * lineWidth.value, Number(props.width)));
|
|
25970
|
+
const boundary = computed(() => {
|
|
25971
|
+
return {
|
|
25972
|
+
minX: 0,
|
|
25973
|
+
maxX: totalWidth.value,
|
|
25974
|
+
minY: 0,
|
|
25975
|
+
maxY: parseInt(props.height, 10)
|
|
25976
|
+
};
|
|
25977
|
+
});
|
|
25978
|
+
function genBars(values, boundary) {
|
|
25979
|
+
const {
|
|
25980
|
+
minX,
|
|
25981
|
+
maxX,
|
|
25982
|
+
minY,
|
|
25983
|
+
maxY
|
|
25984
|
+
} = boundary;
|
|
25985
|
+
const totalValues = values.length;
|
|
25986
|
+
let maxValue = Math.max(...values);
|
|
25987
|
+
let minValue = Math.min(...values);
|
|
25988
|
+
if (minValue > 0) minValue = 0;
|
|
25989
|
+
if (maxValue < 0) maxValue = 0;
|
|
25990
|
+
const gridX = maxX / totalValues;
|
|
25991
|
+
const gridY = (maxY - minY) / (maxValue - minValue || 1);
|
|
25992
|
+
const horizonY = maxY - Math.abs(minValue * gridY);
|
|
25993
|
+
return values.map((value, index) => {
|
|
25994
|
+
const height = Math.abs(gridY * value);
|
|
25995
|
+
return {
|
|
25996
|
+
x: minX + index * gridX,
|
|
25997
|
+
y: horizonY - height + +(value < 0) * height,
|
|
25998
|
+
height,
|
|
25999
|
+
value
|
|
26000
|
+
};
|
|
26001
|
+
});
|
|
26002
|
+
}
|
|
26003
|
+
const parsedLabels = computed(() => {
|
|
26004
|
+
const labels = [];
|
|
26005
|
+
const points = genBars(props.modelValue.map(item => typeof item === 'number' ? item : item.value), boundary.value);
|
|
26006
|
+
const len = points.length;
|
|
26007
|
+
for (let i = 0; labels.length < len; i++) {
|
|
26008
|
+
const item = points[i];
|
|
26009
|
+
let value = props.labels[i];
|
|
26010
|
+
if (!value) {
|
|
26011
|
+
value = typeof item === 'object' ? item.value : item;
|
|
26012
|
+
}
|
|
26013
|
+
labels.push({
|
|
26014
|
+
x: item.x,
|
|
26015
|
+
value: String(value)
|
|
26016
|
+
});
|
|
26017
|
+
}
|
|
26018
|
+
return labels;
|
|
26019
|
+
});
|
|
26020
|
+
const bars = computed(() => genBars(props.modelValue.map(item => typeof item === 'number' ? item : item.value), boundary.value));
|
|
26021
|
+
const offsetX = computed(() => (Math.abs(bars.value[0].x - bars.value[1].x) - lineWidth.value) / 2);
|
|
26022
|
+
useRender(() => {
|
|
26023
|
+
const gradientData = !props.gradient.slice().length ? [''] : props.gradient.slice().reverse();
|
|
26024
|
+
return createVNode("svg", {
|
|
26025
|
+
"display": "block"
|
|
26026
|
+
}, [createVNode("defs", null, [createVNode("linearGradient", {
|
|
26027
|
+
"id": id.value,
|
|
26028
|
+
"gradientUnits": "userSpaceOnUse",
|
|
26029
|
+
"x1": props.gradientDirection === 'left' ? '100%' : '0',
|
|
26030
|
+
"y1": props.gradientDirection === 'top' ? '100%' : '0',
|
|
26031
|
+
"x2": props.gradientDirection === 'right' ? '100%' : '0',
|
|
26032
|
+
"y2": props.gradientDirection === 'bottom' ? '100%' : '0'
|
|
26033
|
+
}, [gradientData.map((color, index) => createVNode("stop", {
|
|
26034
|
+
"offset": index / Math.max(gradientData.length - 1, 1),
|
|
26035
|
+
"stop-color": color || 'currentColor'
|
|
26036
|
+
}, null))])]), createVNode("clipPath", {
|
|
26037
|
+
"id": `${id.value}-clip`
|
|
26038
|
+
}, [bars.value.map(item => createVNode("rect", {
|
|
26039
|
+
"x": item.x + offsetX.value,
|
|
26040
|
+
"y": item.y,
|
|
26041
|
+
"width": lineWidth.value,
|
|
26042
|
+
"height": item.height,
|
|
26043
|
+
"rx": typeof props.smooth === 'number' ? props.smooth : props.smooth ? 2 : 0,
|
|
26044
|
+
"ry": typeof props.smooth === 'number' ? props.smooth : props.smooth ? 2 : 0
|
|
26045
|
+
}, [props.autoDraw && createVNode(Fragment, null, [createVNode("animate", {
|
|
26046
|
+
"attributeName": "y",
|
|
26047
|
+
"from": item.y + item.height,
|
|
26048
|
+
"to": item.y,
|
|
26049
|
+
"dur": `${autoDrawDuration.value}ms`,
|
|
26050
|
+
"fill": "freeze"
|
|
26051
|
+
}, null), createVNode("animate", {
|
|
26052
|
+
"attributeName": "height",
|
|
26053
|
+
"from": "0",
|
|
26054
|
+
"to": item.height,
|
|
26055
|
+
"dur": `${autoDrawDuration.value}ms`,
|
|
26056
|
+
"fill": "freeze"
|
|
26057
|
+
}, null)])]))]), hasLabels.value && createVNode("g", {
|
|
26058
|
+
"key": "labels",
|
|
26059
|
+
"style": {
|
|
26060
|
+
textAnchor: 'middle',
|
|
26061
|
+
dominantBaseline: 'mathematical',
|
|
26062
|
+
fill: 'currentColor'
|
|
26063
|
+
}
|
|
26064
|
+
}, [parsedLabels.value.map((item, i) => createVNode("text", {
|
|
26065
|
+
"x": item.x + offsetX.value + lineWidth.value / 2,
|
|
26066
|
+
"y": parseInt(props.height, 10) - 2 + (parseInt(props.labelSize, 10) || 7 * 0.75),
|
|
26067
|
+
"font-size": Number(props.labelSize) || 7
|
|
26068
|
+
}, [slots.label?.({
|
|
26069
|
+
index: i,
|
|
26070
|
+
value: item.value
|
|
26071
|
+
}) ?? item.value]))]), createVNode("g", {
|
|
26072
|
+
"clip-path": `url(#${id.value}-clip)`,
|
|
26073
|
+
"fill": `url(#${id.value})`
|
|
26074
|
+
}, [createVNode("rect", {
|
|
26075
|
+
"x": 0,
|
|
26076
|
+
"y": 0,
|
|
26077
|
+
"width": Math.max(props.modelValue.length * lineWidth.value, Number(props.width)),
|
|
26078
|
+
"height": props.height
|
|
26079
|
+
}, null)])]);
|
|
26080
|
+
});
|
|
26081
|
+
}
|
|
26082
|
+
});
|
|
26083
|
+
|
|
26084
|
+
// @ts-nocheck
|
|
26085
|
+
/* eslint-disable */
|
|
26086
|
+
|
|
26087
|
+
// import { checkCollinear, getDistance, moveTo } from './math'
|
|
26088
|
+
|
|
26089
|
+
/**
|
|
26090
|
+
* From https://github.com/unsplash/react-trend/blob/master/src/helpers/DOM.helpers.js#L18
|
|
26091
|
+
*/
|
|
26092
|
+
function genPath(points, radius) {
|
|
26093
|
+
let fill = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
26094
|
+
let height = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 75;
|
|
26095
|
+
if (points.length === 0) return '';
|
|
26096
|
+
const start = points.shift();
|
|
26097
|
+
const end = points[points.length - 1];
|
|
26098
|
+
return (fill ? `M${start.x} ${height - start.x + 2} L${start.x} ${start.y}` : `M${start.x} ${start.y}`) + points.map((point, index) => {
|
|
26099
|
+
const next = points[index + 1];
|
|
26100
|
+
const prev = points[index - 1] || start;
|
|
26101
|
+
const isCollinear = next && checkCollinear(next, point, prev);
|
|
26102
|
+
if (!next || isCollinear) {
|
|
26103
|
+
return `L${point.x} ${point.y}`;
|
|
26104
|
+
}
|
|
26105
|
+
const threshold = Math.min(getDistance(prev, point), getDistance(next, point));
|
|
26106
|
+
const isTooCloseForRadius = threshold / 2 < radius;
|
|
26107
|
+
const radiusForPoint = isTooCloseForRadius ? threshold / 2 : radius;
|
|
26108
|
+
const before = moveTo(prev, point, radiusForPoint);
|
|
26109
|
+
const after = moveTo(next, point, radiusForPoint);
|
|
26110
|
+
return `L${before.x} ${before.y}S${point.x} ${point.y} ${after.x} ${after.y}`;
|
|
26111
|
+
}).join('') + (fill ? `L${end.x} ${height - start.x + 2} Z` : '');
|
|
26112
|
+
}
|
|
26113
|
+
function int(value) {
|
|
26114
|
+
return parseInt(value, 10);
|
|
26115
|
+
}
|
|
26116
|
+
|
|
26117
|
+
/**
|
|
26118
|
+
* https://en.wikipedia.org/wiki/Collinearity
|
|
26119
|
+
* x=(x1+x2)/2
|
|
26120
|
+
* y=(y1+y2)/2
|
|
26121
|
+
*/
|
|
26122
|
+
function checkCollinear(p0, p1, p2) {
|
|
26123
|
+
return int(p0.x + p2.x) === int(2 * p1.x) && int(p0.y + p2.y) === int(2 * p1.y);
|
|
26124
|
+
}
|
|
26125
|
+
function getDistance(p1, p2) {
|
|
26126
|
+
return Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2));
|
|
26127
|
+
}
|
|
26128
|
+
function moveTo(to, from, radius) {
|
|
26129
|
+
const vector = {
|
|
26130
|
+
x: to.x - from.x,
|
|
26131
|
+
y: to.y - from.y
|
|
26132
|
+
};
|
|
26133
|
+
const length = Math.sqrt(vector.x * vector.x + vector.y * vector.y);
|
|
26134
|
+
const unitVector = {
|
|
26135
|
+
x: vector.x / length,
|
|
26136
|
+
y: vector.y / length
|
|
26137
|
+
};
|
|
26138
|
+
return {
|
|
26139
|
+
x: from.x + unitVector.x * radius,
|
|
26140
|
+
y: from.y + unitVector.y * radius
|
|
26141
|
+
};
|
|
26142
|
+
}
|
|
26143
|
+
|
|
26144
|
+
// Types
|
|
26145
|
+
|
|
26146
|
+
const makeVTrendlineProps = propsFactory({
|
|
26147
|
+
fill: Boolean,
|
|
26148
|
+
...makeLineProps()
|
|
26149
|
+
}, 'VTrendline');
|
|
26150
|
+
const VTrendline = genericComponent()({
|
|
26151
|
+
name: 'VTrendline',
|
|
26152
|
+
props: makeVTrendlineProps(),
|
|
26153
|
+
setup(props, _ref) {
|
|
26154
|
+
let {
|
|
26155
|
+
slots
|
|
26156
|
+
} = _ref;
|
|
26157
|
+
const uid = getUid();
|
|
26158
|
+
const id = computed(() => props.id || `trendline-${uid}`);
|
|
26159
|
+
const autoDrawDuration = computed(() => Number(props.autoDrawDuration) || (props.fill ? 500 : 2000));
|
|
26160
|
+
const lastLength = ref(0);
|
|
26161
|
+
const path = ref(null);
|
|
26162
|
+
function genPoints(values, boundary) {
|
|
26163
|
+
const {
|
|
26164
|
+
minX,
|
|
26165
|
+
maxX,
|
|
26166
|
+
minY,
|
|
26167
|
+
maxY
|
|
26168
|
+
} = boundary;
|
|
26169
|
+
const totalValues = values.length;
|
|
26170
|
+
const maxValue = Math.max(...values);
|
|
26171
|
+
const minValue = Math.min(...values);
|
|
26172
|
+
const gridX = (maxX - minX) / (totalValues - 1);
|
|
26173
|
+
const gridY = (maxY - minY) / (maxValue - minValue || 1);
|
|
26174
|
+
return values.map((value, index) => {
|
|
26175
|
+
return {
|
|
26176
|
+
x: minX + index * gridX,
|
|
26177
|
+
y: maxY - (value - minValue) * gridY,
|
|
26178
|
+
value
|
|
26179
|
+
};
|
|
26180
|
+
});
|
|
26181
|
+
}
|
|
26182
|
+
const hasLabels = computed(() => {
|
|
26183
|
+
return Boolean(props.showLabels || props.labels.length > 0 || !!slots?.label);
|
|
26184
|
+
});
|
|
26185
|
+
const lineWidth = computed(() => {
|
|
26186
|
+
return parseFloat(props.lineWidth) || 4;
|
|
26187
|
+
});
|
|
26188
|
+
const totalWidth = computed(() => Number(props.width));
|
|
26189
|
+
const boundary = computed(() => {
|
|
26190
|
+
const padding = Number(props.padding);
|
|
26191
|
+
return {
|
|
26192
|
+
minX: padding,
|
|
26193
|
+
maxX: totalWidth.value - padding,
|
|
26194
|
+
minY: padding,
|
|
26195
|
+
maxY: parseInt(props.height, 10) - padding
|
|
26196
|
+
};
|
|
26197
|
+
});
|
|
26198
|
+
const parsedLabels = computed(() => {
|
|
26199
|
+
const labels = [];
|
|
26200
|
+
const points = genPoints(props.modelValue.map(item => typeof item === 'number' ? item : item.value), boundary.value);
|
|
26201
|
+
const len = points.length;
|
|
26202
|
+
for (let i = 0; labels.length < len; i++) {
|
|
26203
|
+
const item = points[i];
|
|
26204
|
+
let value = props.labels[i];
|
|
26205
|
+
if (!value) {
|
|
26206
|
+
value = typeof item === 'object' ? item.value : item;
|
|
26207
|
+
}
|
|
26208
|
+
labels.push({
|
|
26209
|
+
x: item.x,
|
|
26210
|
+
value: String(value)
|
|
26211
|
+
});
|
|
26212
|
+
}
|
|
26213
|
+
return labels;
|
|
26214
|
+
});
|
|
26215
|
+
watch(() => props.modelValue, async () => {
|
|
26216
|
+
await nextTick();
|
|
26217
|
+
if (!props.autoDraw || !path.value) return;
|
|
26218
|
+
const pathRef = path.value;
|
|
26219
|
+
const length = pathRef.getTotalLength();
|
|
26220
|
+
if (!props.fill) {
|
|
26221
|
+
// Initial setup to "hide" the line by using the stroke dash array
|
|
26222
|
+
pathRef.style.strokeDasharray = `${length}`;
|
|
26223
|
+
pathRef.style.strokeDashoffset = `${length}`;
|
|
26224
|
+
|
|
26225
|
+
// Force reflow to ensure the transition starts from this state
|
|
26226
|
+
pathRef.getBoundingClientRect();
|
|
26227
|
+
|
|
26228
|
+
// Animate the stroke dash offset to "draw" the line
|
|
26229
|
+
pathRef.style.transition = `stroke-dashoffset ${autoDrawDuration.value}ms ${props.autoDrawEasing}`;
|
|
26230
|
+
pathRef.style.strokeDashoffset = '0';
|
|
26231
|
+
} else {
|
|
26232
|
+
// Your existing logic for filled paths remains the same
|
|
26233
|
+
pathRef.style.transformOrigin = 'bottom center';
|
|
26234
|
+
pathRef.style.transition = 'none';
|
|
26235
|
+
pathRef.style.transform = `scaleY(0)`;
|
|
26236
|
+
pathRef.getBoundingClientRect();
|
|
26237
|
+
pathRef.style.transition = `transform ${autoDrawDuration.value}ms ${props.autoDrawEasing}`;
|
|
26238
|
+
pathRef.style.transform = `scaleY(1)`;
|
|
26239
|
+
}
|
|
26240
|
+
lastLength.value = length;
|
|
26241
|
+
}, {
|
|
26242
|
+
immediate: true
|
|
26243
|
+
});
|
|
26244
|
+
useRender(() => {
|
|
26245
|
+
const gradientData = !props.gradient.slice().length ? [''] : props.gradient.slice().reverse();
|
|
26246
|
+
return createVNode("svg", {
|
|
26247
|
+
"display": "block",
|
|
26248
|
+
"stroke-width": parseFloat(props.lineWidth) ?? 4
|
|
26249
|
+
}, [createVNode("defs", null, [createVNode("linearGradient", {
|
|
26250
|
+
"id": id.value,
|
|
26251
|
+
"gradientUnits": "userSpaceOnUse",
|
|
26252
|
+
"x1": props.gradientDirection === 'left' ? '100%' : '0',
|
|
26253
|
+
"y1": props.gradientDirection === 'top' ? '100%' : '0',
|
|
26254
|
+
"x2": props.gradientDirection === 'right' ? '100%' : '0',
|
|
26255
|
+
"y2": props.gradientDirection === 'bottom' ? '100%' : '0'
|
|
26256
|
+
}, [gradientData.map((color, index) => createVNode("stop", {
|
|
26257
|
+
"offset": index / Math.max(gradientData.length - 1, 1),
|
|
26258
|
+
"stop-color": color || 'currentColor'
|
|
26259
|
+
}, null))])]), hasLabels.value && createVNode("g", {
|
|
26260
|
+
"key": "labels",
|
|
26261
|
+
"style": {
|
|
26262
|
+
textAnchor: 'middle',
|
|
26263
|
+
dominantBaseline: 'mathematical',
|
|
26264
|
+
fill: 'currentColor'
|
|
26265
|
+
}
|
|
26266
|
+
}, [parsedLabels.value.map((item, i) => createVNode("text", {
|
|
26267
|
+
"x": item.x + lineWidth.value / 2 + lineWidth.value / 2,
|
|
26268
|
+
"y": parseInt(props.height, 10) - 4 + (parseInt(props.labelSize, 10) || 7 * 0.75),
|
|
26269
|
+
"font-size": Number(props.labelSize) || 7
|
|
26270
|
+
}, [slots.label?.({
|
|
26271
|
+
index: i,
|
|
26272
|
+
value: item.value
|
|
26273
|
+
}) ?? item.value]))]), createVNode("path", {
|
|
26274
|
+
"ref": path,
|
|
26275
|
+
"d": genPath(genPoints(props.modelValue.map(item => typeof item === 'number' ? item : item.value), boundary.value), props.smooth ? 8 : Number(props.smooth), props.fill, parseInt(props.height, 10)),
|
|
26276
|
+
"fill": props.fill ? `url(#${id.value})` : 'none',
|
|
26277
|
+
"stroke": props.fill ? 'none' : `url(#${id.value})`
|
|
26278
|
+
}, null)]);
|
|
26279
|
+
});
|
|
26280
|
+
}
|
|
26281
|
+
});
|
|
26282
|
+
|
|
26283
|
+
// Types
|
|
26284
|
+
|
|
26285
|
+
// Types
|
|
26286
|
+
|
|
26287
|
+
const makeVSparklineProps = propsFactory({
|
|
26288
|
+
type: {
|
|
26289
|
+
type: String,
|
|
26290
|
+
default: 'trend'
|
|
26291
|
+
},
|
|
26292
|
+
...makeVBarlineProps(),
|
|
26293
|
+
...makeVTrendlineProps()
|
|
26294
|
+
}, 'VSparkline');
|
|
26295
|
+
const VSparkline = genericComponent()({
|
|
26296
|
+
name: 'VSparkline',
|
|
26297
|
+
props: makeVSparklineProps(),
|
|
26298
|
+
setup(props, _ref) {
|
|
26299
|
+
let {
|
|
26300
|
+
slots
|
|
26301
|
+
} = _ref;
|
|
26302
|
+
const {
|
|
26303
|
+
textColorClasses,
|
|
26304
|
+
textColorStyles
|
|
26305
|
+
} = useTextColor(toRef(props, 'color'));
|
|
26306
|
+
const hasLabels = computed(() => {
|
|
26307
|
+
return Boolean(props.showLabels || props.labels.length > 0 || !!slots?.label);
|
|
26308
|
+
});
|
|
26309
|
+
const totalHeight = computed(() => {
|
|
26310
|
+
let height = parseInt(props.height, 10);
|
|
26311
|
+
if (hasLabels.value) height += parseInt(props.labelSize, 10) * 1.5;
|
|
26312
|
+
return height;
|
|
26313
|
+
});
|
|
26314
|
+
useRender(() => {
|
|
26315
|
+
const Tag = props.type === 'trend' ? VTrendline : VBarline;
|
|
26316
|
+
const lineProps = props.type === 'trend' ? VTrendline.filterProps(props) : VBarline.filterProps(props);
|
|
26317
|
+
return createVNode(Tag, mergeProps({
|
|
26318
|
+
"key": props.type,
|
|
26319
|
+
"class": textColorClasses.value,
|
|
26320
|
+
"style": textColorStyles.value,
|
|
26321
|
+
"viewBox": `0 0 ${props.width} ${parseInt(totalHeight.value, 10)}`
|
|
26322
|
+
}, lineProps), slots);
|
|
26323
|
+
});
|
|
26324
|
+
}
|
|
26325
|
+
});
|
|
26326
|
+
|
|
25834
26327
|
var components = /*#__PURE__*/Object.freeze({
|
|
25835
26328
|
__proto__: null,
|
|
25836
26329
|
VAlert: VAlert,
|
|
@@ -25973,6 +26466,7 @@ var components = /*#__PURE__*/Object.freeze({
|
|
|
25973
26466
|
VSlider: VSlider,
|
|
25974
26467
|
VSnackbar: VSnackbar,
|
|
25975
26468
|
VSpacer: VSpacer,
|
|
26469
|
+
VSparkline: VSparkline,
|
|
25976
26470
|
VStepper: VStepper,
|
|
25977
26471
|
VStepperActions: VStepperActions,
|
|
25978
26472
|
VStepperHeader: VStepperHeader,
|
|
@@ -26220,7 +26714,7 @@ function createVuetify$1() {
|
|
|
26220
26714
|
goTo
|
|
26221
26715
|
};
|
|
26222
26716
|
}
|
|
26223
|
-
const version$1 = "3.5.
|
|
26717
|
+
const version$1 = "3.5.5";
|
|
26224
26718
|
createVuetify$1.version = version$1;
|
|
26225
26719
|
|
|
26226
26720
|
// Vue's inject() can only be used in setup
|
|
@@ -26234,7 +26728,7 @@ function inject(key) {
|
|
|
26234
26728
|
|
|
26235
26729
|
/* eslint-disable local-rules/sort-imports */
|
|
26236
26730
|
|
|
26237
|
-
const version = "3.5.
|
|
26731
|
+
const version = "3.5.5";
|
|
26238
26732
|
|
|
26239
26733
|
/* eslint-disable local-rules/sort-imports */
|
|
26240
26734
|
|