@webitel/ui-sdk 23.12.46 → 23.12.48
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/ui-sdk.css +1 -1
- package/dist/ui-sdk.mjs +12 -14
- package/dist/ui-sdk.umd.js +4 -4
- package/package.json +1 -1
- package/src/components/wt-progress-bar/_variables.scss +9 -7
- package/src/components/wt-progress-bar/wt-progress-bar.vue +16 -11
- package/src/components/wt-radio/wt-radio.vue +11 -47
- package/src/components/wt-search-bar/wt-search-bar.vue +5 -23
- package/src/components/wt-slider/_variables.scss +4 -0
- package/src/components/wt-slider/wt-slider.vue +5 -4
- package/src/components/wt-status-select/_variables.scss +6 -4
- package/src/components/wt-status-select/wt-status-select.vue +8 -3
- package/src/composables/useRepresentableAgentPauseCause/__tests__/useRepresentableAgentPauseCause.spec.js +1 -1
- package/src/composables/useRepresentableAgentPauseCause/useRepresentableAgentPauseCause.js +1 -1
package/package.json
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
|
|
2
2
|
:root {
|
|
3
|
-
--progress-bar-height: 12px;
|
|
4
|
-
--progress-bar-padding: var(--spacing-3xs);
|
|
5
|
-
--progress-bar-border-radius: var(--progress-bar-padding);
|
|
3
|
+
--wt-progress-bar-height: 12px;
|
|
4
|
+
--wt-progress-bar-padding: var(--spacing-3xs);
|
|
5
|
+
--wt-progress-bar-border-radius: var(--wt-progress-bar-padding);
|
|
6
6
|
|
|
7
|
-
--progress-bar-
|
|
8
|
-
--progress-bar-
|
|
9
|
-
--progress-bar-
|
|
10
|
-
--progress-bar-
|
|
7
|
+
--wt-progress-bar-background-color: var(--dp-1-surface-color);
|
|
8
|
+
--wt-progress-bar-background-primary-color: var(--primary-color);
|
|
9
|
+
--wt-progress-bar-background-secondary-color: var(--dp-20-surface-color);
|
|
10
|
+
--wt-progress-bar-background-success-color: var(--success-color);
|
|
11
|
+
--wt-progress-bar-background-error-color: var(--error-color);
|
|
12
|
+
--wt-progress-bar-background-warning-color: var(--warning-color);
|
|
11
13
|
}
|
|
@@ -29,7 +29,7 @@ export default {
|
|
|
29
29
|
color: {
|
|
30
30
|
type: String,
|
|
31
31
|
default: 'primary',
|
|
32
|
-
options: ['primary', 'secondary', 'success', '
|
|
32
|
+
options: ['primary', 'secondary', 'success', 'error'],
|
|
33
33
|
},
|
|
34
34
|
},
|
|
35
35
|
computed: {
|
|
@@ -56,38 +56,43 @@ export default {
|
|
|
56
56
|
box-sizing: border-box;
|
|
57
57
|
width: 100%;
|
|
58
58
|
position: relative;
|
|
59
|
-
padding: var(--progress-bar-padding);
|
|
59
|
+
padding: var(--wt-progress-bar-padding);
|
|
60
60
|
line-height: 0;
|
|
61
|
+
background: var(--wt-progress-bar-background-color);
|
|
61
62
|
border-radius: var(--border-radius);
|
|
62
63
|
box-shadow: var(--elevation-1);
|
|
63
64
|
}
|
|
64
65
|
|
|
65
66
|
.wt-progress-bar__progress {
|
|
66
67
|
display: inline-block;
|
|
67
|
-
height: var(--progress-bar-height);
|
|
68
|
+
height: var(--wt-progress-bar-height);
|
|
68
69
|
will-change: width;
|
|
69
|
-
background: var(--primary-color);
|
|
70
|
-
border-radius: var(--progress-bar-border-radius) 0 0 var(--progress-bar-border-radius);
|
|
70
|
+
background: var(--wt-progress-bar-background-primary-color);
|
|
71
|
+
border-radius: var(--wt-progress-bar-border-radius) 0 0 var(--wt-progress-bar-border-radius);
|
|
71
72
|
transition: var(--transition);
|
|
72
73
|
}
|
|
73
74
|
|
|
74
75
|
.wt-progress-bar--primary .wt-progress-bar__progress {
|
|
75
|
-
background: var(--progress-bar-
|
|
76
|
+
background: var(--wt-progress-bar-background-primary-color);
|
|
76
77
|
}
|
|
77
78
|
|
|
78
79
|
.wt-progress-bar--secondary .wt-progress-bar__progress {
|
|
79
|
-
background: var(--progress-bar-
|
|
80
|
+
background: var(--wt-progress-bar-background-secondary-color);
|
|
80
81
|
}
|
|
81
82
|
|
|
82
83
|
.wt-progress-bar--success .wt-progress-bar__progress {
|
|
83
|
-
background: var(--progress-bar-
|
|
84
|
+
background: var(--wt-progress-bar-background-success-color);
|
|
84
85
|
}
|
|
85
86
|
|
|
86
|
-
.wt-progress-bar--
|
|
87
|
-
background: var(--progress-bar-
|
|
87
|
+
.wt-progress-bar--error .wt-progress-bar__progress {
|
|
88
|
+
background: var(--wt-progress-bar-background-error-color);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.wt-progress-bar--warning .wt-progress-bar__progress {
|
|
92
|
+
background: var(--wt-progress-bar-background-warning-color);
|
|
88
93
|
}
|
|
89
94
|
|
|
90
95
|
.wt-progress-bar--overflow .wt-progress-bar__progress {
|
|
91
|
-
border-radius: var(--progress-bar-border-radius);
|
|
96
|
+
border-radius: var(--wt-progress-bar-border-radius);
|
|
92
97
|
}
|
|
93
98
|
</style>
|
|
@@ -71,6 +71,7 @@ export default {
|
|
|
71
71
|
default: false,
|
|
72
72
|
},
|
|
73
73
|
},
|
|
74
|
+
emits: ['input'],
|
|
74
75
|
computed: {
|
|
75
76
|
isChecked() {
|
|
76
77
|
return this.value === this.selected;
|
|
@@ -87,9 +88,11 @@ export default {
|
|
|
87
88
|
};
|
|
88
89
|
</script>
|
|
89
90
|
|
|
90
|
-
<style lang="scss"
|
|
91
|
-
|
|
91
|
+
<style lang="scss">
|
|
92
92
|
@import './variables.scss';
|
|
93
|
+
</style>
|
|
94
|
+
|
|
95
|
+
<style lang="scss" scoped>
|
|
93
96
|
|
|
94
97
|
/* Customize the label (the container) */
|
|
95
98
|
.wt-radio {
|
|
@@ -128,61 +131,22 @@ export default {
|
|
|
128
131
|
}
|
|
129
132
|
|
|
130
133
|
.wt-radio:hover {
|
|
131
|
-
.wt-
|
|
132
|
-
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
::v-deep .wt-icon__icon {
|
|
136
|
-
fill: var(--icon-color--hover);
|
|
134
|
+
:deep .wt-icon__icon {
|
|
135
|
+
fill: var(--icon-btn-hover-color);
|
|
137
136
|
}
|
|
138
137
|
}
|
|
139
138
|
|
|
140
139
|
.wt-radio--active {
|
|
141
|
-
.wt-
|
|
142
|
-
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
::v-deep .wt-icon__icon {
|
|
146
|
-
fill: var(--icon-color-active);
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.wt-radio--outline {
|
|
151
|
-
.wt-radio__label {
|
|
152
|
-
color: var(--form-outline-label-color);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
::v-deep .wt-icon__icon {
|
|
156
|
-
fill: var(--icon-outline-color);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
&.wt-radio--active {
|
|
160
|
-
.wt-radio__label {
|
|
161
|
-
color: var(--form-label--active-color);
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
::v-deep .wt-icon__icon {
|
|
165
|
-
fill: var(--icon-outline--active-color);
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
&:hover {
|
|
170
|
-
|
|
171
|
-
::v-deep .wt-icon__icon {
|
|
172
|
-
fill: var(--icon-outline--hover-color);
|
|
173
|
-
}
|
|
140
|
+
:deep .wt-icon__icon {
|
|
141
|
+
fill: var(--icon-active-color);
|
|
174
142
|
}
|
|
175
143
|
}
|
|
176
144
|
|
|
177
145
|
.wt-radio--disabled {
|
|
178
146
|
pointer-events: none;
|
|
179
147
|
|
|
180
|
-
.wt-
|
|
181
|
-
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
::v-deep .wt-icon__icon {
|
|
185
|
-
fill: var(--icon-color-disabled);
|
|
148
|
+
:deep .wt-icon__icon {
|
|
149
|
+
fill: var(--icon-disabled-color);
|
|
186
150
|
}
|
|
187
151
|
}
|
|
188
152
|
</style>
|
|
@@ -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"
|
|
@@ -75,10 +74,6 @@ const props = defineProps({
|
|
|
75
74
|
placeholder: {
|
|
76
75
|
type: String,
|
|
77
76
|
},
|
|
78
|
-
outline: {
|
|
79
|
-
type: Boolean,
|
|
80
|
-
default: false,
|
|
81
|
-
},
|
|
82
77
|
hint: {
|
|
83
78
|
type: String,
|
|
84
79
|
description: 'Adds hint icon + tooltip with text, passed as "hint" prop',
|
|
@@ -128,12 +123,13 @@ function handleKeyup(event) {
|
|
|
128
123
|
|
|
129
124
|
&.wt-search-bar--invalid {
|
|
130
125
|
.wt-search-bar__wrapper {
|
|
131
|
-
border-color: var(--
|
|
126
|
+
border-color: var(--wt-text-field-input-border-error-color);
|
|
132
127
|
outline: none; // prevent outline overlapping false color
|
|
133
128
|
}
|
|
134
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
|
|
|
@@ -142,7 +138,7 @@ function handleKeyup(event) {
|
|
|
142
138
|
align-items: center;
|
|
143
139
|
padding: calc(var(--spacing-xs) - 1px) var(--spacing-xs);
|
|
144
140
|
border: var(--input-border);
|
|
145
|
-
border-color: var(--
|
|
141
|
+
border-color: var(--wt-text-field-input-border-color);
|
|
146
142
|
border-radius: var(--border-radius);
|
|
147
143
|
gap: var(--spacing-xs);
|
|
148
144
|
}
|
|
@@ -167,23 +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
169
|
}
|
|
188
170
|
|
|
189
171
|
/* clears the 'X' from Internet Explorer */
|
|
@@ -6,6 +6,10 @@
|
|
|
6
6
|
--wt-slider-width: 100%;
|
|
7
7
|
--wt-slider-input-height: 8px;
|
|
8
8
|
--wt-slider-border: 1px solid var(--secondary-color);
|
|
9
|
+
--wt-slider-background-color: var(--secondary-color);
|
|
10
|
+
--wt-slider-background-completed-color: var(--primary-color);
|
|
11
|
+
|
|
12
|
+
--wt-slider-pointer-background-color: var(--white);
|
|
9
13
|
|
|
10
14
|
--wt-slider-pointer-radius: 50%;
|
|
11
15
|
|
|
@@ -24,7 +24,7 @@ and swapping height/width of this component in order to have the correct output.
|
|
|
24
24
|
class="wt-slider"
|
|
25
25
|
>
|
|
26
26
|
<div
|
|
27
|
-
:style="{ width:
|
|
27
|
+
:style="{ width: vertical && verticalHeight }"
|
|
28
28
|
class="wt-slider__wrapper"
|
|
29
29
|
>
|
|
30
30
|
<!-- The row above is needed in order to set correct component width when slider is vertical -->
|
|
@@ -77,10 +77,11 @@ export default {
|
|
|
77
77
|
default: 100,
|
|
78
78
|
},
|
|
79
79
|
},
|
|
80
|
+
emits: ['input'],
|
|
80
81
|
computed: {
|
|
81
82
|
progressStyle() { // To achieve the correct color styling:
|
|
82
83
|
const progressPercent = ((this.value - this.min) / (this.max - this.min)) * 100;
|
|
83
|
-
return `linear-gradient(to right, var(--
|
|
84
|
+
return `linear-gradient(to right, var(--wt-slider-background-completed-color) ${progressPercent}%, var(--wt-slider-background-color) 0%)`;
|
|
84
85
|
},
|
|
85
86
|
verticalHeight() { // in order to have correct parent height after slider rotation
|
|
86
87
|
return this.vertical ? `${this.height}px` : '100%';
|
|
@@ -123,7 +124,7 @@ export default {
|
|
|
123
124
|
height: var(--wt-slider-pointer-size);
|
|
124
125
|
border: var(--wt-slider-border);
|
|
125
126
|
border-radius: var(--wt-slider-pointer-radius);
|
|
126
|
-
background: var(--
|
|
127
|
+
background: var(--wt-slider-pointer-background-color);
|
|
127
128
|
-webkit-appearance: none;
|
|
128
129
|
}
|
|
129
130
|
|
|
@@ -136,7 +137,7 @@ export default {
|
|
|
136
137
|
height: var(--wt-slider-pointer-size);
|
|
137
138
|
border: var(--wt-slider-border);
|
|
138
139
|
border-radius: var(--wt-slider-pointer-radius);
|
|
139
|
-
background: var(--
|
|
140
|
+
background: var(--wt-slider-pointer-background-color);
|
|
140
141
|
-moz-appearance: none;
|
|
141
142
|
}
|
|
142
143
|
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
:root {
|
|
3
|
-
--status-select-padding: 0 calc(var(--icon-size-md) + var(--spacing-xs)) 0 0; // reset wt-select padding, but preserve arrow icon padding
|
|
4
|
-
|
|
5
|
-
--status-select-
|
|
6
|
-
|
|
3
|
+
--wt-status-select-padding: 0 calc(var(--icon-size-md) + var(--spacing-xs)) 0 0; // reset wt-select padding, but preserve arrow icon padding
|
|
4
|
+
|
|
5
|
+
--wt-status-select-option-text-color: var(--form-input-color);
|
|
6
|
+
--wt-status-select-option-background-hover-color: var(--secondary-color);
|
|
7
|
+
--wt-status-select-option-background-selected-color: var(--secondary-color);
|
|
8
|
+
}
|
|
@@ -52,6 +52,7 @@ export default {
|
|
|
52
52
|
// options: ['sm', 'md'],
|
|
53
53
|
// },
|
|
54
54
|
},
|
|
55
|
+
emits: ['change'],
|
|
55
56
|
computed: {
|
|
56
57
|
selectedOption() {
|
|
57
58
|
return this.statusOptions.find((option) => option.value === this.status);
|
|
@@ -107,7 +108,7 @@ export default {
|
|
|
107
108
|
|
|
108
109
|
.multiselect__tags {
|
|
109
110
|
min-height: 0;
|
|
110
|
-
padding: var(--status-select-padding);
|
|
111
|
+
padding: var(--wt-status-select-padding);
|
|
111
112
|
border: none;
|
|
112
113
|
}
|
|
113
114
|
|
|
@@ -122,11 +123,15 @@ export default {
|
|
|
122
123
|
.multiselect__option {
|
|
123
124
|
min-height: 0;
|
|
124
125
|
padding: 0;
|
|
125
|
-
color: var(--status-select-option-color);
|
|
126
|
+
color: var(--wt-status-select-option-text-color);
|
|
126
127
|
}
|
|
127
128
|
|
|
128
129
|
.multiselect__option--highlight {
|
|
129
|
-
background: var(--status-select-
|
|
130
|
+
background: var(--wt-status-select-option-background-hover-color);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.multiselect__option--selected {
|
|
134
|
+
background: var(--wt-status-select-option-background-selected-color);
|
|
130
135
|
}
|
|
131
136
|
}
|
|
132
137
|
}
|
|
@@ -54,7 +54,7 @@ describe('useRepresentableAgentPauseCause', () => {
|
|
|
54
54
|
const {
|
|
55
55
|
representablePauseCause,
|
|
56
56
|
} = useRepresentableAgentPauseCause(pauseCauses);
|
|
57
|
-
expect(representablePauseCause.value[0].progressColor).toBe('
|
|
57
|
+
expect(representablePauseCause.value[0].progressColor).toBe('error');
|
|
58
58
|
});
|
|
59
59
|
|
|
60
60
|
it('correctly computes progressColor with duration < limit', () => {
|
|
@@ -18,7 +18,7 @@ const duration = ({ durationMin, limitMin }) => {
|
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
const pauseCauseProgressColor = ({ durationMin, limitMin }) => {
|
|
21
|
-
if (isDurationOverflow({ durationMin, limitMin })) return '
|
|
21
|
+
if (isDurationOverflow({ durationMin, limitMin })) return 'error';
|
|
22
22
|
if (durationMin <= (limitMin * 0.75)) return 'success';
|
|
23
23
|
return 'primary';
|
|
24
24
|
};
|