@mekari/pixel3-autocomplete 0.0.9-dev.1 → 0.0.9-dev.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/autocomplete.js +8 -1
- package/dist/autocomplete.mjs +2 -2
- package/dist/{chunk-XV4UTBV2.mjs → chunk-PAY6RXV7.mjs} +8 -1
- package/dist/{chunk-APSQJUFN.mjs → chunk-RAERIC3L.mjs} +1 -1
- package/dist/index.js +8 -1
- package/dist/index.mjs +2 -2
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/modules/autocomplete.hooks.d.mts +1 -0
- package/dist/modules/autocomplete.hooks.d.ts +1 -0
- package/dist/modules/autocomplete.hooks.js +8 -1
- package/dist/modules/autocomplete.hooks.mjs +1 -1
- package/package.json +7 -7
package/dist/autocomplete.js
CHANGED
|
@@ -171,7 +171,8 @@ function useAutocomplete(props, emit) {
|
|
|
171
171
|
isInfinityScroll,
|
|
172
172
|
placeholder,
|
|
173
173
|
isAdaptiveWidth,
|
|
174
|
-
isInvalid
|
|
174
|
+
isInvalid,
|
|
175
|
+
isDisabled
|
|
175
176
|
} = (0, import_vue.toRefs)(props);
|
|
176
177
|
const scrollEndNode = (0, import_vue.ref)();
|
|
177
178
|
const currentValue = (0, import_vue.ref)();
|
|
@@ -240,6 +241,8 @@ function useAutocomplete(props, emit) {
|
|
|
240
241
|
});
|
|
241
242
|
const getCursorPosition = (0, import_vue.computed)(() => getValueOfSuggestions.value.findIndex((item) => (0, import_pixel3_utils.isEqual)(getValue(item), currentCursor.value)));
|
|
242
243
|
function onOpenPopover(e) {
|
|
244
|
+
if (isReadOnly.value)
|
|
245
|
+
return;
|
|
243
246
|
emit("focus", e);
|
|
244
247
|
isPopoverOpen.value = true;
|
|
245
248
|
if (isSearchable.value) {
|
|
@@ -447,6 +450,7 @@ function useAutocomplete(props, emit) {
|
|
|
447
450
|
isFullWidth: isFullWidth.value,
|
|
448
451
|
placeholder: placeholder == null ? void 0 : placeholder.value,
|
|
449
452
|
isInvalid: isInvalid.value,
|
|
453
|
+
isDisabled: isDisabled.value,
|
|
450
454
|
onInput: onInputChange,
|
|
451
455
|
onKeydown,
|
|
452
456
|
onFocus: onOpenPopover,
|
|
@@ -456,6 +460,9 @@ function useAutocomplete(props, emit) {
|
|
|
456
460
|
}
|
|
457
461
|
},
|
|
458
462
|
onClear: (e) => {
|
|
463
|
+
onSelectListItem("");
|
|
464
|
+
const inputEl = document.getElementById(`${getId}-control`);
|
|
465
|
+
inputEl.value = "";
|
|
459
466
|
emit("clear", e);
|
|
460
467
|
}
|
|
461
468
|
};
|
package/dist/autocomplete.mjs
CHANGED
|
@@ -20,7 +20,8 @@ function useAutocomplete(props, emit) {
|
|
|
20
20
|
isInfinityScroll,
|
|
21
21
|
placeholder,
|
|
22
22
|
isAdaptiveWidth,
|
|
23
|
-
isInvalid
|
|
23
|
+
isInvalid,
|
|
24
|
+
isDisabled
|
|
24
25
|
} = toRefs(props);
|
|
25
26
|
const scrollEndNode = ref();
|
|
26
27
|
const currentValue = ref();
|
|
@@ -89,6 +90,8 @@ function useAutocomplete(props, emit) {
|
|
|
89
90
|
});
|
|
90
91
|
const getCursorPosition = computed(() => getValueOfSuggestions.value.findIndex((item) => isEqual(getValue(item), currentCursor.value)));
|
|
91
92
|
function onOpenPopover(e) {
|
|
93
|
+
if (isReadOnly.value)
|
|
94
|
+
return;
|
|
92
95
|
emit("focus", e);
|
|
93
96
|
isPopoverOpen.value = true;
|
|
94
97
|
if (isSearchable.value) {
|
|
@@ -296,6 +299,7 @@ function useAutocomplete(props, emit) {
|
|
|
296
299
|
isFullWidth: isFullWidth.value,
|
|
297
300
|
placeholder: placeholder == null ? void 0 : placeholder.value,
|
|
298
301
|
isInvalid: isInvalid.value,
|
|
302
|
+
isDisabled: isDisabled.value,
|
|
299
303
|
onInput: onInputChange,
|
|
300
304
|
onKeydown,
|
|
301
305
|
onFocus: onOpenPopover,
|
|
@@ -305,6 +309,9 @@ function useAutocomplete(props, emit) {
|
|
|
305
309
|
}
|
|
306
310
|
},
|
|
307
311
|
onClear: (e) => {
|
|
312
|
+
onSelectListItem("");
|
|
313
|
+
const inputEl = document.getElementById(`${getId}-control`);
|
|
314
|
+
inputEl.value = "";
|
|
308
315
|
emit("clear", e);
|
|
309
316
|
}
|
|
310
317
|
};
|
package/dist/index.js
CHANGED
|
@@ -173,7 +173,8 @@ function useAutocomplete(props, emit) {
|
|
|
173
173
|
isInfinityScroll,
|
|
174
174
|
placeholder,
|
|
175
175
|
isAdaptiveWidth,
|
|
176
|
-
isInvalid
|
|
176
|
+
isInvalid,
|
|
177
|
+
isDisabled
|
|
177
178
|
} = (0, import_vue.toRefs)(props);
|
|
178
179
|
const scrollEndNode = (0, import_vue.ref)();
|
|
179
180
|
const currentValue = (0, import_vue.ref)();
|
|
@@ -242,6 +243,8 @@ function useAutocomplete(props, emit) {
|
|
|
242
243
|
});
|
|
243
244
|
const getCursorPosition = (0, import_vue.computed)(() => getValueOfSuggestions.value.findIndex((item) => (0, import_pixel3_utils.isEqual)(getValue(item), currentCursor.value)));
|
|
244
245
|
function onOpenPopover(e) {
|
|
246
|
+
if (isReadOnly.value)
|
|
247
|
+
return;
|
|
245
248
|
emit("focus", e);
|
|
246
249
|
isPopoverOpen.value = true;
|
|
247
250
|
if (isSearchable.value) {
|
|
@@ -449,6 +452,7 @@ function useAutocomplete(props, emit) {
|
|
|
449
452
|
isFullWidth: isFullWidth.value,
|
|
450
453
|
placeholder: placeholder == null ? void 0 : placeholder.value,
|
|
451
454
|
isInvalid: isInvalid.value,
|
|
455
|
+
isDisabled: isDisabled.value,
|
|
452
456
|
onInput: onInputChange,
|
|
453
457
|
onKeydown,
|
|
454
458
|
onFocus: onOpenPopover,
|
|
@@ -458,6 +462,9 @@ function useAutocomplete(props, emit) {
|
|
|
458
462
|
}
|
|
459
463
|
},
|
|
460
464
|
onClear: (e) => {
|
|
465
|
+
onSelectListItem("");
|
|
466
|
+
const inputEl = document.getElementById(`${getId}-control`);
|
|
467
|
+
inputEl.value = "";
|
|
461
468
|
emit("clear", e);
|
|
462
469
|
}
|
|
463
470
|
};
|
package/dist/index.mjs
CHANGED
package/dist/metafile-cjs.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/modules/autocomplete.props.ts":{"bytes":3480,"imports":[],"format":"esm"},"src/modules/autocomplete.hooks.ts":{"bytes":
|
|
1
|
+
{"inputs":{"src/modules/autocomplete.props.ts":{"bytes":3480,"imports":[],"format":"esm"},"src/modules/autocomplete.hooks.ts":{"bytes":12679,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/autocomplete.tsx":{"bytes":4774,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-popover","kind":"import-statement","external":true},{"path":"@mekari/pixel3-input","kind":"import-statement","external":true},{"path":"@mekari/pixel3-spinner","kind":"import-statement","external":true},{"path":"@mekari/pixel3-icon","kind":"import-statement","external":true},{"path":"@mekari/pixel3-text","kind":"import-statement","external":true},{"path":"src/modules/autocomplete.props.ts","kind":"import-statement","original":"./modules/autocomplete.props"},{"path":"src/modules/autocomplete.hooks.ts","kind":"import-statement","original":"./modules/autocomplete.hooks"},{"path":"@mekari/pixel3-styled-system/patterns","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":133,"imports":[{"path":"src/autocomplete.tsx","kind":"import-statement","original":"./autocomplete"}],"format":"esm"}},"outputs":{"dist/autocomplete.js":{"imports":[{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-popover","kind":"require-call","external":true},{"path":"@mekari/pixel3-input","kind":"require-call","external":true},{"path":"@mekari/pixel3-spinner","kind":"require-call","external":true},{"path":"@mekari/pixel3-icon","kind":"require-call","external":true},{"path":"@mekari/pixel3-text","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/patterns","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/autocomplete.tsx","inputs":{"src/autocomplete.tsx":{"bytesInOutput":5197},"src/modules/autocomplete.props.ts":{"bytesInOutput":1882},"src/modules/autocomplete.hooks.ts":{"bytesInOutput":12783}},"bytes":20985},"dist/index.js":{"imports":[{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-popover","kind":"require-call","external":true},{"path":"@mekari/pixel3-input","kind":"require-call","external":true},{"path":"@mekari/pixel3-spinner","kind":"require-call","external":true},{"path":"@mekari/pixel3-icon","kind":"require-call","external":true},{"path":"@mekari/pixel3-text","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/patterns","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":133},"src/autocomplete.tsx":{"bytesInOutput":5037},"src/modules/autocomplete.props.ts":{"bytesInOutput":1882},"src/modules/autocomplete.hooks.ts":{"bytesInOutput":12783}},"bytes":20975},"dist/modules/autocomplete.hooks.js":{"imports":[{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/modules/autocomplete.hooks.ts","inputs":{"src/modules/autocomplete.hooks.ts":{"bytesInOutput":12963}},"bytes":13999},"dist/modules/autocomplete.props.js":{"imports":[],"exports":[],"entryPoint":"src/modules/autocomplete.props.ts","inputs":{"src/modules/autocomplete.props.ts":{"bytesInOutput":2231}},"bytes":3199}}}
|
package/dist/metafile-esm.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/modules/autocomplete.props.ts":{"bytes":3480,"imports":[],"format":"esm"},"src/modules/autocomplete.hooks.ts":{"bytes":
|
|
1
|
+
{"inputs":{"src/modules/autocomplete.props.ts":{"bytes":3480,"imports":[],"format":"esm"},"src/modules/autocomplete.hooks.ts":{"bytes":12679,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/autocomplete.tsx":{"bytes":4774,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-popover","kind":"import-statement","external":true},{"path":"@mekari/pixel3-input","kind":"import-statement","external":true},{"path":"@mekari/pixel3-spinner","kind":"import-statement","external":true},{"path":"@mekari/pixel3-icon","kind":"import-statement","external":true},{"path":"@mekari/pixel3-text","kind":"import-statement","external":true},{"path":"src/modules/autocomplete.props.ts","kind":"import-statement","original":"./modules/autocomplete.props"},{"path":"src/modules/autocomplete.hooks.ts","kind":"import-statement","original":"./modules/autocomplete.hooks"},{"path":"@mekari/pixel3-styled-system/patterns","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":133,"imports":[{"path":"src/autocomplete.tsx","kind":"import-statement","original":"./autocomplete"}],"format":"esm"}},"outputs":{"dist/autocomplete.mjs":{"imports":[{"path":"dist/chunk-RAERIC3L.mjs","kind":"import-statement"},{"path":"dist/chunk-PAY6RXV7.mjs","kind":"import-statement"},{"path":"dist/chunk-Q7SGQCOH.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["MpAutocomplete"],"entryPoint":"src/autocomplete.tsx","inputs":{},"bytes":179},"dist/index.mjs":{"imports":[{"path":"dist/chunk-RAERIC3L.mjs","kind":"import-statement"},{"path":"dist/chunk-PAY6RXV7.mjs","kind":"import-statement"},{"path":"dist/chunk-Q7SGQCOH.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["MpAutocomplete"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0}},"bytes":179},"dist/chunk-RAERIC3L.mjs":{"imports":[{"path":"dist/chunk-PAY6RXV7.mjs","kind":"import-statement"},{"path":"dist/chunk-Q7SGQCOH.mjs","kind":"import-statement"},{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-popover","kind":"import-statement","external":true},{"path":"@mekari/pixel3-input","kind":"import-statement","external":true},{"path":"@mekari/pixel3-spinner","kind":"import-statement","external":true},{"path":"@mekari/pixel3-icon","kind":"import-statement","external":true},{"path":"@mekari/pixel3-text","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/patterns","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"import-statement","external":true}],"exports":["MpAutocomplete"],"inputs":{"src/autocomplete.tsx":{"bytesInOutput":4337}},"bytes":4510},"dist/modules/autocomplete.hooks.mjs":{"imports":[{"path":"dist/chunk-PAY6RXV7.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["useAutocomplete"],"entryPoint":"src/modules/autocomplete.hooks.ts","inputs":{},"bytes":121},"dist/chunk-PAY6RXV7.mjs":{"imports":[{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"},{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/css","kind":"import-statement","external":true}],"exports":["useAutocomplete"],"inputs":{"src/modules/autocomplete.hooks.ts":{"bytesInOutput":12122}},"bytes":12240},"dist/modules/autocomplete.props.mjs":{"imports":[{"path":"dist/chunk-Q7SGQCOH.mjs","kind":"import-statement"},{"path":"dist/chunk-QZ7VFGWC.mjs","kind":"import-statement"}],"exports":["autocompleteEmit","autocompleteProps"],"entryPoint":"src/modules/autocomplete.props.ts","inputs":{},"bytes":165},"dist/chunk-Q7SGQCOH.mjs":{"imports":[],"exports":["autocompleteEmit","autocompleteProps"],"inputs":{"src/modules/autocomplete.props.ts":{"bytesInOutput":2003}},"bytes":2093},"dist/chunk-QZ7VFGWC.mjs":{"imports":[],"exports":["__name"],"inputs":{},"bytes":151}}}
|
|
@@ -38,6 +38,7 @@ declare function useAutocomplete(props: AutocompleteProps, emit: AutocompleteEmi
|
|
|
38
38
|
isFullWidth: boolean;
|
|
39
39
|
placeholder: string | undefined;
|
|
40
40
|
isInvalid: boolean;
|
|
41
|
+
isDisabled: boolean;
|
|
41
42
|
onInput: (e: Event) => void;
|
|
42
43
|
onKeydown: (e: KeyboardEvent) => void;
|
|
43
44
|
onFocus: (e: Event) => void;
|
|
@@ -38,6 +38,7 @@ declare function useAutocomplete(props: AutocompleteProps, emit: AutocompleteEmi
|
|
|
38
38
|
isFullWidth: boolean;
|
|
39
39
|
placeholder: string | undefined;
|
|
40
40
|
isInvalid: boolean;
|
|
41
|
+
isDisabled: boolean;
|
|
41
42
|
onInput: (e: Event) => void;
|
|
42
43
|
onKeydown: (e: KeyboardEvent) => void;
|
|
43
44
|
onFocus: (e: Event) => void;
|
|
@@ -41,7 +41,8 @@ function useAutocomplete(props, emit) {
|
|
|
41
41
|
isInfinityScroll,
|
|
42
42
|
placeholder,
|
|
43
43
|
isAdaptiveWidth,
|
|
44
|
-
isInvalid
|
|
44
|
+
isInvalid,
|
|
45
|
+
isDisabled
|
|
45
46
|
} = (0, import_vue.toRefs)(props);
|
|
46
47
|
const scrollEndNode = (0, import_vue.ref)();
|
|
47
48
|
const currentValue = (0, import_vue.ref)();
|
|
@@ -110,6 +111,8 @@ function useAutocomplete(props, emit) {
|
|
|
110
111
|
});
|
|
111
112
|
const getCursorPosition = (0, import_vue.computed)(() => getValueOfSuggestions.value.findIndex((item) => (0, import_pixel3_utils.isEqual)(getValue(item), currentCursor.value)));
|
|
112
113
|
function onOpenPopover(e) {
|
|
114
|
+
if (isReadOnly.value)
|
|
115
|
+
return;
|
|
113
116
|
emit("focus", e);
|
|
114
117
|
isPopoverOpen.value = true;
|
|
115
118
|
if (isSearchable.value) {
|
|
@@ -317,6 +320,7 @@ function useAutocomplete(props, emit) {
|
|
|
317
320
|
isFullWidth: isFullWidth.value,
|
|
318
321
|
placeholder: placeholder == null ? void 0 : placeholder.value,
|
|
319
322
|
isInvalid: isInvalid.value,
|
|
323
|
+
isDisabled: isDisabled.value,
|
|
320
324
|
onInput: onInputChange,
|
|
321
325
|
onKeydown,
|
|
322
326
|
onFocus: onOpenPopover,
|
|
@@ -326,6 +330,9 @@ function useAutocomplete(props, emit) {
|
|
|
326
330
|
}
|
|
327
331
|
},
|
|
328
332
|
onClear: (e) => {
|
|
333
|
+
onSelectListItem("");
|
|
334
|
+
const inputEl = document.getElementById(`${getId}-control`);
|
|
335
|
+
inputEl.value = "";
|
|
329
336
|
emit("clear", e);
|
|
330
337
|
}
|
|
331
338
|
};
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mekari/pixel3-autocomplete",
|
|
3
3
|
"description": "Autocomplete component for mekari pixel 3",
|
|
4
|
-
"version": "0.0.9-dev.
|
|
4
|
+
"version": "0.0.9-dev.3",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist"
|
|
9
9
|
],
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@mekari/pixel3-styled-system": "0.0.7-dev.
|
|
11
|
+
"@mekari/pixel3-styled-system": "0.0.7-dev.3",
|
|
12
12
|
"@mekari/pixel3-utils": "0.0.5",
|
|
13
|
-
"@mekari/pixel3-input": "0.0.9-dev.
|
|
14
|
-
"@mekari/pixel3-spinner": "0.0.9-dev.
|
|
15
|
-
"@mekari/pixel3-icon": "0.0.9-dev.
|
|
16
|
-
"@mekari/pixel3-popover": "0.0.9-dev.
|
|
17
|
-
"@mekari/pixel3-text": "0.0.9-dev.
|
|
13
|
+
"@mekari/pixel3-input": "0.0.9-dev.3",
|
|
14
|
+
"@mekari/pixel3-spinner": "0.0.9-dev.3",
|
|
15
|
+
"@mekari/pixel3-icon": "0.0.9-dev.3",
|
|
16
|
+
"@mekari/pixel3-popover": "0.0.9-dev.3",
|
|
17
|
+
"@mekari/pixel3-text": "0.0.9-dev.3"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
20
|
"vue": "^3.4.9"
|