@webitel/ui-sdk 23.12.41 → 23.12.44

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 (155) hide show
  1. package/dist/favicon.ico +0 -0
  2. package/dist/img/sprite/index.js +148 -1
  3. package/dist/img/sprite/variable-select.svg +9 -0
  4. package/dist/plyr.svg +70 -0
  5. package/dist/ui-sdk.css +1 -1
  6. package/dist/ui-sdk.mjs +22671 -0
  7. package/dist/ui-sdk.umd.js +37 -43322
  8. package/package.json +33 -41
  9. package/src/components/on-demand/wt-cc-agent-status-timers/wt-cc-agent-status-timers.vue +3 -3
  10. package/src/components/transitions/wt-expand-transition.vue +2 -2
  11. package/src/components/wt-app-header/wt-app-header.vue +2 -2
  12. package/src/components/wt-app-header/wt-app-navigator.vue +6 -5
  13. package/src/components/wt-app-header/wt-header-actions.vue +30 -14
  14. package/src/components/wt-avatar/wt-avatar.vue +2 -2
  15. package/src/components/wt-badge/wt-badge.vue +3 -3
  16. package/src/components/wt-button/wt-button.vue +5 -3
  17. package/src/components/wt-button-select/__tests__/WtButtonSelect.spec.js +4 -4
  18. package/src/components/wt-button-select/wt-button-select.vue +3 -3
  19. package/src/components/wt-checkbox/wt-checkbox.vue +15 -48
  20. package/src/components/wt-chip/_variables.scss +25 -2
  21. package/src/components/wt-chip/wt-chip.scss +20 -17
  22. package/src/components/wt-chip/wt-chip.vue +10 -5
  23. package/src/components/wt-context-menu/wt-context-menu.vue +4 -4
  24. package/src/components/wt-copy-action/wt-copy-action.vue +6 -6
  25. package/src/components/wt-datepicker/wt-datepicker.vue +14 -12
  26. package/src/components/wt-divider/wt-divider.vue +1 -1
  27. package/src/components/wt-dummy/wt-dummy.vue +6 -2
  28. package/src/components/wt-error-page/wt-error-page.vue +10 -4
  29. package/src/components/wt-expansion-panel/wt-expansion-panel.vue +4 -4
  30. package/src/components/wt-filters-panel-wrapper/wt-filters-panel-wrapper.vue +7 -4
  31. package/src/components/wt-headline/wt-headline.vue +4 -4
  32. package/src/components/wt-headline-nav/wt-headline-nav.vue +11 -4
  33. package/src/components/wt-hint/wt-hint.vue +4 -4
  34. package/src/components/wt-icon/wt-icon.vue +5 -5
  35. package/src/components/wt-icon-action/_internals/wt-add-icon-action.vue +2 -2
  36. package/src/components/wt-icon-action/_internals/wt-delete-icon-action.vue +2 -2
  37. package/src/components/wt-icon-action/_internals/wt-download-icon-action.vue +2 -2
  38. package/src/components/wt-icon-action/_internals/wt-edit-icon-action.vue +2 -2
  39. package/src/components/wt-icon-action/_internals/wt-history-icon-action.vue +2 -2
  40. package/src/components/wt-icon-action/_internals/wt-refresh-icon-action.vue +2 -2
  41. package/src/components/wt-icon-action/wt-icon-action.vue +1 -1
  42. package/src/components/wt-icon-btn/wt-icon-btn.vue +3 -2
  43. package/src/components/wt-indicator/wt-indicator.vue +6 -3
  44. package/src/components/wt-input/wt-input.vue +190 -199
  45. package/src/components/wt-input-info/wt-input-info.vue +2 -2
  46. package/src/components/wt-item-link/wt-item-link.vue +1 -1
  47. package/src/components/wt-label/_variables.scss +4 -2
  48. package/src/components/wt-label/wt-label.vue +5 -18
  49. package/src/components/wt-load-bar/wt-load-bar.vue +5 -2
  50. package/src/components/wt-loader/_internals/wt-loader--md.vue +11 -2
  51. package/src/components/wt-loader/_internals/wt-loader--sm.vue +9 -2
  52. package/src/components/wt-loader/wt-loader.vue +10 -3
  53. package/src/components/wt-navigation-bar/wt-navigation-bar.vue +16 -8
  54. package/src/components/wt-notification/wt-notification.vue +3 -3
  55. package/src/components/wt-notifications-bar/wt-notifications-bar.vue +9 -5
  56. package/src/components/wt-page-header/wt-page-header.vue +7 -8
  57. package/src/components/wt-page-wrapper/wt-page-wrapper.vue +8 -5
  58. package/src/components/wt-pagination/wt-pagination.vue +17 -15
  59. package/src/components/wt-player/wt-player.vue +16 -16
  60. package/src/components/wt-popup/_variables.scss +4 -3
  61. package/src/components/wt-popup/wt-popup.vue +18 -10
  62. package/src/components/wt-progress-bar/wt-progress-bar.vue +11 -7
  63. package/src/components/wt-radio/wt-radio.vue +15 -7
  64. package/src/components/wt-rounded-action/wt-rounded-action.vue +2 -2
  65. package/src/components/wt-search-bar/__tests__/WtSearchBar.spec.js +1 -1
  66. package/src/components/wt-search-bar/wt-search-bar.vue +6 -5
  67. package/src/components/wt-select/_multiselect.scss +48 -53
  68. package/src/components/wt-select/_variables.scss +0 -3
  69. package/src/components/wt-select/wt-select.vue +41 -40
  70. package/src/components/wt-slider/wt-slider.vue +5 -5
  71. package/src/components/wt-status-select/wt-status-select.vue +9 -9
  72. package/src/components/wt-stepper/wt-stepper.vue +8 -6
  73. package/src/components/wt-switcher/_variables.scss +30 -7
  74. package/src/components/wt-switcher/wt-switcher.vue +56 -35
  75. package/src/components/wt-table/_variables.scss +8 -5
  76. package/src/components/wt-table/wt-table.vue +123 -90
  77. package/src/components/wt-table-actions/wt-table-actions.vue +14 -14
  78. package/src/components/wt-table-column-select/wt-table-column-select.vue +33 -28
  79. package/src/components/wt-tabs/_variables.scss +4 -4
  80. package/src/components/wt-tabs/wt-tabs.vue +15 -13
  81. package/src/components/wt-tags-input/wt-tags-input.vue +26 -35
  82. package/src/components/wt-textarea/wt-textarea.vue +21 -33
  83. package/src/components/wt-time-input/wt-time-input.vue +24 -54
  84. package/src/components/wt-timepicker/wt-timepicker.vue +19 -27
  85. package/src/components/wt-tooltip/__tests__/WtTooltip.spec.js +0 -10
  86. package/src/components/wt-tooltip/_internals/wt-tooltip-floating.vue +2 -2
  87. package/src/components/wt-tooltip/_variables.scss +2 -4
  88. package/src/components/wt-tooltip/wt-tooltip.vue +6 -18
  89. package/src/composables/useCachedInterval/__tests__/useCachedInterval.spec.js +5 -5
  90. package/src/css/styleguide/colors/_colors.scss +15 -14
  91. package/src/css/styleguide/colors/reusable/_text-field.scss +36 -0
  92. package/src/css/styleguide/placeholder/_placeholder.scss +9 -9
  93. package/src/locale/i18n.js +1 -1
  94. package/src/locale/kz/kz.js +74 -78
  95. package/src/mixins/validationMixin/useValidation.js +2 -2
  96. package/src/modules/AgentStatusSelect/components/__tests__/wt-cc-agent-status-select.spec.js +4 -4
  97. package/src/modules/AgentStatusSelect/components/_internals/wt-cc-pause-cause-popup.vue +11 -9
  98. package/src/modules/AgentStatusSelect/components/_internals/wt-cc-status-select-error-popup.vue +6 -5
  99. package/src/modules/AgentStatusSelect/components/wt-cc-agent-status-select.vue +3 -3
  100. package/src/modules/AuditForm/components/__tests__/audit-form.spec.js +1 -1
  101. package/src/modules/AuditForm/components/audit-form-question-read-wrapper.vue +10 -6
  102. package/src/modules/AuditForm/components/audit-form-question-write-wrapper.vue +8 -8
  103. package/src/modules/AuditForm/components/audit-form-question.vue +8 -8
  104. package/src/modules/AuditForm/components/audit-form.vue +6 -5
  105. package/src/modules/AuditForm/components/questions/options/audit-form-question-options-write-row.vue +4 -4
  106. package/src/modules/AuditForm/components/questions/options/audit-form-question-options.vue +7 -4
  107. package/src/modules/AuditForm/components/questions/score/audit-form-question-score.vue +3 -3
  108. package/src/modules/CSVExport/__tests__/CSVExport.spec.js +5 -2
  109. package/src/modules/DeleteConfirmationPopup/__tests__/delete-confirmation-popup.spec.js +6 -6
  110. package/src/modules/DeleteConfirmationPopup/components/delete-confirmation-popup.vue +13 -6
  111. package/src/modules/FilesExport/__tests__/FilesExport.spec.js +6 -3
  112. package/src/modules/Filters/components/filter-pagination.vue +1 -1
  113. package/src/modules/Filters/components/filter-table-fields.vue +1 -1
  114. package/src/modules/Notifications/store/__tests__/NotificationsStoreModule.actions.spec.js +6 -6
  115. package/src/modules/QueryFilters/classes/__tests__/ApiFilterSchema.spec.js +1 -1
  116. package/src/modules/QueryFilters/components/__tests__/abstract-api-filter.spec.js +4 -4
  117. package/src/modules/QueryFilters/components/__tests__/filter-datetime.spec.js +2 -2
  118. package/src/modules/QueryFilters/components/__tests__/filter-from-to.spec.js +4 -4
  119. package/src/modules/QueryFilters/components/__tests__/filter-search.spec.js +2 -2
  120. package/src/modules/QueryFilters/components/abstract-api-filter.vue +2 -2
  121. package/src/modules/QueryFilters/components/abstract-enum-filter.vue +2 -2
  122. package/src/modules/QueryFilters/components/filter-datetime.vue +2 -2
  123. package/src/modules/QueryFilters/components/filter-from-to.vue +12 -10
  124. package/src/modules/QueryFilters/components/filter-search.vue +2 -2
  125. package/src/modules/QueryFilters/components/filter-table-fields.vue +7 -7
  126. package/src/modules/QueryFilters/mixins/__tests__/apiFilterMixin.spec.js +1 -1
  127. package/src/modules/QueryFilters/mixins/__tests__/enumFilterMixin.spec.js +2 -2
  128. package/src/modules/QueryFilters/mixins/__tests__/paginationFilterMixin.spec.js +2 -2
  129. package/src/modules/QueryFilters/mixins/__tests__/sortFilterMixin.spec.js +1 -1
  130. package/src/modules/QueryFilters/store/__tests__/QueryFiltersStoreModule.spec.js +2 -2
  131. package/src/modules/Userinfo/components/__tests__/auth.spec.js +7 -8
  132. package/src/modules/Userinfo/components/the-auth.vue +7 -4
  133. package/src/store/BaseStoreModules/__tests__/BaseStoreModule.spec.js +6 -6
  134. package/dist/demo.html +0 -1
  135. package/dist/ui-sdk.common.js +0 -43304
  136. package/dist/ui-sdk.common.js.map +0 -1
  137. package/dist/ui-sdk.umd.js.map +0 -1
  138. package/dist/ui-sdk.umd.min.js +0 -35
  139. package/dist/ui-sdk.umd.min.js.map +0 -1
  140. package/src/components/wt-button/Readme.md +0 -23
  141. package/src/components/wt-button-select/Readme.md +0 -13
  142. package/src/components/wt-headline-nav/Readme.md +0 -9
  143. package/src/components/wt-icon/Readme.md +0 -327
  144. package/src/components/wt-icon/docs/cleanup-svg-fill-none.png +0 -0
  145. package/src/components/wt-icon/docs/cleanup-svg-fill.png +0 -0
  146. package/src/components/wt-icon/docs/cleanup-svg-viewbox-correct.png +0 -0
  147. package/src/components/wt-icon/docs/cleanup-svg-viewbox-incorrect.png +0 -0
  148. package/src/components/wt-icon/docs/cleanup-svg-width-height.png +0 -0
  149. package/src/components/wt-icon/docs/svg-icon-code-example.png +0 -0
  150. package/src/components/wt-icon/docs/svg-sprite-in-dom.png +0 -0
  151. package/src/components/wt-icon-btn/Readme.md +0 -10
  152. package/src/components/wt-rounded-action/Readme.md +0 -68
  153. package/src/components/wt-tags-input/_variables.scss +0 -24
  154. package/src/validators/variableSearchValidator/Readme.md +0 -13
  155. package/src/validators/websocketValidator/Readme.md +0 -7
