@webitel/ui-sdk 23.12.40 → 23.12.43

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.
Files changed (145) hide show
  1. package/dist/favicon.ico +0 -0
  2. package/dist/img/sprite/index.js +147 -1
  3. package/dist/plyr.svg +70 -0
  4. package/dist/ui-sdk.css +1 -1
  5. package/dist/ui-sdk.mjs +22672 -0
  6. package/dist/ui-sdk.umd.js +37 -43322
  7. package/package.json +33 -41
  8. package/src/components/on-demand/wt-cc-agent-status-timers/wt-cc-agent-status-timers.vue +3 -3
  9. package/src/components/transitions/wt-expand-transition.vue +2 -2
  10. package/src/components/wt-app-header/wt-app-header.vue +2 -2
  11. package/src/components/wt-app-header/wt-app-navigator.vue +6 -5
  12. package/src/components/wt-app-header/wt-header-actions.vue +30 -14
  13. package/src/components/wt-avatar/wt-avatar.vue +2 -2
  14. package/src/components/wt-badge/wt-badge.vue +3 -3
  15. package/src/components/wt-button/wt-button.vue +5 -3
  16. package/src/components/wt-button-select/__tests__/WtButtonSelect.spec.js +4 -4
  17. package/src/components/wt-button-select/wt-button-select.vue +3 -3
  18. package/src/components/wt-checkbox/wt-checkbox.vue +12 -7
  19. package/src/components/wt-chip/wt-chip.vue +6 -3
  20. package/src/components/wt-context-menu/wt-context-menu.vue +4 -4
  21. package/src/components/wt-copy-action/wt-copy-action.vue +6 -6
  22. package/src/components/wt-datepicker/wt-datepicker.vue +14 -12
  23. package/src/components/wt-divider/wt-divider.vue +1 -1
  24. package/src/components/wt-dummy/wt-dummy.vue +6 -2
  25. package/src/components/wt-error-page/wt-error-page.vue +10 -4
  26. package/src/components/wt-expansion-panel/wt-expansion-panel.vue +4 -4
  27. package/src/components/wt-filters-panel-wrapper/wt-filters-panel-wrapper.vue +7 -4
  28. package/src/components/wt-headline/wt-headline.vue +4 -4
  29. package/src/components/wt-headline-nav/wt-headline-nav.vue +11 -4
  30. package/src/components/wt-hint/wt-hint.vue +4 -4
  31. package/src/components/wt-icon/wt-icon.vue +5 -5
  32. package/src/components/wt-icon-action/_internals/wt-add-icon-action.vue +2 -2
  33. package/src/components/wt-icon-action/_internals/wt-delete-icon-action.vue +2 -2
  34. package/src/components/wt-icon-action/_internals/wt-download-icon-action.vue +2 -2
  35. package/src/components/wt-icon-action/_internals/wt-edit-icon-action.vue +2 -2
  36. package/src/components/wt-icon-action/_internals/wt-history-icon-action.vue +2 -2
  37. package/src/components/wt-icon-action/_internals/wt-refresh-icon-action.vue +2 -2
  38. package/src/components/wt-icon-action/wt-icon-action.vue +1 -1
  39. package/src/components/wt-icon-btn/wt-icon-btn.vue +1 -1
  40. package/src/components/wt-indicator/wt-indicator.vue +6 -3
  41. package/src/components/wt-input/wt-input.vue +189 -198
  42. package/src/components/wt-input-info/wt-input-info.vue +2 -2
  43. package/src/components/wt-item-link/wt-item-link.vue +1 -1
  44. package/src/components/wt-label/_variables.scss +4 -2
  45. package/src/components/wt-label/wt-label.vue +5 -18
  46. package/src/components/wt-load-bar/wt-load-bar.vue +5 -2
  47. package/src/components/wt-loader/_internals/wt-loader--md.vue +11 -2
  48. package/src/components/wt-loader/_internals/wt-loader--sm.vue +9 -2
  49. package/src/components/wt-loader/wt-loader.vue +10 -3
  50. package/src/components/wt-navigation-bar/wt-navigation-bar.vue +16 -8
  51. package/src/components/wt-notification/wt-notification.vue +3 -3
  52. package/src/components/wt-notifications-bar/wt-notifications-bar.vue +9 -5
  53. package/src/components/wt-page-header/wt-page-header.vue +7 -8
  54. package/src/components/wt-page-wrapper/wt-page-wrapper.vue +8 -5
  55. package/src/components/wt-pagination/wt-pagination.vue +17 -15
  56. package/src/components/wt-player/wt-player.vue +16 -16
  57. package/src/components/wt-popup/wt-popup.vue +13 -7
  58. package/src/components/wt-progress-bar/wt-progress-bar.vue +11 -7
  59. package/src/components/wt-radio/wt-radio.vue +15 -7
  60. package/src/components/wt-rounded-action/wt-rounded-action.vue +2 -2
  61. package/src/components/wt-search-bar/__tests__/WtSearchBar.spec.js +1 -1
  62. package/src/components/wt-search-bar/wt-search-bar.vue +6 -5
  63. package/src/components/wt-select/_multiselect.scss +1 -2
  64. package/src/components/wt-select/wt-select.vue +33 -19
  65. package/src/components/wt-slider/wt-slider.vue +5 -5
  66. package/src/components/wt-status-select/wt-status-select.vue +9 -9
  67. package/src/components/wt-stepper/wt-stepper.vue +8 -6
  68. package/src/components/wt-switcher/wt-switcher.vue +12 -7
  69. package/src/components/wt-table/wt-table.vue +110 -72
  70. package/src/components/wt-table-actions/wt-table-actions.vue +14 -14
  71. package/src/components/wt-table-column-select/wt-table-column-select.vue +28 -26
  72. package/src/components/wt-tabs/wt-tabs.vue +7 -7
  73. package/src/components/wt-tags-input/wt-tags-input.vue +23 -15
  74. package/src/components/wt-textarea/wt-textarea.vue +16 -11
  75. package/src/components/wt-time-input/wt-time-input.vue +8 -5
  76. package/src/components/wt-timepicker/wt-timepicker.vue +20 -16
  77. package/src/components/wt-tooltip/_internals/wt-tooltip-floating.vue +2 -2
  78. package/src/components/wt-tooltip/wt-tooltip.vue +4 -4
  79. package/src/composables/useCachedInterval/__tests__/useCachedInterval.spec.js +5 -5
  80. package/src/css/styleguide/colors/_colors.scss +9 -8
  81. package/src/css/styleguide/colors/reusable/_text-field.scss +20 -0
  82. package/src/css/styleguide/placeholder/_placeholder.scss +6 -11
  83. package/src/locale/i18n.js +1 -1
  84. package/src/locale/kz/kz.js +74 -78
  85. package/src/mixins/validationMixin/useValidation.js +2 -2
  86. package/src/modules/AgentStatusSelect/components/__tests__/wt-cc-agent-status-select.spec.js +4 -4
  87. package/src/modules/AgentStatusSelect/components/_internals/wt-cc-pause-cause-popup.vue +11 -9
  88. package/src/modules/AgentStatusSelect/components/_internals/wt-cc-status-select-error-popup.vue +6 -5
  89. package/src/modules/AgentStatusSelect/components/wt-cc-agent-status-select.vue +3 -3
  90. package/src/modules/AuditForm/components/__tests__/audit-form.spec.js +1 -1
  91. package/src/modules/AuditForm/components/audit-form-question-read-wrapper.vue +10 -6
  92. package/src/modules/AuditForm/components/audit-form-question-write-wrapper.vue +8 -8
  93. package/src/modules/AuditForm/components/audit-form-question.vue +8 -8
  94. package/src/modules/AuditForm/components/audit-form.vue +6 -5
  95. package/src/modules/AuditForm/components/questions/options/audit-form-question-options-write-row.vue +4 -4
  96. package/src/modules/AuditForm/components/questions/options/audit-form-question-options.vue +7 -4
  97. package/src/modules/AuditForm/components/questions/score/audit-form-question-score.vue +3 -3
  98. package/src/modules/CSVExport/__tests__/CSVExport.spec.js +5 -2
  99. package/src/modules/DeleteConfirmationPopup/__tests__/delete-confirmation-popup.spec.js +6 -6
  100. package/src/modules/DeleteConfirmationPopup/components/delete-confirmation-popup.vue +13 -6
  101. package/src/modules/FilesExport/__tests__/FilesExport.spec.js +6 -3
  102. package/src/modules/Filters/components/filter-pagination.vue +1 -1
  103. package/src/modules/Filters/components/filter-table-fields.vue +1 -1
  104. package/src/modules/Notifications/store/__tests__/NotificationsStoreModule.actions.spec.js +6 -6
  105. package/src/modules/QueryFilters/classes/__tests__/ApiFilterSchema.spec.js +1 -1
  106. package/src/modules/QueryFilters/components/__tests__/abstract-api-filter.spec.js +4 -4
  107. package/src/modules/QueryFilters/components/__tests__/filter-datetime.spec.js +2 -2
  108. package/src/modules/QueryFilters/components/__tests__/filter-from-to.spec.js +4 -4
  109. package/src/modules/QueryFilters/components/__tests__/filter-search.spec.js +2 -2
  110. package/src/modules/QueryFilters/components/abstract-api-filter.vue +2 -2
  111. package/src/modules/QueryFilters/components/abstract-enum-filter.vue +2 -2
  112. package/src/modules/QueryFilters/components/filter-datetime.vue +2 -2
  113. package/src/modules/QueryFilters/components/filter-from-to.vue +12 -10
  114. package/src/modules/QueryFilters/components/filter-search.vue +2 -2
  115. package/src/modules/QueryFilters/components/filter-table-fields.vue +7 -7
  116. package/src/modules/QueryFilters/mixins/__tests__/apiFilterMixin.spec.js +1 -1
  117. package/src/modules/QueryFilters/mixins/__tests__/enumFilterMixin.spec.js +2 -2
  118. package/src/modules/QueryFilters/mixins/__tests__/paginationFilterMixin.spec.js +2 -2
  119. package/src/modules/QueryFilters/mixins/__tests__/sortFilterMixin.spec.js +1 -1
  120. package/src/modules/QueryFilters/store/__tests__/QueryFiltersStoreModule.spec.js +2 -2
  121. package/src/modules/Userinfo/components/__tests__/auth.spec.js +7 -8
  122. package/src/modules/Userinfo/components/the-auth.vue +7 -4
  123. package/src/scripts/saveAsJSON.js +3 -1
  124. package/src/store/BaseStoreModules/__tests__/BaseStoreModule.spec.js +6 -6
  125. package/dist/demo.html +0 -1
  126. package/dist/ui-sdk.common.js +0 -43304
  127. package/dist/ui-sdk.common.js.map +0 -1
  128. package/dist/ui-sdk.umd.js.map +0 -1
  129. package/dist/ui-sdk.umd.min.js +0 -35
  130. package/dist/ui-sdk.umd.min.js.map +0 -1
  131. package/src/components/wt-button/Readme.md +0 -23
  132. package/src/components/wt-button-select/Readme.md +0 -13
  133. package/src/components/wt-headline-nav/Readme.md +0 -9
  134. package/src/components/wt-icon/Readme.md +0 -327
  135. package/src/components/wt-icon/docs/cleanup-svg-fill-none.png +0 -0
  136. package/src/components/wt-icon/docs/cleanup-svg-fill.png +0 -0
  137. package/src/components/wt-icon/docs/cleanup-svg-viewbox-correct.png +0 -0
  138. package/src/components/wt-icon/docs/cleanup-svg-viewbox-incorrect.png +0 -0
  139. package/src/components/wt-icon/docs/cleanup-svg-width-height.png +0 -0
  140. package/src/components/wt-icon/docs/svg-icon-code-example.png +0 -0
  141. package/src/components/wt-icon/docs/svg-sprite-in-dom.png +0 -0
  142. package/src/components/wt-icon-btn/Readme.md +0 -10
  143. package/src/components/wt-rounded-action/Readme.md +0 -68
  144. package/src/validators/variableSearchValidator/Readme.md +0 -13
  145. package/src/validators/websocketValidator/Readme.md +0 -7
