@vuetify/nightly 3.7.15-dev.2025-03-06 → 3.7.15-dev.2025-03-08

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.
Files changed (43) hide show
  1. package/CHANGELOG.md +10 -3
  2. package/dist/json/attributes.json +2892 -2852
  3. package/dist/json/importMap-labs.json +20 -20
  4. package/dist/json/importMap.json +162 -162
  5. package/dist/json/tags.json +10 -0
  6. package/dist/json/web-types.json +5263 -5172
  7. package/dist/vuetify-labs.css +2710 -2709
  8. package/dist/vuetify-labs.d.ts +238 -182
  9. package/dist/vuetify-labs.esm.js +849 -838
  10. package/dist/vuetify-labs.esm.js.map +1 -1
  11. package/dist/vuetify-labs.js +849 -838
  12. package/dist/vuetify-labs.min.css +2 -2
  13. package/dist/vuetify.css +4710 -4709
  14. package/dist/vuetify.d.ts +218 -162
  15. package/dist/vuetify.esm.js +849 -838
  16. package/dist/vuetify.esm.js.map +1 -1
  17. package/dist/vuetify.js +849 -838
  18. package/dist/vuetify.js.map +1 -1
  19. package/dist/vuetify.min.css +2 -2
  20. package/dist/vuetify.min.js +479 -476
  21. package/dist/vuetify.min.js.map +1 -1
  22. package/lib/components/VAutocomplete/VAutocomplete.js +2 -13
  23. package/lib/components/VAutocomplete/VAutocomplete.js.map +1 -1
  24. package/lib/components/VColorPicker/VColorPicker.css +3 -2
  25. package/lib/components/VColorPicker/VColorPicker.d.ts +259 -156
  26. package/lib/components/VColorPicker/VColorPicker.js +16 -17
  27. package/lib/components/VColorPicker/VColorPicker.js.map +1 -1
  28. package/lib/components/VColorPicker/VColorPicker.sass +2 -1
  29. package/lib/components/VColorPicker/_variables.scss +1 -0
  30. package/lib/components/VCombobox/VCombobox.js +2 -13
  31. package/lib/components/VCombobox/VCombobox.js.map +1 -1
  32. package/lib/components/VDatePicker/VDatePicker.d.ts +6 -6
  33. package/lib/components/VDatePicker/VDatePicker.js +5 -2
  34. package/lib/components/VDatePicker/VDatePicker.js.map +1 -1
  35. package/lib/composables/filter.d.ts +13 -9
  36. package/lib/composables/filter.js +39 -8
  37. package/lib/composables/filter.js.map +1 -1
  38. package/lib/entry-bundler.js +1 -1
  39. package/lib/framework.d.ts +53 -53
  40. package/lib/framework.js +1 -1
  41. package/lib/labs/VCalendar/VCalendar.d.ts +6 -6
  42. package/lib/labs/VDateInput/VDateInput.d.ts +25 -25
  43. package/package.json +1 -1
package/dist/vuetify.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Vuetify v3.7.15-dev.2025-03-06
2
+ * Vuetify v3.7.15-dev.2025-03-08
3
3
  * Forged by John Leider
4
4
  * Released under the MIT License.
5
5
  */
@@ -13161,17 +13161,31 @@
13161
13161
  // Types
13162
13162
 
13163
13163
  /**
13164
- * - match without highlight
13165
- * - single match (index), length already known
13166
- * - single match (start, end)
13167
- * - multiple matches (start, end), probably shouldn't overlap
13164
+ * - boolean: match without highlight
13165
+ * - number: single match (index), length already known
13166
+ * - []: single match (start, end)
13167
+ * - [][]: multiple matches (start, end), shouldn't overlap
13168
13168
  */
13169
13169
 
13170
13170
  // Composables
13171
13171
  const defaultFilter = (value, query, item) => {
13172
13172
  if (value == null || query == null) return -1;
13173
- return value.toString().toLocaleLowerCase().indexOf(query.toString().toLocaleLowerCase());
13173
+ value = value.toString().toLocaleLowerCase();
13174
+ query = query.toString().toLocaleLowerCase();
13175
+ const result = [];
13176
+ let idx = value.indexOf(query);
13177
+ while (~idx) {
13178
+ result.push([idx, idx + query.length]);
13179
+ idx = value.indexOf(query, idx + query.length);
13180
+ }
13181
+ return result.length ? result : -1;
13174
13182
  };
13183
+ function normaliseMatch(match, query) {
13184
+ if (match == null || typeof match === 'boolean' || match === -1) return;
13185
+ if (typeof match === 'number') return [[match, query.length]];
13186
+ if (Array.isArray(match[0])) return match;
13187
+ return [match];
13188
+ }
13175
13189
  const makeFilterProps = propsFactory({
13176
13190
  customFilter: Function,
13177
13191
  customKeyFilter: Object,
@@ -13202,7 +13216,7 @@
13202
13216
  const keyFilter = options?.customKeyFilter?.[key];
13203
13217
  match = keyFilter ? keyFilter(value, query, item) : filter(value, query, item);
13204
13218
  if (match !== -1 && match !== false) {
13205
- if (keyFilter) customMatches[key] = match;else defaultMatches[key] = match;
13219
+ if (keyFilter) customMatches[key] = normaliseMatch(match, query);else defaultMatches[key] = normaliseMatch(match, query);
13206
13220
  } else if (options?.filterMode === 'every') {
13207
13221
  continue loop;
13208
13222
  }
@@ -13210,7 +13224,7 @@
13210
13224
  } else {
13211
13225
  match = filter(item, query, item);
13212
13226
  if (match !== -1 && match !== false) {
13213
- defaultMatches.title = match;
13227
+ defaultMatches.title = normaliseMatch(match, query);
13214
13228
  }
13215
13229
  }
13216
13230
  const defaultMatchesLength = Object.keys(defaultMatches).length;
@@ -13270,20 +13284,26 @@
13270
13284
  getMatches
13271
13285
  };
13272
13286
  }
13287
+ function highlightResult(name, text, matches) {
13288
+ if (matches == null || !matches.length) return text;
13289
+ return matches.map((match, i) => {
13290
+ const start = i === 0 ? 0 : matches[i - 1][1];
13291
+ const result = [vue.createVNode("span", {
13292
+ "class": `${name}__unmask`
13293
+ }, [text.slice(start, match[0])]), vue.createVNode("span", {
13294
+ "class": `${name}__mask`
13295
+ }, [text.slice(match[0], match[1])])];
13296
+ if (i === matches.length - 1) {
13297
+ result.push(vue.createVNode("span", {
13298
+ "class": `${name}__unmask`
13299
+ }, [text.slice(match[1])]));
13300
+ }
13301
+ return vue.createVNode(vue.Fragment, null, [result]);
13302
+ });
13303
+ }
13273
13304
 
13274
13305
  // Types
13275
13306
 
13276
- function highlightResult$1(text, matches, length) {
13277
- if (matches == null) return text;
13278
- if (Array.isArray(matches)) throw new Error('Multiple matches is not implemented');
13279
- return typeof matches === 'number' && ~matches ? vue.createVNode(vue.Fragment, null, [vue.createVNode("span", {
13280
- "class": "v-autocomplete__unmask"
13281
- }, [text.substr(0, matches)]), vue.createVNode("span", {
13282
- "class": "v-autocomplete__mask"
13283
- }, [text.substr(matches, length)]), vue.createVNode("span", {
13284
- "class": "v-autocomplete__unmask"
13285
- }, [text.substr(matches + length)])]) : text;
13286
- }
13287
13307
  const makeVAutocompleteProps = propsFactory({
13288
13308
  autoSelectFirst: {
13289
13309
  type: [Boolean, String]
@@ -13655,7 +13675,7 @@
13655
13675
  }, null)]);
13656
13676
  },
13657
13677
  title: () => {
13658
- return isPristine.value ? item.title : highlightResult$1(item.title, getMatches(item)?.title, search.value?.length ?? 0);
13678
+ return isPristine.value ? item.title : highlightResult('v-autocomplete', item.title, getMatches(item)?.title);
13659
13679
  }
13660
13680
  });
13661
13681
  }
@@ -16941,6 +16961,9 @@
16941
16961
  }
16942
16962
  });
16943
16963
 
