@webitel/ui-sdk 1.0.30 → 1.0.33

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": "1.0.30",
3
+ "version": "1.0.33",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve-lib": "vue-cli-service serve",
@@ -25,7 +25,6 @@
25
25
  ],
26
26
  "dependencies": {
27
27
  "@johmun/vue-tags-input": "^2.1.0",
28
- "bamboo-jest-reporter": "^1.0.3",
29
28
  "core-js": "^3.6.5",
30
29
  "csv-stringify": "^5.5.1",
31
30
  "deep-copy": "^1.4.2",
@@ -34,7 +33,6 @@
34
33
  "jszip": "^3.5.0",
35
34
  "jszip-utils": "^0.1.0",
36
35
  "plyr": "3.6.2",
37
- "svg-sprite-loader": "^5.0.0",
38
36
  "vue": "^2.6.11",
39
37
  "vue-i18n": "^8.18.2",
40
38
  "vue-multiselect": "^2.1.6",
@@ -51,16 +49,18 @@
51
49
  "@vue/cli-plugin-unit-jest": "^5.0.4",
52
50
  "@vue/cli-service": "~4.4.0",
53
51
  "@vue/eslint-config-airbnb": "^5.0.2",
54
- "@vue/vue2-jest": "^27.0.0-alpha.4",
55
52
  "@vue/test-utils": "^1.3.0",
53
+ "@vue/vue2-jest": "^27.0.0-alpha.4",
56
54
  "babel-eslint": "^10.1.0",
57
- "eslint": "^6.7.2",
55
+ "bamboo-jest-reporter": "^1.0.3",
56
+ "eslint": "^6.8.0",
58
57
  "eslint-plugin-import": "^2.20.2",
59
- "eslint-plugin-vue": "^6.2.2",
58
+ "eslint-plugin-vue": "^8.7.1",
60
59
  "husky": "^7.0.0",
61
60
  "sass": "^1.49.11",
62
61
  "sass-loader": "^10.2.0",
63
- "svg-url-loader": "^6.0.0",
62
+ "svg-sprite-loader": "^6.0.11",
63
+ "svg-url-loader": "^7.1.1",
64
64
  "vue-template-compiler": "^2.6.11",
65
65
  "vuex": "^3.6.2"
66
66
  }
@@ -24,6 +24,7 @@
24
24
  :tags="tags"
25
25
  :autocomplete-items="autocompleteOptions"
26
26
  :placeholder="placeholder || label"
27
+ :separators="[' ']"
27
28
  v-on="listeners"
28
29
  >
29
30
  <template slot="tag-actions" slot-scope="{ index, performDelete }">
@@ -16,20 +16,24 @@
16
16
  <div class="wt-textarea__wrapper">
17
17
  <textarea
18
18
  :id="name"
19
+ ref="wt-textarea"
19
20
  class="wt-textarea__textarea"
20
21
  :value="value"
21
22
  :placeholder="placeholder || label"
22
23
  :disabled="disabled"
23
24
  v-on="listeners"
24
25
  ></textarea>
25
- <wt-icon-btn
26
- class="wt-textarea__reset-icon-btn"
27
- :class="{ 'hidden': !value }"
28
- icon="close--filled"
29
- size="sm"
30
- :disabled="disabled"
31
- @click="$emit('input', '')"
32
- ></wt-icon-btn>
26
+ <div class="wt-textarea__after-wrapper" ref="after-wrapper">
27
+ <slot name="after-input"></slot>
28
+ <wt-icon-btn
29
+ class="wt-textarea__reset-icon-btn"
30
+ :class="{ 'hidden': !value }"
31
+ icon="close--filled"
32
+ size="sm"
33
+ :disabled="disabled"
34
+ @click="$emit('input', '')"
35
+ ></wt-icon-btn>
36
+ </div>
33
37
  </div>
34
38
  </div>
35
39
  </template>
@@ -101,6 +105,18 @@
101
105
  event.preventDefault();
102
106
  }
103
107
  },
108
+
109
+ updateInputPaddings() {
110
+ // cant test this thing cause vue test utils doesnt render elements width :/
111
+ const afterWrapperWidth = this.$refs['after-wrapper'].offsetWidth;
112
+ const inputEl = this.$refs['wt-textarea'];
113
+ const defaultInputPadding = getComputedStyle(document.documentElement)
114
+ .getPropertyValue('--textarea-padding');
115
+ inputEl.style.paddingRight = `calc(${defaultInputPadding} * 2 + ${afterWrapperWidth}px)`;
116
+ },
117
+ },
118
+ mounted() {
119
+ this.updateInputPaddings();
104
120
  },
105
121
  };
106
122
  </script>
@@ -125,17 +141,6 @@
125
141
  }
126
142
  }
127
143
 
128
- .wt-textarea__reset-icon-btn {
129
- position: absolute;
130
- top: var(--input-icon-margin);
131
- right: var(--input-icon-margin);
132
-
133
- .wt-textarea:not(:focus-within) & {
134
- opacity: 0;
135
- pointer-events: none;
136
- }
137
- }
138
-
139
144
  .wt-textarea__textarea {
140
145
  @extend %typo-body-1;
141
146
  @include wt-placeholder;
@@ -167,8 +172,18 @@
167
172
  }
168
173
 
169
174
  /* make icons black */
170
- .wt-textarea:hover ::v-deep .wt-icon__icon,
171
- .wt-textarea:focus-within ::v-deep .wt-icon__icon {
175
+ .wt-textarea:hover ::v-deep .wt-icon-btn:not(.wt-textarea__reset-icon-btn) .wt-icon__icon,
176
+ .wt-textarea:focus-within ::v-deep .wt-icon-btn:not(.wt-textarea__reset-icon-btn) .wt-icon__icon {
172
177
  fill: var(--icon-color--hover);
173
178
  }
179
+
180
+ .wt-textarea__after-wrapper {
181
+ display: flex;
182
+ gap: var(--input-after-wrapper-gap);
183
+ align-items: center;
184
+ position: absolute;
185
+ top: var(--input-icon-margin);
186
+ right: var(--input-icon-margin);
187
+ pointer-events: auto; // override --disabled p-events none
188
+ }
174
189
  </style>
@@ -1,13 +1,5 @@
1
1
 
2
2
  :root {
3
3
  --textarea-min-height: 100px;
4
- --textarea-padding:
5
- var(--input-padding)
6
- calc(
7
- var(--input-padding)
8
- + var(--icon-sm-size)
9
- + var(--spacing-xs)
10
- )
11
- var(--input-padding)
12
- var(--input-padding); // right reset icon 16px
13
- }
4
+ --textarea-padding: var(--input-padding);
5
+ }
@@ -26,6 +26,8 @@ export default {
26
26
  search: 'Search',
27
27
  open: 'Open',
28
28
  name: 'Name',
29
+ expand: 'Expand',
30
+ collapse: 'Collapse',
29
31
  lang: {
30
32
  en: 'English',
31
33
  ru: 'Русский',
@@ -26,6 +26,8 @@ export default {
26
26
  search: 'Поиск',
27
27
  open: 'Открыть',
28
28
  name: 'Имя',
29
+ expand: 'Развернуть',
30
+ collapse: 'Свернуть',
29
31
  lang: {
30
32
  en: 'English',
31
33
  ru: 'Русский',
@@ -26,6 +26,8 @@ export default {
26
26
  search: 'Пошук',
27
27
  open: 'Відкрити',
28
28
  name: 'Ім\'я',
29
+ expand: 'Розгорнути',
30
+ collapse: 'Згорнути',
29
31
  lang: {
30
32
  en: 'English',
31
33
  ru: 'Русский',