@webitel/ui-sdk 23.12.2 → 23.12.5-1

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 (191) hide show
  1. package/dist/favicon.ico +0 -0
  2. package/dist/img/sprite/index.js +148 -1
  3. package/dist/img/sprite/link.svg +8 -0
  4. package/dist/img/sprite/variable-select.svg +9 -0
  5. package/dist/plyr.svg +70 -0
  6. package/dist/ui-sdk.css +1 -1
  7. package/dist/ui-sdk.mjs +22670 -0
  8. package/dist/ui-sdk.umd.js +37 -43084
  9. package/package.json +34 -40
  10. package/src/api/axios/generateInstance.js +1 -1
  11. package/src/components/on-demand/wt-cc-agent-status-timers/wt-cc-agent-status-timers.vue +3 -3
  12. package/src/components/on-demand/wt-save-failed-popup/__tests__/WtPopup.spec.js +9 -0
  13. package/src/components/on-demand/wt-save-failed-popup/wt-save-failed-popup.vue +70 -0
  14. package/src/components/transitions/wt-expand-transition.vue +2 -2
  15. package/src/components/wt-app-header/_variables.scss +1 -1
  16. package/src/components/wt-app-header/wt-app-header.vue +2 -5
  17. package/src/components/wt-app-header/wt-app-navigator.vue +6 -5
  18. package/src/components/wt-app-header/wt-header-actions.vue +30 -14
  19. package/src/components/wt-avatar/_variables.scss +1 -1
  20. package/src/components/wt-avatar/wt-avatar.vue +2 -2
  21. package/src/components/wt-badge/wt-badge.vue +3 -3
  22. package/src/components/wt-button/_variables.scss +2 -32
  23. package/src/components/wt-button/wt-button.vue +5 -3
  24. package/src/components/wt-button-select/__tests__/WtButtonSelect.spec.js +9 -8
  25. package/src/components/wt-button-select/wt-button-select.vue +58 -59
  26. package/src/components/wt-checkbox/wt-checkbox.vue +15 -48
  27. package/src/components/wt-chip/_variables.scss +21 -2
  28. package/src/components/wt-chip/wt-chip.scss +20 -17
  29. package/src/components/wt-chip/wt-chip.vue +10 -5
  30. package/src/components/wt-context-menu/wt-context-menu.vue +4 -4
  31. package/src/components/wt-copy-action/wt-copy-action.vue +6 -6
  32. package/src/components/wt-datepicker/_variables.scss +1 -1
  33. package/src/components/wt-datepicker/wt-datepicker.vue +14 -12
  34. package/src/components/wt-divider/wt-divider.vue +1 -1
  35. package/src/components/wt-dummy/wt-dummy.vue +6 -2
  36. package/src/components/wt-error-page/wt-error-page.vue +10 -4
  37. package/src/components/wt-expansion-panel/wt-expansion-panel.vue +4 -4
  38. package/src/components/wt-filters-panel-wrapper/wt-filters-panel-wrapper.vue +7 -4
  39. package/src/components/wt-headline/wt-headline.vue +4 -4
  40. package/src/components/wt-headline-nav/_variables.scss +5 -2
  41. package/src/components/wt-headline-nav/wt-headline-nav.vue +46 -33
  42. package/src/components/wt-hint/wt-hint.vue +5 -6
  43. package/src/components/wt-icon/_variables.scss +5 -10
  44. package/src/components/wt-icon/wt-icon.vue +15 -6
  45. package/src/components/wt-icon-action/_internals/wt-add-icon-action.vue +2 -2
  46. package/src/components/wt-icon-action/_internals/wt-delete-icon-action.vue +2 -2
  47. package/src/components/wt-icon-action/_internals/wt-download-icon-action.vue +2 -2
  48. package/src/components/wt-icon-action/_internals/wt-edit-icon-action.vue +2 -2
  49. package/src/components/wt-icon-action/_internals/wt-history-icon-action.vue +2 -2
  50. package/src/components/wt-icon-action/_internals/wt-refresh-icon-action.vue +2 -2
  51. package/src/components/wt-icon-action/wt-icon-action.vue +1 -1
  52. package/src/components/wt-icon-btn/wt-icon-btn.vue +4 -2
  53. package/src/components/wt-indicator/_variables.scss +14 -19
  54. package/src/components/wt-indicator/wt-indicator.vue +26 -27
  55. package/src/components/wt-input/wt-input.vue +200 -219
  56. package/src/components/wt-input-info/wt-input-info.vue +2 -2
  57. package/src/components/wt-item-link/wt-item-link.vue +1 -1
  58. package/src/components/wt-label/_variables.scss +4 -2
  59. package/src/components/wt-label/wt-label.vue +5 -18
  60. package/src/components/wt-load-bar/wt-load-bar.vue +7 -4
  61. package/src/components/wt-loader/_internals/wt-loader--md.vue +11 -2
  62. package/src/components/wt-loader/_internals/wt-loader--sm.vue +9 -2
  63. package/src/components/wt-loader/_variables.scss +2 -2
  64. package/src/components/wt-loader/wt-loader.vue +10 -3
  65. package/src/components/wt-navigation-bar/wt-navigation-bar.vue +17 -9
  66. package/src/components/wt-notification/wt-notification.vue +4 -4
  67. package/src/components/wt-notifications-bar/wt-notifications-bar.vue +9 -5
  68. package/src/components/wt-page-header/wt-page-header.vue +7 -8
  69. package/src/components/wt-page-wrapper/wt-page-wrapper.vue +8 -5
  70. package/src/components/wt-pagination/wt-pagination.vue +17 -15
  71. package/src/components/wt-player/__tests__/WtPlayer.spec.js +1 -1
  72. package/src/components/wt-player/_variables.scss +1 -1
  73. package/src/components/wt-player/wt-player.vue +17 -17
  74. package/src/components/wt-popup/_variables.scss +4 -3
  75. package/src/components/wt-popup/wt-popup.vue +18 -10
  76. package/src/components/wt-progress-bar/_variables.scss +10 -8
  77. package/src/components/wt-progress-bar/wt-progress-bar.vue +27 -18
  78. package/src/components/wt-radio/wt-radio.vue +26 -54
  79. package/src/components/wt-rounded-action/_variables.scss +4 -35
  80. package/src/components/wt-rounded-action/wt-rounded-action.vue +15 -70
  81. package/src/components/wt-search-bar/__tests__/WtSearchBar.spec.js +1 -1
  82. package/src/components/wt-search-bar/wt-search-bar.vue +18 -42
  83. package/src/components/wt-select/_multiselect.scss +48 -53
  84. package/src/components/wt-select/_variables.scss +0 -3
  85. package/src/components/wt-select/mixins/multiselectMixin.js +9 -1
  86. package/src/components/wt-select/wt-select.vue +41 -40
  87. package/src/components/wt-slider/_variables.scss +6 -0
  88. package/src/components/wt-slider/wt-slider.vue +25 -9
  89. package/src/components/wt-status-select/_variables.scss +7 -4
  90. package/src/components/wt-status-select/wt-status-select.vue +18 -12
  91. package/src/components/wt-stepper/_variables.scss +5 -0
  92. package/src/components/wt-stepper/wt-stepper.vue +15 -9
  93. package/src/components/wt-switcher/_variables.scss +30 -7
  94. package/src/components/wt-switcher/wt-switcher.vue +56 -35
  95. package/src/components/wt-table/_variables.scss +8 -5
  96. package/src/components/wt-table/wt-table.vue +123 -90
  97. package/src/components/wt-table-actions/wt-table-actions.vue +14 -14
  98. package/src/components/wt-table-column-select/wt-table-column-select.vue +33 -28
  99. package/src/components/wt-tabs/_variables.scss +4 -4
  100. package/src/components/wt-tabs/wt-tabs.vue +15 -13
  101. package/src/components/wt-tags-input/wt-tags-input.vue +26 -35
  102. package/src/components/wt-textarea/wt-textarea.vue +37 -54
  103. package/src/components/wt-time-input/wt-time-input.vue +24 -54
  104. package/src/components/wt-timepicker/wt-timepicker.vue +19 -27
  105. package/src/components/wt-tooltip/__tests__/WtTooltip.spec.js +0 -10
  106. package/src/components/wt-tooltip/_internals/wt-tooltip-floating.vue +2 -2
  107. package/src/components/wt-tooltip/_variables.scss +2 -4
  108. package/src/components/wt-tooltip/wt-tooltip.vue +6 -18
  109. package/src/composables/useCachedInterval/__tests__/useCachedInterval.spec.js +5 -5
  110. package/src/composables/useRepresentableAgentPauseCause/__tests__/useRepresentableAgentPauseCause.spec.js +1 -1
  111. package/src/composables/useRepresentableAgentPauseCause/useRepresentableAgentPauseCause.js +1 -1
  112. package/src/css/styleguide/colors/_colors.scss +45 -29
  113. package/src/css/styleguide/colors/reusable/_text-field.scss +36 -0
  114. package/src/css/styleguide/placeholder/_placeholder.scss +9 -9
  115. package/src/enums/WebitelApplications/AdminSections.enum.js +2 -1
  116. package/src/locale/en/en.js +11 -3
  117. package/src/locale/es/es.js +2 -0
  118. package/src/locale/i18n.js +3 -1
  119. package/src/locale/kz/kz.js +327 -0
  120. package/src/locale/ru/ru.js +11 -3
  121. package/src/locale/ua/ua.js +11 -3
  122. package/src/mixins/validationMixin/__tests__/validationMixin.spec.js +2 -2
  123. package/src/mixins/validationMixin/useValidation.js +19 -4
  124. package/src/mixins/validationMixin/validationMixin.js +1 -0
  125. package/src/modules/AgentStatusSelect/components/__tests__/wt-cc-agent-status-select.spec.js +4 -4
  126. package/src/modules/AgentStatusSelect/components/_internals/wt-cc-pause-cause-popup.vue +11 -9
  127. package/src/modules/AgentStatusSelect/components/_internals/wt-cc-status-select-error-popup.vue +6 -5
  128. package/src/modules/AgentStatusSelect/components/wt-cc-agent-status-select.vue +3 -3
  129. package/src/modules/AuditForm/components/__tests__/audit-form.spec.js +1 -1
  130. package/src/modules/AuditForm/components/audit-form-question-read-wrapper.vue +11 -8
  131. package/src/modules/AuditForm/components/audit-form-question-write-wrapper.vue +8 -8
  132. package/src/modules/AuditForm/components/audit-form-question.vue +8 -8
  133. package/src/modules/AuditForm/components/audit-form.vue +6 -5
  134. package/src/modules/AuditForm/components/questions/options/audit-form-question-options-write-row.vue +4 -4
  135. package/src/modules/AuditForm/components/questions/options/audit-form-question-options.vue +7 -4
  136. package/src/modules/AuditForm/components/questions/score/audit-form-question-score.vue +3 -3
  137. package/src/modules/CSVExport/__tests__/CSVExport.spec.js +5 -2
  138. package/src/modules/DeleteConfirmationPopup/__tests__/delete-confirmation-popup.spec.js +77 -0
  139. package/src/modules/DeleteConfirmationPopup/components/delete-confirmation-popup.vue +35 -17
  140. package/src/modules/FilesExport/__tests__/FilesExport.spec.js +6 -3
  141. package/src/modules/FilesExport/scripts/generateMediaURL.js +1 -1
  142. package/src/modules/Filters/components/filter-pagination.vue +1 -1
  143. package/src/modules/Filters/components/filter-table-fields.vue +1 -1
  144. package/src/modules/Notifications/store/__tests__/NotificationsStoreModule.actions.spec.js +6 -6
  145. package/src/modules/QueryFilters/classes/__tests__/ApiFilterSchema.spec.js +1 -1
  146. package/src/modules/QueryFilters/components/__tests__/abstract-api-filter.spec.js +7 -5
  147. package/src/modules/QueryFilters/components/__tests__/abstract-enum-filter.spec.js +3 -1
  148. package/src/modules/QueryFilters/components/__tests__/filter-datetime.spec.js +2 -2
  149. package/src/modules/QueryFilters/components/__tests__/filter-from-to.spec.js +4 -4
  150. package/src/modules/QueryFilters/components/__tests__/filter-search.spec.js +2 -2
  151. package/src/modules/QueryFilters/components/abstract-api-filter.vue +2 -2
  152. package/src/modules/QueryFilters/components/abstract-enum-filter.vue +2 -2
  153. package/src/modules/QueryFilters/components/filter-datetime.vue +2 -2
  154. package/src/modules/QueryFilters/components/filter-from-to.vue +12 -10
  155. package/src/modules/QueryFilters/components/filter-search.vue +2 -2
  156. package/src/modules/QueryFilters/components/filter-table-fields.vue +7 -7
  157. package/src/modules/QueryFilters/mixins/__tests__/apiFilterMixin.spec.js +1 -1
  158. package/src/modules/QueryFilters/mixins/__tests__/enumFilterMixin.spec.js +2 -2
  159. package/src/modules/QueryFilters/mixins/__tests__/paginationFilterMixin.spec.js +2 -2
  160. package/src/modules/QueryFilters/mixins/__tests__/sortFilterMixin.spec.js +1 -1
  161. package/src/modules/QueryFilters/store/__tests__/QueryFiltersStoreModule.spec.js +2 -2
  162. package/src/modules/Userinfo/classes/ApplicationsAccess.js +6 -2
  163. package/src/modules/Userinfo/components/__tests__/auth.spec.js +7 -8
  164. package/src/modules/Userinfo/components/the-auth.vue +8 -5
  165. package/src/scripts/debounce.js +1 -1
  166. package/src/scripts/saveAsJSON.js +9 -0
  167. package/src/store/BaseStoreModules/__tests__/BaseStoreModule.spec.js +6 -6
  168. package/src/validators/variableSearchValidator/__tests__/variableSearchValidator.spec.js +48 -0
  169. package/src/validators/variableSearchValidator/variableSearchValidator.js +10 -0
  170. package/src/validators/websocketValidator/__tests__/websocketValidator.spec.js +28 -0
  171. package/src/validators/websocketValidator/websocketValidator.js +9 -0
  172. package/dist/demo.html +0 -1
  173. package/dist/ui-sdk.common.js +0 -43066
  174. package/dist/ui-sdk.common.js.map +0 -1
  175. package/dist/ui-sdk.umd.js.map +0 -1
  176. package/dist/ui-sdk.umd.min.js +0 -35
  177. package/dist/ui-sdk.umd.min.js.map +0 -1
  178. package/src/components/wt-button/Readme.md +0 -23
  179. package/src/components/wt-button-select/Readme.md +0 -13
  180. package/src/components/wt-icon/Readme.md +0 -327
  181. package/src/components/wt-icon/docs/cleanup-svg-fill-none.png +0 -0
  182. package/src/components/wt-icon/docs/cleanup-svg-fill.png +0 -0
  183. package/src/components/wt-icon/docs/cleanup-svg-viewbox-correct.png +0 -0
  184. package/src/components/wt-icon/docs/cleanup-svg-viewbox-incorrect.png +0 -0
  185. package/src/components/wt-icon/docs/cleanup-svg-width-height.png +0 -0
  186. package/src/components/wt-icon/docs/svg-icon-code-example.png +0 -0
  187. package/src/components/wt-icon/docs/svg-sprite-in-dom.png +0 -0
  188. package/src/components/wt-icon-btn/Readme.md +0 -10
  189. package/src/components/wt-rounded-action/Readme.md +0 -68
  190. package/src/components/wt-tags-input/_variables.scss +0 -24
  191. package/src/locale/.DS_Store +0 -0
