edvoyui-component-library-test-flight 0.0.52 → 0.0.53

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.
@@ -0,0 +1,5 @@
1
+ export * from "/Volumes/work/repos/edvoy-ui-v2/src/components/searchexpand/EUISearchToggle.vue?vue&type=script&setup=true&lang.ts";
2
+ import "/Volumes/work/repos/edvoy-ui-v2/src/components/searchexpand/EUISearchToggle.vue?vue&type=style&index=0&scoped=69488444&lang.css";
3
+ declare const _default: any;
4
+ export default _default;
5
+ //# sourceMappingURL=EUISearchToggle.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EUISearchToggle.vue.d.ts","sourceRoot":"","sources":["../../src/components/searchexpand/EUISearchToggle.vue"],"names":[],"mappings":"AACA,cAAc,oHAAoH,CAAC;AACnI,OAAO,iIAAiI,CAAC;;AAEzI,wBAA0F"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "edvoyui-component-library-test-flight",
3
3
  "private": false,
4
- "version": "0.0.52",
4
+ "version": "0.0.53",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist/",
@@ -20,6 +20,15 @@ const meta: Meta<typeof EUIAccordion> = {
20
20
  description:
21
21
  "Accordion panel default one opened. Next one click close previous another one open",
22
22
  },
23
+ accordionStyle: {
24
+ control: "select",
25
+ options: ["grouped", "separated"],
26
+ },
27
+ className: {
28
+ control: "text",
29
+ description:
30
+ "Additional CSS classes for styling the accordion container.",
31
+ },
23
32
  },
24
33
  } satisfies Meta<typeof EUIAccordion>;
25
34
 
@@ -51,6 +60,7 @@ export const Default: Story = {
51
60
  },
52
61
  ],
53
62
  defaultOpen: [1],
63
+ accordionStyle: "grouped",
54
64
  },
55
65
  render: (args) => ({
56
66
  components: { EUIAccordion },
@@ -97,6 +107,43 @@ export const AccordionCollopse: Story = {
97
107
  }),
98
108
  };
99
109
 
