@vuetify/nightly 4.0.0-dev-20230419.0 → 4.0.0-dev-20230422.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 +7 -2
- package/dist/json/attributes.json +172 -108
- package/dist/json/importMap.json +58 -58
- package/dist/json/tags.json +16 -0
- package/dist/json/web-types.json +522 -220
- package/dist/vuetify-labs.css +335 -172
- package/dist/vuetify-labs.d.ts +620 -171
- package/dist/vuetify-labs.esm.js +864 -182
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +864 -181
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +166 -3
- package/dist/vuetify.d.ts +584 -167
- package/dist/vuetify.esm.js +806 -134
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +806 -133
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +748 -682
- package/dist/vuetify.min.js.map +1 -1
- package/lib/adapters/date-adapter.mjs +2 -0
- package/lib/adapters/date-adapter.mjs.map +1 -0
- package/lib/adapters/vuetify.mjs +399 -0
- package/lib/adapters/vuetify.mjs.map +1 -0
- package/lib/blueprints/index.d.ts +34 -0
- package/lib/blueprints/md1.d.ts +34 -0
- package/lib/blueprints/md2.d.ts +34 -0
- package/lib/blueprints/md3.d.ts +34 -0
- package/lib/components/VAppBar/VAppBar.mjs +62 -10
- package/lib/components/VAppBar/VAppBar.mjs.map +1 -1
- package/lib/components/VAppBar/index.d.ts +26 -0
- package/lib/components/VAutocomplete/VAutocomplete.css +9 -0
- package/lib/components/VAutocomplete/VAutocomplete.mjs +50 -6
- package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.sass +10 -0
- package/lib/components/VAutocomplete/index.d.ts +29 -17
- package/lib/components/VBtn/_mixins.scss +1 -1
- package/lib/components/VCard/VCard.mjs.map +1 -1
- package/lib/components/VCard/index.d.ts +21 -16
- package/lib/components/VCheckbox/VCheckbox.mjs +2 -2
- package/lib/components/VCheckbox/VCheckbox.mjs.map +1 -1
- package/lib/components/VCheckbox/index.d.ts +22 -1
- package/lib/components/VCombobox/VCombobox.css +1 -1
- package/lib/components/VCombobox/VCombobox.mjs +6 -4
- package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
- package/lib/components/VCombobox/VCombobox.sass +1 -1
- package/lib/components/VCombobox/index.d.ts +29 -17
- package/lib/components/VField/index.d.ts +6 -0
- package/lib/components/VFileInput/VFileInput.mjs +13 -17
- package/lib/components/VFileInput/VFileInput.mjs.map +1 -1
- package/lib/components/VFileInput/index.d.ts +68 -23
- package/lib/components/VInput/VInput.mjs +14 -7
- package/lib/components/VInput/VInput.mjs.map +1 -1
- package/lib/components/VInput/index.d.ts +22 -1
- package/lib/components/VOverlay/locationStrategies.mjs +9 -4
- package/lib/components/VOverlay/locationStrategies.mjs.map +1 -1
- package/lib/components/VRadioGroup/VRadioGroup.mjs +2 -2
- package/lib/components/VRadioGroup/VRadioGroup.mjs.map +1 -1
- package/lib/components/VRadioGroup/index.d.ts +22 -1
- package/lib/components/VRangeSlider/VRangeSlider.mjs +33 -22
- package/lib/components/VRangeSlider/VRangeSlider.mjs.map +1 -1
- package/lib/components/VRangeSlider/index.d.ts +39 -6
- package/lib/components/VSelect/VSelect.mjs +6 -0
- package/lib/components/VSelect/VSelect.mjs.map +1 -1
- package/lib/components/VSelect/index.d.ts +32 -17
- package/lib/components/VSlider/VSlider.mjs +33 -15
- package/lib/components/VSlider/VSlider.mjs.map +1 -1
- package/lib/components/VSlider/index.d.ts +39 -6
- package/lib/components/VSlider/slider.mjs +43 -23
- package/lib/components/VSlider/slider.mjs.map +1 -1
- package/lib/components/VSwitch/VSwitch.mjs +5 -3
- package/lib/components/VSwitch/VSwitch.mjs.map +1 -1
- package/lib/components/VSwitch/index.d.ts +43 -1
- package/lib/components/VTextField/VTextField.mjs +4 -12
- package/lib/components/VTextField/VTextField.mjs.map +1 -1
- package/lib/components/VTextField/index.d.ts +70 -22
- package/lib/components/VTextarea/VTextarea.mjs +4 -12
- package/lib/components/VTextarea/VTextarea.mjs.map +1 -1
- package/lib/components/VTextarea/index.d.ts +61 -22
- package/lib/components/VToolbar/VToolbar.css +3 -1
- package/lib/components/VToolbar/VToolbar.sass +3 -1
- package/lib/components/VValidation/index.d.ts +10 -1
- package/lib/components/index.d.ts +525 -150
- package/lib/composables/date.mjs +39 -0
- package/lib/composables/date.mjs.map +1 -0
- package/lib/composables/focus.mjs +3 -2
- package/lib/composables/focus.mjs.map +1 -1
- package/lib/composables/index.mjs +1 -0
- package/lib/composables/index.mjs.map +1 -1
- package/lib/composables/items.mjs +7 -2
- package/lib/composables/items.mjs.map +1 -1
- package/lib/composables/scroll.mjs +3 -0
- package/lib/composables/scroll.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/framework.mjs +8 -3
- package/lib/framework.mjs.map +1 -1
- package/lib/iconsets/mdi-svg.mjs +2 -2
- package/lib/iconsets/mdi-svg.mjs.map +1 -1
- package/lib/index.d.ts +59 -17
- package/lib/labs/VDataTable/VDataTable.mjs +2 -2
- package/lib/labs/VDataTable/VDataTable.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableFooter.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableHeaders.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableRows.mjs +52 -44
- package/lib/labs/VDataTable/VDataTableRows.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableServer.mjs +2 -1
- package/lib/labs/VDataTable/VDataTableServer.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableVirtual.mjs +0 -1
- package/lib/labs/VDataTable/VDataTableVirtual.mjs.map +1 -1
- package/lib/labs/VDataTable/composables/options.mjs +2 -1
- package/lib/labs/VDataTable/composables/options.mjs.map +1 -1
- package/lib/labs/VDataTable/index.d.ts +44 -11
- package/lib/labs/VSkeletonLoader/VSkeletonLoader.mjs +1 -0
- package/lib/labs/VSkeletonLoader/VSkeletonLoader.mjs.map +1 -1
- package/lib/labs/VSkeletonLoader/index.d.ts +9 -9
- package/lib/labs/components.d.ts +53 -20
- package/lib/styles/main.css +152 -0
- package/lib/styles/settings/_utilities.scss +11 -1
- package/lib/util/helpers.mjs +4 -0
- package/lib/util/helpers.mjs.map +1 -1
- package/package.json +2 -2
package/dist/vuetify-labs.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Vuetify v4.0.0-dev-
|
2
|
+
* Vuetify v4.0.0-dev-20230422.0
|
3
3
|
* Forged by John Leider
|
4
4
|
* Released under the MIT License.
|
5
5
|
*/
|
@@ -3257,6 +3257,98 @@
|
|
3257
3257
|
|
3258
3258
|
// Utilities
|
3259
3259
|
|
3260
|
+
// Types
|
3261
|
+
|
3262
|
+
// Composables
|
3263
|
+
const makeScrollProps = propsFactory({
|
3264
|
+
scrollTarget: {
|
3265
|
+
type: String
|
3266
|
+
},
|
3267
|
+
scrollThreshold: {
|
3268
|
+
type: [String, Number]
|
3269
|
+
}
|
3270
|
+
}, 'scroll');
|
3271
|
+
function useScroll(props) {
|
3272
|
+
let args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
3273
|
+
const {
|
3274
|
+
thresholdMetCallback,
|
3275
|
+
scrollThreshold,
|
3276
|
+
canScroll
|
3277
|
+
} = args;
|
3278
|
+
let previousScroll = 0;
|
3279
|
+
const target = vue.ref(null);
|
3280
|
+
const currentScroll = vue.ref(0);
|
3281
|
+
const savedScroll = vue.ref(0);
|
3282
|
+
const currentThreshold = vue.ref(0);
|
3283
|
+
const isScrollActive = vue.ref(false);
|
3284
|
+
const isScrollingUp = vue.ref(false);
|
3285
|
+
const computedScrollThreshold = vue.computed(() => {
|
3286
|
+
return Number(props.scrollThreshold ?? scrollThreshold ?? 300);
|
3287
|
+
});
|
3288
|
+
const onScroll = () => {
|
3289
|
+
const targetEl = target.value;
|
3290
|
+
if (!targetEl || canScroll && !canScroll.value) return;
|
3291
|
+
previousScroll = currentScroll.value;
|
3292
|
+
currentScroll.value = 'window' in targetEl ? targetEl.pageYOffset : targetEl.scrollTop;
|
3293
|
+
isScrollingUp.value = currentScroll.value < previousScroll;
|
3294
|
+
currentThreshold.value = Math.abs(currentScroll.value - computedScrollThreshold.value);
|
3295
|
+
};
|
3296
|
+
vue.watch(isScrollingUp, () => {
|
3297
|
+
savedScroll.value = savedScroll.value || currentScroll.value;
|
3298
|
+
});
|
3299
|
+
vue.watch(isScrollActive, () => {
|
3300
|
+
savedScroll.value = 0;
|
3301
|
+
});
|
3302
|
+
vue.onMounted(() => {
|
3303
|
+
vue.watch(() => props.scrollTarget, scrollTarget => {
|
3304
|
+
const newTarget = scrollTarget ? document.querySelector(scrollTarget) : window;
|
3305
|
+
if (!newTarget) {
|
3306
|
+
consoleWarn(`Unable to locate element with identifier ${scrollTarget}`, vue.getCurrentInstance());
|
3307
|
+
return;
|
3308
|
+
}
|
3309
|
+
if (newTarget === target.value) return;
|
3310
|
+
target.value?.removeEventListener('scroll', onScroll);
|
3311
|
+
target.value = newTarget;
|
3312
|
+
target.value.addEventListener('scroll', onScroll, {
|
3313
|
+
passive: true
|
3314
|
+
});
|
3315
|
+
}, {
|
3316
|
+
immediate: true
|
3317
|
+
});
|
3318
|
+
});
|
3319
|
+
vue.onBeforeUnmount(() => {
|
3320
|
+
target.value?.removeEventListener('scroll', onScroll);
|
3321
|
+
});
|
3322
|
+
thresholdMetCallback && vue.watch(() => Math.abs(currentScroll.value - savedScroll.value) > computedScrollThreshold.value, thresholdMet => {
|
3323
|
+
thresholdMet && thresholdMetCallback({
|
3324
|
+
currentThreshold: currentThreshold.value,
|
3325
|
+
isScrollingUp: isScrollingUp.value,
|
3326
|
+
savedScroll
|
3327
|
+
});
|
3328
|
+
}, {
|
3329
|
+
immediate: true
|
3330
|
+
});
|
3331
|
+
|
3332
|
+
// Do we need this? If yes - seems that
|
3333
|
+
// there's no need to expose onScroll
|
3334
|
+
canScroll && vue.watch(canScroll, onScroll, {
|
3335
|
+
immediate: true
|
3336
|
+
});
|
3337
|
+
return {
|
3338
|
+
computedScrollThreshold,
|
3339
|
+
currentScroll,
|
3340
|
+
currentThreshold,
|
3341
|
+
isScrollActive,
|
3342
|
+
// required only for testing
|
3343
|
+
// probably can be removed
|
3344
|
+
// later (2 chars chlng)
|
3345
|
+
isScrollingUp,
|
3346
|
+
savedScroll
|
3347
|
+
};
|
3348
|
+
}
|
3349
|
+
|
3350
|
+
// Utilities
|
3351
|
+
|
3260
3352
|
// Composables
|
3261
3353
|
function useSsrBoot() {
|
3262
3354
|
const isBooted = vue.ref(false);
|
@@ -3279,13 +3371,7 @@
|
|
3279
3371
|
const VAppBar = genericComponent()({
|
3280
3372
|
name: 'VAppBar',
|
3281
3373
|
props: {
|
3282
|
-
|
3283
|
-
// hideOnScroll: Boolean
|
3284
|
-
// invertedScroll: Boolean
|
3285
|
-
// collapseOnScroll: Boolean
|
3286
|
-
// elevateOnScroll: Boolean
|
3287
|
-
// shrinkOnScroll: Boolean
|
3288
|
-
// fadeImageOnScroll: Boolean
|
3374
|
+
scrollBehavior: String,
|
3289
3375
|
modelValue: {
|
3290
3376
|
type: Boolean,
|
3291
3377
|
default: true
|
@@ -3297,6 +3383,7 @@
|
|
3297
3383
|
},
|
3298
3384
|
...makeVToolbarProps(),
|
3299
3385
|
...makeLayoutItemProps(),
|
3386
|
+
...makeScrollProps(),
|
3300
3387
|
height: {
|
3301
3388
|
type: [Number, String],
|
3302
3389
|
default: 64
|
@@ -3311,11 +3398,63 @@
|
|
3311
3398
|
} = _ref;
|
3312
3399
|
const vToolbarRef = vue.ref();
|
3313
3400
|
const isActive = useProxiedModel(props, 'modelValue');
|
3401
|
+
const scrollBehavior = vue.computed(() => {
|
3402
|
+
const behavior = new Set(props.scrollBehavior?.split(' ') ?? []);
|
3403
|
+
return {
|
3404
|
+
hide: behavior.has('hide'),
|
3405
|
+
// fullyHide: behavior.has('fully-hide'),
|
3406
|
+
inverted: behavior.has('inverted'),
|
3407
|
+
collapse: behavior.has('collapse'),
|
3408
|
+
elevate: behavior.has('elevate'),
|
3409
|
+
fadeImage: behavior.has('fade-image')
|
3410
|
+
// shrink: behavior.has('shrink'),
|
3411
|
+
};
|
3412
|
+
});
|
3413
|
+
|
3414
|
+
const canScroll = vue.computed(() => {
|
3415
|
+
const behavior = scrollBehavior.value;
|
3416
|
+
return behavior.hide ||
|
3417
|
+
// behavior.fullyHide ||
|
3418
|
+
behavior.inverted || behavior.collapse || behavior.elevate || behavior.fadeImage ||
|
3419
|
+
// behavior.shrink ||
|
3420
|
+
!isActive.value;
|
3421
|
+
});
|
3422
|
+
const {
|
3423
|
+
currentScroll,
|
3424
|
+
currentThreshold,
|
3425
|
+
computedScrollThreshold,
|
3426
|
+
isScrollingUp
|
3427
|
+
} = useScroll(props, {
|
3428
|
+
canScroll
|
3429
|
+
});
|
3430
|
+
const isCollapsed = vue.computed(() => props.collapse || scrollBehavior.value.collapse && (scrollBehavior.value.inverted ? currentScroll.value < 1 : currentScroll.value > 0));
|
3431
|
+
const isFlat = vue.computed(() => props.flat || scrollBehavior.value.elevate && currentScroll.value === (scrollBehavior.value.inverted ? 1 : 0));
|
3432
|
+
const scrollRatio = vue.computed(() => Math.min((currentThreshold.value - currentScroll.value) / currentThreshold.value || 1, 1));
|
3433
|
+
const opacity = vue.computed(() => scrollBehavior.value.fadeImage ? scrollBehavior.value.inverted ? 1 - scrollRatio.value : scrollRatio.value : undefined);
|
3314
3434
|
const height = vue.computed(() => {
|
3435
|
+
if (scrollBehavior.value.hide && scrollBehavior.value.inverted) return 0;
|
3315
3436
|
const height = vToolbarRef.value?.contentHeight ?? 0;
|
3316
3437
|
const extensionHeight = vToolbarRef.value?.extensionHeight ?? 0;
|
3317
3438
|
return height + extensionHeight;
|
3318
3439
|
});
|
3440
|
+
function setActive() {
|
3441
|
+
const val = currentScroll.value;
|
3442
|
+
if (scrollBehavior.value.hide) {
|
3443
|
+
if (scrollBehavior.value.inverted) {
|
3444
|
+
isActive.value = val > computedScrollThreshold.value;
|
3445
|
+
} else {
|
3446
|
+
isActive.value = isScrollingUp.value || val < computedScrollThreshold.value;
|
3447
|
+
}
|
3448
|
+
} else if (scrollBehavior.value.inverted) {
|
3449
|
+
isActive.value = currentScroll.value === 0;
|
3450
|
+
} else {
|
3451
|
+
isActive.value = true;
|
3452
|
+
}
|
3453
|
+
}
|
3454
|
+
vue.watch(currentScroll, setActive, {
|
3455
|
+
immediate: true
|
3456
|
+
});
|
3457
|
+
vue.watch(scrollBehavior, setActive);
|
3319
3458
|
const {
|
3320
3459
|
ssrBootStyles
|
3321
3460
|
} = useSsrBoot();
|
@@ -3326,7 +3465,7 @@
|
|
3326
3465
|
order: vue.computed(() => parseInt(props.order, 10)),
|
3327
3466
|
position: vue.toRef(props, 'location'),
|
3328
3467
|
layoutSize: height,
|
3329
|
-
elementSize:
|
3468
|
+
elementSize: vue.ref(undefined),
|
3330
3469
|
active: isActive,
|
3331
3470
|
absolute: vue.toRef(props, 'absolute')
|
3332
3471
|
});
|
@@ -3339,10 +3478,14 @@
|
|
3339
3478
|
}],
|
3340
3479
|
"style": {
|
3341
3480
|
...layoutItemStyles.value,
|
3481
|
+
'--v-toolbar-image-opacity': opacity.value,
|
3342
3482
|
height: undefined,
|
3343
3483
|
...ssrBootStyles.value
|
3344
3484
|
}
|
3345
|
-
}, toolbarProps
|
3485
|
+
}, toolbarProps, {
|
3486
|
+
"collapse": isCollapsed.value,
|
3487
|
+
"flat": isFlat.value
|
3488
|
+
}), slots);
|
3346
3489
|
});
|
3347
3490
|
return {};
|
3348
3491
|
}
|
@@ -5300,7 +5443,8 @@
|
|
5300
5443
|
|
5301
5444
|
// Composables
|
5302
5445
|
const makeFocusProps = propsFactory({
|
5303
|
-
focused: Boolean
|
5446
|
+
focused: Boolean,
|
5447
|
+
'onUpdate:focused': EventProp()
|
5304
5448
|
}, 'focus');
|
5305
5449
|
function useFocus(props) {
|
5306
5450
|
let name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getCurrentInstanceName();
|
@@ -5895,6 +6039,8 @@
|
|
5895
6039
|
appendIcon: IconValue,
|
5896
6040
|
prependIcon: IconValue,
|
5897
6041
|
hideDetails: [Boolean, String],
|
6042
|
+
hint: String,
|
6043
|
+
persistentHint: Boolean,
|
5898
6044
|
messages: {
|
5899
6045
|
type: [Array, String],
|
5900
6046
|
default: () => []
|
@@ -5958,10 +6104,19 @@
|
|
5958
6104
|
resetValidation,
|
5959
6105
|
validate
|
5960
6106
|
}));
|
6107
|
+
const messages = vue.computed(() => {
|
6108
|
+
if (errorMessages.value.length > 0) {
|
6109
|
+
return errorMessages.value;
|
6110
|
+
} else if (props.hint && (props.persistentHint || props.focused)) {
|
6111
|
+
return props.hint;
|
6112
|
+
} else {
|
6113
|
+
return props.messages;
|
6114
|
+
}
|
6115
|
+
});
|
5961
6116
|
useRender(() => {
|
5962
6117
|
const hasPrepend = !!(slots.prepend || props.prependIcon);
|
5963
6118
|
const hasAppend = !!(slots.append || props.appendIcon);
|
5964
|
-
const hasMessages =
|
6119
|
+
const hasMessages = messages.value.length > 0;
|
5965
6120
|
const hasDetails = !props.hideDetails || props.hideDetails === 'auto' && (hasMessages || !!slots.details);
|
5966
6121
|
return vue.createVNode("div", {
|
5967
6122
|
"class": ['v-input', `v-input--${props.direction}`, densityClasses.value, validationClasses.value]
|
@@ -5984,7 +6139,7 @@
|
|
5984
6139
|
}, [vue.createVNode(VMessages, {
|
5985
6140
|
"id": messagesId.value,
|
5986
6141
|
"active": hasMessages,
|
5987
|
-
"messages":
|
6142
|
+
"messages": messages.value
|
5988
6143
|
}, {
|
5989
6144
|
message: slots.message
|
5990
6145
|
}), slots.details?.(slotProps.value)])]);
|
@@ -5996,10 +6151,6 @@
|
|
5996
6151
|
};
|
5997
6152
|
}
|
5998
6153
|
});
|
5999
|
-
function filterInputProps(props) {
|
6000
|
-
const keys = Object.keys(VInput.props).filter(k => !isOn(k));
|
6001
|
-
return pick(props, keys);
|
6002
|
-
}
|
6003
6154
|
|
6004
6155
|
const VCounter = genericComponent()({
|
6005
6156
|
name: 'VCounter',
|
@@ -6125,8 +6276,6 @@
|
|
6125
6276
|
autofocus: Boolean,
|
6126
6277
|
counter: [Boolean, Number, String],
|
6127
6278
|
counterValue: Function,
|
6128
|
-
hint: String,
|
6129
|
-
persistentHint: Boolean,
|
6130
6279
|
prefix: String,
|
6131
6280
|
placeholder: String,
|
6132
6281
|
persistentPlaceholder: Boolean,
|
@@ -6181,9 +6330,6 @@
|
|
6181
6330
|
const vFieldRef = vue.ref();
|
6182
6331
|
const inputRef = vue.ref();
|
6183
6332
|
const isActive = vue.computed(() => activeTypes.includes(props.type) || props.persistentPlaceholder || isFocused.value);
|
6184
|
-
const messages = vue.computed(() => {
|
6185
|
-
return props.messages.length ? props.messages : isFocused.value || props.persistentHint ? props.hint : '';
|
6186
|
-
});
|
6187
6333
|
function onFocus() {
|
6188
6334
|
if (inputRef.value !== document.activeElement) {
|
6189
6335
|
inputRef.value?.focus();
|
@@ -6226,7 +6372,7 @@
|
|
6226
6372
|
const [{
|
6227
6373
|
modelValue: _,
|
6228
6374
|
...inputProps
|
6229
|
-
}] =
|
6375
|
+
}] = VInput.filterProps(props);
|
6230
6376
|
const [fieldProps] = filterFieldProps(props);
|
6231
6377
|
return vue.createVNode(VInput, vue.mergeProps({
|
6232
6378
|
"ref": vInputRef,
|
@@ -6236,12 +6382,9 @@
|
|
6236
6382
|
'v-text-field--prefixed': props.prefix,
|
6237
6383
|
'v-text-field--suffixed': props.suffix,
|
6238
6384
|
'v-text-field--flush-details': ['plain', 'underlined'].includes(props.variant)
|
6239
|
-
}]
|
6240
|
-
"onClick:prepend": props['onClick:prepend'],
|
6241
|
-
"onClick:append": props['onClick:append']
|
6385
|
+
}]
|
6242
6386
|
}, rootAttrs, inputProps, {
|
6243
|
-
"focused": isFocused.value
|
6244
|
-
"messages": messages.value
|
6387
|
+
"focused": isFocused.value
|
6245
6388
|
}), {
|
6246
6389
|
...slots,
|
6247
6390
|
default: _ref2 => {
|
@@ -6650,7 +6793,7 @@
|
|
6650
6793
|
const id = vue.computed(() => props.id || `checkbox-${uid}`);
|
6651
6794
|
useRender(() => {
|
6652
6795
|
const [inputAttrs, controlAttrs] = filterInputAttrs(attrs);
|
6653
|
-
const [inputProps, _1] =
|
6796
|
+
const [inputProps, _1] = VInput.filterProps(props);
|
6654
6797
|
const [checkboxProps, _2] = VCheckboxBtn.filterProps(props);
|
6655
6798
|
return vue.createVNode(VInput, vue.mergeProps({
|
6656
6799
|
"class": "v-checkbox"
|
@@ -8062,7 +8205,12 @@
|
|
8062
8205
|
function useItems(props) {
|
8063
8206
|
const items = vue.computed(() => transformItems$1(props, props.items));
|
8064
8207
|
function transformIn(value) {
|
8065
|
-
return value.map(
|
8208
|
+
return value.map(v => {
|
8209
|
+
const existingItem = items.value.find(item => deepEqual(v, item.value));
|
8210
|
+
// Nullish existingItem means value is a custom input value from combobox
|
8211
|
+
// In this case, use transformItem to create an InternalItem based on value
|
8212
|
+
return existingItem ?? transformItem$1(props, v);
|
8213
|
+
});
|
8066
8214
|
}
|
8067
8215
|
function transformOut(value) {
|
8068
8216
|
return value.map(_ref => {
|
@@ -8740,7 +8888,7 @@
|
|
8740
8888
|
}
|
8741
8889
|
|
8742
8890
|
/** Get size of element ignoring max-width/max-height */
|
8743
|
-
function getIntrinsicSize(el) {
|
8891
|
+
function getIntrinsicSize(el, isRtl) {
|
8744
8892
|
// const scrollables = new Map<Element, [number, number]>()
|
8745
8893
|
// el.querySelectorAll('*').forEach(el => {
|
8746
8894
|
// const x = el.scrollLeft
|
@@ -8757,7 +8905,11 @@
|
|
8757
8905
|
|
8758
8906
|
/* eslint-disable-next-line sonarjs/prefer-immediate-return */
|
8759
8907
|
const contentBox = nullifyTransforms(el);
|
8760
|
-
|
8908
|
+
if (isRtl) {
|
8909
|
+
contentBox.x += parseFloat(el.style.right || 0);
|
8910
|
+
} else {
|
8911
|
+
contentBox.x -= parseFloat(el.style.left || 0);
|
8912
|
+
}
|
8761
8913
|
contentBox.y -= parseFloat(el.style.top || 0);
|
8762
8914
|
|
8763
8915
|
// el.style.maxWidth = initialMaxWidth
|
@@ -8838,7 +8990,7 @@
|
|
8838
8990
|
});
|
8839
8991
|
if (!data.activatorEl.value || !data.contentEl.value) return;
|
8840
8992
|
const targetBox = data.activatorEl.value.getBoundingClientRect();
|
8841
|
-
const contentBox = getIntrinsicSize(data.contentEl.value);
|
8993
|
+
const contentBox = getIntrinsicSize(data.contentEl.value, data.isRtl.value);
|
8842
8994
|
const scrollParents = getScrollParents(data.contentEl.value);
|
8843
8995
|
const viewportMargin = 12;
|
8844
8996
|
if (!scrollParents.length) {
|
@@ -9014,7 +9166,8 @@
|
|
9014
9166
|
transformOrigin: `${placement.origin.side} ${placement.origin.align}`,
|
9015
9167
|
// transform: `translate(${pixelRound(x)}px, ${pixelRound(y)}px)`,
|
9016
9168
|
top: convertToUnit(pixelRound(y)),
|
9017
|
-
left: convertToUnit(pixelRound(x)),
|
9169
|
+
left: data.isRtl.value ? undefined : convertToUnit(pixelRound(x)),
|
9170
|
+
right: data.isRtl.value ? convertToUnit(pixelRound(-x)) : undefined,
|
9018
9171
|
minWidth: convertToUnit(axis === 'y' ? Math.min(minWidth.value, targetBox.width) : minWidth.value),
|
9019
9172
|
maxWidth: convertToUnit(pixelCeil(clamp(available.x, minWidth.value === Infinity ? 0 : minWidth.value, maxWidth.value))),
|
9020
9173
|
maxHeight: convertToUnit(pixelCeil(clamp(available.y, minHeight.value === Infinity ? 0 : minHeight.value, maxHeight.value)))
|
@@ -9909,6 +10062,7 @@
|
|
9909
10062
|
})
|
9910
10063
|
},
|
9911
10064
|
emits: {
|
10065
|
+
'update:focused': focused => true,
|
9912
10066
|
'update:modelValue': val => true,
|
9913
10067
|
'update:menu': val => true
|
9914
10068
|
},
|
@@ -10025,6 +10179,9 @@
|
|
10025
10179
|
menu.value = false;
|
10026
10180
|
}
|
10027
10181
|
}
|
10182
|
+
function onFocusin(e) {
|
10183
|
+
isFocused.value = true;
|
10184
|
+
}
|
10028
10185
|
function onFocusout(e) {
|
10029
10186
|
if (e.relatedTarget == null) {
|
10030
10187
|
vTextFieldRef.value?.focus();
|
@@ -10079,6 +10236,7 @@
|
|
10079
10236
|
"selected": selected.value,
|
10080
10237
|
"selectStrategy": props.multiple ? 'independent' : 'single-independent',
|
10081
10238
|
"onMousedown": e => e.preventDefault(),
|
10239
|
+
"onFocusin": onFocusin,
|
10082
10240
|
"onFocusout": onFocusout
|
10083
10241
|
}, {
|
10084
10242
|
default: () => [!displayItems.value.length && !props.hideNoData && (slots['no-data']?.() ?? vue.createVNode(VListItem, {
|
@@ -10157,6 +10315,7 @@
|
|
10157
10315
|
});
|
10158
10316
|
});
|
10159
10317
|
return forwardRefs({
|
10318
|
+
isFocused,
|
10160
10319
|
menu,
|
10161
10320
|
select
|
10162
10321
|
}, vTextFieldRef);
|
@@ -10295,6 +10454,7 @@
|
|
10295
10454
|
})
|
10296
10455
|
},
|
10297
10456
|
emits: {
|
10457
|
+
'update:focused': focused => true,
|
10298
10458
|
'update:search': val => true,
|
10299
10459
|
'update:modelValue': val => true,
|
10300
10460
|
'update:menu': val => true
|
@@ -10318,11 +10478,17 @@
|
|
10318
10478
|
_menu.value = v;
|
10319
10479
|
}
|
10320
10480
|
});
|
10481
|
+
const selectionIndex = vue.ref(-1);
|
10482
|
+
const color = vue.computed(() => vTextFieldRef.value?.color);
|
10321
10483
|
const {
|
10322
10484
|
items,
|
10323
10485
|
transformIn,
|
10324
10486
|
transformOut
|
10325
10487
|
} = useItems(props);
|
10488
|
+
const {
|
10489
|
+
textColorClasses,
|
10490
|
+
textColorStyles
|
10491
|
+
} = useTextColor(color);
|
10326
10492
|
const search = useProxiedModel(props, 'search', '');
|
10327
10493
|
const model = useProxiedModel(props, 'modelValue', [], v => transformIn(wrapInArray(v)), v => {
|
10328
10494
|
const transformed = transformOut(v);
|
@@ -10345,6 +10511,7 @@
|
|
10345
10511
|
return filteredItems.value;
|
10346
10512
|
});
|
10347
10513
|
const selected = vue.computed(() => selections.value.map(selection => selection.props.value));
|
10514
|
+
const selection = vue.computed(() => selections.value[selectionIndex.value]);
|
10348
10515
|
const listRef = vue.ref();
|
10349
10516
|
function onClear(e) {
|
10350
10517
|
if (props.openOnClear) {
|
@@ -10358,7 +10525,9 @@
|
|
10358
10525
|
}
|
10359
10526
|
function onKeydown(e) {
|
10360
10527
|
if (props.readonly || form?.isReadonly.value) return;
|
10361
|
-
|
10528
|
+
const selectionStart = vTextFieldRef.value.selectionStart;
|
10529
|
+
const length = selected.value.length;
|
10530
|
+
if (selectionIndex.value > -1 || ['Enter', 'ArrowDown', 'ArrowUp'].includes(e.key)) {
|
10362
10531
|
e.preventDefault();
|
10363
10532
|
}
|
10364
10533
|
if (['Enter', 'ArrowDown'].includes(e.key)) {
|
@@ -10375,6 +10544,38 @@
|
|
10375
10544
|
} else if (e.key === 'ArrowUp') {
|
10376
10545
|
listRef.value?.focus('prev');
|
10377
10546
|
}
|
10547
|
+
if (!props.multiple) return;
|
10548
|
+
if (['Backspace', 'Delete'].includes(e.key)) {
|
10549
|
+
if (selectionIndex.value < 0) {
|
10550
|
+
if (e.key === 'Backspace' && !search.value) {
|
10551
|
+
selectionIndex.value = length - 1;
|
10552
|
+
}
|
10553
|
+
return;
|
10554
|
+
}
|
10555
|
+
const originalSelectionIndex = selectionIndex.value;
|
10556
|
+
if (selection.value) select(selection.value);
|
10557
|
+
selectionIndex.value = originalSelectionIndex >= length - 1 ? length - 2 : originalSelectionIndex;
|
10558
|
+
}
|
10559
|
+
if (e.key === 'ArrowLeft') {
|
10560
|
+
if (selectionIndex.value < 0 && selectionStart > 0) return;
|
10561
|
+
const prev = selectionIndex.value > -1 ? selectionIndex.value - 1 : length - 1;
|
10562
|
+
if (selections.value[prev]) {
|
10563
|
+
selectionIndex.value = prev;
|
10564
|
+
} else {
|
10565
|
+
selectionIndex.value = -1;
|
10566
|
+
vTextFieldRef.value.setSelectionRange(search.value?.length, search.value?.length);
|
10567
|
+
}
|
10568
|
+
}
|
10569
|
+
if (e.key === 'ArrowRight') {
|
10570
|
+
if (selectionIndex.value < 0) return;
|
10571
|
+
const next = selectionIndex.value + 1;
|
10572
|
+
if (selections.value[next]) {
|
10573
|
+
selectionIndex.value = next;
|
10574
|
+
} else {
|
10575
|
+
selectionIndex.value = -1;
|
10576
|
+
vTextFieldRef.value.setSelectionRange(0, 0);
|
10577
|
+
}
|
10578
|
+
}
|
10378
10579
|
}
|
10379
10580
|
function onInput(e) {
|
10380
10581
|
search.value = e.target.value;
|
@@ -10396,7 +10597,6 @@
|
|
10396
10597
|
const index = selected.value.findIndex(selection => props.valueComparator(selection, item.value));
|
10397
10598
|
if (index === -1) {
|
10398
10599
|
model.value = [...model.value, item];
|
10399
|
-
search.value = '';
|
10400
10600
|
} else {
|
10401
10601
|
const value = [...model.value];
|
10402
10602
|
value.splice(index, 1);
|
@@ -10441,12 +10641,15 @@
|
|
10441
10641
|
"onUpdate:modelValue": v => {
|
10442
10642
|
if (v == null) model.value = [];
|
10443
10643
|
},
|
10644
|
+
"focused": isFocused.value,
|
10645
|
+
"onUpdate:focused": $event => isFocused.value = $event,
|
10444
10646
|
"validationValue": model.externalValue,
|
10445
10647
|
"dirty": isDirty,
|
10446
10648
|
"onInput": onInput,
|
10447
10649
|
"class": ['v-autocomplete', {
|
10448
10650
|
'v-autocomplete--active-menu': menu.value,
|
10449
10651
|
'v-autocomplete--chips': !!props.chips,
|
10652
|
+
'v-autocomplete--selecting-index': selectionIndex.value > -1,
|
10450
10653
|
[`v-autocomplete--${props.multiple ? 'multiple' : 'single'}`]: true,
|
10451
10654
|
'v-autocomplete--selection-slot': !!slots.selection
|
10452
10655
|
}],
|
@@ -10455,8 +10658,6 @@
|
|
10455
10658
|
"placeholder": isDirty ? undefined : props.placeholder,
|
10456
10659
|
"onClick:clear": onClear,
|
10457
10660
|
"onMousedown:control": onMousedownControl,
|
10458
|
-
"onFocus": () => isFocused.value = true,
|
10459
|
-
"onBlur": () => isFocused.value = false,
|
10460
10661
|
"onKeydown": onKeydown
|
10461
10662
|
}), {
|
10462
10663
|
...slots,
|
@@ -10521,7 +10722,8 @@
|
|
10521
10722
|
};
|
10522
10723
|
return vue.createVNode("div", {
|
10523
10724
|
"key": item.value,
|
10524
|
-
"class":
|
10725
|
+
"class": ['v-autocomplete__selection', index === selectionIndex.value && ['v-autocomplete__selection--selected', textColorClasses.value]],
|
10726
|
+
"style": index === selectionIndex.value ? textColorStyles.value : {}
|
10525
10727
|
}, [hasChips ? !slots.chip ? vue.createVNode(VChip, vue.mergeProps({
|
10526
10728
|
"key": "chip",
|
10527
10729
|
"closable": props.closableChips,
|
@@ -12416,11 +12618,33 @@
|
|
12416
12618
|
elevation: 2
|
12417
12619
|
})
|
12418
12620
|
}, 'slider');
|
12621
|
+
const useSteps = props => {
|
12622
|
+
const min = vue.computed(() => parseFloat(props.min));
|
12623
|
+
const max = vue.computed(() => parseFloat(props.max));
|
12624
|
+
const step = vue.computed(() => +props.step > 0 ? parseFloat(props.step) : 0);
|
12625
|
+
const decimals = vue.computed(() => Math.max(getDecimals(step.value), getDecimals(min.value)));
|
12626
|
+
function roundValue(value) {
|
12627
|
+
if (step.value <= 0) return value;
|
12628
|
+
const clamped = clamp(value, min.value, max.value);
|
12629
|
+
const offset = min.value % step.value;
|
12630
|
+
const newValue = Math.round((clamped - offset) / step.value) * step.value + offset;
|
12631
|
+
return parseFloat(Math.min(newValue, max.value).toFixed(decimals.value));
|
12632
|
+
}
|
12633
|
+
return {
|
12634
|
+
min,
|
12635
|
+
max,
|
12636
|
+
step,
|
12637
|
+
decimals,
|
12638
|
+
roundValue
|
12639
|
+
};
|
12640
|
+
};
|
12419
12641
|
const useSlider = _ref => {
|
12420
12642
|
let {
|
12421
12643
|
props,
|
12422
|
-
|
12423
|
-
|
12644
|
+
steps,
|
12645
|
+
onSliderStart,
|
12646
|
+
onSliderMove,
|
12647
|
+
onSliderEnd,
|
12424
12648
|
getActiveThumb
|
12425
12649
|
} = _ref;
|
12426
12650
|
const {
|
@@ -12434,10 +12658,13 @@
|
|
12434
12658
|
}
|
12435
12659
|
return hd;
|
12436
12660
|
});
|
12437
|
-
const
|
12438
|
-
|
12439
|
-
|
12440
|
-
|
12661
|
+
const {
|
12662
|
+
min,
|
12663
|
+
max,
|
12664
|
+
step,
|
12665
|
+
decimals,
|
12666
|
+
roundValue
|
12667
|
+
} = steps;
|
12441
12668
|
const thumbSize = vue.computed(() => parseInt(props.thumbSize, 10));
|
12442
12669
|
const tickSize = vue.computed(() => parseInt(props.tickSize, 10));
|
12443
12670
|
const trackSize = vue.computed(() => parseInt(props.trackSize, 10));
|
@@ -12451,13 +12678,6 @@
|
|
12451
12678
|
const startOffset = vue.ref(0);
|
12452
12679
|
const trackContainerRef = vue.ref();
|
12453
12680
|
const activeThumbRef = vue.ref();
|
12454
|
-
function roundValue(value) {
|
12455
|
-
if (step.value <= 0) return value;
|
12456
|
-
const clamped = clamp(value, min.value, max.value);
|
12457
|
-
const offset = min.value % step.value;
|
12458
|
-
const newValue = Math.round((clamped - offset) / step.value) * step.value + offset;
|
12459
|
-
return parseFloat(Math.min(newValue, max.value).toFixed(decimals.value));
|
12460
|
-
}
|
12461
12681
|
function parseMouseMove(e) {
|
12462
12682
|
const vertical = props.direction === 'vertical';
|
12463
12683
|
const start = vertical ? 'top' : 'left';
|
@@ -12474,14 +12694,11 @@
|
|
12474
12694
|
if (vertical || horizontalDirection.value === 'rtl') clickPos = 1 - clickPos;
|
12475
12695
|
return roundValue(min.value + clickPos * (max.value - min.value));
|
12476
12696
|
}
|
12477
|
-
let thumbMoved = false;
|
12478
12697
|
const handleStop = e => {
|
12479
|
-
|
12480
|
-
|
12481
|
-
|
12482
|
-
}
|
12698
|
+
onSliderEnd({
|
12699
|
+
value: parseMouseMove(e)
|
12700
|
+
});
|
12483
12701
|
mousePressed.value = false;
|
12484
|
-
thumbMoved = false;
|
12485
12702
|
startOffset.value = 0;
|
12486
12703
|
};
|
12487
12704
|
const handleStart = e => {
|
@@ -12490,20 +12707,25 @@
|
|
12490
12707
|
activeThumbRef.value.focus();
|
12491
12708
|
mousePressed.value = true;
|
12492
12709
|
if (activeThumbRef.value.contains(e.target)) {
|
12493
|
-
thumbMoved = true;
|
12494
12710
|
startOffset.value = getOffset(e, activeThumbRef.value, props.direction);
|
12495
12711
|
} else {
|
12496
12712
|
startOffset.value = 0;
|
12497
|
-
|
12713
|
+
onSliderMove({
|
12714
|
+
value: parseMouseMove(e)
|
12715
|
+
});
|
12498
12716
|
}
|
12717
|
+
onSliderStart({
|
12718
|
+
value: parseMouseMove(e)
|
12719
|
+
});
|
12499
12720
|
};
|
12500
12721
|
const moveListenerOptions = {
|
12501
12722
|
passive: true,
|
12502
12723
|
capture: true
|
12503
12724
|
};
|
12504
12725
|
function onMouseMove(e) {
|
12505
|
-
|
12506
|
-
|
12726
|
+
onSliderMove({
|
12727
|
+
value: parseMouseMove(e)
|
12728
|
+
});
|
12507
12729
|
}
|
12508
12730
|
function onSliderMouseUp(e) {
|
12509
12731
|
e.stopPropagation();
|
@@ -12879,13 +13101,21 @@
|
|
12879
13101
|
},
|
12880
13102
|
emits: {
|
12881
13103
|
'update:focused': value => true,
|
12882
|
-
'update:modelValue': v => true
|
13104
|
+
'update:modelValue': v => true,
|
13105
|
+
start: value => true,
|
13106
|
+
end: value => true
|
12883
13107
|
},
|
12884
13108
|
setup(props, _ref) {
|
12885
13109
|
let {
|
12886
|
-
slots
|
13110
|
+
slots,
|
13111
|
+
emit
|
12887
13112
|
} = _ref;
|
12888
13113
|
const thumbContainerRef = vue.ref();
|
13114
|
+
const steps = useSteps(props);
|
13115
|
+
const model = useProxiedModel(props, 'modelValue', undefined, v => {
|
13116
|
+
const value = typeof v === 'string' ? parseFloat(v) : v == null ? steps.min.value : v;
|
13117
|
+
return steps.roundValue(value);
|
13118
|
+
});
|
12889
13119
|
const {
|
12890
13120
|
min,
|
12891
13121
|
max,
|
@@ -12899,16 +13129,26 @@
|
|
12899
13129
|
readonly
|
12900
13130
|
} = useSlider({
|
12901
13131
|
props,
|
12902
|
-
|
12903
|
-
|
12904
|
-
|
12905
|
-
|
13132
|
+
steps,
|
13133
|
+
onSliderStart: () => {
|
13134
|
+
emit('start', model.value);
|
13135
|
+
},
|
13136
|
+
onSliderEnd: _ref2 => {
|
13137
|
+
let {
|
13138
|
+
value
|
13139
|
+
} = _ref2;
|
13140
|
+
const roundedValue = roundValue(value);
|
13141
|
+
model.value = roundedValue;
|
13142
|
+
emit('end', roundedValue);
|
13143
|
+
},
|
13144
|
+
onSliderMove: _ref3 => {
|
13145
|
+
let {
|
13146
|
+
value
|
13147
|
+
} = _ref3;
|
13148
|
+
return model.value = roundValue(value);
|
13149
|
+
},
|
12906
13150
|
getActiveThumb: () => thumbContainerRef.value?.$el
|
12907
13151
|
});
|
12908
|
-
const model = useProxiedModel(props, 'modelValue', undefined, v => {
|
12909
|
-
const value = typeof v === 'string' ? parseFloat(v) : v == null ? min.value : v;
|
12910
|
-
return roundValue(value);
|
12911
|
-
});
|
12912
13152
|
const {
|
12913
13153
|
isFocused,
|
12914
13154
|
focus,
|
@@ -12916,7 +13156,7 @@
|
|
12916
13156
|
} = useFocus(props);
|
12917
13157
|
const trackStop = vue.computed(() => position(model.value));
|
12918
13158
|
useRender(() => {
|
12919
|
-
const [inputProps, _] =
|
13159
|
+
const [inputProps, _] = VInput.filterProps(props);
|
12920
13160
|
const hasPrepend = !!(props.label || slots.label || slots.prepend);
|
12921
13161
|
return vue.createVNode(VInput, vue.mergeProps({
|
12922
13162
|
"class": ['v-slider', {
|
@@ -12934,11 +13174,11 @@
|
|
12934
13174
|
"class": "v-slider__label",
|
12935
13175
|
"text": props.label
|
12936
13176
|
}, null) : undefined, slots.prepend?.(slotProps)]) : undefined,
|
12937
|
-
default:
|
13177
|
+
default: _ref4 => {
|
12938
13178
|
let {
|
12939
13179
|
id,
|
12940
13180
|
messagesId
|
12941
|
-
} =
|
13181
|
+
} = _ref4;
|
12942
13182
|
return vue.createVNode("div", {
|
12943
13183
|
"class": "v-slider__container",
|
12944
13184
|
"onMousedown": !readonly.value ? onSliderMousedown : undefined,
|
@@ -13580,6 +13820,7 @@
|
|
13580
13820
|
})
|
13581
13821
|
},
|
13582
13822
|
emits: {
|
13823
|
+
'update:focused': focused => true,
|
13583
13824
|
'update:modelValue': val => true,
|
13584
13825
|
'update:search': val => true,
|
13585
13826
|
'update:menu': val => true
|
@@ -13717,8 +13958,9 @@
|
|
13717
13958
|
}
|
13718
13959
|
return;
|
13719
13960
|
}
|
13720
|
-
|
13721
|
-
|
13961
|
+
const originalSelectionIndex = selectionIndex.value;
|
13962
|
+
if (selection.value) select(selection.value);
|
13963
|
+
selectionIndex.value = originalSelectionIndex >= length - 1 ? length - 2 : originalSelectionIndex;
|
13722
13964
|
}
|
13723
13965
|
if (e.key === 'ArrowLeft') {
|
13724
13966
|
if (selectionIndex.value < 0 && selectionStart > 0) return;
|
@@ -13803,6 +14045,8 @@
|
|
13803
14045
|
"onUpdate:modelValue": [$event => search.value = $event, v => {
|
13804
14046
|
if (v == null) model.value = [];
|
13805
14047
|
}],
|
14048
|
+
"focused": isFocused.value,
|
14049
|
+
"onUpdate:focused": $event => isFocused.value = $event,
|
13806
14050
|
"validationValue": model.externalValue,
|
13807
14051
|
"dirty": isDirty,
|
13808
14052
|
"class": ['v-combobox', {
|
@@ -13816,8 +14060,6 @@
|
|
13816
14060
|
"placeholder": isDirty ? undefined : props.placeholder,
|
13817
14061
|
"onClick:clear": onClear,
|
13818
14062
|
"onMousedown:control": onMousedownControl,
|
13819
|
-
"onFocus": () => isFocused.value = true,
|
13820
|
-
"onBlur": () => isFocused.value = false,
|
13821
14063
|
"onKeydown": onKeydown
|
13822
14064
|
}), {
|
13823
14065
|
...slots,
|
@@ -14269,8 +14511,6 @@
|
|
14269
14511
|
default: '$vuetify.fileInput.counter'
|
14270
14512
|
},
|
14271
14513
|
multiple: Boolean,
|
14272
|
-
hint: String,
|
14273
|
-
persistentHint: Boolean,
|
14274
14514
|
showSize: {
|
14275
14515
|
type: [Boolean, Number],
|
14276
14516
|
default: false,
|
@@ -14295,6 +14535,7 @@
|
|
14295
14535
|
emits: {
|
14296
14536
|
'click:control': e => true,
|
14297
14537
|
'mousedown:control': e => true,
|
14538
|
+
'update:focused': focused => true,
|
14298
14539
|
'update:modelValue': files => true
|
14299
14540
|
},
|
14300
14541
|
setup(props, _ref) {
|
@@ -14307,6 +14548,11 @@
|
|
14307
14548
|
t
|
14308
14549
|
} = useLocale();
|
14309
14550
|
const model = useProxiedModel(props, 'modelValue');
|
14551
|
+
const {
|
14552
|
+
isFocused,
|
14553
|
+
focus,
|
14554
|
+
blur
|
14555
|
+
} = useFocus(props);
|
14310
14556
|
const base = vue.computed(() => typeof props.showSize !== 'boolean' ? props.showSize : undefined);
|
14311
14557
|
const totalBytes = vue.computed(() => (model.value ?? []).reduce((bytes, _ref2) => {
|
14312
14558
|
let {
|
@@ -14328,21 +14574,14 @@
|
|
14328
14574
|
});
|
14329
14575
|
const vInputRef = vue.ref();
|
14330
14576
|
const vFieldRef = vue.ref();
|
14331
|
-
const isFocused = vue.ref(false);
|
14332
14577
|
const inputRef = vue.ref();
|
14333
|
-
const messages = vue.computed(() => {
|
14334
|
-
return props.messages.length ? props.messages : props.persistentHint ? props.hint : '';
|
14335
|
-
});
|
14336
14578
|
function onFocus() {
|
14337
14579
|
if (inputRef.value !== document.activeElement) {
|
14338
14580
|
inputRef.value?.focus();
|
14339
14581
|
}
|
14340
|
-
if (!isFocused.value)
|
14341
|
-
isFocused.value = true;
|
14342
|
-
}
|
14582
|
+
if (!isFocused.value) focus();
|
14343
14583
|
}
|
14344
14584
|
function onClickPrepend(e) {
|
14345
|
-
callEvent(props['onClick:prepend'], e);
|
14346
14585
|
onControlClick(e);
|
14347
14586
|
}
|
14348
14587
|
function onControlMousedown(e) {
|
@@ -14373,18 +14612,16 @@
|
|
14373
14612
|
const [{
|
14374
14613
|
modelValue: _,
|
14375
14614
|
...inputProps
|
14376
|
-
}] =
|
14615
|
+
}] = VInput.filterProps(props);
|
14377
14616
|
const [fieldProps] = filterFieldProps(props);
|
14378
14617
|
return vue.createVNode(VInput, vue.mergeProps({
|
14379
14618
|
"ref": vInputRef,
|
14380
14619
|
"modelValue": model.value,
|
14381
14620
|
"onUpdate:modelValue": $event => model.value = $event,
|
14382
14621
|
"class": "v-file-input",
|
14383
|
-
"onClick:prepend": onClickPrepend
|
14384
|
-
"onClick:append": props['onClick:append']
|
14622
|
+
"onClick:prepend": onClickPrepend
|
14385
14623
|
}, rootAttrs, inputProps, {
|
14386
|
-
"focused": isFocused.value
|
14387
|
-
"messages": messages.value
|
14624
|
+
"focused": isFocused.value
|
14388
14625
|
}), {
|
14389
14626
|
...slots,
|
14390
14627
|
default: _ref3 => {
|
@@ -14436,7 +14673,7 @@
|
|
14436
14673
|
model.value = [...(target.files ?? [])];
|
14437
14674
|
},
|
14438
14675
|
"onFocus": onFocus,
|
14439
|
-
"onBlur":
|
14676
|
+
"onBlur": blur
|
14440
14677
|
}, slotProps, inputAttrs), null), vue.createVNode("div", {
|
14441
14678
|
"class": fieldClass
|
14442
14679
|
}, [!!model.value?.length && (slots.selection ? slots.selection({
|
@@ -15127,6 +15364,432 @@
|
|
15127
15364
|
}
|
15128
15365
|
});
|
15129
15366
|
|
15367
|
+
// Utilities
|
15368
|
+
|
15369
|
+
// Types
|
15370
|
+
|
15371
|
+
function getWeekArray(date) {
|
15372
|
+
let currentWeek = [];
|
15373
|
+
const weeks = [];
|
15374
|
+
const firstDayOfMonth = startOfMonth(date);
|
15375
|
+
const lastDayOfMonth = endOfMonth(date);
|
15376
|
+
for (let i = 0; i < firstDayOfMonth.getDay(); i++) {
|
15377
|
+
currentWeek.push(null);
|
15378
|
+
}
|
15379
|
+
for (let i = 1; i <= lastDayOfMonth.getDate(); i++) {
|
15380
|
+
const day = new Date(date.getFullYear(), date.getMonth(), i);
|
15381
|
+
|
15382
|
+
// Add the day to the current week
|
15383
|
+
currentWeek.push(day);
|
15384
|
+
|
15385
|
+
// If the current week has 7 days, add it to the weeks array and start a new week
|
15386
|
+
if (currentWeek.length === 7) {
|
15387
|
+
weeks.push(currentWeek);
|
15388
|
+
currentWeek = [];
|
15389
|
+
}
|
15390
|
+
}
|
15391
|
+
for (let i = currentWeek.length; i < 7; i++) {
|
15392
|
+
currentWeek.push(null);
|
15393
|
+
}
|
15394
|
+
weeks.push(currentWeek);
|
15395
|
+
return weeks;
|
15396
|
+
}
|
15397
|
+
function startOfMonth(date) {
|
15398
|
+
return new Date(date.getFullYear(), date.getMonth(), 1);
|
15399
|
+
}
|
15400
|
+
function endOfMonth(date) {
|
15401
|
+
return new Date(date.getFullYear(), date.getMonth() + 1, 0);
|
15402
|
+
}
|
15403
|
+
function date(value) {
|
15404
|
+
if (value == null) return null;
|
15405
|
+
if (value instanceof Date) return value;
|
15406
|
+
if (typeof value === 'string') {
|
15407
|
+
const parsed = Date.parse(value);
|
15408
|
+
if (!isNaN(parsed)) return new Date(parsed);
|
15409
|
+
}
|
15410
|
+
return null;
|
15411
|
+
}
|
15412
|
+
const firstDay = {
|
15413
|
+
'001': 1,
|
15414
|
+
AD: 1,
|
15415
|
+
AE: 6,
|
15416
|
+
AF: 6,
|
15417
|
+
AG: 0,
|
15418
|
+
AI: 1,
|
15419
|
+
AL: 1,
|
15420
|
+
AM: 1,
|
15421
|
+
AN: 1,
|
15422
|
+
AR: 1,
|
15423
|
+
AS: 0,
|
15424
|
+
AT: 1,
|
15425
|
+
AU: 0,
|
15426
|
+
AX: 1,
|
15427
|
+
AZ: 1,
|
15428
|
+
BA: 1,
|
15429
|
+
BD: 0,
|
15430
|
+
BE: 1,
|
15431
|
+
BG: 1,
|
15432
|
+
BH: 6,
|
15433
|
+
BM: 1,
|
15434
|
+
BN: 1,
|
15435
|
+
BR: 0,
|
15436
|
+
BS: 0,
|
15437
|
+
BT: 0,
|
15438
|
+
BW: 0,
|
15439
|
+
BY: 1,
|
15440
|
+
BZ: 0,
|
15441
|
+
CA: 0,
|
15442
|
+
CH: 1,
|
15443
|
+
CL: 1,
|
15444
|
+
CM: 1,
|
15445
|
+
CN: 0,
|
15446
|
+
CO: 0,
|
15447
|
+
CR: 1,
|
15448
|
+
CY: 1,
|
15449
|
+
CZ: 1,
|
15450
|
+
DE: 1,
|
15451
|
+
DJ: 6,
|
15452
|
+
DK: 1,
|
15453
|
+
DM: 0,
|
15454
|
+
DO: 0,
|
15455
|
+
DZ: 6,
|
15456
|
+
EC: 1,
|
15457
|
+
EE: 1,
|
15458
|
+
EG: 6,
|
15459
|
+
ES: 1,
|
15460
|
+
ET: 0,
|
15461
|
+
FI: 1,
|
15462
|
+
FJ: 1,
|
15463
|
+
FO: 1,
|
15464
|
+
FR: 1,
|
15465
|
+
GB: 1,
|
15466
|
+
'GB-alt-variant': 0,
|
15467
|
+
GE: 1,
|
15468
|
+
GF: 1,
|
15469
|
+
GP: 1,
|
15470
|
+
GR: 1,
|
15471
|
+
GT: 0,
|
15472
|
+
GU: 0,
|
15473
|
+
HK: 0,
|
15474
|
+
HN: 0,
|
15475
|
+
HR: 1,
|
15476
|
+
HU: 1,
|
15477
|
+
ID: 0,
|
15478
|
+
IE: 1,
|
15479
|
+
IL: 0,
|
15480
|
+
IN: 0,
|
15481
|
+
IQ: 6,
|
15482
|
+
IR: 6,
|
15483
|
+
IS: 1,
|
15484
|
+
IT: 1,
|
15485
|
+
JM: 0,
|
15486
|
+
JO: 6,
|
15487
|
+
JP: 0,
|
15488
|
+
KE: 0,
|
15489
|
+
KG: 1,
|
15490
|
+
KH: 0,
|
15491
|
+
KR: 0,
|
15492
|
+
KW: 6,
|
15493
|
+
KZ: 1,
|
15494
|
+
LA: 0,
|
15495
|
+
LB: 1,
|
15496
|
+
LI: 1,
|
15497
|
+
LK: 1,
|
15498
|
+
LT: 1,
|
15499
|
+
LU: 1,
|
15500
|
+
LV: 1,
|
15501
|
+
LY: 6,
|
15502
|
+
MC: 1,
|
15503
|
+
MD: 1,
|
15504
|
+
ME: 1,
|
15505
|
+
MH: 0,
|
15506
|
+
MK: 1,
|
15507
|
+
MM: 0,
|
15508
|
+
MN: 1,
|
15509
|
+
MO: 0,
|
15510
|
+
MQ: 1,
|
15511
|
+
MT: 0,
|
15512
|
+
MV: 5,
|
15513
|
+
MX: 0,
|
15514
|
+
MY: 1,
|
15515
|
+
MZ: 0,
|
15516
|
+
NI: 0,
|
15517
|
+
NL: 1,
|
15518
|
+
NO: 1,
|
15519
|
+
NP: 0,
|
15520
|
+
NZ: 1,
|
15521
|
+
OM: 6,
|
15522
|
+
PA: 0,
|
15523
|
+
PE: 0,
|
15524
|
+
PH: 0,
|
15525
|
+
PK: 0,
|
15526
|
+
PL: 1,
|
15527
|
+
PR: 0,
|
15528
|
+
PT: 0,
|
15529
|
+
PY: 0,
|
15530
|
+
QA: 6,
|
15531
|
+
RE: 1,
|
15532
|
+
RO: 1,
|
15533
|
+
RS: 1,
|
15534
|
+
RU: 1,
|
15535
|
+
SA: 0,
|
15536
|
+
SD: 6,
|
15537
|
+
SE: 1,
|
15538
|
+
SG: 0,
|
15539
|
+
SI: 1,
|
15540
|
+
SK: 1,
|
15541
|
+
SM: 1,
|
15542
|
+
SV: 0,
|
15543
|
+
SY: 6,
|
15544
|
+
TH: 0,
|
15545
|
+
TJ: 1,
|
15546
|
+
TM: 1,
|
15547
|
+
TR: 1,
|
15548
|
+
TT: 0,
|
15549
|
+
TW: 0,
|
15550
|
+
UA: 1,
|
15551
|
+
UM: 0,
|
15552
|
+
US: 0,
|
15553
|
+
UY: 1,
|
15554
|
+
UZ: 1,
|
15555
|
+
VA: 1,
|
15556
|
+
VE: 0,
|
15557
|
+
VI: 0,
|
15558
|
+
VN: 1,
|
15559
|
+
WS: 0,
|
15560
|
+
XK: 1,
|
15561
|
+
YE: 0,
|
15562
|
+
ZA: 0,
|
15563
|
+
ZW: 0
|
15564
|
+
};
|
15565
|
+
const sundayJanuarySecond2000 = new Date(2000, 0, 2);
|
15566
|
+
function getWeekdays(locale) {
|
15567
|
+
const daysFromSunday = firstDay[locale.slice(-2).toUpperCase()];
|
15568
|
+
return createRange(7).map(i => {
|
15569
|
+
const weekday = new Date(sundayJanuarySecond2000);
|
15570
|
+
weekday.setDate(sundayJanuarySecond2000.getDate() + daysFromSunday + i);
|
15571
|
+
return new Intl.DateTimeFormat(locale, {
|
15572
|
+
weekday: 'long'
|
15573
|
+
}).format(weekday);
|
15574
|
+
});
|
15575
|
+
}
|
15576
|
+
function format(value, formatString, locale) {
|
15577
|
+
const date = new Date(value);
|
15578
|
+
let options = {};
|
15579
|
+
switch (formatString) {
|
15580
|
+
case 'fullDateWithWeekday':
|
15581
|
+
options = {
|
15582
|
+
weekday: 'long',
|
15583
|
+
day: 'numeric',
|
15584
|
+
month: 'long',
|
15585
|
+
year: 'numeric'
|
15586
|
+
};
|
15587
|
+
break;
|
15588
|
+
case 'normalDateWithWeekday':
|
15589
|
+
options = {
|
15590
|
+
weekday: 'short',
|
15591
|
+
day: 'numeric',
|
15592
|
+
month: 'short',
|
15593
|
+
year: 'numeric'
|
15594
|
+
};
|
15595
|
+
break;
|
15596
|
+
case 'keyboardDate':
|
15597
|
+
options = {};
|
15598
|
+
break;
|
15599
|
+
case 'monthAndDate':
|
15600
|
+
options = {
|
15601
|
+
month: 'long',
|
15602
|
+
day: 'numeric'
|
15603
|
+
};
|
15604
|
+
break;
|
15605
|
+
case 'monthAndYear':
|
15606
|
+
options = {
|
15607
|
+
month: 'long',
|
15608
|
+
year: 'numeric'
|
15609
|
+
};
|
15610
|
+
break;
|
15611
|
+
default:
|
15612
|
+
options = {
|
15613
|
+
timeZone: 'UTC',
|
15614
|
+
timeZoneName: 'short'
|
15615
|
+
};
|
15616
|
+
}
|
15617
|
+
return new Intl.DateTimeFormat(locale, options).format(date);
|
15618
|
+
}
|
15619
|
+
function addDays(date, amount) {
|
15620
|
+
const d = new Date(date);
|
15621
|
+
d.setDate(d.getDate() + amount);
|
15622
|
+
return d;
|
15623
|
+
}
|
15624
|
+
function addMonths(date, amount) {
|
15625
|
+
const d = new Date(date);
|
15626
|
+
d.setMonth(d.getMonth() + amount);
|
15627
|
+
return d;
|
15628
|
+
}
|
15629
|
+
function getYear(date) {
|
15630
|
+
return date.getFullYear();
|
15631
|
+
}
|
15632
|
+
function getMonth(date) {
|
15633
|
+
return date.getMonth();
|
15634
|
+
}
|
15635
|
+
function startOfYear(date) {
|
15636
|
+
return new Date(date.getFullYear(), 0, 1);
|
15637
|
+
}
|
15638
|
+
function endOfYear(date) {
|
15639
|
+
return new Date(date.getFullYear(), 11, 31);
|
15640
|
+
}
|
15641
|
+
function getMondayOfFirstWeekOfYear(year) {
|
15642
|
+
return new Date(year, 0, 1);
|
15643
|
+
}
|
15644
|
+
|
15645
|
+
// https://stackoverflow.com/questions/274861/how-do-i-calculate-the-week-number-given-a-date/275024#275024
|
15646
|
+
function getWeek(date) {
|
15647
|
+
let year = date.getFullYear();
|
15648
|
+
let d1w1 = getMondayOfFirstWeekOfYear(year);
|
15649
|
+
if (date < d1w1) {
|
15650
|
+
year = year - 1;
|
15651
|
+
d1w1 = getMondayOfFirstWeekOfYear(year);
|
15652
|
+
} else {
|
15653
|
+
const tv = getMondayOfFirstWeekOfYear(year + 1);
|
15654
|
+
if (date >= tv) {
|
15655
|
+
year = year + 1;
|
15656
|
+
d1w1 = tv;
|
15657
|
+
}
|
15658
|
+
}
|
15659
|
+
const diffTime = Math.abs(date.getTime() - d1w1.getTime());
|
15660
|
+
const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
|
15661
|
+
return Math.floor(diffDays / 7) + 1;
|
15662
|
+
}
|
15663
|
+
function isWithinRange(date, range) {
|
15664
|
+
return isAfter(date, range[0]) && isBefore(date, range[1]);
|
15665
|
+
}
|
15666
|
+
function isValid(date) {
|
15667
|
+
const d = new Date(date);
|
15668
|
+
return d instanceof Date && !isNaN(d.getTime());
|
15669
|
+
}
|
15670
|
+
function isAfter(date, comparing) {
|
15671
|
+
return date.getTime() > comparing.getTime();
|
15672
|
+
}
|
15673
|
+
function isBefore(date, comparing) {
|
15674
|
+
return date.getTime() < comparing.getTime();
|
15675
|
+
}
|
15676
|
+
function isEqual(date, comparing) {
|
15677
|
+
return date.getTime() === comparing.getTime();
|
15678
|
+
}
|
15679
|
+
function isSameDay(date, comparing) {
|
15680
|
+
return date.getDate() === comparing.getDate() && date.getMonth() === comparing.getMonth() && date.getFullYear() === comparing.getFullYear();
|
15681
|
+
}
|
15682
|
+
function isSameMonth(date, comparing) {
|
15683
|
+
return date.getMonth() === comparing.getMonth() && date.getFullYear() === comparing.getFullYear();
|
15684
|
+
}
|
15685
|
+
function getDiff(date, comparing, unit) {
|
15686
|
+
const d = new Date(date);
|
15687
|
+
const c = new Date(comparing);
|
15688
|
+
if (unit === 'month') {
|
15689
|
+
return d.getMonth() - c.getMonth() + (d.getFullYear() - c.getFullYear()) * 12;
|
15690
|
+
}
|
15691
|
+
return Math.floor((d.getTime() - c.getTime()) / (1000 * 60 * 60 * 24));
|
15692
|
+
}
|
15693
|
+
function setYear(date, year) {
|
15694
|
+
const d = new Date(date);
|
15695
|
+
d.setFullYear(year);
|
15696
|
+
return d;
|
15697
|
+
}
|
15698
|
+
class VuetifyDateAdapter {
|
15699
|
+
constructor() {
|
15700
|
+
let locale = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'en';
|
15701
|
+
this.locale = locale;
|
15702
|
+
}
|
15703
|
+
date(value) {
|
15704
|
+
return date(value);
|
15705
|
+
}
|
15706
|
+
addDays(date, amount) {
|
15707
|
+
return addDays(date, amount);
|
15708
|
+
}
|
15709
|
+
addMonths(date, amount) {
|
15710
|
+
return addMonths(date, amount);
|
15711
|
+
}
|
15712
|
+
getWeekArray(date) {
|
15713
|
+
return getWeekArray(date);
|
15714
|
+
}
|
15715
|
+
startOfMonth(date) {
|
15716
|
+
return startOfMonth(date);
|
15717
|
+
}
|
15718
|
+
endOfMonth(date) {
|
15719
|
+
return endOfMonth(date);
|
15720
|
+
}
|
15721
|
+
format(date, formatString) {
|
15722
|
+
return format(date, formatString, this.locale);
|
15723
|
+
}
|
15724
|
+
isEqual(date, comparing) {
|
15725
|
+
return isEqual(date, comparing);
|
15726
|
+
}
|
15727
|
+
isValid(date) {
|
15728
|
+
return isValid(date);
|
15729
|
+
}
|
15730
|
+
isWithinRange(date, range) {
|
15731
|
+
return isWithinRange(date, range);
|
15732
|
+
}
|
15733
|
+
isAfter(date, comparing) {
|
15734
|
+
return isAfter(date, comparing);
|
15735
|
+
}
|
15736
|
+
isSameDay(date, comparing) {
|
15737
|
+
return isSameDay(date, comparing);
|
15738
|
+
}
|
15739
|
+
isSameMonth(date, comparing) {
|
15740
|
+
return isSameMonth(date, comparing);
|
15741
|
+
}
|
15742
|
+
setYear(date, year) {
|
15743
|
+
return setYear(date, year);
|
15744
|
+
}
|
15745
|
+
getDiff(date, comparing, unit) {
|
15746
|
+
return getDiff(date, comparing, unit);
|
15747
|
+
}
|
15748
|
+
getWeek(date) {
|
15749
|
+
return getWeek(date);
|
15750
|
+
}
|
15751
|
+
getWeekdays() {
|
15752
|
+
return getWeekdays(this.locale);
|
15753
|
+
}
|
15754
|
+
getYear(date) {
|
15755
|
+
return getYear(date);
|
15756
|
+
}
|
15757
|
+
getMonth(date) {
|
15758
|
+
return getMonth(date);
|
15759
|
+
}
|
15760
|
+
startOfYear(date) {
|
15761
|
+
return startOfYear(date);
|
15762
|
+
}
|
15763
|
+
endOfYear(date) {
|
15764
|
+
return endOfYear(date);
|
15765
|
+
}
|
15766
|
+
}
|
15767
|
+
|
15768
|
+
// Composables
|
15769
|
+
|
15770
|
+
// Types
|
15771
|
+
|
15772
|
+
const DateAdapterSymbol = Symbol.for('vuetify:date-adapter');
|
15773
|
+
function createDate(options) {
|
15774
|
+
return options ?? {
|
15775
|
+
adapter: VuetifyDateAdapter
|
15776
|
+
};
|
15777
|
+
}
|
15778
|
+
function useDate(props) {
|
15779
|
+
const date = vue.inject(DateAdapterSymbol);
|
15780
|
+
const locale = useLocale();
|
15781
|
+
if (!date) throw new Error('[Vuetify] Could not find injected date');
|
15782
|
+
|
15783
|
+
// eslint-disable-next-line new-cap
|
15784
|
+
const instance = new date.adapter(locale.current.value);
|
15785
|
+
vue.watch(locale.current, val => {
|
15786
|
+
instance.locale = val;
|
15787
|
+
}, {
|
15788
|
+
immediate: true
|
15789
|
+
});
|
15790
|
+
return instance;
|
15791
|
+
}
|
15792
|
+
|
15130
15793
|
function useSticky(_ref) {
|
15131
15794
|
let {
|
15132
15795
|
rootEl,
|
@@ -16131,7 +16794,7 @@
|
|
16131
16794
|
const model = useProxiedModel(props, 'modelValue');
|
16132
16795
|
useRender(() => {
|
16133
16796
|
const [inputAttrs, controlAttrs] = filterInputAttrs(attrs);
|
16134
|
-
const [inputProps, _1] =
|
16797
|
+
const [inputProps, _1] = VInput.filterProps(props);
|
16135
16798
|
const [controlProps, _2] = VSelectionControl.filterProps(props);
|
16136
16799
|
const label = slots.label ? slots.label({
|
16137
16800
|
label: props.label,
|
@@ -16196,11 +16859,14 @@
|
|
16196
16859
|
},
|
16197
16860
|
emits: {
|
16198
16861
|
'update:focused': value => true,
|
16199
|
-
'update:modelValue': value => true
|
16862
|
+
'update:modelValue': value => true,
|
16863
|
+
end: value => true,
|
16864
|
+
start: value => true
|
16200
16865
|
},
|
16201
16866
|
setup(props, _ref) {
|
16202
16867
|
let {
|
16203
|
-
slots
|
16868
|
+
slots,
|
16869
|
+
emit
|
16204
16870
|
} = _ref;
|
16205
16871
|
const startThumbRef = vue.ref();
|
16206
16872
|
const stopThumbRef = vue.ref();
|
@@ -16213,6 +16879,11 @@
|
|
16213
16879
|
const b = Math.abs(stopOffset);
|
16214
16880
|
return a < b || a === b && startOffset < 0 ? startThumbRef.value.$el : stopThumbRef.value.$el;
|
16215
16881
|
}
|
16882
|
+
const steps = useSteps(props);
|
16883
|
+
const model = useProxiedModel(props, 'modelValue', undefined, arr => {
|
16884
|
+
if (!arr?.length) return [0, 0];
|
16885
|
+
return arr.map(value => steps.roundValue(value));
|
16886
|
+
});
|
16216
16887
|
const {
|
16217
16888
|
activeThumbRef,
|
16218
16889
|
hasLabels,
|
@@ -16222,34 +16893,37 @@
|
|
16222
16893
|
onSliderMousedown,
|
16223
16894
|
onSliderTouchstart,
|
16224
16895
|
position,
|
16225
|
-
roundValue,
|
16226
16896
|
trackContainerRef
|
16227
16897
|
} = useSlider({
|
16228
|
-
/* eslint-disable @typescript-eslint/no-use-before-define */
|
16229
16898
|
props,
|
16230
|
-
|
16231
|
-
|
16899
|
+
steps,
|
16900
|
+
onSliderStart: () => {
|
16901
|
+
emit('start', model.value);
|
16902
|
+
},
|
16903
|
+
onSliderEnd: _ref2 => {
|
16904
|
+
let {
|
16905
|
+
value
|
16906
|
+
} = _ref2;
|
16907
|
+
const newValue = activeThumbRef.value === startThumbRef.value?.$el ? [value, model.value[1]] : [model.value[0], value];
|
16908
|
+
model.value = newValue;
|
16909
|
+
emit('end', newValue);
|
16232
16910
|
},
|
16233
|
-
|
16911
|
+
onSliderMove: _ref3 => {
|
16912
|
+
let {
|
16913
|
+
value
|
16914
|
+
} = _ref3;
|
16234
16915
|
const [start, stop] = model.value;
|
16235
16916
|
if (!props.strict && start === stop && start !== min.value) {
|
16236
|
-
activeThumbRef.value =
|
16917
|
+
activeThumbRef.value = value > start ? stopThumbRef.value?.$el : startThumbRef.value?.$el;
|
16237
16918
|
activeThumbRef.value?.focus();
|
16238
16919
|
}
|
16239
16920
|
if (activeThumbRef.value === startThumbRef.value?.$el) {
|
16240
|
-
model.value = [Math.min(
|
16921
|
+
model.value = [Math.min(value, stop), stop];
|
16241
16922
|
} else {
|
16242
|
-
model.value = [start, Math.max(start,
|
16923
|
+
model.value = [start, Math.max(start, value)];
|
16243
16924
|
}
|
16244
16925
|
},
|
16245
16926
|
getActiveThumb
|
16246
|
-
/* eslint-enable @typescript-eslint/no-use-before-define */
|
16247
|
-
});
|
16248
|
-
|
16249
|
-
const model = useProxiedModel(props, 'modelValue', undefined, arr => {
|
16250
|
-
// eslint-disable-next-line @typescript-eslint/prefer-optional-chain
|
16251
|
-
if (!arr || !arr.length) return [0, 0];
|
16252
|
-
return arr.map(value => roundValue(value));
|
16253
16927
|
});
|
16254
16928
|
const {
|
16255
16929
|
isFocused,
|
@@ -16259,7 +16933,7 @@
|
|
16259
16933
|
const trackStart = vue.computed(() => position(model.value[0]));
|
16260
16934
|
const trackStop = vue.computed(() => position(model.value[1]));
|
16261
16935
|
useRender(() => {
|
16262
|
-
const [inputProps, _] =
|
16936
|
+
const [inputProps, _] = VInput.filterProps(props);
|
16263
16937
|
const hasPrepend = !!(props.label || slots.label || slots.prepend);
|
16264
16938
|
return vue.createVNode(VInput, vue.mergeProps({
|
16265
16939
|
"class": ['v-slider', 'v-range-slider', {
|
@@ -16277,11 +16951,11 @@
|
|
16277
16951
|
"class": "v-slider__label",
|
16278
16952
|
"text": props.label
|
16279
16953
|
}, null) : undefined, slots.prepend?.(slotProps)]) : undefined,
|
16280
|
-
default:
|
16954
|
+
default: _ref4 => {
|
16281
16955
|
let {
|
16282
16956
|
id,
|
16283
16957
|
messagesId
|
16284
|
-
} =
|
16958
|
+
} = _ref4;
|
16285
16959
|
return vue.createVNode("div", {
|
16286
16960
|
"class": "v-slider__container",
|
16287
16961
|
"onMousedown": onSliderMousedown,
|
@@ -17104,10 +17778,12 @@
|
|
17104
17778
|
}
|
17105
17779
|
useRender(() => {
|
17106
17780
|
const [inputAttrs, controlAttrs] = filterInputAttrs(attrs);
|
17107
|
-
const [inputProps, _1] =
|
17781
|
+
const [inputProps, _1] = VInput.filterProps(props);
|
17108
17782
|
const [controlProps, _2] = VSelectionControl.filterProps(props);
|
17109
17783
|
const control = vue.ref();
|
17110
|
-
function onClick() {
|
17784
|
+
function onClick(e) {
|
17785
|
+
e.stopPropagation();
|
17786
|
+
e.preventDefault();
|
17111
17787
|
control.value?.input?.click();
|
17112
17788
|
}
|
17113
17789
|
return vue.createVNode(VInput, vue.mergeProps({
|
@@ -17468,8 +18144,6 @@
|
|
17468
18144
|
autofocus: Boolean,
|
17469
18145
|
counter: [Boolean, Number, String],
|
17470
18146
|
counterValue: Function,
|
17471
|
-
hint: String,
|
17472
|
-
persistentHint: Boolean,
|
17473
18147
|
prefix: String,
|
17474
18148
|
placeholder: String,
|
17475
18149
|
persistentPlaceholder: Boolean,
|
@@ -17524,9 +18198,6 @@
|
|
17524
18198
|
const controlHeight = vue.ref('');
|
17525
18199
|
const textareaRef = vue.ref();
|
17526
18200
|
const isActive = vue.computed(() => isFocused.value || props.persistentPlaceholder);
|
17527
|
-
const messages = vue.computed(() => {
|
17528
|
-
return props.messages.length ? props.messages : isFocused.value || props.persistentHint ? props.hint : '';
|
17529
|
-
});
|
17530
18201
|
function onFocus() {
|
17531
18202
|
if (textareaRef.value !== document.activeElement) {
|
17532
18203
|
textareaRef.value?.focus();
|
@@ -17598,7 +18269,7 @@
|
|
17598
18269
|
const [{
|
17599
18270
|
modelValue: _,
|
17600
18271
|
...inputProps
|
17601
|
-
}] =
|
18272
|
+
}] = VInput.filterProps(props);
|
17602
18273
|
const [fieldProps] = filterFieldProps(props);
|
17603
18274
|
return vue.createVNode(VInput, vue.mergeProps({
|
17604
18275
|
"ref": vInputRef,
|
@@ -17612,12 +18283,9 @@
|
|
17612
18283
|
'v-textarea--auto-grow': props.autoGrow,
|
17613
18284
|
'v-textarea--no-resize': props.noResize || props.autoGrow,
|
17614
18285
|
'v-text-field--flush-details': ['plain', 'underlined'].includes(props.variant)
|
17615
|
-
}]
|
17616
|
-
"onClick:prepend": props['onClick:prepend'],
|
17617
|
-
"onClick:append": props['onClick:append']
|
18286
|
+
}]
|
17618
18287
|
}, rootAttrs, inputProps, {
|
17619
|
-
"focused": isFocused.value
|
17620
|
-
"messages": messages.value
|
18288
|
+
"focused": isFocused.value
|
17621
18289
|
}), {
|
17622
18290
|
...slots,
|
17623
18291
|
default: _ref2 => {
|
@@ -19099,56 +19767,64 @@
|
|
19099
19767
|
const {
|
19100
19768
|
t
|
19101
19769
|
} = useLocale();
|
19102
|
-
useRender(() =>
|
19103
|
-
|
19104
|
-
|
19105
|
-
|
19106
|
-
|
19107
|
-
|
19108
|
-
|
19109
|
-
|
19110
|
-
|
19111
|
-
|
19112
|
-
|
19113
|
-
|
19114
|
-
|
19770
|
+
useRender(() => {
|
19771
|
+
if (props.loading && slots.loading) {
|
19772
|
+
return vue.createVNode("tr", {
|
19773
|
+
"class": "v-data-table-rows-no-data",
|
19774
|
+
"key": "loading"
|
19775
|
+
}, [vue.createVNode("td", {
|
19776
|
+
"colspan": columns.value.length
|
19777
|
+
}, [slots.loading()])]);
|
19778
|
+
}
|
19779
|
+
if (!props.loading && !props.items.length && !props.hideNoData && slots['no-data']) {
|
19780
|
+
return vue.createVNode("tr", {
|
19781
|
+
"class": "v-data-table-rows-no-data",
|
19782
|
+
"key": "no-data"
|
19783
|
+
}, [vue.createVNode("td", {
|
19784
|
+
"colspan": columns.value.length
|
19785
|
+
}, [slots['no-data']?.() ?? t(props.noDataText)])]);
|
19786
|
+
}
|
19787
|
+
return vue.createVNode(vue.Fragment, null, [props.items.map((item, index) => {
|
19788
|
+
if (item.type === 'group-header') {
|
19789
|
+
return slots['group-header'] ? slots['group-header']({
|
19790
|
+
index,
|
19791
|
+
item,
|
19792
|
+
columns: columns.value,
|
19793
|
+
isExpanded,
|
19794
|
+
toggleExpand,
|
19795
|
+
isSelected,
|
19796
|
+
toggleSelect,
|
19797
|
+
toggleGroup,
|
19798
|
+
isGroupOpen
|
19799
|
+
}) : vue.createVNode(VDataTableGroupHeaderRow, {
|
19800
|
+
"key": `group-header_${item.id}`,
|
19801
|
+
"item": item
|
19802
|
+
}, slots);
|
19803
|
+
}
|
19804
|
+
const slotProps = {
|
19115
19805
|
index,
|
19116
19806
|
item,
|
19117
19807
|
columns: columns.value,
|
19118
19808
|
isExpanded,
|
19119
19809
|
toggleExpand,
|
19120
19810
|
isSelected,
|
19121
|
-
toggleSelect
|
19122
|
-
|
19123
|
-
|
19124
|
-
|
19125
|
-
"
|
19811
|
+
toggleSelect
|
19812
|
+
};
|
19813
|
+
return vue.createVNode(vue.Fragment, null, [slots.item ? slots.item(slotProps) : vue.createVNode(VDataTableRow, {
|
19814
|
+
"key": `item_${item.value}`,
|
19815
|
+
"onClick": expandOnClick.value || props['onClick:row'] ? event => {
|
19816
|
+
if (expandOnClick.value) {
|
19817
|
+
toggleExpand(item);
|
19818
|
+
}
|
19819
|
+
props['onClick:row']?.(event, {
|
19820
|
+
item
|
19821
|
+
});
|
19822
|
+
} : undefined,
|
19823
|
+
"index": index,
|
19126
19824
|
"item": item
|
19127
|
-
}, slots);
|
19128
|
-
}
|
19129
|
-
|
19130
|
-
index,
|
19131
|
-
item,
|
19132
|
-
columns: columns.value,
|
19133
|
-
isExpanded,
|
19134
|
-
toggleExpand,
|
19135
|
-
isSelected,
|
19136
|
-
toggleSelect
|
19137
|
-
};
|
19138
|
-
return vue.createVNode(vue.Fragment, null, [slots.item ? slots.item(slotProps) : vue.createVNode(VDataTableRow, {
|
19139
|
-
"key": `item_${item.value}`,
|
19140
|
-
"onClick": expandOnClick.value || props['onClick:row'] ? event => {
|
19141
|
-
if (expandOnClick.value) {
|
19142
|
-
toggleExpand(item);
|
19143
|
-
}
|
19144
|
-
props['onClick:row']?.(event, {
|
19145
|
-
item
|
19146
|
-
});
|
19147
|
-
} : undefined,
|
19148
|
-
"index": index,
|
19149
|
-
"item": item
|
19150
|
-
}, slots), isExpanded(item) && slots['expanded-row']?.(slotProps)]);
|
19151
|
-
})]));
|
19825
|
+
}, slots), isExpanded(item) && slots['expanded-row']?.(slotProps)]);
|
19826
|
+
})]);
|
19827
|
+
});
|
19152
19828
|
return {};
|
19153
19829
|
}
|
19154
19830
|
});
|
@@ -19423,7 +20099,8 @@
|
|
19423
20099
|
page: page.value,
|
19424
20100
|
itemsPerPage: itemsPerPage.value,
|
19425
20101
|
sortBy: sortBy.value,
|
19426
|
-
groupBy: groupBy.value
|
20102
|
+
groupBy: groupBy.value,
|
20103
|
+
search: search.value
|
19427
20104
|
}));
|
19428
20105
|
|
19429
20106
|
// Reset page when searching
|
@@ -19456,12 +20133,12 @@
|
|
19456
20133
|
width: [String, Number],
|
19457
20134
|
fixedHeader: Boolean,
|
19458
20135
|
fixedFooter: Boolean,
|
19459
|
-
'onClick:row': Function
|
20136
|
+
'onClick:row': Function,
|
20137
|
+
search: String
|
19460
20138
|
}, 'v-data-table');
|
19461
20139
|
const VDataTable = genericComponent()({
|
19462
20140
|
name: 'VDataTable',
|
19463
20141
|
props: {
|
19464
|
-
search: String,
|
19465
20142
|
...makeVDataTableProps(),
|
19466
20143
|
...makeDataTableExpandProps(),
|
19467
20144
|
...makeDataTableGroupProps(),
|
@@ -19676,7 +20353,6 @@
|
|
19676
20353
|
const VDataTableVirtual = genericComponent()({
|
19677
20354
|
name: 'VDataTableVirtual',
|
19678
20355
|
props: {
|
19679
|
-
search: String,
|
19680
20356
|
...makeVDataTableProps(),
|
19681
20357
|
...makeVDataTableProps(),
|
19682
20358
|
...makeDataTableGroupProps(),
|
@@ -19915,7 +20591,8 @@
|
|
19915
20591
|
page,
|
19916
20592
|
itemsPerPage,
|
19917
20593
|
sortBy,
|
19918
|
-
groupBy
|
20594
|
+
groupBy,
|
20595
|
+
search: vue.toRef(props, 'search')
|
19919
20596
|
});
|
19920
20597
|
vue.provide('v-data-table', {
|
19921
20598
|
toggleSort,
|
@@ -19975,6 +20652,7 @@
|
|
19975
20652
|
'date-picker': 'list-item, heading, divider, date-picker-options, date-picker-days, actions',
|
19976
20653
|
'date-picker-options': 'text, avatar@2',
|
19977
20654
|
'date-picker-days': 'avatar@28',
|
20655
|
+
divider: 'divider',
|
19978
20656
|
heading: 'heading',
|
19979
20657
|
image: 'image',
|
19980
20658
|
'list-item': 'text',
|
@@ -20382,6 +21060,7 @@
|
|
20382
21060
|
const theme = createTheme(options.theme);
|
20383
21061
|
const icons = createIcons(options.icons);
|
20384
21062
|
const locale = createLocale(options.locale);
|
21063
|
+
const date = createDate(options.date);
|
20385
21064
|
const install = app => {
|
20386
21065
|
for (const key in directives) {
|
20387
21066
|
app.directive(key, directives[key]);
|
@@ -20402,6 +21081,7 @@
|
|
20402
21081
|
app.provide(ThemeSymbol, theme);
|
20403
21082
|
app.provide(IconSymbol, icons);
|
20404
21083
|
app.provide(LocaleSymbol, locale);
|
21084
|
+
app.provide(DateAdapterSymbol, date);
|
20405
21085
|
if (IN_BROWSER && options.ssr) {
|
20406
21086
|
if (app.$nuxt) {
|
20407
21087
|
app.$nuxt.hook('app:suspense:resolve', () => {
|
@@ -20429,7 +21109,8 @@
|
|
20429
21109
|
display: inject.call(this, DisplaySymbol),
|
20430
21110
|
theme: inject.call(this, ThemeSymbol),
|
20431
21111
|
icons: inject.call(this, IconSymbol),
|
20432
|
-
locale: inject.call(this, LocaleSymbol)
|
21112
|
+
locale: inject.call(this, LocaleSymbol),
|
21113
|
+
date: inject.call(this, DateAdapterSymbol)
|
20433
21114
|
});
|
20434
21115
|
}
|
20435
21116
|
}
|
@@ -20442,10 +21123,11 @@
|
|
20442
21123
|
display,
|
20443
21124
|
theme,
|
20444
21125
|
icons,
|
20445
|
-
locale
|
21126
|
+
locale,
|
21127
|
+
date
|
20446
21128
|
};
|
20447
21129
|
}
|
20448
|
-
const version$1 = "4.0.0-dev-
|
21130
|
+
const version$1 = "4.0.0-dev-20230422.0";
|
20449
21131
|
createVuetify$1.version = version$1;
|
20450
21132
|
|
20451
21133
|
// Vue's inject() can only be used in setup
|
@@ -20457,7 +21139,7 @@
|
|
20457
21139
|
}
|
20458
21140
|
}
|
20459
21141
|
|
20460
|
-
const version = "4.0.0-dev-
|
21142
|
+
const version = "4.0.0-dev-20230422.0";
|
20461
21143
|
|
20462
21144
|
const createVuetify = function () {
|
20463
21145
|
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
@@ -20471,6 +21153,7 @@
|
|
20471
21153
|
exports.components = components;
|
20472
21154
|
exports.createVuetify = createVuetify;
|
20473
21155
|
exports.directives = directives;
|
21156
|
+
exports.useDate = useDate;
|
20474
21157
|
exports.useDisplay = useDisplay;
|
20475
21158
|
exports.useLayout = useLayout;
|
20476
21159
|
exports.useLocale = useLocale;
|