@@ -1,11 +1,11 @@
1
1
  <template>
2
2
  <div class="wt-table-column-select">
3
3
  <wt-tooltip>
4
- <template v-slot:activator>
4
+ <template #activator>
5
5
  <wt-icon-btn
6
6
  icon="column-select"
7
7
  @click="openPopup"
8
- ></wt-icon-btn>
8
+ />
9
9
  </template>
10
10
  {{ $t('webitelUI.tableColumnSelect.title') }}
11
11
  </wt-tooltip>
@@ -14,18 +14,18 @@
14
14
  class="wt-table-column-select__popup"
15
15
  @close="close"
16
16
  >
17
- <template v-slot:title>
17
+ <template #title>
18
18
  {{ $t('webitelUI.tableColumnSelect.title') }}
19
19
  </template>
20
- <template v-slot:main>
20
+ <template #main>
21
21
  <div class="wt-table-column-select__popup-list-wrap">
22
22
  <ul
23
23
  class="wt-table-column-select__popup-list"
24
24
  :class="{
25
- 'wt-table-column-select__popup-list--md':
26
- changeableDraft.length > 10 && changeableDraft.length <= 20,
27
- 'wt-table-column-select__popup-list--lg':
28
- changeableDraft.length > 20
25
+ 'wt-table-column-select__popup-list--md':
26
+ changeableDraft.length > 10 && changeableDraft.length <= 20,
27
+ 'wt-table-column-select__popup-list--lg':
28
+ changeableDraft.length > 20
29
29
  }"
