@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.
- package/dist/favicon.ico +0 -0
- package/dist/img/sprite/index.js +148 -1
- package/dist/img/sprite/link.svg +8 -0
- package/dist/img/sprite/variable-select.svg +9 -0
- package/dist/plyr.svg +70 -0
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.mjs +22670 -0
- package/dist/ui-sdk.umd.js +37 -43084
- package/package.json +34 -40
- package/src/api/axios/generateInstance.js +1 -1
- package/src/components/on-demand/wt-cc-agent-status-timers/wt-cc-agent-status-timers.vue +3 -3
- package/src/components/on-demand/wt-save-failed-popup/__tests__/WtPopup.spec.js +9 -0
- package/src/components/on-demand/wt-save-failed-popup/wt-save-failed-popup.vue +70 -0
- package/src/components/transitions/wt-expand-transition.vue +2 -2
- package/src/components/wt-app-header/_variables.scss +1 -1
- package/src/components/wt-app-header/wt-app-header.vue +2 -5
- package/src/components/wt-app-header/wt-app-navigator.vue +6 -5
- package/src/components/wt-app-header/wt-header-actions.vue +30 -14
- package/src/components/wt-avatar/_variables.scss +1 -1
- package/src/components/wt-avatar/wt-avatar.vue +2 -2
- package/src/components/wt-badge/wt-badge.vue +3 -3
- package/src/components/wt-button/_variables.scss +2 -32
- package/src/components/wt-button/wt-button.vue +5 -3
- package/src/components/wt-button-select/__tests__/WtButtonSelect.spec.js +9 -8
- package/src/components/wt-button-select/wt-button-select.vue +58 -59
- package/src/components/wt-checkbox/wt-checkbox.vue +15 -48
- package/src/components/wt-chip/_variables.scss +21 -2
- package/src/components/wt-chip/wt-chip.scss +20 -17
- package/src/components/wt-chip/wt-chip.vue +10 -5
- package/src/components/wt-context-menu/wt-context-menu.vue +4 -4
- package/src/components/wt-copy-action/wt-copy-action.vue +6 -6
- package/src/components/wt-datepicker/_variables.scss +1 -1
- package/src/components/wt-datepicker/wt-datepicker.vue +14 -12
- package/src/components/wt-divider/wt-divider.vue +1 -1
- package/src/components/wt-dummy/wt-dummy.vue +6 -2
- package/src/components/wt-error-page/wt-error-page.vue +10 -4
- package/src/components/wt-expansion-panel/wt-expansion-panel.vue +4 -4
- package/src/components/wt-filters-panel-wrapper/wt-filters-panel-wrapper.vue +7 -4
- package/src/components/wt-headline/wt-headline.vue +4 -4
- package/src/components/wt-headline-nav/_variables.scss +5 -2
- package/src/components/wt-headline-nav/wt-headline-nav.vue +46 -33
- package/src/components/wt-hint/wt-hint.vue +5 -6
- package/src/components/wt-icon/_variables.scss +5 -10
- package/src/components/wt-icon/wt-icon.vue +15 -6
- package/src/components/wt-icon-action/_internals/wt-add-icon-action.vue +2 -2
- package/src/components/wt-icon-action/_internals/wt-delete-icon-action.vue +2 -2
- package/src/components/wt-icon-action/_internals/wt-download-icon-action.vue +2 -2
- package/src/components/wt-icon-action/_internals/wt-edit-icon-action.vue +2 -2
- package/src/components/wt-icon-action/_internals/wt-history-icon-action.vue +2 -2
- package/src/components/wt-icon-action/_internals/wt-refresh-icon-action.vue +2 -2
- package/src/components/wt-icon-action/wt-icon-action.vue +1 -1
- package/src/components/wt-icon-btn/wt-icon-btn.vue +4 -2
- package/src/components/wt-indicator/_variables.scss +14 -19
- package/src/components/wt-indicator/wt-indicator.vue +26 -27
- package/src/components/wt-input/wt-input.vue +200 -219
- package/src/components/wt-input-info/wt-input-info.vue +2 -2
- package/src/components/wt-item-link/wt-item-link.vue +1 -1
- package/src/components/wt-label/_variables.scss +4 -2
- package/src/components/wt-label/wt-label.vue +5 -18
- package/src/components/wt-load-bar/wt-load-bar.vue +7 -4
- package/src/components/wt-loader/_internals/wt-loader--md.vue +11 -2
- package/src/components/wt-loader/_internals/wt-loader--sm.vue +9 -2
- package/src/components/wt-loader/_variables.scss +2 -2
- package/src/components/wt-loader/wt-loader.vue +10 -3
- package/src/components/wt-navigation-bar/wt-navigation-bar.vue +17 -9
- package/src/components/wt-notification/wt-notification.vue +4 -4
- package/src/components/wt-notifications-bar/wt-notifications-bar.vue +9 -5
- package/src/components/wt-page-header/wt-page-header.vue +7 -8
- package/src/components/wt-page-wrapper/wt-page-wrapper.vue +8 -5
- package/src/components/wt-pagination/wt-pagination.vue +17 -15
- package/src/components/wt-player/__tests__/WtPlayer.spec.js +1 -1
- package/src/components/wt-player/_variables.scss +1 -1
- package/src/components/wt-player/wt-player.vue +17 -17
- package/src/components/wt-popup/_variables.scss +4 -3
- package/src/components/wt-popup/wt-popup.vue +18 -10
- package/src/components/wt-progress-bar/_variables.scss +10 -8
- package/src/components/wt-progress-bar/wt-progress-bar.vue +27 -18
- package/src/components/wt-radio/wt-radio.vue +26 -54
- package/src/components/wt-rounded-action/_variables.scss +4 -35
- package/src/components/wt-rounded-action/wt-rounded-action.vue +15 -70
- package/src/components/wt-search-bar/__tests__/WtSearchBar.spec.js +1 -1
- package/src/components/wt-search-bar/wt-search-bar.vue +18 -42
- package/src/components/wt-select/_multiselect.scss +48 -53
- package/src/components/wt-select/_variables.scss +0 -3
- package/src/components/wt-select/mixins/multiselectMixin.js +9 -1
- package/src/components/wt-select/wt-select.vue +41 -40
- package/src/components/wt-slider/_variables.scss +6 -0
- package/src/components/wt-slider/wt-slider.vue +25 -9
- package/src/components/wt-status-select/_variables.scss +7 -4
- package/src/components/wt-status-select/wt-status-select.vue +18 -12
- package/src/components/wt-stepper/_variables.scss +5 -0
- package/src/components/wt-stepper/wt-stepper.vue +15 -9
- package/src/components/wt-switcher/_variables.scss +30 -7
- package/src/components/wt-switcher/wt-switcher.vue +56 -35
- package/src/components/wt-table/_variables.scss +8 -5
- package/src/components/wt-table/wt-table.vue +123 -90
- package/src/components/wt-table-actions/wt-table-actions.vue +14 -14
- package/src/components/wt-table-column-select/wt-table-column-select.vue +33 -28
- package/src/components/wt-tabs/_variables.scss +4 -4
- package/src/components/wt-tabs/wt-tabs.vue +15 -13
- package/src/components/wt-tags-input/wt-tags-input.vue +26 -35
- package/src/components/wt-textarea/wt-textarea.vue +37 -54
- package/src/components/wt-time-input/wt-time-input.vue +24 -54
- package/src/components/wt-timepicker/wt-timepicker.vue +19 -27
- package/src/components/wt-tooltip/__tests__/WtTooltip.spec.js +0 -10
- package/src/components/wt-tooltip/_internals/wt-tooltip-floating.vue +2 -2
- package/src/components/wt-tooltip/_variables.scss +2 -4
- package/src/components/wt-tooltip/wt-tooltip.vue +6 -18
- package/src/composables/useCachedInterval/__tests__/useCachedInterval.spec.js +5 -5
- package/src/composables/useRepresentableAgentPauseCause/__tests__/useRepresentableAgentPauseCause.spec.js +1 -1
- package/src/composables/useRepresentableAgentPauseCause/useRepresentableAgentPauseCause.js +1 -1
- package/src/css/styleguide/colors/_colors.scss +45 -29
- package/src/css/styleguide/colors/reusable/_text-field.scss +36 -0
- package/src/css/styleguide/placeholder/_placeholder.scss +9 -9
- package/src/enums/WebitelApplications/AdminSections.enum.js +2 -1
- package/src/locale/en/en.js +11 -3
- package/src/locale/es/es.js +2 -0
- package/src/locale/i18n.js +3 -1
- package/src/locale/kz/kz.js +327 -0
- package/src/locale/ru/ru.js +11 -3
- package/src/locale/ua/ua.js +11 -3
- package/src/mixins/validationMixin/__tests__/validationMixin.spec.js +2 -2
- package/src/mixins/validationMixin/useValidation.js +19 -4
- package/src/mixins/validationMixin/validationMixin.js +1 -0
- package/src/modules/AgentStatusSelect/components/__tests__/wt-cc-agent-status-select.spec.js +4 -4
- package/src/modules/AgentStatusSelect/components/_internals/wt-cc-pause-cause-popup.vue +11 -9
- package/src/modules/AgentStatusSelect/components/_internals/wt-cc-status-select-error-popup.vue +6 -5
- package/src/modules/AgentStatusSelect/components/wt-cc-agent-status-select.vue +3 -3
- package/src/modules/AuditForm/components/__tests__/audit-form.spec.js +1 -1
- package/src/modules/AuditForm/components/audit-form-question-read-wrapper.vue +11 -8
- package/src/modules/AuditForm/components/audit-form-question-write-wrapper.vue +8 -8
- package/src/modules/AuditForm/components/audit-form-question.vue +8 -8
- package/src/modules/AuditForm/components/audit-form.vue +6 -5
- package/src/modules/AuditForm/components/questions/options/audit-form-question-options-write-row.vue +4 -4
- package/src/modules/AuditForm/components/questions/options/audit-form-question-options.vue +7 -4
- package/src/modules/AuditForm/components/questions/score/audit-form-question-score.vue +3 -3
- package/src/modules/CSVExport/__tests__/CSVExport.spec.js +5 -2
- package/src/modules/DeleteConfirmationPopup/__tests__/delete-confirmation-popup.spec.js +77 -0
- package/src/modules/DeleteConfirmationPopup/components/delete-confirmation-popup.vue +35 -17
- package/src/modules/FilesExport/__tests__/FilesExport.spec.js +6 -3
- package/src/modules/FilesExport/scripts/generateMediaURL.js +1 -1
- package/src/modules/Filters/components/filter-pagination.vue +1 -1
- package/src/modules/Filters/components/filter-table-fields.vue +1 -1
- package/src/modules/Notifications/store/__tests__/NotificationsStoreModule.actions.spec.js +6 -6
- package/src/modules/QueryFilters/classes/__tests__/ApiFilterSchema.spec.js +1 -1
- package/src/modules/QueryFilters/components/__tests__/abstract-api-filter.spec.js +7 -5
- package/src/modules/QueryFilters/components/__tests__/abstract-enum-filter.spec.js +3 -1
- package/src/modules/QueryFilters/components/__tests__/filter-datetime.spec.js +2 -2
- package/src/modules/QueryFilters/components/__tests__/filter-from-to.spec.js +4 -4
- package/src/modules/QueryFilters/components/__tests__/filter-search.spec.js +2 -2
- package/src/modules/QueryFilters/components/abstract-api-filter.vue +2 -2
- package/src/modules/QueryFilters/components/abstract-enum-filter.vue +2 -2
- package/src/modules/QueryFilters/components/filter-datetime.vue +2 -2
- package/src/modules/QueryFilters/components/filter-from-to.vue +12 -10
- package/src/modules/QueryFilters/components/filter-search.vue +2 -2
- package/src/modules/QueryFilters/components/filter-table-fields.vue +7 -7
- package/src/modules/QueryFilters/mixins/__tests__/apiFilterMixin.spec.js +1 -1
- package/src/modules/QueryFilters/mixins/__tests__/enumFilterMixin.spec.js +2 -2
- package/src/modules/QueryFilters/mixins/__tests__/paginationFilterMixin.spec.js +2 -2
- package/src/modules/QueryFilters/mixins/__tests__/sortFilterMixin.spec.js +1 -1
- package/src/modules/QueryFilters/store/__tests__/QueryFiltersStoreModule.spec.js +2 -2
- package/src/modules/Userinfo/classes/ApplicationsAccess.js +6 -2
- package/src/modules/Userinfo/components/__tests__/auth.spec.js +7 -8
- package/src/modules/Userinfo/components/the-auth.vue +8 -5
- package/src/scripts/debounce.js +1 -1
- package/src/scripts/saveAsJSON.js +9 -0
- package/src/store/BaseStoreModules/__tests__/BaseStoreModule.spec.js +6 -6
- package/src/validators/variableSearchValidator/__tests__/variableSearchValidator.spec.js +48 -0
- package/src/validators/variableSearchValidator/variableSearchValidator.js +10 -0
- package/src/validators/websocketValidator/__tests__/websocketValidator.spec.js +28 -0
- package/src/validators/websocketValidator/websocketValidator.js +9 -0
- package/dist/demo.html +0 -1
- package/dist/ui-sdk.common.js +0 -43066
- package/dist/ui-sdk.common.js.map +0 -1
- package/dist/ui-sdk.umd.js.map +0 -1
- package/dist/ui-sdk.umd.min.js +0 -35
- package/dist/ui-sdk.umd.min.js.map +0 -1
- package/src/components/wt-button/Readme.md +0 -23
- package/src/components/wt-button-select/Readme.md +0 -13
- package/src/components/wt-icon/Readme.md +0 -327
- package/src/components/wt-icon/docs/cleanup-svg-fill-none.png +0 -0
- package/src/components/wt-icon/docs/cleanup-svg-fill.png +0 -0
- package/src/components/wt-icon/docs/cleanup-svg-viewbox-correct.png +0 -0
- package/src/components/wt-icon/docs/cleanup-svg-viewbox-incorrect.png +0 -0
- package/src/components/wt-icon/docs/cleanup-svg-width-height.png +0 -0
- package/src/components/wt-icon/docs/svg-icon-code-example.png +0 -0
- package/src/components/wt-icon/docs/svg-sprite-in-dom.png +0 -0
- package/src/components/wt-icon-btn/Readme.md +0 -10
- package/src/components/wt-rounded-action/Readme.md +0 -68
- package/src/components/wt-tags-input/_variables.scss +0 -24
- package/src/locale/.DS_Store +0 -0
|
@@ -16,13 +16,21 @@
|
|
|
16
16
|
:disabled="disabled"
|
|
17
17
|
@input="inputHandler"
|
|
18
18
|
>
|
|
19
|
-
<wt-icon
|
|
19
|
+
<wt-icon
|
|
20
|
+
class="wt-radio__icon"
|
|
21
|
+
:icon="radioIcon"
|
|
22
|
+
/>
|
|
20
23
|
<!-- @slot Custom input label -->
|
|
21
24
|
<slot
|
|
22
25
|
v-bind="{ label, isChecked, disabled }"
|
|
23
26
|
name="label"
|
|
24
27
|
>
|
|
25
|
-
<div
|
|
28
|
+
<div
|
|
29
|
+
v-if="label"
|
|
30
|
+
class="wt-radio__label"
|
|
31
|
+
>
|
|
32
|
+
{{ label }}
|
|
33
|
+
</div>
|
|
26
34
|
</slot>
|
|
27
35
|
</wt-label>
|
|
28
36
|
</div>
|
|
@@ -30,7 +38,11 @@
|
|
|
30
38
|
|
|
31
39
|
<script>
|
|
32
40
|
export default {
|
|
33
|
-
name: '
|
|
41
|
+
name: 'WtRadio',
|
|
42
|
+
model: {
|
|
43
|
+
prop: 'selected',
|
|
44
|
+
event: 'input',
|
|
45
|
+
},
|
|
34
46
|
props: {
|
|
35
47
|
// value, set by radio
|
|
36
48
|
value: {
|
|
@@ -59,10 +71,7 @@ export default {
|
|
|
59
71
|
default: false,
|
|
60
72
|
},
|
|
61
73
|
},
|
|
62
|
-
|
|
63
|
-
prop: 'selected',
|
|
64
|
-
event: 'input',
|
|
65
|
-
},
|
|
74
|
+
emits: ['input'],
|
|
66
75
|
computed: {
|
|
67
76
|
isChecked() {
|
|
68
77
|
return this.value === this.selected;
|
|
@@ -79,9 +88,11 @@ export default {
|
|
|
79
88
|
};
|
|
80
89
|
</script>
|
|
81
90
|
|
|
82
|
-
<style lang="scss"
|
|
83
|
-
|
|
91
|
+
<style lang="scss">
|
|
84
92
|
@import './variables.scss';
|
|
93
|
+
</style>
|
|
94
|
+
|
|
95
|
+
<style lang="scss" scoped>
|
|
85
96
|
|
|
86
97
|
/* Customize the label (the container) */
|
|
87
98
|
.wt-radio {
|
|
@@ -120,61 +131,22 @@ export default {
|
|
|
120
131
|
}
|
|
121
132
|
|
|
122
133
|
.wt-radio:hover {
|
|
123
|
-
.wt-
|
|
124
|
-
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
::v-deep .wt-icon__icon {
|
|
128
|
-
fill: var(--icon-color--hover);
|
|
134
|
+
:deep .wt-icon__icon {
|
|
135
|
+
fill: var(--icon-btn-hover-color);
|
|
129
136
|
}
|
|
130
137
|
}
|
|
131
138
|
|
|
132
139
|
.wt-radio--active {
|
|
133
|
-
.wt-
|
|
134
|
-
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
::v-deep .wt-icon__icon {
|
|
138
|
-
fill: var(--icon-color-active);
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
.wt-radio--outline {
|
|
143
|
-
.wt-radio__label {
|
|
144
|
-
color: var(--form-outline-label-color);
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
::v-deep .wt-icon__icon {
|
|
148
|
-
fill: var(--icon-outline-color);
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
&.wt-radio--active {
|
|
152
|
-
.wt-radio__label {
|
|
153
|
-
color: var(--form-label--active-color);
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
::v-deep .wt-icon__icon {
|
|
157
|
-
fill: var(--icon-outline--active-color);
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
&:hover {
|
|
162
|
-
|
|
163
|
-
::v-deep .wt-icon__icon {
|
|
164
|
-
fill: var(--icon-outline--hover-color);
|
|
165
|
-
}
|
|
140
|
+
:deep .wt-icon__icon {
|
|
141
|
+
fill: var(--icon-active-color);
|
|
166
142
|
}
|
|
167
143
|
}
|
|
168
144
|
|
|
169
145
|
.wt-radio--disabled {
|
|
170
146
|
pointer-events: none;
|
|
171
147
|
|
|
172
|
-
.wt-
|
|
173
|
-
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
::v-deep .wt-icon__icon {
|
|
177
|
-
fill: var(--icon-color-disabled);
|
|
148
|
+
:deep .wt-icon__icon {
|
|
149
|
+
fill: var(--icon-disabled-color);
|
|
178
150
|
}
|
|
179
151
|
}
|
|
180
152
|
</style>
|
|
@@ -1,45 +1,14 @@
|
|
|
1
1
|
:root {
|
|
2
|
-
--rounded-action-border-size:
|
|
2
|
+
--rounded-action-border-size: 2px;
|
|
3
3
|
--rounded-action-padding: calc(var(--spacing-xs) - var(--rounded-action-border-size));
|
|
4
4
|
|
|
5
5
|
--rounded-action-rounded-border-radius: var(--border-radius--pill);
|
|
6
6
|
|
|
7
|
-
--rounded-action-
|
|
8
|
-
--rounded-action-
|
|
7
|
+
--rounded-action-bg-color: var(--dp-20-surface-color);
|
|
8
|
+
--rounded-action-bg-hover-color: var(--dp-22-surface-color);
|
|
9
9
|
|
|
10
|
-
--rounded-action-
|
|
11
|
-
--rounded-action-secondary-hover-color: var(--dp-18-surface-color);
|
|
12
|
-
--rounded-action-secondary-active-color: var(--grey-lighten-1);
|
|
13
|
-
|
|
14
|
-
--rounded-action-success-color: var(--success-color);
|
|
15
|
-
--rounded-action-success-hover-color: var(--success-hover-color);
|
|
16
|
-
|
|
17
|
-
--rounded-action-error-color: var(--error-color);
|
|
18
|
-
--rounded-action-error-hover-color: var(--error-hover-color);
|
|
19
|
-
|
|
20
|
-
--rounded-action-transfer-color: var(--transfer-color);
|
|
21
|
-
--rounded-action-transfer-hover-color: var(--transfer-hover-color);
|
|
22
|
-
|
|
23
|
-
--rounded-action-disabled-color: var(--dp-18-surface-color);
|
|
10
|
+
--rounded-action-active-color: var(--dp-10-surface-color);
|
|
24
11
|
}
|
|
25
12
|
|
|
26
13
|
:root.theme--dark {
|
|
27
|
-
--rounded-action-primary-color: var(--primary-color);
|
|
28
|
-
--rounded-action-primary-hover-color: var(--primary-hover-color);
|
|
29
|
-
|
|
30
|
-
--rounded-action-secondary-color: var(--dp-20-surface-color);
|
|
31
|
-
--rounded-action-secondary-hover-color: var(--dp-18-surface-color);
|
|
32
|
-
--rounded-action-secondary-active-color: var(--grey-darken-1);
|
|
33
|
-
|
|
34
|
-
--rounded-action-success-color: var(--success-color);
|
|
35
|
-
--rounded-action-success-hover-color: var(--success-hover-color);
|
|
36
|
-
|
|
37
|
-
--rounded-action-error-color: var(--error-color);
|
|
38
|
-
--rounded-action-error-hover-color: var(--error-hover-color);
|
|
39
|
-
|
|
40
|
-
--rounded-action-transfer-color: var(--transfer-color);
|
|
41
|
-
--rounded-action-transfer-hover-color: var(--transfer-hover-color);
|
|
42
|
-
|
|
43
|
-
--rounded-action-disabled-color: var(--dp-18-surface-color);
|
|
44
|
-
|
|
45
14
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<button
|
|
3
3
|
:class="[
|
|
4
|
-
`wt-rounded-action--color-${color}`,
|
|
5
4
|
`wt-rounded-action--size-${size}`,
|
|
6
5
|
{ 'wt-rounded-action--active': active },
|
|
7
6
|
{ 'wt-rounded-action--disabled': disabled },
|
|
@@ -16,13 +15,13 @@
|
|
|
16
15
|
v-if="loading"
|
|
17
16
|
size="sm"
|
|
18
17
|
:color="loaderColor"
|
|
19
|
-
|
|
18
|
+
/>
|
|
20
19
|
<wt-icon
|
|
21
20
|
v-else
|
|
22
21
|
:color="iColor"
|
|
23
22
|
:icon="icon"
|
|
24
23
|
:size="size"
|
|
25
|
-
|
|
24
|
+
/>
|
|
26
25
|
</button>
|
|
27
26
|
</template>
|
|
28
27
|
|
|
@@ -76,16 +75,14 @@ const props = defineProps({
|
|
|
76
75
|
const emit = defineEmits(['click']);
|
|
77
76
|
|
|
78
77
|
const iColor = computed(() => {
|
|
79
|
-
const onDark = ['success', 'error', 'transfer'];
|
|
80
|
-
const onLight = ['primary'];
|
|
81
78
|
if (props.disabled) return 'disabled';
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
79
|
+
switch (props.color) {
|
|
80
|
+
case 'secondary': return 'default';
|
|
81
|
+
default: return props.color;
|
|
82
|
+
}
|
|
86
83
|
});
|
|
87
84
|
const loaderColor = computed(() => {
|
|
88
|
-
if (['success', 'transfer', 'error'].includes(props.color)) return 'main';
|
|
85
|
+
// if (['success', 'transfer', 'error'].includes(props.color)) return 'main';
|
|
89
86
|
return 'contrast';
|
|
90
87
|
});
|
|
91
88
|
</script>
|
|
@@ -100,15 +97,15 @@ const loaderColor = computed(() => {
|
|
|
100
97
|
width: fit-content;
|
|
101
98
|
line-height: 0;
|
|
102
99
|
padding: var(--rounded-action-padding);
|
|
103
|
-
box-shadow: var(--elevation-1);
|
|
104
100
|
border: var(--rounded-action-border-size) solid;
|
|
105
|
-
background: var(--rounded-action-
|
|
106
|
-
border-color: var(--rounded-action-
|
|
101
|
+
background: var(--rounded-action-bg-color);
|
|
102
|
+
border-color: var(--rounded-action-bg-color);
|
|
107
103
|
border-radius: var(--border-radius);
|
|
108
104
|
transition: var(--transition);
|
|
109
105
|
|
|
110
106
|
&:hover {
|
|
111
|
-
|
|
107
|
+
background: var(--rounded-action-bg-hover-color);
|
|
108
|
+
border-color: var(--rounded-action-bg-hover-color);
|
|
112
109
|
}
|
|
113
110
|
|
|
114
111
|
&--wide {
|
|
@@ -119,67 +116,15 @@ const loaderColor = computed(() => {
|
|
|
119
116
|
border-radius: var(--rounded-action-rounded-border-radius);
|
|
120
117
|
}
|
|
121
118
|
|
|
122
|
-
&--
|
|
123
|
-
|
|
124
|
-
background: var(--rounded-action-primary-color);
|
|
125
|
-
border-color: var(--rounded-action-primary-color);
|
|
126
|
-
|
|
127
|
-
&:hover {
|
|
128
|
-
background: var(--rounded-action-primary-hover-color);
|
|
129
|
-
border-color: var(--rounded-action-primary-hover-color);
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
&-secondary {
|
|
134
|
-
background: var(--rounded-action-secondary-color);
|
|
135
|
-
border-color: var(--rounded-action-secondary-color);
|
|
136
|
-
|
|
137
|
-
&:hover {
|
|
138
|
-
background: var(--rounded-action-secondary-hover-color);
|
|
139
|
-
border-color: var(--rounded-action-secondary-hover-color);
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
&.wt-rounded-action--active {
|
|
143
|
-
background: transparent;
|
|
144
|
-
border-color: var(--rounded-action-secondary-active-color);
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
&-success {
|
|
149
|
-
background: var(--rounded-action-success-color);
|
|
150
|
-
border-color: var(--rounded-action-success-color);
|
|
151
|
-
|
|
152
|
-
&:hover {
|
|
153
|
-
background: var(--rounded-action-success-hover-color);
|
|
154
|
-
border-color: var(--rounded-action-success-hover-color);
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
&-error {
|
|
159
|
-
background: var(--rounded-action-error-color);
|
|
160
|
-
border-color: var(--rounded-action-error-color);
|
|
161
|
-
|
|
162
|
-
&:hover {
|
|
163
|
-
background: var(--rounded-action-error-hover-color);
|
|
164
|
-
border-color: var(--rounded-action-error-hover-color);
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
&-transfer {
|
|
169
|
-
background: var(--rounded-action-transfer-color);
|
|
170
|
-
border-color: var(--rounded-action-transfer-color);
|
|
119
|
+
&--active {
|
|
120
|
+
border-color: var(--rounded-action-active-color);
|
|
171
121
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
border-color: var(--rounded-action-transfer-hover-color);
|
|
175
|
-
}
|
|
122
|
+
&:hover {
|
|
123
|
+
border-color: var(--rounded-action-active-color);
|
|
176
124
|
}
|
|
177
125
|
}
|
|
178
126
|
|
|
179
127
|
&.wt-rounded-action--disabled {
|
|
180
|
-
background: var(--rounded-action-disabled-color);
|
|
181
|
-
border-color: var(--rounded-action-disabled-color);
|
|
182
|
-
box-shadow: none;
|
|
183
128
|
pointer-events: none;
|
|
184
129
|
}
|
|
185
130
|
|
|
@@ -3,7 +3,7 @@ import { shallowMount } from '@vue/test-utils';
|
|
|
3
3
|
import WtSearchBar from '../wt-search-bar.vue';
|
|
4
4
|
import { useValidation } from '../../../mixins/validationMixin/useValidation';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
vi.mock('../../../mixins/validationMixin/useValidation');
|
|
7
7
|
useValidation.mockImplementation(() => ({
|
|
8
8
|
isValidation: ref(false),
|
|
9
9
|
invalid: ref(false),
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
:class="{
|
|
4
|
-
'wt-search-bar--outline': outline,
|
|
5
4
|
'wt-search-bar--invalid': invalid,
|
|
6
5
|
}"
|
|
7
6
|
class="wt-search-bar"
|
|
@@ -15,7 +14,7 @@
|
|
|
15
14
|
<wt-icon
|
|
16
15
|
:color="invalidColorProvider"
|
|
17
16
|
icon="search"
|
|
18
|
-
|
|
17
|
+
/>
|
|
19
18
|
</slot>
|
|
20
19
|
</div>
|
|
21
20
|
<input
|
|
@@ -29,20 +28,21 @@
|
|
|
29
28
|
<div class="wt-search-bar__icon-controls">
|
|
30
29
|
<wt-icon-btn
|
|
31
30
|
:class="{ 'hidden': !value }"
|
|
31
|
+
:color="invalidColorProvider"
|
|
32
32
|
class="wt-search-bar__reset-icon-btn"
|
|
33
33
|
icon="close"
|
|
34
|
-
:color="invalidColorProvider"
|
|
35
34
|
@click="handleInput('')"
|
|
36
|
-
|
|
35
|
+
/>
|
|
37
36
|
<wt-hint
|
|
38
37
|
v-if="hint"
|
|
39
|
-
:
|
|
40
|
-
>
|
|
38
|
+
:icon-color="invalidColorProvider"
|
|
39
|
+
>
|
|
40
|
+
{{ hint }}
|
|
41
41
|
</wt-hint>
|
|
42
42
|
<slot
|
|
43
43
|
:invalid="invalid"
|
|
44
44
|
name="additional-actions"
|
|
45
|
-
|
|
45
|
+
/>
|
|
46
46
|
</div>
|
|
47
47
|
</div>
|
|
48
48
|
</div>
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
|
|
51
51
|
<script setup>
|
|
52
52
|
import { computed, toRefs } from 'vue';
|
|
53
|
-
import debounce from '../../scripts/debounce';
|
|
54
53
|
import { useValidation } from '../../mixins/validationMixin/useValidation';
|
|
54
|
+
import debounce from '../../scripts/debounce';
|
|
55
55
|
|
|
56
56
|
const props = defineProps({
|
|
57
57
|
v: {
|
|
@@ -74,10 +74,6 @@ const props = defineProps({
|
|
|
74
74
|
placeholder: {
|
|
75
75
|
type: String,
|
|
76
76
|
},
|
|
77
|
-
outline: {
|
|
78
|
-
type: Boolean,
|
|
79
|
-
default: false,
|
|
80
|
-
},
|
|
81
77
|
hint: {
|
|
82
78
|
type: String,
|
|
83
79
|
description: 'Adds hint icon + tooltip with text, passed as "hint" prop',
|
|
@@ -94,9 +90,7 @@ const { v, customValidators } = toRefs(props);
|
|
|
94
90
|
|
|
95
91
|
const { invalid } = useValidation({ v, customValidators });
|
|
96
92
|
|
|
97
|
-
const invalidColorProvider = computed(() =>
|
|
98
|
-
return invalid.value ? 'danger' : null;
|
|
99
|
-
});
|
|
93
|
+
const invalidColorProvider = computed(() => (invalid.value ? 'error' : 'default'));
|
|
100
94
|
|
|
101
95
|
const search = debounce((value) => {
|
|
102
96
|
emit('search', value);
|
|
@@ -129,21 +123,23 @@ function handleKeyup(event) {
|
|
|
129
123
|
|
|
130
124
|
&.wt-search-bar--invalid {
|
|
131
125
|
.wt-search-bar__wrapper {
|
|
132
|
-
border-color: var(--
|
|
126
|
+
border-color: var(--wt-text-field-input-border-error-color);
|
|
133
127
|
outline: none; // prevent outline overlapping false color
|
|
134
128
|
}
|
|
129
|
+
|
|
135
130
|
.wt-search-bar__input {
|
|
136
|
-
|
|
131
|
+
@include wt-placeholder('error');
|
|
132
|
+
color: var(--wt-text-field-error-text-color);
|
|
137
133
|
}
|
|
138
134
|
}
|
|
139
135
|
|
|
140
136
|
.wt-search-bar__wrapper {
|
|
141
|
-
border: var(--input-border);
|
|
142
|
-
border-color: var(--form-border-color);
|
|
143
|
-
border-radius: var(--border-radius);
|
|
144
137
|
display: flex;
|
|
145
|
-
padding: calc(var(--spacing-xs) - 1px) var(--spacing-xs);
|
|
146
138
|
align-items: center;
|
|
139
|
+
padding: calc(var(--spacing-xs) - 1px) var(--spacing-xs);
|
|
140
|
+
border: var(--input-border);
|
|
141
|
+
border-color: var(--wt-text-field-input-border-color);
|
|
142
|
+
border-radius: var(--border-radius);
|
|
147
143
|
gap: var(--spacing-xs);
|
|
148
144
|
}
|
|
149
145
|
|
|
@@ -167,29 +163,9 @@ function handleKeyup(event) {
|
|
|
167
163
|
width: 100%;
|
|
168
164
|
padding: 0;
|
|
169
165
|
transition: var(--transition);
|
|
170
|
-
color: var(--
|
|
166
|
+
color: var(--wt-text-field-placeholder-color);
|
|
171
167
|
border: none;
|
|
172
168
|
outline: none;
|
|
173
|
-
|
|
174
|
-
&:focus {
|
|
175
|
-
@include wt-placeholder('focus');
|
|
176
|
-
border-color: var(--form-border--hover-color);
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
.wt-search-bar--outline & {
|
|
180
|
-
border-color: var(--form-outline-border-color);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
.wt-search-bar--outline:hover &,
|
|
184
|
-
.wt-search-bar--outline &:focus {
|
|
185
|
-
border-color: var(--form-outline-border--hover-color);
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
/* make icons black */
|
|
190
|
-
.wt-search-bar:hover ::v-deep .wt-icon__icon,
|
|
191
|
-
.wt-search-bar:focus-within ::v-deep .wt-icon__icon {
|
|
192
|
-
fill: var(--icon-color--hover);
|
|
193
169
|
}
|
|
194
170
|
|
|
195
171
|
/* clears the 'X' from Internet Explorer */
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
@import '~vue-multiselect/dist/vue3-multiselect.css';
|
|
2
1
|
|
|
3
|
-
.multiselect
|
|
2
|
+
.multiselect :deep {
|
|
4
3
|
cursor: pointer;
|
|
5
4
|
position: relative;
|
|
6
5
|
|
|
@@ -12,6 +11,7 @@
|
|
|
12
11
|
transition: var(--transition);
|
|
13
12
|
width: fit-content; // reset default
|
|
14
13
|
height: fit-content; // reset default
|
|
14
|
+
background: transparent;
|
|
15
15
|
|
|
16
16
|
&:before {
|
|
17
17
|
display: none; // reset default
|
|
@@ -30,12 +30,13 @@
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
|
|
33
|
+
// visible select input wrapper
|
|
33
34
|
.multiselect__tags {
|
|
34
35
|
padding: calc(var(--spacing-xs) - 1px); // borders
|
|
35
|
-
color: var(--form-input-color);
|
|
36
36
|
border: var(--select-tags-border);
|
|
37
|
-
border-color: var(--
|
|
37
|
+
border-color: var(--wt-text-field-input-border-color);
|
|
38
38
|
border-radius: var(--border-radius);
|
|
39
|
+
background: transparent;
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
|
|
@@ -49,13 +50,9 @@
|
|
|
49
50
|
margin: 0; // reset default
|
|
50
51
|
}
|
|
51
52
|
|
|
52
|
-
.multiselect__input:focus {
|
|
53
|
-
@include wt-placeholder('focus');
|
|
54
|
-
}
|
|
55
|
-
|
|
56
53
|
.multiselect__custom-tag,
|
|
57
54
|
.multiselect__single-label {
|
|
58
|
-
color: var(--
|
|
55
|
+
color: var(--wt-text-field-placeholder-color);
|
|
59
56
|
}
|
|
60
57
|
|
|
61
58
|
.multiselect__placeholder {
|
|
@@ -69,17 +66,22 @@
|
|
|
69
66
|
text-overflow: ellipsis;
|
|
70
67
|
}
|
|
71
68
|
|
|
69
|
+
// select options wrapper
|
|
72
70
|
.multiselect__content-wrapper {
|
|
73
71
|
@extend %wt-distant-scrollbar;
|
|
74
72
|
transition: var(--transition);
|
|
75
73
|
border: var(--select-tags-border);
|
|
76
|
-
border-color: var(--
|
|
74
|
+
border-color: var(--wt-text-field-select-option-wrapper-border-color);
|
|
77
75
|
border-radius: var(--border-radius);
|
|
76
|
+
box-shadow: var(--elevation-10);
|
|
78
77
|
}
|
|
79
78
|
|
|
79
|
+
// select options
|
|
80
80
|
.multiselect__option {
|
|
81
81
|
@extend %typo-body-1;
|
|
82
82
|
padding: var(--select-options-padding);
|
|
83
|
+
color: var(--wt-text-field-select-option-text-color);
|
|
84
|
+
background: var(--wt-text-field-select-option-background-color);
|
|
83
85
|
|
|
84
86
|
&:after {
|
|
85
87
|
display: none;
|
|
@@ -87,53 +89,28 @@
|
|
|
87
89
|
|
|
88
90
|
|
|
89
91
|
&--highlight {
|
|
90
|
-
color: var(--
|
|
91
|
-
|
|
92
|
-
background: none;
|
|
92
|
+
color: var(--wt-text-field-select-option-text-hover-color);
|
|
93
|
+
background: var(--wt-text-field-select-option-background-hover-color);
|
|
93
94
|
}
|
|
94
95
|
|
|
95
96
|
|
|
96
97
|
&--selected {
|
|
97
|
-
font-weight: normal;
|
|
98
|
-
|
|
98
|
+
font-weight: normal; // reset
|
|
99
|
+
color: var(--wt-text-field-select-option-text-selected-color);
|
|
100
|
+
background: var(--wt-text-field-select-option-background-selected-color)
|
|
99
101
|
}
|
|
100
102
|
}
|
|
101
103
|
}
|
|
102
104
|
|
|
103
|
-
.multiselect--active
|
|
105
|
+
.multiselect--active :deep {
|
|
104
106
|
.multiselect__select .wt-icon__icon {
|
|
105
|
-
fill: var(--icon-color
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.multiselect__tags {
|
|
109
|
-
border-color: var(--form-border--active-color);
|
|
110
|
-
|
|
111
|
-
.multiselect__placeholder {
|
|
112
|
-
@extend %wt-placeholder--focus;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.wt-select:hover,
|
|
119
|
-
.wt-tags-input:hover {
|
|
120
|
-
.multiselect ::v-deep {
|
|
121
|
-
.multiselect__tags {
|
|
122
|
-
border-color: var(--form-border--hover-color);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.multiselect__select,
|
|
126
|
-
.multiselect__clear {
|
|
127
|
-
.wt-icon__icon {
|
|
128
|
-
fill: var(--icon-color--hover);
|
|
129
|
-
}
|
|
130
|
-
}
|
|
107
|
+
fill: var(--icon-active-color);
|
|
131
108
|
}
|
|
132
109
|
}
|
|
133
110
|
|
|
134
111
|
.wt-select--loading,
|
|
135
112
|
.wt-tags-input--loading {
|
|
136
|
-
|
|
113
|
+
:deep {
|
|
137
114
|
.multiselect__content-wrapper {
|
|
138
115
|
overflow-y: hidden;
|
|
139
116
|
}
|
|
@@ -156,11 +133,21 @@
|
|
|
156
133
|
|
|
157
134
|
.wt-select.wt-select--invalid,
|
|
158
135
|
.wt-tags-input.wt-tags-input--invalid {
|
|
159
|
-
.multiselect
|
|
136
|
+
.multiselect :deep {
|
|
160
137
|
.multiselect__tags {
|
|
161
|
-
border-color: var(--
|
|
138
|
+
border-color: var(--wt-text-field-input-border-error-color);
|
|
162
139
|
outline: none; // prevent outline overlapping false color
|
|
163
140
|
}
|
|
141
|
+
|
|
142
|
+
.multiselect__custom-tag,
|
|
143
|
+
.multiselect__single-label {
|
|
144
|
+
color: var(--wt-text-field-placeholder-error-color);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.multiselect__placeholder {
|
|
148
|
+
@extend %wt-placeholder--error;
|
|
149
|
+
//color: var(--form-placeholder--disabled-color);
|
|
150
|
+
}
|
|
164
151
|
}
|
|
165
152
|
}
|
|
166
153
|
|
|
@@ -177,16 +164,11 @@
|
|
|
177
164
|
background: transparent; // reset default
|
|
178
165
|
}
|
|
179
166
|
|
|
180
|
-
.multiselect__arrow-caret ::v-deep .wt-icon__icon,
|
|
181
|
-
.multiselect__clear ::v-deep .wt-icon__icon {
|
|
182
|
-
fill: var(--icon-color-disabled);
|
|
183
|
-
}
|
|
184
|
-
|
|
185
167
|
.multiselect {
|
|
186
|
-
|
|
168
|
+
:deep {
|
|
187
169
|
.multiselect__tags {
|
|
188
|
-
border-color: var(--
|
|
189
|
-
background: var(--
|
|
170
|
+
border-color: var(--wt-text-field-input-border-disabled-color);
|
|
171
|
+
background: var(--wt-text-field-input-background-disabled-color);
|
|
190
172
|
|
|
191
173
|
.multiselect__placeholder {
|
|
192
174
|
@extend %wt-placeholder--disabled;
|
|
@@ -196,3 +178,16 @@
|
|
|
196
178
|
}
|
|
197
179
|
}
|
|
198
180
|
}
|
|
181
|
+
|
|
182
|
+
// override .wt-select colors on chips
|
|
183
|
+
.wt-tags-input,
|
|
184
|
+
.wt-tags-input--invalid {
|
|
185
|
+
.multiselect :deep {
|
|
186
|
+
.multiselect__tags {
|
|
187
|
+
.multiselect__custom-tag,
|
|
188
|
+
.multiselect__single-label {
|
|
189
|
+
color: var(--wt-chip-main-text-color);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
@@ -8,7 +8,4 @@
|
|
|
8
8
|
--select-tags-border: var(--input-border); // right pos = 10px spacing + clear icon size + clear offset
|
|
9
9
|
|
|
10
10
|
--select-options-padding: var(--input-padding);
|
|
11
|
-
|
|
12
|
-
--select-option--hover-color: var(--accent-secondary-color);
|
|
13
|
-
--select-option--active-color: var(--accent-secondary-color);
|
|
14
11
|
}
|
|
@@ -144,8 +144,16 @@ export default {
|
|
|
144
144
|
tag() {},
|
|
145
145
|
},
|
|
146
146
|
|
|
147
|
+
watch: {
|
|
148
|
+
disabled() {
|
|
149
|
+
// load options if becomes enabled
|
|
150
|
+
if (!this.disabled) this.fetchOptions();
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
|
|
147
154
|
created() {
|
|
148
|
-
|
|
155
|
+
// load options only if not disabled
|
|
156
|
+
if (!this.disabled) this.fetchOptions();
|
|
149
157
|
this.fetchOptions = debounce(this.fetchOptions, 500);
|
|
150
158
|
},
|
|
151
159
|
};
|