@@ -1,7 +1,6 @@
1
1
  <template>
2
2
  <div
3
3
  :class="{
4
- 'wt-input--outline': outline,
5
4
  'wt-input--disabled': disabled,
6
5
  'wt-input--invalid': invalid,
7
6
  }"
@@ -12,20 +11,20 @@
12
11
  :disabled="disabled"
13
12
  :for="name"
14
13
  :invalid="invalid"
15
- :outline="outline"
16
14
  v-bind="labelProps"
17
15
  >
18
16
  <!-- @slot Custom input label -->
19
17
  <slot
20
18
  name="label"
21
19
  v-bind="{ label }"
22
- >{{ requiredLabel }}
20
+ >
21
+ {{ requiredLabel }}
23
22
  </slot>
24
23
  </wt-label>
25
24
  <div class="wt-input__wrapper">
26
25
  <input
27
26
  :id="name"
28
- ref="wt-input"
27
+ ref="WtInput"
29
28
  :class="{
30
29
  'wt-input--is-password': isPassword,
31
30
  }"
@@ -41,212 +40,229 @@
41
40
  @keyup="$emit('keyup', $event)"
42
41
  >
43
42
  <div
44
- ref="after-wrapper"
43
+ ref="AfterWrapper"
45
44
  class="wt-input__after-wrapper"
