@mekari/pixel3-autocomplete 0.0.17-dev.4 → 0.0.17-dev.6

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.
@@ -254,14 +254,14 @@ declare const MpAutocomplete: vue.DefineComponent<{
254
254
  default: boolean;
255
255
  };
256
256
  }>> & {
257
- "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
258
- onInput?: ((...args: any[]) => any) | undefined;
257
+ onFocus?: ((...args: any[]) => any) | undefined;
259
258
  onChange?: ((...args: any[]) => any) | undefined;
259
+ onInput?: ((...args: any[]) => any) | undefined;
260
+ onClear?: ((...args: any[]) => any) | undefined;
261
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
260
262
  onEnter?: ((...args: any[]) => any) | undefined;
261
263
  onScrollEnd?: ((...args: any[]) => any) | undefined;
262
264
  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[];
@@ -254,14 +254,14 @@ declare const MpAutocomplete: vue.DefineComponent<{
254
254
  default: boolean;
255
255
  };
256
256
  }>> & {
257
- "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
258
- onInput?: ((...args: any[]) => any) | undefined;
257
+ onFocus?: ((...args: any[]) => any) | undefined;
259
258
  onChange?: ((...args: any[]) => any) | undefined;
259
+ onInput?: ((...args: any[]) => any) | undefined;
260
+ onClear?: ((...args: any[]) => any) | undefined;
261
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
260
262
  onEnter?: ((...args: any[]) => any) | undefined;
261
263
  onScrollEnd?: ((...args: any[]) => any) | undefined;
262
264
  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[];
@@ -317,6 +317,10 @@ function useAutocomplete(props, emit) {
317
317
  currentValue.value = props.modelValue;
318
318
  currentLabel.value = getLabel(data2);
319
319
  currentSearch.value = getLabel(data2);
320
+ } else {
321
+ currentValue.value = props.modelValue;
322
+ currentLabel.value = "";
323
+ currentSearch.value = "";
320
324
  }
321
325
  }
322
326
  __name(onModelValueChange, "onModelValueChange");
@@ -463,6 +467,7 @@ function useAutocomplete(props, emit) {
463
467
  },
464
468
  onClear: (e) => {
465
469
  onSelectListItem("");
470
+ currentLabel.value = "";
466
471
  const inputEl = document.getElementById(`${getId}`);
467
472
  if (inputEl)
468
473
  inputEl.value = "";
@@ -513,10 +518,7 @@ function useAutocomplete(props, emit) {
513
518
  "aria-selected": isListItemActive(item) ? true : void 0
514
519
  };
515
520
  }, "popoverListItemAttrs");