16964
+ // Utilities
16965
+ const VPickerTitle = createSimpleFunctional('v-picker-title');
16966
+
16944
16967
  const makeVSheetProps = propsFactory({
16945
16968
  color: String,
16946
16969
  ...makeBorderProps(),
@@ -16995,676 +17018,66 @@
16995
17018
 
16996
17019
  // Types
16997
17020
 
16998
- const makeVColorPickerProps = propsFactory({
16999
- canvasHeight: {
17000
- type: [String, Number],
17001
- default: 150
17002
- },
17003
- disabled: Boolean,
17004
- dotSize: {
17005
- type: [Number, String],
17006
- default: 10
17007
- },
17008
- hideCanvas: Boolean,
17009
- hideSliders: Boolean,
17010
- hideInputs: Boolean,
17011
- mode: {
17012
- type: String,
17013
- default: 'rgba',
17014
- validator: v => Object.keys(modes).includes(v)
17015
- },
17016
- modes: {
17017
- type: Array,
17018
- default: () => Object.keys(modes),
17019
- validator: v => Array.isArray(v) && v.every(m => Object.keys(modes).includes(m))
17020
- },
17021
- showSwatches: Boolean,
17022
- swatches: Array,
17023
- swatchesMaxHeight: {
17024
- type: [Number, String],
17025
- default: 150
17026
- },
17027
- modelValue: {
17028
- type: [Object, String]
17029
- },
17030
- ...omit(makeVSheetProps({
17031
- width: 300
17032
- }), ['height', 'location', 'minHeight', 'maxHeight', 'minWidth', 'maxWidth'])
17033
- }, 'VColorPicker');
17034
- const VColorPicker = defineComponent({
17035
- name: 'VColorPicker',
17036
- props: makeVColorPickerProps(),
17037
- emits: {
17038
- 'update:modelValue': color => true,
17039
- 'update:mode': mode => true
17040
- },
17041
- setup(props) {
17042
- const mode = useProxiedModel(props, 'mode');
17043
- const hue = vue.ref(null);
17044
- const model = useProxiedModel(props, 'modelValue', undefined, v => {
17045
- if (v == null || v === '') return null;
17046
- let c;
17047
- try {
17048
- c = RGBtoHSV(parseColor(v));
17049
- } catch (err) {
17050
- consoleWarn(err);
17051
- return null;
17052
- }
17053
- return c;
17054
- }, v => {
17055
- if (!v) return null;
17056
- return extractColor(v, props.modelValue);
17057
- });
17058
- const currentColor = vue.computed(() => {
17059
- return model.value ? {
17060
- ...model.value,
17061
- h: hue.value ?? model.value.h
17062
- } : null;
17063
- });
17021
+ const makeVPickerProps = propsFactory({
17022
+ bgColor: String,
17023
+ landscape: Boolean,
17024
+ title: String,
17025
+ hideHeader: Boolean,
17026
+ ...makeVSheetProps()
17027
+ }, 'VPicker');
17028
+ const VPicker = genericComponent()({
17029
+ name: 'VPicker',
17030
+ props: makeVPickerProps(),
17031
+ setup(props, _ref) {
17032
+ let {
17033
+ slots
17034
+ } = _ref;
17064
17035
  const {
17065
- rtlClasses
17066
- } = useRtl();
17067
- let externalChange = true;
17068
- vue.watch(model, v => {
17069
- if (!externalChange) {
17070
- // prevent hue shift from rgb conversion inaccuracy
17071
- externalChange = true;
17072
- return;
17073
- }
17074
- if (!v) return;
17075
- hue.value = v.h;
17076
- }, {
17077
- immediate: true
17078
- });
17079
- const updateColor = hsva => {
17080
- externalChange = false;
17081
- hue.value = hsva.h;
17082
- model.value = hsva;
17083
- };
17084
- vue.onBeforeMount(() => {
17085
- if (!props.modes.includes(mode.value)) mode.value = props.modes[0];
17086
- });
17087
- provideDefaults({
17088
- VSlider: {
17089
- color: undefined,
17090
- trackColor: undefined,
17091
- trackFillColor: undefined
17092
- }
17093
- });
17036
+ backgroundColorClasses,
17037
+ backgroundColorStyles
17038
+ } = useBackgroundColor(vue.toRef(props, 'color'));
17094
17039
  useRender(() => {
17095
17040
  const sheetProps = VSheet.filterProps(props);
17096
- return vue.createVNode(VSheet, vue.mergeProps({
17097
- "rounded": props.rounded,
17098
- "elevation": props.elevation,
17099
- "theme": props.theme,
17100
- "class": ['v-color-picker', rtlClasses.value, props.class],
17101
- "style": [{
17102
- '--v-color-picker-color-hsv': HSVtoCSS({
17103
- ...(currentColor.value ?? nullColor),
17104
- a: 1
17105
- })
17106
- }, props.style]
17107
- }, sheetProps, {
17108
- "maxWidth": props.width
17041
+ const hasTitle = !!(props.title || slots.title);
17042
+ return vue.createVNode(VSheet, vue.mergeProps(sheetProps, {
17043
+ "color": props.bgColor,
17044
+ "class": ['v-picker', {
17045
+ 'v-picker--landscape': props.landscape,
17046
+ 'v-picker--with-actions': !!slots.actions
17047
+ }, props.class],
17048
+ "style": props.style
17109
17049
  }), {
17110
- default: () => [!props.hideCanvas && vue.createVNode(VColorPickerCanvas, {
17111
- "key": "canvas",
17112
- "color": currentColor.value,
17113
- "onUpdate:color": updateColor,
17114
- "disabled": props.disabled,
17115
- "dotSize": props.dotSize,
17116
- "width": props.width,
17117
- "height": props.canvasHeight
17118
- }, null), (!props.hideSliders || !props.hideInputs) && vue.createVNode("div", {
17119
- "key": "controls",
17120
- "class": "v-color-picker__controls"
17121
- }, [!props.hideSliders && vue.createVNode(VColorPickerPreview, {
17122
- "key": "preview",
17123
- "color": currentColor.value,
17124
- "onUpdate:color": updateColor,
17125
- "hideAlpha": !mode.value.endsWith('a'),
17126
- "disabled": props.disabled
17127
- }, null), !props.hideInputs && vue.createVNode(VColorPickerEdit, {
17128
- "key": "edit",
17129
- "modes": props.modes,
17130
- "mode": mode.value,
17131
- "onUpdate:mode": m => mode.value = m,
17132
- "color": currentColor.value,
17133
- "onUpdate:color": updateColor,
17134
- "disabled": props.disabled
17135
- }, null)]), props.showSwatches && vue.createVNode(VColorPickerSwatches, {
17136
- "key": "swatches",
17137
- "color": currentColor.value,
17138
- "onUpdate:color": updateColor,
17139
- "maxHeight": props.swatchesMaxHeight,
17140
- "swatches": props.swatches,
17141
- "disabled": props.disabled
17142
- }, null)]
17050
+ default: () => [!props.hideHeader && vue.createVNode("div", {
17051
+ "key": "header",
17052
+ "class": [backgroundColorClasses.value],
17053
+ "style": [backgroundColorStyles.value]
17054
+ }, [hasTitle && vue.createVNode(VPickerTitle, {
17055
+ "key": "picker-title"
17056
+ }, {
17057
+ default: () => [slots.title?.() ?? props.title]
17058
+ }), slots.header && vue.createVNode("div", {
17059
+ "class": "v-picker__header"
17060
+ }, [slots.header()])]), vue.createVNode("div", {
17061
+ "class": "v-picker__body"
17062
+ }, [slots.default?.()]), slots.actions && vue.createVNode(VDefaultsProvider, {
17063
+ "defaults": {
17064
+ VBtn: {
17065
+ slim: true,
17066
+ variant: 'text'
17067
+ }
17068
+ }
17069
+ }, {
17070
+ default: () => [vue.createVNode("div", {
17071
+ "class": "v-picker__actions"
17072
+ }, [slots.actions()])]
17073
+ })]
17143
17074
  });
17144
17075
  });
17145
17076
  return {};
17146
17077
  }
17147
17078
  });
17148
-
17149
- // Types
17150
-
17151
- function highlightResult(text, matches, length) {
17152
- if (matches == null) return text;
17153
- if (Array.isArray(matches)) throw new Error('Multiple matches is not implemented');
17154
- return typeof matches === 'number' && ~matches ? vue.createVNode(vue.Fragment, null, [vue.createVNode("span", {
17155
- "class": "v-combobox__unmask"
17156
- }, [text.substr(0, matches)]), vue.createVNode("span", {
17157
- "class": "v-combobox__mask"
17158
- }, [text.substr(matches, length)]), vue.createVNode("span", {
17159
- "class": "v-combobox__unmask"
17160
- }, [text.substr(matches + length)])]) : text;
17161
- }
17162
- const makeVComboboxProps = propsFactory({
17163
- autoSelectFirst: {
17164
- type: [Boolean, String]
17165
- },
17166
- clearOnSelect: {
17167
- type: Boolean,
17168
- default: true
17169
- },
17170
- delimiters: Array,
17171
- ...makeFilterProps({
17172
- filterKeys: ['title']
17173
- }),
17174
- ...makeSelectProps({
17175
- hideNoData: true,
17176
- returnObject: true
17177
- }),
17178
- ...omit(makeVTextFieldProps({
17179
- modelValue: null,
17180
- role: 'combobox'
17181
- }), ['validationValue', 'dirty', 'appendInnerIcon']),
17182
- ...makeTransitionProps({
17183
- transition: false
17184
- })
17185
- }, 'VCombobox');
17186
- const VCombobox = genericComponent()({
17187
- name: 'VCombobox',
17188
- props: makeVComboboxProps(),
17189
- emits: {
17190
- 'update:focused': focused => true,
17191
- 'update:modelValue': value => true,
17192
- 'update:search': value => true,
17193
- 'update:menu': value => true
17194
- },
17195
- setup(props, _ref) {
17196
- let {
17197
- emit,
17198
- slots
17199
- } = _ref;
17200
- const {
17201
- t
17202
- } = useLocale();
17203
- const vTextFieldRef = vue.ref();
17204
- const isFocused = vue.shallowRef(false);
17205
- const isPristine = vue.shallowRef(true);
17206
- const listHasFocus = vue.shallowRef(false);
17207
- const vMenuRef = vue.ref();
17208
- const vVirtualScrollRef = vue.ref();
17209
- const _menu = useProxiedModel(props, 'menu');
17210
- const menu = vue.computed({
17211
- get: () => _menu.value,
17212
- set: v => {
17213
- if (_menu.value && !v && vMenuRef.value?.ΨopenChildren.size) return;
17214
- _menu.value = v;
17215
- }
17216
- });
17217
- const selectionIndex = vue.shallowRef(-1);
17218
- let cleared = false;
17219
- const color = vue.computed(() => vTextFieldRef.value?.color);
17220
- const label = vue.computed(() => menu.value ? props.closeText : props.openText);
17221
- const {
17222
- items,
17223
- transformIn,
17224
- transformOut
17225
- } = useItems(props);
17226
- const {
17227
- textColorClasses,
17228
- textColorStyles
17229
- } = useTextColor(color);
17230
- const model = useProxiedModel(props, 'modelValue', [], v => transformIn(wrapInArray(v)), v => {
17231
- const transformed = transformOut(v);
17232
- return props.multiple ? transformed : transformed[0] ?? null;
17233
- });
17234
- const form = useForm(props);
17235
- const hasChips = vue.computed(() => !!(props.chips || slots.chip));
17236
- const hasSelectionSlot = vue.computed(() => hasChips.value || !!slots.selection);
17237
- const _search = vue.shallowRef(!props.multiple && !hasSelectionSlot.value ? model.value[0]?.title ?? '' : '');
17238
- const search = vue.computed({
17239
- get: () => {
17240
- return _search.value;
17241
- },
17242
- set: val => {
17243
- _search.value = val ?? '';
17244
- if (!props.multiple && !hasSelectionSlot.value) {
17245
- model.value = [transformItem$3(props, val)];
17246
- }
17247
- if (val && props.multiple && props.delimiters?.length) {
17248
- const values = val.split(new RegExp(`(?:${props.delimiters.join('|')})+`));
17249
- if (values.length > 1) {
17250
- values.forEach(v => {
17251
- v = v.trim();
17252
- if (v) select(transformItem$3(props, v));
17253
- });
17254
- _search.value = '';
17255
- }
17256
- }
17257
- if (!val) selectionIndex.value = -1;
17258
- isPristine.value = !val;
17259
- }
17260
- });
17261
- const counterValue = vue.computed(() => {
17262
- return typeof props.counterValue === 'function' ? props.counterValue(model.value) : typeof props.counterValue === 'number' ? props.counterValue : props.multiple ? model.value.length : search.value.length;
17263
- });
17264
- vue.watch(_search, value => {
17265
- if (cleared) {
17266
- // wait for clear to finish, VTextField sets _search to null
17267
- // then search computed triggers and updates _search to ''
17268
- vue.nextTick(() => cleared = false);
17269
- } else if (isFocused.value && !menu.value) {
17270
- menu.value = true;
17271
- }
17272
- emit('update:search', value);
17273
- });
17274
- vue.watch(model, value => {
17275
- if (!props.multiple && !hasSelectionSlot.value) {
17276
- _search.value = value[0]?.title ?? '';
17277
- }
17278
- });
17279
- const {
17280
- filteredItems,
17281
- getMatches
17282
- } = useFilter(props, items, () => isPristine.value ? '' : search.value);
17283
- const displayItems = vue.computed(() => {
17284
- if (props.hideSelected) {
17285
- return filteredItems.value.filter(filteredItem => !model.value.some(s => s.value === filteredItem.value));
17286
- }
17287
- return filteredItems.value;
17288
- });
17289
- const selectedValues = vue.computed(() => model.value.map(selection => selection.value));
17290
- const highlightFirst = vue.computed(() => {
17291
- const selectFirst = props.autoSelectFirst === true || props.autoSelectFirst === 'exact' && search.value === displayItems.value[0]?.title;
17292
- return selectFirst && displayItems.value.length > 0 && !isPristine.value && !listHasFocus.value;
17293
- });
17294
- const menuDisabled = vue.computed(() => props.hideNoData && !displayItems.value.length || form.isReadonly.value || form.isDisabled.value);
17295
- const listRef = vue.ref();
17296
- const listEvents = useScrolling(listRef, vTextFieldRef);
17297
- function onClear(e) {
17298
- cleared = true;
17299
- if (props.openOnClear) {
17300
- menu.value = true;
17301
- }
17302
- }
17303
- function onMousedownControl() {
17304
- if (menuDisabled.value) return;
17305
- menu.value = true;
17306
- }
17307
- function onMousedownMenuIcon(e) {
17308
- if (menuDisabled.value) return;
17309
- if (isFocused.value) {
17310
- e.preventDefault();
17311
- e.stopPropagation();
17312
- }
17313
- menu.value = !menu.value;
17314
- }
17315
- function onListKeydown(e) {
17316
- if (e.key !== ' ' && checkPrintable(e)) {
17317
- vTextFieldRef.value?.focus();
17318
- }
17319
- }
17320
- // eslint-disable-next-line complexity
17321
- function onKeydown(e) {
17322
- if (isComposingIgnoreKey(e) || form.isReadonly.value) return;
17323
- const selectionStart = vTextFieldRef.value.selectionStart;
17324
- const length = model.value.length;
17325
- if (['Enter', 'ArrowDown', 'ArrowUp'].includes(e.key)) {
17326
- e.preventDefault();
17327
- }
17328
- if (['Enter', 'ArrowDown'].includes(e.key)) {
17329
- menu.value = true;
17330
- }
17331
- if (['Escape'].includes(e.key)) {
17332
- menu.value = false;
17333
- }
17334
- if (['Enter', 'Escape', 'Tab'].includes(e.key)) {
17335
- if (highlightFirst.value && ['Enter', 'Tab'].includes(e.key) && !model.value.some(_ref2 => {
17336
- let {
17337
- value
17338
- } = _ref2;
17339
- return value === displayItems.value[0].value;
17340
- })) {
17341
- select(filteredItems.value[0]);
17342
- }
17343
- isPristine.value = true;
17344
- }
17345
- if (e.key === 'ArrowDown' && highlightFirst.value) {
17346
- listRef.value?.focus('next');
17347
- }
17348
- if (e.key === 'Enter' && search.value) {
17349
- select(transformItem$3(props, search.value));
17350
- if (hasSelectionSlot.value) _search.value = '';
17351
- }
17352
- if (['Backspace', 'Delete'].includes(e.key)) {
17353
- if (!props.multiple && hasSelectionSlot.value && model.value.length > 0 && !search.value) return select(model.value[0], false);
17354
- if (~selectionIndex.value) {
17355
- e.preventDefault();
17356
- const originalSelectionIndex = selectionIndex.value;
17357
- select(model.value[selectionIndex.value], false);
17358
- selectionIndex.value = originalSelectionIndex >= length - 1 ? length - 2 : originalSelectionIndex;
17359
- } else if (e.key === 'Backspace' && !search.value) {
17360
- selectionIndex.value = length - 1;
17361
- }
17362
- return;
17363
- }
17364
- if (!props.multiple) return;
17365
- if (e.key === 'ArrowLeft') {
17366
- if (selectionIndex.value < 0 && selectionStart > 0) return;
17367
- const prev = selectionIndex.value > -1 ? selectionIndex.value - 1 : length - 1;
17368
- if (model.value[prev]) {
17369
- selectionIndex.value = prev;
17370
- } else {
17371
- selectionIndex.value = -1;
17372
- vTextFieldRef.value.setSelectionRange(search.value.length, search.value.length);
17373
- }
17374
- } else if (e.key === 'ArrowRight') {
17375
- if (selectionIndex.value < 0) return;
17376
- const next = selectionIndex.value + 1;
17377
- if (model.value[next]) {
17378
- selectionIndex.value = next;
17379
- } else {
17380
- selectionIndex.value = -1;
17381
- vTextFieldRef.value.setSelectionRange(0, 0);
17382
- }
17383
- } else if (~selectionIndex.value && checkPrintable(e)) {
17384
- selectionIndex.value = -1;
17385
- }
17386
- }
17387
- function onAfterEnter() {
17388
- if (props.eager) {
17389
- vVirtualScrollRef.value?.calculateVisibleItems();
17390
- }
17391
- }
17392
- function onAfterLeave() {
17393
- if (isFocused.value) {
17394
- isPristine.value = true;
17395
- vTextFieldRef.value?.focus();
17396
- }
17397
- }
17398
- /** @param set - null means toggle */
17399
- function select(item) {
17400
- let set = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
17401
- if (!item || item.props.disabled) return;
17402
- if (props.multiple) {
17403
- const index = model.value.findIndex(selection => (props.valueComparator || deepEqual)(selection.value, item.value));
17404
- const add = set == null ? !~index : set;
17405
- if (~index) {
17406
- const value = add ? [...model.value, item] : [...model.value];
17407
- value.splice(index, 1);
17408
- model.value = value;
17409
- } else if (add) {
17410
- model.value = [...model.value, item];
17411
- }
17412
- if (props.clearOnSelect) {
17413
- search.value = '';
17414
- }
17415
- } else {
17416
- const add = set !== false;
17417
- model.value = add ? [item] : [];
17418
- _search.value = add && !hasSelectionSlot.value ? item.title : '';
17419
-
17420
- // watch for search watcher to trigger
17421
- vue.nextTick(() => {
17422
- menu.value = false;
17423
- isPristine.value = true;
17424
- });
17425
- }
17426
- }
17427
- function onFocusin(e) {
17428
- isFocused.value = true;
17429
- setTimeout(() => {
17430
- listHasFocus.value = true;
17431
- });
17432
- }
17433
- function onFocusout(e) {
17434
- listHasFocus.value = false;
17435
- }
17436
- function onUpdateModelValue(v) {
17437
- if (v == null || v === '' && !props.multiple && !hasSelectionSlot.value) model.value = [];
17438
- }
17439
- vue.watch(isFocused, (val, oldVal) => {
17440
- if (val || val === oldVal) return;
17441
- selectionIndex.value = -1;
17442
- menu.value = false;
17443
- if (search.value) {
17444
- if (props.multiple) {
17445
- select(transformItem$3(props, search.value));
17446
- return;
17447
- }
17448
- if (!hasSelectionSlot.value) return;
17449
- if (model.value.some(_ref3 => {
17450
- let {
17451
- title
17452
- } = _ref3;
17453
- return title === search.value;
17454
- })) {
17455
- _search.value = '';
17456
- } else {
17457
- select(transformItem$3(props, search.value));
17458
- }
17459
- }
17460
- });
17461
- vue.watch(menu, () => {
17462
- if (!props.hideSelected && menu.value && model.value.length) {
17463
- const index = displayItems.value.findIndex(item => model.value.some(s => (props.valueComparator || deepEqual)(s.value, item.value)));
17464
- IN_BROWSER && window.requestAnimationFrame(() => {
17465
- index >= 0 && vVirtualScrollRef.value?.scrollToIndex(index);
17466
- });
17467
- }
17468
- });
17469
- vue.watch(() => props.items, (newVal, oldVal) => {
17470
- if (menu.value) return;
17471
- if (isFocused.value && !oldVal.length && newVal.length) {
17472
- menu.value = true;
17473
- }
17474
- });
17475
- useRender(() => {
17476
- const hasList = !!(!props.hideNoData || displayItems.value.length || slots['prepend-item'] || slots['append-item'] || slots['no-data']);
17477
- const isDirty = model.value.length > 0;
17478
- const textFieldProps = VTextField.filterProps(props);
17479
- return vue.createVNode(VTextField, vue.mergeProps({
17480
- "ref": vTextFieldRef
17481
- }, textFieldProps, {
17482
- "modelValue": search.value,
17483
- "onUpdate:modelValue": [$event => search.value = $event, onUpdateModelValue],
17484
- "focused": isFocused.value,
17485
- "onUpdate:focused": $event => isFocused.value = $event,
17486
- "validationValue": model.externalValue,
17487
- "counterValue": counterValue.value,
17488
- "dirty": isDirty,
17489
- "class": ['v-combobox', {
17490
- 'v-combobox--active-menu': menu.value,
17491
- 'v-combobox--chips': !!props.chips,
17492
- 'v-combobox--selection-slot': !!hasSelectionSlot.value,
17493
- 'v-combobox--selecting-index': selectionIndex.value > -1,
17494
- [`v-combobox--${props.multiple ? 'multiple' : 'single'}`]: true
17495
- }, props.class],
17496
- "style": props.style,
17497
- "readonly": form.isReadonly.value,
17498
- "placeholder": isDirty ? undefined : props.placeholder,
17499
- "onClick:clear": onClear,
17500
- "onMousedown:control": onMousedownControl,
17501
- "onKeydown": onKeydown
17502
- }), {
17503
- ...slots,
17504
- default: () => vue.createVNode(vue.Fragment, null, [vue.createVNode(VMenu, vue.mergeProps({
17505
- "ref": vMenuRef,
17506
- "modelValue": menu.value,
17507
- "onUpdate:modelValue": $event => menu.value = $event,
17508
- "activator": "parent",
17509
- "contentClass": "v-combobox__content",
17510
- "disabled": menuDisabled.value,
17511
- "eager": props.eager,
17512
- "maxHeight": 310,
17513
- "openOnClick": false,
17514
- "closeOnContentClick": false,
17515
- "transition": props.transition,
17516
- "onAfterEnter": onAfterEnter,
17517
- "onAfterLeave": onAfterLeave
17518
- }, props.menuProps), {
17519
- default: () => [hasList && vue.createVNode(VList, vue.mergeProps({
17520
- "ref": listRef,
17521
- "selected": selectedValues.value,
17522
- "selectStrategy": props.multiple ? 'independent' : 'single-independent',
17523
- "onMousedown": e => e.preventDefault(),
17524
- "onKeydown": onListKeydown,
17525
- "onFocusin": onFocusin,
17526
- "onFocusout": onFocusout,
17527
- "tabindex": "-1",
17528
- "aria-live": "polite",
17529
- "color": props.itemColor ?? props.color
17530
- }, listEvents, props.listProps), {
17531
- default: () => [slots['prepend-item']?.(), !displayItems.value.length && !props.hideNoData && (slots['no-data']?.() ?? vue.createVNode(VListItem, {
17532
- "key": "no-data",
17533
- "title": t(props.noDataText)
17534
- }, null)), vue.createVNode(VVirtualScroll, {
17535
- "ref": vVirtualScrollRef,
17536
- "renderless": true,
17537
- "items": displayItems.value,
17538
- "itemKey": "value"
17539
- }, {
17540
- default: _ref4 => {
17541
- let {
17542
- item,
17543
- index,
17544
- itemRef
17545
- } = _ref4;
17546
- const itemProps = vue.mergeProps(item.props, {
17547
- ref: itemRef,
17548
- key: item.value,
17549
- active: highlightFirst.value && index === 0 ? true : undefined,
17550
- onClick: () => select(item, null)
17551
- });
17552
- return slots.item?.({
17553
- item,
17554
- index,
17555
- props: itemProps
17556
- }) ?? vue.createVNode(VListItem, vue.mergeProps(itemProps, {
17557
- "role": "option"
17558
- }), {
17559
- prepend: _ref5 => {
17560
- let {
17561
- isSelected
17562
- } = _ref5;
17563
- return vue.createVNode(vue.Fragment, null, [props.multiple && !props.hideSelected ? vue.createVNode(VCheckboxBtn, {
17564
- "key": item.value,
17565
- "modelValue": isSelected,
17566
- "ripple": false,
17567
- "tabindex": "-1"
17568
- }, null) : undefined, item.props.prependAvatar && vue.createVNode(VAvatar, {
17569
- "image": item.props.prependAvatar
17570
- }, null), item.props.prependIcon && vue.createVNode(VIcon, {
17571
- "icon": item.props.prependIcon
17572
- }, null)]);
17573
- },
17574
- title: () => {
17575
- return isPristine.value ? item.title : highlightResult(item.title, getMatches(item)?.title, search.value?.length ?? 0);
17576
- }
17577
- });
17578
- }
17579
- }), slots['append-item']?.()]
17580
- })]
17581
- }), model.value.map((item, index) => {
17582
- function onChipClose(e) {
17583
- e.stopPropagation();
17584
- e.preventDefault();
17585
- select(item, false);
17586
- }
17587
- const slotProps = {
17588
- 'onClick:close': onChipClose,
17589
- onKeydown(e) {
17590
- if (e.key !== 'Enter' && e.key !== ' ') return;
17591
- e.preventDefault();
17592
- e.stopPropagation();
17593
- onChipClose(e);
17594
- },
17595
- onMousedown(e) {
17596
- e.preventDefault();
17597
- e.stopPropagation();
17598
- },
17599
- modelValue: true,
17600
- 'onUpdate:modelValue': undefined
17601
- };
17602
- const hasSlot = hasChips.value ? !!slots.chip : !!slots.selection;
17603
- const slotContent = hasSlot ? ensureValidVNode(hasChips.value ? slots.chip({
17604
- item,
17605
- index,
17606
- props: slotProps
17607
- }) : slots.selection({
17608
- item,
17609
- index
17610
- })) : undefined;
17611
- if (hasSlot && !slotContent) return undefined;
17612
- return vue.createVNode("div", {
17613
- "key": item.value,
17614
- "class": ['v-combobox__selection', index === selectionIndex.value && ['v-combobox__selection--selected', textColorClasses.value]],
17615
- "style": index === selectionIndex.value ? textColorStyles.value : {}
17616
- }, [hasChips.value ? !slots.chip ? vue.createVNode(VChip, vue.mergeProps({
17617
- "key": "chip",
17618
- "closable": props.closableChips,
17619
- "size": "small",
17620
- "text": item.title,
17621
- "disabled": item.props.disabled
17622
- }, slotProps), null) : vue.createVNode(VDefaultsProvider, {
17623
- "key": "chip-defaults",
17624
- "defaults": {
17625
- VChip: {
17626
- closable: props.closableChips,
17627
- size: 'small',
17628
- text: item.title
17629
- }
17630
- }
17631
- }, {
17632
- default: () => [slotContent]
17633
- }) : slotContent ?? vue.createVNode("span", {
17634
- "class": "v-combobox__selection-text"
17635
- }, [item.title, props.multiple && index < model.value.length - 1 && vue.createVNode("span", {
17636
- "class": "v-combobox__selection-comma"
17637
- }, [vue.createTextVNode(",")])])]);
17638
- })]),
17639
- 'append-inner': function () {
17640
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
17641
- args[_key] = arguments[_key];
17642
- }
17643
- return vue.createVNode(vue.Fragment, null, [slots['append-inner']?.(...args), (!props.hideNoData || props.items.length) && props.menuIcon ? vue.createVNode(VIcon, {
17644
- "class": "v-combobox__menu-icon",
17645
- "icon": props.menuIcon,
17646
- "onMousedown": onMousedownMenuIcon,
17647
- "onClick": noop,
17648
- "aria-label": t(label.value),
17649
- "title": t(label.value),
17650
- "tabindex": "-1"
17651
- }, null) : undefined]);
17652
- }
17653
- });
17654
- });
17655
- return forwardRefs({
17656
- isFocused,
17657
- isPristine,
17658
- menu,
17659
- search,
17660
- selectionIndex,
17661
- filteredItems,
17662
- select
17663
- }, vTextFieldRef);
17664
- }
17665
- });
17666
-
17667
- // Utilities
17079
+
17080
+ // Utilities
17668
17081
 
17669
17082
  // Types
17670
17083
 
@@ -18386,101 +17799,760 @@
18386
17799
  endOfYear(date) {
18387
17800
  return endOfYear(date);
18388
17801
  }
18389
- }
17802
+ }
17803
+
17804
+ // Composables
17805
+ const DateOptionsSymbol = Symbol.for('vuetify:date-options');
17806
+ const DateAdapterSymbol = Symbol.for('vuetify:date-adapter');
17807
+ function createDate(options, locale) {
17808
+ const _options = mergeDeep({
17809
+ adapter: VuetifyDateAdapter,
17810
+ locale: {
17811
+ af: 'af-ZA',
17812
+ // ar: '', # not the same value for all variants
17813
+ bg: 'bg-BG',
17814
+ ca: 'ca-ES',
17815
+ ckb: '',
17816
+ cs: 'cs-CZ',
17817
+ de: 'de-DE',
17818
+ el: 'el-GR',
17819
+ en: 'en-US',
17820
+ // es: '', # not the same value for all variants
17821
+ et: 'et-EE',
17822
+ fa: 'fa-IR',
17823
+ fi: 'fi-FI',
17824
+ // fr: '', #not the same value for all variants
17825
+ hr: 'hr-HR',
17826
+ hu: 'hu-HU',
17827
+ he: 'he-IL',
17828
+ id: 'id-ID',
17829
+ it: 'it-IT',
17830
+ ja: 'ja-JP',
17831
+ ko: 'ko-KR',
17832
+ lv: 'lv-LV',
17833
+ lt: 'lt-LT',
17834
+ nl: 'nl-NL',
17835
+ no: 'no-NO',
17836
+ pl: 'pl-PL',
17837
+ pt: 'pt-PT',
17838
+ ro: 'ro-RO',
17839
+ ru: 'ru-RU',
17840
+ sk: 'sk-SK',
17841
+ sl: 'sl-SI',
17842
+ srCyrl: 'sr-SP',
17843
+ srLatn: 'sr-SP',
17844
+ sv: 'sv-SE',
17845
+ th: 'th-TH',
17846
+ tr: 'tr-TR',
17847
+ az: 'az-AZ',
17848
+ uk: 'uk-UA',
17849
+ vi: 'vi-VN',
17850
+ zhHans: 'zh-CN',
17851
+ zhHant: 'zh-TW'
17852
+ }
17853
+ }, options);
17854
+ return {
17855
+ options: _options,
17856
+ instance: createInstance(_options, locale)
17857
+ };
17858
+ }
17859
+ function createInstance(options, locale) {
17860
+ const instance = vue.reactive(typeof options.adapter === 'function'
17861
+ // eslint-disable-next-line new-cap
17862
+ ? new options.adapter({
17863
+ locale: options.locale[locale.current.value] ?? locale.current.value,
17864
+ formats: options.formats
17865
+ }) : options.adapter);
17866
+ vue.watch(locale.current, value => {
17867
+ instance.locale = options.locale[value] ?? value ?? instance.locale;
17868
+ });
17869
+ return instance;
17870
+ }
17871
+ function useDate() {
17872
+ const options = vue.inject(DateOptionsSymbol);
17873
+ if (!options) throw new Error('[Vuetify] Could not find injected date options');
17874
+ const locale = useLocale();
17875
+ return createInstance(options, locale);
17876
+ }
17877
+
17878
+ // https://stackoverflow.com/questions/274861/how-do-i-calculate-the-week-number-given-a-date/275024#275024
17879
+ function getWeek(adapter, value) {
17880
+ const date = adapter.toJsDate(value);
17881
+ let year = date.getFullYear();
17882
+ let d1w1 = new Date(year, 0, 1);
17883
+ if (date < d1w1) {
17884
+ year = year - 1;
17885
+ d1w1 = new Date(year, 0, 1);
17886
+ } else {
17887
+ const tv = new Date(year + 1, 0, 1);
17888
+ if (date >= tv) {
17889
+ year = year + 1;
17890
+ d1w1 = tv;
17891
+ }
17892
+ }
17893
+ const diffTime = Math.abs(date.getTime() - d1w1.getTime());
17894
+ const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
17895
+ return Math.floor(diffDays / 7) + 1;
17896
+ }
17897
+
17898
+ // Types
17899
+
17900
+ const makeVColorPickerProps = propsFactory({
17901
+ canvasHeight: {
17902
+ type: [String, Number],
17903
+ default: 150
17904
+ },
17905
+ disabled: Boolean,
17906
+ dotSize: {
17907
+ type: [Number, String],
17908
+ default: 10
17909
+ },
17910
+ hideCanvas: Boolean,
17911
+ hideSliders: Boolean,
17912
+ hideInputs: Boolean,
17913
+ mode: {
17914
+ type: String,
17915
+ default: 'rgba',
17916
+ validator: v => Object.keys(modes).includes(v)
17917
+ },
17918
+ modes: {
17919
+ type: Array,
17920
+ default: () => Object.keys(modes),
17921
+ validator: v => Array.isArray(v) && v.every(m => Object.keys(modes).includes(m))
17922
+ },
17923
+ showSwatches: Boolean,
17924
+ swatches: Array,
17925
+ swatchesMaxHeight: {
17926
+ type: [Number, String],
17927
+ default: 150
17928
+ },
17929
+ modelValue: {
17930
+ type: [Object, String]
17931
+ },
17932
+ ...makeVPickerProps({
17933
+ hideHeader: true
17934
+ })
17935
+ }, 'VColorPicker');
17936
+ const VColorPicker = defineComponent({
17937
+ name: 'VColorPicker',
17938
+ props: makeVColorPickerProps(),
17939
+ emits: {
17940
+ 'update:modelValue': color => true,
17941
+ 'update:mode': mode => true
17942
+ },
17943
+ setup(props, _ref) {
17944
+ let {
17945
+ slots
17946
+ } = _ref;
17947
+ const mode = useProxiedModel(props, 'mode');
17948
+ const hue = vue.ref(null);
17949
+ const model = useProxiedModel(props, 'modelValue', undefined, v => {
17950
+ if (v == null || v === '') return null;
17951
+ let c;
17952
+ try {
17953
+ c = RGBtoHSV(parseColor(v));
17954
+ } catch (err) {
17955
+ consoleWarn(err);
17956
+ return null;
17957
+ }
17958
+ return c;
17959
+ }, v => {
17960
+ if (!v) return null;
17961
+ return extractColor(v, props.modelValue);
17962
+ });
17963
+ const currentColor = vue.computed(() => {
17964
+ return model.value ? {
17965
+ ...model.value,
17966
+ h: hue.value ?? model.value.h
17967
+ } : null;
17968
+ });
17969
+ const {
17970
+ rtlClasses
17971
+ } = useRtl();
17972
+ let externalChange = true;
17973
+ vue.watch(model, v => {
17974
+ if (!externalChange) {
17975
+ // prevent hue shift from rgb conversion inaccuracy
17976
+ externalChange = true;
17977
+ return;
17978
+ }
17979
+ if (!v) return;
17980
+ hue.value = v.h;
17981
+ }, {
17982
+ immediate: true
17983
+ });
17984
+ const updateColor = hsva => {
17985
+ externalChange = false;
17986
+ hue.value = hsva.h;
17987
+ model.value = hsva;
17988
+ };
17989
+ vue.onBeforeMount(() => {
17990
+ if (!props.modes.includes(mode.value)) mode.value = props.modes[0];
17991
+ });
17992
+ provideDefaults({
17993
+ VSlider: {
17994
+ color: undefined,
17995
+ trackColor: undefined,
17996
+ trackFillColor: undefined
17997
+ }
17998
+ });
17999
+ useRender(() => {
18000
+ const pickerProps = VPicker.filterProps(props);
18001
+ return vue.createVNode(VPicker, vue.mergeProps(pickerProps, {
18002
+ "class": ['v-color-picker', rtlClasses.value, props.class],
18003
+ "style": [{
18004
+ '--v-color-picker-color-hsv': HSVtoCSS({
18005
+ ...(currentColor.value ?? nullColor),
18006
+ a: 1
18007
+ })
18008
+ }, props.style]
18009
+ }), {
18010
+ ...slots,
18011
+ default: () => vue.createVNode(vue.Fragment, null, [!props.hideCanvas && vue.createVNode(VColorPickerCanvas, {
18012
+ "key": "canvas",
18013
+ "color": currentColor.value,
18014
+ "onUpdate:color": updateColor,
18015
+ "disabled": props.disabled,
18016
+ "dotSize": props.dotSize,
18017
+ "width": props.width,
18018
+ "height": props.canvasHeight
18019
+ }, null), (!props.hideSliders || !props.hideInputs) && vue.createVNode("div", {
18020
+ "key": "controls",
18021
+ "class": "v-color-picker__controls"
18022
+ }, [!props.hideSliders && vue.createVNode(VColorPickerPreview, {
18023
+ "key": "preview",
18024
+ "color": currentColor.value,
18025
+ "onUpdate:color": updateColor,
18026
+ "hideAlpha": !mode.value.endsWith('a'),
18027
+ "disabled": props.disabled
18028
+ }, null), !props.hideInputs && vue.createVNode(VColorPickerEdit, {
18029
+ "key": "edit",
18030
+ "modes": props.modes,
18031
+ "mode": mode.value,
18032
+ "onUpdate:mode": m => mode.value = m,
18033
+ "color": currentColor.value,
18034
+ "onUpdate:color": updateColor,
18035
+ "disabled": props.disabled
18036
+ }, null)]), props.showSwatches && vue.createVNode(VColorPickerSwatches, {
18037
+ "key": "swatches",
18038
+ "color": currentColor.value,
18039
+ "onUpdate:color": updateColor,
18040
+ "maxHeight": props.swatchesMaxHeight,
18041
+ "swatches": props.swatches,
18042
+ "disabled": props.disabled
18043
+ }, null)])
18044
+ });
18045
+ });
18046
+ return {};
18047
+ }
18048
+ });
18390
18049
 
18391
- // Composables
18392
- const DateOptionsSymbol = Symbol.for('vuetify:date-options');
18393
- const DateAdapterSymbol = Symbol.for('vuetify:date-adapter');
18394
- function createDate(options, locale) {
18395
- const _options = mergeDeep({
18396
- adapter: VuetifyDateAdapter,
18397
- locale: {
18398
- af: 'af-ZA',
18399
- // ar: '', # not the same value for all variants
18400
- bg: 'bg-BG',
18401
- ca: 'ca-ES',
18402
- ckb: '',
18403
- cs: 'cs-CZ',
18404
- de: 'de-DE',
18405
- el: 'el-GR',
18406
- en: 'en-US',
18407
- // es: '', # not the same value for all variants
18408
- et: 'et-EE',
18409
- fa: 'fa-IR',
18410
- fi: 'fi-FI',
18411
- // fr: '', #not the same value for all variants
18412
- hr: 'hr-HR',
18413
- hu: 'hu-HU',
18414
- he: 'he-IL',
18415
- id: 'id-ID',
18416
- it: 'it-IT',
18417
- ja: 'ja-JP',
18418
- ko: 'ko-KR',
18419
- lv: 'lv-LV',
18420
- lt: 'lt-LT',
18421
- nl: 'nl-NL',
18422
- no: 'no-NO',
18423
- pl: 'pl-PL',
18424
- pt: 'pt-PT',
18425
- ro: 'ro-RO',
18426
- ru: 'ru-RU',
18427
- sk: 'sk-SK',
18428
- sl: 'sl-SI',
18429
- srCyrl: 'sr-SP',
18430
- srLatn: 'sr-SP',
18431
- sv: 'sv-SE',
18432
- th: 'th-TH',
18433
- tr: 'tr-TR',
18434
- az: 'az-AZ',
18435
- uk: 'uk-UA',
18436
- vi: 'vi-VN',
18437
- zhHans: 'zh-CN',
18438
- zhHant: 'zh-TW'
18050
+ // Types
18051
+
18052
+ const makeVComboboxProps = propsFactory({
18053
+ autoSelectFirst: {
18054
+ type: [Boolean, String]
18055
+ },
18056
+ clearOnSelect: {
18057
+ type: Boolean,
18058
+ default: true
18059
+ },
18060
+ delimiters: Array,
18061
+ ...makeFilterProps({
18062
+ filterKeys: ['title']
18063
+ }),
18064
+ ...makeSelectProps({
18065
+ hideNoData: true,
18066
+ returnObject: true
18067
+ }),
18068
+ ...omit(makeVTextFieldProps({
18069
+ modelValue: null,
18070
+ role: 'combobox'
18071
+ }), ['validationValue', 'dirty', 'appendInnerIcon']),
18072
+ ...makeTransitionProps({
18073
+ transition: false
18074
+ })
18075
+ }, 'VCombobox');
18076
+ const VCombobox = genericComponent()({
18077
+ name: 'VCombobox',
18078
+ props: makeVComboboxProps(),
18079
+ emits: {
18080
+ 'update:focused': focused => true,
18081
+ 'update:modelValue': value => true,
18082
+ 'update:search': value => true,
18083
+ 'update:menu': value => true
18084
+ },
18085
+ setup(props, _ref) {
18086
+ let {
18087
+ emit,
18088
+ slots
18089
+ } = _ref;
18090
+ const {
18091
+ t
18092
+ } = useLocale();
18093
+ const vTextFieldRef = vue.ref();
18094
+ const isFocused = vue.shallowRef(false);
18095
+ const isPristine = vue.shallowRef(true);
18096
+ const listHasFocus = vue.shallowRef(false);
18097
+ const vMenuRef = vue.ref();
18098
+ const vVirtualScrollRef = vue.ref();
18099
+ const _menu = useProxiedModel(props, 'menu');
18100
+ const menu = vue.computed({
18101
+ get: () => _menu.value,
18102
+ set: v => {
18103
+ if (_menu.value && !v && vMenuRef.value?.ΨopenChildren.size) return;
18104
+ _menu.value = v;
18105
+ }
18106
+ });
18107
+ const selectionIndex = vue.shallowRef(-1);
18108
+ let cleared = false;
18109
+ const color = vue.computed(() => vTextFieldRef.value?.color);
18110
+ const label = vue.computed(() => menu.value ? props.closeText : props.openText);
18111
+ const {
18112
+ items,
18113
+ transformIn,
18114
+ transformOut
18115
+ } = useItems(props);
18116
+ const {
18117
+ textColorClasses,
18118
+ textColorStyles
18119
+ } = useTextColor(color);
18120
+ const model = useProxiedModel(props, 'modelValue', [], v => transformIn(wrapInArray(v)), v => {
18121
+ const transformed = transformOut(v);
18122
+ return props.multiple ? transformed : transformed[0] ?? null;
18123
+ });
18124
+ const form = useForm(props);
18125
+ const hasChips = vue.computed(() => !!(props.chips || slots.chip));
18126
+ const hasSelectionSlot = vue.computed(() => hasChips.value || !!slots.selection);
18127
+ const _search = vue.shallowRef(!props.multiple && !hasSelectionSlot.value ? model.value[0]?.title ?? '' : '');
18128
+ const search = vue.computed({
18129
+ get: () => {
18130
+ return _search.value;
18131
+ },
18132
+ set: val => {
18133
+ _search.value = val ?? '';
18134
+ if (!props.multiple && !hasSelectionSlot.value) {
18135
+ model.value = [transformItem$3(props, val)];
18136
+ }
18137
+ if (val && props.multiple && props.delimiters?.length) {
18138
+ const values = val.split(new RegExp(`(?:${props.delimiters.join('|')})+`));
18139
+ if (values.length > 1) {
18140
+ values.forEach(v => {
18141
+ v = v.trim();
18142
+ if (v) select(transformItem$3(props, v));
18143
+ });
18144
+ _search.value = '';
18145
+ }
18146
+ }
18147
+ if (!val) selectionIndex.value = -1;
18148
+ isPristine.value = !val;
18149
+ }
18150
+ });
18151
+ const counterValue = vue.computed(() => {
18152
+ return typeof props.counterValue === 'function' ? props.counterValue(model.value) : typeof props.counterValue === 'number' ? props.counterValue : props.multiple ? model.value.length : search.value.length;
18153
+ });
18154
+ vue.watch(_search, value => {
18155
+ if (cleared) {
18156
+ // wait for clear to finish, VTextField sets _search to null
18157
+ // then search computed triggers and updates _search to ''
18158
+ vue.nextTick(() => cleared = false);
18159
+ } else if (isFocused.value && !menu.value) {
18160
+ menu.value = true;
18161
+ }
18162
+ emit('update:search', value);
18163
+ });
18164
+ vue.watch(model, value => {
18165
+ if (!props.multiple && !hasSelectionSlot.value) {
18166
+ _search.value = value[0]?.title ?? '';
18167
+ }
18168
+ });
18169
+ const {
18170
+ filteredItems,
18171
+ getMatches
18172
+ } = useFilter(props, items, () => isPristine.value ? '' : search.value);
18173
+ const displayItems = vue.computed(() => {
18174
+ if (props.hideSelected) {
18175
+ return filteredItems.value.filter(filteredItem => !model.value.some(s => s.value === filteredItem.value));
18176
+ }
18177
+ return filteredItems.value;
18178
+ });
18179
+ const selectedValues = vue.computed(() => model.value.map(selection => selection.value));
18180
+ const highlightFirst = vue.computed(() => {
18181
+ const selectFirst = props.autoSelectFirst === true || props.autoSelectFirst === 'exact' && search.value === displayItems.value[0]?.title;
18182
+ return selectFirst && displayItems.value.length > 0 && !isPristine.value && !listHasFocus.value;
18183
+ });
18184
+ const menuDisabled = vue.computed(() => props.hideNoData && !displayItems.value.length || form.isReadonly.value || form.isDisabled.value);
18185
+ const listRef = vue.ref();
18186
+ const listEvents = useScrolling(listRef, vTextFieldRef);
18187
+ function onClear(e) {
18188
+ cleared = true;
18189
+ if (props.openOnClear) {
18190
+ menu.value = true;
18191
+ }
18439
18192
  }
18440
- }, options);
18441
- return {
18442
- options: _options,
18443
- instance: createInstance(_options, locale)
18444
- };
18445
- }
18446
- function createInstance(options, locale) {
18447
- const instance = vue.reactive(typeof options.adapter === 'function'
18448
- // eslint-disable-next-line new-cap
18449
- ? new options.adapter({
18450
- locale: options.locale[locale.current.value] ?? locale.current.value,
18451
- formats: options.formats
18452
- }) : options.adapter);
18453
- vue.watch(locale.current, value => {
18454
- instance.locale = options.locale[value] ?? value ?? instance.locale;
18455
- });
18456
- return instance;
18457
- }
18458
- function useDate() {
18459
- const options = vue.inject(DateOptionsSymbol);
18460
- if (!options) throw new Error('[Vuetify] Could not find injected date options');
18461
- const locale = useLocale();
18462
- return createInstance(options, locale);
18463
- }
18193
+ function onMousedownControl() {
18194
+ if (menuDisabled.value) return;
18195
+ menu.value = true;
18196
+ }
18197
+ function onMousedownMenuIcon(e) {
18198
+ if (menuDisabled.value) return;
18199
+ if (isFocused.value) {
18200
+ e.preventDefault();
18201
+ e.stopPropagation();
18202
+ }
18203
+ menu.value = !menu.value;
18204
+ }
18205
+ function onListKeydown(e) {
18206
+ if (e.key !== ' ' && checkPrintable(e)) {
18207
+ vTextFieldRef.value?.focus();
18208
+ }
18209
+ }
18210
+ // eslint-disable-next-line complexity
18211
+ function onKeydown(e) {
18212
+ if (isComposingIgnoreKey(e) || form.isReadonly.value) return;
18213
+ const selectionStart = vTextFieldRef.value.selectionStart;
18214
+ const length = model.value.length;
18215
+ if (['Enter', 'ArrowDown', 'ArrowUp'].includes(e.key)) {
18216
+ e.preventDefault();
18217
+ }
18218
+ if (['Enter', 'ArrowDown'].includes(e.key)) {
18219
+ menu.value = true;
18220
+ }
18221
+ if (['Escape'].includes(e.key)) {
18222
+ menu.value = false;
18223
+ }
18224
+ if (['Enter', 'Escape', 'Tab'].includes(e.key)) {
18225
+ if (highlightFirst.value && ['Enter', 'Tab'].includes(e.key) && !model.value.some(_ref2 => {
18226
+ let {
18227
+ value
18228
+ } = _ref2;
18229
+ return value === displayItems.value[0].value;
18230
+ })) {
18231
+ select(filteredItems.value[0]);
18232
+ }
18233
+ isPristine.value = true;
18234
+ }
18235
+ if (e.key === 'ArrowDown' && highlightFirst.value) {
18236
+ listRef.value?.focus('next');
18237
+ }
18238
+ if (e.key === 'Enter' && search.value) {
18239
+ select(transformItem$3(props, search.value));
18240
+ if (hasSelectionSlot.value) _search.value = '';
18241
+ }
18242
+ if (['Backspace', 'Delete'].includes(e.key)) {
18243
+ if (!props.multiple && hasSelectionSlot.value && model.value.length > 0 && !search.value) return select(model.value[0], false);
18244
+ if (~selectionIndex.value) {
18245
+ e.preventDefault();
18246
+ const originalSelectionIndex = selectionIndex.value;
18247
+ select(model.value[selectionIndex.value], false);
18248
+ selectionIndex.value = originalSelectionIndex >= length - 1 ? length - 2 : originalSelectionIndex;
18249
+ } else if (e.key === 'Backspace' && !search.value) {
18250
+ selectionIndex.value = length - 1;
18251
+ }
18252
+ return;
18253
+ }
18254
+ if (!props.multiple) return;
18255
+ if (e.key === 'ArrowLeft') {
18256
+ if (selectionIndex.value < 0 && selectionStart > 0) return;
18257
+ const prev = selectionIndex.value > -1 ? selectionIndex.value - 1 : length - 1;
18258
+ if (model.value[prev]) {
18259
+ selectionIndex.value = prev;
18260
+ } else {
18261
+ selectionIndex.value = -1;
18262
+ vTextFieldRef.value.setSelectionRange(search.value.length, search.value.length);
18263
+ }
18264
+ } else if (e.key === 'ArrowRight') {
18265
+ if (selectionIndex.value < 0) return;
18266
+ const next = selectionIndex.value + 1;
18267
+ if (model.value[next]) {
18268
+ selectionIndex.value = next;
18269
+ } else {
18270
+ selectionIndex.value = -1;
18271
+ vTextFieldRef.value.setSelectionRange(0, 0);
18272
+ }
18273
+ } else if (~selectionIndex.value && checkPrintable(e)) {
18274
+ selectionIndex.value = -1;
18275
+ }
18276
+ }
18277
+ function onAfterEnter() {
18278
+ if (props.eager) {
18279
+ vVirtualScrollRef.value?.calculateVisibleItems();
18280
+ }
18281
+ }
18282
+ function onAfterLeave() {
18283
+ if (isFocused.value) {
18284
+ isPristine.value = true;
18285
+ vTextFieldRef.value?.focus();
18286
+ }
18287
+ }
18288
+ /** @param set - null means toggle */
18289
+ function select(item) {
18290
+ let set = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
18291
+ if (!item || item.props.disabled) return;
18292
+ if (props.multiple) {
18293
+ const index = model.value.findIndex(selection => (props.valueComparator || deepEqual)(selection.value, item.value));
18294
+ const add = set == null ? !~index : set;
18295
+ if (~index) {
18296
+ const value = add ? [...model.value, item] : [...model.value];
18297
+ value.splice(index, 1);
18298
+ model.value = value;
18299
+ } else if (add) {
18300
+ model.value = [...model.value, item];
18301
+ }
18302
+ if (props.clearOnSelect) {
18303
+ search.value = '';
18304
+ }
18305
+ } else {
18306
+ const add = set !== false;
18307
+ model.value = add ? [item] : [];
18308
+ _search.value = add && !hasSelectionSlot.value ? item.title : '';
18464
18309
 
18465
- // https://stackoverflow.com/questions/274861/how-do-i-calculate-the-week-number-given-a-date/275024#275024
18466
- function getWeek(adapter, value) {
18467
- const date = adapter.toJsDate(value);
18468
- let year = date.getFullYear();
18469
- let d1w1 = new Date(year, 0, 1);
18470
- if (date < d1w1) {
18471
- year = year - 1;
18472
- d1w1 = new Date(year, 0, 1);
18473
- } else {
18474
- const tv = new Date(year + 1, 0, 1);
18475
- if (date >= tv) {
18476
- year = year + 1;
18477
- d1w1 = tv;
18310
+ // watch for search watcher to trigger
18311
+ vue.nextTick(() => {
18312
+ menu.value = false;
18313
+ isPristine.value = true;
18314
+ });
18315
+ }
18316
+ }
18317
+ function onFocusin(e) {
18318
+ isFocused.value = true;
18319
+ setTimeout(() => {
18320
+ listHasFocus.value = true;
18321
+ });
18478
18322
  }
18323
+ function onFocusout(e) {
18324
+ listHasFocus.value = false;
18325
+ }
18326
+ function onUpdateModelValue(v) {
18327
+ if (v == null || v === '' && !props.multiple && !hasSelectionSlot.value) model.value = [];
18328
+ }
18329
+ vue.watch(isFocused, (val, oldVal) => {
18330
+ if (val || val === oldVal) return;
18331
+ selectionIndex.value = -1;
18332
+ menu.value = false;
18333
+ if (search.value) {
18334
+ if (props.multiple) {
18335
+ select(transformItem$3(props, search.value));
18336
+ return;
18337
+ }
18338
+ if (!hasSelectionSlot.value) return;
18339
+ if (model.value.some(_ref3 => {
18340
+ let {
18341
+ title
18342
+ } = _ref3;
18343
+ return title === search.value;
18344
+ })) {
18345
+ _search.value = '';
18346
+ } else {
18347
+ select(transformItem$3(props, search.value));
18348
+ }
18349
+ }
18350
+ });
18351
+ vue.watch(menu, () => {
18352
+ if (!props.hideSelected && menu.value && model.value.length) {
18353
+ const index = displayItems.value.findIndex(item => model.value.some(s => (props.valueComparator || deepEqual)(s.value, item.value)));
18354
+ IN_BROWSER && window.requestAnimationFrame(() => {
18355
+ index >= 0 && vVirtualScrollRef.value?.scrollToIndex(index);
18356
+ });
18357
+ }
18358
+ });
18359
+ vue.watch(() => props.items, (newVal, oldVal) => {
18360
+ if (menu.value) return;
18361
+ if (isFocused.value && !oldVal.length && newVal.length) {
18362
+ menu.value = true;
18363
+ }
18364
+ });
18365
+ useRender(() => {
18366
+ const hasList = !!(!props.hideNoData || displayItems.value.length || slots['prepend-item'] || slots['append-item'] || slots['no-data']);
18367
+ const isDirty = model.value.length > 0;
18368
+ const textFieldProps = VTextField.filterProps(props);
18369
+ return vue.createVNode(VTextField, vue.mergeProps({
18370
+ "ref": vTextFieldRef
18371
+ }, textFieldProps, {
18372
+ "modelValue": search.value,
18373
+ "onUpdate:modelValue": [$event => search.value = $event, onUpdateModelValue],
18374
+ "focused": isFocused.value,
18375
+ "onUpdate:focused": $event => isFocused.value = $event,
18376
+ "validationValue": model.externalValue,
18377
+ "counterValue": counterValue.value,
18378
+ "dirty": isDirty,
18379
+ "class": ['v-combobox', {
18380
+ 'v-combobox--active-menu': menu.value,
18381
+ 'v-combobox--chips': !!props.chips,
18382
+ 'v-combobox--selection-slot': !!hasSelectionSlot.value,
18383
+ 'v-combobox--selecting-index': selectionIndex.value > -1,
18384
+ [`v-combobox--${props.multiple ? 'multiple' : 'single'}`]: true
18385
+ }, props.class],
18386
+ "style": props.style,
18387
+ "readonly": form.isReadonly.value,
18388
+ "placeholder": isDirty ? undefined : props.placeholder,
18389
+ "onClick:clear": onClear,
18390
+ "onMousedown:control": onMousedownControl,
18391
+ "onKeydown": onKeydown
18392
+ }), {
18393
+ ...slots,
18394
+ default: () => vue.createVNode(vue.Fragment, null, [vue.createVNode(VMenu, vue.mergeProps({
18395
+ "ref": vMenuRef,
18396
+ "modelValue": menu.value,
18397
+ "onUpdate:modelValue": $event => menu.value = $event,
18398
+ "activator": "parent",
18399
+ "contentClass": "v-combobox__content",
18400
+ "disabled": menuDisabled.value,
18401
+ "eager": props.eager,
18402
+ "maxHeight": 310,
18403
+ "openOnClick": false,
18404
+ "closeOnContentClick": false,
18405
+ "transition": props.transition,
18406
+ "onAfterEnter": onAfterEnter,
18407
+ "onAfterLeave": onAfterLeave
18408
+ }, props.menuProps), {
18409
+ default: () => [hasList && vue.createVNode(VList, vue.mergeProps({
18410
+ "ref": listRef,
18411
+ "selected": selectedValues.value,
18412
+ "selectStrategy": props.multiple ? 'independent' : 'single-independent',
18413
+ "onMousedown": e => e.preventDefault(),
18414
+ "onKeydown": onListKeydown,
18415
+ "onFocusin": onFocusin,
18416
+ "onFocusout": onFocusout,
18417
+ "tabindex": "-1",
18418
+ "aria-live": "polite",
18419
+ "color": props.itemColor ?? props.color
18420
+ }, listEvents, props.listProps), {
18421
+ default: () => [slots['prepend-item']?.(), !displayItems.value.length && !props.hideNoData && (slots['no-data']?.() ?? vue.createVNode(VListItem, {
18422
+ "key": "no-data",
18423
+ "title": t(props.noDataText)
18424
+ }, null)), vue.createVNode(VVirtualScroll, {
18425
+ "ref": vVirtualScrollRef,
18426
+ "renderless": true,
18427
+ "items": displayItems.value,
18428
+ "itemKey": "value"
18429
+ }, {
18430
+ default: _ref4 => {
18431
+ let {
18432
+ item,
18433
+ index,
18434
+ itemRef
18435
+ } = _ref4;
18436
+ const itemProps = vue.mergeProps(item.props, {
18437
+ ref: itemRef,
18438
+ key: item.value,
18439
+ active: highlightFirst.value && index === 0 ? true : undefined,
18440
+ onClick: () => select(item, null)
18441
+ });
18442
+ return slots.item?.({
18443
+ item,
18444
+ index,
18445
+ props: itemProps
18446
+ }) ?? vue.createVNode(VListItem, vue.mergeProps(itemProps, {
18447
+ "role": "option"
18448
+ }), {
18449
+ prepend: _ref5 => {
18450
+ let {
18451
+ isSelected
18452
+ } = _ref5;
18453
+ return vue.createVNode(vue.Fragment, null, [props.multiple && !props.hideSelected ? vue.createVNode(VCheckboxBtn, {
18454
+ "key": item.value,
18455
+ "modelValue": isSelected,
18456
+ "ripple": false,
18457
+ "tabindex": "-1"
18458
+ }, null) : undefined, item.props.prependAvatar && vue.createVNode(VAvatar, {
18459
+ "image": item.props.prependAvatar
18460
+ }, null), item.props.prependIcon && vue.createVNode(VIcon, {
18461
+ "icon": item.props.prependIcon
18462
+ }, null)]);
18463
+ },
18464
+ title: () => {
18465
+ return isPristine.value ? item.title : highlightResult('v-combobox', item.title, getMatches(item)?.title);
18466
+ }
18467
+ });
18468
+ }
18469
+ }), slots['append-item']?.()]
18470
+ })]
18471
+ }), model.value.map((item, index) => {
18472
+ function onChipClose(e) {
18473
+ e.stopPropagation();
18474
+ e.preventDefault();
18475
+ select(item, false);
18476
+ }
18477
+ const slotProps = {
18478
+ 'onClick:close': onChipClose,
18479
+ onKeydown(e) {
18480
+ if (e.key !== 'Enter' && e.key !== ' ') return;
18481
+ e.preventDefault();
18482
+ e.stopPropagation();
18483
+ onChipClose(e);
18484
+ },
18485
+ onMousedown(e) {
18486
+ e.preventDefault();
18487
+ e.stopPropagation();
18488
+ },
18489
+ modelValue: true,
18490
+ 'onUpdate:modelValue': undefined
18491
+ };
18492
+ const hasSlot = hasChips.value ? !!slots.chip : !!slots.selection;
18493
+ const slotContent = hasSlot ? ensureValidVNode(hasChips.value ? slots.chip({
18494
+ item,
18495
+ index,
18496
+ props: slotProps
18497
+ }) : slots.selection({
18498
+ item,
18499
+ index
18500
+ })) : undefined;
18501
+ if (hasSlot && !slotContent) return undefined;
18502
+ return vue.createVNode("div", {
18503
+ "key": item.value,
18504
+ "class": ['v-combobox__selection', index === selectionIndex.value && ['v-combobox__selection--selected', textColorClasses.value]],
18505
+ "style": index === selectionIndex.value ? textColorStyles.value : {}
18506
+ }, [hasChips.value ? !slots.chip ? vue.createVNode(VChip, vue.mergeProps({
18507
+ "key": "chip",
18508
+ "closable": props.closableChips,
18509
+ "size": "small",
18510
+ "text": item.title,
18511
+ "disabled": item.props.disabled
18512
+ }, slotProps), null) : vue.createVNode(VDefaultsProvider, {
18513
+ "key": "chip-defaults",
18514
+ "defaults": {
18515
+ VChip: {
18516
+ closable: props.closableChips,
18517
+ size: 'small',
18518
+ text: item.title
18519
+ }
18520
+ }
18521
+ }, {
18522
+ default: () => [slotContent]
18523
+ }) : slotContent ?? vue.createVNode("span", {
18524
+ "class": "v-combobox__selection-text"
18525
+ }, [item.title, props.multiple && index < model.value.length - 1 && vue.createVNode("span", {
18526
+ "class": "v-combobox__selection-comma"
18527
+ }, [vue.createTextVNode(",")])])]);
18528
+ })]),
18529
+ 'append-inner': function () {
18530
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
18531
+ args[_key] = arguments[_key];
18532
+ }
18533
+ return vue.createVNode(vue.Fragment, null, [slots['append-inner']?.(...args), (!props.hideNoData || props.items.length) && props.menuIcon ? vue.createVNode(VIcon, {
18534
+ "class": "v-combobox__menu-icon",
18535
+ "icon": props.menuIcon,
18536
+ "onMousedown": onMousedownMenuIcon,
18537
+ "onClick": noop,
18538
+ "aria-label": t(label.value),
18539
+ "title": t(label.value),
18540
+ "tabindex": "-1"
18541
+ }, null) : undefined]);
18542
+ }
18543
+ });
18544
+ });
18545
+ return forwardRefs({
18546
+ isFocused,
18547
+ isPristine,
18548
+ menu,
18549
+ search,
18550
+ selectionIndex,
18551
+ filteredItems,
18552
+ select
18553
+ }, vTextFieldRef);
18479
18554
  }
18480
- const diffTime = Math.abs(date.getTime() - d1w1.getTime());
18481
- const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
18482
- return Math.floor(diffDays / 7) + 1;
18483
- }
18555
+ });
18484
18556
 
18485
18557
  // Types
18486
18558
 
@@ -22429,70 +22501,6 @@
22429
22501
  }
22430
22502
  });
22431
22503
 
22432
- // Utilities
22433
- const VPickerTitle = createSimpleFunctional('v-picker-title');
22434
-
22435
- // Types
22436
-
22437
- const makeVPickerProps = propsFactory({
22438
- bgColor: String,
22439
- landscape: Boolean,
22440
- title: String,
22441
- hideHeader: Boolean,
22442
- ...makeVSheetProps()
22443
- }, 'VPicker');
22444
- const VPicker = genericComponent()({
22445
- name: 'VPicker',
22446
- props: makeVPickerProps(),
22447
- setup(props, _ref) {
22448
- let {
22449
- slots
22450
- } = _ref;
22451
- const {
22452
- backgroundColorClasses,
22453
- backgroundColorStyles
22454
- } = useBackgroundColor(vue.toRef(props, 'color'));
22455
- useRender(() => {
22456
- const sheetProps = VSheet.filterProps(props);
22457
- const hasTitle = !!(props.title || slots.title);
22458
- return vue.createVNode(VSheet, vue.mergeProps(sheetProps, {
22459
- "color": props.bgColor,
22460
- "class": ['v-picker', {
22461
- 'v-picker--landscape': props.landscape,
22462
- 'v-picker--with-actions': !!slots.actions
22463
- }, props.class],
22464
- "style": props.style
22465
- }), {
22466
- default: () => [!props.hideHeader && vue.createVNode("div", {
22467
- "key": "header",
22468
- "class": [backgroundColorClasses.value],
22469
- "style": [backgroundColorStyles.value]
22470
- }, [hasTitle && vue.createVNode(VPickerTitle, {
22471
- "key": "picker-title"
22472
- }, {
22473
- default: () => [slots.title?.() ?? props.title]
22474
- }), slots.header && vue.createVNode("div", {
22475
- "class": "v-picker__header"
22476
- }, [slots.header()])]), vue.createVNode("div", {
22477
- "class": "v-picker__body"
22478
- }, [slots.default?.()]), slots.actions && vue.createVNode(VDefaultsProvider, {
22479
- "defaults": {
22480
- VBtn: {
22481
- slim: true,
22482
- variant: 'text'
22483
- }
22484
- }
22485
- }, {
22486
- default: () => [vue.createVNode("div", {
22487
- "class": "v-picker__actions"
22488
- }, [slots.actions()])]
22489
- })]
22490
- });
22491
- });
22492
- return {};
22493
- }
22494
- });
22495
-
22496
22504
  // Types
22497
22505
 
22498
22506
  // Types
@@ -22553,6 +22561,9 @@
22553
22561
  const {
22554
22562
  t
22555
22563
  } = useLocale();
22564
+ const {
22565
+ rtlClasses
22566
+ } = useRtl();
22556
22567
  const model = useProxiedModel(props, 'modelValue', undefined, v => wrapInArray(v), v => props.multiple ? v : v[0]);
22557
22568
  const viewMode = useProxiedModel(props, 'viewMode');
22558
22569
  // const inputMode = useProxiedModel(props, 'inputMode')
@@ -22690,7 +22701,7 @@
22690
22701
  return vue.createVNode(VPicker, vue.mergeProps(pickerProps, {
22691
22702
  "class": ['v-date-picker', `v-date-picker--${viewMode.value}`, {
22692
22703
  'v-date-picker--show-week': props.showWeek
22693
- }, props.class],
22704
+ }, rtlClasses.value, props.class],
22694
22705
  "style": props.style
22695
22706
  }), {
22696
22707
  title: () => slots.title?.() ?? vue.createVNode("div", {
@@ -28521,7 +28532,7 @@
28521
28532
  };
28522
28533
  });
28523
28534
  }
28524
- const version$1 = "3.7.15-dev.2025-03-06";
28535
+ const version$1 = "3.7.15-dev.2025-03-08";
28525
28536
  createVuetify$1.version = version$1;
28526
28537
 
28527
28538
  // Vue's inject() can only be used in setup
@@ -28546,7 +28557,7 @@
28546
28557
  ...options
28547
28558
  });
28548
28559
  };
28549
- const version = "3.7.15-dev.2025-03-06";
28560
+ const version = "3.7.15-dev.2025-03-08";
28550
28561
  createVuetify.version = version;
28551
28562
 
28552
28563
  exports.blueprints = index;