46
45
  >
47
46
  <slot
48
47
  name="after-input"
49
- ></slot>
48
+ />
50
49
  <slot
51
50
  v-if="isPassword"
52
51
  name="show-password"
53
52
  v-bind="{
54
- isPasswordVisible,
55
- switchVisibilityPassword,
56
- }"
53
+ isPasswordVisible,
54
+ switchVisibilityPassword,
55
+ }"
57
56
  >
58
57
  <wt-icon-btn
59
58
  :disabled="disabled"
60
59
  :icon="showPasswordIcon"
61
60
  @click="switchVisibilityPassword"
62
- ></wt-icon-btn>
61
+ />
63
62
  </slot>
64
63
  </div>
65
64
  </div>
66
65
  <wt-input-info
67
66
  v-if="isValidation"
68
67
  :invalid="invalid"
69
- >{{ validationText }}
68
+ >
69
+ {{ validationText }}
70
70
  </wt-input-info>
71
71
  </div>
72
72
  </template>
73
73
 
74
- <script>
75
- import validationMixin from '../../mixins/validationMixin/validationMixin';
74
+ <script setup>
75
+ import {
76
+ ref, computed, useSlots, onMounted,
77
+ } from 'vue';
78
+ import { useValidation } from '../../mixins/validationMixin/useValidation';
76
79
 