516
- (0, import_vue.watch)(() => props.modelValue, (newValue) => {
517
- if (newValue)
518
- onModelValueChange();
519
- });
521
+ (0, import_vue.watch)(() => props.modelValue, () => onModelValueChange());
520
522
  (0, import_vue.watch)(() => props.data, () => {
521
523
  if (props.isManualFilter && isPopoverOpen.value) {
522
524
  (0, import_vue.nextTick)(() => {
@@ -628,7 +630,7 @@ var MpAutocomplete = (0, import_vue3.defineComponent)({
628
630
  default: () => [slots.leftAddon && (0, import_vue2.createVNode)(import_pixel3_input.MpInputLeftAddon, {
629
631
  "id": `${popoverAtrrs.value.id}-right-addon`
630
632
  }, {
631
- default: () => [(0, import_vue2.createTextVNode)(" "), slots.leftAddon(), (0, import_vue2.createTextVNode)(" ")]
633
+ default: () => [" ", slots.leftAddon(), " "]
632
634
  }), (0, import_vue2.createVNode)(import_pixel3_input.MpInput, (0, import_vue2.mergeProps)(inputAtrrs.value, attrs), null), (0, import_vue2.createVNode)(import_pixel3_input.MpInputRightAddon, {
633
635
  "id": `${popoverAtrrs.value.id}-right-addon`
634
636
  }, {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  MpAutocomplete
3
- } from "./chunk-R5D752AH.mjs";
4
- import "./chunk-5TPEEDUH.mjs";
3
+ } from "./chunk-Y5MTC2O3.mjs";
4
+ import "./chunk-2AEXGKWY.mjs";
5
5
  import "./chunk-Q7SGQCOH.mjs";
6
6
  import "./chunk-QZ7VFGWC.mjs";
7
7
  export {
@@ -166,6 +166,10 @@ function useAutocomplete(props, emit) {
166
166
  currentValue.value = props.modelValue;
167
167
  currentLabel.value = getLabel(data2);
168
168
  currentSearch.value = getLabel(data2);
169
+ } else {
170
+ currentValue.value = props.modelValue;
171
+ currentLabel.value = "";
172
+ currentSearch.value = "";
169
173
  }
170
174
  }
171
175
  __name(onModelValueChange, "onModelValueChange");
@@ -312,6 +316,7 @@ function useAutocomplete(props, emit) {
312
316
  },
313
317
  onClear: (e) => {
314
318
  onSelectListItem("");
319
+ currentLabel.value = "";
315
320
  const inputEl = document.getElementById(`${getId}`);
316
321
  if (inputEl)
317
322
  inputEl.value = "";
@@ -362,10 +367,7 @@ function useAutocomplete(props, emit) {
362
367
  "aria-selected": isListItemActive(item) ? true : void 0
363
368
  };
364
369
  }, "popoverListItemAttrs");
365
- watch(() => props.modelValue, (newValue) => {
366
- if (newValue)
367
- onModelValueChange();
368
- });
370
+ watch(() => props.modelValue, () => onModelValueChange());
369
371
  watch(() => props.data, () => {
370
372
  if (props.isManualFilter && isPopoverOpen.value) {
371
373
  nextTick(() => {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useAutocomplete
3
- } from "./chunk-5TPEEDUH.mjs";
3
+ } from "./chunk-2AEXGKWY.mjs";
4
4
  import {
5
5
  autocompleteProps
6
6
  } from "./chunk-Q7SGQCOH.mjs";
@@ -93,7 +93,7 @@ var MpAutocomplete = defineComponent({
93
93
  default: () => [slots.leftAddon && _createVNode(MpInputLeftAddon, {
94
94
  "id": `${popoverAtrrs.value.id}-right-addon`
95
95
  }, {
96
- default: () => [_createTextVNode(" "), slots.leftAddon(), _createTextVNode(" ")]
96
+ default: () => [" ", slots.leftAddon(), " "]
97
97
  }), _createVNode(MpInput, _mergeProps(inputAtrrs.value, attrs), null), _createVNode(MpInputRightAddon, {
98
98
  "id": `${popoverAtrrs.value.id}-right-addon`
99
99
  }, {
package/dist/index.js CHANGED
@@ -319,6 +319,10 @@ function useAutocomplete(props, emit) {
319
319
  currentValue.value = props.modelValue;
320
320
  currentLabel.value = getLabel(data2);
321
321
  currentSearch.value = getLabel(data2);
322
+ } else {
323
+ currentValue.value = props.modelValue;
324
+ currentLabel.value = "";
325
+ currentSearch.value = "";
322
326
  }
323
327
  }
324
328
  __name(onModelValueChange, "onModelValueChange");
@@ -465,6 +469,7 @@ function useAutocomplete(props, emit) {
465
469
  },
466
470
  onClear: (e) => {
467
471
  onSelectListItem("");
472
+ currentLabel.value = "";
468
473
  const inputEl = document.getElementById(`${getId}`);
469
474
  if (inputEl)
470
475
  inputEl.value = "";
@@ -515,10 +520,7 @@ function useAutocomplete(props, emit) {
515
520
  "aria-selected": isListItemActive(item) ? true : void 0
516
521
  };
517
522
  }, "popoverListItemAttrs");
518
- (0, import_vue.watch)(() => props.modelValue, (newValue) => {
519
- if (newValue)
520
- onModelValueChange();
521
- });
523
+ (0, import_vue.watch)(() => props.modelValue, () => onModelValueChange());
522
524
  (0, import_vue.watch)(() => props.data, () => {
523
525
  if (props.isManualFilter && isPopoverOpen.value) {
524
526
  (0, import_vue.nextTick)(() => {
@@ -630,7 +632,7 @@ var MpAutocomplete = (0, import_vue3.defineComponent)({
630
632
  default: () => [slots.leftAddon && (0, import_vue2.createVNode)(import_pixel3_input.MpInputLeftAddon, {
631
633
  "id": `${popoverAtrrs.value.id}-right-addon`
632
634
  }, {
633
- default: () => [(0, import_vue2.createTextVNode)(" "), slots.leftAddon(), (0, import_vue2.createTextVNode)(" ")]
635
+ default: () => [" ", slots.leftAddon(), " "]
634
636
  }), (0, import_vue2.createVNode)(import_pixel3_input.MpInput, (0, import_vue2.mergeProps)(inputAtrrs.value, attrs), null), (0, import_vue2.createVNode)(import_pixel3_input.MpInputRightAddon, {
635
637
  "id": `${popoverAtrrs.value.id}-right-addon`
636
638
  }, {
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  MpAutocomplete
3
- } from "./chunk-R5D752AH.mjs";
4
- import "./chunk-5TPEEDUH.mjs";
3
+ } from "./chunk-Y5MTC2O3.mjs";
4
+ import "./chunk-2AEXGKWY.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":12667,"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":5127,"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":5506},"src/modules/autocomplete.props.ts":{"bytesInOutput":1882},"src/modules/autocomplete.hooks.ts":{"bytesInOutput":12726}},"bytes":21237},"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":5346},"src/modules/autocomplete.props.ts":{"bytesInOutput":1882},"src/modules/autocomplete.hooks.ts":{"bytesInOutput":12726}},"bytes":21227},"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":12906}},"bytes":13942},"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":12790,"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":12841}},"bytes":21284},"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":12841}},"bytes":21274},"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":13021}},"bytes":14057},"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":12667,"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":5127,"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-R5D752AH.mjs","kind":"import-statement"},{"path":"dist/chunk-5TPEEDUH.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-R5D752AH.mjs","kind":"import-statement"},{"path":"dist/chunk-5TPEEDUH.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-R5D752AH.mjs":{"imports":[{"path":"dist/chunk-5TPEEDUH.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":4625}},"bytes":4798},"dist/modules/autocomplete.hooks.mjs":{"imports":[{"path":"dist/chunk-5TPEEDUH.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-5TPEEDUH.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":12098}},"bytes":12216},"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":12790,"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-Y5MTC2O3.mjs","kind":"import-statement"},{"path":"dist/chunk-2AEXGKWY.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-Y5MTC2O3.mjs","kind":"import-statement"},{"path":"dist/chunk-2AEXGKWY.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-Y5MTC2O3.mjs":{"imports":[{"path":"dist/chunk-2AEXGKWY.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-2AEXGKWY.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-2AEXGKWY.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":12213}},"bytes":12331},"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}}}
@@ -187,6 +187,10 @@ function useAutocomplete(props, emit) {
187
187
  currentValue.value = props.modelValue;
188
188
  currentLabel.value = getLabel(data2);
189
189
  currentSearch.value = getLabel(data2);
190
+ } else {
191
+ currentValue.value = props.modelValue;
192
+ currentLabel.value = "";
193
+ currentSearch.value = "";
190
194
  }
191
195
  }
192
196
  __name(onModelValueChange, "onModelValueChange");
@@ -333,6 +337,7 @@ function useAutocomplete(props, emit) {
333
337
  },
334
338
  onClear: (e) => {
335
339
  onSelectListItem("");
340
+ currentLabel.value = "";
336
341
  const inputEl = document.getElementById(`${getId}`);
337
342
  if (inputEl)
338
343
  inputEl.value = "";
@@ -383,10 +388,7 @@ function useAutocomplete(props, emit) {
383
388
  "aria-selected": isListItemActive(item) ? true : void 0
384
389
  };
385
390
  }, "popoverListItemAttrs");
386
- (0, import_vue.watch)(() => props.modelValue, (newValue) => {
387
- if (newValue)
388
- onModelValueChange();
389
- });
391
+ (0, import_vue.watch)(() => props.modelValue, () => onModelValueChange());
390
392
  (0, import_vue.watch)(() => props.data, () => {
391
393
  if (props.isManualFilter && isPopoverOpen.value) {
392
394
  (0, import_vue.nextTick)(() => {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useAutocomplete
3
- } from "../chunk-5TPEEDUH.mjs";
3
+ } from "../chunk-2AEXGKWY.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.17-dev.4",
4
+ "version": "0.0.17-dev.6",
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.2-dev.2",
12
- "@mekari/pixel3-utils": "0.0.7-dev.1",
13
- "@mekari/pixel3-input": "0.0.17-dev.4",
14
- "@mekari/pixel3-spinner": "0.0.17-dev.4",
15
- "@mekari/pixel3-icon": "0.0.17-dev.4",
16
- "@mekari/pixel3-popover": "0.0.17-dev.4",
17
- "@mekari/pixel3-text": "0.0.16-dev.2"
11
+ "@mekari/pixel3-styled-system": "0.1.2-dev.4",
12
+ "@mekari/pixel3-input": "0.0.17-dev.6",
13
+ "@mekari/pixel3-spinner": "0.0.17-dev.6",
14
+ "@mekari/pixel3-icon": "0.0.17-dev.6",
15
+ "@mekari/pixel3-utils": "0.0.7-dev.2",
16
+ "@mekari/pixel3-popover": "0.0.17-dev.6",
17
+ "@mekari/pixel3-text": "0.0.16-dev.4"
18
18
  },
19
19
  "peerDependencies": {
20
20
  "vue": "^3.4.9"