@webitel/ui-sdk 23.12.41 → 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 (144) 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/store/BaseStoreModules/__tests__/BaseStoreModule.spec.js +6 -6
  124. package/dist/demo.html +0 -1
  125. package/dist/ui-sdk.common.js +0 -43304
  126. package/dist/ui-sdk.common.js.map +0 -1
  127. package/dist/ui-sdk.umd.js.map +0 -1
  128. package/dist/ui-sdk.umd.min.js +0 -35
  129. package/dist/ui-sdk.umd.min.js.map +0 -1
  130. package/src/components/wt-button/Readme.md +0 -23
  131. package/src/components/wt-button-select/Readme.md +0 -13
  132. package/src/components/wt-headline-nav/Readme.md +0 -9
  133. package/src/components/wt-icon/Readme.md +0 -327
  134. package/src/components/wt-icon/docs/cleanup-svg-fill-none.png +0 -0
  135. package/src/components/wt-icon/docs/cleanup-svg-fill.png +0 -0
  136. package/src/components/wt-icon/docs/cleanup-svg-viewbox-correct.png +0 -0
  137. package/src/components/wt-icon/docs/cleanup-svg-viewbox-incorrect.png +0 -0
  138. package/src/components/wt-icon/docs/cleanup-svg-width-height.png +0 -0
  139. package/src/components/wt-icon/docs/svg-icon-code-example.png +0 -0
  140. package/src/components/wt-icon/docs/svg-sprite-in-dom.png +0 -0
  141. package/src/components/wt-icon-btn/Readme.md +0 -10
  142. package/src/components/wt-rounded-action/Readme.md +0 -68
  143. package/src/validators/variableSearchValidator/Readme.md +0 -13
  144. package/src/validators/websocketValidator/Readme.md +0 -7
@@ -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,20 @@
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"
49
50
  @click="remove(option)"
50
- ></wt-icon-btn>
51
+ />
51
52
  </wt-chip>
52
53
  </template>
53
54
 
54
55
  <!-- Slot for custom option template -->
55
- <template v-slot:option="{ option }">
56
+ <template #option="{ option }">
56
57
  <slot
57
58
  v-bind="{ option, optionLabel }"
58
59
  name="option"
@@ -62,7 +63,7 @@
62
63
  </template>
63
64
 
64
65
  <!-- Element for opening and closing the dropdown -->
65
- <template v-slot:caret="{ toggle }">
66
+ <template #caret="{ toggle }">
66
67
  <!-- @mousedown.native.prevent.stop="toggle": https://github.com/shentao/vue-multiselect/issues/1204#issuecomment-615114727 -->
67
68
  <wt-icon-btn
68
69
  :disabled="disabled"
@@ -70,24 +71,31 @@
70
71
  color="active"
71
72
  icon="arrow-down"
72
73
  @mousedown.prevent.stop="toggle"
73
- ></wt-icon-btn>
74
+ />
74
75
  </template>
75
76
 
76
- <template v-slot:beforeList>
77
- <div v-show="isLoading" class="multiselect__loading-wrapper">
78
- <wt-loader size="sm"></wt-loader>
77
+ <template #beforeList>
78
+ <div
79
+ v-show="isLoading"
80
+ class="multiselect__loading-wrapper"
81
+ >
82
+ <wt-loader size="sm" />
79
83
  </div>
80
84
  </template>
81
85
 
82
- <template v-if="showIntersectionObserver" v-slot:afterList>
83
- <div v-observe-visibility="handleAfterListIntersect"></div>
86
+ <template
87
+ v-if="showIntersectionObserver"
88
+ #afterList
89
+ >
90
+ <div v-observe-visibility="handleAfterListIntersect" />
84
91
  </template>
85
92
  </vue-multiselect>
86
93
 
87
94
  <wt-input-info
88
95
  v-if="isValidation"
89
96
  :invalid="invalid"
90
- >{{ validationText }}
97
+ >
98
+ {{ validationText }}
91
99
  </wt-input-info>
92
100
  </div>
93
101
  </template>
