edvoyui-component-library-test-flight 0.0.93 → 0.0.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/library-vue-ts.cjs.js +1 -1
- package/dist/library-vue-ts.css +1 -1
- package/dist/library-vue-ts.es.js +2619 -2588
- package/dist/library-vue-ts.umd.js +7 -7
- package/dist/searchexpand/EUISearchExpand.vue.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/HelloWorld.vue +16 -0
- package/src/components/button/EUIButton.stories.ts +20 -2
- package/src/components/searchexpand/EUISearchExpand.vue +47 -8
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from "/Users/rajmohan/Documents/Workspace/edvoy-ui-v2/src/components/searchexpand/EUISearchExpand.vue?vue&type=script&setup=true&lang.ts";
|
|
2
|
-
import "/Users/rajmohan/Documents/Workspace/edvoy-ui-v2/src/components/searchexpand/EUISearchExpand.vue?vue&type=style&index=0&scoped=
|
|
2
|
+
import "/Users/rajmohan/Documents/Workspace/edvoy-ui-v2/src/components/searchexpand/EUISearchExpand.vue?vue&type=style&index=0&scoped=d3cf5f43&lang.css";
|
|
3
3
|
declare const _default: any;
|
|
4
4
|
export default _default;
|
|
5
5
|
//# sourceMappingURL=EUISearchExpand.vue.d.ts.map
|
package/package.json
CHANGED
|
@@ -4,11 +4,27 @@
|
|
|
4
4
|
>
|
|
5
5
|
Edvoy User Interface
|
|
6
6
|
</h1>
|
|
7
|
+
<!-- <div class="ml-[200px]">
|
|
8
|
+
<EUISearchExpand
|
|
9
|
+
|
|
10
|
+
v-model:model-value="searchInput"
|
|
11
|
+
:search-sync="showSearch"
|
|
12
|
+
@input="seachStudent($event?.target?.value)"
|
|
13
|
+
@update:modelValue="seachStudent($event?.target?.value)"
|
|
14
|
+
/></div> -->
|
|
7
15
|
|
|
8
16
|
</template>
|
|
9
17
|
<script setup lang="ts">
|
|
18
|
+
// import { ref } from 'vue';
|
|
10
19
|
|
|
20
|
+
// import EUISearchExpand from './searchexpand/EUISearchExpand.vue'
|
|
11
21
|
|
|
22
|
+
// const searchInput =ref('')
|
|
23
|
+
// const showSearch =ref(false)
|
|
24
|
+
|
|
25
|
+
// const seachStudent=(e)=>{
|
|
26
|
+
// console.log('seachStudent',e)
|
|
27
|
+
// }
|
|
12
28
|
</script>
|
|
13
29
|
<style lang="scss"></style>
|
|
14
30
|
|
|
@@ -18,7 +18,16 @@ const meta = {
|
|
|
18
18
|
color: {
|
|
19
19
|
control: {
|
|
20
20
|
type: "select",
|
|
21
|
-
options: [
|
|
21
|
+
options: [
|
|
22
|
+
"black",
|
|
23
|
+
"white",
|
|
24
|
+
"danger",
|
|
25
|
+
"success",
|
|
26
|
+
"purple",
|
|
27
|
+
"primary",
|
|
28
|
+
"tertiary",
|
|
29
|
+
"secondary",
|
|
30
|
+
],
|
|
22
31
|
},
|
|
23
32
|
description: "The color theme of the button.",
|
|
24
33
|
},
|
|
@@ -67,7 +76,16 @@ export const Default: Story = {
|
|
|
67
76
|
},
|
|
68
77
|
color: {
|
|
69
78
|
control: "select",
|
|
70
|
-
options: [
|
|
79
|
+
options: [
|
|
80
|
+
"black",
|
|
81
|
+
"white",
|
|
82
|
+
"danger",
|
|
83
|
+
"success",
|
|
84
|
+
"purple",
|
|
85
|
+
"primary",
|
|
86
|
+
"tertiary",
|
|
87
|
+
"secondary",
|
|
88
|
+
],
|
|
71
89
|
},
|
|
72
90
|
iconType: {
|
|
73
91
|
control: "select",
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
2
|
<div class="relative rounded-full size-10">
|
|
4
3
|
<div class="absolute top-0 right-0">
|
|
5
4
|
<div
|
|
@@ -19,11 +18,37 @@
|
|
|
19
18
|
<SearchBigZoomIn
|
|
20
19
|
class="absolute text-current size-6 top-2 left-2"
|
|
21
20
|
/>
|
|
21
|
+
|
|
22
|
+
<button
|
|
23
|
+
v-if="isExpanded"
|
|
24
|
+
:class="
|
|
25
|
+
inputValue ? ' absolute inset-y-0 right-3 ' : ' hidden '
|
|
26
|
+
"
|
|
27
|
+
@click="(searchQuery=''), emit('update:modelValue', '')"
|
|
28
|
+
>
|
|
29
|
+
<svg
|
|
30
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
31
|
+
fill="none"
|
|
32
|
+
viewBox="0 0 24 24"
|
|
33
|
+
stroke-width="1.5"
|
|
34
|
+
stroke="currentColor"
|
|
35
|
+
class="size-5"
|
|
36
|
+
>
|
|
37
|
+
<!-- <path stroke-linecap="round" stroke-linejoin="round" d="m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" />
|
|
38
|
+
-->
|
|
39
|
+
<path
|
|
40
|
+
stroke-linecap="round"
|
|
41
|
+
stroke-linejoin="round"
|
|
42
|
+
d="M6 18 18 6M6 6l12 12"
|
|
43
|
+
/>
|
|
44
|
+
</svg>
|
|
45
|
+
</button>
|
|
46
|
+
|
|
22
47
|
<input
|
|
23
48
|
v-if="isExpanded"
|
|
24
49
|
v-model="searchQuery"
|
|
25
50
|
ref="input"
|
|
26
|
-
type="search"
|
|
51
|
+
:type="type === 'search' ? 'text' : type"
|
|
27
52
|
placeholder="Search here..."
|
|
28
53
|
class="h-10 text-sm font-medium text-gray-900 bg-transparent w-80 ps-10 pe-2 focus:outline-none"
|
|
29
54
|
autocomplete="off"
|
|
@@ -38,7 +63,7 @@
|
|
|
38
63
|
</template>
|
|
39
64
|
|
|
40
65
|
<script lang="ts" setup>
|
|
41
|
-
import { onBeforeUnmount, onMounted, ref, toRefs, watch } from "vue";
|
|
66
|
+
import { computed, onBeforeUnmount, onMounted, PropType, ref, toRefs, watch } from "vue";
|
|
42
67
|
import SearchBigZoomIn from "../../assets/svg/SearchBigZoomIn.vue";
|
|
43
68
|
|
|
44
69
|
const props = defineProps({
|
|
@@ -50,6 +75,12 @@ const props = defineProps({
|
|
|
50
75
|
type: Boolean,
|
|
51
76
|
default: false,
|
|
52
77
|
},
|
|
78
|
+
type: {
|
|
79
|
+
type: String as PropType<
|
|
80
|
+
"text" | "number" | "email" | "password" | "search"
|
|
81
|
+
>,
|
|
82
|
+
default: "text",
|
|
83
|
+
},
|
|
53
84
|
});
|
|
54
85
|
const { searchSync } = toRefs(props);
|
|
55
86
|
const emit = defineEmits(["update:modelValue"]);
|
|
@@ -64,6 +95,10 @@ function expandInput() {
|
|
|
64
95
|
input?.value?.focus();
|
|
65
96
|
}
|
|
66
97
|
|
|
98
|
+
const inputValue = computed(() => {
|
|
99
|
+
return props.modelValue === 0 ? true : !!props.modelValue;
|
|
100
|
+
});
|
|
101
|
+
|
|
67
102
|
function closeInput() {
|
|
68
103
|
if (!searchQuery.value) {
|
|
69
104
|
isExpanded.value = false;
|
|
@@ -79,11 +114,15 @@ function handleOutsideClick(event: MouseEvent) {
|
|
|
79
114
|
}
|
|
80
115
|
}
|
|
81
116
|
|
|
82
|
-
watch(
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
117
|
+
watch(
|
|
118
|
+
searchSync,
|
|
119
|
+
(newVal) => {
|
|
120
|
+
if (!newVal) {
|
|
121
|
+
closeInput();
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
{ immediate: true, deep: true }
|
|
125
|
+
);
|
|
87
126
|
|
|
88
127
|
onMounted(() => {
|
|
89
128
|
document.addEventListener("click", handleOutsideClick);
|