@rotki/ui-library 2.10.0 → 2.11.1

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 (52) hide show
  1. package/dist/components/accordions/accordion/RuiAccordion.vue.d.ts +2 -2
  2. package/dist/components/alerts/RuiAlert.vue.d.ts +3 -3
  3. package/dist/components/buttons/button/RuiButton.vue.d.ts +9 -5
  4. package/dist/components/buttons/button-group/RuiButtonGroup.vue.d.ts +9 -5
  5. package/dist/components/calendar/state.js +1 -1
  6. package/dist/components/calendar/state.js.map +1 -1
  7. package/dist/components/cards/RuiCard.vue.d.ts +6 -6
  8. package/dist/components/date-time-picker/RuiDateTimePicker.vue.d.ts +3 -4
  9. package/dist/components/date-time-picker/RuiDateTimePicker.vue2.js +66 -249
  10. package/dist/components/date-time-picker/RuiDateTimePicker.vue2.js.map +1 -1
  11. package/dist/components/date-time-picker/use-date-time-selection.d.ts +38 -0
  12. package/dist/components/date-time-picker/use-date-time-selection.js +286 -0
  13. package/dist/components/date-time-picker/use-date-time-selection.js.map +1 -0
  14. package/dist/components/date-time-picker/use-keyboard-handler.d.ts +2 -0
  15. package/dist/components/date-time-picker/use-keyboard-handler.js +71 -60
  16. package/dist/components/date-time-picker/use-keyboard-handler.js.map +1 -1
  17. package/dist/components/forms/auto-complete/RuiAutoComplete.vue.d.ts +29 -25
  18. package/dist/components/forms/checkbox/RuiCheckbox.vue.d.ts +2 -2
  19. package/dist/components/forms/radio-button/radio/RuiRadio.vue.d.ts +9 -5
  20. package/dist/components/forms/radio-button/radio-group/RuiRadioGroup.vue.d.ts +9 -5
  21. package/dist/components/forms/revealable-text-field/RuiRevealableTextField.vue.d.ts +4 -4
  22. package/dist/components/forms/select/RuiMenuSelect.vue.d.ts +29 -25
  23. package/dist/components/forms/text-area/RuiTextArea.vue.d.ts +3 -3
  24. package/dist/components/forms/text-field/RuiTextField.vue.d.ts +3 -3
  25. package/dist/components/overlays/badge/RuiBadge.vue.d.ts +3 -3
  26. package/dist/components/overlays/bottom-sheet/RuiBottomSheet.vue.d.ts +2 -2
  27. package/dist/components/overlays/dialog/RuiDialog.vue.d.ts +2 -2
  28. package/dist/components/overlays/menu/RuiMenu.vue.d.ts +2 -2
  29. package/dist/components/overlays/navigation-drawer/RuiNavigationDrawer.vue.d.ts +2 -2
  30. package/dist/components/overlays/notification/RuiNotification.vue.d.ts +2 -2
  31. package/dist/components/overlays/tooltip/RuiTooltip.vue.d.ts +2 -2
  32. package/dist/components/tables/RuiDataTable.vue.d.ts +9 -5
  33. package/dist/components/tables/RuiExpandButton.vue.d.ts +2 -2
  34. package/dist/components/tables/RuiTableHead.vue.d.ts +9 -5
  35. package/dist/components/tabs/tab/RuiTab.vue.d.ts +1 -1
  36. package/dist/components/tabs/tab-item/RuiTabItem.vue.d.ts +3 -3
  37. package/dist/components/tabs/tab-items/RuiTabItems.vue.d.ts +9 -5
  38. package/dist/components/time-picker/RuiTimePicker.vue2.js +0 -1
  39. package/dist/components/time-picker/RuiTimePicker.vue2.js.map +1 -1
  40. package/dist/composables/defaults/table.js +1 -1
  41. package/dist/composables/defaults/table.js.map +1 -1
  42. package/dist/composables/icons.js +1 -1
  43. package/dist/composables/icons.js.map +1 -1
  44. package/dist/composables/theme.js +7 -8
  45. package/dist/composables/theme.js.map +1 -1
  46. package/dist/composables/use-rui-i18n.js +1 -1
  47. package/dist/composables/use-rui-i18n.js.map +1 -1
  48. package/dist/style.css +2 -2
  49. package/dist/types/theme.d.ts +7 -7
  50. package/dist/types/theme.js.map +1 -1
  51. package/dist/web-types.json +72 -72
  52. package/package.json +31 -40
@@ -5,6 +5,24 @@ import { assert } from "../../utils/assert.js";
5
5
  import { computed, nextTick } from "vue";
6
6
  import { get, set } from "@vueuse/shared";
7
7
  import { isDefined } from "@vueuse/core";