110
+ export const AccordionSeparated: Story = {
111
+ args: {
112
+ datas: [
113
+ {
114
+ title: "1.How long does the course take?",
115
+ content:
116
+ "The video content takes more than 4.5 hours. In addition, you can test gained knowledge on 30 quizzes and practical tasks.",
117
+ },
118
+ {
119
+ title: "2.How long does the course take?",
120
+ content:
121
+ "The video content takes more than 4.5 hours. In addition, you can test gained knowledge on 30 quizzes and practical tasks.",
122
+ },
123
+ {
124
+ title: "3.How long does the course take?",
125
+ content:
126
+ "The video content takes more than 4.5 hours. In addition, you can test gained knowledge on 30 quizzes and practical tasks.",
127
+ },
128
+ {
129
+ title: "4.How long does the course take?",
130
+ content:
131
+ "The video content takes more than 4.5 hours. In addition, you can test gained knowledge on 30 quizzes and practical tasks.",
132
+ },
133
+ ],
134
+ defaultOpen: [1],
135
+ collapse: true,
136
+ accordionStyle: "separated",
137
+ },
138
+ render: (args) => ({
139
+ components: { EUIAccordion },
140
+ setup() {
141
+ return { args };
142
+ },
143
+ template: `<EUIAccordion v-bind="args" />`,
144
+ }),
145
+ };
146
+
100
147
  export const UseTemplate: Story = {
101
148
  args: {
102
149
  datas: [
@@ -1,54 +1,86 @@
1
1
  <template>
2
2
  <div>
3
- <div class="max-w-full p-2 bg-gray-50 rounded-xl">
4
- <details
5
- v-for="(item, index) in datas"
6
- :key="`accordion-${index}`"
7
- :open="openAccordions[index]"
8
- @click.prevent="onClick(index)"
9
- class="box-border relative mx-auto my-0 text-base font-normal transition-all duration-150 ease-in-out rounded-lg group hover:bg-gray-100 open:bg-gray-100 open:mb-4 open:last:mb-0"
3
+ <div
4
+ :class="[
5
+ accordionStyle === 'grouped' ? 'p-2 bg-gray-50 rounded-xl' : 'space-y-3',
6
+ 'max-w-full transition-all duration-100 ease-in-out',
7
+ ]"
10
8
  >
11
- <summary class="flex items-center p-4 font-semibold list-none cursor-pointer select-none focus:outline-none">
12
- <span
13
- class="w-11/12 text-gray-700 transition-all duration-200 ease-in-out faq-title group-hover:text-gray-900 group-open:text-gray-900">
14
- <slot name="title" :item="item">
15
- {{ item.title }}
16
- </slot>
17
- </span>
18
- <svg
19
- xmlns="http://www.w3.org/2000/svg"
20
- class="absolute text-gray-700 transition-all duration-150 ease-out pointer-events-none expand-icon group-open:text-gray-900 right-4 group-open:rotate-90"
21
- width="24"
22
- height="24"
23
- viewBox="0 0 24 24"
24
- stroke-width="2"
25
- stroke="currentColor"
26
- fill="none"
27
- stroke-linecap="round"
28
- stroke-linejoin="round"
9
+ <details
10
+ v-for="(item, index) in datas"
11
+ :key="`accordion-${index}`"
12
+ :open="openAccordions[index]"
13
+ @click.prevent="onClick(index)"
14
+ :class="[
15
+ accordionStyle === 'grouped'
16
+ ? 'rounded-lg hover:bg-gray-100 open:bg-gray-100 open:mb-4 open:last:mb-0'
17
+ : 'bg-white px-8 py-4 rounded-2xl hover:ring-2 hover:ring-purple-500 open:ring-2 ring-purple-700 open:shadow-lg open:shadow-purple-100',
18
+ 'box-border relative mx-auto my-0 text-base font-normal transition-colors duration-150 ease-in-out group', className
19
+ ]"
20
+ >
21
+ <summary
22
+ :class="[
23
+ accordionStyle === 'grouped'
24
+ ? 'p-4'
25
+ : 'group-open:pb-4 justify-center gap-6 group-open:border-b group-open:border-gray-200',
26
+ 'flex items-center font-semibold list-none cursor-pointer select-none focus:outline-none',
27
+ ]"
28
+ >
29
+ <div
30
+ :class="[
31
+ accordionStyle === 'grouped' ? 'w-11/12' : 'flex-initial w-10/12',
32
+ 'text-gray-700 transition-all duration-200 ease-in-out faq-title group-hover:text-gray-900 group-open:text-gray-900',
33
+ ]"
34
+ >
35
+ <slot name="title" :item="item">
36
+ {{ item.title }}
37
+ </slot>
38
+ </div>
39
+ <svg
40
+ v-if="accordionStyle === 'grouped'"
41
+ xmlns="http://www.w3.org/2000/svg"
42
+ class="absolute text-gray-700 transition-all duration-150 ease-out pointer-events-none expand-icon group-open:text-gray-900 right-4 group-open:rotate-90"
43
+ width="24"
44
+ height="24"
45
+ viewBox="0 0 24 24"
46
+ stroke-width="2"
47
+ stroke="currentColor"
48
+ fill="none"
49
+ stroke-linecap="round"
50
+ stroke-linejoin="round"
51
+ >
52
+ <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
53
+ <path d="M9 6l6 6l-6 6"></path>
54
+ </svg>
55
+ <div v-else class="flex-1 truncate">
56
+ <div class="flex items-end w-full text-start">
57
+ <slot name="right-icon" :item="item"></slot>
58
+ </div>
59
+ </div>
60
+ </summary>
61
+ <div
62
+ :class="[
63
+ accordionStyle === 'grouped' ? 'p-4 pt-1 ' : 'pt-3',
64
+ 'font-light text-gray-600',
65
+ ]"
29
66
  >
30
- <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
31
- <path d="M9 6l6 6l-6 6"></path>
32
- </svg>
33
- </summary>
34
- <div class="p-4 pt-1 font-light text-gray-600">
35
- <slot name="content" :item="item">
67
+ <slot name="content" :item="item">
36
68
  {{ item.content }}
37
69
  </slot>
38
- </div>
39
- </details>
40
- </div>
70
+ </div>
71
+ </details>
72
+ </div>
41
73
  </div>
42
74
  </template>
43
75
 
44
76
  <script setup lang="ts">
45
- import { onMounted, PropType, ref } from 'vue';
77
+ import { onMounted, PropType, ref } from "vue";
46
78
 
