@vuetify/nightly 3.8.10-dev.2025-06-18 → 3.8.10-dev.2025-06-19
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 +14 -4
- package/dist/_component-variables-labs.sass +1 -3
- package/dist/_component-variables.sass +2 -0
- package/dist/json/attributes.json +3889 -3885
- package/dist/json/importMap-labs.json +32 -56
- package/dist/json/importMap.json +180 -156
- package/dist/json/tags.json +7 -6
- package/dist/json/web-types.json +7006 -6996
- package/dist/vuetify-labs.cjs +3071 -3065
- package/dist/vuetify-labs.css +5691 -5661
- package/dist/vuetify-labs.d.ts +8142 -4681
- package/dist/vuetify-labs.esm.js +3071 -3065
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +3071 -3065
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.cjs +1218 -160
- package/dist/vuetify.cjs.map +1 -1
- package/dist/vuetify.css +5014 -4715
- package/dist/vuetify.d.ts +6675 -1051
- package/dist/vuetify.esm.js +1218 -160
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +1218 -160
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +1224 -1143
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.d.ts +18 -18
- package/lib/components/VCarousel/VCarousel.d.ts +11 -1
- package/lib/components/VCheckbox/VCheckbox.d.ts +696 -3
- package/lib/components/VCheckbox/VCheckbox.js +5 -2
- package/lib/components/VCheckbox/VCheckbox.js.map +1 -1
- package/lib/components/VCombobox/VCombobox.d.ts +18 -18
- package/lib/components/VFileInput/VFileInput.d.ts +6 -6
- package/lib/components/VList/VListItem.d.ts +3 -3
- package/lib/components/VList/VListItem.js.map +1 -1
- package/lib/components/VNumberInput/VNumberInput.d.ts +18 -18
- package/lib/components/VRadioGroup/VRadioGroup.d.ts +696 -3
- package/lib/components/VRadioGroup/VRadioGroup.js +5 -2
- package/lib/components/VRadioGroup/VRadioGroup.js.map +1 -1
- package/lib/components/VRangeSlider/VRangeSlider.d.ts +696 -3
- package/lib/components/VRangeSlider/VRangeSlider.js +2 -1
- package/lib/components/VRangeSlider/VRangeSlider.js.map +1 -1
- package/lib/components/VSelect/VSelect.d.ts +18 -18
- package/lib/components/VSlider/VSlider.d.ts +696 -3
- package/lib/components/VSlider/VSlider.js +4 -1
- package/lib/components/VSlider/VSlider.js.map +1 -1
- package/lib/components/VStepper/VStepperWindow.d.ts +10 -0
- package/lib/components/VSwitch/VSwitch.d.ts +696 -3
- package/lib/components/VSwitch/VSwitch.js +4 -1
- package/lib/components/VSwitch/VSwitch.js.map +1 -1
- package/lib/components/VTabs/VTabsWindow.d.ts +10 -0
- package/lib/components/VTextField/VTextField.d.ts +6 -6
- package/lib/components/VTextarea/VTextarea.d.ts +6 -6
- package/lib/{labs → components}/VTimePicker/VTimePicker.d.ts +1 -14
- package/lib/{labs → components}/VTimePicker/VTimePicker.js +2 -4
- package/lib/components/VTimePicker/VTimePicker.js.map +1 -0
- package/lib/components/VTimePicker/VTimePickerClock.js.map +1 -0
- package/lib/{labs → components}/VTimePicker/VTimePickerControls.d.ts +0 -26
- package/lib/{labs → components}/VTimePicker/VTimePickerControls.js +3 -7
- package/lib/components/VTimePicker/VTimePickerControls.js.map +1 -0
- package/lib/{labs → components}/VTimePicker/_variables.scss +1 -1
- package/lib/components/VTimePicker/index.js.map +1 -0
- package/lib/components/VTimePicker/shared.js.map +1 -0
- package/lib/components/VTimePicker/util.js.map +1 -0
- package/lib/{labs → components}/VTreeview/VTreeview.d.ts +10 -10
- package/lib/{labs → components}/VTreeview/VTreeview.js +1 -1
- package/lib/components/VTreeview/VTreeview.js.map +1 -0
- package/lib/{labs → components}/VTreeview/VTreeviewChildren.d.ts +22 -22
- package/lib/{labs → components}/VTreeview/VTreeviewChildren.js +1 -1
- package/lib/components/VTreeview/VTreeviewChildren.js.map +1 -0
- package/lib/{labs → components}/VTreeview/VTreeviewGroup.js +2 -2
- package/lib/components/VTreeview/VTreeviewGroup.js.map +1 -0
- package/lib/{labs → components}/VTreeview/VTreeviewItem.d.ts +58 -58
- package/lib/{labs → components}/VTreeview/VTreeviewItem.js +4 -4
- package/lib/components/VTreeview/VTreeviewItem.js.map +1 -0
- package/lib/components/VTreeview/index.js.map +1 -0
- package/lib/components/VTreeview/shared.js.map +1 -0
- package/lib/components/VWindow/VWindow.css +15 -0
- package/lib/components/VWindow/VWindow.d.ts +10 -0
- package/lib/components/VWindow/VWindow.js +8 -2
- package/lib/components/VWindow/VWindow.js.map +1 -1
- package/lib/components/VWindow/VWindow.sass +17 -0
- package/lib/components/VWindow/_variables.scss +1 -0
- package/lib/components/index.d.ts +2 -0
- package/lib/components/index.js +4 -2
- package/lib/components/index.js.map +1 -1
- package/lib/composables/forwardRefs.d.ts +2 -2
- package/lib/composables/forwardRefs.js.map +1 -1
- package/lib/composables/icons.d.ts +1 -1
- package/lib/composables/icons.js.map +1 -1
- package/lib/composables/mask.d.ts +1 -1
- package/lib/composables/mask.js.map +1 -1
- package/lib/composables/theme.d.ts +1 -1
- package/lib/composables/theme.js +2 -4
- package/lib/composables/theme.js.map +1 -1
- package/lib/entry-bundler.js +1 -1
- package/lib/framework.d.ts +68 -68
- package/lib/framework.js +1 -1
- package/lib/labs/VCalendar/VCalendar.d.ts +24 -24
- package/lib/labs/VCalendar/VCalendar.js.map +1 -1
- package/lib/labs/VDateInput/VDateInput.d.ts +18 -18
- package/lib/labs/VMaskInput/VMaskInput.d.ts +18 -18
- package/lib/labs/components.d.ts +0 -2
- package/lib/labs/components.js +0 -2
- package/lib/labs/components.js.map +1 -1
- package/lib/styles/main.css +15 -0
- package/lib/styles/utilities/_index.sass +1 -0
- package/lib/styles/utilities/_pointer-events.sass +16 -0
- package/lib/util/helpers.d.ts +1 -0
- package/lib/util/helpers.js.map +1 -1
- package/package.json +1 -1
- package/lib/labs/VTimePicker/VTimePicker.js.map +0 -1
- package/lib/labs/VTimePicker/VTimePickerClock.js.map +0 -1
- package/lib/labs/VTimePicker/VTimePickerControls.js.map +0 -1
- package/lib/labs/VTimePicker/index.js.map +0 -1
- package/lib/labs/VTimePicker/shared.js.map +0 -1
- package/lib/labs/VTimePicker/util.js.map +0 -1
- package/lib/labs/VTreeview/VTreeview.js.map +0 -1
- package/lib/labs/VTreeview/VTreeviewChildren.js.map +0 -1
- package/lib/labs/VTreeview/VTreeviewGroup.js.map +0 -1
- package/lib/labs/VTreeview/VTreeviewItem.js.map +0 -1
- package/lib/labs/VTreeview/index.js.map +0 -1
- package/lib/labs/VTreeview/shared.js.map +0 -1
- /package/lib/{labs → components}/VTimePicker/VTimePicker.css +0 -0
- /package/lib/{labs → components}/VTimePicker/VTimePicker.sass +0 -0
- /package/lib/{labs → components}/VTimePicker/VTimePickerClock.css +0 -0
- /package/lib/{labs → components}/VTimePicker/VTimePickerClock.d.ts +0 -0
- /package/lib/{labs → components}/VTimePicker/VTimePickerClock.js +0 -0
- /package/lib/{labs → components}/VTimePicker/VTimePickerClock.sass +0 -0
- /package/lib/{labs → components}/VTimePicker/VTimePickerControls.css +0 -0
- /package/lib/{labs → components}/VTimePicker/VTimePickerControls.sass +0 -0
- /package/lib/{labs → components}/VTimePicker/index.d.ts +0 -0
- /package/lib/{labs → components}/VTimePicker/index.js +0 -0
- /package/lib/{labs → components}/VTimePicker/shared.d.ts +0 -0
- /package/lib/{labs → components}/VTimePicker/shared.js +0 -0
- /package/lib/{labs → components}/VTimePicker/util.d.ts +0 -0
- /package/lib/{labs → components}/VTimePicker/util.js +0 -0
- /package/lib/{labs → components}/VTreeview/VTreeviewGroup.d.ts +0 -0
- /package/lib/{labs → components}/VTreeview/VTreeviewItem.css +0 -0
- /package/lib/{labs → components}/VTreeview/VTreeviewItem.sass +0 -0
- /package/lib/{labs → components}/VTreeview/_variables.scss +0 -0
- /package/lib/{labs → components}/VTreeview/index.d.ts +0 -0
- /package/lib/{labs → components}/VTreeview/index.js +0 -0
- /package/lib/{labs → components}/VTreeview/shared.d.ts +0 -0
- /package/lib/{labs → components}/VTreeview/shared.js +0 -0
package/dist/vuetify.esm.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Vuetify v3.8.10-dev.2025-06-
|
2
|
+
* Vuetify v3.8.10-dev.2025-06-19
|
3
3
|
* Forged by John Leider
|
4
4
|
* Released under the MIT License.
|
5
5
|
*/
|
@@ -3171,15 +3171,13 @@ function createTheme(options) {
|
|
3171
3171
|
}
|
3172
3172
|
const globalName = new Proxy(name, {
|
3173
3173
|
get(target, prop) {
|
3174
|
-
return target
|
3174
|
+
return Reflect.get(target, prop);
|
3175
3175
|
},
|
3176
3176
|
set(target, prop, val) {
|
3177
3177
|
if (prop === 'value') {
|
3178
3178
|
deprecate(`theme.global.name.value = ${val}`, `theme.change('${val}')`);
|
3179
3179
|
}
|
3180
|
-
|
3181
|
-
target[prop] = val;
|
3182
|
-
return true;
|
3180
|
+
return Reflect.set(target, prop, val);
|
3183
3181
|
}
|
3184
3182
|
});
|
3185
3183
|
return {
|
@@ -7554,6 +7552,103 @@ const VInput = genericComponent()({
|
|
7554
7552
|
|
7555
7553
|
// Types
|
7556
7554
|
|
7555
|
+
const Refs = Symbol('Forwarded refs');
|
7556
|
+
|
7557
|
+
/** Omit properties starting with P */
|
7558
|
+
|
7559
|
+
/** Omit keyof $props from T */
|
7560
|
+
|
7561
|
+
function getDescriptor(obj, key) {
|
7562
|
+
let currentObj = obj;
|
7563
|
+
while (currentObj) {
|
7564
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(currentObj, key);
|
7565
|
+
if (descriptor) return descriptor;
|
7566
|
+
currentObj = Object.getPrototypeOf(currentObj);
|
7567
|
+
}
|
7568
|
+
return undefined;
|
7569
|
+
}
|
7570
|
+
function forwardRefs(target) {
|
7571
|
+
for (var _len = arguments.length, refs = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
7572
|
+
refs[_key - 1] = arguments[_key];
|
7573
|
+
}
|
7574
|
+
target[Refs] = refs;
|
7575
|
+
return new Proxy(target, {
|
7576
|
+
get(target, key) {
|
7577
|
+
if (Reflect.has(target, key)) {
|
7578
|
+
return Reflect.get(target, key);
|
7579
|
+
}
|
7580
|
+
|
7581
|
+
// Skip internal properties
|
7582
|
+
if (typeof key === 'symbol' || key.startsWith('$') || key.startsWith('__')) return;
|
7583
|
+
for (const ref of refs) {
|
7584
|
+
if (ref.value && Reflect.has(ref.value, key)) {
|
7585
|
+
const val = Reflect.get(ref.value, key);
|
7586
|
+
return typeof val === 'function' ? val.bind(ref.value) : val;
|
7587
|
+
}
|
7588
|
+
}
|
7589
|
+
},
|
7590
|
+
has(target, key) {
|
7591
|
+
if (Reflect.has(target, key)) {
|
7592
|
+
return true;
|
7593
|
+
}
|
7594
|
+
|
7595
|
+
// Skip internal properties
|
7596
|
+
if (typeof key === 'symbol' || key.startsWith('$') || key.startsWith('__')) return false;
|
7597
|
+
for (const ref of refs) {
|
7598
|
+
if (ref.value && Reflect.has(ref.value, key)) {
|
7599
|
+
return true;
|
7600
|
+
}
|
7601
|
+
}
|
7602
|
+
return false;
|
7603
|
+
},
|
7604
|
+
set(target, key, value) {
|
7605
|
+
if (Reflect.has(target, key)) {
|
7606
|
+
return Reflect.set(target, key, value);
|
7607
|
+
}
|
7608
|
+
|
7609
|
+
// Skip internal properties
|
7610
|
+
if (typeof key === 'symbol' || key.startsWith('$') || key.startsWith('__')) return false;
|
7611
|
+
for (const ref of refs) {
|
7612
|
+
if (ref.value && Reflect.has(ref.value, key)) {
|
7613
|
+
return Reflect.set(ref.value, key, value);
|
7614
|
+
}
|
7615
|
+
}
|
7616
|
+
return false;
|
7617
|
+
},
|
7618
|
+
getOwnPropertyDescriptor(target, key) {
|
7619
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(target, key);
|
7620
|
+
if (descriptor) return descriptor;
|
7621
|
+
|
7622
|
+
// Skip internal properties
|
7623
|
+
if (typeof key === 'symbol' || key.startsWith('$') || key.startsWith('__')) return;
|
7624
|
+
|
7625
|
+
// Check each ref's own properties
|
7626
|
+
for (const ref of refs) {
|
7627
|
+
if (!ref.value) continue;
|
7628
|
+
const descriptor = getDescriptor(ref.value, key) ?? ('_' in ref.value ? getDescriptor(ref.value._?.setupState, key) : undefined);
|
7629
|
+
if (descriptor) return descriptor;
|
7630
|
+
}
|
7631
|
+
|
7632
|
+
// Recursive search up each ref's prototype
|
7633
|
+
for (const ref of refs) {
|
7634
|
+
const childRefs = ref.value && ref.value[Refs];
|
7635
|
+
if (!childRefs) continue;
|
7636
|
+
const queue = childRefs.slice();
|
7637
|
+
while (queue.length) {
|
7638
|
+
const ref = queue.shift();
|
7639
|
+
const descriptor = getDescriptor(ref.value, key);
|
7640
|
+
if (descriptor) return descriptor;
|
7641
|
+
const childRefs = ref.value && ref.value[Refs];
|
7642
|
+
if (childRefs) queue.push(...childRefs);
|
7643
|
+
}
|
7644
|
+
}
|
7645
|
+
return undefined;
|
7646
|
+
}
|
7647
|
+
});
|
7648
|
+
}
|
7649
|
+
|
7650
|
+
// Types
|
7651
|
+
|
7557
7652
|
const makeVCheckboxProps = propsFactory({
|
7558
7653
|
...makeVInputProps(),
|
7559
7654
|
...omit(makeVCheckboxBtnProps(), ['inline'])
|
@@ -7577,12 +7672,14 @@ const VCheckbox = genericComponent()({
|
|
7577
7672
|
focus,
|
7578
7673
|
blur
|
7579
7674
|
} = useFocus(props);
|
7675
|
+
const inputRef = ref();
|
7580
7676
|
const uid = useId();
|
7581
7677
|
useRender(() => {
|
7582
7678
|
const [rootAttrs, controlAttrs] = filterInputAttrs(attrs);
|
7583
7679
|
const inputProps = VInput.filterProps(props);
|
7584
7680
|
const checkboxProps = VCheckboxBtn.filterProps(props);
|
7585
7681
|
return createVNode(VInput, mergeProps({
|
7682
|
+
"ref": inputRef,
|
7586
7683
|
"class": ['v-checkbox', props.class]
|
7587
7684
|
}, rootAttrs, inputProps, {
|
7588
7685
|
"modelValue": model.value,
|
@@ -7615,7 +7712,7 @@ const VCheckbox = genericComponent()({
|
|
7615
7712
|
}
|
7616
7713
|
});
|
7617
7714
|
});
|
7618
|
-
return {};
|
7715
|
+
return forwardRefs({}, inputRef);
|
7619
7716
|
}
|
7620
7717
|
});
|
7621
7718
|
|
@@ -11826,103 +11923,6 @@ const VOverlay = genericComponent()({
|
|
11826
11923
|
|
11827
11924
|
// Types
|
11828
11925
|
|
11829
|
-
const Refs = Symbol('Forwarded refs');
|
11830
|
-
|
11831
|
-
/** Omit properties starting with P */
|
11832
|
-
|
11833
|
-
/** Omit keyof $props from T */
|
11834
|
-
|
11835
|
-
function getDescriptor(obj, key) {
|
11836
|
-
let currentObj = obj;
|
11837
|
-
while (currentObj) {
|
11838
|
-
const descriptor = Reflect.getOwnPropertyDescriptor(currentObj, key);
|
11839
|
-
if (descriptor) return descriptor;
|
11840
|
-
currentObj = Object.getPrototypeOf(currentObj);
|
11841
|
-
}
|
11842
|
-
return undefined;
|
11843
|
-
}
|
11844
|
-
function forwardRefs(target) {
|
11845
|
-
for (var _len = arguments.length, refs = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
11846
|
-
refs[_key - 1] = arguments[_key];
|
11847
|
-
}
|
11848
|
-
target[Refs] = refs;
|
11849
|
-
return new Proxy(target, {
|
11850
|
-
get(target, key) {
|
11851
|
-
if (Reflect.has(target, key)) {
|
11852
|
-
return Reflect.get(target, key);
|
11853
|
-
}
|
11854
|
-
|
11855
|
-
// Skip internal properties
|
11856
|
-
if (typeof key === 'symbol' || key.startsWith('$') || key.startsWith('__')) return;
|
11857
|
-
for (const ref of refs) {
|
11858
|
-
if (ref.value && Reflect.has(ref.value, key)) {
|
11859
|
-
const val = Reflect.get(ref.value, key);
|
11860
|
-
return typeof val === 'function' ? val.bind(ref.value) : val;
|
11861
|
-
}
|
11862
|
-
}
|
11863
|
-
},
|
11864
|
-
has(target, key) {
|
11865
|
-
if (Reflect.has(target, key)) {
|
11866
|
-
return true;
|
11867
|
-
}
|
11868
|
-
|
11869
|
-
// Skip internal properties
|
11870
|
-
if (typeof key === 'symbol' || key.startsWith('$') || key.startsWith('__')) return false;
|
11871
|
-
for (const ref of refs) {
|
11872
|
-
if (ref.value && Reflect.has(ref.value, key)) {
|
11873
|
-
return true;
|
11874
|
-
}
|
11875
|
-
}
|
11876
|
-
return false;
|
11877
|
-
},
|
11878
|
-
set(target, key, value) {
|
11879
|
-
if (Reflect.has(target, key)) {
|
11880
|
-
return Reflect.set(target, key, value);
|
11881
|
-
}
|
11882
|
-
|
11883
|
-
// Skip internal properties
|
11884
|
-
if (typeof key === 'symbol' || key.startsWith('$') || key.startsWith('__')) return false;
|
11885
|
-
for (const ref of refs) {
|
11886
|
-
if (ref.value && Reflect.has(ref.value, key)) {
|
11887
|
-
return Reflect.set(ref.value, key, value);
|
11888
|
-
}
|
11889
|
-
}
|
11890
|
-
return false;
|
11891
|
-
},
|
11892
|
-
getOwnPropertyDescriptor(target, key) {
|
11893
|
-
const descriptor = Reflect.getOwnPropertyDescriptor(target, key);
|
11894
|
-
if (descriptor) return descriptor;
|
11895
|
-
|
11896
|
-
// Skip internal properties
|
11897
|
-
if (typeof key === 'symbol' || key.startsWith('$') || key.startsWith('__')) return;
|
11898
|
-
|
11899
|
-
// Check each ref's own properties
|
11900
|
-
for (const ref of refs) {
|
11901
|
-
if (!ref.value) continue;
|
11902
|
-
const descriptor = getDescriptor(ref.value, key) ?? ('_' in ref.value ? getDescriptor(ref.value._?.setupState, key) : undefined);
|
11903
|
-
if (descriptor) return descriptor;
|
11904
|
-
}
|
11905
|
-
|
11906
|
-
// Recursive search up each ref's prototype
|
11907
|
-
for (const ref of refs) {
|
11908
|
-
const childRefs = ref.value && ref.value[Refs];
|
11909
|
-
if (!childRefs) continue;
|
11910
|
-
const queue = childRefs.slice();
|
11911
|
-
while (queue.length) {
|
11912
|
-
const ref = queue.shift();
|
11913
|
-
const descriptor = getDescriptor(ref.value, key);
|
11914
|
-
if (descriptor) return descriptor;
|
11915
|
-
const childRefs = ref.value && ref.value[Refs];
|
11916
|
-
if (childRefs) queue.push(...childRefs);
|
11917
|
-
}
|
11918
|
-
}
|
11919
|
-
return undefined;
|
11920
|
-
}
|
11921
|
-
});
|
11922
|
-
}
|
11923
|
-
|
11924
|
-
// Types
|
11925
|
-
|
11926
11926
|
const makeVMenuProps = propsFactory({
|
11927
11927
|
// TODO
|
11928
11928
|
// disableKeys: Boolean,
|
@@ -15423,6 +15423,7 @@ const makeVWindowProps = propsFactory({
|
|
15423
15423
|
type: [Boolean, String],
|
15424
15424
|
validator: v => typeof v === 'boolean' || v === 'hover'
|
15425
15425
|
},
|
15426
|
+
verticalArrows: [Boolean, String],
|
15426
15427
|
touch: {
|
15427
15428
|
type: [Object, Boolean],
|
15428
15429
|
default: undefined
|
@@ -15557,7 +15558,8 @@ const VWindow = genericComponent()({
|
|
15557
15558
|
useRender(() => withDirectives(createVNode(props.tag, {
|
15558
15559
|
"ref": rootRef,
|
15559
15560
|
"class": normalizeClass(['v-window', {
|
15560
|
-
'v-window--show-arrows-on-hover': props.showArrows === 'hover'
|
15561
|
+
'v-window--show-arrows-on-hover': props.showArrows === 'hover',
|
15562
|
+
'v-window--vertical-arrows': !!props.verticalArrows
|
15561
15563
|
}, themeClasses.value, props.class]),
|
15562
15564
|
"style": normalizeStyle(props.style)
|
15563
15565
|
}, {
|
@@ -15569,7 +15571,11 @@ const VWindow = genericComponent()({
|
|
15569
15571
|
}, [slots.default?.({
|
15570
15572
|
group
|
15571
15573
|
}), props.showArrows !== false && createElementVNode("div", {
|
15572
|
-
"class":
|
15574
|
+
"class": normalizeClass(['v-window__controls', {
|
15575
|
+
'v-window__controls--left': props.verticalArrows === 'left' || props.verticalArrows === true
|
15576
|
+
}, {
|
15577
|
+
'v-window__controls--right': props.verticalArrows === 'right'
|
15578
|
+
}])
|
15573
15579
|
}, [arrows.value])]), slots.additional?.({
|
15574
15580
|
group
|
15575
15581
|
})]
|
@@ -16898,6 +16904,7 @@ const VSlider = genericComponent()({
|
|
16898
16904
|
emit
|
16899
16905
|
} = _ref;
|
16900
16906
|
const thumbContainerRef = ref();
|
16907
|
+
const inputRef = ref();
|
16901
16908
|
const {
|
16902
16909
|
rtlClasses
|
16903
16910
|
} = useRtl();
|
@@ -16948,6 +16955,7 @@ const VSlider = genericComponent()({
|
|
16948
16955
|
const inputProps = VInput.filterProps(props);
|
16949
16956
|
const hasPrepend = !!(props.label || slots.label || slots.prepend);
|
16950
16957
|
return createVNode(VInput, mergeProps({
|
16958
|
+
"ref": inputRef,
|
16951
16959
|
"class": ['v-slider', {
|
16952
16960
|
'v-slider--has-labels': !!slots['tick-label'] || hasLabels.value,
|
16953
16961
|
'v-slider--focused': isFocused.value,
|
@@ -17006,7 +17014,7 @@ const VSlider = genericComponent()({
|
|
17006
17014
|
}
|
17007
17015
|
});
|
17008
17016
|
});
|
17009
|
-
return {};
|
17017
|
+
return forwardRefs({}, inputRef);
|
17010
17018
|
}
|
17011
17019
|
});
|
17012
17020
|
|
@@ -26300,6 +26308,7 @@ const VRadioGroup = genericComponent()({
|
|
26300
26308
|
const uid = useId();
|
26301
26309
|
const id = computed(() => props.id || `radio-group-${uid}`);
|
26302
26310
|
const model = useProxiedModel(props, 'modelValue');
|
26311
|
+
const inputRef = ref();
|
26303
26312
|
useRender(() => {
|
26304
26313
|
const [rootAttrs, controlAttrs] = filterInputAttrs(attrs);
|
26305
26314
|
const inputProps = VInput.filterProps(props);
|
@@ -26311,6 +26320,7 @@ const VRadioGroup = genericComponent()({
|
|
26311
26320
|
}
|
26312
26321
|
}) : props.label;
|
26313
26322
|
return createVNode(VInput, mergeProps({
|
26323
|
+
"ref": inputRef,
|
26314
26324
|
"class": ['v-radio-group', props.class],
|
26315
26325
|
"style": props.style
|
26316
26326
|
}, rootAttrs, inputProps, {
|
@@ -26348,7 +26358,7 @@ const VRadioGroup = genericComponent()({
|
|
26348
26358
|
}
|
26349
26359
|
});
|
26350
26360
|
});
|
26351
|
-
return {};
|
26361
|
+
return forwardRefs({}, inputRef);
|
26352
26362
|
}
|
26353
26363
|
});
|
26354
26364
|
|
@@ -26559,7 +26569,7 @@ const VRangeSlider = genericComponent()({
|
|
26559
26569
|
}
|
26560
26570
|
});
|
26561
26571
|
});
|
26562
|
-
return {};
|
26572
|
+
return forwardRefs({}, inputRef);
|
26563
26573
|
}
|
26564
26574
|
});
|
26565
26575
|
|
@@ -28207,6 +28217,7 @@ const VSwitch = genericComponent()({
|
|
28207
28217
|
blur
|
28208
28218
|
} = useFocus(props);
|
28209
28219
|
const control = ref();
|
28220
|
+
const inputRef = ref();
|
28210
28221
|
const isForcedColorsModeActive = IN_BROWSER && window.matchMedia('(forced-colors: active)').matches;
|
28211
28222
|
const loaderColor = toRef(() => {
|
28212
28223
|
return typeof props.loading === 'string' && props.loading !== '' ? props.loading : props.color;
|
@@ -28228,6 +28239,7 @@ const VSwitch = genericComponent()({
|
|
28228
28239
|
const inputProps = VInput.filterProps(props);
|
28229
28240
|
const controlProps = VSelectionControl.filterProps(props);
|
28230
28241
|
return createVNode(VInput, mergeProps({
|
28242
|
+
"ref": inputRef,
|
28231
28243
|
"class": ['v-switch', {
|
28232
28244
|
'v-switch--flat': props.flat
|
28233
28245
|
}, {
|
@@ -28335,7 +28347,7 @@ const VSwitch = genericComponent()({
|
|
28335
28347
|
}
|
28336
28348
|
});
|
28337
28349
|
});
|
28338
|
-
return {};
|
28350
|
+
return forwardRefs({}, inputRef);
|
28339
28351
|
}
|
28340
28352
|
});
|
28341
28353
|
|
@@ -29201,58 +29213,675 @@ const VTimeline = genericComponent()({
|
|
29201
29213
|
}
|
29202
29214
|
});
|
29203
29215
|
|
29204
|
-
|
29205
|
-
|
29206
|
-
|
29207
|
-
|
29208
|
-
})
|
29209
|
-
}, 'VToolbarItems');
|
29210
|
-
const VToolbarItems = genericComponent()({
|
29211
|
-
name: 'VToolbarItems',
|
29212
|
-
props: makeVToolbarItemsProps(),
|
29213
|
-
setup(props, _ref) {
|
29214
|
-
let {
|
29215
|
-
slots
|
29216
|
-
} = _ref;
|
29217
|
-
provideDefaults({
|
29218
|
-
VBtn: {
|
29219
|
-
color: toRef(() => props.color),
|
29220
|
-
height: 'inherit',
|
29221
|
-
variant: toRef(() => props.variant)
|
29222
|
-
}
|
29223
|
-
});
|
29224
|
-
useRender(() => createElementVNode("div", {
|
29225
|
-
"class": normalizeClass(['v-toolbar-items', props.class]),
|
29226
|
-
"style": normalizeStyle(props.style)
|
29227
|
-
}, [slots.default?.()]));
|
29228
|
-
return {};
|
29229
|
-
}
|
29230
|
-
});
|
29216
|
+
function pad(n) {
|
29217
|
+
let length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
|
29218
|
+
return String(n).padStart(length, '0');
|
29219
|
+
}
|
29231
29220
|
|
29232
29221
|
// Types
|
29233
29222
|
|
29234
|
-
const
|
29235
|
-
|
29236
|
-
|
29237
|
-
|
29238
|
-
|
29239
|
-
|
29240
|
-
|
29241
|
-
|
29242
|
-
|
29243
|
-
|
29244
|
-
|
29245
|
-
|
29246
|
-
|
29247
|
-
|
29248
|
-
|
29249
|
-
|
29250
|
-
|
29251
|
-
|
29252
|
-
},
|
29253
|
-
|
29254
|
-
|
29255
|
-
|
29223
|
+
const makeVTimePickerClockProps = propsFactory({
|
29224
|
+
allowedValues: Function,
|
29225
|
+
ampm: Boolean,
|
29226
|
+
color: String,
|
29227
|
+
disabled: Boolean,
|
29228
|
+
displayedValue: null,
|
29229
|
+
double: Boolean,
|
29230
|
+
format: {
|
29231
|
+
type: Function,
|
29232
|
+
default: val => val
|
29233
|
+
},
|
29234
|
+
max: {
|
29235
|
+
type: Number,
|
29236
|
+
required: true
|
29237
|
+
},
|
29238
|
+
min: {
|
29239
|
+
type: Number,
|
29240
|
+
required: true
|
29241
|
+
},
|
29242
|
+
scrollable: Boolean,
|
29243
|
+
readonly: Boolean,
|
29244
|
+
rotate: {
|
29245
|
+
type: Number,
|
29246
|
+
default: 0
|
29247
|
+
},
|
29248
|
+
step: {
|
29249
|
+
type: Number,
|
29250
|
+
default: 1
|
29251
|
+
},
|
29252
|
+
modelValue: {
|
29253
|
+
type: Number
|
29254
|
+
}
|
29255
|
+
}, 'VTimePickerClock');
|
29256
|
+
const VTimePickerClock = genericComponent()({
|
29257
|
+
name: 'VTimePickerClock',
|
29258
|
+
props: makeVTimePickerClockProps(),
|
29259
|
+
emits: {
|
29260
|
+
change: val => true,
|
29261
|
+
input: val => true
|
29262
|
+
},
|
29263
|
+
setup(props, _ref) {
|
29264
|
+
let {
|
29265
|
+
emit
|
29266
|
+
} = _ref;
|
29267
|
+
const clockRef = ref(null);
|
29268
|
+
const innerClockRef = ref(null);
|
29269
|
+
const inputValue = ref(undefined);
|
29270
|
+
const isDragging = ref(false);
|
29271
|
+
const valueOnMouseDown = ref(null);
|
29272
|
+
const valueOnMouseUp = ref(null);
|
29273
|
+
const emitChangeDebounced = debounce(value => emit('change', value), 750);
|
29274
|
+
const {
|
29275
|
+
textColorClasses,
|
29276
|
+
textColorStyles
|
29277
|
+
} = useTextColor(() => props.color);
|
29278
|
+
const {
|
29279
|
+
backgroundColorClasses,
|
29280
|
+
backgroundColorStyles
|
29281
|
+
} = useBackgroundColor(() => props.color);
|
29282
|
+
const count = computed(() => props.max - props.min + 1);
|
29283
|
+
const roundCount = computed(() => props.double ? count.value / 2 : count.value);
|
29284
|
+
const degreesPerUnit = computed(() => 360 / roundCount.value);
|
29285
|
+
const degrees = computed(() => degreesPerUnit.value * Math.PI / 180);
|
29286
|
+
const displayedValue = computed(() => props.modelValue == null ? props.min : props.modelValue);
|
29287
|
+
const innerRadiusScale = computed(() => 0.62);
|
29288
|
+
const genChildren = computed(() => {
|
29289
|
+
const children = [];
|
29290
|
+
for (let value = props.min; value <= props.max; value = value + props.step) {
|
29291
|
+
children.push(value);
|
29292
|
+
}
|
29293
|
+
return children;
|
29294
|
+
});
|
29295
|
+
watch(() => props.modelValue, val => {
|
29296
|
+
inputValue.value = val;
|
29297
|
+
});
|
29298
|
+
function update(value) {
|
29299
|
+
if (inputValue.value !== value) {
|
29300
|
+
inputValue.value = value;
|
29301
|
+
}
|
29302
|
+
emit('input', value);
|
29303
|
+
}
|
29304
|
+
function isAllowed(value) {
|
29305
|
+
return !props.allowedValues || props.allowedValues(value);
|
29306
|
+
}
|
29307
|
+
function wheel(e) {
|
29308
|
+
if (!props.scrollable || props.disabled) return;
|
29309
|
+
e.preventDefault();
|
29310
|
+
const delta = Math.sign(-e.deltaY || 1);
|
29311
|
+
let value = displayedValue.value;
|
29312
|
+
do {
|
29313
|
+
value = value + delta;
|
29314
|
+
value = (value - props.min + count.value) % count.value + props.min;
|
29315
|
+
} while (!isAllowed(value) && value !== displayedValue.value);
|
29316
|
+
if (value !== props.displayedValue) {
|
29317
|
+
update(value);
|
29318
|
+
}
|
29319
|
+
emitChangeDebounced(value);
|
29320
|
+
}
|
29321
|
+
function isInner(value) {
|
29322
|
+
return props.double && value - props.min >= roundCount.value;
|
29323
|
+
}
|
29324
|
+
function handScale(value) {
|
29325
|
+
return isInner(value) ? innerRadiusScale.value : 1;
|
29326
|
+
}
|
29327
|
+
function getPosition(value) {
|
29328
|
+
const rotateRadians = props.rotate * Math.PI / 180;
|
29329
|
+
return {
|
29330
|
+
x: Math.sin((value - props.min) * degrees.value + rotateRadians) * handScale(value),
|
29331
|
+
y: -Math.cos((value - props.min) * degrees.value + rotateRadians) * handScale(value)
|
29332
|
+
};
|
29333
|
+
}
|
29334
|
+
function angleToValue(angle, insideClick) {
|
29335
|
+
const value = (Math.round(angle / degreesPerUnit.value) + (insideClick ? roundCount.value : 0)) % count.value + props.min;
|
29336
|
+
|
29337
|
+
// Necessary to fix edge case when selecting left part of the value(s) at 12 o'clock
|
29338
|
+
if (angle < 360 - degreesPerUnit.value / 2) return value;
|
29339
|
+
return insideClick ? props.max - roundCount.value + 1 : props.min;
|
29340
|
+
}
|
29341
|
+
function getTransform(i) {
|
29342
|
+
const {
|
29343
|
+
x,
|
29344
|
+
y
|
29345
|
+
} = getPosition(i);
|
29346
|
+
return {
|
29347
|
+
left: `${Math.round(50 + x * 50)}%`,
|
29348
|
+
top: `${Math.round(50 + y * 50)}%`
|
29349
|
+
};
|
29350
|
+
}
|
29351
|
+
function euclidean(p0, p1) {
|
29352
|
+
const dx = p1.x - p0.x;
|
29353
|
+
const dy = p1.y - p0.y;
|
29354
|
+
return Math.sqrt(dx * dx + dy * dy);
|
29355
|
+
}
|
29356
|
+
function angle(center, p1) {
|
29357
|
+
const value = 2 * Math.atan2(p1.y - center.y - euclidean(center, p1), p1.x - center.x);
|
29358
|
+
return Math.abs(value * 180 / Math.PI);
|
29359
|
+
}
|
29360
|
+
function setMouseDownValue(value) {
|
29361
|
+
if (valueOnMouseDown.value === null) {
|
29362
|
+
valueOnMouseDown.value = value;
|
29363
|
+
}
|
29364
|
+
valueOnMouseUp.value = value;
|
29365
|
+
update(value);
|
29366
|
+
}
|
29367
|
+
function onDragMove(e) {
|
29368
|
+
e.preventDefault();
|
29369
|
+
if (!isDragging.value && e.type !== 'click' || !clockRef.value) return;
|
29370
|
+
const {
|
29371
|
+
width,
|
29372
|
+
top,
|
29373
|
+
left
|
29374
|
+
} = clockRef.value?.getBoundingClientRect();
|
29375
|
+
const {
|
29376
|
+
width: innerWidth
|
29377
|
+
} = innerClockRef.value?.getBoundingClientRect() ?? {
|
29378
|
+
width: 0
|
29379
|
+
};
|
29380
|
+
const {
|
29381
|
+
clientX,
|
29382
|
+
clientY
|
29383
|
+
} = 'touches' in e ? e.touches[0] : e;
|
29384
|
+
const center = {
|
29385
|
+
x: width / 2,
|
29386
|
+
y: -width / 2
|
29387
|
+
};
|
29388
|
+
const coords = {
|
29389
|
+
x: clientX - left,
|
29390
|
+
y: top - clientY
|
29391
|
+
};
|
29392
|
+
const handAngle = Math.round(angle(center, coords) - props.rotate + 360) % 360;
|
29393
|
+
const insideClick = props.double && euclidean(center, coords) < (innerWidth + innerWidth * innerRadiusScale.value) / 4;
|
29394
|
+
const checksCount = Math.ceil(15 / degreesPerUnit.value);
|
29395
|
+
let value;
|
29396
|
+
for (let i = 0; i < checksCount; i++) {
|
29397
|
+
value = angleToValue(handAngle + i * degreesPerUnit.value, insideClick);
|
29398
|
+
if (isAllowed(value)) return setMouseDownValue(value);
|
29399
|
+
value = angleToValue(handAngle - i * degreesPerUnit.value, insideClick);
|
29400
|
+
if (isAllowed(value)) return setMouseDownValue(value);
|
29401
|
+
}
|
29402
|
+
}
|
29403
|
+
function onMouseDown(e) {
|
29404
|
+
if (props.disabled) return;
|
29405
|
+
e.preventDefault();
|
29406
|
+
window.addEventListener('mousemove', onDragMove);
|
29407
|
+
window.addEventListener('touchmove', onDragMove);
|
29408
|
+
window.addEventListener('mouseup', onMouseUp);
|
29409
|
+
window.addEventListener('touchend', onMouseUp);
|
29410
|
+
valueOnMouseDown.value = null;
|
29411
|
+
valueOnMouseUp.value = null;
|
29412
|
+
isDragging.value = true;
|
29413
|
+
onDragMove(e);
|
29414
|
+
}
|
29415
|
+
function onMouseUp(e) {
|
29416
|
+
e.stopPropagation();
|
29417
|
+
window.removeEventListener('mousemove', onDragMove);
|
29418
|
+
window.removeEventListener('touchmove', onDragMove);
|
29419
|
+
window.removeEventListener('mouseup', onMouseUp);
|
29420
|
+
window.removeEventListener('touchend', onMouseUp);
|
29421
|
+
isDragging.value = false;
|
29422
|
+
if (valueOnMouseUp.value !== null && isAllowed(valueOnMouseUp.value)) {
|
29423
|
+
emit('change', valueOnMouseUp.value);
|
29424
|
+
}
|
29425
|
+
}
|
29426
|
+
useRender(() => {
|
29427
|
+
return createElementVNode("div", {
|
29428
|
+
"class": normalizeClass([{
|
29429
|
+
'v-time-picker-clock': true,
|
29430
|
+
'v-time-picker-clock--indeterminate': props.modelValue == null,
|
29431
|
+
'v-time-picker-clock--readonly': props.readonly
|
29432
|
+
}]),
|
29433
|
+
"onMousedown": onMouseDown,
|
29434
|
+
"onTouchstart": onMouseDown,
|
29435
|
+
"onWheel": wheel,
|
29436
|
+
"ref": clockRef
|
29437
|
+
}, [createElementVNode("div", {
|
29438
|
+
"class": "v-time-picker-clock__inner",
|
29439
|
+
"ref": innerClockRef
|
29440
|
+
}, [createElementVNode("div", {
|
29441
|
+
"class": normalizeClass([{
|
29442
|
+
'v-time-picker-clock__hand': true,
|
29443
|
+
'v-time-picker-clock__hand--inner': isInner(props.modelValue)
|
29444
|
+
}, textColorClasses.value]),
|
29445
|
+
"style": normalizeStyle([{
|
29446
|
+
transform: `rotate(${props.rotate + degreesPerUnit.value * (displayedValue.value - props.min)}deg) scaleY(${handScale(displayedValue.value)})`
|
29447
|
+
}, textColorStyles.value])
|
29448
|
+
}, null), genChildren.value.map(value => {
|
29449
|
+
const isActive = value === displayedValue.value;
|
29450
|
+
return createElementVNode("div", {
|
29451
|
+
"class": normalizeClass([{
|
29452
|
+
'v-time-picker-clock__item': true,
|
29453
|
+
'v-time-picker-clock__item--active': isActive,
|
29454
|
+
'v-time-picker-clock__item--disabled': props.disabled || !isAllowed(value)
|
29455
|
+
}, isActive && backgroundColorClasses.value]),
|
29456
|
+
"style": normalizeStyle([getTransform(value), isActive && backgroundColorStyles.value])
|
29457
|
+
}, [createElementVNode("span", null, [props.format(value)])]);
|
29458
|
+
})])]);
|
29459
|
+
});
|
29460
|
+
}
|
29461
|
+
});
|
29462
|
+
|
29463
|
+
// Types
|
29464
|
+
|
29465
|
+
const makeVTimePickerControlsProps = propsFactory({
|
29466
|
+
ampm: Boolean,
|
29467
|
+
color: String,
|
29468
|
+
disabled: Boolean,
|
29469
|
+
hour: Number,
|
29470
|
+
minute: Number,
|
29471
|
+
second: Number,
|
29472
|
+
period: String,
|
29473
|
+
readonly: Boolean,
|
29474
|
+
useSeconds: Boolean,
|
29475
|
+
value: Number,
|
29476
|
+
viewMode: String
|
29477
|
+
}, 'VTimePickerControls');
|
29478
|
+
const VTimePickerControls = genericComponent()({
|
29479
|
+
name: 'VTimePickerControls',
|
29480
|
+
props: makeVTimePickerControlsProps(),
|
29481
|
+
emits: {
|
29482
|
+
'update:period': data => true,
|
29483
|
+
'update:viewMode': data => true
|
29484
|
+
},
|
29485
|
+
setup(props, _ref) {
|
29486
|
+
let {
|
29487
|
+
emit,
|
29488
|
+
slots
|
29489
|
+
} = _ref;
|
29490
|
+
const {
|
29491
|
+
t
|
29492
|
+
} = useLocale();
|
29493
|
+
useRender(() => {
|
29494
|
+
let hour = props.hour;
|
29495
|
+
if (props.ampm) {
|
29496
|
+
hour = hour ? (hour - 1) % 12 + 1 : 12;
|
29497
|
+
}
|
29498
|
+
return createElementVNode("div", {
|
29499
|
+
"class": "v-time-picker-controls"
|
29500
|
+
}, [createElementVNode("div", {
|
29501
|
+
"class": normalizeClass({
|
29502
|
+
'v-time-picker-controls__time': true,
|
29503
|
+
'v-time-picker-controls__time--with-seconds': props.useSeconds
|
29504
|
+
})
|
29505
|
+
}, [createVNode(VBtn, {
|
29506
|
+
"active": props.viewMode === 'hour',
|
29507
|
+
"color": props.viewMode === 'hour' ? props.color : undefined,
|
29508
|
+
"disabled": props.disabled,
|
29509
|
+
"variant": "tonal",
|
29510
|
+
"class": normalizeClass({
|
29511
|
+
'v-time-picker-controls__time__btn': true,
|
29512
|
+
'v-time-picker-controls__time--with-ampm__btn': props.ampm,
|
29513
|
+
'v-time-picker-controls__time--with-seconds__btn': props.useSeconds
|
29514
|
+
}),
|
29515
|
+
"text": props.hour == null ? '--' : pad(`${hour}`),
|
29516
|
+
"onClick": () => emit('update:viewMode', 'hour')
|
29517
|
+
}, null), createElementVNode("span", {
|
29518
|
+
"class": normalizeClass(['v-time-picker-controls__time__separator', {
|
29519
|
+
'v-time-picker-controls--with-seconds__time__separator': props.useSeconds
|
29520
|
+
}])
|
29521
|
+
}, [createTextVNode(":")]), createVNode(VBtn, {
|
29522
|
+
"active": props.viewMode === 'minute',
|
29523
|
+
"color": props.viewMode === 'minute' ? props.color : undefined,
|
29524
|
+
"class": normalizeClass({
|
29525
|
+
'v-time-picker-controls__time__btn': true,
|
29526
|
+
'v-time-picker-controls__time__btn__active': props.viewMode === 'minute',
|
29527
|
+
'v-time-picker-controls__time--with-ampm__btn': props.ampm,
|
29528
|
+
'v-time-picker-controls__time--with-seconds__btn': props.useSeconds
|
29529
|
+
}),
|
29530
|
+
"disabled": props.disabled,
|
29531
|
+
"variant": "tonal",
|
29532
|
+
"text": props.minute == null ? '--' : pad(props.minute),
|
29533
|
+
"onClick": () => emit('update:viewMode', 'minute')
|
29534
|
+
}, null), props.useSeconds && createElementVNode("span", {
|
29535
|
+
"class": normalizeClass(['v-time-picker-controls__time__separator', {
|
29536
|
+
'v-time-picker-controls--with-seconds__time__separator': props.useSeconds
|
29537
|
+
}]),
|
29538
|
+
"key": "secondsDivider"
|
29539
|
+
}, [createTextVNode(":")]), props.useSeconds && createVNode(VBtn, {
|
29540
|
+
"key": "secondsVal",
|
29541
|
+
"active": props.viewMode === 'second',
|
29542
|
+
"color": props.viewMode === 'second' ? props.color : undefined,
|
29543
|
+
"variant": "tonal",
|
29544
|
+
"onClick": () => emit('update:viewMode', 'second'),
|
29545
|
+
"class": normalizeClass({
|
29546
|
+
'v-time-picker-controls__time__btn': true,
|
29547
|
+
'v-time-picker-controls__time__btn__active': props.viewMode === 'second',
|
29548
|
+
'v-time-picker-controls__time--with-seconds__btn': props.useSeconds
|
29549
|
+
}),
|
29550
|
+
"disabled": props.disabled,
|
29551
|
+
"text": props.second == null ? '--' : pad(props.second)
|
29552
|
+
}, null), props.ampm && createElementVNode("div", {
|
29553
|
+
"class": "v-time-picker-controls__ampm"
|
29554
|
+
}, [createVNode(VBtn, {
|
29555
|
+
"active": props.period === 'am',
|
29556
|
+
"color": props.period === 'am' ? props.color : undefined,
|
29557
|
+
"class": normalizeClass({
|
29558
|
+
'v-time-picker-controls__ampm__am': true,
|
29559
|
+
'v-time-picker-controls__ampm__btn': true,
|
29560
|
+
'v-time-picker-controls__ampm__btn__active': props.period === 'am'
|
29561
|
+
}),
|
29562
|
+
"disabled": props.disabled,
|
29563
|
+
"text": t('$vuetify.timePicker.am'),
|
29564
|
+
"variant": props.disabled && props.period === 'am' ? 'elevated' : 'tonal',
|
29565
|
+
"onClick": () => props.period !== 'am' ? emit('update:period', 'am') : null
|
29566
|
+
}, null), createVNode(VBtn, {
|
29567
|
+
"active": props.period === 'pm',
|
29568
|
+
"color": props.period === 'pm' ? props.color : undefined,
|
29569
|
+
"class": normalizeClass({
|
29570
|
+
'v-time-picker-controls__ampm__pm': true,
|
29571
|
+
'v-time-picker-controls__ampm__btn': true,
|
29572
|
+
'v-time-picker-controls__ampm__btn__active': props.period === 'pm'
|
29573
|
+
}),
|
29574
|
+
"disabled": props.disabled,
|
29575
|
+
"text": t('$vuetify.timePicker.pm'),
|
29576
|
+
"variant": props.disabled && props.period === 'pm' ? 'elevated' : 'tonal',
|
29577
|
+
"onClick": () => props.period !== 'pm' ? emit('update:period', 'pm') : null
|
29578
|
+
}, null)])])]);
|
29579
|
+
});
|
29580
|
+
return {};
|
29581
|
+
}
|
29582
|
+
});
|
29583
|
+
|
29584
|
+
// Types
|
29585
|
+
|
29586
|
+
const rangeHours24 = createRange(24);
|
29587
|
+
const rangeHours12am = createRange(12);
|
29588
|
+
const rangeHours12pm = rangeHours12am.map(v => v + 12);
|
29589
|
+
createRange(60);
|
29590
|
+
const makeVTimePickerProps = propsFactory({
|
29591
|
+
allowedHours: [Function, Array],
|
29592
|
+
allowedMinutes: [Function, Array],
|
29593
|
+
allowedSeconds: [Function, Array],
|
29594
|
+
disabled: Boolean,
|
29595
|
+
format: {
|
29596
|
+
type: String,
|
29597
|
+
default: 'ampm'
|
29598
|
+
},
|
29599
|
+
max: String,
|
29600
|
+
min: String,
|
29601
|
+
viewMode: {
|
29602
|
+
type: String,
|
29603
|
+
default: 'hour'
|
29604
|
+
},
|
29605
|
+
modelValue: null,
|
29606
|
+
readonly: Boolean,
|
29607
|
+
scrollable: Boolean,
|
29608
|
+
useSeconds: Boolean,
|
29609
|
+
...omit(makeVPickerProps({
|
29610
|
+
title: '$vuetify.timePicker.title'
|
29611
|
+
}), ['landscape'])
|
29612
|
+
}, 'VTimePicker');
|
29613
|
+
const VTimePicker = genericComponent()({
|
29614
|
+
name: 'VTimePicker',
|
29615
|
+
props: makeVTimePickerProps(),
|
29616
|
+
emits: {
|
29617
|
+
'update:hour': val => true,
|
29618
|
+
'update:minute': val => true,
|
29619
|
+
'update:period': val => true,
|
29620
|
+
'update:second': val => true,
|
29621
|
+
'update:modelValue': val => true,
|
29622
|
+
'update:viewMode': val => true
|
29623
|
+
},
|
29624
|
+
setup(props, _ref) {
|
29625
|
+
let {
|
29626
|
+
emit,
|
29627
|
+
slots
|
29628
|
+
} = _ref;
|
29629
|
+
const {
|
29630
|
+
t
|
29631
|
+
} = useLocale();
|
29632
|
+
const inputHour = ref(null);
|
29633
|
+
const inputMinute = ref(null);
|
29634
|
+
const inputSecond = ref(null);
|
29635
|
+
const lazyInputHour = ref(null);
|
29636
|
+
const lazyInputMinute = ref(null);
|
29637
|
+
const lazyInputSecond = ref(null);
|
29638
|
+
const period = ref('am');
|
29639
|
+
const viewMode = useProxiedModel(props, 'viewMode', 'hour');
|
29640
|
+
const controlsRef = ref(null);
|
29641
|
+
const clockRef = ref(null);
|
29642
|
+
const isAllowedHourCb = computed(() => {
|
29643
|
+
let cb;
|
29644
|
+
if (props.allowedHours instanceof Array) {
|
29645
|
+
cb = val => props.allowedHours.includes(val);
|
29646
|
+
} else {
|
29647
|
+
cb = props.allowedHours;
|
29648
|
+
}
|
29649
|
+
if (!props.min && !props.max) return cb;
|
29650
|
+
const minHour = props.min ? Number(props.min.split(':')[0]) : 0;
|
29651
|
+
const maxHour = props.max ? Number(props.max.split(':')[0]) : 23;
|
29652
|
+
return val => {
|
29653
|
+
return val >= Number(minHour) && val <= Number(maxHour) && (!cb || cb(val));
|
29654
|
+
};
|
29655
|
+
});
|
29656
|
+
const isAllowedMinuteCb = computed(() => {
|
29657
|
+
let cb;
|
29658
|
+
const isHourAllowed = !isAllowedHourCb.value || inputHour.value === null || isAllowedHourCb.value(inputHour.value);
|
29659
|
+
if (props.allowedMinutes instanceof Array) {
|
29660
|
+
cb = val => props.allowedMinutes.includes(val);
|
29661
|
+
} else {
|
29662
|
+
cb = props.allowedMinutes;
|
29663
|
+
}
|
29664
|
+
if (!props.min && !props.max) {
|
29665
|
+
return isHourAllowed ? cb : () => false;
|
29666
|
+
}
|
29667
|
+
const [minHour, minMinute] = props.min ? props.min.split(':').map(Number) : [0, 0];
|
29668
|
+
const [maxHour, maxMinute] = props.max ? props.max.split(':').map(Number) : [23, 59];
|
29669
|
+
const minTime = minHour * 60 + Number(minMinute);
|
29670
|
+
const maxTime = maxHour * 60 + Number(maxMinute);
|
29671
|
+
return val => {
|
29672
|
+
const time = 60 * inputHour.value + val;
|
29673
|
+
return time >= minTime && time <= maxTime && isHourAllowed && (!cb || cb(val));
|
29674
|
+
};
|
29675
|
+
});
|
29676
|
+
const isAllowedSecondCb = computed(() => {
|
29677
|
+
let cb;
|
29678
|
+
const isHourAllowed = !isAllowedHourCb.value || inputHour.value === null || isAllowedHourCb.value(inputHour.value);
|
29679
|
+
const isMinuteAllowed = isHourAllowed && (!isAllowedMinuteCb.value || inputMinute.value === null || isAllowedMinuteCb.value(inputMinute.value));
|
29680
|
+
if (props.allowedSeconds instanceof Array) {
|
29681
|
+
cb = val => props.allowedSeconds.includes(val);
|
29682
|
+
} else {
|
29683
|
+
cb = props.allowedSeconds;
|
29684
|
+
}
|
29685
|
+
if (!props.min && !props.max) {
|
29686
|
+
return isMinuteAllowed ? cb : () => false;
|
29687
|
+
}
|
29688
|
+
const [minHour, minMinute, minSecond] = props.min ? props.min.split(':').map(Number) : [0, 0, 0];
|
29689
|
+
const [maxHour, maxMinute, maxSecond] = props.max ? props.max.split(':').map(Number) : [23, 59, 59];
|
29690
|
+
const minTime = minHour * 3600 + minMinute * 60 + Number(minSecond || 0);
|
29691
|
+
const maxTime = maxHour * 3600 + maxMinute * 60 + Number(maxSecond || 0);
|
29692
|
+
return val => {
|
29693
|
+
const time = 3600 * inputHour.value + 60 * inputMinute.value + val;
|
29694
|
+
return time >= minTime && time <= maxTime && isMinuteAllowed && (!cb || cb(val));
|
29695
|
+
};
|
29696
|
+
});
|
29697
|
+
const isAmPm = computed(() => {
|
29698
|
+
return props.format === 'ampm';
|
29699
|
+
});
|
29700
|
+
watch(() => props.modelValue, val => setInputData(val));
|
29701
|
+
onMounted(() => {
|
29702
|
+
setInputData(props.modelValue);
|
29703
|
+
});
|
29704
|
+
function genValue() {
|
29705
|
+
if (inputHour.value != null && inputMinute.value != null && (!props.useSeconds || inputSecond.value != null)) {
|
29706
|
+
return `${pad(inputHour.value)}:${pad(inputMinute.value)}` + (props.useSeconds ? `:${pad(inputSecond.value)}` : '');
|
29707
|
+
}
|
29708
|
+
return null;
|
29709
|
+
}
|
29710
|
+
function emitValue() {
|
29711
|
+
const value = genValue();
|
29712
|
+
if (value !== null) emit('update:modelValue', value);
|
29713
|
+
}
|
29714
|
+
function convert24to12(hour) {
|
29715
|
+
return hour ? (hour - 1) % 12 + 1 : 12;
|
29716
|
+
}
|
29717
|
+
function convert12to24(hour, period) {
|
29718
|
+
return hour % 12 + (period === 'pm' ? 12 : 0);
|
29719
|
+
}
|
29720
|
+
function setInputData(value) {
|
29721
|
+
if (value == null || value === '') {
|
29722
|
+
inputHour.value = null;
|
29723
|
+
inputMinute.value = null;
|
29724
|
+
inputSecond.value = null;
|
29725
|
+
} else if (value instanceof Date) {
|
29726
|
+
inputHour.value = value.getHours();
|
29727
|
+
inputMinute.value = value.getMinutes();
|
29728
|
+
inputSecond.value = value.getSeconds();
|
29729
|
+
} else {
|
29730
|
+
const [hour,, minute,, second, period] = value.trim().toLowerCase().match(/^(\d+):(\d+)(:(\d+))?([ap]m)?$/) || new Array(6);
|
29731
|
+
inputHour.value = period ? convert12to24(parseInt(hour, 10), period) : parseInt(hour, 10);
|
29732
|
+
inputMinute.value = parseInt(minute, 10);
|
29733
|
+
inputSecond.value = parseInt(second || 0, 10);
|
29734
|
+
}
|
29735
|
+
period.value = inputHour.value == null || inputHour.value < 12 ? 'am' : 'pm';
|
29736
|
+
}
|
29737
|
+
function firstAllowed(type, value) {
|
29738
|
+
const allowedFn = isAllowedHourCb.value ;
|
29739
|
+
if (!allowedFn) return value;
|
29740
|
+
|
29741
|
+
// TODO: clean up (Note from V2 code)
|
29742
|
+
const range = isAmPm.value ? value < 12 ? rangeHours12am : rangeHours12pm : rangeHours24;
|
29743
|
+
const first = range.find(v => allowedFn((v + value) % range.length + range[0]));
|
29744
|
+
return ((first || 0) + value) % range.length + range[0];
|
29745
|
+
}
|
29746
|
+
function setPeriod(val) {
|
29747
|
+
period.value = val;
|
29748
|
+
if (inputHour.value != null) {
|
29749
|
+
const newHour = inputHour.value + (period.value === 'am' ? -12 : 12);
|
29750
|
+
inputHour.value = firstAllowed('hour', newHour);
|
29751
|
+
}
|
29752
|
+
emit('update:period', val);
|
29753
|
+
emitValue();
|
29754
|
+
return true;
|
29755
|
+
}
|
29756
|
+
function onInput(value) {
|
29757
|
+
if (viewMode.value === 'hour') {
|
29758
|
+
inputHour.value = isAmPm.value ? convert12to24(value, period.value) : value;
|
29759
|
+
} else if (viewMode.value === 'minute') {
|
29760
|
+
inputMinute.value = value;
|
29761
|
+
} else {
|
29762
|
+
inputSecond.value = value;
|
29763
|
+
}
|
29764
|
+
}
|
29765
|
+
function onChange(value) {
|
29766
|
+
switch (viewMode.value || 'hour') {
|
29767
|
+
case 'hour':
|
29768
|
+
emit('update:hour', value);
|
29769
|
+
break;
|
29770
|
+
case 'minute':
|
29771
|
+
emit('update:minute', value);
|
29772
|
+
break;
|
29773
|
+
case 'second':
|
29774
|
+
emit('update:second', value);
|
29775
|
+
break;
|
29776
|
+
}
|
29777
|
+
const emitChange = inputHour.value !== null && inputMinute.value !== null && (props.useSeconds ? inputSecond.value !== null : true);
|
29778
|
+
if (viewMode.value === 'hour') {
|
29779
|
+
viewMode.value = 'minute';
|
29780
|
+
} else if (props.useSeconds && viewMode.value === 'minute') {
|
29781
|
+
viewMode.value = 'second';
|
29782
|
+
}
|
29783
|
+
if (inputHour.value === lazyInputHour.value && inputMinute.value === lazyInputMinute.value && (!props.useSeconds || inputSecond.value === lazyInputSecond.value)) return;
|
29784
|
+
const time = genValue();
|
29785
|
+
if (time === null) return;
|
29786
|
+
lazyInputHour.value = inputHour.value;
|
29787
|
+
lazyInputMinute.value = inputMinute.value;
|
29788
|
+
props.useSeconds && (lazyInputSecond.value = inputSecond.value);
|
29789
|
+
emitChange && emitValue();
|
29790
|
+
}
|
29791
|
+
useRender(() => {
|
29792
|
+
const pickerProps = VPicker.filterProps(props);
|
29793
|
+
const timePickerControlsProps = VTimePickerControls.filterProps(props);
|
29794
|
+
const timePickerClockProps = VTimePickerClock.filterProps(omit(props, ['format', 'modelValue', 'min', 'max']));
|
29795
|
+
return createVNode(VPicker, mergeProps(pickerProps, {
|
29796
|
+
"color": undefined,
|
29797
|
+
"class": ['v-time-picker', props.class],
|
29798
|
+
"style": props.style
|
29799
|
+
}), {
|
29800
|
+
title: () => slots.title?.() ?? createElementVNode("div", {
|
29801
|
+
"class": "v-time-picker__title"
|
29802
|
+
}, [t(props.title)]),
|
29803
|
+
header: () => createVNode(VTimePickerControls, mergeProps(timePickerControlsProps, {
|
29804
|
+
"ampm": isAmPm.value,
|
29805
|
+
"hour": inputHour.value,
|
29806
|
+
"minute": inputMinute.value,
|
29807
|
+
"period": period.value,
|
29808
|
+
"second": inputSecond.value,
|
29809
|
+
"viewMode": viewMode.value,
|
29810
|
+
"onUpdate:period": val => setPeriod(val),
|
29811
|
+
"onUpdate:viewMode": value => viewMode.value = value,
|
29812
|
+
"ref": controlsRef
|
29813
|
+
}), null),
|
29814
|
+
default: () => createVNode(VTimePickerClock, mergeProps(timePickerClockProps, {
|
29815
|
+
"allowedValues": viewMode.value === 'hour' ? isAllowedHourCb.value : viewMode.value === 'minute' ? isAllowedMinuteCb.value : isAllowedSecondCb.value,
|
29816
|
+
"double": viewMode.value === 'hour' && !isAmPm.value,
|
29817
|
+
"format": viewMode.value === 'hour' ? isAmPm.value ? convert24to12 : val => val : val => pad(val, 2),
|
29818
|
+
"max": viewMode.value === 'hour' ? isAmPm.value && period.value === 'am' ? 11 : 23 : 59,
|
29819
|
+
"min": viewMode.value === 'hour' && isAmPm.value && period.value === 'pm' ? 12 : 0,
|
29820
|
+
"size": 20,
|
29821
|
+
"step": viewMode.value === 'hour' ? 1 : 5,
|
29822
|
+
"modelValue": viewMode.value === 'hour' ? inputHour.value : viewMode.value === 'minute' ? inputMinute.value : inputSecond.value,
|
29823
|
+
"onChange": onChange,
|
29824
|
+
"onInput": onInput,
|
29825
|
+
"ref": clockRef
|
29826
|
+
}), null),
|
29827
|
+
actions: slots.actions
|
29828
|
+
});
|
29829
|
+
});
|
29830
|
+
}
|
29831
|
+
});
|
29832
|
+
|
29833
|
+
const makeVToolbarItemsProps = propsFactory({
|
29834
|
+
...makeComponentProps(),
|
29835
|
+
...makeVariantProps({
|
29836
|
+
variant: 'text'
|
29837
|
+
})
|
29838
|
+
}, 'VToolbarItems');
|
29839
|
+
const VToolbarItems = genericComponent()({
|
29840
|
+
name: 'VToolbarItems',
|
29841
|
+
props: makeVToolbarItemsProps(),
|
29842
|
+
setup(props, _ref) {
|
29843
|
+
let {
|
29844
|
+
slots
|
29845
|
+
} = _ref;
|
29846
|
+
provideDefaults({
|
29847
|
+
VBtn: {
|
29848
|
+
color: toRef(() => props.color),
|
29849
|
+
height: 'inherit',
|
29850
|
+
variant: toRef(() => props.variant)
|
29851
|
+
}
|
29852
|
+
});
|
29853
|
+
useRender(() => createElementVNode("div", {
|
29854
|
+
"class": normalizeClass(['v-toolbar-items', props.class]),
|
29855
|
+
"style": normalizeStyle(props.style)
|
29856
|
+
}, [slots.default?.()]));
|
29857
|
+
return {};
|
29858
|
+
}
|
29859
|
+
});
|
29860
|
+
|
29861
|
+
// Types
|
29862
|
+
|
29863
|
+
const makeVTooltipProps = propsFactory({
|
29864
|
+
id: String,
|
29865
|
+
interactive: Boolean,
|
29866
|
+
text: String,
|
29867
|
+
...omit(makeVOverlayProps({
|
29868
|
+
closeOnBack: false,
|
29869
|
+
location: 'end',
|
29870
|
+
locationStrategy: 'connected',
|
29871
|
+
eager: true,
|
29872
|
+
minWidth: 0,
|
29873
|
+
offset: 10,
|
29874
|
+
openOnClick: false,
|
29875
|
+
openOnHover: true,
|
29876
|
+
origin: 'auto',
|
29877
|
+
scrim: false,
|
29878
|
+
scrollStrategy: 'reposition',
|
29879
|
+
transition: null
|
29880
|
+
}), ['absolute', 'persistent'])
|
29881
|
+
}, 'VTooltip');
|
29882
|
+
const VTooltip = genericComponent()({
|
29883
|
+
name: 'VTooltip',
|
29884
|
+
props: makeVTooltipProps(),
|
29256
29885
|
emits: {
|
29257
29886
|
'update:modelValue': value => true
|
29258
29887
|
},
|
@@ -29314,6 +29943,429 @@ const VTooltip = genericComponent()({
|
|
29314
29943
|
}
|
29315
29944
|
});
|
29316
29945
|
|
29946
|
+
// Types
|
29947
|
+
|
29948
|
+
const makeVTreeviewGroupProps = propsFactory({
|
29949
|
+
...omit(makeVListGroupProps({
|
29950
|
+
collapseIcon: '$treeviewCollapse',
|
29951
|
+
expandIcon: '$treeviewExpand'
|
29952
|
+
}), ['subgroup'])
|
29953
|
+
}, 'VTreeviewGroup');
|
29954
|
+
const VTreeviewGroup = genericComponent()({
|
29955
|
+
name: 'VTreeviewGroup',
|
29956
|
+
props: makeVTreeviewGroupProps(),
|
29957
|
+
setup(props, _ref) {
|
29958
|
+
let {
|
29959
|
+
slots
|
29960
|
+
} = _ref;
|
29961
|
+
const vListGroupRef = ref();
|
29962
|
+
const toggleIcon = computed(() => vListGroupRef.value?.isOpen ? props.collapseIcon : props.expandIcon);
|
29963
|
+
const activatorDefaults = computed(() => ({
|
29964
|
+
VTreeviewItem: {
|
29965
|
+
prependIcon: undefined,
|
29966
|
+
appendIcon: undefined,
|
29967
|
+
active: vListGroupRef.value?.isOpen,
|
29968
|
+
toggleIcon: toggleIcon.value
|
29969
|
+
}
|
29970
|
+
}));
|
29971
|
+
useRender(() => {
|
29972
|
+
const listGroupProps = VListGroup.filterProps(props);
|
29973
|
+
return createVNode(VListGroup, mergeProps(listGroupProps, {
|
29974
|
+
"ref": vListGroupRef,
|
29975
|
+
"class": ['v-treeview-group', props.class],
|
29976
|
+
"subgroup": true
|
29977
|
+
}), {
|
29978
|
+
...slots,
|
29979
|
+
activator: slots.activator ? slotProps => createElementVNode(Fragment, null, [createVNode(VDefaultsProvider, {
|
29980
|
+
"defaults": activatorDefaults.value
|
29981
|
+
}, {
|
29982
|
+
default: () => [slots.activator?.(slotProps)]
|
29983
|
+
})]) : undefined
|
29984
|
+
});
|
29985
|
+
});
|
29986
|
+
return {};
|
29987
|
+
}
|
29988
|
+
});
|
29989
|
+
|
29990
|
+
// Types
|
29991
|
+
|
29992
|
+
const VTreeviewSymbol = Symbol.for('vuetify:v-treeview');
|
29993
|
+
|
29994
|
+
const makeVTreeviewItemProps = propsFactory({
|
29995
|
+
loading: Boolean,
|
29996
|
+
toggleIcon: IconValue,
|
29997
|
+
...makeVListItemProps({
|
29998
|
+
slim: true
|
29999
|
+
})
|
30000
|
+
}, 'VTreeviewItem');
|
30001
|
+
const VTreeviewItem = genericComponent()({
|
30002
|
+
name: 'VTreeviewItem',
|
30003
|
+
props: makeVTreeviewItemProps(),
|
30004
|
+
emits: {
|
30005
|
+
toggleExpand: value => true
|
30006
|
+
},
|
30007
|
+
setup(props, _ref) {
|
30008
|
+
let {
|
30009
|
+
slots,
|
30010
|
+
emit
|
30011
|
+
} = _ref;
|
30012
|
+
const visibleIds = inject$1(VTreeviewSymbol, {
|
30013
|
+
visibleIds: ref()
|
30014
|
+
}).visibleIds;
|
30015
|
+
const vListItemRef = ref();
|
30016
|
+
const isActivatableGroupActivator = computed(() => vListItemRef.value?.root.activatable.value && vListItemRef.value?.isGroupActivator);
|
30017
|
+
const vListItemRefIsClickable = computed(() => vListItemRef.value?.link.isClickable.value || props.value != null && !!vListItemRef.value?.list);
|
30018
|
+
const isClickable = computed(() => !props.disabled && props.link !== false && (props.link || vListItemRefIsClickable.value || isActivatableGroupActivator.value));
|
30019
|
+
const isFiltered = computed(() => visibleIds.value && !visibleIds.value.has(toRaw(vListItemRef.value?.id)));
|
30020
|
+
function activateGroupActivator(e) {
|
30021
|
+
if (isClickable.value && isActivatableGroupActivator.value) {
|
30022
|
+
vListItemRef.value?.activate(!vListItemRef.value?.isActivated, e);
|
30023
|
+
}
|
30024
|
+
}
|
30025
|
+
function onClickAction(e) {
|
30026
|
+
e.preventDefault();
|
30027
|
+
e.stopPropagation();
|
30028
|
+
emit('toggleExpand', e);
|
30029
|
+
}
|
30030
|
+
useRender(() => {
|
30031
|
+
const listItemProps = omit(VListItem.filterProps(props), ['onClick']);
|
30032
|
+
const hasPrepend = slots.prepend || props.toggleIcon;
|
30033
|
+
return createVNode(VListItem, mergeProps({
|
30034
|
+
"ref": vListItemRef
|
30035
|
+
}, listItemProps, {
|
30036
|
+
"active": vListItemRef.value?.isActivated,
|
30037
|
+
"class": ['v-treeview-item', {
|
30038
|
+
'v-treeview-item--activatable-group-activator': isActivatableGroupActivator.value,
|
30039
|
+
'v-treeview-item--filtered': isFiltered.value
|
30040
|
+
}, props.class],
|
30041
|
+
"ripple": false,
|
30042
|
+
"onClick": props.onClick ?? activateGroupActivator
|
30043
|
+
}), {
|
30044
|
+
...slots,
|
30045
|
+
prepend: hasPrepend ? slotProps => {
|
30046
|
+
return createElementVNode(Fragment, null, [createVNode(VListItemAction, {
|
30047
|
+
"start": false
|
30048
|
+
}, {
|
30049
|
+
default: () => [props.toggleIcon ? createVNode(VBtn, {
|
30050
|
+
"density": "compact",
|
30051
|
+
"icon": props.toggleIcon,
|
30052
|
+
"loading": props.loading,
|
30053
|
+
"variant": "text",
|
30054
|
+
"onClick": onClickAction
|
30055
|
+
}, {
|
30056
|
+
loader() {
|
30057
|
+
return createVNode(VProgressCircular, {
|
30058
|
+
"indeterminate": "disable-shrink",
|
30059
|
+
"size": "20",
|
30060
|
+
"width": "2"
|
30061
|
+
}, null);
|
30062
|
+
}
|
30063
|
+
}) : createElementVNode("div", {
|
30064
|
+
"class": "v-treeview-item__level"
|
30065
|
+
}, null)]
|
30066
|
+
}), slots.prepend?.(slotProps)]);
|
30067
|
+
} : undefined
|
30068
|
+
});
|
30069
|
+
});
|
30070
|
+
return {};
|
30071
|
+
}
|
30072
|
+
});
|
30073
|
+
|
30074
|
+
// Types
|
30075
|
+
|
30076
|
+
const makeVTreeviewChildrenProps = propsFactory({
|
30077
|
+
disabled: Boolean,
|
30078
|
+
loadChildren: Function,
|
30079
|
+
loadingIcon: {
|
30080
|
+
type: String,
|
30081
|
+
default: '$loading'
|
30082
|
+
},
|
30083
|
+
items: Array,
|
30084
|
+
openOnClick: {
|
30085
|
+
type: Boolean,
|
30086
|
+
default: undefined
|
30087
|
+
},
|
30088
|
+
indeterminateIcon: {
|
30089
|
+
type: IconValue,
|
30090
|
+
default: '$checkboxIndeterminate'
|
30091
|
+
},
|
30092
|
+
falseIcon: IconValue,
|
30093
|
+
trueIcon: IconValue,
|
30094
|
+
returnObject: Boolean,
|
30095
|
+
selectable: Boolean,
|
30096
|
+
selectedColor: String,
|
30097
|
+
selectStrategy: [String, Function, Object],
|
30098
|
+
index: Number,
|
30099
|
+
path: {
|
30100
|
+
type: Array,
|
30101
|
+
default: () => []
|
30102
|
+
},
|
30103
|
+
...makeDensityProps()
|
30104
|
+
}, 'VTreeviewChildren');
|
30105
|
+
const VTreeviewChildren = genericComponent()({
|
30106
|
+
name: 'VTreeviewChildren',
|
30107
|
+
props: makeVTreeviewChildrenProps(),
|
30108
|
+
setup(props, _ref) {
|
30109
|
+
let {
|
30110
|
+
slots
|
30111
|
+
} = _ref;
|
30112
|
+
const isLoading = reactive(new Set());
|
30113
|
+
const isClickOnOpen = computed(() => !props.disabled && (props.openOnClick != null ? props.openOnClick : props.selectable));
|
30114
|
+
async function checkChildren(item) {
|
30115
|
+
try {
|
30116
|
+
if (!props.items?.length || !props.loadChildren) return;
|
30117
|
+
if (item?.children?.length === 0) {
|
30118
|
+
isLoading.add(item.value);
|
30119
|
+
await props.loadChildren(item.raw);
|
30120
|
+
}
|
30121
|
+
} finally {
|
30122
|
+
isLoading.delete(item.value);
|
30123
|
+
}
|
30124
|
+
}
|
30125
|
+
function selectItem(select, isSelected) {
|
30126
|
+
if (props.selectable) {
|
30127
|
+
select(!isSelected);
|
30128
|
+
}
|
30129
|
+
}
|
30130
|
+
return () => slots.default?.() ?? props.items?.map((item, index) => {
|
30131
|
+
const {
|
30132
|
+
children,
|
30133
|
+
props: itemProps
|
30134
|
+
} = item;
|
30135
|
+
const loading = isLoading.has(item.value);
|
30136
|
+
const treeItemProps = {
|
30137
|
+
index,
|
30138
|
+
depth: props.path?.length ?? 0,
|
30139
|
+
isFirst: index === 0,
|
30140
|
+
isLast: props.items ? props.items.length - 1 === index : false,
|
30141
|
+
path: [...props.path, index]
|
30142
|
+
};
|
30143
|
+
const slotsWithItem = {
|
30144
|
+
prepend: slotProps => createElementVNode(Fragment, null, [props.selectable && (!children || children && !['leaf', 'single-leaf'].includes(props.selectStrategy)) && createElementVNode("div", null, [createVNode(VCheckboxBtn, {
|
30145
|
+
"key": item.value,
|
30146
|
+
"modelValue": slotProps.isSelected,
|
30147
|
+
"disabled": props.disabled,
|
30148
|
+
"loading": loading,
|
30149
|
+
"color": props.selectedColor,
|
30150
|
+
"density": props.density,
|
30151
|
+
"indeterminate": slotProps.isIndeterminate,
|
30152
|
+
"indeterminateIcon": props.indeterminateIcon,
|
30153
|
+
"falseIcon": props.falseIcon,
|
30154
|
+
"trueIcon": props.trueIcon,
|
30155
|
+
"onClick": withModifiers(() => selectItem(slotProps.select, slotProps.isSelected), ['stop']),
|
30156
|
+
"onKeydown": e => {
|
30157
|
+
if (!['Enter', 'Space'].includes(e.key)) return;
|
30158
|
+
e.stopPropagation();
|
30159
|
+
selectItem(slotProps.select, slotProps.isSelected);
|
30160
|
+
}
|
30161
|
+
}, null)]), slots.prepend?.({
|
30162
|
+
...slotProps,
|
30163
|
+
...treeItemProps,
|
30164
|
+
item: item.raw,
|
30165
|
+
internalItem: item
|
30166
|
+
})]),
|
30167
|
+
append: slots.append ? slotProps => slots.append?.({
|
30168
|
+
...slotProps,
|
30169
|
+
...treeItemProps,
|
30170
|
+
item: item.raw,
|
30171
|
+
internalItem: item
|
30172
|
+
}) : undefined,
|
30173
|
+
title: slots.title ? slotProps => slots.title?.({
|
30174
|
+
...slotProps,
|
30175
|
+
item: item.raw,
|
30176
|
+
internalItem: item
|
30177
|
+
}) : undefined,
|
30178
|
+
subtitle: slots.subtitle ? slotProps => slots.subtitle?.({
|
30179
|
+
...slotProps,
|
30180
|
+
item: item.raw,
|
30181
|
+
internalItem: item
|
30182
|
+
}) : undefined
|
30183
|
+
};
|
30184
|
+
const treeviewGroupProps = VTreeviewGroup.filterProps(itemProps);
|
30185
|
+
const treeviewChildrenProps = VTreeviewChildren.filterProps({
|
30186
|
+
...props,
|
30187
|
+
...treeItemProps
|
30188
|
+
});
|
30189
|
+
return children ? createVNode(VTreeviewGroup, mergeProps(treeviewGroupProps, {
|
30190
|
+
"value": props.returnObject ? item.raw : treeviewGroupProps?.value,
|
30191
|
+
"rawId": treeviewGroupProps?.value
|
30192
|
+
}), {
|
30193
|
+
activator: _ref2 => {
|
30194
|
+
let {
|
30195
|
+
props: activatorProps
|
30196
|
+
} = _ref2;
|
30197
|
+
const listItemProps = {
|
30198
|
+
...itemProps,
|
30199
|
+
...activatorProps,
|
30200
|
+
value: itemProps?.value,
|
30201
|
+
onToggleExpand: [() => checkChildren(item), activatorProps.onClick],
|
30202
|
+
onClick: isClickOnOpen.value ? [() => checkChildren(item), activatorProps.onClick] : undefined
|
30203
|
+
};
|
30204
|
+
return createVNode(VTreeviewItem, mergeProps(listItemProps, {
|
30205
|
+
"value": props.returnObject ? item.raw : itemProps.value,
|
30206
|
+
"loading": loading
|
30207
|
+
}), slotsWithItem);
|
30208
|
+
},
|
30209
|
+
default: () => createVNode(VTreeviewChildren, mergeProps(treeviewChildrenProps, {
|
30210
|
+
"items": children,
|
30211
|
+
"returnObject": props.returnObject
|
30212
|
+
}), slots)
|
30213
|
+
}) : slots.item?.({
|
30214
|
+
props: itemProps,
|
30215
|
+
item: item.raw,
|
30216
|
+
internalItem: item
|
30217
|
+
}) ?? createVNode(VTreeviewItem, mergeProps(itemProps, {
|
30218
|
+
"value": props.returnObject ? toRaw(item.raw) : itemProps.value
|
30219
|
+
}), slotsWithItem);
|
30220
|
+
});
|
30221
|
+
}
|
30222
|
+
});
|
30223
|
+
|
30224
|
+
function flatten(items) {
|
30225
|
+
let flat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
30226
|
+
for (const item of items) {
|
30227
|
+
flat.push(item);
|
30228
|
+
if (item.children) flatten(item.children, flat);
|
30229
|
+
}
|
30230
|
+
return flat;
|
30231
|
+
}
|
30232
|
+
const makeVTreeviewProps = propsFactory({
|
30233
|
+
fluid: Boolean,
|
30234
|
+
openAll: Boolean,
|
30235
|
+
search: String,
|
30236
|
+
...makeFilterProps({
|
30237
|
+
filterKeys: ['title']
|
30238
|
+
}),
|
30239
|
+
...omit(makeVTreeviewChildrenProps(), ['index', 'path']),
|
30240
|
+
...omit(makeVListProps({
|
30241
|
+
collapseIcon: '$treeviewCollapse',
|
30242
|
+
expandIcon: '$treeviewExpand',
|
30243
|
+
slim: true
|
30244
|
+
}), ['itemType', 'nav', 'openStrategy']),
|
30245
|
+
modelValue: {
|
30246
|
+
type: Array,
|
30247
|
+
default: () => []
|
30248
|
+
}
|
30249
|
+
}, 'VTreeview');
|
30250
|
+
const VTreeview = genericComponent()({
|
30251
|
+
name: 'VTreeview',
|
30252
|
+
props: makeVTreeviewProps(),
|
30253
|
+
emits: {
|
30254
|
+
'update:opened': val => true,
|
30255
|
+
'update:activated': val => true,
|
30256
|
+
'update:selected': val => true,
|
30257
|
+
'update:modelValue': val => true,
|
30258
|
+
'click:open': value => true,
|
30259
|
+
'click:select': value => true
|
30260
|
+
},
|
30261
|
+
setup(props, _ref) {
|
30262
|
+
let {
|
30263
|
+
slots
|
30264
|
+
} = _ref;
|
30265
|
+
const {
|
30266
|
+
items
|
30267
|
+
} = useListItems(props);
|
30268
|
+
const activeColor = toRef(() => props.activeColor);
|
30269
|
+
const baseColor = toRef(() => props.baseColor);
|
30270
|
+
const color = toRef(() => props.color);
|
30271
|
+
const activated = useProxiedModel(props, 'activated');
|
30272
|
+
const model = useProxiedModel(props, 'modelValue');
|
30273
|
+
const _selected = useProxiedModel(props, 'selected', props.modelValue);
|
30274
|
+
const selected = computed({
|
30275
|
+
get: () => _selected.value,
|
30276
|
+
set(val) {
|
30277
|
+
_selected.value = val;
|
30278
|
+
model.value = val;
|
30279
|
+
}
|
30280
|
+
});
|
30281
|
+
const vListRef = ref();
|
30282
|
+
const opened = computed(() => props.openAll ? openAll(items.value) : props.opened);
|
30283
|
+
const flatItems = computed(() => flatten(items.value));
|
30284
|
+
const search = toRef(() => props.search);
|
30285
|
+
const {
|
30286
|
+
filteredItems
|
30287
|
+
} = useFilter(props, flatItems, search);
|
30288
|
+
const visibleIds = computed(() => {
|
30289
|
+
if (!search.value) return null;
|
30290
|
+
const getPath = vListRef.value?.getPath;
|
30291
|
+
if (!getPath) return null;
|
30292
|
+
return new Set(filteredItems.value.flatMap(item => {
|
30293
|
+
const itemVal = props.returnObject ? item.raw : item.props.value;
|
30294
|
+
return [...getPath(itemVal), ...getChildren(itemVal)].map(toRaw);
|
30295
|
+
}));
|
30296
|
+
});
|
30297
|
+
function getChildren(id) {
|
30298
|
+
const arr = [];
|
30299
|
+
const queue = (vListRef.value?.children.get(id) ?? []).slice();
|
30300
|
+
while (queue.length) {
|
30301
|
+
const child = queue.shift();
|
30302
|
+
if (!child) continue;
|
30303
|
+
arr.push(child);
|
30304
|
+
queue.push(...(vListRef.value?.children.get(child) ?? []).slice());
|
30305
|
+
}
|
30306
|
+
return arr;
|
30307
|
+
}
|
30308
|
+
function openAll(items) {
|
30309
|
+
let ids = [];
|
30310
|
+
for (const i of items) {
|
30311
|
+
if (!i.children) continue;
|
30312
|
+
ids.push(props.returnObject ? toRaw(i.raw) : i.value);
|
30313
|
+
if (i.children) {
|
30314
|
+
ids = ids.concat(openAll(i.children));
|
30315
|
+
}
|
30316
|
+
}
|
30317
|
+
return ids;
|
30318
|
+
}
|
30319
|
+
provide(VTreeviewSymbol, {
|
30320
|
+
visibleIds
|
30321
|
+
});
|
30322
|
+
provideDefaults({
|
30323
|
+
VTreeviewGroup: {
|
30324
|
+
activeColor,
|
30325
|
+
baseColor,
|
30326
|
+
color,
|
30327
|
+
collapseIcon: toRef(() => props.collapseIcon),
|
30328
|
+
expandIcon: toRef(() => props.expandIcon)
|
30329
|
+
},
|
30330
|
+
VTreeviewItem: {
|
30331
|
+
activeClass: toRef(() => props.activeClass),
|
30332
|
+
activeColor,
|
30333
|
+
baseColor,
|
30334
|
+
color,
|
30335
|
+
density: toRef(() => props.density),
|
30336
|
+
disabled: toRef(() => props.disabled),
|
30337
|
+
lines: toRef(() => props.lines),
|
30338
|
+
variant: toRef(() => props.variant)
|
30339
|
+
}
|
30340
|
+
});
|
30341
|
+
useRender(() => {
|
30342
|
+
const listProps = VList.filterProps(props);
|
30343
|
+
const treeviewChildrenProps = VTreeviewChildren.filterProps(props);
|
30344
|
+
return createVNode(VList, mergeProps({
|
30345
|
+
"ref": vListRef
|
30346
|
+
}, listProps, {
|
30347
|
+
"class": ['v-treeview', {
|
30348
|
+
'v-treeview--fluid': props.fluid
|
30349
|
+
}, props.class],
|
30350
|
+
"open-strategy": "multiple",
|
30351
|
+
"style": props.style,
|
30352
|
+
"opened": opened.value,
|
30353
|
+
"activated": activated.value,
|
30354
|
+
"onUpdate:activated": $event => activated.value = $event,
|
30355
|
+
"selected": selected.value,
|
30356
|
+
"onUpdate:selected": $event => selected.value = $event
|
30357
|
+
}), {
|
30358
|
+
default: () => [createVNode(VTreeviewChildren, mergeProps(treeviewChildrenProps, {
|
30359
|
+
"density": props.density,
|
30360
|
+
"returnObject": props.returnObject,
|
30361
|
+
"items": items.value
|
30362
|
+
}), slots)]
|
30363
|
+
});
|
30364
|
+
});
|
30365
|
+
return {};
|
30366
|
+
}
|
30367
|
+
});
|
30368
|
+
|
29317
30369
|
// Composables
|
29318
30370
|
|
29319
30371
|
// Types
|
@@ -29491,12 +30543,18 @@ var components = /*#__PURE__*/Object.freeze({
|
|
29491
30543
|
VTextField: VTextField,
|
29492
30544
|
VTextarea: VTextarea,
|
29493
30545
|
VThemeProvider: VThemeProvider,
|
30546
|
+
VTimePicker: VTimePicker,
|
30547
|
+
VTimePickerClock: VTimePickerClock,
|
30548
|
+
VTimePickerControls: VTimePickerControls,
|
29494
30549
|
VTimeline: VTimeline,
|
29495
30550
|
VTimelineItem: VTimelineItem,
|
29496
30551
|
VToolbar: VToolbar,
|
29497
30552
|
VToolbarItems: VToolbarItems,
|
29498
30553
|
VToolbarTitle: VToolbarTitle,
|
29499
30554
|
VTooltip: VTooltip,
|
30555
|
+
VTreeview: VTreeview,
|
30556
|
+
VTreeviewGroup: VTreeviewGroup,
|
30557
|
+
VTreeviewItem: VTreeviewItem,
|
29500
30558
|
VValidation: VValidation,
|
29501
30559
|
VVirtualScroll: VVirtualScroll,
|
29502
30560
|
VWindow: VWindow,
|
@@ -29820,7 +30878,7 @@ function createVuetify$1() {
|
|
29820
30878
|
};
|
29821
30879
|
});
|
29822
30880
|
}
|
29823
|
-
const version$1 = "3.8.10-dev.2025-06-
|
30881
|
+
const version$1 = "3.8.10-dev.2025-06-19";
|
29824
30882
|
createVuetify$1.version = version$1;
|
29825
30883
|
|
29826
30884
|
// Vue's inject() can only be used in setup
|
@@ -29845,7 +30903,7 @@ const createVuetify = function () {
|
|
29845
30903
|
...options
|
29846
30904
|
});
|
29847
30905
|
};
|
29848
|
-
const version = "3.8.10-dev.2025-06-
|
30906
|
+
const version = "3.8.10-dev.2025-06-19";
|
29849
30907
|
createVuetify.version = version;
|
29850
30908
|
|
29851
30909
|
export { index as blueprints, components, createVuetify, directives, useDate, useDefaults, useDisplay, useGoTo, useLayout, useLocale, useRtl, useTheme, version };
|