@webitel/ui-sdk 2.0.26 → 2.0.29

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/ui-sdk",
3
- "version": "2.0.26",
3
+ "version": "2.0.29",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve-lib": "vue-cli-service serve",
@@ -1,15 +1,15 @@
1
1
  <template>
2
2
  <div
3
- class="wt-search-bar"
4
3
  :class="{
5
4
  'wt-search-bar--outline': outline,
6
5
  }"
6
+ class="wt-search-bar"
7
7
  >
8
8
  <div class="wt-search-bar__wrapper">
9
9
  <input
10
- class="wt-search-bar__input"
11
- :value="value"
12
10
  :placeholder="searchBarPlaceholder"
11
+ :value="value"
12
+ class="wt-search-bar__input"
13
13
  type="search"
14
14
  v-on="listeners"
15
15
  >
@@ -21,8 +21,8 @@
21
21
  </slot>
22
22
  </div>
23
23
  <wt-icon-btn
24
- class="wt-search-bar__reset-icon-btn"
25
24
  :class="{ 'hidden': !value }"
25
+ class="wt-search-bar__reset-icon-btn"
26
26
  icon="close"
27
27
  @click="$emit('input', '')"
28
28
  ></wt-icon-btn>
@@ -31,95 +31,95 @@
31
31
  </template>
32
32
 
33
33
  <script>
34
- import debounce from '../../../scripts/debounce';
35
-
36
- export default {
37
- name: 'wt-search-bar',
38
- props: {
39
- /**
40
- * Current search-bar value (`v-model`)
41
- */
42
- value: {
43
- type: String,
44
- default: '',
45
- },
46
- /**
47
- * search-bar placeholder
48
- */
49
- placeholder: {
50
- type: String,
51
- },
52
- debounce: {
53
- type: Boolean,
54
- default: false,
55
- },
56
- debounceDelay: {
57
- type: Number,
58
- default: 1000,
59
- },
60
- outline: {
61
- type: Boolean,
62
- default: false,
63
- },
34
+ import debounce from '../../../scripts/debounce';
35
+
36
+ export default {
37
+ name: 'wt-search-bar',
38
+ props: {
39
+ /**
40
+ * Current search-bar value (`v-model`)
41
+ */
42
+ value: {
43
+ type: String,
44
+ default: '',
64
45
  },
65
-
66
- watch: {
67
- value() {
68
- this.search.call(this);
69
- },
46
+ /**
47
+ * search-bar placeholder
48
+ */
49
+ placeholder: {
50
+ type: String,
51
+ },
52
+ debounce: {
53
+ type: Boolean,
54
+ default: false,
55
+ },
56
+ debounceDelay: {
57
+ type: Number,
58
+ default: 1000,
70
59
  },
60
+ outline: {
61
+ type: Boolean,
62
+ default: false,
63
+ },
64
+ },
71
65
 
72
- created() {
73
- if (this.debounce) {
74
- this.search = debounce(this.search, this.debounceDelay);
75
- }
66
+ watch: {
67
+ value() {
68
+ this.search.call(this);
76
69
  },
70
+ },
77
71
 
78
- computed: {
79
- listeners() {
80
- return {
81
- ...this.$listeners,
82
- input: (event) => this.$emit('input', event.target.value),
83
- keyup: this.handleKeyup,
84
- };
85
- },
86
- searchBarPlaceholder() {
87
- return this.placeholder || this.$t('webitelUI.searchBar.placeholder');
88
- },
72
+ created() {
73
+ if (this.debounce) {
74
+ this.search = debounce(this.search, this.debounceDelay);
75
+ }
76
+ },
77
+
78
+ computed: {
79
+ listeners() {
80
+ return {
81
+ ...this.$listeners,
82
+ input: (event) => this.$emit('input', event.target.value),
83
+ keyup: this.handleKeyup,
84
+ };
89
85
  },
86
+ searchBarPlaceholder() {
87
+ return this.placeholder || this.$t('webitelUI.searchBar.placeholder');
88
+ },
89
+ },
90
90
 
91
- methods: {
92
- search() {
93
- this.$emit('search', this.value);
94
- },
95
- handleKeyup(event) {
96
- if (event.key === 'Enter') {
97
- this.$emit('enter');
98
- event.preventDefault();
99
- } else if (event.key === 'Esc') {
100
- this.$emit('input', '');
101
- event.preventDefault();
102
- }
103
- },
91
+ methods: {
92
+ search() {
93
+ this.$emit('search', this.value);
94
+ },
95
+ handleKeyup(event) {
96
+ if (event.key === 'Enter') {
97
+ this.$emit('enter');
98
+ event.preventDefault();
99
+ } else if (event.key === 'Esc') {
100
+ this.$emit('input', '');
101
+ event.preventDefault();
102
+ }
104
103
  },
105
- };
104
+ },
105
+ };
106
106
  </script>
107
107
 
108
108
  <style lang="scss" scoped>
109
- .wt-search-bar {
110
- cursor: text;
111
- }
109
+ .wt-search-bar {
110
+ cursor: text;
111
+
112
112
 
113
113
  .wt-search-bar__wrapper {
114
114
  position: relative;
115
115
  }
116
116
 
117
117
  .wt-search-bar__search-icon {
118
- line-height: 0;
119
118
  position: absolute;
120
119
  top: 50%;
121
120
  left: var(--input-icon-margin);
122
121
  transform: translateY(-50%);
122
+ line-height: 0;
123
123
  pointer-events: none;
124
124
  }
125
125
 
@@ -130,8 +130,8 @@
130
130
  transform: translateY(-50%);
131
131
 
132
132
  .wt-search-bar:not(:focus-within) & {
133
- opacity: 0;
134
133
  pointer-events: none;
134
+ opacity: 0;
135
135
  }
136
136
  }
137
137
 
@@ -140,14 +140,14 @@
140
140
  @include wt-placeholder;
141
141
 
142
142
  display: block;
143
- width: 100%;
144
143
  box-sizing: border-box;
144
+ width: 100%;
145
145
  padding: var(--search-bar-padding);
146
+ transition: var(--transition);
146
147
  color: var(--form-input-color);
147
148
  border: var(--input-border);
148
149
  border-color: var(--form-border-color);
149
150
  border-radius: var(--border-radius);
150
- transition: var(--transition);
151
151
 
152
152
  &:focus {
153
153
  @include wt-placeholder('focus');
@@ -190,4 +190,5 @@
190
190
  .wt-search-bar__input::-webkit-search-results-decoration {
191
191
  display: none;
192
192
  }
193
+ }
193
194
  </style>
@@ -55,7 +55,9 @@ export default {
55
55
  time: 'Time',
56
56
  channel: 'Channel',
57
57
  file: 'File',
58
+ logout: 'Logout',
58
59
  priority: 'Priority',
60
+ variables: 'Variable | Variables',
59
61
  },
60
62
  // date-related texts
61
63
  date: {
@@ -54,7 +54,9 @@ export default {
54
54
  time: 'Время',
55
55
  channel: 'Канал',
56
56
  file: 'Файл',
57
+ logout: 'Выйти',
57
58
  priority: 'Приоритет',
59
+ variables: 'Переменная | Переменные',
58
60
  },
59
61
  // date-related texts
60
62
  date: {
@@ -54,7 +54,9 @@ export default {
54
54
  time: 'Час',
55
55
  channel: 'Канал',
56
56
  file: 'Файл',
57
+ logout: 'Вийти',
57
58
  priority: 'Приорітет',
59
+ variables: 'Змінна | Змінні',
58
60
  },
59
61
  // date-related texts
60
62
  date: {