quasar-ui-sellmate-ui-kit 3.12.2 → 3.12.4
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/index.common.js +3 -3
- package/dist/index.css +2 -2
- package/dist/index.esm.js +3 -3
- package/dist/index.min.css +2 -2
- package/dist/index.rtl.css +2 -2
- package/dist/index.rtl.min.css +2 -2
- package/dist/index.umd.js +31 -22
- package/dist/index.umd.min.js +3 -3
- package/package.json +1 -1
- package/src/components/InputWithSearchIcon.vue +83 -83
- package/src/components/SSelectSearch.vue +6 -0
- package/src/components/STooltip.vue +5 -1
package/package.json
CHANGED
|
@@ -1,83 +1,83 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="search-input-form">
|
|
3
|
-
<q-icon :name="searchIcon" size="16px" />
|
|
4
|
-
<input v-model="search" autofocus class="search-input" :placeholder="placeholder" />
|
|
5
|
-
<q-icon
|
|
6
|
-
v-if="search"
|
|
7
|
-
:name="closeIcon12"
|
|
8
|
-
size="12px"
|
|
9
|
-
class="q-pa-sm cursor-pointer"
|
|
10
|
-
color="Grey_Default"
|
|
11
|
-
@click="$emit('onDelete')"
|
|
12
|
-
/>
|
|
13
|
-
</div>
|
|
14
|
-
</template>
|
|
15
|
-
|
|
16
|
-
<script setup>
|
|
17
|
-
import { computed, ref, watch } from 'vue';
|
|
18
|
-
import { QIcon } from 'quasar';
|
|
19
|
-
import { searchIcon, closeIcon12 } from '../assets/icons';
|
|
20
|
-
|
|
21
|
-
const props = defineProps({
|
|
22
|
-
placeholder: String,
|
|
23
|
-
modelValue: String,
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
const emits = defineEmits(['onInput', 'onDelete']);
|
|
27
|
-
const search = computed({
|
|
28
|
-
get() {
|
|
29
|
-
return props.modelValue;
|
|
30
|
-
},
|
|
31
|
-
set(val) {
|
|
32
|
-
emits('onInput', val);
|
|
33
|
-
},
|
|
34
|
-
});
|
|
35
|
-
</script>
|
|
36
|
-
|
|
37
|
-
<style scoped lang="scss">
|
|
38
|
-
@use '../css/quasar.variables.scss' as *;
|
|
39
|
-
|
|
40
|
-
.search-input-form {
|
|
41
|
-
height: 28px;
|
|
42
|
-
display: flex;
|
|
43
|
-
align-items: center;
|
|
44
|
-
padding-left: 8px;
|
|
45
|
-
position: relative;
|
|
46
|
-
border-radius: 2px;
|
|
47
|
-
border: 1px solid $Grey_Lighten-1;
|
|
48
|
-
background-color: white;
|
|
49
|
-
position: sticky;
|
|
50
|
-
top: 0;
|
|
51
|
-
z-index: 1;
|
|
52
|
-
margin: 4px;
|
|
53
|
-
|
|
54
|
-
&::after {
|
|
55
|
-
content: '';
|
|
56
|
-
position: absolute;
|
|
57
|
-
top: 0;
|
|
58
|
-
right: 0;
|
|
59
|
-
bottom: 0;
|
|
60
|
-
left: 0;
|
|
61
|
-
pointer-events: none;
|
|
62
|
-
border: 1px solid transparent;
|
|
63
|
-
border-radius: inherit;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
&:hover,
|
|
67
|
-
&:focus-within {
|
|
68
|
-
&::after {
|
|
69
|
-
border-color: #0075ff;
|
|
70
|
-
box-shadow: 0 0 4px #0075ff;
|
|
71
|
-
transition: border-color 0.36s cubic-bezier(0.4, 0, 0.2, 1);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.search-input {
|
|
76
|
-
font-size: 12px;
|
|
77
|
-
margin-left: 8px;
|
|
78
|
-
flex-grow: 1;
|
|
79
|
-
border: none;
|
|
80
|
-
outline: none;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="search-input-form">
|
|
3
|
+
<q-icon :name="searchIcon" size="16px" />
|
|
4
|
+
<input v-model="search" autofocus class="search-input" :placeholder="placeholder" />
|
|
5
|
+
<q-icon
|
|
6
|
+
v-if="search"
|
|
7
|
+
:name="closeIcon12"
|
|
8
|
+
size="12px"
|
|
9
|
+
class="q-pa-sm cursor-pointer"
|
|
10
|
+
color="Grey_Default"
|
|
11
|
+
@click="$emit('onDelete')"
|
|
12
|
+
/>
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script setup>
|
|
17
|
+
import { computed, ref, watch } from 'vue';
|
|
18
|
+
import { QIcon } from 'quasar';
|
|
19
|
+
import { searchIcon, closeIcon12 } from '../assets/icons';
|
|
20
|
+
|
|
21
|
+
const props = defineProps({
|
|
22
|
+
placeholder: String,
|
|
23
|
+
modelValue: String,
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
const emits = defineEmits(['onInput', 'onDelete']);
|
|
27
|
+
const search = computed({
|
|
28
|
+
get() {
|
|
29
|
+
return props.modelValue;
|
|
30
|
+
},
|
|
31
|
+
set(val) {
|
|
32
|
+
emits('onInput', val);
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
</script>
|
|
36
|
+
|
|
37
|
+
<style scoped lang="scss">
|
|
38
|
+
@use '../css/quasar.variables.scss' as *;
|
|
39
|
+
|
|
40
|
+
.search-input-form {
|
|
41
|
+
height: 28px;
|
|
42
|
+
display: flex;
|
|
43
|
+
align-items: center;
|
|
44
|
+
padding-left: 8px;
|
|
45
|
+
position: relative;
|
|
46
|
+
border-radius: 2px;
|
|
47
|
+
border: 1px solid $Grey_Lighten-1;
|
|
48
|
+
background-color: white;
|
|
49
|
+
position: sticky;
|
|
50
|
+
top: 0;
|
|
51
|
+
z-index: 1;
|
|
52
|
+
margin: 4px;
|
|
53
|
+
|
|
54
|
+
&::after {
|
|
55
|
+
content: '';
|
|
56
|
+
position: absolute;
|
|
57
|
+
top: 0;
|
|
58
|
+
right: 0;
|
|
59
|
+
bottom: 0;
|
|
60
|
+
left: 0;
|
|
61
|
+
pointer-events: none;
|
|
62
|
+
border: 1px solid transparent;
|
|
63
|
+
border-radius: inherit;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&:hover,
|
|
67
|
+
&:focus-within {
|
|
68
|
+
&::after {
|
|
69
|
+
border-color: #0075ff;
|
|
70
|
+
box-shadow: 0 0 4px #0075ff;
|
|
71
|
+
transition: border-color 0.36s cubic-bezier(0.4, 0, 0.2, 1);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.search-input {
|
|
76
|
+
font-size: 12px;
|
|
77
|
+
margin-left: 8px;
|
|
78
|
+
flex-grow: 1;
|
|
79
|
+
border: none;
|
|
80
|
+
outline: none;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
</style>
|
|
@@ -160,6 +160,7 @@
|
|
|
160
160
|
if (sSelectRef.value.getOptionIndex() !== -1) {
|
|
161
161
|
model.value = filteredOptions.value[sSelectRef.value.getOptionIndex()][props.optionValue];
|
|
162
162
|
handleDelete();
|
|
163
|
+
sSelectRef.value.setOptionIndex(-1);
|
|
163
164
|
sSelectRef.value.hidePopup();
|
|
164
165
|
return;
|
|
165
166
|
}
|
|
@@ -170,6 +171,7 @@
|
|
|
170
171
|
|
|
171
172
|
if (!filtered.length) {
|
|
172
173
|
emit('onSearch', val);
|
|
174
|
+
sSelectRef.value.setOptionIndex(-1);
|
|
173
175
|
return;
|
|
174
176
|
}
|
|
175
177
|
|
|
@@ -191,6 +193,9 @@
|
|
|
191
193
|
watch(
|
|
192
194
|
() => props.options,
|
|
193
195
|
val => {
|
|
196
|
+
// const existingValues = new Set(filteredOptions.value.map((option) => option.value));
|
|
197
|
+
// const nonDuplicateOptions = val.filter((option) => !existingValues.has(option.value));
|
|
198
|
+
// filteredOptions.value.push(...nonDuplicateOptions);
|
|
194
199
|
filteredOptions.value = val;
|
|
195
200
|
sSelectRef.value.setOptionIndex(-1);
|
|
196
201
|
},
|
|
@@ -238,6 +243,7 @@
|
|
|
238
243
|
|
|
239
244
|
.s-select-opts {
|
|
240
245
|
@extend %select-menu-list;
|
|
246
|
+
height: 252px;
|
|
241
247
|
}
|
|
242
248
|
|
|
243
249
|
.custom-select-options {
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
</template>
|
|
68
68
|
|
|
69
69
|
<script>
|
|
70
|
-
import { defineComponent, ref } from 'vue';
|
|
70
|
+
import { defineComponent, ref, watch } from 'vue';
|
|
71
71
|
import {
|
|
72
72
|
QTooltip, QBtn, QMenu, QIcon,
|
|
73
73
|
} from 'quasar';
|
|
@@ -138,6 +138,10 @@ export default defineComponent({
|
|
|
138
138
|
},
|
|
139
139
|
setup(props) {
|
|
140
140
|
const isToggled = ref(props.toggle);
|
|
141
|
+
|
|
142
|
+
watch(() => props.toggle, (val) => {
|
|
143
|
+
isToggled.value = val
|
|
144
|
+
})
|
|
141
145
|
return {
|
|
142
146
|
isToggled,
|
|
143
147
|
closeIcon,
|