@webitel/ui-sdk 3.2.148 → 3.2.149
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/ui-sdk.common.js +34 -18
- package/dist/ui-sdk.common.js.map +1 -1
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.umd.js +34 -18
- package/dist/ui-sdk.umd.js.map +1 -1
- package/dist/ui-sdk.umd.min.js +1 -1
- package/dist/ui-sdk.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/wt-hint/wt-hint.vue +7 -1
- package/src/components/wt-search-bar/wt-search-bar.vue +16 -7
- package/src/locale/.DS_Store +0 -0
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<template v-slot:activator>
|
|
4
4
|
<wt-icon-btn
|
|
5
5
|
icon="rounded-info"
|
|
6
|
-
color="
|
|
6
|
+
:color="iconColor"
|
|
7
7
|
></wt-icon-btn>
|
|
8
8
|
</template>
|
|
9
9
|
<slot></slot>
|
|
@@ -13,6 +13,12 @@
|
|
|
13
13
|
<script>
|
|
14
14
|
export default {
|
|
15
15
|
name: 'wt-hint',
|
|
16
|
+
props: {
|
|
17
|
+
iconColor: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: 'outline',
|
|
20
|
+
},
|
|
21
|
+
}
|
|
16
22
|
};
|
|
17
23
|
</script>
|
|
18
24
|
|
|
@@ -8,8 +8,12 @@
|
|
|
8
8
|
>
|
|
9
9
|
<div class="wt-search-bar__wrapper">
|
|
10
10
|
<div class="wt-search-bar__search-icon">
|
|
11
|
-
<slot
|
|
11
|
+
<slot
|
|
12
|
+
:invalid="invalid"
|
|
13
|
+
name="search-icon"
|
|
14
|
+
>
|
|
12
15
|
<wt-icon
|
|
16
|
+
:color="invalidColorProvider"
|
|
13
17
|
icon="search"
|
|
14
18
|
></wt-icon>
|
|
15
19
|
</slot>
|
|
@@ -27,20 +31,25 @@
|
|
|
27
31
|
:class="{ 'hidden': !value }"
|
|
28
32
|
class="wt-search-bar__reset-icon-btn"
|
|
29
33
|
icon="close"
|
|
34
|
+
:color="invalidColorProvider"
|
|
30
35
|
@click="handleInput('')"
|
|
31
36
|
></wt-icon-btn>
|
|
32
37
|
<wt-hint
|
|
33
38
|
v-if="hint"
|
|
39
|
+
:iconColor="invalidColorProvider"
|
|
34
40
|
>{{ hint }}
|
|
35
41
|
</wt-hint>
|
|
36
|
-
<slot
|
|
42
|
+
<slot
|
|
43
|
+
:invalid="invalid"
|
|
44
|
+
name="additional-actions"
|
|
45
|
+
></slot>
|
|
37
46
|
</div>
|
|
38
47
|
</div>
|
|
39
48
|
</div>
|
|
40
49
|
</template>
|
|
41
50
|
|
|
42
51
|
<script setup>
|
|
43
|
-
import { toRefs } from 'vue';
|
|
52
|
+
import { computed, toRefs } from 'vue';
|
|
44
53
|
import debounce from '../../scripts/debounce';
|
|
45
54
|
import { useValidation } from '../../mixins/validationMixin/useValidation';
|
|
46
55
|
|
|
@@ -85,6 +94,10 @@ const { v, customValidators } = toRefs(props);
|
|
|
85
94
|
|
|
86
95
|
const { invalid } = useValidation({ v, customValidators });
|
|
87
96
|
|
|
97
|
+
const invalidColorProvider = computed(() => {
|
|
98
|
+
return invalid ? 'danger' : null;
|
|
99
|
+
});
|
|
100
|
+
|
|
88
101
|
const search = debounce((value) => {
|
|
89
102
|
emit('search', value);
|
|
90
103
|
}, 1000);
|
|
@@ -119,10 +132,6 @@ function handleKeyup(event) {
|
|
|
119
132
|
border-color: var(--false-color);
|
|
120
133
|
outline: none; // prevent outline overlapping false color
|
|
121
134
|
}
|
|
122
|
-
//deep needed to change color for icons in slot
|
|
123
|
-
:deep .wt-icon__icon {
|
|
124
|
-
fill: var(--false-color);
|
|
125
|
-
}
|
|
126
135
|
.wt-search-bar__input {
|
|
127
136
|
color: var(--false-color);
|
|
128
137
|
}
|
package/src/locale/.DS_Store
DELETED
|
Binary file
|