@@ -96,7 +104,7 @@
96
104
  import multiselectMixin from '../wt-select/mixins/multiselectMixin';
97
105
 
98
106
  export default {
99
- name: 'wt-tags-input',
107
+ name: 'WtTagsInput',
100
108
  mixins: [multiselectMixin],
101
109
  props: {
102
110
  value: {
@@ -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
 
@@ -165,7 +170,7 @@ export default {
165
170
 
166
171
  .wt-textarea--invalid:hover &,
167
172
  .wt-textarea--invalid:focus-within & {
168
- color: var(--label--invalid-color);
173
+ color: var(--wt-label-error-color);
169
174
  }
170
175
  }
171
176
 
@@ -8,8 +8,8 @@
8
8
  }"
9
9
  >
10
10
  <wt-label
11
- v-bind="labelProps"
12
11
  v-if="hasLabel"
12
+ v-bind="labelProps"
13
13
  :for="name"
14
14
  :outline="outline"
15
15
  :disabled="disabled"
@@ -19,7 +19,9 @@
19
19
  <slot
20
20
  v-bind="{ label }"
21
21
  name="label"
22
- >{{ label }}</slot>
22
+ >
23
+ {{ label }}
24
+ </slot>
23
25
  </wt-label>
24
26
  <div class="wt-time-input__wrapper">
25
27
  <input
@@ -36,7 +38,8 @@
36
38
  <wt-input-info
37
39
  v-if="showInfo"
38
40
  :invalid="invalid"
39
- >{{ validationText }}
41
+ >
42
+ {{ validationText }}
40
43
  </wt-input-info>
41
44
  </div>
42
45
  </template>
@@ -45,7 +48,7 @@
45
48
  import validationMixin from '../../mixins/validationMixin/validationMixin';
46
49
 
47
50
  export default {
48
- name: 'wt-time-input',
51
+ name: 'WtTimeInput',
49
52
  mixins: [validationMixin],
50
53
  props: {
51
54
  /**
@@ -142,7 +145,7 @@ export default {
142
145
 
143
146
  .wt-time-input--invalid:hover &,
144
147
  .wt-time-input--invalid:focus-within & {
145
- color: var(--label--invalid-color);
148
+ color: var(--wt-label-error-color);
146
149
  }
147
150
  }
148
151
 
@@ -1,8 +1,11 @@
1
1
  <template>
2
- <div class="wt-timepicker" :class="{'wt-timepicker--invalid': invalid}">
2
+ <div
3
+ class="wt-timepicker"
4
+ :class="{'wt-timepicker--invalid': invalid}"
5
+ >
3
6
  <wt-label
4
- v-bind="labelProps"
5
7
  v-if="label"
8
+ v-bind="labelProps"
6
9
  :invalid="invalid"
7
10
  >
8
11
  {{ `${label} (${format})` }}
@@ -13,36 +16,37 @@
13
16
  :value="hour"
14
17
  :v="v"
15
18
  :label="label ? null : $t('webitelUI.timepicker.hour') "
16
- :maxValue="dateMode ? null : 23"
19
+ :max-value="dateMode ? null : 23"
17
20
  :disabled="disabled"
18
21
  hide-input-info
19
22
  @input="hour = $event"
20
- ></wt-time-input>
23
+ />
21
24
  <wt-time-input
22
25
  v-if="isMin"
23
26
  :value="min"
24
27
  :v="v"
25
28
  :label="label ? null : $t('webitelUI.timepicker.min')"
26
- :maxValue="59"
29
+ :max-value="59"
27
30
  :disabled="disabled"
28
31
  hide-input-info
29
32
  @input="min = $event"
30
- ></wt-time-input>
33
+ />
31
34
  <wt-time-input
32
35
  v-if="isSec"
33
36
  :value="sec"
34
37
  :v="v"
35
- :label="label ? null : $t('webitelUI.timepicker.sec')"
36
- :maxValue="59"
38
+ :label="label ? null : $t('webitelUI.timepicker.sec')"
39
+ :max-value="59"
37
40
  :disabled="disabled"
38
41
  hide-input-info
39
42
  @input="sec = $event"
40
- ></wt-time-input>
43
+ />
41
44
  </div>
42
45
  <wt-input-info
43
46
  v-if="isValidation"
44
47
  :invalid="invalid"
45
- >{{ validationText }}
48
+ >
49
+ {{ validationText }}
46
50
  </wt-input-info>
47
51
  </div>
48
52
  </template>
@@ -54,8 +58,12 @@ const SEC_IN_HOUR = 60 * 60;
54
58
  const SEC_IN_MIN = 60;
55
59
 
56
60
  export default {
57
- name: 'wt-timepicker',
61
+ name: 'WtTimepicker',
58
62
  mixins: [validationMixin],
63
+ model: {
64
+ prop: 'value',
65
+ event: 'input',
66
+ },
59
67
  props: {
60
68
  value: {
61
69
  type: [String, Number],
@@ -82,10 +90,6 @@ export default {
82
90
  description: 'Object with props, passed down to wt-label as props',
83
91
  },
84
92
  },
85
- model: {
86
- prop: 'value',
87
- event: 'input',
88
- },
89
93
 
90
94
  computed: {
91
95
  isHour() {
@@ -161,7 +165,7 @@ export default {
161
165
 
162
166
  .wt-timepicker--invalid:hover &,
163
167
  .wt-timepicker--invalid:focus-within & {
164
- color: var(--label--invalid-color);
168
+ color: var(--wt-label-error-color);
165
169
  }
166
170
  }
167
171
 
@@ -1,9 +1,9 @@
1
1
  <template>
2
2
  <aside
3
- class="wt-tooltip-floating"
4
3
  ref="floating"
4
+ class="wt-tooltip-floating"
5
5
  >
6
- <slot></slot>
6
+ <slot />
7
7
  </aside>
8
8
  </template>
9
9
 
@@ -3,27 +3,27 @@
3
3
  :class="{
4
4
  'wt-tooltip--contrast': contrast,
5
5
  'wt-tooltip--visible': isVisible,
6
- }"
6
+ }"
7
7
  class="wt-tooltip"
8
8
  >
9
9
  <div
10
10
  ref="activator"
11
11
  class="wt-tooltip__activator"
12
12
  >
13
- <slot name="activator"></slot>
13
+ <slot name="activator" />
14
14
  </div>
15
15
  <wt-tooltip-floating
16
16
  v-if="isVisible"
17
17
  ref="floating"
18
- class="wt-tooltip__floating"
19
18
  v-clickaway="hideTooltip"
19
+ class="wt-tooltip__floating"
20
20
  :class="[popperClass]"
21
21
  :style="floatingStyles"
22
22
  :triggers="popperTriggers"
23
23
  @show="showTooltip"
24
24
  @hide="hideTooltip"
25
25
  >
26
- <slot v-bind="{ hide: hideTooltip }"></slot>
26
+ <slot v-bind="{ hide: hideTooltip }" />
27
27
  </wt-tooltip-floating>
28
28
  </div>
29
29
  </template>
@@ -1,14 +1,14 @@
1
1
  import { useCachedInterval } from '../useCachedInterval';
2
2
 
3
3
  describe('useCachedInterval', () => {
4
- it('subscribe', (done) => {
5
- const callback = jest.fn();
4
+ it('subscribe', async () => {
5
+ const callback = vi.fn();
6
6
  const { subscribe } = useCachedInterval({ timeout: 10 });
7
7
  subscribe(callback);
8
8
  expect(callback).toHaveBeenCalledTimes(1);
9
- setTimeout(() => {
9
+ return await new Promise((resolve, reject) => setTimeout(() => {
10
10
  expect(callback).toHaveBeenCalledTimes(2);
11
- done();
12
- }, 10);
11
+ resolve();
12
+ }, 10));
13
13
  });
14
14
  });
@@ -1,5 +1,6 @@
1
1
  @import './deprecated';
2
2
  @import './palette';
3
+ @import './reusable/text-field';
3
4
 
4
5
  :root {
5
6
  // dp colors
@@ -84,10 +85,10 @@
84
85
  --sub-accent-color: var(--indigo-darken-3);
85
86
 
86
87
  // typography colors
87
- --main-text-color: var(--grey-darken-3);
88
- --main-text-disabled-color: var(--grey-lighten-1);
89
- --negative-text-color: var(--error-color);
90
- --link-color: var(--info-color);
88
+ --text-main-color: var(--grey-darken-3);
89
+ --text-disabled-color: var(--grey-lighten-1);
90
+ --text-error-color: var(--error-color);
91
+ --text-link-color: var(--info-color);
91
92
  }
92
93
 
93
94
  :root.theme--dark {
@@ -173,8 +174,8 @@
173
174
  --sub-accent-color: var(--indigo-darken-3);
174
175
 
175
176
  // typography colors
176
- --main-text-color: var(--grey-lighten-3);
177
- --main-text-disabled-color: var(--grey-darken-1);
178
- --negative-text-color: var(--error-color);
179
- --link-color: var(--info-color);
177
+ --text-main-color: var(--grey-lighten-3);
178
+ --text-disabled-color: var(--grey-darken-1);
179
+ --text-error-color: var(--error-color);
180
+ --text-link-color: var(--info-color);
180
181
  }
@@ -0,0 +1,20 @@
1
+ // shared text field colors
2
+
3
+ :root {
4
+ // TODO: move to separate helper-text component
5
+ --wt-helper-text-color: var(--text-main-color);
6
+ --wt-helper-text-disabled-color: var(--text-disabled-color);
7
+
8
+ --wt-text-field-error-text-color: var(--error-color);
9
+ --wt-text-field-placeholder-color: var(--text-main-color);
10
+ --wt-text-field-placeholder-error-color: var(--error-color);
11
+ --wt-text-field-placeholder-disabled-color: var(--text-disabled-color);
12
+
13
+ --wt-text-field-input-border-color: var(--grey-darken-1);
14
+ --wt-text-field-input-border-disabled-color: var(--dp-16-surface-color);
15
+ --wt-text-field-input-border-error-color: var(--error-color);
16
+ }
17
+
18
+ :root.theme--dark {
19
+ --wt-text-field-input-border-color: var(--grey-lighten-1);
20
+ }
@@ -15,12 +15,12 @@ $vendors: (':-webkit', '-moz', ':-moz', '-ms');
15
15
  font: inherit;
16
16
  transition: var(--transition);
17
17
 
18
- @if ($style == 'focus') {
19
- color: var(--form-placeholder-color--focus);
18
+ @if ($style == 'error') {
19
+ color: var(--wt-text-field-placeholder-error-color);
20
20
  } @else if ($style == 'disabled') {
21
- color: var(--form-placeholder-color--disabled);
21
+ color: var(--wt-text-field-placeholder-disabled-color);
22
22
  } @else {
23
- color: var(--form-placeholder-color);
23
+ color: var(--wt-text-field-placeholder-color);
24
24
  }
25
25
 
26
26
  @content;
@@ -35,15 +35,10 @@ $vendors: (':-webkit', '-moz', ':-moz', '-ms');
35
35
  %wt-placeholder {
36
36
  font: inherit;
37
37
  transition: var(--transition);
38
- color: var(--form-placeholder-color);
39
- }
40
-
41
- %wt-placeholder--focus {
42
- @extend %wt-placeholder;
43
- color: var(--form-placeholder-color--focus);
38
+ color: var(--wt-text-field-placeholder-color);
44
39
  }
45
40
 
46
41
  %wt-placeholder--disabled {
47
42
  @extend %wt-placeholder;
48
- color: var(--form-placeholder-color--disabled);
43
+ color: var(--wt-text-field-placeholder-disabled-color);
49
44
  }
@@ -14,7 +14,7 @@ const messages = {
14
14
  };
15
15
 
16
16
  // eslint-disable-next-line new-cap
17
- export default new createI18n({
17
+ export default createI18n({
18
18
  // legacy: false,
19
19
  locale: 'en',
20
20
  allowComposition: true,