77
80
  /*
78
81
  * IMPORTANT: WT-INPUT SHOULD SUPPORT VUE 3 AND VUE 2 V-MODEL INTERFACES SO THAT THERE'S
79
82
  * TWO PROPS: VALUE AND MODELVALUE, AND 2 EVENTS: @UPDATE:MODELVALUE AND @INPUT
80
83
  * */
81
- export default {
82
- name: 'wt-input',
83
- mixins: [validationMixin],
84
- props: {
85
- value: {
86
- type: [String, Number],
87
- },
88
- /**
89
- * Current input modelValue (`v-model`)
90
- */
91
- modelValue: {
92
- type: [String, Number],
93
- },
94
- /**
95
- * Form input label
96
- */
97
- label: {
98
- type: String,
99
- default: '',
100
- },
101
- /**
102
- * Form input placeholder
103
- */
104
- placeholder: {
105
- type: String,
106
- },
107
- /**
108
- * Form input name
109
- */
110
- name: {
111
- type: String,
112
- default: '',
113
- },
114
- /**
115
- * Form input type
116
- */
117
- type: {
118
- type: String,
119
- default: 'text',
120
- },
121
- /**
122
- * Native input required attribute
123
- */
124
- required: {
125
- type: Boolean,
126
- default: false,
127
- description: 'Native input required attribute',
128
- },
129
- /**
130
- * Native input disabled attribute
131
- */
132
- disabled: {
133
- type: Boolean,
134
- default: false,
135
- description: 'Native input disabled attribute',
136
- },
137
- /**
138
- * Status of show password icon display
139
- */
140
- hasShowPassword: {
141
- type: Boolean,
142
- default: false,
143
- },
144
-
145
- /**
146
- * Native number input restrictions
147
- */
148
- numberMin: {
149
- type: Number,
150
- default: 0,
151
- },
84
+ const props = defineProps({
85
+ value: {
86
+ type: [String, Number],
87
+ },
88
+ /**
89
+ * Current input modelValue (`v-model`)
90
+ */
91
+ modelValue: {
92
+ type: [String, Number],
93
+ },
94
+ /**
95
+ * Form input label
96
+ */
97
+ label: {
98
+ type: String,
99
+ default: '',
100
+ },
101
+ /**
102
+ * Form input placeholder
103
+ */
104
+ placeholder: {
105
+ type: String,
106
+ },
107
+ /**
108
+ * Form input name
109
+ */
110
+ name: {
111
+ type: String,
112
+ default: '',
113
+ },
114
+ /**
115
+ * Form input type
116
+ */
117
+ type: {
118
+ type: String,
119
+ default: 'text',
120
+ },
121
+ /**
122
+ * Native input required attribute
123
+ */
124
+ required: {
125
+ type: Boolean,
126
+ default: false,
127
+ description: 'Native input required attribute',
128
+ },
129
+ /**
130
+ * Native input disabled attribute
131
+ */
132
+ disabled: {
133
+ type: Boolean,
134
+ default: false,
135
+ description: 'Native input disabled attribute',
136
+ },
137
+ /**
138
+ * Status of show password icon display
139
+ */
140
+ hasShowPassword: {
141
+ type: Boolean,
142
+ default: false,
143
+ },
152
144
 
153
- /**
154
- * Native number input restrictions
155
- */
156
- numberMax: {
157
- type: Number,
158
- },
145
+ /**
146
+ * Native number input restrictions
147
+ */
148
+ numberMin: {
149
+ type: Number,
150
+ default: 0,
151
+ },
159
152
 
160
- outline: {
161
- type: Boolean,
162
- default: false,
163
- },
153
+ /**
154
+ * Native number input restrictions
155
+ */
156
+ numberMax: {
157
+ type: Number,
158
+ },
164
159
 
165
- labelProps: {
166
- type: Object,
167
- description: 'Object with props, passed down to wt-label as props',
168
- },
160
+ labelProps: {
161
+ type: Object,
162
+ description: 'Object with props, passed down to wt-label as props',
163
+ },
169
164
 
170
- preventTrim: {
171
- type: Boolean,
172
- default: false,
173
- },
165
+ preventTrim: {
166
+ type: Boolean,
167
+ default: false,
174
168
  },
175
- emits: ['update:modelValue', 'input', 'keyup'],
176
- data: () => ({
177
- inputType: '',
178
- isPasswordVisible: false,
179
- }),
180
169
 
181
- watch: {
182
- type: {
183
- immediate: true,
184
- handler(type) {
185
- let inputType = type;
186
- // Safari has bug for number input
187
- if (typeof window !== 'undefined' || typeof document !== 'undefined') {
188
- const ua = navigator.userAgent.toLocaleLowerCase();
189
- if (
190
- ua.indexOf('safari') !== -1
191
- && ua.indexOf('chrome') === -1
192
- && type === 'number'
193
- ) {
194
- this.isNumberTypeSafari = true;
195
- inputType = 'text';
196
- }
197
- }
198
- this.inputType = inputType;
199
- },
200
- },
170
+ // validation rules
171
+ // TODO: move to separate file to make it reusable
172
+ v: {
173
+ type: Object,
201
174
  },
175
+ customValidators: {
176
+ type: Array,
177
+ default: () => [],
178
+ },
179
+ });
180
+ const emit = defineEmits(['update:modelValue', 'input', 'keyup']);
202
181
 
203
- computed: {
204
- inputValue() {
205
- return this.value !== undefined ? this.value : this.modelValue;
206
- },
182
+ const slots = useSlots();
183
+ const {
184
+ isValidation,
185
+ invalid,
186
+ validationText,
187
+ } = useValidation({ v: props.v, customValidators: props.customValidators });
207
188
 
208
- hasLabel() {
209
- return !!(this.label || this.$slots.label);
210
- },
189
+ // toggles password <-> text at showPassword
190
+ const inputType = ref('');
191
+ inputType.value = props.type;
211
192
 
212
- requiredLabel() {
213
- return this.required ? `${this.label}*` : this.label;
214
- },
193
+ // template ref
194
+ const AfterWrapper = ref(null);
195
+ // template ref
196
+ const WtInput = ref(null);
215
197
 
216
- isPassword() {
217
- return this.type === 'password' && this.hasShowPassword;
218
- },
198
+ const isPasswordVisible = ref(false);
219
199
 
220
- showPasswordIcon() {
221
- return this.isPasswordVisible ? 'eye--closed' : 'eye--opened';
222
- },
223
- },
224
- methods: {
225
- inputHandler(event) {
226
- const value = this.preventTrim ? event.target.value : event.target.value.trim();
227
- this.$emit('update:modelValue', value);
228
- this.$emit('input', value);
229
- },
200
+ // FIXME: uncomment and test, because this code was copy-pasted from vue-storefront long ago
201
+ // watch: {
202
+ // type: {
203
+ // immediate: true,
204
+ // handler(type) {
205
+ // let inputType = type;
206
+ // // Safari has bug for number input
207
+ // if (typeof window !== 'undefined' || typeof document !== 'undefined') {
208
+ // const ua = navigator.userAgent.toLocaleLowerCase();
209
+ // if (
210
+ // ua.indexOf('safari') !== -1
211
+ // && ua.indexOf('chrome') === -1
212
+ // && type === 'number'
213
+ // ) {
214
+ // inputType = 'text';
215
+ // }
216
+ // }
217
+ // this.inputType = inputType;
218
+ // },
219
+ // },
220
+ // },
230
221
 
231
- switchVisibilityPassword() {
232
- this.isPasswordVisible = !this.isPasswordVisible;
233
- this.inputType = this.isPasswordVisible ? 'text' : 'password';
234
- },
222
+ const inputValue = computed(() => {
223
+ return props.value !== undefined ? props.value : props.modelValue;
224
+ });
235
225
 
236
- async updateInputPaddings() {
237
- // cant test this thing cause vue test utils doesnt render elements width :/
238
- const afterWrapperWidth = this.$refs['after-wrapper'].offsetWidth;
239
- const inputEl = this.$refs['wt-input'];
240
- const defaultInputPadding = getComputedStyle(document.documentElement)
241
- .getPropertyValue('--input-padding');
242
- if (afterWrapperWidth >= inputEl.offsetWidth) return; // fixes https://my.webitel.com/browse/WTEL-2635
243
- inputEl.style.paddingRight = `calc(${defaultInputPadding} * 2 + ${afterWrapperWidth}px)`;
244
- },
245
- },
246
- mounted() {
247
- this.updateInputPaddings();
248
- },
249
- };
226
+ const hasLabel = computed(() => {
227
+ return !!(props.label || slots.label);
228
+ });
229
+
230
+ const requiredLabel = computed(() => {
231
+ return props.required ? `${props.label}*` : props.label;
232
+ });
233
+
234
+ const isPassword = computed(() => {
235
+ return props.type === 'password' && props.hasShowPassword;
236
+ });
237
+
238
+ const showPasswordIcon = computed(() => {
239
+ return isPasswordVisible.value ? 'eye--closed' : 'eye--opened';
240
+ });
241
+
242
+ function inputHandler(event) {
243
+ const value = props.preventTrim ? event.target.value : event.target.value.trim();
244
+ emit('update:modelValue', value);
245
+ emit('input', value);
246
+ }
247
+
248
+ function switchVisibilityPassword() {
249
+ isPasswordVisible.value = !isPasswordVisible.value;
250
+ inputType.value = isPasswordVisible.value ? 'text' : 'password';
251
+ }
252
+
253
+ function updateInputPaddings() {
254
+ // cant test this thing cause vue test utils doesnt render elements width :/
255
+ const afterWrapperWidth = AfterWrapper.value.offsetWidth;
256
+ const inputEl = WtInput.value;
257
+ const defaultInputPadding = getComputedStyle(document.documentElement)
258
+ .getPropertyValue('--input-padding');
259
+ if (afterWrapperWidth >= inputEl.offsetWidth) return; // fixes https://my.webitel.com/browse/WTEL-2635
260
+ inputEl.style.paddingRight = `calc(${defaultInputPadding} * 2 + ${afterWrapperWidth}px)`;
261
+ }
262
+
263
+ onMounted(() => {
264
+ updateInputPaddings();
265
+ });
250
266
  </script>
251
267
 
252
268
  <style lang="scss">
@@ -267,18 +283,6 @@ export default {
267
283
  position: relative;
268
284
  }
269
285
 
270
- .wt-label {
271
- .wt-input:hover &,
272
- .wt-input:focus-within & {
273
- color: var(--form-label--hover-color);
274
- }
275
-
276
- .wt-input--invalid:hover &,
277
- .wt-input--invalid:focus-within & {
278
- color: var(--label--invalid-color);
279
- }
280
- }
281
-
282
286
  .wt-input__input {
283
287
  @extend %typo-body-1;
284
288
  @include wt-placeholder;
@@ -288,34 +292,21 @@ export default {
288
292
  width: 100%;
289
293
  padding: var(--input-padding);
290
294
  transition: var(--transition);
291
- color: var(--form-input-color);
292
295
  border: var(--input-border);
293
- border-color: var(--form-border-color);
296
+ border-color: var(--wt-text-field-input-border-color);
294
297
  border-radius: var(--border-radius);
295
298
 
296
- &:focus {
297
- @include wt-placeholder('focus');
298
- border-color: var(--form-border--hover-color);
299
- }
300
-
301
- .wt-input--outline & {
302
- border-color: var(--form-outline-border-color);
303
- }
304
-
305
- .wt-input--outline:hover &,
306
- .wt-input--outline &:focus {
307
- border-color: var(--form-outline-border--hover-color);
308
- }
309
-
310
299
  .wt-input--invalid &,
311
300
  .wt-input--invalid:hover & {
312
- border-color: var(--false-color);
301
+ @include wt-placeholder('error');
302
+ color: var(--wt-text-field-error-text-color);
303
+ border-color: var(--wt-text-field-input-border-error-color);
313
304
  outline: none; // prevent outline overlapping false color
314
305
  }
315
306
 
316
307
  .wt-input--disabled & {
317
308
  @include wt-placeholder('disabled');
318
- border-color: var(--form-border--disabled-color);
309
+ border-color: var(--wt-text-field-input-border-disabled-color);
319
310
  background: var(--form-border--disabled-color);
320
311
  }
321
312
  }
@@ -5,13 +5,13 @@
5
5
  'wt-input-info--invalid': invalid,
6
6
  }"
7
7
  >
8
- <slot></slot>
8
+ <slot />
9
9
  </div>
10
10
  </template>
11
11
 
12
12
  <script>
13
13
  export default {
14
- name: 'wt-input-info',
14
+ name: 'WtInputInfo',
15
15
  props: {
16
16
  invalid: {
17
17
  type: Boolean,
@@ -5,7 +5,7 @@
5
5
  :class="{ 'wt-item-link--disabled': disabled }"
6
6
  class="wt-item-link"
7
7
  >
8
- <slot></slot>
8
+ <slot />
9
9
  </router-link>
10
10
  </template>
11
11
 
@@ -1,4 +1,6 @@
1
1
 
2
2
  :root {
3
- --label--invalid-color: var(--false-color);
4
- }
3
+ --wt-label-color: var(--text-main-color);
4
+ --wt-label-error-color: var(--text-error-color);
5
+ --wt-label-disabled-color: var(--text-disabled-color);
6
+ }
@@ -2,13 +2,11 @@
2
2
  <label
3
3
  class="wt-label"
4
4
  :class="{
5
- 'wt-label--outline': outline,
6
5
  'wt-label--invalid': invalid,
7
6
  'wt-label--disabled': disabled,
8
7
  }"
9
- :for="this.for"
10
8
  >
11
- <slot></slot>
9
+ <slot />
12
10
  <wt-hint
13
11
  v-if="hint"
14
12
  >{{ hint }}
@@ -18,19 +16,12 @@
18
16
 
19
17
  <script>
20
18
  export default {
21
- name: 'wt-label',
19
+ name: 'WtLabel',
22
20
  props: {
23
- for: {
24
- type: String,
25
- },
26
21
  disabled: {
27
22
  type: Boolean,
28
23
  default: false,
29
24
  },
30
- outline: {
31
- type: Boolean,
32
- default: false,
33
- },
34
25
  invalid: {
35
26
  type: Boolean,
36
27
  default: false,
@@ -54,20 +45,16 @@ export default {
54
45
 
55
46
  display: flex;
56
47
  align-items: center;
57
- color: var(--form-label-color);
48
+ color: var(--wt-label-color);
58
49
  transition: var(--transition);
59
50
  cursor: text;
60
51
 
61
- &--outline {
62
- color: var(--form-outline-label-color);
63
- }
64
-
65
52
  &--invalid {
66
- color: var(--label--invalid-color);
53
+ color: var(--wt-label-error-color);
67
54
  }
68
55
 
69
56
  &--disabled {
70
- color: var(--form-label--disabled-color);
57
+ color: var(--wt-label-disabled-color);
71
58
  }
72
59
  }
73
60
 
@@ -1,12 +1,15 @@
1
1
  <template>
2
2
  <div class="wt-load-bar">
3
- <span :style="`width: ${this.progressWidth}%;`" class="wt-load-bar__progress"></span>
3
+ <span
4
+ :style="`width: ${progressWidth}%;`"
5
+ class="wt-load-bar__progress"
6
+ />
4
7
  </div>
5
8
  </template>
6
9
 
7
10
  <script>
8
11
  export default {
9
- name: 'wt-load-bar',
12
+ name: 'WtLoadBar',
10
13
  props: {
11
14
  max: {
12
15
  type: [Number, String],
@@ -1,7 +1,16 @@
1
1
  <template>
2
2
  <div class="wt-loader wt-loader--md">
3
- <svg class="wt-loader--md__svg" viewBox="0 0 80 80">
4
- <rect class="wt-loader--md__svg__rect" x="8" y="8" width="64" height="64"></rect>
3
+ <svg
4
+ class="wt-loader--md__svg"
5
+ viewBox="0 0 80 80"
6
+ >
7
+ <rect
8
+ class="wt-loader--md__svg__rect"
9
+ x="8"
10
+ y="8"
11
+ width="64"
12
+ height="64"
13
+ />
5
14
  </svg>
6
15
  </div>
7
16
  </template>
@@ -1,9 +1,16 @@
1
1
  <!--https://codepen.io/zapdev/pen/MYJRaj-->
2
2
 
3
3
  <template>
4
- <div class="wt-loader--sm" :class="`wt-loader--sm--${color}`">
4
+ <div
5
+ class="wt-loader--sm"
6
+ :class="`wt-loader--sm--${color}`"
7
+ >
5
8
  <svg viewBox="0 0 24 24">
6
- <circle cx="12" cy="12" r="8" />
9
+ <circle
10
+ cx="12"
11
+ cy="12"
12
+ r="8"
13
+ />
7
14
  </svg>
8
15
  </div>
9
16
  </template>
@@ -1,6 +1,13 @@
1
1
  <template>
2
- <wt-loader-sm class="wt-loader" v-if="size === 'sm'" :color="color"></wt-loader-sm>
3
- <wt-loader-md class="wt-loader" v-else-if="size === 'md'"></wt-loader-md>
2
+ <wt-loader-sm
3
+ v-if="size === 'sm'"
4
+ class="wt-loader"
5
+ :color="color"
6
+ />
7
+ <wt-loader-md
8
+ v-else-if="size === 'md'"
9
+ class="wt-loader"
10
+ />
4
11
  </template>
5
12
 
6
13
  <script>
@@ -8,7 +15,7 @@ import WtLoaderSm from './_internals/wt-loader--sm.vue';
8
15
  import WtLoaderMd from './_internals/wt-loader--md.vue';
9
16
 
10
17
  export default {
11
- name: 'wt-loader',
18
+ name: 'WtLoader',
12
19
  components: {
13
20
  WtLoaderSm,
14
21
  WtLoaderMd,