@mekari/pixel3-autocomplete 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,65 @@
1
+ import * as vue from 'vue';
2
+ import { HTMLAttributes } from 'vue';
3
+ import { AutocompleteProps, AutocompleteEmits, StringNumberAnyObject } from './autocomplete.props.mjs';
4
+ import '@mekari/pixel3-popover';
5
+
6
+ declare function useAutocomplete(props: AutocompleteProps, emit: AutocompleteEmits): {
7
+ currentSearch: vue.Ref<string>;
8
+ scrollEndNode: vue.Ref<any>;
9
+ getSuggestionDatas: vue.ComputedRef<unknown[]>;
10
+ getGroupSuggestions: vue.ComputedRef<{
11
+ key: string;
12
+ values: any;
13
+ }[]>;
14
+ rootAtrrs: vue.ComputedRef<HTMLAttributes>;
15
+ popoverAtrrs: vue.ComputedRef<{
16
+ id: string | undefined;
17
+ isManual: boolean;
18
+ isOpen: boolean;
19
+ usePortal: boolean;
20
+ isKeepAlive: boolean;
21
+ isAdaptiveWidth: boolean;
22
+ }>;
23
+ popoverContentAtrrs: vue.ComputedRef<{
24
+ class: unknown;
25
+ style?: unknown;
26
+ isDark?: boolean | undefined;
27
+ isUnstyled?: boolean | undefined;
28
+ onClick: () => void;
29
+ }>;
30
+ inputAtrrs: vue.ComputedRef<{
31
+ id: string | undefined;
32
+ modelValue: string;
33
+ isClearable: boolean;
34
+ autocomplete: string;
35
+ isReadOnly: boolean;
36
+ isFullWidth: boolean;
37
+ placeholder: string | undefined;
38
+ onInput: (e: Event) => void;
39
+ onKeydown: (e: KeyboardEvent) => void;
40
+ onFocus: (e: Event) => void;
41
+ onBlur: () => void;
42
+ }>;
43
+ buttonActionAttrs: vue.ComputedRef<{
44
+ class: string;
45
+ onClick: (e: Event) => void;
46
+ }>;
47
+ emptyTextAttrs: {
48
+ color: string;
49
+ class: string;
50
+ };
51
+ contentLoadingAttrs: {
52
+ class: string;
53
+ };
54
+ popoverListItemAttrs: (item: StringNumberAnyObject, index: number) => {
55
+ onClick: (e: Event) => void;
56
+ onMouseenter: () => StringNumberAnyObject;
57
+ isActive: boolean;
58
+ 'data-highlight': boolean | undefined;
59
+ 'data-index': number;
60
+ 'aria-selected': boolean | undefined;
61
+ };
62
+ getLabel: (value: StringNumberAnyObject) => string;
63
+ };
64
+
65
+ export { useAutocomplete };
@@ -0,0 +1,65 @@
1
+ import * as vue from 'vue';
2
+ import { HTMLAttributes } from 'vue';
3
+ import { AutocompleteProps, AutocompleteEmits, StringNumberAnyObject } from './autocomplete.props.js';
4
+ import '@mekari/pixel3-popover';
5
+
6
+ declare function useAutocomplete(props: AutocompleteProps, emit: AutocompleteEmits): {
7
+ currentSearch: vue.Ref<string>;
8
+ scrollEndNode: vue.Ref<any>;
9
+ getSuggestionDatas: vue.ComputedRef<unknown[]>;
10
+ getGroupSuggestions: vue.ComputedRef<{
11
+ key: string;
12
+ values: any;
13
+ }[]>;
14
+ rootAtrrs: vue.ComputedRef<HTMLAttributes>;
15
+ popoverAtrrs: vue.ComputedRef<{
16
+ id: string | undefined;
17
+ isManual: boolean;
18
+ isOpen: boolean;
19
+ usePortal: boolean;
20
+ isKeepAlive: boolean;
21
+ isAdaptiveWidth: boolean;
22
+ }>;
23
+ popoverContentAtrrs: vue.ComputedRef<{
24
+ class: unknown;
25
+ style?: unknown;
26
+ isDark?: boolean | undefined;
27
+ isUnstyled?: boolean | undefined;
28
+ onClick: () => void;
29
+ }>;
30
+ inputAtrrs: vue.ComputedRef<{
31
+ id: string | undefined;
32
+ modelValue: string;
33
+ isClearable: boolean;
34
+ autocomplete: string;
35
+ isReadOnly: boolean;
36
+ isFullWidth: boolean;
37
+ placeholder: string | undefined;
38
+ onInput: (e: Event) => void;
39
+ onKeydown: (e: KeyboardEvent) => void;
40
+ onFocus: (e: Event) => void;
41
+ onBlur: () => void;
42
+ }>;
43
+ buttonActionAttrs: vue.ComputedRef<{
44
+ class: string;
45
+ onClick: (e: Event) => void;
46
+ }>;
47
+ emptyTextAttrs: {
48
+ color: string;
49
+ class: string;
50
+ };
51
+ contentLoadingAttrs: {
52
+ class: string;
53
+ };
54
+ popoverListItemAttrs: (item: StringNumberAnyObject, index: number) => {
55
+ onClick: (e: Event) => void;
56
+ onMouseenter: () => StringNumberAnyObject;
57
+ isActive: boolean;
58
+ 'data-highlight': boolean | undefined;
59
+ 'data-index': number;
60
+ 'aria-selected': boolean | undefined;
61
+ };
62
+ getLabel: (value: StringNumberAnyObject) => string;
63
+ };
64
+
65
+ export { useAutocomplete };
@@ -0,0 +1,415 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+
21
+ // src/modules/autocomplete.hooks.ts
22
+ var autocomplete_hooks_exports = {};
23
+ __export(autocomplete_hooks_exports, {
24
+ useAutocomplete: () => useAutocomplete
25
+ });
26
+ module.exports = __toCommonJS(autocomplete_hooks_exports);
27
+ var import_vue = require("vue");
28
+ var import_pixel3_utils = require("@mekari/pixel3-utils");
29
+ var import_css = require("@mekari/pixel3-styled-system/css");
30
+ function useAutocomplete(props, emit) {
31
+ const {
32
+ data,
33
+ usePortal,
34
+ isKeepAlive,
35
+ isClearable,
36
+ isSearchable,
37
+ isReadOnly,
38
+ isFullWidth,
39
+ labelProp,
40
+ valueProp,
41
+ isInfinityScroll,
42
+ placeholder,
43
+ isAdaptiveWidth
44
+ } = (0, import_vue.toRefs)(props);
45
+ const scrollEndNode = (0, import_vue.ref)();
46
+ const currentValue = (0, import_vue.ref)();
47
+ const currentLabel = (0, import_vue.ref)("");
48
+ const currentCursor = (0, import_vue.ref)("");
49
+ const currentSearch = (0, import_vue.ref)("");
50
+ const isOutside = (0, import_vue.ref)(true);
51
+ const isPopoverOpen = (0, import_vue.ref)(false);
52
+ const {
53
+ resume: enableIntersectionObserver,
54
+ pause: disableIntersectionObserver
55
+ } = (0, import_pixel3_utils.useIntersectionObserver)(scrollEndNode, ([{
56
+ isIntersecting
57
+ }]) => {
58
+ if (isIntersecting) {
59
+ emit("scrollEnd");
60
+ }
61
+ });
62
+ const getId = props.id || (0, import_pixel3_utils.getUniqueId)("", "autocomplete").value;
63
+ const getSuggestionDatas = (0, import_vue.computed)(() => {
64
+ const datas = data.value || [];
65
+ if (props.isManualFilter)
66
+ return datas;
67
+ if (!currentSearch.value)
68
+ return datas;
69
+ if (currentSearch.value === currentLabel.value)
70
+ return datas;
71
+ return datas.filter((item) => {
72
+ const label = getLabel(item).toLocaleLowerCase();
73
+ const search = currentSearch.value.toLocaleLowerCase();
74
+ return label.includes(search);
75
+ });
76
+ });
77
+ const getGroupSuggestions = (0, import_vue.computed)(() => {
78
+ const mapped = getSuggestionDatas.value.map((item, index) => {
79
+ const groupKey = item[props.groupKey];
80
+ const isUncategorized = /* @__PURE__ */ __name((value) => {
81
+ if ((0, import_pixel3_utils.isUndef)(value) || value === "")
82
+ return true;
83
+ return false;
84
+ }, "isUncategorized");
85
+ return {
86
+ ...item,
87
+ index,
88
+ [props.groupKey]: isUncategorized(groupKey) ? "UNCATEGORIZED" : groupKey
89
+ };
90
+ });
91
+ const grouped = (0, import_pixel3_utils.groupBy)(mapped, props.groupKey);
92
+ const keys = Object.keys(grouped);
93
+ const results = keys.map((item) => {
94
+ return {
95
+ key: item,
96
+ values: grouped[item]
97
+ };
98
+ });
99
+ return results;
100
+ });
101
+ const getValueOfSuggestions = (0, import_vue.computed)(() => {
102
+ if (props.isRawValue)
103
+ return getSuggestionDatas.value;
104
+ const isArrayOfObject = getSuggestionDatas.value.some((item) => (0, import_pixel3_utils.isObject)(item));
105
+ if (isArrayOfObject) {
106
+ return getSuggestionDatas.value.map((item) => item[valueProp.value]);
107
+ }
108
+ return getSuggestionDatas.value;
109
+ });
110
+ const getCursorPosition = (0, import_vue.computed)(() => getValueOfSuggestions.value.findIndex((item) => (0, import_pixel3_utils.isEqual)(getValue(item), currentCursor.value)));
111
+ function onOpenPopover(e) {
112
+ isPopoverOpen.value = true;
113
+ if (isSearchable.value) {
114
+ const target = e.target;
115
+ target.setSelectionRange(0, target.value.length || 0);
116
+ }
117
+ if (props.modelValue) {
118
+ currentCursor.value = getValue(props.modelValue);
119
+ (0, import_vue.nextTick)(() => {
120
+ handleAdjustScrollPosition();
121
+ });
122
+ } else {
123
+ handleSetFirstSuggestion();
124
+ }
125
+ if (isInfinityScroll.value) {
126
+ enableIntersectionObserver();
127
+ }
128
+ }
129
+ __name(onOpenPopover, "onOpenPopover");
130
+ function onBlur() {
131
+ isPopoverOpen.value = false;
132
+ const inputEl = document.getElementById(`${getId}-control`);
133
+ inputEl == null ? void 0 : inputEl.blur();
134
+ if (isInfinityScroll.value) {
135
+ disableIntersectionObserver();
136
+ }
137
+ }
138
+ __name(onBlur, "onBlur");
139
+ function onInputChange(e) {
140
+ const target = e.target;
141
+ currentSearch.value = target.value;
142
+ onSearchChange();
143
+ emit("input", e);
144
+ }
145
+ __name(onInputChange, "onInputChange");
146
+ function onSelectListItem(value) {
147
+ const innerValue = getValue(value);
148
+ emit("update:modelValue", innerValue);
149
+ emit("change", innerValue);
150
+ onBlur();
151
+ }
152
+ __name(onSelectListItem, "onSelectListItem");
153
+ function onSearchChange() {
154
+ (0, import_vue.nextTick)(() => {
155
+ const hasSearchAndResult = currentSearch.value && getValueOfSuggestions.value.length;
156
+ const isEqualSearchAndLabel = currentSearch.value === currentLabel.value;
157
+ const emptySearchButHaveLabel = !currentSearch.value && currentLabel.value;
158
+ if (hasSearchAndResult) {
159
+ if (isEqualSearchAndLabel) {
160
+ currentCursor.value = currentValue.value;
161
+ handleAdjustScrollPosition();
162
+ } else {
163
+ handleSetFirstSuggestion();
164
+ }
165
+ }
166
+ if (emptySearchButHaveLabel) {
167
+ currentCursor.value = currentValue.value;
168
+ handleAdjustScrollPosition();
169
+ }
170
+ });
171
+ }
172
+ __name(onSearchChange, "onSearchChange");
173
+ function onModelValueChange() {
174
+ const data2 = props.data.find((item) => {
175
+ return (0, import_pixel3_utils.isEqual)(getValue(item), props.modelValue);
176
+ });
177
+ if (data2) {
178
+ currentValue.value = props.modelValue;
179
+ currentLabel.value = getLabel(data2);
180
+ currentSearch.value = getLabel(data2);
181
+ }
182
+ }
183
+ __name(onModelValueChange, "onModelValueChange");
184
+ function handleForceFocusToInput() {
185
+ const inputEl = document.getElementById(`${getId}-control`);
186
+ inputEl == null ? void 0 : inputEl.focus();
187
+ }
188
+ __name(handleForceFocusToInput, "handleForceFocusToInput");
189
+ function onKeydown(e) {
190
+ if (e.code === "Enter") {
191
+ if (getSuggestionDatas.value.length) {
192
+ onSelectListItem(currentCursor.value);
193
+ emit("enter", getSuggestionDatas.value, currentSearch.value);
194
+ } else {
195
+ emit("enter", getSuggestionDatas.value, currentSearch.value);
196
+ onBlur();
197
+ }
198
+ }
199
+ if (e.code === "ArrowDown") {
200
+ e.preventDefault();
201
+ e.stopPropagation();
202
+ const totalData = getSuggestionDatas.value.length - 1;
203
+ const position = getCursorPosition.value;
204
+ const isLastPosition = totalData === position;
205
+ if (!isLastPosition) {
206
+ const nextPosition = position + 1;
207
+ currentCursor.value = getValueOfSuggestions.value[nextPosition];
208
+ handleAdjustScrollPosition();
209
+ }
210
+ }
211
+ if (e.code === "ArrowUp") {
212
+ e.preventDefault();
213
+ e.stopPropagation();
214
+ const position = getCursorPosition.value;
215
+ const isFirstPosition = position === 0;
216
+ if (!isFirstPosition) {
217
+ const nextPosition = position - 1;
218
+ currentCursor.value = getValueOfSuggestions.value[nextPosition];
219
+ handleAdjustScrollPosition();
220
+ }
221
+ }
222
+ }
223
+ __name(onKeydown, "onKeydown");
224
+ async function handleAdjustScrollPosition() {
225
+ const position = getValueOfSuggestions.value.indexOf(currentCursor.value);
226
+ const containerElement = document.getElementById(`popover-content-${getId}`);
227
+ const targetElement = containerElement == null ? void 0 : containerElement.querySelector(`[data-index="${position}"]`);
228
+ if ((0, import_pixel3_utils.isDef)(targetElement)) {
229
+ const isVisible = await (0, import_pixel3_utils.isElementVisible)(targetElement);
230
+ const getPosition = /* @__PURE__ */ __name(() => {
231
+ if (getCursorPosition.value === 0)
232
+ return "top";
233
+ if (props.data.length === getCursorPosition.value + 1)
234
+ return "bottom";
235
+ return void 0;
236
+ }, "getPosition");
237
+ if (!isVisible) {
238
+ (0, import_vue.nextTick)(() => {
239
+ (0, import_pixel3_utils.scrollToTargetElement)(targetElement, containerElement, getPosition());
240
+ });
241
+ }
242
+ }
243
+ }
244
+ __name(handleAdjustScrollPosition, "handleAdjustScrollPosition");
245
+ function handleSetFirstSuggestion() {
246
+ currentCursor.value = getValueOfSuggestions.value[0] || "";
247
+ handleAdjustScrollPosition();
248
+ }
249
+ __name(handleSetFirstSuggestion, "handleSetFirstSuggestion");
250
+ function getValue(value) {
251
+ if (props.isRawValue)
252
+ return value;
253
+ return (0, import_pixel3_utils.isObject)(value) ? value[valueProp.value] : value;
254
+ }
255
+ __name(getValue, "getValue");
256
+ function getLabel(value) {
257
+ return (0, import_pixel3_utils.isObject)(value) ? value[labelProp.value] : value;
258
+ }
259
+ __name(getLabel, "getLabel");
260
+ function isListItemActive(item) {
261
+ if (props.isListItemActiveFunction)
262
+ return props.isListItemActiveFunction(props.modelValue, item);
263
+ return (0, import_pixel3_utils.isEqual)(props.modelValue, getValue(item));
264
+ }
265
+ __name(isListItemActive, "isListItemActive");
266
+ const rootAtrrs = (0, import_vue.computed)(() => {
267
+ return {
268
+ style: {
269
+ width: "100%",
270
+ position: "relative"
271
+ },
272
+ onMouseenter: () => {
273
+ isOutside.value = false;
274
+ },
275
+ onMouseleave: () => {
276
+ isOutside.value = true;
277
+ }
278
+ };
279
+ });
280
+ const popoverAtrrs = (0, import_vue.computed)(() => {
281
+ return {
282
+ id: getId,
283
+ isManual: true,
284
+ isOpen: isPopoverOpen.value,
285
+ usePortal: usePortal.value,
286
+ isKeepAlive: isKeepAlive.value,
287
+ isAdaptiveWidth: isAdaptiveWidth.value
288
+ };
289
+ });
290
+ const popoverContentAtrrs = (0, import_vue.computed)(() => {
291
+ return {
292
+ class: (0, import_css.css)({
293
+ maxHeight: "300px",
294
+ overflowY: "auto",
295
+ position: "relative"
296
+ }),
297
+ onClick: handleForceFocusToInput,
298
+ ...props.contentAttrs
299
+ };
300
+ });
301
+ const inputAtrrs = (0, import_vue.computed)(() => {
302
+ return {
303
+ // key: currentLabel.value,
304
+ id: getId,
305
+ modelValue: currentLabel.value,
306
+ isClearable: isClearable.value,
307
+ autocomplete: "off",
308
+ isReadOnly: !isSearchable.value || isReadOnly.value,
309
+ isFullWidth: isFullWidth.value,
310
+ placeholder: placeholder == null ? void 0 : placeholder.value,
311
+ onInput: onInputChange,
312
+ onKeydown,
313
+ onFocus: onOpenPopover,
314
+ onBlur: () => {
315
+ if (isOutside.value) {
316
+ onBlur();
317
+ }
318
+ }
319
+ };
320
+ });
321
+ const buttonActionAttrs = (0, import_vue.computed)(() => {
322
+ return {
323
+ class: (0, import_css.css)({
324
+ cursor: "pointer",
325
+ width: "full",
326
+ textAlign: "center",
327
+ roundedTop: "0",
328
+ borderTopWidth: "1px",
329
+ borderColor: "blue.50",
330
+ color: "blue.400",
331
+ position: "sticky",
332
+ bottom: "0px",
333
+ bg: "white",
334
+ fontSize: "md",
335
+ zIndex: "999",
336
+ py: 2,
337
+ height: "9.5",
338
+ _hover: {
339
+ color: "blue.500"
340
+ }
341
+ }),
342
+ onClick: (e) => {
343
+ e.stopPropagation();
344
+ emit("buttonAction", getSuggestionDatas.value, currentSearch.value);
345
+ isOutside.value = true;
346
+ onBlur();
347
+ }
348
+ };
349
+ });
350
+ const emptyTextAttrs = {
351
+ color: "gray.400",
352
+ class: (0, import_css.css)({
353
+ px: 3,
354
+ py: 2
355
+ })
356
+ };
357
+ const contentLoadingAttrs = {
358
+ class: (0, import_css.css)({
359
+ px: 3,
360
+ py: 2,
361
+ display: "flex",
362
+ alignItems: "center",
363
+ gap: 3
364
+ })
365
+ };
366
+ const popoverListItemAttrs = /* @__PURE__ */ __name((item, index) => {
367
+ const innerValue = getValue(item);
368
+ return {
369
+ onClick: (e) => {
370
+ e.stopPropagation();
371
+ onSelectListItem(item);
372
+ },
373
+ onMouseenter: () => currentCursor.value = innerValue,
374
+ isActive: isListItemActive(item),
375
+ "data-highlight": (0, import_pixel3_utils.isEqual)(innerValue, currentCursor.value) ? true : void 0,
376
+ "data-index": index,
377
+ "aria-selected": isListItemActive(item) ? true : void 0
378
+ };
379
+ }, "popoverListItemAttrs");
380
+ (0, import_vue.watch)(() => props.modelValue, (newValue) => {
381
+ if (newValue)
382
+ onModelValueChange();
383
+ });
384
+ (0, import_vue.watch)(() => props.data, () => {
385
+ if (props.isManualFilter && isPopoverOpen.value) {
386
+ (0, import_vue.nextTick)(() => {
387
+ handleSetFirstSuggestion();
388
+ });
389
+ }
390
+ });
391
+ (0, import_vue.onMounted)(() => {
392
+ if (props.modelValue)
393
+ onModelValueChange();
394
+ });
395
+ return {
396
+ currentSearch,
397
+ scrollEndNode,
398
+ getSuggestionDatas,
399
+ getGroupSuggestions,
400
+ rootAtrrs,
401
+ popoverAtrrs,
402
+ popoverContentAtrrs,
403
+ inputAtrrs,
404
+ buttonActionAttrs,
405
+ emptyTextAttrs,
406
+ contentLoadingAttrs,
407
+ popoverListItemAttrs,
408
+ getLabel
409
+ };
410
+ }
411
+ __name(useAutocomplete, "useAutocomplete");
412
+ // Annotate the CommonJS export names for ESM import in node:
413
+ 0 && (module.exports = {
414
+ useAutocomplete
415
+ });
@@ -0,0 +1,7 @@
1
+ import {
2
+ useAutocomplete
3
+ } from "../chunk-YGOZYS5H.mjs";
4
+ import "../chunk-QZ7VFGWC.mjs";
5
+ export {
6
+ useAutocomplete
7
+ };
@@ -0,0 +1,136 @@
1
+ import { PropType, ExtractPropTypes } from 'vue';
2
+ import { PopoverContentProps } from '@mekari/pixel3-popover';
3
+
4
+ type PopoverContentAttrs = {
5
+ class?: unknown;
6
+ style?: unknown;
7
+ [key: string]: unknown;
8
+ } & PopoverContentProps;
9
+ type AnyObject = {
10
+ [key: string]: unknown;
11
+ };
12
+ type StringNumberAnyObject = string | number | AnyObject;
13
+ declare const autocompleteProps: {
14
+ id: {
15
+ type: PropType<string>;
16
+ default: string;
17
+ };
18
+ data: {
19
+ type: PropType<unknown[]>;
20
+ default: () => never[];
21
+ };
22
+ modelValue: {
23
+ type: PropType<StringNumberAnyObject | undefined>;
24
+ };
25
+ defaultValue: (StringConstructor | NumberConstructor | ObjectConstructor)[];
26
+ placeholder: {
27
+ type: PropType<string>;
28
+ };
29
+ labelProp: {
30
+ type: PropType<string>;
31
+ default: string;
32
+ };
33
+ valueProp: {
34
+ type: PropType<string>;
35
+ default: string;
36
+ };
37
+ isReadOnly: {
38
+ type: PropType<boolean>;
39
+ default: boolean;
40
+ };
41
+ isDisabled: {
42
+ type: PropType<boolean>;
43
+ default: boolean;
44
+ };
45
+ isInvalid: {
46
+ type: PropType<boolean>;
47
+ default: boolean;
48
+ };
49
+ isRequired: {
50
+ type: PropType<boolean>;
51
+ default: boolean;
52
+ };
53
+ isFullWidth: {
54
+ type: PropType<boolean>;
55
+ default: boolean;
56
+ };
57
+ isLoading: {
58
+ type: PropType<boolean>;
59
+ default: boolean;
60
+ };
61
+ isContentLoading: {
62
+ type: PropType<boolean>;
63
+ default: boolean;
64
+ };
65
+ isClearable: {
66
+ type: PropType<boolean>;
67
+ default: boolean;
68
+ };
69
+ isSearchable: {
70
+ type: PropType<boolean>;
71
+ default: boolean;
72
+ };
73
+ contentAttrs: {
74
+ type: PropType<PopoverContentAttrs>;
75
+ };
76
+ emptyText: {
77
+ type: PropType<string>;
78
+ default: string;
79
+ };
80
+ contentLoadingText: {
81
+ type: PropType<string>;
82
+ default: string;
83
+ };
84
+ isInfinityScroll: {
85
+ type: PropType<boolean>;
86
+ default: boolean;
87
+ };
88
+ isManualFilter: {
89
+ type: PropType<boolean>;
90
+ default: boolean;
91
+ };
92
+ usePortal: {
93
+ type: PropType<boolean>;
94
+ default: boolean;
95
+ };
96
+ isShowButtonAction: {
97
+ type: PropType<boolean>;
98
+ default: boolean;
99
+ };
100
+ buttonActionText: {
101
+ type: PropType<string>;
102
+ default: string;
103
+ };
104
+ isGroupSuggestions: {
105
+ type: PropType<boolean>;
106
+ default: boolean;
107
+ };
108
+ groupKey: {
109
+ type: PropType<string>;
110
+ default: string;
111
+ };
112
+ keyCode: {
113
+ type: PropType<string[]>;
114
+ default: () => string[];
115
+ };
116
+ isRawValue: {
117
+ type: PropType<boolean>;
118
+ default: boolean;
119
+ };
120
+ isListItemActiveFunction: {
121
+ type: PropType<(selected: StringNumberAnyObject | undefined, item: StringNumberAnyObject | undefined) => boolean>;
122
+ };
123
+ isKeepAlive: {
124
+ type: PropType<boolean>;
125
+ default: boolean;
126
+ };
127
+ isAdaptiveWidth: {
128
+ type: PropType<boolean>;
129
+ default: boolean;
130
+ };
131
+ };
132
+ declare const autocompleteEmit: readonly ["update:modelValue", "input", "change", "enter", "scrollEnd", "buttonAction"];
133
+ type AutocompleteProps = ExtractPropTypes<typeof autocompleteProps>;
134
+ type AutocompleteEmits = (e: typeof autocompleteEmit[number], value?: unknown, value2?: unknown) => void;
135
+
136
+ export { AnyObject, AutocompleteEmits, AutocompleteProps, StringNumberAnyObject, autocompleteEmit, autocompleteProps };