@mekari/pixel3-autocomplete 0.0.17-dev.5 → 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");
@@ -514,10 +518,7 @@ function useAutocomplete(props, emit) {
514
518
  "aria-selected": isListItemActive(item) ? true : void 0
515
519
  };
516
520
  }, "popoverListItemAttrs");
517
- (0, import_vue.watch)(() => props.modelValue, (newValue) => {
518
- if (newValue)
519
- onModelValueChange();
520
- });
521
+ (0, import_vue.watch)(() => props.modelValue, () => onModelValueChange());
521
522
  (0, import_vue.watch)(() => props.data, () => {
522
523
  if (props.isManualFilter && isPopoverOpen.value) {
523
524
  (0, import_vue.nextTick)(() => {
@@ -629,7 +630,7 @@ var MpAutocomplete = (0, import_vue3.defineComponent)({
629
630
  default: () => [slots.leftAddon && (0, import_vue2.createVNode)(import_pixel3_input.MpInputLeftAddon, {
630
631
  "id": `${popoverAtrrs.value.id}-right-addon`
631
632
  }, {
632
- default: () => [(0, import_vue2.createTextVNode)(" "), slots.leftAddon(), (0, import_vue2.createTextVNode)(" ")]
633
+ default: () => [" ", slots.leftAddon(), " "]
633
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, {
634
635
  "id": `${popoverAtrrs.value.id}-right-addon`
635
636
  }, {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  MpAutocomplete
3
- } from "./chunk-3MRZO7RL.mjs";
4
- import "./chunk-BABV7IXR.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");
@@ -363,10 +367,7 @@ function useAutocomplete(props, emit) {
363
367
  "aria-selected": isListItemActive(item) ? true : void 0
364
368
  };
365
369
  }, "popoverListItemAttrs");
366
- watch(() => props.modelValue, (newValue) => {
367
- if (newValue)
368
- onModelValueChange();
369
- });
370
+ watch(() => props.modelValue, () => onModelValueChange());
370
371
  watch(() => props.data, () => {
371
372
  if (props.isManualFilter && isPopoverOpen.value) {
372
373
  nextTick(() => {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useAutocomplete
3
- } from "./chunk-BABV7IXR.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");
@@ -516,10 +520,7 @@ function useAutocomplete(props, emit) {
516
520
  "aria-selected": isListItemActive(item) ? true : void 0
517
521
  };
518
522
  }, "popoverListItemAttrs");
519
- (0, import_vue.watch)(() => props.modelValue, (newValue) => {
520
- if (newValue)
521
- onModelValueChange();
522
- });
523
+ (0, import_vue.watch)(() => props.modelValue, () => onModelValueChange());
523
524
  (0, import_vue.watch)(() => props.data, () => {
524
525
  if (props.isManualFilter && isPopoverOpen.value) {
525
526
  (0, import_vue.nextTick)(() => {
@@ -631,7 +632,7 @@ var MpAutocomplete = (0, import_vue3.defineComponent)({
631
632
  default: () => [slots.leftAddon && (0, import_vue2.createVNode)(import_pixel3_input.MpInputLeftAddon, {
632
633
  "id": `${popoverAtrrs.value.id}-right-addon`
633
634
  }, {
634
- default: () => [(0, import_vue2.createTextVNode)(" "), slots.leftAddon(), (0, import_vue2.createTextVNode)(" ")]
635
+ default: () => [" ", slots.leftAddon(), " "]
635
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, {
636
637
  "id": `${popoverAtrrs.value.id}-right-addon`
637
638
  }, {
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  MpAutocomplete
3
- } from "./chunk-3MRZO7RL.mjs";
4
- import "./chunk-BABV7IXR.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":12700,"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":12759}},"bytes":21270},"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":12759}},"bytes":21260},"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":12939}},"bytes":13975},"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":12700,"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-3MRZO7RL.mjs","kind":"import-statement"},{"path":"dist/chunk-BABV7IXR.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-3MRZO7RL.mjs","kind":"import-statement"},{"path":"dist/chunk-BABV7IXR.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-3MRZO7RL.mjs":{"imports":[{"path":"dist/chunk-BABV7IXR.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-BABV7IXR.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-BABV7IXR.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":12131}},"bytes":12249},"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");
@@ -384,10 +388,7 @@ function useAutocomplete(props, emit) {
384
388
  "aria-selected": isListItemActive(item) ? true : void 0
385
389
  };
386
390
  }, "popoverListItemAttrs");
387
- (0, import_vue.watch)(() => props.modelValue, (newValue) => {
388
- if (newValue)
389
- onModelValueChange();
390
- });
391
+ (0, import_vue.watch)(() => props.modelValue, () => onModelValueChange());
391
392
  (0, import_vue.watch)(() => props.data, () => {
392
393
  if (props.isManualFilter && isPopoverOpen.value) {
393
394
  (0, import_vue.nextTick)(() => {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useAutocomplete
3
- } from "../chunk-BABV7IXR.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.5",
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.3",
12
- "@mekari/pixel3-utils": "0.0.7-dev.1",
13
- "@mekari/pixel3-input": "0.0.17-dev.5",
14
- "@mekari/pixel3-spinner": "0.0.17-dev.5",
15
- "@mekari/pixel3-icon": "0.0.17-dev.5",
16
- "@mekari/pixel3-popover": "0.0.17-dev.5",
17
- "@mekari/pixel3-text": "0.0.16-dev.3"
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"