v-nuxt-ui 0.2.22 → 0.2.24

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
@@ -7,7 +7,7 @@
7
7
  "dependencies": [
8
8
  "@nuxt/ui"
9
9
  ],
10
- "version": "0.2.22",
10
+ "version": "0.2.24",
11
11
  "builder": {
12
12
  "@nuxt/module-builder": "1.0.2",
13
13
  "unbuild": "3.6.1"
@@ -1,4 +1,5 @@
1
1
  <script setup>
2
+ import { isEmptyString } from "#v/utils";
2
3
  import { computed, ref, useTemplateRef } from "vue";
3
4
  const props = defineProps({
4
5
  label: { type: String, required: false },
@@ -21,8 +22,9 @@ const getItemLabel = (item) => {
21
22
  }
22
23
  return String(item?.label ?? "");
23
24
  };
25
+ const dropdownOpen = ref(false);
24
26
  const filteredItems = computed(() => {
25
- if (!searchTerm.value) {
27
+ if (isEmptyString(searchTerm.value) || !dropdownOpen.value) {
26
28
  return props.items;
27
29
  }
28
30
  return props.items.filter((item) => getItemLabel(item).toLowerCase().includes(searchTerm.value.toLowerCase()));
@@ -44,11 +46,12 @@ defineExpose({
44
46
  <template>
45
47
  <UInputMenu
46
48
  ref="inputMenu"
49
+ v-model:open="dropdownOpen"
47
50
  v-model:search-term="searchTerm"
48
51
  v-model="modelValue"
49
52
  :items="filteredItems"
50
53
  :placeholder="placeholder"
51
- :multiple="multiple ?? false"
54
+ :multiple="multiple"
52
55
  :size="size"
53
56
  color="neutral"
54
57
  delete-icon="i-lucide-trash"
@@ -59,6 +62,7 @@ defineExpose({
59
62
  :disabled="disabled"
60
63
  open-on-focus
61
64
  trailing
65
+ ignore-filter
62
66
  :ui="ui"
63
67
  :content="{
64
68
  align: 'start'
@@ -29,7 +29,7 @@ const props = defineProps({
29
29
  const modelValue = defineModel("modelValue", { type: null, ...{ required: true } });
30
30
  const modelValueWithValueField = ref(modelValue.value?.map((item) => item[props.valueField]));
31
31
  watch(
32
- [props.initModel, modelValueWithValueField],
32
+ [() => props.initModel, modelValueWithValueField],
33
33
  () => {
34
34
  const newModelValue = [];
35
35
  modelValueWithValueField.value?.forEach((value) => {
@@ -77,7 +77,7 @@ defineExpose({ createRow, updateRow, deleteRow, refresh: fetchList, stats, data
77
77
  <template>
78
78
  <div class="flex-1 flex flex-col overflow-hidden">
79
79
  <!-- header -->
80
- <div class="h-(--ui-header-height) flex items-center pl-2.5 pr-2.5 border-b border-default">
80
+ <div class="h-(--ui-header-height) flex items-center pl-2.5 pr-2.5 border-b border-default z-1">
81
81
  <div class="flex items-center gap-1">
82
82
  <LayoutButtonCollapse />
83
83
  <span class="font-bold">{{ cnName }}</span>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "v-nuxt-ui",
3
- "version": "0.2.22",
3
+ "version": "0.2.24",
4
4
  "description": "Veken UI Component Library - Reusable Nuxt UI components, composables, and utilities for enterprise applications",
5
5
  "type": "module",
6
6
  "style": "./dist/runtime/index.css",