@tekkare/auriga 0.2.94 → 0.2.95

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/module.json CHANGED
@@ -4,5 +4,5 @@
4
4
  "compatibility": {
5
5
  "nuxt": "^3.0.0"
6
6
  },
7
- "version": "0.2.94"
7
+ "version": "0.2.95"
8
8
  }
@@ -19,7 +19,7 @@
19
19
  class="search-icon"
20
20
  />
21
21
  <input
22
- id="search_input"
22
+ :id="searchBarId"
23
23
  v-model="searchValue"
24
24
  class="filters_input_style"
25
25
  :placeholder="placeHolderValue"
@@ -118,6 +118,10 @@ export default defineComponent({
118
118
  highlightInput: {
119
119
  type: Boolean,
120
120
  default: false
121
+ },
122
+ searchBarId: {
123
+ type: String,
124
+ default: "search_input_simple"
121
125
  }
122
126
  },
123
127
  emits: ["update:Value", "submitSearch", "selectSuggestion"],
@@ -177,9 +181,7 @@ export default defineComponent({
177
181
  () => {
178
182
  if (searchValue.value.length > 0 && props.suggestions !== null) {
179
183
  if (!closeOnEnter.value) {
180
- setTimeout(() => {
181
- openSugg();
182
- });
184
+ openSugg();
183
185
  } else {
184
186
  closeSugg();
185
187
  }
@@ -227,6 +229,9 @@ export default defineComponent({
227
229
  searchValue.value = sugg.text;
228
230
  emit("update:Value", searchValue.value);
229
231
  emit("selectSuggestion", searchValue.value);
232
+ setTimeout(() => {
233
+ closeOnEnter.value = false;
234
+ });
230
235
  };
231
236
  function closeSugg() {
232
237
  suggOpen.value = false;
@@ -246,11 +251,12 @@ export default defineComponent({
246
251
  };
247
252
  }
248
253
  function handleInput(event) {
254
+ openSugg();
249
255
  searchValue.value = event?.target?.value;
250
256
  emit("update:Value", searchValue.value);
251
257
  }
252
258
  onMounted(() => {
253
- searchBar.value = document.getElementById("search_input");
259
+ searchBar.value = document.getElementById("search_input_simple");
254
260
  searchBar.value.addEventListener("input", debounce(handleInput, 300));
255
261
  searchValue.value = props.defaultValue;
256
262
  });
@@ -269,6 +275,9 @@ export default defineComponent({
269
275
  searchValue.value = filterSuggestions.value[optionIndex.value - 1].text;
270
276
  emit("update:Value", searchValue.value);
271
277
  emit("selectSuggestion", searchValue.value);
278
+ setTimeout(() => {
279
+ closeOnEnter.value = false;
280
+ });
272
281
  }
273
282
  emit("submitSearch");
274
283
  }
@@ -46,6 +46,10 @@ declare const _default: import("vue").DefineComponent<{
46
46
  type: BooleanConstructor;
47
47
  default: boolean;
48
48
  };
49
+ searchBarId: {
50
+ type: StringConstructor;
51
+ default: string;
52
+ };
49
53
  }, {
50
54
  searchValue: import("vue").Ref<string>;
51
55
  submitSearch: () => void;
@@ -105,6 +109,10 @@ declare const _default: import("vue").DefineComponent<{
105
109
  type: BooleanConstructor;
106
110
  default: boolean;
107
111
  };
112
+ searchBarId: {
113
+ type: StringConstructor;
114
+ default: string;
115
+ };
108
116
  }>> & {
109
117
  "onUpdate:Value"?: ((...args: any[]) => any) | undefined;
110
118
  onSubmitSearch?: ((...args: any[]) => any) | undefined;
@@ -117,5 +125,6 @@ declare const _default: import("vue").DefineComponent<{
117
125
  loadingSuggs: boolean;
118
126
  highlightInput: boolean;
119
127
  defaultValue: string;
128
+ searchBarId: string;
120
129
  }, {}>;
121
130
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tekkare/auriga",
3
- "version": "0.2.94",
3
+ "version": "0.2.95",
4
4
  "description": "Aurgia is a UI kit developped by Tekkare",
5
5
  "license": "MIT",
6
6
  "type": "module",