@mekari/pixel3-autocomplete 0.0.18 → 0.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -128,7 +128,7 @@ declare const MpAutocomplete: vue.DefineComponent<{
128
128
  type: vue.PropType<boolean>;
129
129
  default: boolean;
130
130
  };
131
- }, () => vue_jsx_runtime.JSX.Element, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("buttonAction" | "input" | "clear" | "update:modelValue" | "change" | "enter" | "scrollEnd" | "focus")[], "buttonAction" | "input" | "clear" | "update:modelValue" | "change" | "enter" | "scrollEnd" | "focus", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
131
+ }, () => vue_jsx_runtime.JSX.Element, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("update:modelValue" | "input" | "change" | "enter" | "scrollEnd" | "buttonAction" | "focus" | "clear")[], "update:modelValue" | "input" | "change" | "enter" | "scrollEnd" | "buttonAction" | "focus" | "clear", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
132
132
  id: {
133
133
  type: vue.PropType<string>;
134
134
  default: string;
@@ -254,14 +254,14 @@ declare const MpAutocomplete: vue.DefineComponent<{
254
254
  default: boolean;
255
255
  };
256
256
  }>> & {
257
- onFocus?: ((...args: any[]) => any) | undefined;
258
- onChange?: ((...args: any[]) => any) | undefined;
259
- onInput?: ((...args: any[]) => any) | undefined;
260
- onClear?: ((...args: any[]) => any) | undefined;
261
257
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
258
+ onInput?: ((...args: any[]) => any) | undefined;
259
+ onChange?: ((...args: any[]) => any) | undefined;
262
260
  onEnter?: ((...args: any[]) => any) | undefined;
263
- onButtonAction?: ((...args: any[]) => any) | undefined;
264
261
  onScrollEnd?: ((...args: any[]) => any) | undefined;
262
+ onButtonAction?: ((...args: any[]) => any) | undefined;
263
+ onFocus?: ((...args: any[]) => any) | undefined;
264
+ onClear?: ((...args: any[]) => any) | undefined;
265
265
  }, {
266
266
  id: string;
267
267
  data: unknown[];
@@ -128,7 +128,7 @@ declare const MpAutocomplete: vue.DefineComponent<{
128
128
  type: vue.PropType<boolean>;
129
129
  default: boolean;
130
130
  };
131
- }, () => vue_jsx_runtime.JSX.Element, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("buttonAction" | "input" | "clear" | "update:modelValue" | "change" | "enter" | "scrollEnd" | "focus")[], "buttonAction" | "input" | "clear" | "update:modelValue" | "change" | "enter" | "scrollEnd" | "focus", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
131
+ }, () => vue_jsx_runtime.JSX.Element, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("update:modelValue" | "input" | "change" | "enter" | "scrollEnd" | "buttonAction" | "focus" | "clear")[], "update:modelValue" | "input" | "change" | "enter" | "scrollEnd" | "buttonAction" | "focus" | "clear", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
132
132
  id: {
133
133
  type: vue.PropType<string>;
134
134
  default: string;
@@ -254,14 +254,14 @@ declare const MpAutocomplete: vue.DefineComponent<{
254
254
  default: boolean;
255
255
  };
256
256
  }>> & {
257
- onFocus?: ((...args: any[]) => any) | undefined;
258
- onChange?: ((...args: any[]) => any) | undefined;
259
- onInput?: ((...args: any[]) => any) | undefined;
260
- onClear?: ((...args: any[]) => any) | undefined;
261
257
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
258
+ onInput?: ((...args: any[]) => any) | undefined;
259
+ onChange?: ((...args: any[]) => any) | undefined;
262
260
  onEnter?: ((...args: any[]) => any) | undefined;
263
- onButtonAction?: ((...args: any[]) => any) | undefined;
264
261
  onScrollEnd?: ((...args: any[]) => any) | undefined;
262
+ onButtonAction?: ((...args: any[]) => any) | undefined;
263
+ onFocus?: ((...args: any[]) => any) | undefined;
264
+ onClear?: ((...args: any[]) => any) | undefined;
265
265
  }, {
266
266
  id: string;
267
267
  data: unknown[];
@@ -271,6 +271,7 @@ function useAutocomplete(props, emit) {
271
271
  const inputEl = document.getElementById(`${getId}`);
272
272
  inputEl == null ? void 0 : inputEl.blur();
273
273
  setInputValueToCurrentSelection();
274
+ currentSearch.value = "";
274
275
  if (isInfinityScroll.value) {
275
276
  disableIntersectionObserver();
276
277
  }
@@ -326,8 +327,9 @@ function useAutocomplete(props, emit) {
326
327
  }
327
328
  __name(onModelValueChange, "onModelValueChange");
328
329
  function setInputValueToCurrentSelection() {
330
+ var _a, _b;
329
331
  const inputEl = document.getElementById(`${getId}`);
330
- inputEl.value = currentLabel.value || currentValue.value;
332
+ inputEl.value = (_b = (_a = currentLabel.value) != null ? _a : currentValue.value) != null ? _b : "";
331
333
  }
332
334
  __name(setInputValueToCurrentSelection, "setInputValueToCurrentSelection");
333
335
  function handleForceFocusToInput() {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  MpAutocomplete
3
- } from "./chunk-XKIKHDOG.mjs";
4
- import "./chunk-5V7PO5OY.mjs";
3
+ } from "./chunk-WCITJGYW.mjs";
4
+ import "./chunk-GNDEHE7F.mjs";
5
5
  import "./chunk-Q7SGQCOH.mjs";
6
6
  import "./chunk-QZ7VFGWC.mjs";
7
7
  export {
@@ -120,6 +120,7 @@ function useAutocomplete(props, emit) {
120
120
  const inputEl = document.getElementById(`${getId}`);
121
121
  inputEl == null ? void 0 : inputEl.blur();
122
122
  setInputValueToCurrentSelection();
123
+ currentSearch.value = "";
123
124
  if (isInfinityScroll.value) {
124
125
  disableIntersectionObserver();
125
126
  }
@@ -175,8 +176,9 @@ function useAutocomplete(props, emit) {
175
176
  }
176
177
  __name(onModelValueChange, "onModelValueChange");
177
178
  function setInputValueToCurrentSelection() {
179
+ var _a, _b;
178
180
  const inputEl = document.getElementById(`${getId}`);
179
- inputEl.value = currentLabel.value || currentValue.value;
181
+ inputEl.value = (_b = (_a = currentLabel.value) != null ? _a : currentValue.value) != null ? _b : "";
180
182
  }
181
183
  __name(setInputValueToCurrentSelection, "setInputValueToCurrentSelection");
182
184
  function handleForceFocusToInput() {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useAutocomplete
3
- } from "./chunk-5V7PO5OY.mjs";
3
+ } from "./chunk-GNDEHE7F.mjs";
4
4
  import {
5
5
  autocompleteProps
6
6
  } from "./chunk-Q7SGQCOH.mjs";
package/dist/index.js CHANGED
@@ -273,6 +273,7 @@ function useAutocomplete(props, emit) {
273
273
  const inputEl = document.getElementById(`${getId}`);
274
274
  inputEl == null ? void 0 : inputEl.blur();
275
275
  setInputValueToCurrentSelection();
276
+ currentSearch.value = "";
276
277
  if (isInfinityScroll.value) {
277
278
  disableIntersectionObserver();
278
279
  }
@@ -328,8 +329,9 @@ function useAutocomplete(props, emit) {
328
329
  }
329
330
  __name(onModelValueChange, "onModelValueChange");
330
331
  function setInputValueToCurrentSelection() {
332
+ var _a, _b;
331
333
  const inputEl = document.getElementById(`${getId}`);
332
- inputEl.value = currentLabel.value || currentValue.value;
334
+ inputEl.value = (_b = (_a = currentLabel.value) != null ? _a : currentValue.value) != null ? _b : "";
333
335
  }
334
336
  __name(setInputValueToCurrentSelection, "setInputValueToCurrentSelection");
335
337
  function handleForceFocusToInput() {
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  MpAutocomplete
3
- } from "./chunk-XKIKHDOG.mjs";
4
- import "./chunk-5V7PO5OY.mjs";
3
+ } from "./chunk-WCITJGYW.mjs";
4
+ import "./chunk-GNDEHE7F.mjs";
5
5
  import "./chunk-Q7SGQCOH.mjs";
6
6
  import "./chunk-QZ7VFGWC.mjs";
7
7
  export {
@@ -1 +1 @@
1
- {"inputs":{"src/modules/autocomplete.props.ts":{"bytes":3480,"imports":[],"format":"esm"},"src/modules/autocomplete.hooks.ts":{"bytes":13089,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/autocomplete.tsx":{"bytes":5091,"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/recipes","kind":"import-statement","external":true},{"path":"@mekari/pixel3-utils","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/recipes","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/patterns","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/autocomplete.tsx","inputs":{"src/autocomplete.tsx":{"bytesInOutput":5438},"src/modules/autocomplete.props.ts":{"bytesInOutput":1882},"src/modules/autocomplete.hooks.ts":{"bytesInOutput":13128}},"bytes":21571},"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/recipes","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/patterns","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":133},"src/autocomplete.tsx":{"bytesInOutput":5278},"src/modules/autocomplete.props.ts":{"bytesInOutput":1882},"src/modules/autocomplete.hooks.ts":{"bytesInOutput":13128}},"bytes":21561},"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/recipes","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/modules/autocomplete.hooks.ts","inputs":{"src/modules/autocomplete.hooks.ts":{"bytesInOutput":13308}},"bytes":14344},"dist/modules/autocomplete.props.js":{"imports":[],"exports":[],"entryPoint":"src/modules/autocomplete.props.ts","inputs":{"src/modules/autocomplete.props.ts":{"bytesInOutput":2231}},"bytes":3199}}}
1
+ {"inputs":{"src/modules/autocomplete.props.ts":{"bytes":3480,"imports":[],"format":"esm"},"src/modules/autocomplete.hooks.ts":{"bytes":13125,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/autocomplete.tsx":{"bytes":5091,"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/recipes","kind":"import-statement","external":true},{"path":"@mekari/pixel3-utils","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/recipes","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/patterns","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/autocomplete.tsx","inputs":{"src/autocomplete.tsx":{"bytesInOutput":5438},"src/modules/autocomplete.props.ts":{"bytesInOutput":1882},"src/modules/autocomplete.hooks.ts":{"bytesInOutput":13218}},"bytes":21661},"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/recipes","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/patterns","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":133},"src/autocomplete.tsx":{"bytesInOutput":5278},"src/modules/autocomplete.props.ts":{"bytesInOutput":1882},"src/modules/autocomplete.hooks.ts":{"bytesInOutput":13218}},"bytes":21651},"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/recipes","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/modules/autocomplete.hooks.ts","inputs":{"src/modules/autocomplete.hooks.ts":{"bytesInOutput":13398}},"bytes":14434},"dist/modules/autocomplete.props.js":{"imports":[],"exports":[],"entryPoint":"src/modules/autocomplete.props.ts","inputs":{"src/modules/autocomplete.props.ts":{"bytesInOutput":2231}},"bytes":3199}}}
@@ -1 +1 @@
1
- {"inputs":{"src/modules/autocomplete.props.ts":{"bytes":3480,"imports":[],"format":"esm"},"src/modules/autocomplete.hooks.ts":{"bytes":13089,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/autocomplete.tsx":{"bytes":5091,"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/recipes","kind":"import-statement","external":true},{"path":"@mekari/pixel3-utils","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-XKIKHDOG.mjs","kind":"import-statement"},{"path":"dist/chunk-5V7PO5OY.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-XKIKHDOG.mjs","kind":"import-statement"},{"path":"dist/chunk-5V7PO5OY.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-XKIKHDOG.mjs":{"imports":[{"path":"dist/chunk-5V7PO5OY.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/recipes","kind":"import-statement","external":true},{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true}],"exports":["MpAutocomplete"],"inputs":{"src/autocomplete.tsx":{"bytesInOutput":4589}},"bytes":4762},"dist/modules/autocomplete.hooks.mjs":{"imports":[{"path":"dist/chunk-5V7PO5OY.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-5V7PO5OY.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/recipes","kind":"import-statement","external":true}],"exports":["useAutocomplete"],"inputs":{"src/modules/autocomplete.hooks.ts":{"bytesInOutput":12500}},"bytes":12618},"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}}}
1
+ {"inputs":{"src/modules/autocomplete.props.ts":{"bytes":3480,"imports":[],"format":"esm"},"src/modules/autocomplete.hooks.ts":{"bytes":13125,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/autocomplete.tsx":{"bytes":5091,"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/recipes","kind":"import-statement","external":true},{"path":"@mekari/pixel3-utils","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-WCITJGYW.mjs","kind":"import-statement"},{"path":"dist/chunk-GNDEHE7F.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-WCITJGYW.mjs","kind":"import-statement"},{"path":"dist/chunk-GNDEHE7F.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-WCITJGYW.mjs":{"imports":[{"path":"dist/chunk-GNDEHE7F.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/recipes","kind":"import-statement","external":true},{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true}],"exports":["MpAutocomplete"],"inputs":{"src/autocomplete.tsx":{"bytesInOutput":4589}},"bytes":4762},"dist/modules/autocomplete.hooks.mjs":{"imports":[{"path":"dist/chunk-GNDEHE7F.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-GNDEHE7F.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/recipes","kind":"import-statement","external":true}],"exports":["useAutocomplete"],"inputs":{"src/modules/autocomplete.hooks.ts":{"bytesInOutput":12590}},"bytes":12708},"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}}}
@@ -141,6 +141,7 @@ function useAutocomplete(props, emit) {
141
141
  const inputEl = document.getElementById(`${getId}`);
142
142
  inputEl == null ? void 0 : inputEl.blur();
143
143
  setInputValueToCurrentSelection();
144
+ currentSearch.value = "";
144
145
  if (isInfinityScroll.value) {
145
146
  disableIntersectionObserver();
146
147
  }
@@ -196,8 +197,9 @@ function useAutocomplete(props, emit) {
196
197
  }
197
198
  __name(onModelValueChange, "onModelValueChange");
198
199
  function setInputValueToCurrentSelection() {
200
+ var _a, _b;
199
201
  const inputEl = document.getElementById(`${getId}`);
200
- inputEl.value = currentLabel.value || currentValue.value;
202
+ inputEl.value = (_b = (_a = currentLabel.value) != null ? _a : currentValue.value) != null ? _b : "";
201
203
  }
202
204
  __name(setInputValueToCurrentSelection, "setInputValueToCurrentSelection");
203
205
  function handleForceFocusToInput() {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useAutocomplete
3
- } from "../chunk-5V7PO5OY.mjs";
3
+ } from "../chunk-GNDEHE7F.mjs";
4
4
  import "../chunk-QZ7VFGWC.mjs";
5
5
  export {
6
6
  useAutocomplete
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.18",
4
+ "version": "0.0.19",
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.1.3",
12
- "@mekari/pixel3-input": "0.0.18",
13
- "@mekari/pixel3-spinner": "0.0.18",
14
- "@mekari/pixel3-icon": "0.0.18",
11
+ "@mekari/pixel3-input": "0.0.19",
12
+ "@mekari/pixel3-styled-system": "0.1.4",
15
13
  "@mekari/pixel3-utils": "0.0.7",
16
- "@mekari/pixel3-popover": "0.0.18",
17
- "@mekari/pixel3-text": "0.0.17"
14
+ "@mekari/pixel3-spinner": "0.0.19",
15
+ "@mekari/pixel3-icon": "0.0.19",
16
+ "@mekari/pixel3-popover": "0.0.19",
17
+ "@mekari/pixel3-text": "0.0.18"
18
18
  },
19
19
  "peerDependencies": {
20
20
  "vue": "^3.4.9"