8
+ const SEGMENT_METHODS = {
9
+ DD: "date",
10
+ HH: "hour",
11
+ MM: "month",
12
+ SSS: "millisecond",
13
+ YYYY: "year",
14
+ mm: "minute",
15
+ ss: "second"
16
+ };
17
+ const SEGMENT_CONFIG = {
18
+ DD: { maxValue: 31, minValue: 1 },
19
+ HH: { maxValue: 23, minValue: 0 },
20
+ MM: { maxValue: 12, minValue: 1 },
21
+ SSS: { maxValue: 999, minValue: 0 },
22
+ YYYY: { maxValue: 9999, minValue: 1 },
23
+ mm: { maxValue: 59, minValue: 0 },
24
+ ss: { maxValue: 59, minValue: 0 }
25
+ };
8
26
  function useKeyboardHandler(options) {
9
27
  const {
10
28
  accuracy,
@@ -81,17 +99,8 @@ function useKeyboardHandler(options) {
81
99
  const currentSegment = getCurrentSegment();
82
100
  if (!currentSegment)
83
101
  return;
84
- const segmentMethods = {
85
- DD: "date",
86
- HH: "hour",
87
- MM: "month",
88
- mm: "minute",
89
- ss: "second",
90
- SSS: "millisecond",
91
- YYYY: "year"
92
- };
93
102
  const segmentType = currentSegment.type;
94
- const method = segmentMethods[segmentType];
103
+ const method = SEGMENT_METHODS[segmentType];
95
104
  const selectedDate = getDateTime();
96
105
  const updatedDate = selectedDate.set(method, selectedDate.get(method) + (increment ? 1 : -1));
97
106
  if (updatedDate.year() >= 1970) {
@@ -127,57 +136,41 @@ function useKeyboardHandler(options) {
127
136
  }
128
137
  }
129
138
  function handleDigitPressed(event, digit) {
130
- if (!(event.target instanceof HTMLInputElement)) {
139
+ if (!(event.target instanceof HTMLInputElement))
131
140
  return;
132
- }
133
141
  const position = event.target.selectionStart ?? 0;
134
142
  const currentSegment = getCurrentSegment(position);
135
- if (!currentSegment)
136
- return;
137
- const number = parseInt(digit);
138
- if (isNaN(number))
143
+ if (!currentSegment || isNaN(parseInt(digit)))
139
144
  return;
140
- const segmentConfig = {
141
- DD: { maxValue: 31, minValue: 1 },
142
- HH: { maxValue: 23, minValue: 0 },
143
- MM: { maxValue: 12, minValue: 1 },
144
- mm: { maxValue: 59, minValue: 0 },
145
- ss: { maxValue: 59, minValue: 0 },
146
- SSS: { maxValue: 999, minValue: 0 },
147
- YYYY: { maxValue: 9999, minValue: 1 }
148
- };
149
145
  const segmentType = currentSegment.type;
150
- if (isDateTimeSegmentType(segmentType)) {
151
- const config = segmentConfig[segmentType];
152
- const value = get(currentValue) ?? "";
153
- const combinedValue = parseInt(`${value}${digit}`);
154
- const nextCombinedValue = parseInt(`${value}${digit}0`);
155
- const maxLength = segmentType.length;
156
- const minValue = config.minValue ?? 0;
157
- if (combinedValue >= minValue && combinedValue <= config.maxValue) {
158
- setValue(segmentType, combinedValue);
159
- setCursorPosition(currentSegment);
160
- }
161
- const willExceedMax = nextCombinedValue > config.maxValue;
162
- const reachedMaxLength = combinedValue.toString().length >= maxLength;
163
- if (willExceedMax || reachedMaxLength) {
164
- navigateSegments("ArrowRight");
165
- }
146
+ if (!isDateTimeSegmentType(segmentType))
147
+ return;
148
+ const config = SEGMENT_CONFIG[segmentType];
149
+ const value = get(currentValue) ?? "";
150
+ const combinedStr = `${value}${digit}`;
151
+ const combinedValue = parseInt(combinedStr);
152
+ const maxLength = segmentType.length;
153
+ const minValue = config.minValue ?? 0;
154
+ if (combinedValue >= minValue && combinedValue <= config.maxValue) {
155
+ setValue(segmentType, combinedValue);
156
+ setCursorPosition(currentSegment);
157
+ } else if (combinedValue < minValue && combinedStr.length < maxLength) {
158
+ set(currentValue, combinedValue);
166
159
  }
160
+ const willExceedMax = parseInt(`${combinedStr}0`) > config.maxValue;
161
+ if (willExceedMax || combinedStr.length >= maxLength)
162
+ navigateSegments("ArrowRight");
167
163
  }
168
164
  function handleKeyboardNavigation(event) {
169
- if (event.key === "ArrowUp") {
165
+ if (event.key === "ArrowUp")
170
166
  changeSegmentValue(true);
171
- } else if (event.key === "ArrowDown") {
167
+ else if (event.key === "ArrowDown")
172
168
  changeSegmentValue(false);
173
- }
174
169
  }
175
170
  function handleBackspace(event) {
176
- if (!(event.target instanceof HTMLInputElement)) {
171
+ if (!(event.target instanceof HTMLInputElement))
177
172
  return;
178
- }
179
- const position = event.target.selectionStart ?? 0;
180
- const currentSegment = getCurrentSegment(position);
173
+ const currentSegment = getCurrentSegment(event.target.selectionStart ?? 0);
181
174
  if (!currentSegment)
182
175
  return;
183
176
  const value = get(currentValue) ?? getCurrent(currentSegment.type) ?? "";
@@ -186,11 +179,9 @@ function useKeyboardHandler(options) {
186
179
  setCursorPosition(currentSegment);
187
180
  }
188
181
  function onInputDeletePressed(event) {
189
- if (!(event.target instanceof HTMLInputElement)) {
182
+ if (!(event.target instanceof HTMLInputElement))
190
183
  return;
191
- }
192
- const selectionStart = event.target.selectionStart ?? 0;
193
- const segment = getCurrentSegment(selectionStart);
184
+ const segment = getCurrentSegment(event.target.selectionStart ?? 0);
194
185
  if (segment) {
195
186
  clear(segment.type);
196
187
  setCursorPosition(segment);
@@ -200,21 +191,19 @@ function useKeyboardHandler(options) {
200
191
  if (disabled || readonly)
201
192
  return;
202
193
  const { key } = event;
203
- if (["Tab"].includes(key)) {
194
+ if (key === "Tab")
204
195
  return;
205
- }
206
196
  event.preventDefault();
207
- if (key === "ArrowRight" || key === "ArrowLeft") {
197
+ if (key === "ArrowRight" || key === "ArrowLeft")
208
198
  navigateSegments(key);
209
- } else if (key === "ArrowUp" || key === "ArrowDown") {
199
+ else if (key === "ArrowUp" || key === "ArrowDown")
210
200
  handleKeyboardNavigation(event);
211
- } else if (key === "Backspace") {
201
+ else if (key === "Backspace")
212
202
  handleBackspace(event);
213
- } else if (key === "Delete") {
203
+ else if (key === "Delete")
214
204
  onInputDeletePressed(event);
215
- } else if (/^\d$/.test(key)) {
205
+ else if (/^\d$/.test(key))
216
206
  handleDigitPressed(event, key);
217
- }
218
207
  }
219
208
  function getClickPosition(event, input, useCaretPosition) {
220
209
  const fallback = input.selectionStart ?? 0;
@@ -223,11 +212,21 @@ function useKeyboardHandler(options) {
223
212
  return caretPos.offset;
224
213
  return document.caretRangeFromPoint?.(event.clientX, event.clientY)?.startOffset ?? fallback;
225
214
  }
215
+ let clickedSegment;
216
+ function handleMouseDown(event) {
217
+ if (disabled || readonly || !(event.target instanceof HTMLInputElement))
218
+ return;
219
+ const currentSegment = getCurrentSegment(getClickPosition(event, event.target));
220
+ if (currentSegment) {
221
+ clickedSegment = currentSegment;
222
+ }
223
+ }
226
224
  function handleClick(event) {
227
225
  if (disabled || readonly || !(event.target instanceof HTMLInputElement))
228
226
  return;
229
227
  const currentSegment = getCurrentSegment(getClickPosition(event, event.target));
230
228
  if (currentSegment) {
229
+ clickedSegment = currentSegment;
231
230
  set(cursorPosition, currentSegment.end);
232
231
  event.target.setSelectionRange(currentSegment.start, currentSegment.end);
233
232
  }
@@ -237,6 +236,11 @@ function useKeyboardHandler(options) {
237
236
  set(cursorPosition, target.selectionStart ?? 0);
238
237
  }
239
238
  function handleFocus() {
239
+ if (clickedSegment) {
240
+ setCursorPosition(clickedSegment);
241
+ clickedSegment = void 0;
242
+ return;
243
+ }
240
244
  const input = get(textInput);
241
245
  if (input && input.selectionStart !== input.selectionEnd)
242
246
  return;
@@ -244,6 +248,11 @@ function useKeyboardHandler(options) {
244
248
  if (firstSegment)
245
249
  setCursorPosition(firstSegment);
246
250
  }
251
+ function handleBlur() {
252
+ set(cursorPosition, 0);
253
+ set(currentValue, void 0);
254
+ clickedSegment = void 0;
255
+ }
247
256
  function parseAndSetDateValues(pastedText) {
248
257
  try {
249
258
  const parsedDate = dayjs(pastedText, get(dateFormat));
@@ -293,11 +302,13 @@ function useKeyboardHandler(options) {
293
302
  return {
294
303
  clear,
295
304
  getCurrentSegment,
305
+ handleBlur,
296
306
  handleClick,
297
307
  handleFocus,
298
308
  handleInput,
299
309
  handleInputSelection,
300
310
  handleKeyDown,
311
+ handleMouseDown,
301
312
  handlePaste,
302
313
  setSegment
303
314
  };
@@ -1 +1 @@
1
- {"version":3,"file":"use-keyboard-handler.js","sources":["../../../src/components/date-time-picker/use-keyboard-handler.ts"],"sourcesContent":["import type { Ref } from 'vue';\nimport type { TimeAccuracy } from '@/consts/time-accuracy';\nimport dayjs, { type Dayjs } from 'dayjs';\nimport { type DateTimeSegmentType, isDateTimeSegmentType } from '@/components/date-time-picker/types';\nimport { includeMilliseconds, includeSeconds } from '@/components/date-time-picker/utils';\nimport { assert } from '@/utils/assert';\n\ninterface Segment {\n start: number;\n end: number;\n type: DateTimeSegmentType;\n}\n\ninterface KeyboardHandlerOptions {\n dateFormat: Ref<string>;\n cursorPosition: Ref<number>;\n currentValue: Ref<number | undefined>;\n textInput: Ref<HTMLInputElement | undefined>;\n setValue: (segment: DateTimeSegmentType, value?: number) => void;\n getCurrent: (segment: DateTimeSegmentType) => number | undefined;\n getDateTime: () => Dayjs;\n disabled: boolean;\n readonly: boolean;\n accuracy: TimeAccuracy;\n}\n\nexport function useKeyboardHandler(options: KeyboardHandlerOptions) {\n const {\n accuracy,\n currentValue,\n cursorPosition,\n dateFormat,\n disabled,\n getCurrent,\n getDateTime,\n readonly,\n setValue,\n textInput,\n } = options;\n\n const formatSegments = computed<string[]>(() => {\n const format = get(dateFormat);\n return format.split(/([\\s./:])/g).filter(Boolean);\n });\n\n const segmentPositions = computed<Segment[]>(() => {\n const segments = get(formatSegments);\n const positions: Segment[] = [];\n let currentPosition = 0;\n\n segments.forEach((segment) => {\n if (!/[\\s./:]/.test(segment)) {\n assert(isDateTimeSegmentType(segment), `Invalid date format segment: ${segment}`);\n positions.push({\n end: currentPosition + segment.length,\n start: currentPosition,\n type: segment,\n });\n }\n currentPosition += segment.length;\n });\n\n return positions;\n });\n\n function getCurrentSegment(position: number = get(cursorPosition)) {\n const segments = get(segmentPositions);\n return segments.find(\n segment => position >= segment.start && position <= segment.end,\n );\n }\n\n function setCursorPosition(segment: Segment): void {\n set(cursorPosition, segment.end);\n\n nextTick(() => {\n if (isDefined(textInput)) {\n const input = get(textInput);\n input.setSelectionRange(segment.start, segment.end);\n input.focus();\n }\n });\n }\n\n function setSegment(segmentType: DateTimeSegmentType): void {\n const segments = get(segmentPositions).find(segment => segment.type === segmentType);\n if (segments) {\n setCursorPosition(segments);\n }\n }\n\n function clear(segmentType?: string): void {\n const currentSegment = getCurrentSegment();\n if (!segmentType && !currentSegment) {\n return;\n }\n\n const typeToUse = segmentType ?? currentSegment?.type;\n if (!typeToUse) {\n return;\n }\n\n setValue(typeToUse as DateTimeSegmentType, undefined);\n\n if (currentSegment) {\n setCursorPosition(currentSegment);\n }\n }\n\n function changeSegmentValue(increment: boolean): void {\n if (!isDefined(textInput))\n return;\n\n const currentSegment = getCurrentSegment();\n\n if (!currentSegment)\n return;\n\n const segmentMethods = {\n DD: 'date',\n HH: 'hour',\n MM: 'month',\n mm: 'minute',\n ss: 'second',\n SSS: 'millisecond',\n YYYY: 'year',\n } as const;\n\n const segmentType = currentSegment.type;\n const method = segmentMethods[segmentType];\n const selectedDate = getDateTime();\n const updatedDate = selectedDate.set(method, selectedDate.get(method) + (increment ? 1 : -1));\n if (updatedDate.year() >= 1970) {\n setValue(segmentType, segmentType === 'MM' ? updatedDate.get(method) + 1 : updatedDate.get(method));\n setCursorPosition(currentSegment);\n }\n }\n\n function navigateSegments(key: string) {\n const position = get(cursorPosition);\n const positions = get(segmentPositions);\n const currentSegmentIndex = positions.findIndex(\n segment => position >= segment.start && position <= segment.end,\n );\n\n if (currentSegmentIndex === -1) {\n return;\n }\n\n set(currentValue, undefined);\n\n let nextSegmentIndex: number;\n if (key === 'ArrowRight') {\n nextSegmentIndex = currentSegmentIndex + 1;\n if (nextSegmentIndex < positions.length) {\n const nextSegment = positions[nextSegmentIndex];\n assert(nextSegment);\n setCursorPosition(nextSegment);\n }\n }\n else {\n nextSegmentIndex = currentSegmentIndex - 1;\n if (nextSegmentIndex >= 0) {\n const nextSegment = positions[nextSegmentIndex];\n assert(nextSegment);\n setCursorPosition(nextSegment);\n }\n }\n }\n\n function handleDigitPressed(event: KeyboardEvent, digit: string): void {\n if (!(event.target instanceof HTMLInputElement)) {\n return;\n }\n const position = event.target.selectionStart ?? 0;\n const currentSegment = getCurrentSegment(position);\n if (!currentSegment)\n return;\n\n const number = parseInt(digit);\n if (isNaN(number))\n return;\n\n const segmentConfig: Record<DateTimeSegmentType, { maxValue: number; minValue?: number }> = {\n DD: { maxValue: 31, minValue: 1 },\n HH: { maxValue: 23, minValue: 0 },\n MM: { maxValue: 12, minValue: 1 },\n mm: { maxValue: 59, minValue: 0 },\n ss: { maxValue: 59, minValue: 0 },\n SSS: { maxValue: 999, minValue: 0 },\n YYYY: { maxValue: 9999, minValue: 1 },\n };\n\n const segmentType = currentSegment.type;\n\n if (isDateTimeSegmentType(segmentType)) {\n const config = segmentConfig[segmentType];\n const value = get(currentValue) ?? '';\n const combinedValue = parseInt(`${value}${digit}`);\n const nextCombinedValue = parseInt(`${value}${digit}0`);\n\n const maxLength = segmentType.length;\n const minValue = config.minValue ?? 0;\n\n if (combinedValue >= minValue && combinedValue <= config.maxValue) {\n setValue(segmentType, combinedValue);\n setCursorPosition(currentSegment);\n }\n\n const willExceedMax = nextCombinedValue > config.maxValue;\n const reachedMaxLength = combinedValue.toString().length >= maxLength;\n\n if (willExceedMax || reachedMaxLength) {\n navigateSegments('ArrowRight');\n }\n }\n }\n\n function handleKeyboardNavigation(event: KeyboardEvent): void {\n if (event.key === 'ArrowUp') {\n changeSegmentValue(true);\n }\n else if (event.key === 'ArrowDown') {\n changeSegmentValue(false);\n }\n }\n\n function handleBackspace(event: KeyboardEvent) {\n if (!(event.target instanceof HTMLInputElement)) {\n return;\n }\n const position = event.target.selectionStart ?? 0;\n const currentSegment = getCurrentSegment(position);\n if (!currentSegment)\n return;\n\n const value = get(currentValue) ?? getCurrent(currentSegment.type) ?? '';\n const updatedValue = value.toString().slice(0, -1);\n setValue(currentSegment.type, updatedValue.length === 0 ? undefined : parseInt(updatedValue));\n setCursorPosition(currentSegment);\n }\n\n function onInputDeletePressed(event: KeyboardEvent): void {\n if (!(event.target instanceof HTMLInputElement)) {\n return;\n }\n const selectionStart = event.target.selectionStart ?? 0;\n const segment = getCurrentSegment(selectionStart);\n if (segment) {\n clear(segment.type);\n setCursorPosition(segment);\n }\n }\n\n function handleKeyDown(event: KeyboardEvent): void {\n if (disabled || readonly)\n return;\n\n const { key } = event;\n\n if (['Tab'].includes(key)) {\n return;\n }\n\n event.preventDefault();\n\n if (key === 'ArrowRight' || key === 'ArrowLeft') {\n navigateSegments(key);\n }\n else if (key === 'ArrowUp' || key === 'ArrowDown') {\n handleKeyboardNavigation(event);\n }\n else if (key === 'Backspace') {\n handleBackspace(event);\n }\n else if (key === 'Delete') {\n onInputDeletePressed(event);\n }\n else if (/^\\d$/.test(key)) {\n handleDigitPressed(event, key);\n }\n }\n\n function getClickPosition(event: MouseEvent, input: HTMLInputElement, useCaretPosition: boolean): number {\n const fallback = input.selectionStart ?? 0;\n if (!useCaretPosition)\n return fallback;\n const caretPos = document.caretPositionFromPoint?.(event.clientX, event.clientY);\n if (caretPos)\n return caretPos.offset;\n return document.caretRangeFromPoint?.(event.clientX, event.clientY)?.startOffset ?? fallback;\n }\n\n function handleClick(event: MouseEvent): void {\n if (disabled || readonly || !(event.target instanceof HTMLInputElement))\n return;\n const currentSegment = getCurrentSegment(getClickPosition(event, event.target, true));\n if (currentSegment) {\n set(cursorPosition, currentSegment.end);\n event.target.setSelectionRange(currentSegment.start, currentSegment.end);\n }\n }\n\n function handleInputSelection(event: Event): void {\n const target = event.target as HTMLInputElement;\n set(cursorPosition, target.selectionStart ?? 0);\n }\n\n function handleFocus(): void {\n // Only select first segment if no text is currently selected in the input\n const input = get(textInput);\n if (input && input.selectionStart !== input.selectionEnd)\n return;\n const firstSegment = get(segmentPositions)[0];\n if (firstSegment)\n setCursorPosition(firstSegment);\n }\n\n function parseAndSetDateValues(pastedText: string) {\n try {\n const parsedDate = dayjs(pastedText, get(dateFormat));\n\n if (!parsedDate.isValid()) {\n return;\n }\n\n const date = parsedDate.toDate();\n setValue('YYYY', date.getFullYear());\n setValue('MM', date.getMonth() + 1);\n setValue('DD', date.getDate());\n setValue('HH', date.getHours());\n setValue('mm', date.getMinutes());\n if (includeSeconds(accuracy)) {\n setValue('ss', date.getSeconds());\n }\n if (includeMilliseconds(accuracy)) {\n setValue('SSS', date.getMilliseconds());\n }\n }\n catch {\n // Invalid format, ignore paste\n }\n }\n\n function handlePaste(event: ClipboardEvent): void {\n if (disabled || readonly)\n return;\n\n if (!(event.target instanceof HTMLInputElement)) {\n return;\n }\n\n event.preventDefault();\n\n const pastedText = event.clipboardData?.getData('text');\n if (!pastedText) {\n return;\n }\n parseAndSetDateValues(pastedText);\n }\n\n function handleInput(event: Event): void {\n if (disabled || readonly)\n return;\n\n if (!(event.target instanceof HTMLInputElement)) {\n return;\n }\n\n const inputText = event.target.value;\n if (!inputText) {\n return;\n }\n\n parseAndSetDateValues(inputText);\n }\n\n return {\n clear,\n getCurrentSegment,\n handleClick,\n handleFocus,\n handleInput,\n handleInputSelection,\n handleKeyDown,\n handlePaste,\n setSegment,\n };\n}\n"],"names":[],"mappings":";;;;;;;AA0BO,SAAS,mBAAmB,SAAiC;AAClE,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,IACE;AAEJ,QAAM,iBAAiB,SAAmB,MAAM;AAC9C,UAAM,SAAS,IAAI,UAAU;AAC7B,WAAO,OAAO,MAAM,YAAY,EAAE,OAAO,OAAO;AAAA,EAClD,CAAC;AAED,QAAM,mBAAmB,SAAoB,MAAM;AACjD,UAAM,WAAW,IAAI,cAAc;AACnC,UAAM,YAAuB,CAAA;AAC7B,QAAI,kBAAkB;AAEtB,aAAS,QAAQ,CAAC,YAAY;AAC5B,UAAI,CAAC,UAAU,KAAK,OAAO,GAAG;AAC5B,eAAO,sBAAsB,OAAO,GAAG,gCAAgC,OAAO,EAAE;AAChF,kBAAU,KAAK;AAAA,UACb,KAAK,kBAAkB,QAAQ;AAAA,UAC/B,OAAO;AAAA,UACP,MAAM;AAAA,QAAA,CACP;AAAA,MACH;AACA,yBAAmB,QAAQ;AAAA,IAC7B,CAAC;AAED,WAAO;AAAA,EACT,CAAC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AAE,MAAM,kBAAkB,mBAAmB;AAC/C;AAAA,IACF;AAEA,UAAM,YAAY,MAAM,OAAO;AAC/B,QAAI,CAAC,WAAW;AACd;AAAA,IACF;AAEA,0BAAsB,SAAS;AAAA,EACjC;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA;AAEJ;"}
1
+ {"version":3,"file":"use-keyboard-handler.js","sources":["../../../src/components/date-time-picker/use-keyboard-handler.ts"],"sourcesContent":["import type { Ref } from 'vue';\nimport type { TimeAccuracy } from '@/consts/time-accuracy';\nimport dayjs, { type Dayjs } from 'dayjs';\nimport { type DateTimeSegmentType, isDateTimeSegmentType } from '@/components/date-time-picker/types';\nimport { includeMilliseconds, includeSeconds } from '@/components/date-time-picker/utils';\nimport { assert } from '@/utils/assert';\n\ninterface Segment { start: number; end: number; type: DateTimeSegmentType }\n\ntype SegmentMethod = 'date' | 'hour' | 'month' | 'minute' | 'second' | 'millisecond' | 'year';\nconst SEGMENT_METHODS: Record<DateTimeSegmentType, SegmentMethod> = {\n DD: 'date',\n HH: 'hour',\n MM: 'month',\n SSS: 'millisecond',\n YYYY: 'year',\n mm: 'minute',\n ss: 'second',\n};\n\ninterface SegmentBounds { maxValue: number; minValue?: number }\nconst SEGMENT_CONFIG: Record<DateTimeSegmentType, SegmentBounds> = {\n DD: { maxValue: 31, minValue: 1 },\n HH: { maxValue: 23, minValue: 0 },\n MM: { maxValue: 12, minValue: 1 },\n SSS: { maxValue: 999, minValue: 0 },\n YYYY: { maxValue: 9999, minValue: 1 },\n mm: { maxValue: 59, minValue: 0 },\n ss: { maxValue: 59, minValue: 0 },\n};\n\ninterface KeyboardHandlerOptions {\n dateFormat: Ref<string>;\n cursorPosition: Ref<number>;\n currentValue: Ref<number | undefined>;\n textInput: Ref<HTMLInputElement | undefined>;\n setValue: (segment: DateTimeSegmentType, value?: number) => void;\n getCurrent: (segment: DateTimeSegmentType) => number | undefined;\n getDateTime: () => Dayjs;\n disabled: boolean;\n readonly: boolean;\n accuracy: TimeAccuracy;\n}\n\nexport function useKeyboardHandler(options: KeyboardHandlerOptions) {\n const {\n accuracy,\n currentValue,\n cursorPosition,\n dateFormat,\n disabled,\n getCurrent,\n getDateTime,\n readonly,\n setValue,\n textInput,\n } = options;\n\n const formatSegments = computed<string[]>(() => {\n const format = get(dateFormat);\n return format.split(/([\\s./:])/g).filter(Boolean);\n });\n\n const segmentPositions = computed<Segment[]>(() => {\n const segments = get(formatSegments);\n const positions: Segment[] = [];\n let currentPosition = 0;\n\n segments.forEach((segment) => {\n if (!/[\\s./:]/.test(segment)) {\n assert(isDateTimeSegmentType(segment), `Invalid date format segment: ${segment}`);\n positions.push({\n end: currentPosition + segment.length,\n start: currentPosition,\n type: segment,\n });\n }\n currentPosition += segment.length;\n });\n\n return positions;\n });\n\n function getCurrentSegment(position: number = get(cursorPosition)) {\n const segments = get(segmentPositions);\n return segments.find(\n segment => position >= segment.start && position <= segment.end,\n );\n }\n\n function setCursorPosition(segment: Segment): void {\n set(cursorPosition, segment.end);\n\n nextTick(() => {\n if (isDefined(textInput)) {\n const input = get(textInput);\n input.setSelectionRange(segment.start, segment.end);\n input.focus();\n }\n });\n }\n\n function setSegment(segmentType: DateTimeSegmentType): void {\n const segments = get(segmentPositions).find(segment => segment.type === segmentType);\n if (segments) {\n setCursorPosition(segments);\n }\n }\n\n function clear(segmentType?: string): void {\n const currentSegment = getCurrentSegment();\n if (!segmentType && !currentSegment) {\n return;\n }\n\n const typeToUse = segmentType ?? currentSegment?.type;\n if (!typeToUse) {\n return;\n }\n\n setValue(typeToUse as DateTimeSegmentType, undefined);\n\n if (currentSegment) {\n setCursorPosition(currentSegment);\n }\n }\n\n function changeSegmentValue(increment: boolean): void {\n if (!isDefined(textInput))\n return;\n const currentSegment = getCurrentSegment();\n if (!currentSegment)\n return;\n const segmentType = currentSegment.type;\n const method = SEGMENT_METHODS[segmentType];\n const selectedDate = getDateTime();\n const updatedDate = selectedDate.set(method, selectedDate.get(method) + (increment ? 1 : -1));\n if (updatedDate.year() >= 1970) {\n setValue(segmentType, segmentType === 'MM' ? updatedDate.get(method) + 1 : updatedDate.get(method));\n setCursorPosition(currentSegment);\n }\n }\n\n function navigateSegments(key: string) {\n const position = get(cursorPosition);\n const positions = get(segmentPositions);\n const currentSegmentIndex = positions.findIndex(\n segment => position >= segment.start && position <= segment.end,\n );\n\n if (currentSegmentIndex === -1) {\n return;\n }\n\n set(currentValue, undefined);\n\n let nextSegmentIndex: number;\n if (key === 'ArrowRight') {\n nextSegmentIndex = currentSegmentIndex + 1;\n if (nextSegmentIndex < positions.length) {\n const nextSegment = positions[nextSegmentIndex];\n assert(nextSegment);\n setCursorPosition(nextSegment);\n }\n }\n else {\n nextSegmentIndex = currentSegmentIndex - 1;\n if (nextSegmentIndex >= 0) {\n const nextSegment = positions[nextSegmentIndex];\n assert(nextSegment);\n setCursorPosition(nextSegment);\n }\n }\n }\n\n function handleDigitPressed(event: KeyboardEvent, digit: string): void {\n if (!(event.target instanceof HTMLInputElement))\n return;\n const position = event.target.selectionStart ?? 0;\n const currentSegment = getCurrentSegment(position);\n if (!currentSegment || isNaN(parseInt(digit)))\n return;\n const segmentType = currentSegment.type;\n if (!isDateTimeSegmentType(segmentType))\n return;\n\n const config = SEGMENT_CONFIG[segmentType];\n const value = get(currentValue) ?? '';\n const combinedStr = `${value}${digit}`;\n const combinedValue = parseInt(combinedStr);\n const maxLength = segmentType.length;\n const minValue = config.minValue ?? 0;\n\n if (combinedValue >= minValue && combinedValue <= config.maxValue) {\n setValue(segmentType, combinedValue);\n setCursorPosition(currentSegment);\n }\n else if (combinedValue < minValue && combinedStr.length < maxLength) {\n // Track digit even if below minValue, so next digit can combine (e.g., \"0\" allows \"01\")\n set(currentValue, combinedValue);\n }\n\n const willExceedMax = parseInt(`${combinedStr}0`) > config.maxValue;\n // Use string length of typed digits, not parsed number length (e.g., \"01\" has length 2)\n if (willExceedMax || combinedStr.length >= maxLength)\n navigateSegments('ArrowRight');\n }\n\n function handleKeyboardNavigation(event: KeyboardEvent): void {\n if (event.key === 'ArrowUp')\n changeSegmentValue(true);\n else if (event.key === 'ArrowDown')\n changeSegmentValue(false);\n }\n\n function handleBackspace(event: KeyboardEvent): void {\n if (!(event.target instanceof HTMLInputElement))\n return;\n const currentSegment = getCurrentSegment(event.target.selectionStart ?? 0);\n if (!currentSegment)\n return;\n const value = get(currentValue) ?? getCurrent(currentSegment.type) ?? '';\n const updatedValue = value.toString().slice(0, -1);\n setValue(currentSegment.type, updatedValue.length === 0 ? undefined : parseInt(updatedValue));\n setCursorPosition(currentSegment);\n }\n\n function onInputDeletePressed(event: KeyboardEvent): void {\n if (!(event.target instanceof HTMLInputElement))\n return;\n const segment = getCurrentSegment(event.target.selectionStart ?? 0);\n if (segment) {\n clear(segment.type);\n setCursorPosition(segment);\n }\n }\n\n function handleKeyDown(event: KeyboardEvent): void {\n if (disabled || readonly)\n return;\n const { key } = event;\n if (key === 'Tab')\n return;\n event.preventDefault();\n if (key === 'ArrowRight' || key === 'ArrowLeft')\n navigateSegments(key);\n else if (key === 'ArrowUp' || key === 'ArrowDown')\n handleKeyboardNavigation(event);\n else if (key === 'Backspace')\n handleBackspace(event);\n else if (key === 'Delete')\n onInputDeletePressed(event);\n else if (/^\\d$/.test(key))\n handleDigitPressed(event, key);\n }\n\n function getClickPosition(event: MouseEvent, input: HTMLInputElement, useCaretPosition: boolean): number {\n const fallback = input.selectionStart ?? 0;\n if (!useCaretPosition)\n return fallback;\n const caretPos = document.caretPositionFromPoint?.(event.clientX, event.clientY);\n if (caretPos)\n return caretPos.offset;\n return document.caretRangeFromPoint?.(event.clientX, event.clientY)?.startOffset ?? fallback;\n }\n\n // Track the segment that was clicked, so handleFocus can restore it after DOM updates\n let clickedSegment: Segment | undefined;\n\n // Capture clicked segment on mousedown (fires before focus event)\n function handleMouseDown(event: MouseEvent): void {\n if (disabled || readonly || !(event.target instanceof HTMLInputElement))\n return;\n const currentSegment = getCurrentSegment(getClickPosition(event, event.target, true));\n if (currentSegment) {\n clickedSegment = currentSegment;\n }\n }\n\n function handleClick(event: MouseEvent): void {\n if (disabled || readonly || !(event.target instanceof HTMLInputElement))\n return;\n const currentSegment = getCurrentSegment(getClickPosition(event, event.target, true));\n if (currentSegment) {\n clickedSegment = currentSegment;\n set(cursorPosition, currentSegment.end);\n event.target.setSelectionRange(currentSegment.start, currentSegment.end);\n }\n }\n\n function handleInputSelection(event: Event): void {\n const target = event.target as HTMLInputElement;\n set(cursorPosition, target.selectionStart ?? 0);\n }\n\n function handleFocus(): void {\n // If we just clicked on a segment, restore that selection\n // (the selection may have been lost due to menu opening/DOM updates)\n if (clickedSegment) {\n setCursorPosition(clickedSegment);\n clickedSegment = undefined;\n return;\n }\n\n // Only select first segment if no text is currently selected in the input\n const input = get(textInput);\n if (input && input.selectionStart !== input.selectionEnd)\n return;\n const firstSegment = get(segmentPositions)[0];\n if (firstSegment)\n setCursorPosition(firstSegment);\n }\n\n function handleBlur(): void {\n // Reset cursor position and clicked segment when input loses focus\n // This prevents \"blinking\" when re-focusing on a different segment\n set(cursorPosition, 0);\n set(currentValue, undefined);\n clickedSegment = undefined;\n }\n\n function parseAndSetDateValues(pastedText: string) {\n try {\n const parsedDate = dayjs(pastedText, get(dateFormat));\n\n if (!parsedDate.isValid()) {\n return;\n }\n\n const date = parsedDate.toDate();\n setValue('YYYY', date.getFullYear());\n setValue('MM', date.getMonth() + 1);\n setValue('DD', date.getDate());\n setValue('HH', date.getHours());\n setValue('mm', date.getMinutes());\n if (includeSeconds(accuracy)) {\n setValue('ss', date.getSeconds());\n }\n if (includeMilliseconds(accuracy)) {\n setValue('SSS', date.getMilliseconds());\n }\n }\n catch {\n // Invalid format, ignore paste\n }\n }\n\n function handlePaste(event: ClipboardEvent): void {\n if (disabled || readonly)\n return;\n\n if (!(event.target instanceof HTMLInputElement)) {\n return;\n }\n\n event.preventDefault();\n\n const pastedText = event.clipboardData?.getData('text');\n if (!pastedText) {\n return;\n }\n parseAndSetDateValues(pastedText);\n }\n\n function handleInput(event: Event): void {\n if (disabled || readonly)\n return;\n\n if (!(event.target instanceof HTMLInputElement)) {\n return;\n }\n\n const inputText = event.target.value;\n if (!inputText) {\n return;\n }\n\n parseAndSetDateValues(inputText);\n }\n\n return {\n clear,\n getCurrentSegment,\n handleBlur,\n handleClick,\n handleFocus,\n handleInput,\n handleInputSelection,\n handleKeyDown,\n handleMouseDown,\n handlePaste,\n setSegment,\n };\n}\n"],"names":[],"mappings":";;;;;;;AAUA,MAAM,kBAA8D;AAAA,EAClE,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,KAAK;AAAA,EACL,MAAM;AAAA,EACN,IAAI;AAAA,EACJ,IAAI;AACN;AAGA,MAAM,iBAA6D;AAAA,EACjE,IAAI,EAAE,UAAU,IAAI,UAAU,EAAA;AAAA,EAC9B,IAAI,EAAE,UAAU,IAAI,UAAU,EAAA;AAAA,EAC9B,IAAI,EAAE,UAAU,IAAI,UAAU,EAAA;AAAA,EAC9B,KAAK,EAAE,UAAU,KAAK,UAAU,EAAA;AAAA,EAChC,MAAM,EAAE,UAAU,MAAM,UAAU,EAAA;AAAA,EAClC,IAAI,EAAE,UAAU,IAAI,UAAU,EAAA;AAAA,EAC9B,IAAI,EAAE,UAAU,IAAI,UAAU,EAAA;AAChC;AAeO,SAAS,mBAAmB,SAAiC;AAClE,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,IACE;AAEJ,QAAM,iBAAiB,SAAmB,MAAM;AAC9C,UAAM,SAAS,IAAI,UAAU;AAC7B,WAAO,OAAO,MAAM,YAAY,EAAE,OAAO,OAAO;AAAA,EAClD,CAAC;AAED,QAAM,mBAAmB,SAAoB,MAAM;AACjD,UAAM,WA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,IACF;AAEA,UAAM,YAAY,MAAM,OAAO;AAC/B,QAAI,CAAC,WAAW;AACd;AAAA,IACF;AAEA,0BAAsB,SAAS;AAAA,EACjC;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA;AAEJ;"}
@@ -36,14 +36,16 @@ export interface AutoCompleteProps<TValue, TItem> {
36
36
  hideCustomValue?: boolean;
37
37
  required?: boolean;
38
38
  }
39
- declare const __VLS_export: <TValue, TItem>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
40
- props: __VLS_PrettifyLocal<(AutoCompleteProps<TValue, TItem> & {
39
+ declare const __VLS_export: <TValue, TItem>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
40
+ props: import("vue").PublicProps & __VLS_PrettifyLocal<(AutoCompleteProps<TValue, TItem> & {
41
41
  modelValue: AutoCompleteModelValue<TValue>;
42
42
  searchInput?: string;
43
43
  }) & {
44
44
  "onUpdate:modelValue"?: ((value: AutoCompleteModelValue<TValue>) => any) | undefined;
45
45
  "onUpdate:searchInput"?: ((value: string) => any) | undefined;
46
- }> & import("vue").PublicProps;
46
+ }> & (typeof globalThis extends {
47
+ __VLS_PROPS_FALLBACK: infer P;
48
+ } ? P : {});
47
49
  expose: (exposed: import("vue").ShallowUnwrapRef<{
48
50
  focus: () => Promise<void>;
49
51
  setSelectionRange: (start: number, end: number) => void;
@@ -51,7 +53,7 @@ declare const __VLS_export: <TValue, TItem>(__VLS_props: NonNullable<Awaited<typ
51
53
  attrs: any;
52
54
  slots: {
53
55
  activator?: (props: {
54
- disabled: import("@vue/reactivity").DistributeRef<[(Readonly<{
56
+ disabled: boolean & import("@vue/reactivity").DistributeRef<[(Readonly<{
55
57
  labelClass: string;
56
58
  menuClass: string;
57
59
  itemClass: string;
@@ -86,7 +88,7 @@ declare const __VLS_export: <TValue, TItem>(__VLS_props: NonNullable<Awaited<typ
86
88
  readonly customValue: boolean;
87
89
  readonly hideCustomValue: boolean;
88
90
  readonly required: boolean;
89
- } & ("disabled" | "returnObject" | "autoSelectFirst" | "dense" | "hideSelected" | "loading" | "required" | "hideDetails" | "clearable" | "readOnly" | "chips" | "noFilter" | "hideNoData" | "customValue" | "hideCustomValue" | ([KeyOfType<TItem, TValue extends (infer U)[] ? U : TValue> | undefined] extends [boolean | undefined] ? "keyAttr" : never) | ([keyof TItem | undefined] extends [boolean | undefined] ? "textAttr" : never) extends infer T extends keyof T_1 ? { readonly [K in T]-?: K extends "options" | "label" | "disabled" | "keyAttr" | "returnObject" | "textAttr" | "appendWidth" | "autoSelectFirst" | "dense" | "hideSelected" | "itemHeight" | "prependWidth" | "variant" | "loading" | "placeholder" | "errorMessages" | "successMessages" | "hint" | "required" | "hideDetails" | "clearable" | "readOnly" | "menuOptions" | "chips" | "noFilter" | "hideNoData" | "noDataText" | "customValue" | "hideCustomValue" ? {
91
+ } & ("disabled" | "returnObject" | "autoSelectFirst" | "dense" | "hideSelected" | "loading" | "required" | "hideDetails" | "clearable" | "readOnly" | "chips" | "noFilter" | "hideNoData" | "customValue" | "hideCustomValue" | (KeyOfType<TItem, TValue extends (infer U)[] ? U : TValue> | undefined extends boolean | undefined ? (boolean & KeyOfType<TItem, TValue extends (infer U)[] ? U : TValue>) | undefined extends undefined ? never : "keyAttr" : never) | (keyof TItem | undefined extends boolean | undefined ? (boolean & keyof TItem) | undefined extends undefined ? never : "textAttr" : never) extends infer T extends keyof T_1 ? { readonly [K in T]-?: K extends "options" | "label" | "disabled" | "keyAttr" | "returnObject" | "textAttr" | "appendWidth" | "autoSelectFirst" | "dense" | "hideSelected" | "itemHeight" | "prependWidth" | "variant" | "loading" | "errorMessages" | "successMessages" | "hint" | "required" | "hideDetails" | "placeholder" | "clearable" | "readOnly" | "menuOptions" | "chips" | "noFilter" | "hideNoData" | "noDataText" | "customValue" | "hideCustomValue" ? {
90
92
  options: () => never[];
91
93
  disabled: false;
92
94
  loading: false;
@@ -151,7 +153,7 @@ declare const __VLS_export: <TValue, TItem>(__VLS_props: NonNullable<Awaited<typ
151
153
  readonly customValue: boolean;
152
154
  readonly hideCustomValue: boolean;
153
155
  readonly required: boolean;
154
- } & ("disabled" | "returnObject" | "autoSelectFirst" | "dense" | "hideSelected" | "loading" | "required" | "hideDetails" | "clearable" | "readOnly" | "chips" | "noFilter" | "hideNoData" | "customValue" | "hideCustomValue" | ([KeyOfType<TItem, TValue extends (infer U)[] ? U : TValue> | undefined] extends [boolean | undefined] ? "keyAttr" : never) | ([keyof TItem | undefined] extends [boolean | undefined] ? "textAttr" : never) extends infer T_2 extends keyof T_1 ? { readonly [K in T_2]-?: K extends "options" | "label" | "disabled" | "keyAttr" | "returnObject" | "textAttr" | "appendWidth" | "autoSelectFirst" | "dense" | "hideSelected" | "itemHeight" | "prependWidth" | "variant" | "loading" | "placeholder" | "errorMessages" | "successMessages" | "hint" | "required" | "hideDetails" | "clearable" | "readOnly" | "menuOptions" | "chips" | "noFilter" | "hideNoData" | "noDataText" | "customValue" | "hideCustomValue" ? {
156
+ } & ("disabled" | "returnObject" | "autoSelectFirst" | "dense" | "hideSelected" | "loading" | "required" | "hideDetails" | "clearable" | "readOnly" | "chips" | "noFilter" | "hideNoData" | "customValue" | "hideCustomValue" | (KeyOfType<TItem, TValue extends (infer U)[] ? U : TValue> | undefined extends boolean | undefined ? (boolean & KeyOfType<TItem, TValue extends (infer U)[] ? U : TValue>) | undefined extends undefined ? never : "keyAttr" : never) | (keyof TItem | undefined extends boolean | undefined ? (boolean & keyof TItem) | undefined extends undefined ? never : "textAttr" : never) extends infer T_2 extends keyof T_1 ? { readonly [K in T_2]-?: K extends "options" | "label" | "disabled" | "keyAttr" | "returnObject" | "textAttr" | "appendWidth" | "autoSelectFirst" | "dense" | "hideSelected" | "itemHeight" | "prependWidth" | "variant" | "loading" | "errorMessages" | "successMessages" | "hint" | "required" | "hideDetails" | "placeholder" | "clearable" | "readOnly" | "menuOptions" | "chips" | "noFilter" | "hideNoData" | "noDataText" | "customValue" | "hideCustomValue" ? {
155
157
  options: () => never[];
156
158
  disabled: false;
157
159
  loading: false;
@@ -216,7 +218,7 @@ declare const __VLS_export: <TValue, TItem>(__VLS_props: NonNullable<Awaited<typ
216
218
  readonly customValue: boolean;
217
219
  readonly hideCustomValue: boolean;
218
220
  readonly required: boolean;
219
- } & ("disabled" | "returnObject" | "autoSelectFirst" | "dense" | "hideSelected" | "loading" | "required" | "hideDetails" | "clearable" | "readOnly" | "chips" | "noFilter" | "hideNoData" | "customValue" | "hideCustomValue" | ([KeyOfType<TItem, TValue extends (infer U)[] ? U : TValue> | undefined] extends [boolean | undefined] ? "keyAttr" : never) | ([keyof TItem | undefined] extends [boolean | undefined] ? "textAttr" : never) extends infer T_3 extends keyof T_1 ? { readonly [K in T_3]-?: K extends "options" | "label" | "disabled" | "keyAttr" | "returnObject" | "textAttr" | "appendWidth" | "autoSelectFirst" | "dense" | "hideSelected" | "itemHeight" | "prependWidth" | "variant" | "loading" | "placeholder" | "errorMessages" | "successMessages" | "hint" | "required" | "hideDetails" | "clearable" | "readOnly" | "menuOptions" | "chips" | "noFilter" | "hideNoData" | "noDataText" | "customValue" | "hideCustomValue" ? {
221
+ } & ("disabled" | "returnObject" | "autoSelectFirst" | "dense" | "hideSelected" | "loading" | "required" | "hideDetails" | "clearable" | "readOnly" | "chips" | "noFilter" | "hideNoData" | "customValue" | "hideCustomValue" | (KeyOfType<TItem, TValue extends (infer U)[] ? U : TValue> | undefined extends boolean | undefined ? (boolean & KeyOfType<TItem, TValue extends (infer U)[] ? U : TValue>) | undefined extends undefined ? never : "keyAttr" : never) | (keyof TItem | undefined extends boolean | undefined ? (boolean & keyof TItem) | undefined extends undefined ? never : "textAttr" : never) extends infer T_3 extends keyof T_1 ? { readonly [K in T_3]-?: K extends "options" | "label" | "disabled" | "keyAttr" | "returnObject" | "textAttr" | "appendWidth" | "autoSelectFirst" | "dense" | "hideSelected" | "itemHeight" | "prependWidth" | "variant" | "loading" | "errorMessages" | "successMessages" | "hint" | "required" | "hideDetails" | "placeholder" | "clearable" | "readOnly" | "menuOptions" | "chips" | "noFilter" | "hideNoData" | "noDataText" | "customValue" | "hideCustomValue" ? {
220
222
  options: () => never[];
221
223
  disabled: false;
222
224
  loading: false;
@@ -281,7 +283,7 @@ declare const __VLS_export: <TValue, TItem>(__VLS_props: NonNullable<Awaited<typ
281
283
  readonly customValue: boolean;
282
284
  readonly hideCustomValue: boolean;
283
285
  readonly required: boolean;
284
- } & ("disabled" | "returnObject" | "autoSelectFirst" | "dense" | "hideSelected" | "loading" | "required" | "hideDetails" | "clearable" | "readOnly" | "chips" | "noFilter" | "hideNoData" | "customValue" | "hideCustomValue" | ([KeyOfType<TItem, TValue extends (infer U)[] ? U : TValue> | undefined] extends [boolean | undefined] ? "keyAttr" : never) | ([keyof TItem | undefined] extends [boolean | undefined] ? "textAttr" : never) extends infer T_4 extends keyof T_1 ? { readonly [K in T_4]-?: K extends "options" | "label" | "disabled" | "keyAttr" | "returnObject" | "textAttr" | "appendWidth" | "autoSelectFirst" | "dense" | "hideSelected" | "itemHeight" | "prependWidth" | "variant" | "loading" | "placeholder" | "errorMessages" | "successMessages" | "hint" | "required" | "hideDetails" | "clearable" | "readOnly" | "menuOptions" | "chips" | "noFilter" | "hideNoData" | "noDataText" | "customValue" | "hideCustomValue" ? {
286
+ } & ("disabled" | "returnObject" | "autoSelectFirst" | "dense" | "hideSelected" | "loading" | "required" | "hideDetails" | "clearable" | "readOnly" | "chips" | "noFilter" | "hideNoData" | "customValue" | "hideCustomValue" | (KeyOfType<TItem, TValue extends (infer U)[] ? U : TValue> | undefined extends boolean | undefined ? (boolean & KeyOfType<TItem, TValue extends (infer U)[] ? U : TValue>) | undefined extends undefined ? never : "keyAttr" : never) | (keyof TItem | undefined extends boolean | undefined ? (boolean & keyof TItem) | undefined extends undefined ? never : "textAttr" : never) extends infer T_4 extends keyof T_1 ? { readonly [K in T_4]-?: K extends "options" | "label" | "disabled" | "keyAttr" | "returnObject" | "textAttr" | "appendWidth" | "autoSelectFirst" | "dense" | "hideSelected" | "itemHeight" | "prependWidth" | "variant" | "loading" | "errorMessages" | "successMessages" | "hint" | "required" | "hideDetails" | "placeholder" | "clearable" | "readOnly" | "menuOptions" | "chips" | "noFilter" | "hideNoData" | "noDataText" | "customValue" | "hideCustomValue" ? {
285
287
  options: () => never[];
286
288
  disabled: false;
287
289
  loading: false;
@@ -353,7 +355,7 @@ declare const __VLS_export: <TValue, TItem>(__VLS_props: NonNullable<Awaited<typ
353
355
  }) => any;
354
356
  } & {
355
357
  'item.prepend'?: (props: {
356
- disabled: import("@vue/reactivity").DistributeRef<[(Readonly<{
358
+ disabled: boolean & import("@vue/reactivity").DistributeRef<[(Readonly<{
357
359
  labelClass: string;
358
360
  menuClass: string;
359
361
  itemClass: string;
@@ -388,7 +390,7 @@ declare const __VLS_export: <TValue, TItem>(__VLS_props: NonNullable<Awaited<typ
388
390
  readonly customValue: boolean;
389
391
  readonly hideCustomValue: boolean;
390
392
  readonly required: boolean;
391
- } & ("disabled" | "returnObject" | "autoSelectFirst" | "dense" | "hideSelected" | "loading" | "required" | "hideDetails" | "clearable" | "readOnly" | "chips" | "noFilter" | "hideNoData" | "customValue" | "hideCustomValue" | ([KeyOfType<TItem, TValue extends (infer U)[] ? U : TValue> | undefined] extends [boolean | undefined] ? "keyAttr" : never) | ([keyof TItem | undefined] extends [boolean | undefined] ? "textAttr" : never) extends infer T extends keyof T_1 ? { readonly [K in T]-?: K extends "options" | "label" | "disabled" | "keyAttr" | "returnObject" | "textAttr" | "appendWidth" | "autoSelectFirst" | "dense" | "hideSelected" | "itemHeight" | "prependWidth" | "variant" | "loading" | "placeholder" | "errorMessages" | "successMessages" | "hint" | "required" | "hideDetails" | "clearable" | "readOnly" | "menuOptions" | "chips" | "noFilter" | "hideNoData" | "noDataText" | "customValue" | "hideCustomValue" ? {
393
+ } & ("disabled" | "returnObject" | "autoSelectFirst" | "dense" | "hideSelected" | "loading" | "required" | "hideDetails" | "clearable" | "readOnly" | "chips" | "noFilter" | "hideNoData" | "customValue" | "hideCustomValue" | (KeyOfType<TItem, TValue extends (infer U)[] ? U : TValue> | undefined extends boolean | undefined ? (boolean & KeyOfType<TItem, TValue extends (infer U)[] ? U : TValue>) | undefined extends undefined ? never : "keyAttr" : never) | (keyof TItem | undefined extends boolean | undefined ? (boolean & keyof TItem) | undefined extends undefined ? never : "textAttr" : never) extends infer T extends keyof T_1 ? { readonly [K in T]-?: K extends "options" | "label" | "disabled" | "keyAttr" | "returnObject" | "textAttr" | "appendWidth" | "autoSelectFirst" | "dense" | "hideSelected" | "itemHeight" | "prependWidth" | "variant" | "loading" | "errorMessages" | "successMessages" | "hint" | "required" | "hideDetails" | "placeholder" | "clearable" | "readOnly" | "menuOptions" | "chips" | "noFilter" | "hideNoData" | "noDataText" | "customValue" | "hideCustomValue" ? {
392
394
  options: () => never[];
393
395
  disabled: false;
394
396
  loading: false;
@@ -453,7 +455,7 @@ declare const __VLS_export: <TValue, TItem>(__VLS_props: NonNullable<Awaited<typ
453
455
  readonly customValue: boolean;
454
456
  readonly hideCustomValue: boolean;
455
457
  readonly required: boolean;
456
- } & ("disabled" | "returnObject" | "autoSelectFirst" | "dense" | "hideSelected" | "loading" | "required" | "hideDetails" | "clearable" | "readOnly" | "chips" | "noFilter" | "hideNoData" | "customValue" | "hideCustomValue" | ([KeyOfType<TItem, TValue extends (infer U)[] ? U : TValue> | undefined] extends [boolean | undefined] ? "keyAttr" : never) | ([keyof TItem | undefined] extends [boolean | undefined] ? "textAttr" : never) extends infer T_2 extends keyof T_1 ? { readonly [K in T_2]-?: K extends "options" | "label" | "disabled" | "keyAttr" | "returnObject" | "textAttr" | "appendWidth" | "autoSelectFirst" | "dense" | "hideSelected" | "itemHeight" | "prependWidth" | "variant" | "loading" | "placeholder" | "errorMessages" | "successMessages" | "hint" | "required" | "hideDetails" | "clearable" | "readOnly" | "menuOptions" | "chips" | "noFilter" | "hideNoData" | "noDataText" | "customValue" | "hideCustomValue" ? {
458
+ } & ("disabled" | "returnObject" | "autoSelectFirst" | "dense" | "hideSelected" | "loading" | "required" | "hideDetails" | "clearable" | "readOnly" | "chips" | "noFilter" | "hideNoData" | "customValue" | "hideCustomValue" | (KeyOfType<TItem, TValue extends (infer U)[] ? U : TValue> | undefined extends boolean | undefined ? (boolean & KeyOfType<TItem, TValue extends (infer U)[] ? U : TValue>) | undefined extends undefined ? never : "keyAttr" : never) | (keyof TItem | undefined extends boolean | undefined ? (boolean & keyof TItem) | undefined extends undefined ? never : "textAttr" : never) extends infer T_2 extends keyof T_1 ? { readonly [K in T_2]-?: K extends "options" | "label" | "disabled" | "keyAttr" | "returnObject" | "textAttr" | "appendWidth" | "autoSelectFirst" | "dense" | "hideSelected" | "itemHeight" | "prependWidth" | "variant" | "loading" | "errorMessages" | "successMessages" | "hint" | "required" | "hideDetails" | "placeholder" | "clearable" | "readOnly" | "menuOptions" | "chips" | "noFilter" | "hideNoData" | "noDataText" | "customValue" | "hideCustomValue" ? {
457
459
  options: () => never[];
458
460
  disabled: false;
459
461
  loading: false;
@@ -518,7 +520,7 @@ declare const __VLS_export: <TValue, TItem>(__VLS_props: NonNullable<Awaited<typ
518
520
  readonly customValue: boolean;
519
521
  readonly hideCustomValue: boolean;
520
522
  readonly required: boolean;
521
- } & ("disabled" | "returnObject" | "autoSelectFirst" | "dense" | "hideSelected" | "loading" | "required" | "hideDetails" | "clearable" | "readOnly" | "chips" | "noFilter" | "hideNoData" | "customValue" | "hideCustomValue" | ([KeyOfType<TItem, TValue extends (infer U)[] ? U : TValue> | undefined] extends [boolean | undefined] ? "keyAttr" : never) | ([keyof TItem | undefined] extends [boolean | undefined] ? "textAttr" : never) extends infer T_3 extends keyof T_1 ? { readonly [K in T_3]-?: K extends "options" | "label" | "disabled" | "keyAttr" | "returnObject" | "textAttr" | "appendWidth" | "autoSelectFirst" | "dense" | "hideSelected" | "itemHeight" | "prependWidth" | "variant" | "loading" | "placeholder" | "errorMessages" | "successMessages" | "hint" | "required" | "hideDetails" | "clearable" | "readOnly" | "menuOptions" | "chips" | "noFilter" | "hideNoData" | "noDataText" | "customValue" | "hideCustomValue" ? {
523
+ } & ("disabled" | "returnObject" | "autoSelectFirst" | "dense" | "hideSelected" | "loading" | "required" | "hideDetails" | "clearable" | "readOnly" | "chips" | "noFilter" | "hideNoData" | "customValue" | "hideCustomValue" | (KeyOfType<TItem, TValue extends (infer U)[] ? U : TValue> | undefined extends boolean | undefined ? (boolean & KeyOfType<TItem, TValue extends (infer U)[] ? U : TValue>) | undefined extends undefined ? never : "keyAttr" : never) | (keyof TItem | undefined extends boolean | undefined ? (boolean & keyof TItem) | undefined extends undefined ? never : "textAttr" : never) extends infer T_3 extends keyof T_1 ? { readonly [K in T_3]-?: K extends "options" | "label" | "disabled" | "keyAttr" | "returnObject" | "textAttr" | "appendWidth" | "autoSelectFirst" | "dense" | "hideSelected" | "itemHeight" | "prependWidth" | "variant" | "loading" | "errorMessages" | "successMessages" | "hint" | "required" | "hideDetails" | "placeholder" | "clearable" | "readOnly" | "menuOptions" | "chips" | "noFilter" | "hideNoData" | "noDataText" | "customValue" | "hideCustomValue" ? {
522
524
  options: () => never[];
523
525
  disabled: false;
524
526
  loading: false;
@@ -583,7 +585,7 @@ declare const __VLS_export: <TValue, TItem>(__VLS_props: NonNullable<Awaited<typ
583
585
  readonly customValue: boolean;
584
586
  readonly hideCustomValue: boolean;
585
587
  readonly required: boolean;
586
- } & ("disabled" | "returnObject" | "autoSelectFirst" | "dense" | "hideSelected" | "loading" | "required" | "hideDetails" | "clearable" | "readOnly" | "chips" | "noFilter" | "hideNoData" | "customValue" | "hideCustomValue" | ([KeyOfType<TItem, TValue extends (infer U)[] ? U : TValue> | undefined] extends [boolean | undefined] ? "keyAttr" : never) | ([keyof TItem | undefined] extends [boolean | undefined] ? "textAttr" : never) extends infer T_4 extends keyof T_1 ? { readonly [K in T_4]-?: K extends "options" | "label" | "disabled" | "keyAttr" | "returnObject" | "textAttr" | "appendWidth" | "autoSelectFirst" | "dense" | "hideSelected" | "itemHeight" | "prependWidth" | "variant" | "loading" | "placeholder" | "errorMessages" | "successMessages" | "hint" | "required" | "hideDetails" | "clearable" | "readOnly" | "menuOptions" | "chips" | "noFilter" | "hideNoData" | "noDataText" | "customValue" | "hideCustomValue" ? {
588
+ } & ("disabled" | "returnObject" | "autoSelectFirst" | "dense" | "hideSelected" | "loading" | "required" | "hideDetails" | "clearable" | "readOnly" | "chips" | "noFilter" | "hideNoData" | "customValue" | "hideCustomValue" | (KeyOfType<TItem, TValue extends (infer U)[] ? U : TValue> | undefined extends boolean | undefined ? (boolean & KeyOfType<TItem, TValue extends (infer U)[] ? U : TValue>) | undefined extends undefined ? never : "keyAttr" : never) | (keyof TItem | undefined extends boolean | undefined ? (boolean & keyof TItem) | undefined extends undefined ? never : "textAttr" : never) extends infer T_4 extends keyof T_1 ? { readonly [K in T_4]-?: K extends "options" | "label" | "disabled" | "keyAttr" | "returnObject" | "textAttr" | "appendWidth" | "autoSelectFirst" | "dense" | "hideSelected" | "itemHeight" | "prependWidth" | "variant" | "loading" | "errorMessages" | "successMessages" | "hint" | "required" | "hideDetails" | "placeholder" | "clearable" | "readOnly" | "menuOptions" | "chips" | "noFilter" | "hideNoData" | "noDataText" | "customValue" | "hideCustomValue" ? {
587
589
  options: () => never[];
588
590
  disabled: false;
589
591
  loading: false;
@@ -619,7 +621,7 @@ declare const __VLS_export: <TValue, TItem>(__VLS_props: NonNullable<Awaited<typ
619
621
  }) => any;
620
622
  } & {
621
623
  item?: (props: {
622
- disabled: import("@vue/reactivity").DistributeRef<[(Readonly<{
624
+ disabled: boolean & import("@vue/reactivity").DistributeRef<[(Readonly<{
623
625
  labelClass: string;
624
626
  menuClass: string;
625
627
  itemClass: string;
@@ -654,7 +656,7 @@ declare const __VLS_export: <TValue, TItem>(__VLS_props: NonNullable<Awaited<typ
654
656
  readonly customValue: boolean;
655
657
  readonly hideCustomValue: boolean;
656
658
  readonly required: boolean;
657
- } & ("disabled" | "returnObject" | "autoSelectFirst" | "dense" | "hideSelected" | "loading" | "required" | "hideDetails" | "clearable" | "readOnly" | "chips" | "noFilter" | "hideNoData" | "customValue" | "hideCustomValue" | ([KeyOfType<TItem, TValue extends (infer U)[] ? U : TValue> | undefined] extends [boolean | undefined] ? "keyAttr" : never) | ([keyof TItem | undefined] extends [boolean | undefined] ? "textAttr" : never) extends infer T extends keyof T_1 ? { readonly [K in T]-?: K extends "options" | "label" | "disabled" | "keyAttr" | "returnObject" | "textAttr" | "appendWidth" | "autoSelectFirst" | "dense" | "hideSelected" | "itemHeight" | "prependWidth" | "variant" | "loading" | "placeholder" | "errorMessages" | "successMessages" | "hint" | "required" | "hideDetails" | "clearable" | "readOnly" | "menuOptions" | "chips" | "noFilter" | "hideNoData" | "noDataText" | "customValue" | "hideCustomValue" ? {
659
+ } & ("disabled" | "returnObject" | "autoSelectFirst" | "dense" | "hideSelected" | "loading" | "required" | "hideDetails" | "clearable" | "readOnly" | "chips" | "noFilter" | "hideNoData" | "customValue" | "hideCustomValue" | (KeyOfType<TItem, TValue extends (infer U)[] ? U : TValue> | undefined extends boolean | undefined ? (boolean & KeyOfType<TItem, TValue extends (infer U)[] ? U : TValue>) | undefined extends undefined ? never : "keyAttr" : never) | (keyof TItem | undefined extends boolean | undefined ? (boolean & keyof TItem) | undefined extends undefined ? never : "textAttr" : never) extends infer T extends keyof T_1 ? { readonly [K in T]-?: K extends "options" | "label" | "disabled" | "keyAttr" | "returnObject" | "textAttr" | "appendWidth" | "autoSelectFirst" | "dense" | "hideSelected" | "itemHeight" | "prependWidth" | "variant" | "loading" | "errorMessages" | "successMessages" | "hint" | "required" | "hideDetails" | "placeholder" | "clearable" | "readOnly" | "menuOptions" | "chips" | "noFilter" | "hideNoData" | "noDataText" | "customValue" | "hideCustomValue" ? {
658
660
  options: () => never[];
659
661
  disabled: false;
660
662
  loading: false;
@@ -719,7 +721,7 @@ declare const __VLS_export: <TValue, TItem>(__VLS_props: NonNullable<Awaited<typ
719
721
  readonly customValue: boolean;
720
722
  readonly hideCustomValue: boolean;
721
723
  readonly required: boolean;
722
- } & ("disabled" | "returnObject" | "autoSelectFirst" | "dense" | "hideSelected" | "loading" | "required" | "hideDetails" | "clearable" | "readOnly" | "chips" | "noFilter" | "hideNoData" | "customValue" | "hideCustomValue" | ([KeyOfType<TItem, TValue extends (infer U)[] ? U : TValue> | undefined] extends [boolean | undefined] ? "keyAttr" : never) | ([keyof TItem | undefined] extends [boolean | undefined] ? "textAttr" : never) extends infer T_2 extends keyof T_1 ? { readonly [K in T_2]-?: K extends "options" | "label" | "disabled" | "keyAttr" | "returnObject" | "textAttr" | "appendWidth" | "autoSelectFirst" | "dense" | "hideSelected" | "itemHeight" | "prependWidth" | "variant" | "loading" | "placeholder" | "errorMessages" | "successMessages" | "hint" | "required" | "hideDetails" | "clearable" | "readOnly" | "menuOptions" | "chips" | "noFilter" | "hideNoData" | "noDataText" | "customValue" | "hideCustomValue" ? {
724
+ } & ("disabled" | "returnObject" | "autoSelectFirst" | "dense" | "hideSelected" | "loading" | "required" | "hideDetails" | "clearable" | "readOnly" | "chips" | "noFilter" | "hideNoData" | "customValue" | "hideCustomValue" | (KeyOfType<TItem, TValue extends (infer U)[] ? U : TValue> | undefined extends boolean | undefined ? (boolean & KeyOfType<TItem, TValue extends (infer U)[] ? U : TValue>) | undefined extends undefined ? never : "keyAttr" : never) | (keyof TItem | undefined extends boolean | undefined ? (boolean & keyof TItem) | undefined extends undefined ? never : "textAttr" : never) extends infer T_2 extends keyof T_1 ? { readonly [K in T_2]-?: K extends "options" | "label" | "disabled" | "keyAttr" | "returnObject" | "textAttr" | "appendWidth" | "autoSelectFirst" | "dense" | "hideSelected" | "itemHeight" | "prependWidth" | "variant" | "loading" | "errorMessages" | "successMessages" | "hint" | "required" | "hideDetails" | "placeholder" | "clearable" | "readOnly" | "menuOptions" | "chips" | "noFilter" | "hideNoData" | "noDataText" | "customValue" | "hideCustomValue" ? {
723
725
  options: () => never[];
724
726
  disabled: false;
725
727
  loading: false;
@@ -784,7 +786,7 @@ declare const __VLS_export: <TValue, TItem>(__VLS_props: NonNullable<Awaited<typ
784
786
  readonly customValue: boolean;
785
787
  readonly hideCustomValue: boolean;
786
788
  readonly required: boolean;
787
- } & ("disabled" | "returnObject" | "autoSelectFirst" | "dense" | "hideSelected" | "loading" | "required" | "hideDetails" | "clearable" | "readOnly" | "chips" | "noFilter" | "hideNoData" | "customValue" | "hideCustomValue" | ([KeyOfType<TItem, TValue extends (infer U)[] ? U : TValue> | undefined] extends [boolean | undefined] ? "keyAttr" : never) | ([keyof TItem | undefined] extends [boolean | undefined] ? "textAttr" : never) extends infer T_3 extends keyof T_1 ? { readonly [K in T_3]-?: K extends "options" | "label" | "disabled" | "keyAttr" | "returnObject" | "textAttr" | "appendWidth" | "autoSelectFirst" | "dense" | "hideSelected" | "itemHeight" | "prependWidth" | "variant" | "loading" | "placeholder" | "errorMessages" | "successMessages" | "hint" | "required" | "hideDetails" | "clearable" | "readOnly" | "menuOptions" | "chips" | "noFilter" | "hideNoData" | "noDataText" | "customValue" | "hideCustomValue" ? {
789
+ } & ("disabled" | "returnObject" | "autoSelectFirst" | "dense" | "hideSelected" | "loading" | "required" | "hideDetails" | "clearable" | "readOnly" | "chips" | "noFilter" | "hideNoData" | "customValue" | "hideCustomValue" | (KeyOfType<TItem, TValue extends (infer U)[] ? U : TValue> | undefined extends boolean | undefined ? (boolean & KeyOfType<TItem, TValue extends (infer U)[] ? U : TValue>) | undefined extends undefined ? never : "keyAttr" : never) | (keyof TItem | undefined extends boolean | undefined ? (boolean & keyof TItem) | undefined extends undefined ? never : "textAttr" : never) extends infer T_3 extends keyof T_1 ? { readonly [K in T_3]-?: K extends "options" | "label" | "disabled" | "keyAttr" | "returnObject" | "textAttr" | "appendWidth" | "autoSelectFirst" | "dense" | "hideSelected" | "itemHeight" | "prependWidth" | "variant" | "loading" | "errorMessages" | "successMessages" | "hint" | "required" | "hideDetails" | "placeholder" | "clearable" | "readOnly" | "menuOptions" | "chips" | "noFilter" | "hideNoData" | "noDataText" | "customValue" | "hideCustomValue" ? {
788
790
  options: () => never[];
789
791
  disabled: false;
790
792
  loading: false;
@@ -849,7 +851,7 @@ declare const __VLS_export: <TValue, TItem>(__VLS_props: NonNullable<Awaited<typ
849
851
  readonly customValue: boolean;
850
852
  readonly hideCustomValue: boolean;
851
853
  readonly required: boolean;
852
- } & ("disabled" | "returnObject" | "autoSelectFirst" | "dense" | "hideSelected" | "loading" | "required" | "hideDetails" | "clearable" | "readOnly" | "chips" | "noFilter" | "hideNoData" | "customValue" | "hideCustomValue" | ([KeyOfType<TItem, TValue extends (infer U)[] ? U : TValue> | undefined] extends [boolean | undefined] ? "keyAttr" : never) | ([keyof TItem | undefined] extends [boolean | undefined] ? "textAttr" : never) extends infer T_4 extends keyof T_1 ? { readonly [K in T_4]-?: K extends "options" | "label" | "disabled" | "keyAttr" | "returnObject" | "textAttr" | "appendWidth" | "autoSelectFirst" | "dense" | "hideSelected" | "itemHeight" | "prependWidth" | "variant" | "loading" | "placeholder" | "errorMessages" | "successMessages" | "hint" | "required" | "hideDetails" | "clearable" | "readOnly" | "menuOptions" | "chips" | "noFilter" | "hideNoData" | "noDataText" | "customValue" | "hideCustomValue" ? {
854
+ } & ("disabled" | "returnObject" | "autoSelectFirst" | "dense" | "hideSelected" | "loading" | "required" | "hideDetails" | "clearable" | "readOnly" | "chips" | "noFilter" | "hideNoData" | "customValue" | "hideCustomValue" | (KeyOfType<TItem, TValue extends (infer U)[] ? U : TValue> | undefined extends boolean | undefined ? (boolean & KeyOfType<TItem, TValue extends (infer U)[] ? U : TValue>) | undefined extends undefined ? never : "keyAttr" : never) | (keyof TItem | undefined extends boolean | undefined ? (boolean & keyof TItem) | undefined extends undefined ? never : "textAttr" : never) extends infer T_4 extends keyof T_1 ? { readonly [K in T_4]-?: K extends "options" | "label" | "disabled" | "keyAttr" | "returnObject" | "textAttr" | "appendWidth" | "autoSelectFirst" | "dense" | "hideSelected" | "itemHeight" | "prependWidth" | "variant" | "loading" | "errorMessages" | "successMessages" | "hint" | "required" | "hideDetails" | "placeholder" | "clearable" | "readOnly" | "menuOptions" | "chips" | "noFilter" | "hideNoData" | "noDataText" | "customValue" | "hideCustomValue" ? {
853
855
  options: () => never[];
854
856
  disabled: false;
855
857
  loading: false;
@@ -885,7 +887,7 @@ declare const __VLS_export: <TValue, TItem>(__VLS_props: NonNullable<Awaited<typ
885
887
  }) => any;
886
888
  } & {
887
889
  'item.append'?: (props: {
888
- disabled: import("@vue/reactivity").DistributeRef<[(Readonly<{
890
+ disabled: boolean & import("@vue/reactivity").DistributeRef<[(Readonly<{
889
891
  labelClass: string;
890
892
  menuClass: string;
891
893
  itemClass: string;
@@ -920,7 +922,7 @@ declare const __VLS_export: <TValue, TItem>(__VLS_props: NonNullable<Awaited<typ
920
922
  readonly customValue: boolean;
921
923
  readonly hideCustomValue: boolean;
922
924
  readonly required: boolean;
923
- } & ("disabled" | "returnObject" | "autoSelectFirst" | "dense" | "hideSelected" | "loading" | "required" | "hideDetails" | "clearable" | "readOnly" | "chips" | "noFilter" | "hideNoData" | "customValue" | "hideCustomValue" | ([KeyOfType<TItem, TValue extends (infer U)[] ? U : TValue> | undefined] extends [boolean | undefined] ? "keyAttr" : never) | ([keyof TItem | undefined] extends [boolean | undefined] ? "textAttr" : never) extends infer T extends keyof T_1 ? { readonly [K in T]-?: K extends "options" | "label" | "disabled" | "keyAttr" | "returnObject" | "textAttr" | "appendWidth" | "autoSelectFirst" | "dense" | "hideSelected" | "itemHeight" | "prependWidth" | "variant" | "loading" | "placeholder" | "errorMessages" | "successMessages" | "hint" | "required" | "hideDetails" | "clearable" | "readOnly" | "menuOptions" | "chips" | "noFilter" | "hideNoData" | "noDataText" | "customValue" | "hideCustomValue" ? {
925
+ } & ("disabled" | "returnObject" | "autoSelectFirst" | "dense" | "hideSelected" | "loading" | "required" | "hideDetails" | "clearable" | "readOnly" | "chips" | "noFilter" | "hideNoData" | "customValue" | "hideCustomValue" | (KeyOfType<TItem, TValue extends (infer U)[] ? U : TValue> | undefined extends boolean | undefined ? (boolean & KeyOfType<TItem, TValue extends (infer U)[] ? U : TValue>) | undefined extends undefined ? never : "keyAttr" : never) | (keyof TItem | undefined extends boolean | undefined ? (boolean & keyof TItem) | undefined extends undefined ? never : "textAttr" : never) extends infer T extends keyof T_1 ? { readonly [K in T]-?: K extends "options" | "label" | "disabled" | "keyAttr" | "returnObject" | "textAttr" | "appendWidth" | "autoSelectFirst" | "dense" | "hideSelected" | "itemHeight" | "prependWidth" | "variant" | "loading" | "errorMessages" | "successMessages" | "hint" | "required" | "hideDetails" | "placeholder" | "clearable" | "readOnly" | "menuOptions" | "chips" | "noFilter" | "hideNoData" | "noDataText" | "customValue" | "hideCustomValue" ? {
924
926
  options: () => never[];
925
927
  disabled: false;
926
928
  loading: false;
@@ -985,7 +987,7 @@ declare const __VLS_export: <TValue, TItem>(__VLS_props: NonNullable<Awaited<typ
985
987
  readonly customValue: boolean;
986
988
  readonly hideCustomValue: boolean;
987
989
  readonly required: boolean;
988
- } & ("disabled" | "returnObject" | "autoSelectFirst" | "dense" | "hideSelected" | "loading" | "required" | "hideDetails" | "clearable" | "readOnly" | "chips" | "noFilter" | "hideNoData" | "customValue" | "hideCustomValue" | ([KeyOfType<TItem, TValue extends (infer U)[] ? U : TValue> | undefined] extends [boolean | undefined] ? "keyAttr" : never) | ([keyof TItem | undefined] extends [boolean | undefined] ? "textAttr" : never) extends infer T_2 extends keyof T_1 ? { readonly [K in T_2]-?: K extends "options" | "label" | "disabled" | "keyAttr" | "returnObject" | "textAttr" | "appendWidth" | "autoSelectFirst" | "dense" | "hideSelected" | "itemHeight" | "prependWidth" | "variant" | "loading" | "placeholder" | "errorMessages" | "successMessages" | "hint" | "required" | "hideDetails" | "clearable" | "readOnly" | "menuOptions" | "chips" | "noFilter" | "hideNoData" | "noDataText" | "customValue" | "hideCustomValue" ? {
990
+ } & ("disabled" | "returnObject" | "autoSelectFirst" | "dense" | "hideSelected" | "loading" | "required" | "hideDetails" | "clearable" | "readOnly" | "chips" | "noFilter" | "hideNoData" | "customValue" | "hideCustomValue" | (KeyOfType<TItem, TValue extends (infer U)[] ? U : TValue> | undefined extends boolean | undefined ? (boolean & KeyOfType<TItem, TValue extends (infer U)[] ? U : TValue>) | undefined extends undefined ? never : "keyAttr" : never) | (keyof TItem | undefined extends boolean | undefined ? (boolean & keyof TItem) | undefined extends undefined ? never : "textAttr" : never) extends infer T_2 extends keyof T_1 ? { readonly [K in T_2]-?: K extends "options" | "label" | "disabled" | "keyAttr" | "returnObject" | "textAttr" | "appendWidth" | "autoSelectFirst" | "dense" | "hideSelected" | "itemHeight" | "prependWidth" | "variant" | "loading" | "errorMessages" | "successMessages" | "hint" | "required" | "hideDetails" | "placeholder" | "clearable" | "readOnly" | "menuOptions" | "chips" | "noFilter" | "hideNoData" | "noDataText" | "customValue" | "hideCustomValue" ? {
989
991
  options: () => never[];
990
992
  disabled: false;
991
993
  loading: false;
@@ -1050,7 +1052,7 @@ declare const __VLS_export: <TValue, TItem>(__VLS_props: NonNullable<Awaited<typ
1050
1052
  readonly customValue: boolean;
1051
1053
  readonly hideCustomValue: boolean;
1052
1054
  readonly required: boolean;
1053
- } & ("disabled" | "returnObject" | "autoSelectFirst" | "dense" | "hideSelected" | "loading" | "required" | "hideDetails" | "clearable" | "readOnly" | "chips" | "noFilter" | "hideNoData" | "customValue" | "hideCustomValue" | ([KeyOfType<TItem, TValue extends (infer U)[] ? U : TValue> | undefined] extends [boolean | undefined] ? "keyAttr" : never) | ([keyof TItem | undefined] extends [boolean | undefined] ? "textAttr" : never) extends infer T_3 extends keyof T_1 ? { readonly [K in T_3]-?: K extends "options" | "label" | "disabled" | "keyAttr" | "returnObject" | "textAttr" | "appendWidth" | "autoSelectFirst" | "dense" | "hideSelected" | "itemHeight" | "prependWidth" | "variant" | "loading" | "placeholder" | "errorMessages" | "successMessages" | "hint" | "required" | "hideDetails" | "clearable" | "readOnly" | "menuOptions" | "chips" | "noFilter" | "hideNoData" | "noDataText" | "customValue" | "hideCustomValue" ? {
1055
+ } & ("disabled" | "returnObject" | "autoSelectFirst" | "dense" | "hideSelected" | "loading" | "required" | "hideDetails" | "clearable" | "readOnly" | "chips" | "noFilter" | "hideNoData" | "customValue" | "hideCustomValue" | (KeyOfType<TItem, TValue extends (infer U)[] ? U : TValue> | undefined extends boolean | undefined ? (boolean & KeyOfType<TItem, TValue extends (infer U)[] ? U : TValue>) | undefined extends undefined ? never : "keyAttr" : never) | (keyof TItem | undefined extends boolean | undefined ? (boolean & keyof TItem) | undefined extends undefined ? never : "textAttr" : never) extends infer T_3 extends keyof T_1 ? { readonly [K in T_3]-?: K extends "options" | "label" | "disabled" | "keyAttr" | "returnObject" | "textAttr" | "appendWidth" | "autoSelectFirst" | "dense" | "hideSelected" | "itemHeight" | "prependWidth" | "variant" | "loading" | "errorMessages" | "successMessages" | "hint" | "required" | "hideDetails" | "placeholder" | "clearable" | "readOnly" | "menuOptions" | "chips" | "noFilter" | "hideNoData" | "noDataText" | "customValue" | "hideCustomValue" ? {
1054
1056
  options: () => never[];
1055
1057
  disabled: false;
1056
1058
  loading: false;
@@ -1115,7 +1117,7 @@ declare const __VLS_export: <TValue, TItem>(__VLS_props: NonNullable<Awaited<typ
1115
1117
  readonly customValue: boolean;
1116
1118
  readonly hideCustomValue: boolean;
1117
1119
  readonly required: boolean;
1118
- } & ("disabled" | "returnObject" | "autoSelectFirst" | "dense" | "hideSelected" | "loading" | "required" | "hideDetails" | "clearable" | "readOnly" | "chips" | "noFilter" | "hideNoData" | "customValue" | "hideCustomValue" | ([KeyOfType<TItem, TValue extends (infer U)[] ? U : TValue> | undefined] extends [boolean | undefined] ? "keyAttr" : never) | ([keyof TItem | undefined] extends [boolean | undefined] ? "textAttr" : never) extends infer T_4 extends keyof T_1 ? { readonly [K in T_4]-?: K extends "options" | "label" | "disabled" | "keyAttr" | "returnObject" | "textAttr" | "appendWidth" | "autoSelectFirst" | "dense" | "hideSelected" | "itemHeight" | "prependWidth" | "variant" | "loading" | "placeholder" | "errorMessages" | "successMessages" | "hint" | "required" | "hideDetails" | "clearable" | "readOnly" | "menuOptions" | "chips" | "noFilter" | "hideNoData" | "noDataText" | "customValue" | "hideCustomValue" ? {
1120
+ } & ("disabled" | "returnObject" | "autoSelectFirst" | "dense" | "hideSelected" | "loading" | "required" | "hideDetails" | "clearable" | "readOnly" | "chips" | "noFilter" | "hideNoData" | "customValue" | "hideCustomValue" | (KeyOfType<TItem, TValue extends (infer U)[] ? U : TValue> | undefined extends boolean | undefined ? (boolean & KeyOfType<TItem, TValue extends (infer U)[] ? U : TValue>) | undefined extends undefined ? never : "keyAttr" : never) | (keyof TItem | undefined extends boolean | undefined ? (boolean & keyof TItem) | undefined extends undefined ? never : "textAttr" : never) extends infer T_4 extends keyof T_1 ? { readonly [K in T_4]-?: K extends "options" | "label" | "disabled" | "keyAttr" | "returnObject" | "textAttr" | "appendWidth" | "autoSelectFirst" | "dense" | "hideSelected" | "itemHeight" | "prependWidth" | "variant" | "loading" | "errorMessages" | "successMessages" | "hint" | "required" | "hideDetails" | "placeholder" | "clearable" | "readOnly" | "menuOptions" | "chips" | "noFilter" | "hideNoData" | "noDataText" | "customValue" | "hideCustomValue" ? {
1119
1121
  options: () => never[];
1120
1122
  disabled: false;
1121
1123
  loading: false;
@@ -1158,6 +1160,8 @@ declare const __VLS_export: <TValue, TItem>(__VLS_props: NonNullable<Awaited<typ
1158
1160
  };
1159
1161
  declare const _default: typeof __VLS_export;
1160
1162
  export default _default;
1161
- type __VLS_PrettifyLocal<T> = {
1163
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
1164
+ [K in keyof T]: T[K];
1165
+ } : {
1162
1166
  [K in keyof T as K]: T[K];
1163
- } & {};
1167
+ }) & {};
@@ -12,9 +12,9 @@ export interface Props {
12
12
  hideDetails?: boolean;
13
13
  required?: boolean;
14
14
  }
15
- declare var __VLS_13: {};
15
+ declare var __VLS_16: {};
16
16
  type __VLS_Slots = {} & {
17
- default?: (props: typeof __VLS_13) => any;
17
+ default?: (props: typeof __VLS_16) => any;
18
18
  };
19
19
  declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
20
20
  "update:modelValue": (modelValue: boolean) => any;