edvoyui-component-library-test-flight 0.0.51 → 0.0.52
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/library-vue-ts.cjs.js +11 -11
- package/dist/library-vue-ts.es.js +3908 -3809
- package/dist/library-vue-ts.umd.js +13 -13
- package/dist/searchInput/EUISearch.vue.d.ts +1 -1
- package/dist/searchexpand/EUISearchExpand.vue.d.ts +5 -0
- package/dist/searchexpand/EUISearchExpand.vue.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/assets/svg/SearchBigZoomIn.vue +21 -0
- package/src/components/delete.vue +20 -1
- package/src/components/index.ts +1 -0
- package/src/components/searchInput/EUISearch.vue +11 -3
- package/src/components/searchexpand/EUISearchExpand.vue +109 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from "/Volumes/work/repos/edvoy-ui-v2/src/components/searchInput/EUISearch.vue?vue&type=script&setup=true&lang.ts";
|
|
2
|
-
import "/Volumes/work/repos/edvoy-ui-v2/src/components/searchInput/EUISearch.vue?vue&type=style&index=0&scoped=
|
|
2
|
+
import "/Volumes/work/repos/edvoy-ui-v2/src/components/searchInput/EUISearch.vue?vue&type=style&index=0&scoped=6bdd4db3&lang.css";
|
|
3
3
|
declare const _default: any;
|
|
4
4
|
export default _default;
|
|
5
5
|
//# sourceMappingURL=EUISearch.vue.d.ts.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export * from "/Volumes/work/repos/edvoy-ui-v2/src/components/searchexpand/EUISearchExpand.vue?vue&type=script&setup=true&lang.ts";
|
|
2
|
+
import "/Volumes/work/repos/edvoy-ui-v2/src/components/searchexpand/EUISearchExpand.vue?vue&type=style&index=0&scoped=914f602c&lang.css";
|
|
3
|
+
declare const _default: any;
|
|
4
|
+
export default _default;
|
|
5
|
+
//# sourceMappingURL=EUISearchExpand.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EUISearchExpand.vue.d.ts","sourceRoot":"","sources":["../../src/components/searchexpand/EUISearchExpand.vue"],"names":[],"mappings":"AACA,cAAc,oHAAoH,CAAC;AACnI,OAAO,iIAAiI,CAAC;;AAEzI,wBAA0F"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg
|
|
3
|
+
width="24"
|
|
4
|
+
height="24"
|
|
5
|
+
viewBox="0 0 24 24"
|
|
6
|
+
fill="none"
|
|
7
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
8
|
+
>
|
|
9
|
+
<path
|
|
10
|
+
d="M21 21L17.5104 17.5104M17.5104 17.5104C19.0486 15.9722 20 13.8472 20 11.5C20 6.80558 16.1944 3 11.5 3C6.80558 3 3 6.80558 3 11.5C3 16.1944 6.80558 20 11.5 20C13.8472 20 15.9722 19.0486 17.5104 17.5104Z"
|
|
11
|
+
stroke="currentColor"
|
|
12
|
+
stroke-width="2"
|
|
13
|
+
stroke-linecap="round"
|
|
14
|
+
stroke-linejoin="round"
|
|
15
|
+
/>
|
|
16
|
+
</svg>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script setup lang="ts"></script>
|
|
20
|
+
|
|
21
|
+
<style scoped></style>
|
|
@@ -3,7 +3,18 @@
|
|
|
3
3
|
<div
|
|
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.
|
|
8
|
+
|
|
9
|
+
{{ 'search Data:' + inputSearch + showSearch}}
|
|
10
|
+
</div>
|
|
11
|
+
<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>
|
|
14
|
+
</div>
|
|
15
|
+
<div class="relative border border-red-500 rounded-full size-12">
|
|
16
|
+
<div class="absolute top-0 right-0"><EUISearch /></div>
|
|
17
|
+
</div>
|
|
7
18
|
<div>
|
|
8
19
|
<EUITooltip placement="top">
|
|
9
20
|
<template v-slot:default>
|
|
@@ -172,6 +183,7 @@ import EUISearch from "./searchInput/EUISearch.vue";
|
|
|
172
183
|
import EUIDatepicker from "./datepicker/EUIDatepicker.vue";
|
|
173
184
|
import { CalendarIcon } from "@heroicons/vue/24/solid";
|
|
174
185
|
import EUIButton from "./button/EUIButton.vue";
|
|
186
|
+
import EUISearchExpand from "./searchexpand/EUISearchExpand.vue";
|
|
175
187
|
|
|
176
188
|
// TODO: Datepicker
|
|
177
189
|
const datepickerRange = ref([
|
|
@@ -181,6 +193,13 @@ const datepickerRange = ref([
|
|
|
181
193
|
|
|
182
194
|
const singleDate = ref(new Date());
|
|
183
195
|
|
|
196
|
+
const inputSearch = ref('')
|
|
197
|
+
const showSearch = ref(true)
|
|
198
|
+
|
|
199
|
+
const closeSeach = () => {
|
|
200
|
+
showSearch.value = false
|
|
201
|
+
}
|
|
202
|
+
|
|
184
203
|
const timepicker = ref({
|
|
185
204
|
hours: new Date().getHours(),
|
|
186
205
|
minutes: new Date().getMinutes(),
|
package/src/components/index.ts
CHANGED
|
@@ -43,3 +43,4 @@ export { default as EUIErrorMessage } from "./errorMessage/EUIErrorMessage.vue";
|
|
|
43
43
|
|
|
44
44
|
export { default as EUITooltip } from "./tooltip/EUITooltip.vue";
|
|
45
45
|
export { default as EUISearch } from "./searchInput/EUISearch.vue";
|
|
46
|
+
export { default as EUISearchExpand } from "./searchexpand/EUISearchExpand.vue";
|
|
@@ -15,14 +15,14 @@
|
|
|
15
15
|
v-model="searchQuery"
|
|
16
16
|
type="search"
|
|
17
17
|
placeholder="Search here..."
|
|
18
|
-
class="text-sm font-medium bg-transparent w-96 ps-12 pe-2 focus:outline-none"
|
|
18
|
+
class="text-sm font-medium bg-transparent w-96 ps-12 pe-2 focus:outline-none min-h-9"
|
|
19
19
|
autofocus="true"
|
|
20
20
|
@input="handleSearch"
|
|
21
21
|
@blur="closeDropdown"
|
|
22
22
|
@focus="showDropdownResult = true"
|
|
23
23
|
/>
|
|
24
24
|
<div
|
|
25
|
-
v-if="isExpanded"
|
|
25
|
+
v-if="menuDropdown && isExpanded"
|
|
26
26
|
ref="dropdownButton"
|
|
27
27
|
:open="isOpen"
|
|
28
28
|
class="flex items-center pl-3 pe-2 py-1.5 ml-auto bg-white cursor-pointer rounded-3xl ring-1 ring-gray-200/40 select-none transition-all duration-300 ease-in delay-100"
|
|
@@ -90,12 +90,20 @@
|
|
|
90
90
|
<script lang="ts" setup>
|
|
91
91
|
import { MagnifyingGlassIcon } from "@heroicons/vue/24/solid";
|
|
92
92
|
import { createPopper } from "@popperjs/core";
|
|
93
|
-
import { computed, onBeforeUnmount, onMounted, ref } from "vue";
|
|
93
|
+
import { computed, onBeforeUnmount, onMounted, ref, toRefs } from "vue";
|
|
94
94
|
import ChevronDownStroke from "../../assets/svg/ChevronDownStroke.vue";
|
|
95
95
|
import Student from "../../assets/svg/Student.vue";
|
|
96
96
|
import Partner from "../../assets/svg/partner.vue";
|
|
97
97
|
import People from "../../assets/svg/people.vue";
|
|
98
98
|
|
|
99
|
+
const props = defineProps({
|
|
100
|
+
menuDropdown: {
|
|
101
|
+
type: Boolean,
|
|
102
|
+
default: false
|
|
103
|
+
}
|
|
104
|
+
})
|
|
105
|
+
const {menuDropdown }= toRefs(props);
|
|
106
|
+
|
|
99
107
|
const isExpanded = ref(false);
|
|
100
108
|
const dropdownButton = ref<HTMLElement | null>(null);
|
|
101
109
|
const dropdown = ref<HTMLElement | null>(null);
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
|
|
3
|
+
<div class="relative rounded-full size-12">
|
|
4
|
+
<div class="absolute top-0 right-0">
|
|
5
|
+
<div
|
|
6
|
+
ref="componentWrapper"
|
|
7
|
+
class="cursor-pointer group"
|
|
8
|
+
@click="expandInput"
|
|
9
|
+
>
|
|
10
|
+
<div class="relative max-w-80 z-[calc(infinity)]">
|
|
11
|
+
<div
|
|
12
|
+
:class="[
|
|
13
|
+
'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',
|
|
14
|
+
isExpanded
|
|
15
|
+
? 'group-focus-within:w-80 text-gray-300'
|
|
16
|
+
: 'size-[2.875rem] text-gray-500',
|
|
17
|
+
]"
|
|
18
|
+
>
|
|
19
|
+
<SearchBigZoomIn
|
|
20
|
+
class="absolute text-current size-6 top-2.5 left-2.5 transition-colors duration-100"
|
|
21
|
+
/>
|
|
22
|
+
<input
|
|
23
|
+
v-if="isExpanded"
|
|
24
|
+
v-model="searchQuery"
|
|
25
|
+
ref="input"
|
|
26
|
+
type="search"
|
|
27
|
+
placeholder="Search here..."
|
|
28
|
+
class="text-sm font-medium text-gray-900 bg-transparent w-80 ps-10 pe-2 focus:outline-none min-h-9"
|
|
29
|
+
autocomplete="off"
|
|
30
|
+
@input="handleSearch"
|
|
31
|
+
@blur="closeInput"
|
|
32
|
+
/>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
</template>
|
|
39
|
+
|
|
40
|
+
<script lang="ts" setup>
|
|
41
|
+
import { onBeforeUnmount, onMounted, ref, toRefs, watch } from "vue";
|
|
42
|
+
import SearchBigZoomIn from "../../assets/svg/SearchBigZoomIn.vue";
|
|
43
|
+
|
|
44
|
+
const props = defineProps({
|
|
45
|
+
modelValue: {
|
|
46
|
+
type: [String, Number],
|
|
47
|
+
default: "",
|
|
48
|
+
},
|
|
49
|
+
searchSync: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
default: false,
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
const { searchSync } = toRefs(props);
|
|
55
|
+
const emit = defineEmits(["update:modelValue"]);
|
|
56
|
+
|
|
57
|
+
const input = ref<HTMLInputElement>();
|
|
58
|
+
const isExpanded = ref(true);
|
|
59
|
+
const searchQuery = ref();
|
|
60
|
+
const componentWrapper = ref<HTMLElement | null>(null);
|
|
61
|
+
|
|
62
|
+
function expandInput() {
|
|
63
|
+
isExpanded.value = true;
|
|
64
|
+
input?.value?.focus();
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function closeInput() {
|
|
68
|
+
if (!searchQuery.value) {
|
|
69
|
+
isExpanded.value = false;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function handleOutsideClick(event: MouseEvent) {
|
|
74
|
+
if (
|
|
75
|
+
componentWrapper.value &&
|
|
76
|
+
!componentWrapper.value.contains(event.target as Node)
|
|
77
|
+
) {
|
|
78
|
+
closeInput();
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
watch(searchSync, (newVal) => {
|
|
83
|
+
if (!newVal) {
|
|
84
|
+
closeInput();
|
|
85
|
+
}
|
|
86
|
+
}, {immediate: true, deep:true});
|
|
87
|
+
|
|
88
|
+
onMounted(() => {
|
|
89
|
+
document.addEventListener("click", handleOutsideClick);
|
|
90
|
+
if (searchQuery.value) {
|
|
91
|
+
searchQuery.value?.focus();
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
onBeforeUnmount(() => {
|
|
96
|
+
document.removeEventListener("click", handleOutsideClick);
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
function handleSearch(event: Event) {
|
|
100
|
+
const newValue = (event?.target as HTMLInputElement)?.value;
|
|
101
|
+
if (newValue !== undefined) {
|
|
102
|
+
emit("update:modelValue", newValue);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
</script>
|
|
106
|
+
|
|
107
|
+
<style scoped>
|
|
108
|
+
/* Add custom styles here */
|
|
109
|
+
</style>
|