30
30
  >
31
31
  <li
@@ -35,22 +35,25 @@
35
35
  @click.capture.prevent="column.show = !column.show"
36
36
  >
37
37
  <wt-checkbox
38
- v-model="column.show"
38
+ :selected="column.show"
39
39
  :label="shownColLabel(column)"
40
- ></wt-checkbox>
40
+ @change="column.show = $event"
41
+ />
41
42
  </li>
42
43
  </ul>
43
44
  </div>
44
45
  </template>
45
- <template v-slot:actions>
46
+ <template #actions>
46
47
  <wt-button
47
48
  @click="setShownColumns"
48
- >{{ $t('reusable.add') }}
49
+ >
50
+ {{ $t('reusable.add') }}
49
51
  </wt-button>
50
52
  <wt-button
51
53
  color="secondary"
52
54
  @click="close"
53
- >{{ $t('reusable.cancel') }}
55
+ >
56
+ {{ $t('reusable.cancel') }}
54
57
  </wt-button>
55
58
  </template>
56
59
  </wt-popup>
@@ -61,7 +64,12 @@
61
64
  import deepCopy from 'deep-copy';
62
65
 
63
66
  export default {
64
- name: 'wt-table-column-select',
67
+ name: 'WtTableColumnSelect',
68
+
69
+ model: {
70
+ prop: 'headers',
71
+ event: 'change',
72
+ },
65
73
  props: {
66
74
  headers: {
67
75
  type: Array,
@@ -74,24 +82,13 @@ export default {
74
82
  description: 'Header values to exclude from selection',
75
83
  },
76
84
  },
77
-
78
- model: {
79
- prop: 'headers',
80
- event: 'change',
81
- },
82
-
85
+ emits: [
86
+ 'change',
87
+ ],
83
88
  data: () => ({
84
89
  draft: [], // headers draft
85
90
  isColumnSelectPopup: false,
86
91
  }),
87
-
88
- watch: {
89
- isColumnSelectPopup: {
90
- handler() {
91
- this.fillHeadersDraft();
92
- },
93
- },
94
- },
95
92
  computed: {
96
93
  changeableDraft() {
97
94
  return this.draft.filter((header) => !this.staticHeaders.includes(header.value)).sort((a, b) => {
@@ -100,6 +97,14 @@ export default {
100
97
  });
101
98
  },
102
99
  },
100
+
101
+ watch: {
102
+ isColumnSelectPopup: {
103
+ handler() {
104
+ this.fillHeadersDraft();
105
+ },
106
+ },
107
+ },
103
108
  methods: {
104
109
  shownColLabel({ text, locale }) {
105
110
  if (!text && locale) {
@@ -5,10 +5,10 @@
5
5
 
6
6
  --tab-padding: var(--spacing-2xs);
7
7
  --tab-gap: var(--spacing-2xs);
8
- --tab-color: var(--text-outline-color);
9
- --tab--hover-color: var(--text-primary-color);
10
- --tab--active-color: var(--text-primary-color);
8
+ --wt-tabs-text-color: var(--text-main-color);
9
+ --wt-tabs-text-hover-color: var(--wt-tabs-text-color);
10
+ --wt-tabs-text-active-color: var(--wt-tabs-text-color);
11
11
  --tab-border: 4px solid;
12
- --tab--active-border-color: var(--accent-color);
12
+ --wt-tabs-underline-active-color: var(--primary-color);
13
13
  --tab-z-index: 1;
14
14
  }
@@ -26,14 +26,19 @@
26
26
  transform: `translateX(${activeLineOffset}px)`
27
27
  }"
28
28
  class="wt-tab__underline--highlight"
29
- ></div>
29
+ />
30
30
  </div>
31
31
  </nav>
32
32
  </template>
33
33
 
34
34
  <script>
35
35
  export default {
36
- name: 'wt-tabs',
36
+ name: 'WtTabs',
37
+
38
+ model: {
39
+ prop: 'current',
40
+ event: 'change',
41
+ },
37
42
  props: {
38
43
  current: {
39
44
  type: Object,
@@ -44,12 +49,9 @@ export default {
44
49
  default: () => [],
45
50
  },
46
51
  },
47
-
48
- model: {
49
- prop: 'current',
50
- event: 'change',
51
- },
52
-
52
+ emits: [
53
+ 'change',
54
+ ],
53
55
  data: () => ({
54
56
  activeLineWidth: 0,
55
57
  activeLineOffset: 0,
@@ -93,7 +95,7 @@ export default {
93
95
  padding-bottom: var(--tab-padding);
94
96
  cursor: pointer;
95
97
  transition: var(--transition);
96
- color: var(--tab-color);
98
+ color: var(--wt-tabs-text-color);
97
99
  border: none;
98
100
  border-bottom: var(--tab-border);
99
101
  border-bottom-color: transparent;
@@ -102,13 +104,13 @@ export default {
102
104
 
103
105
  &:hover,
104
106
  &:focus, {
105
- color: var(--tab--hover-color);
106
- border-bottom-color: var(--tab--active-border-color);
107
+ color: var(--wt-tabs-text-hover-color);
108
+ border-bottom-color: var(--wt-tabs-underline-active-color);
107
109
  }
108
110
 
109
111
  &.wt-tab--highlight {
110
- color: var(--tab--active-color);
111
- border-bottom-color: var(--tab--active-border-color);
112
+ color: var(--wt-tabs-text-active-color);
113
+ border-bottom-color: var(--wt-tabs-underline-active-color);
112
114
  }
113
115
 
114
116
  //// disables bold font resize on hover
@@ -8,8 +8,8 @@
8
8
  class="wt-tags-input"
9
9
  >
10
10
  <wt-label
11
- v-bind="labelProps"
12
11
  v-if="hasLabel"
12
+ v-bind="labelProps"
13
13
  :disabled="disabled"
14
14
  :invalid="invalid"
15
15
  class="wt-tags-input__label"
@@ -18,7 +18,9 @@
18
18
  <slot
19
19
  v-bind="{ label }"
20
20
  name="label"
21
- >{{ requiredLabel }}</slot>
21
+ >
22
+ {{ requiredLabel }}
23
+ </slot>
22
24
  </wt-label>
23
25
 
24
26
  <vue-multiselect
@@ -38,21 +40,21 @@
38
40
  multiple
39
41
  v-on="listeners"
40
42
  >
41
-
42
43
  <!-- Slot that is used for all selected options (tags)-->
43
- <template v-slot:tag="{ option, remove }">
44
+ <template #tag="{ option, remove }">
44
45
  <wt-chip class="multiselect__custom-tag">
45
46
  {{ getTagOptionLabel({ option, optionLabel }) }}
46
47
  <wt-icon-btn
47
48
  icon="close--filled"
48
49
  size="sm"
50
+ color="on-primary"
49
51
  @click="remove(option)"
50
- ></wt-icon-btn>
52
+ />
51
53
  </wt-chip>
52
54
  </template>
53
55
 
54
56
  <!-- Slot for custom option template -->
55
- <template v-slot:option="{ option }">
57
+ <template #option="{ option }">
56
58
  <slot
57
59
  v-bind="{ option, optionLabel }"
58
60
  name="option"
@@ -62,7 +64,7 @@
62
64
  </template>
63
65
 
64
66
  <!-- Element for opening and closing the dropdown -->
65
- <template v-slot:caret="{ toggle }">
67
+ <template #caret="{ toggle }">
66
68
  <!-- @mousedown.native.prevent.stop="toggle": https://github.com/shentao/vue-multiselect/issues/1204#issuecomment-615114727 -->
67
69
  <wt-icon-btn
68
70
  :disabled="disabled"
@@ -70,24 +72,31 @@
70
72
  color="active"
71
73
  icon="arrow-down"
72
74
  @mousedown.prevent.stop="toggle"
73
- ></wt-icon-btn>
75
+ />
74
76
  </template>
75
77
 
76
- <template v-slot:beforeList>
77
- <div v-show="isLoading" class="multiselect__loading-wrapper">
78
- <wt-loader size="sm"></wt-loader>
78
+ <template #beforeList>
79
+ <div
80
+ v-show="isLoading"
81
+ class="multiselect__loading-wrapper"
82
+ >
83
+ <wt-loader size="sm" />
79
84
  </div>
80
85
  </template>
81
86
 
82
- <template v-if="showIntersectionObserver" v-slot:afterList>
83
- <div v-observe-visibility="handleAfterListIntersect"></div>
87
+ <template
88
+ v-if="showIntersectionObserver"
89
+ #afterList
90
+ >
91
+ <div v-observe-visibility="handleAfterListIntersect" />
84
92
  </template>
85
93
  </vue-multiselect>
86
94
 
87
95
  <wt-input-info
88
96
  v-if="isValidation"
89
97
  :invalid="invalid"
90
- >{{ validationText }}
98
+ >
99
+ {{ validationText }}
91
100
  </wt-input-info>
92
101
  </div>
93
102
  </template>
@@ -96,7 +105,7 @@
96
105
  import multiselectMixin from '../wt-select/mixins/multiselectMixin';
97
106
 
98
107
  export default {
99
- name: 'wt-tags-input',
108
+ name: 'WtTagsInput',
100
109
  mixins: [multiselectMixin],
101
110
  props: {
102
111
  value: {
@@ -161,10 +170,6 @@ export default {
161
170
  };
162
171
  </script>
163
172
 
164
- <style lang="scss">
165
- @import './variables.scss';
166
- </style>
167
-
168
173
  <style lang="scss" scoped>
169
174
  @import '../wt-select/multiselect.scss';
170
175
 
@@ -172,21 +177,6 @@ export default {
172
177
  width: 100%;
173
178
  }
174
179
 
175
- .wt-tags-input:hover,
176
- .wt-tags-input:focus-within {
177
- .wt-label {
178
- color: var(--form-label--hover-color);
179
- }
180
- }
181
-
182
- .wt-tags-input--invalid,
183
- .wt-tags-input--invalid:hover,
184
- .wt-tags-input--invalid:focus-within, {
185
- .wt-label {
186
- color: var(--false-color);
187
- }
188
- }
189
-
190
180
  .wt-tags-input--disabled {
191
181
  .wt-tags-input__tags-input {
192
182
  width: 100%;
@@ -194,7 +184,8 @@ export default {
194
184
  }
195
185
  }
196
186
 
197
- .wt-tags-input .multiselect ::v-deep {
187
+ // paddings recalc
188
+ .wt-tags-input .multiselect :deep {
198
189
  .multiselect__tags {
199
190
  padding-bottom: 0;
200
191
  padding-right: calc(
@@ -1,49 +1,55 @@
1
1
  <template>
2
2
  <div
3
- class="wt-textarea"
4
3
  :class="{
5
4
  'wt-textarea--disabled': disabled,
6
5
  'wt-textarea--invalid': invalid,
7
6
  }"
7
+ class="wt-textarea"
8
8
  >
9
9
  <wt-label
10
- v-bind="labelProps"
11
- :for="name"
12
10
  :disabled="disabled"
11
+ :for="name"
13
12
  :invalid="invalid"
13
+ v-bind="labelProps"
14
14
  >
15
15
  <!-- @slot Custom input label -->
16
16
  <slot
17
- v-bind="{ label }"
18
17
  name="label"
19
- >{{ requiredLabel }}</slot>
18
+ v-bind="{ label }"
19
+ >
20
+ {{ requiredLabel }}
21
+ </slot>
20
22
  </wt-label>
21
23
  <div class="wt-textarea__wrapper">
22
24
  <textarea
23
25
  :id="name"
24
26
  ref="wt-textarea"
25
- class="wt-textarea__textarea"
26
- :value="value"
27
- :placeholder="placeholder || label"
28
27
  :disabled="disabled"
28
+ :placeholder="placeholder || label"
29
+ :value="value"
30
+ class="wt-textarea__textarea"
29
31
  v-on="listeners"
30
- ></textarea>
31
- <div class="wt-textarea__after-wrapper" ref="after-wrapper">
32
- <slot name="after-input"></slot>
32
+ />
33
+ <div
34
+ ref="after-wrapper"
35
+ class="wt-textarea__after-wrapper"
36
+ >
37
+ <slot name="after-input" />
33
38
  <wt-icon-btn
34
- class="wt-textarea__reset-icon-btn"
35
39
  :class="{ 'hidden': !value }"
40
+ :disabled="disabled"
41
+ class="wt-textarea__reset-icon-btn"
36
42
  icon="close--filled"
37
43
  size="sm"
38
- :disabled="disabled"
39
44
  @click="$emit('input', '')"
40
- ></wt-icon-btn>
45
+ />
41
46
  </div>
42
47
  </div>
43
48
  <wt-input-info
44
49
  v-if="isValidation"
45
50
  :invalid="invalid"
46
- >{{ validationText }}
51
+ >
52
+ {{ validationText }}
47
53
  </wt-input-info>
48
54
  </div>
49
55
  </template>
@@ -52,7 +58,7 @@
52
58
  import validationMixin from '../../mixins/validationMixin/validationMixin';
53
59
 
54
60
  export default {
55
- name: 'wt-textarea',
61
+ name: 'WtTextarea',
56
62
  mixins: [validationMixin],
57
63
  props: {
58
64
  /**
@@ -113,6 +119,9 @@ export default {
113
119
  return this.required ? `${this.label}*` : this.label;
114
120
  },
115
121
  },
122
+ mounted() {
123
+ this.updateInputPaddings();
124
+ },
116
125
 
117
126
  methods: {
118
127
  handleKeypress(event) {
@@ -132,9 +141,6 @@ export default {
132
141
  inputEl.style.paddingRight = `calc(${defaultInputPadding} * 2 + ${afterWrapperWidth}px)`;
133
142
  },
134
143
  },
135
- mounted() {
136
- this.updateInputPaddings();
137
- },
138
144
  };
139
145
  </script>
140
146
 
@@ -156,68 +162,45 @@ export default {
156
162
  position: relative;
157
163
  }
158
164
 
159
- .wt-label {
160
- .wt-textarea:hover &,
161
- .wt-textarea:focus-within & {
162
- color: var(--form-label--hover-color);
163
- }
164
-
165
- .wt-textarea--invalid:hover &,
166
- .wt-textarea--invalid:focus-within & {
167
- color: var(--label--invalid-color);
168
- }
169
- }
170
-
171
165
  .wt-textarea__textarea {
172
166
  @extend %typo-body-1;
173
167
  @extend %wt-scrollbar;
174
168
  @include wt-placeholder;
175
169
 
176
170
  display: block;
171
+ box-sizing: border-box;
177
172
  width: 100%;
178
173
  min-height: var(--textarea-min-height);
179
- box-sizing: border-box;
180
174
  padding: var(--textarea-padding);
181
- color: var(--form-input-color);
175
+ resize: none;
176
+ transition: var(--transition);
182
177
  border: var(--input-border);
183
- border-color: var(--form-border-color);
178
+ border-color: var(--wt-text-field-input-border-color);
184
179
  border-radius: var(--border-radius);
185
- transition: var(--transition);
186
- resize: none;
187
-
188
- &:focus {
189
- @include wt-placeholder('focus');
190
-
191
- border-color: var(--form-border--hover-color);
192
- }
193
180
 
194
181
  .wt-textarea--disabled & {
195
182
  @include wt-placeholder('disabled');
196
183
 
197
- background: var(--form-border--disabled-color);
198
- border-color: var(--form-border--disabled-color);
184
+ border-color: var(--wt-text-field-input-border-disabled-color);
185
+ background: var(--wt-text-field-input-background-disabled-color);
199
186
  }
200
187
 
201
188
  .wt-textarea--invalid &,
202
189
  .wt-textarea--invalid:hover & {
203
- border-color: var(--false-color);
190
+ @include wt-placeholder('error');
191
+ color: var(--wt-text-field-error-text-color);
192
+ border-color: var(--wt-text-field-input-border-error-color);
204
193
  outline: none; // prevent outline overlapping false color
205
194
  }
206
195
  }
207
196
 
208
- /* make icons black */
209
- .wt-textarea:hover ::v-deep .wt-icon-btn:not(.wt-textarea__reset-icon-btn) .wt-icon__icon,
210
- .wt-textarea:focus-within ::v-deep .wt-icon-btn:not(.wt-textarea__reset-icon-btn) .wt-icon__icon {
211
- fill: var(--icon-color--hover);
212
- }
213
-
214
197
  .wt-textarea__after-wrapper {
215
- display: flex;
216
- gap: var(--input-after-wrapper-gap);
217
- align-items: center;
218
198
  position: absolute;
219
199
  top: var(--input-icon-margin);
220
200
  right: var(--input-icon-margin);
201
+ display: flex;
202
+ align-items: center;
221
203
  pointer-events: auto; // override --disabled p-events none
204
+ gap: var(--input-after-wrapper-gap);
222
205
  }
223
206
  </style>
@@ -2,16 +2,13 @@
2
2
  <div
3
3
  class="wt-time-input"
4
4
  :class="{
5
- 'wt-time-input--outline': outline,
6
5
  'wt-time-input--disabled': disabled,
7
6
  'wt-time-input--invalid': invalid,
8
7
  }"
9
8
  >
10
9
  <wt-label
11
- v-bind="labelProps"
12
10
  v-if="hasLabel"
13
- :for="name"
14
- :outline="outline"
11
+ v-bind="labelProps"
15
12
  :disabled="disabled"
16
13
  :invalid="invalid"
17
14
  >
@@ -19,11 +16,12 @@
19
16
  <slot
20
17
  v-bind="{ label }"
21
18
  name="label"
22
- >{{ label }}</slot>
19
+ >
20
+ {{ label }}
21
+ </slot>
23
22
  </wt-label>
24
23
  <div class="wt-time-input__wrapper">
25
24
  <input
26
- :id="name"
27
25
  class="wt-time-input__input"
28
26
  :value="value"
29
27
  :min="0"
@@ -36,7 +34,8 @@
36
34
  <wt-input-info
37
35
  v-if="showInfo"
38
36
  :invalid="invalid"
39
- >{{ validationText }}
37
+ >
38
+ {{ validationText }}
40
39
  </wt-input-info>
41
40
  </div>
42
41
  </template>
@@ -45,7 +44,7 @@
45
44
  import validationMixin from '../../mixins/validationMixin/validationMixin';
46
45
 
47
46
  export default {
48
- name: 'wt-time-input',
47
+ name: 'WtTimeInput',
49
48
  mixins: [validationMixin],
50
49
  props: {
51
50
  /**
@@ -62,13 +61,6 @@ export default {
62
61
  type: String,
63
62
  default: '',
64
63
  },
65
- /**
66
- * Form input name
67
- */
68
- name: {
69
- type: String,
70
- default: '',
71
- },
72
64
  /**
73
65
  * Time type: day, minute, second
74
66
  */
@@ -91,22 +83,22 @@ export default {
91
83
  default: false,
92
84
  description: 'Native input disabled attribute',
93
85
  },
94
-
95
- outline: {
96
- type: Boolean,
97
- default: false,
98
- },
99
-
100
86
  labelProps: {
101
87
  type: Object,
102
88
  description: 'Object with props, passed down to wt-label as props',
103
89
  },
104
-
105
90
  hideInputInfo: {
106
91
  type: Boolean,
107
92
  default: false,
108
93
  },
109
94
  },
95
+ emits: [
96
+ /**
97
+ * Emits on input value change
98
+ * @param {string} value
99
+ */
100
+ 'input',
101
+ ],
110
102
  computed: {
111
103
  hasLabel() {
112
104
  return !!(this.label || this.$slots.label);
@@ -134,16 +126,6 @@ export default {
134
126
 
135
127
  .wt-label {
136
128
  text-align: center;
137
-
138
- .wt-time-input:hover &,
139
- .wt-time-input:focus-within & {
140
- color: var(--form-label--hover-color);
141
- }
142
-
143
- .wt-time-input--invalid:hover &,
144
- .wt-time-input--invalid:focus-within & {
145
- color: var(--label--invalid-color);
146
- }
147
129
  }
148
130
 
149
131
  .wt-time-input__input {
@@ -153,35 +135,23 @@ export default {
153
135
  width: 100%;
154
136
  box-sizing: border-box;
155
137
  padding: var(--input-padding);
156
- color: var(--form-input-color);
157
138
  border: var(--input-border);
158
- border-color: var(--form-border-color);
139
+ border-color: var(--wt-text-field-input-border-color);
159
140
  border-radius: var(--border-radius);
160
141
  transition: var(--transition);
161
142
 
162
- .wt-time-input:hover &,
163
- &:focus {
164
- border-color: var(--form-border--hover-color);
165
- }
166
-
167
- .wt-time-input--outline & {
168
- border-color: var(--form-outline-border-color);
169
- }
170
-
171
- .wt-time-input--outline:hover &,
172
- .wt-time-input--outline &:focus {
173
- border-color: var(--form-outline-border--hover-color);
174
- }
175
-
176
- .wt-time-input--disabled & {
177
- background: var(--form-border--disabled-color);
178
- border-color: var(--form-border--disabled-color);
179
- }
180
-
181
143
  .wt-time-input--invalid &,
182
144
  .wt-time-input--invalid:hover & {
183
- border-color: var(--false-color);
145
+ @include wt-placeholder('error');
146
+ color: var(--wt-text-field-error-text-color);
147
+ border-color: var(--wt-text-field-input-border-error-color);
184
148
  outline: none; // prevent outline overlapping false color
185
149
  }
150
+
151
+ .wt-time-input--disabled & {
152
+ @include wt-placeholder('disabled');
153
+ border-color: var(--wt-text-field-input-border-disabled-color);
154
+ background: var(--wt-text-field-input-background-disabled-color);
155
+ }
186
156
  }
187
157
  </style>