@@ -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(--primary-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(
@@ -16,7 +16,8 @@
16
16
  <slot
17
17
  name="label"
18
18
  v-bind="{ label }"
19
- >{{ requiredLabel }}
19
+ >
20
+ {{ requiredLabel }}
20
21
  </slot>
21
22
  </wt-label>
22
23
  <div class="wt-textarea__wrapper">
@@ -28,9 +29,12 @@
28
29
  :value="value"
29
30
  class="wt-textarea__textarea"
30
31
  v-on="listeners"
31
- ></textarea>
32
- <div ref="after-wrapper" class="wt-textarea__after-wrapper">
33
- <slot name="after-input"></slot>
32
+ />
33
+ <div
34
+ ref="after-wrapper"
35
+ class="wt-textarea__after-wrapper"
36
+ >
37
+ <slot name="after-input" />
34
38
  <wt-icon-btn
35
39
  :class="{ 'hidden': !value }"
36
40
  :disabled="disabled"
@@ -38,13 +42,14 @@
38
42
  icon="close--filled"
39
43
  size="sm"
40
44
  @click="$emit('input', '')"
41
- ></wt-icon-btn>
45
+ />
42
46
  </div>
43
47
  </div>
44
48
  <wt-input-info
45
49
  v-if="isValidation"
46
50
  :invalid="invalid"
47
- >{{ validationText }}
51
+ >
52
+ {{ validationText }}
48
53
  </wt-input-info>
49
54
  </div>
50
55
  </template>
@@ -53,7 +58,7 @@
53
58
  import validationMixin from '../../mixins/validationMixin/validationMixin';
54
59
 
55
60
  export default {
56
- name: 'wt-textarea',
61
+ name: 'WtTextarea',
57
62
  mixins: [validationMixin],
58
63
  props: {
59
64
  /**
@@ -114,6 +119,9 @@ export default {
114
119
  return this.required ? `${this.label}*` : this.label;
115
120
  },
116
121
  },
122
+ mounted() {
123
+ this.updateInputPaddings();
124
+ },
117
125
 
118
126
  methods: {
119
127
  handleKeypress(event) {
@@ -133,9 +141,6 @@ export default {
133
141
  inputEl.style.paddingRight = `calc(${defaultInputPadding} * 2 + ${afterWrapperWidth}px)`;
134
142
  },
135
143
  },
136
- mounted() {
137
- this.updateInputPaddings();
138
- },
139
144
  };
140
145
  </script>
141
146
 
@@ -157,18 +162,6 @@ export default {
157
162
  position: relative;
158
163
  }
159
164
 
160
- .wt-label {
161
- .wt-textarea:hover &,
162
- .wt-textarea:focus-within & {
163
- color: var(--form-label--hover-color);
164
- }
165
-
166
- .wt-textarea--invalid:hover &,
167
- .wt-textarea--invalid:focus-within & {
168
- color: var(--label--invalid-color);
169
- }
170
- }
171
-
172
165
  .wt-textarea__textarea {
173
166
  @extend %typo-body-1;
174
167
  @extend %wt-scrollbar;
@@ -181,27 +174,22 @@ export default {
181
174
  padding: var(--textarea-padding);
182
175
  resize: none;
183
176
  transition: var(--transition);
184
- color: var(--form-input-color);
185
177
  border: var(--input-border);
186
- border-color: var(--form-border-color);
178
+ border-color: var(--wt-text-field-input-border-color);
187
179
  border-radius: var(--border-radius);
188
180
 
189
- &:focus {
190
- @include wt-placeholder('focus');
191
-
192
- border-color: var(--form-border--hover-color);
193
- }
194
-
195
181
  .wt-textarea--disabled & {
196
182
  @include wt-placeholder('disabled');
197
183
 
198
- border-color: var(--form-border--disabled-color);
199
- background: 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);
200
186
  }
201
187
 
202
188
  .wt-textarea--invalid &,
203
189
  .wt-textarea--invalid:hover & {
204
- 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);
205
193
  outline: none; // prevent outline overlapping false color
206
194
  }
207
195
  }
@@ -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>