47
79
  const props = defineProps({
48
80
  datas: {
49
81
  type: Array as PropType<any[]>,
50
82
  required: true,
51
- default: () => []
83
+ default: () => [],
52
84
  },
53
85
  defaultOpen: {
54
86
  type: Array as PropType<number[]>,
@@ -56,8 +88,16 @@ const props = defineProps({
56
88
  },
57
89
  collapse: {
58
90
  type: Boolean,
59
- default: false
60
- }
91
+ default: false,
92
+ },
93
+ accordionStyle: {
94
+ type: String as PropType<"grouped" | "separated">,
95
+ default: "grouped",
96
+ },
97
+ className: {
98
+ type: String,
99
+ required: false,
100
+ },
61
101
  });
62
102
 
63
103
  const openAccordions = ref<boolean[]>(Array(props.datas.length).fill(false));
@@ -65,18 +105,20 @@ const openAccordions = ref<boolean[]>(Array(props.datas.length).fill(false));
65
105
  onMounted(() => {
66
106
  props.defaultOpen.forEach((index: number) => {
67
107
  if (index >= 0 && index < openAccordions.value.length) {
68
- openAccordions.value[index] = true; // Open specified accordions
108
+ openAccordions.value[index] = true; // Open specified accordions
69
109
  }
70
110
  });
71
111
  });
72
112
 
73
113
  const onClick = (index: number) => {
74
- // openAccordions.value = openAccordions.value.map((isOpen, i) => i === index ? !isOpen : isOpen);
114
+ // openAccordions.value = openAccordions.value.map((isOpen, i) => i === index ? !isOpen : isOpen);
75
115
 
76
- if (props.collapse) {
116
+ if (props.collapse) {
77
117
  openAccordions.value = openAccordions.value.map((_, i) => i === index);
78
118
  } else {
79
- openAccordions.value = openAccordions.value.map((isOpen, i) => i === index ? !isOpen : isOpen);
119
+ openAccordions.value = openAccordions.value.map((isOpen, i) =>
120
+ i === index ? !isOpen : isOpen
121
+ );
80
122
  }
81
123
  };
82
124
  </script>
@@ -4,13 +4,21 @@
4
4
  class="flex flex-row items-center justify-end max-w-screen-xl gap-6 mx-auto mb-10"
5
5
  >
6
6
  <div class="flex-1">
7
- Lorem ipsum dolor sit, amet consectetur adipisicing elit. Ad quibusdam illo nisi recusandae impedit nulla possimus, et delectus necessitatibus tempora maxime maiores dolores voluptates nemo ratione officia suscipit voluptatum iure.
7
+ Lorem ipsum dolor sit, amet consectetur adipisicing elit. Ad quibusdam
8
+ illo nisi recusandae impedit nulla possimus, et delectus necessitatibus
9
+ tempora maxime maiores dolores voluptates nemo ratione officia suscipit
10
+ voluptatum iure.
8
11
 
9
- {{ 'search Data:' + inputSearch + showSearch}}
12
+ {{ "search Data:" + inputSearch + showSearch }}
10
13
  </div>
11
14
  <div class="inline-flex flex-row gap-2">
12
- <EUISearchExpand v-model:model-value="inputSearch" :search-sync="showSearch" />
13
- <EUIButton color="primary" rounded size="sm" @click="closeSeach">Close</EUIButton>
15
+ <EUISearchToggle
16
+ v-model:model-value="inputSearch"
17
+ v-model:search-sync="showSearch"
18
+ />
19
+ <EUIButton color="primary" rounded size="sm" @click="toggleSearch"
20
+ >Close</EUIButton
21
+ >
14
22
  </div>
15
23
  <div class="relative border border-red-500 rounded-full size-12">
16
24
  <div class="absolute top-0 right-0"><EUISearch /></div>
@@ -30,107 +38,107 @@
30
38
  </div>
31
39
  <div class="grid max-w-3xl gap-4 mx-auto mb-6 sm:grid-cols-3">
32
40
  <div>
33
- <EUIDatepicker
34
- v-model:modelValue="datepickerRange"
35
- label="Date Min and max"
36
- placeholder="Select Date here..."
37
- :range="true"
38
- required
39
- :icon="CalendarIcon"
40
- iconType="startIcon"
41
- :min-date="minDate"
42
- :max-date="maxDate"
43
- />
44
- </div>
45
- <div>
46
- <EUIDatepicker
47
- v-model:modelValue="datepickerRange"
48
- label="Datepicker Range multi"
49
- placeholder="Select Date here..."
50
- :range="true"
51
- :multi-calendars="true"
52
- required
53
- :icon="CalendarIcon"
54
- iconType="startIcon"
55
- />
56
- <EUIButton @click="resetFilter">Reset</EUIButton>
57
- </div>
58
- <div>
59
- <EUIDatepicker
60
- v-model:modelValue="datepickerRange"
61
- label="Datepicker Range"
62
- placeholder="Select Date here..."
63
- :range="true"
64
- required
65
- :icon="CalendarIcon"
66
- iconType="startIcon"
67
- />
68
- </div>
69
- <div>
70
- <EUIDatepicker
71
- :disabled="false"
72
- label="Datepicker Single"
73
- v-model:modelValue="singleDate"
74
- placeholder="Select your date"
75
- :readonly="false"
76
- required
77
- :icon="CalendarIcon"
78
- iconType="endIcon"
79
- />
80
- </div>
81
- <div>
82
- <EUIDatepicker
83
- v-model:modelValue="timepicker"
84
- :disabled="false"
85
- label="Time Picker"
86
- placeholder="Select your time"
87
- :readonly="false"
88
- required
89
- :timePicker="true"
90
- />
41
+ <EUIDatepicker
42
+ v-model:modelValue="datepickerRange"
43
+ label="Date Min and max"
44
+ placeholder="Select Date here..."
45
+ :range="true"
46
+ required
47
+ :icon="CalendarIcon"
48
+ iconType="startIcon"
49
+ :min-date="minDate"
50
+ :max-date="maxDate"
51
+ />
52
+ </div>
53
+ <div>
54
+ <EUIDatepicker
55
+ v-model:modelValue="datepickerRange"
56
+ label="Datepicker Range multi"
57
+ placeholder="Select Date here..."
58
+ :range="true"
59
+ :multi-calendars="true"
60
+ required
61
+ :icon="CalendarIcon"
62
+ iconType="startIcon"
63
+ />
64
+ <EUIButton @click="resetFilter">Reset</EUIButton>
65
+ </div>
66
+ <div>
67
+ <EUIDatepicker
68
+ v-model:modelValue="datepickerRange"
69
+ label="Datepicker Range"
70
+ placeholder="Select Date here..."
71
+ :range="true"
72
+ required
73
+ :icon="CalendarIcon"
74
+ iconType="startIcon"
75
+ />
76
+ </div>
77
+ <div>
78
+ <EUIDatepicker
79
+ :disabled="false"
80
+ label="Datepicker Single"
81
+ v-model:modelValue="singleDate"
82
+ placeholder="Select your date"
83
+ :readonly="false"
84
+ required
85
+ :icon="CalendarIcon"
86
+ iconType="endIcon"
87
+ />
88
+ </div>
89
+ <div>
90
+ <EUIDatepicker
91
+ v-model:modelValue="timepicker"
92
+ :disabled="false"
93
+ label="Time Picker"
94
+ placeholder="Select your time"
95
+ :readonly="false"
96
+ required
97
+ :timePicker="true"
98
+ />
99
+ </div>
91
100
  </div>
92
- </div>
93
101
  <div class="grid max-w-3xl gap-4 mx-auto mb-6 sm:grid-cols-3">
94
- <div>
95
- <EUIDatepicker
96
- v-model:modelValue="datepickerRange"
97
- label="Datepicker Range"
98
- placeholder="Select Date here..."
99
- :range="true"
100
- required
101
- inputFilled
102
- :icon="CalendarIcon"
103
- iconType="startIcon"
104
- />
105
- </div>
102
+ <div>
103
+ <EUIDatepicker
104
+ v-model:modelValue="datepickerRange"
105
+ label="Datepicker Range"
106
+ placeholder="Select Date here..."
107
+ :range="true"
108
+ required
109
+ inputFilled
110
+ :icon="CalendarIcon"
111
+ iconType="startIcon"
112
+ />
113
+ </div>
106
114
 
107
- <div>
108
- <EUIDatepicker
109
- :disabled="false"
110
- label="Datepicker Single"
111
- v-model:modelValue="singleDate"
112
- placeholder="Select your date"
113
- :readonly="false"
114
- required
115
- inputFilled
116
- :icon="CalendarIcon"
117
- iconType="endIcon"
118
- />
119
- </div>
115
+ <div>
116
+ <EUIDatepicker
117
+ :disabled="false"
118
+ label="Datepicker Single"
119
+ v-model:modelValue="singleDate"
120
+ placeholder="Select your date"
121
+ :readonly="false"
122
+ required
123
+ inputFilled
124
+ :icon="CalendarIcon"
125
+ iconType="endIcon"
126
+ />
127
+ </div>
120
128
 
121
- <div>
122
- <EUIDatepicker
123
- v-model:modelValue="timepicker"
124
- :disabled="false"
125
- label="Time Picker"
126
- placeholder="Select your time"
127
- :readonly="false"
128
- :timePicker="true"
129
- required
130
- inputFilled
131
- />
129
+ <div>
130
+ <EUIDatepicker
131
+ v-model:modelValue="timepicker"
132
+ :disabled="false"
133
+ label="Time Picker"
134
+ placeholder="Select your time"
135
+ :readonly="false"
136
+ :timePicker="true"
137
+ required
138
+ inputFilled
139
+ />
140
+ </div>
132
141
  </div>
133
- </div>
134
142
 
135
143
  <EUITable
136
144
  :checkable="true"
@@ -183,7 +191,7 @@ import EUISearch from "./searchInput/EUISearch.vue";
183
191
  import EUIDatepicker from "./datepicker/EUIDatepicker.vue";
184
192
  import { CalendarIcon } from "@heroicons/vue/24/solid";
185
193
  import EUIButton from "./button/EUIButton.vue";
186
- import EUISearchExpand from "./searchexpand/EUISearchExpand.vue";
194
+ import EUISearchToggle from "./searchexpand/EUISearchToggle.vue";
187
195
 
188
196
  // TODO: Datepicker
189
197
  const datepickerRange = ref([
@@ -193,12 +201,12 @@ const datepickerRange = ref([
193
201
 
194
202
  const singleDate = ref(new Date());
195
203
 
196
- const inputSearch = ref('')
197
- const showSearch = ref(true)
204
+ const inputSearch = ref("");
205
+ const showSearch = ref(true);
198
206
 
199
- const closeSeach = () => {
200
- showSearch.value = false
201
- }
207
+ const toggleSearch = () => {
208
+ showSearch.value = !showSearch.value;
209
+ };
202
210
 
203
211
  const timepicker = ref({
204
212
  hours: new Date().getHours(),
@@ -242,8 +250,8 @@ const onSort = (field: string, order: string) => {
242
250
  };
243
251
 
244
252
  const resetFilter = () => {
245
- datepickerRange.value = []
246
- }
253
+ datepickerRange.value = [];
254
+ };
247
255
 
248
256
  const minDate = ref(new Date(2024, 11));
249
257
  const maxDate = ref(new Date());
@@ -17,7 +17,7 @@
17
17
  </slot>
18
18
  </button>
19
19
  <!-- Menu lists -->
20
- <div v-if="isOpen && menuItems.length" class="absolute left-0 z-0 p-2 mt-1 transition-all duration-300 ease-in-out bg-white border border-gray-200 border-solid rounded-lg shadow-2xl top-full shadow-gray-300 min-w-36 max-w-64 w-max" @click.stop>
20
+ <div v-if="isOpen && menuItems.length" class="absolute left-0 z-0 p-2 mt-1 transition-all duration-300 ease-in-out bg-white border border-gray-200 border-solid rounded-lg shadow-2xl top-full shadow-gray-300 min-w-32 max-w-64 w-max" @click.stop>
21
21
  <div
22
22
  v-for="item in menuItems"
23
23
  :key="item.text"
@@ -36,7 +36,7 @@
36
36
  </div>
37
37
 
38
38
  <!-- Sub-menu lists-->
39
- <div v-if="item.subMenu && activeMenuItem === item.text" class="absolute top-0 z-10 transition-all duration-300 ease-in-out left-full min-w-36 max-w-64 w-max">
39
+ <div v-if="item.subMenu && activeMenuItem === item.text" class="absolute top-0 z-10 transition-all duration-300 ease-in-out left-full min-w-36 max-w-64">
40
40
  <div class="bg-white border border-gray-200 border-solid rounded-lg shadow-2xl ms-2 shadow-gray-300">
41
41
  <div v-if="item.enableAction" class="flex items-center justify-center w-full gap-1 px-6 py-3 text-sm font-medium text-gray-900 bg-purple-100 rounded-t-md" @click.prevent="$emit('actionItem', 'action')">
42
42
  <slot name="actionName">{{ '+ Action Name' }}</slot>
@@ -44,3 +44,4 @@ export { default as EUIErrorMessage } from "./errorMessage/EUIErrorMessage.vue";
44
44
  export { default as EUITooltip } from "./tooltip/EUITooltip.vue";
45
45
  export { default as EUISearch } from "./searchInput/EUISearch.vue";
46
46
  export { default as EUISearchExpand } from "./searchexpand/EUISearchExpand.vue";
47
+ export { default as EUISearchToggle } from "./searchexpand/EUISearchToggle.vue";
@@ -0,0 +1,90 @@
1
+ <template>
2
+ <div class="relative rounded-full size-12">
3
+ <span class="text-[0.625rem] absolute -top-4 left-0 space-x-4">
4
+ <span>{{ "searchSync:" + searchSync}}</span>
5
+ <span>{{ "isExpanded:" + isExpanded }}</span>
6
+ </span>
7
+ <div class="absolute top-0 right-0">
8
+ <div
9
+ ref="componentWrapper"
10
+ class="cursor-pointer group"
11
+ @click="expandInput"
12
+ >
13
+ <div class="relative max-w-80 z-[calc(infinity)]">
14
+ <div
15
+ :class="[
16
+ 'relative flex items-center py-1 duration-300 ease-linear bg-gray-100 border border-gray-200 rounded-full pe-1 group-focus-within:ring-2 ring-purple-200 group-focus-within:border-gray-300 transition-all delay-100',
17
+ isExpanded
18
+ ? 'group-focus-within:w-80 text-gray-300'
19
+ : 'size-[2.875rem] text-gray-500',
20
+ ]"
21
+ >
22
+ <SearchBigZoomIn
23
+ class="absolute text-current size-6 top-2.5 left-2.5 transition-colors duration-100"
24
+ />
25
+ <input
26
+ v-if="isExpanded"
27
+ v-model="searchQuery"
28
+ ref="input"
29
+ type="search"
30
+ placeholder="Search here..."
31
+ class="text-sm font-medium text-gray-900 bg-transparent w-80 ps-10 pe-2 focus:outline-none min-h-9"
32
+ autocomplete="off"
33
+ @input="handleSearch"
34
+ @blur="handleSearch"
35
+ />
36
+ </div>
37
+ </div>
38
+ </div>
39
+ </div>
40
+ </div>
41
+ </template>
42
+
43
+ <script lang="ts" setup>
44
+ import { ref, toRefs, watch } from "vue";
45
+ import SearchBigZoomIn from "../../assets/svg/SearchBigZoomIn.vue";
46
+
47
+ const props = defineProps({
48
+ modelValue: {
49
+ type: [String, Number],
50
+ default: "",
51
+ },
52
+ searchSync: {
53
+ type: Boolean,
54
+ default: true,
55
+ },
56
+ });
57
+ const { searchSync } = toRefs(props);
58
+ const emit = defineEmits(["update:modelValue", "update:searchSync"]);
59
+
60
+ const input = ref<HTMLInputElement>();
61
+ const isExpanded = ref(true);
62
+ const searchQuery = ref(null);
63
+ const componentWrapper = ref<HTMLElement | null>(null);
64
+
65
+ function handleSearch(event: Event) {
66
+ const newValue = (event?.target as HTMLInputElement)?.value;
67
+ if (newValue !== undefined) {
68
+ emit("update:modelValue", newValue);
69
+ }
70
+ }
71
+
72
+ function expandInput() {
73
+ isExpanded.value = true;
74
+ input?.value?.focus();
75
+ emit("update:searchSync", true);
76
+ }
77
+
78
+ watch(
79
+ searchSync,
80
+ (newVal) => {
81
+ isExpanded.value = newVal;
82
+ emit("update:searchSync", newVal);
83
+ },
84
+ { immediate: true, deep: true }
85
+ );
86
+ </script>
87
+
88
+ <style scoped>
89
+ /* Add custom styles here */
90
+ </style>