@webitel/ui-sdk 23.9.1 → 23.12.2
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.common.js +11155 -445
- package/dist/ui-sdk.common.js.map +1 -1
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.umd.js +11307 -597
- package/dist/ui-sdk.umd.js.map +1 -1
- package/dist/ui-sdk.umd.min.js +8 -8
- package/dist/ui-sdk.umd.min.js.map +1 -1
- package/package.json +9 -4
- package/src/components/wt-app-header/_variables.scss +1 -0
- package/src/components/wt-app-header/wt-app-header.vue +1 -1
- package/src/components/wt-button/Readme.md +23 -0
- package/src/components/wt-button/_variables.scss +53 -30
- package/src/components/wt-button/wt-button.vue +45 -147
- package/src/components/wt-button-select/Readme.md +13 -0
- package/src/components/wt-button-select/_variables.scss +0 -11
- package/src/components/wt-button-select/wt-button-select.vue +33 -92
- package/src/components/wt-checkbox/wt-checkbox.vue +8 -2
- package/src/components/wt-context-menu/wt-context-menu.vue +4 -1
- package/src/components/wt-datepicker/wt-datepicker.vue +9 -3
- package/src/components/wt-icon/Readme.md +327 -0
- package/src/components/wt-icon/_variables.scss +26 -0
- 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/wt-icon.vue +72 -87
- package/src/components/wt-icon-action/_internals/wt-edit-icon-action.vue +0 -1
- package/src/components/wt-icon-btn/Readme.md +10 -0
- package/src/components/wt-icon-btn/_variables.scss +9 -0
- package/src/components/wt-icon-btn/wt-icon-btn.vue +27 -62
- package/src/components/wt-input/wt-input.vue +8 -5
- package/src/components/wt-navigation-bar/wt-navigation-bar.vue +2 -2
- package/src/components/wt-page-header/wt-page-header.vue +3 -3
- package/src/components/wt-pagination/__tests__/WtPagination.spec.js +2 -1
- package/src/components/wt-radio/wt-radio.vue +4 -1
- package/src/components/wt-rounded-action/Readme.md +68 -0
- package/src/components/wt-rounded-action/_variables.scss +42 -4
- package/src/components/wt-rounded-action/wt-rounded-action.vue +139 -107
- package/src/components/wt-select/wt-select.vue +15 -6
- package/src/components/wt-switcher/wt-switcher.vue +5 -2
- package/src/components/wt-tabs/wt-tabs.vue +4 -1
- package/src/components/wt-tags-input/wt-tags-input.vue +11 -5
- package/src/components/wt-textarea/wt-textarea.vue +5 -2
- package/src/components/wt-time-input/wt-time-input.vue +5 -2
- package/src/components/wt-timepicker/wt-timepicker.vue +1 -1
- package/src/css/styleguide/colors/_colors.scss +170 -148
- package/src/css/styleguide/colors/_deprecated.scss +151 -0
- package/src/css/styleguide/colors/_palette.scss +2 -2
- package/src/directives/clickaway/clickaway.js +2 -51
- package/src/directives/index.js +0 -1
- package/src/locale/en/en.js +1 -0
- package/src/locale/ru/ru.js +1 -0
- package/src/locale/ua/ua.js +1 -0
- package/src/modules/AuditForm/components/audit-form-question-read-wrapper.vue +10 -0
- package/src/modules/AuditForm/components/questions/options/__tests__/audit-form-question-options-write-row.spec.js +1 -1
- package/src/modules/QueryFilters/components/abstract-api-filter.vue +1 -1
- package/src/modules/QueryFilters/components/abstract-enum-filter.vue +1 -1
|
@@ -1,162 +1,194 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
v-bind="{ ...$attrs, ...$props }"
|
|
2
|
+
<button
|
|
4
3
|
:class="[
|
|
5
4
|
`wt-rounded-action--color-${color}`,
|
|
5
|
+
`wt-rounded-action--size-${size}`,
|
|
6
6
|
{ 'wt-rounded-action--active': active },
|
|
7
7
|
{ 'wt-rounded-action--disabled': disabled },
|
|
8
|
-
{ 'wt-rounded-action--
|
|
8
|
+
{ 'wt-rounded-action--rounded': rounded },
|
|
9
|
+
{ 'wt-rounded-action--wide': wide },
|
|
9
10
|
]"
|
|
10
|
-
|
|
11
|
-
color="secondary"
|
|
11
|
+
type="button"
|
|
12
12
|
class="wt-rounded-action"
|
|
13
|
-
@click="
|
|
13
|
+
@click="emit('click', $event)"
|
|
14
14
|
>
|
|
15
|
+
<wt-loader
|
|
16
|
+
v-if="loading"
|
|
17
|
+
size="sm"
|
|
18
|
+
:color="loaderColor"
|
|
19
|
+
></wt-loader>
|
|
15
20
|
<wt-icon
|
|
21
|
+
v-else
|
|
16
22
|
:color="iColor"
|
|
17
23
|
:icon="icon"
|
|
18
24
|
:size="size"
|
|
19
25
|
></wt-icon>
|
|
20
|
-
</
|
|
26
|
+
</button>
|
|
21
27
|
</template>
|
|
22
28
|
|
|
23
|
-
<script>
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
29
|
+
<script setup>
|
|
30
|
+
import { computed } from 'vue';
|
|
31
|
+
|
|
32
|
+
const props = defineProps({
|
|
33
|
+
icon: {
|
|
34
|
+
type: String,
|
|
35
|
+
required: true,
|
|
36
|
+
},
|
|
37
|
+
/**
|
|
38
|
+
* @values 'primary', 'secondary', 'success', 'error', 'transfer'
|
|
39
|
+
*/
|
|
40
|
+
color: {
|
|
41
|
+
type: String,
|
|
42
|
+
options: ['primary', 'secondary', 'success', 'error', 'transfer'],
|
|
43
|
+
default: 'secondary',
|
|
44
|
+
},
|
|
45
|
+
/**
|
|
46
|
+
* @values 'sm', 'md'
|
|
47
|
+
*/
|
|
48
|
+
size: {
|
|
49
|
+
type: String,
|
|
50
|
+
default: 'md',
|
|
51
|
+
},
|
|
52
|
+
active: {
|
|
53
|
+
type: Boolean,
|
|
54
|
+
default: false,
|
|
55
|
+
},
|
|
56
|
+
disabled: {
|
|
57
|
+
type: Boolean,
|
|
58
|
+
default: false,
|
|
59
|
+
},
|
|
60
|
+
rounded: {
|
|
61
|
+
type: Boolean,
|
|
62
|
+
default: false,
|
|
63
|
+
},
|
|
64
|
+
/**
|
|
65
|
+
* Stretches button to all available width
|
|
66
|
+
*/
|
|
67
|
+
wide: {
|
|
68
|
+
type: Boolean,
|
|
69
|
+
default: false,
|
|
55
70
|
},
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
if (this.iconColor) return this.iconColor;
|
|
60
|
-
if (this.disabled) return 'secondary-50';
|
|
61
|
-
if (this.color === 'secondary') return null; // dont change icon color
|
|
62
|
-
if (this.filled && this.color) return 'contrast';
|
|
63
|
-
return this.color;
|
|
64
|
-
},
|
|
71
|
+
loading: {
|
|
72
|
+
type: Boolean,
|
|
73
|
+
default: false,
|
|
65
74
|
},
|
|
66
|
-
};
|
|
75
|
+
});
|
|
76
|
+
const emit = defineEmits(['click']);
|
|
77
|
+
|
|
78
|
+
const iColor = computed(() => {
|
|
79
|
+
const onDark = ['success', 'error', 'transfer'];
|
|
80
|
+
const onLight = ['primary'];
|
|
81
|
+
if (props.disabled) return 'disabled';
|
|
82
|
+
if (onDark.includes(props.color)) return 'on-dark';
|
|
83
|
+
if (onLight.includes(props.color)) return 'on-light';
|
|
84
|
+
if (props.active) return 'default';
|
|
85
|
+
return 'default';
|
|
86
|
+
});
|
|
87
|
+
const loaderColor = computed(() => {
|
|
88
|
+
if (['success', 'transfer', 'error'].includes(props.color)) return 'main';
|
|
89
|
+
return 'contrast';
|
|
90
|
+
});
|
|
67
91
|
</script>
|
|
68
92
|
|
|
69
93
|
<style lang="scss">
|
|
70
94
|
@import './variables.scss';
|
|
71
95
|
</style>
|
|
72
96
|
|
|
73
|
-
<!--not scoped to change .icon colors-->
|
|
74
97
|
<style lang="scss" scoped>
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
min-height: 0;
|
|
79
|
-
padding: var(--rounded-action-padding);
|
|
98
|
+
.wt-rounded-action {
|
|
99
|
+
display: block;
|
|
100
|
+
width: fit-content;
|
|
80
101
|
line-height: 0;
|
|
81
|
-
|
|
82
|
-
border-color: transparent;
|
|
83
|
-
background: var(--rounded-action-bg-color);
|
|
102
|
+
padding: var(--rounded-action-padding);
|
|
84
103
|
box-shadow: var(--elevation-1);
|
|
104
|
+
border: var(--rounded-action-border-size) solid;
|
|
105
|
+
background: var(--rounded-action-secondary-color);
|
|
106
|
+
border-color: var(--rounded-action-secondary-color);
|
|
107
|
+
border-radius: var(--border-radius);
|
|
108
|
+
transition: var(--transition);
|
|
85
109
|
|
|
86
110
|
&:hover {
|
|
87
|
-
background: var(--rounded-action-bg-color); // override default wt-button hover
|
|
88
111
|
box-shadow: var(--elevation-2);
|
|
89
112
|
}
|
|
90
113
|
|
|
91
|
-
&--
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
&.wt-rounded-action--color-secondary {
|
|
95
|
-
border-color: var(--icon-color);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
&.wt-rounded-action--color-accent {
|
|
99
|
-
border-color: var(--btn-accent--hover-color);
|
|
100
|
-
}
|
|
114
|
+
&--wide {
|
|
115
|
+
width: 100%;
|
|
116
|
+
}
|
|
101
117
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
118
|
+
&--rounded {
|
|
119
|
+
border-radius: var(--rounded-action-rounded-border-radius);
|
|
120
|
+
}
|
|
105
121
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
122
|
+
&--color {
|
|
123
|
+
&-primary {
|
|
124
|
+
background: var(--rounded-action-primary-color);
|
|
125
|
+
border-color: var(--rounded-action-primary-color);
|
|
109
126
|
|
|
110
|
-
|
|
111
|
-
|
|
127
|
+
&:hover {
|
|
128
|
+
background: var(--rounded-action-primary-hover-color);
|
|
129
|
+
border-color: var(--rounded-action-primary-hover-color);
|
|
130
|
+
}
|
|
112
131
|
}
|
|
113
132
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
}
|
|
133
|
+
&-secondary {
|
|
134
|
+
background: var(--rounded-action-secondary-color);
|
|
135
|
+
border-color: var(--rounded-action-secondary-color);
|
|
118
136
|
|
|
119
|
-
|
|
137
|
+
&:hover {
|
|
138
|
+
background: var(--rounded-action-secondary-hover-color);
|
|
139
|
+
border-color: var(--rounded-action-secondary-hover-color);
|
|
140
|
+
}
|
|
120
141
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
142
|
+
&.wt-rounded-action--active {
|
|
143
|
+
background: transparent;
|
|
144
|
+
border-color: var(--rounded-action-secondary-active-color);
|
|
145
|
+
}
|
|
124
146
|
}
|
|
125
147
|
|
|
126
|
-
|
|
127
|
-
background
|
|
128
|
-
border-color: var(--
|
|
129
|
-
}
|
|
148
|
+
&-success {
|
|
149
|
+
background: var(--rounded-action-success-color);
|
|
150
|
+
border-color: var(--rounded-action-success-color);
|
|
130
151
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
152
|
+
&:hover {
|
|
153
|
+
background: var(--rounded-action-success-hover-color);
|
|
154
|
+
border-color: var(--rounded-action-success-hover-color);
|
|
155
|
+
}
|
|
134
156
|
}
|
|
135
157
|
|
|
136
|
-
|
|
137
|
-
background
|
|
138
|
-
border-color: var(--
|
|
139
|
-
}
|
|
158
|
+
&-error {
|
|
159
|
+
background: var(--rounded-action-error-color);
|
|
160
|
+
border-color: var(--rounded-action-error-color);
|
|
140
161
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
162
|
+
&:hover {
|
|
163
|
+
background: var(--rounded-action-error-hover-color);
|
|
164
|
+
border-color: var(--rounded-action-error-hover-color);
|
|
165
|
+
}
|
|
144
166
|
}
|
|
145
167
|
|
|
146
|
-
|
|
147
|
-
background
|
|
148
|
-
border-color: var(--
|
|
149
|
-
}
|
|
168
|
+
&-transfer {
|
|
169
|
+
background: var(--rounded-action-transfer-color);
|
|
170
|
+
border-color: var(--rounded-action-transfer-color);
|
|
150
171
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
172
|
+
&:hover {
|
|
173
|
+
background: var(--rounded-action-transfer-hover-color);
|
|
174
|
+
border-color: var(--rounded-action-transfer-hover-color);
|
|
175
|
+
}
|
|
154
176
|
}
|
|
155
177
|
}
|
|
156
178
|
|
|
157
179
|
&.wt-rounded-action--disabled {
|
|
158
|
-
|
|
180
|
+
background: var(--rounded-action-disabled-color);
|
|
181
|
+
border-color: var(--rounded-action-disabled-color);
|
|
159
182
|
box-shadow: none;
|
|
183
|
+
pointer-events: none;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
&--size {
|
|
187
|
+
&-sm {
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
&-md {
|
|
191
|
+
}
|
|
160
192
|
}
|
|
161
193
|
}
|
|
162
194
|
</style>
|
|
@@ -10,16 +10,20 @@
|
|
|
10
10
|
class="wt-select"
|
|
11
11
|
>
|
|
12
12
|
<wt-label
|
|
13
|
+
v-bind="labelProps"
|
|
13
14
|
v-if="hasLabel"
|
|
14
15
|
:disabled="disabled"
|
|
15
16
|
:invalid="invalid"
|
|
16
17
|
class="wt-select__label"
|
|
17
|
-
v-bind="labelProps"
|
|
18
18
|
>
|
|
19
19
|
<!-- @slot Custom input label -->
|
|
20
|
-
<slot
|
|
20
|
+
<slot
|
|
21
|
+
v-bind="{ label }"
|
|
22
|
+
name="label"
|
|
23
|
+
>{{ requiredLabel }}</slot>
|
|
21
24
|
</wt-label>
|
|
22
25
|
<vue-multiselect
|
|
26
|
+
v-bind="$attrs"
|
|
23
27
|
ref="vue-multiselect"
|
|
24
28
|
:allow-empty="allowEmpty"
|
|
25
29
|
:disabled="disabled"
|
|
@@ -33,7 +37,6 @@
|
|
|
33
37
|
:track-by="trackBy"
|
|
34
38
|
:model-value="selectValue"
|
|
35
39
|
class="wt-select__select"
|
|
36
|
-
v-bind="$attrs"
|
|
37
40
|
@close="isOpened = false"
|
|
38
41
|
@open="isOpened = true"
|
|
39
42
|
v-on="listeners"
|
|
@@ -51,7 +54,10 @@
|
|
|
51
54
|
|
|
52
55
|
<!-- Slot for custom label template for single select-->
|
|
53
56
|
<template v-slot:singleLabel="{ option }">
|
|
54
|
-
<slot
|
|
57
|
+
<slot
|
|
58
|
+
v-bind="{ option, optionLabel }"
|
|
59
|
+
name="singleLabel"
|
|
60
|
+
>
|
|
55
61
|
<span class="multiselect__single-label">
|
|
56
62
|
{{ getOptionLabel({ option, optionLabel }) }}
|
|
57
63
|
</span>
|
|
@@ -60,7 +66,10 @@
|
|
|
60
66
|
|
|
61
67
|
<!-- Slot for custom option template -->
|
|
62
68
|
<template v-slot:option="{ option }">
|
|
63
|
-
<slot
|
|
69
|
+
<slot
|
|
70
|
+
v-bind="{ option, optionLabel }"
|
|
71
|
+
name="option"
|
|
72
|
+
>
|
|
64
73
|
{{ getOptionLabel({ option, optionLabel }) }}
|
|
65
74
|
</slot>
|
|
66
75
|
</template>
|
|
@@ -72,7 +81,7 @@
|
|
|
72
81
|
:disabled="disabled"
|
|
73
82
|
class="multiselect__select"
|
|
74
83
|
icon="arrow-down"
|
|
75
|
-
@mousedown.
|
|
84
|
+
@mousedown.prevent.stop="toggle"
|
|
76
85
|
></wt-icon-btn>
|
|
77
86
|
</template>
|
|
78
87
|
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
}"
|
|
9
9
|
>
|
|
10
10
|
<wt-label
|
|
11
|
+
v-bind="labelProps"
|
|
11
12
|
class="wt-switcher__wrapper"
|
|
12
13
|
:class="{'wt-switcher__wrapper--label-left': labelLeft}"
|
|
13
|
-
v-bind="labelProps"
|
|
14
14
|
>
|
|
15
15
|
<input
|
|
16
16
|
class="wt-switcher__input"
|
|
@@ -21,7 +21,10 @@
|
|
|
21
21
|
>
|
|
22
22
|
<span class="wt-switcher__checkmark"></span>
|
|
23
23
|
<!-- @slot Custom input label -->
|
|
24
|
-
<slot
|
|
24
|
+
<slot
|
|
25
|
+
v-bind="{ label, value, disabled }"
|
|
26
|
+
name="label"
|
|
27
|
+
>
|
|
25
28
|
<div v-if="label" class="wt-switcher__label">{{ label }}</div>
|
|
26
29
|
</slot>
|
|
27
30
|
</wt-label>
|
|
@@ -8,17 +8,21 @@
|
|
|
8
8
|
class="wt-tags-input"
|
|
9
9
|
>
|
|
10
10
|
<wt-label
|
|
11
|
+
v-bind="labelProps"
|
|
11
12
|
v-if="hasLabel"
|
|
12
13
|
:disabled="disabled"
|
|
13
14
|
:invalid="invalid"
|
|
14
15
|
class="wt-tags-input__label"
|
|
15
|
-
v-bind="labelProps"
|
|
16
16
|
>
|
|
17
17
|
<!-- @slot Custom input label -->
|
|
18
|
-
<slot
|
|
18
|
+
<slot
|
|
19
|
+
v-bind="{ label }"
|
|
20
|
+
name="label"
|
|
21
|
+
>{{ requiredLabel }}</slot>
|
|
19
22
|
</wt-label>
|
|
20
23
|
|
|
21
24
|
<vue-multiselect
|
|
25
|
+
v-bind="$attrs"
|
|
22
26
|
ref="vue-multiselect"
|
|
23
27
|
:close-on-select="false"
|
|
24
28
|
:disabled="disabled"
|
|
@@ -32,7 +36,6 @@
|
|
|
32
36
|
:model-value="selectValue"
|
|
33
37
|
class="wt-tags-input__select"
|
|
34
38
|
multiple
|
|
35
|
-
v-bind="$attrs"
|
|
36
39
|
v-on="listeners"
|
|
37
40
|
>
|
|
38
41
|
|
|
@@ -50,7 +53,10 @@
|
|
|
50
53
|
|
|
51
54
|
<!-- Slot for custom option template -->
|
|
52
55
|
<template v-slot:option="{ option }">
|
|
53
|
-
<slot
|
|
56
|
+
<slot
|
|
57
|
+
v-bind="{ option, optionLabel }"
|
|
58
|
+
name="option"
|
|
59
|
+
>
|
|
54
60
|
{{ getTagOptionLabel({ option, optionLabel }) }}
|
|
55
61
|
</slot>
|
|
56
62
|
</template>
|
|
@@ -63,7 +69,7 @@
|
|
|
63
69
|
class="multiselect__select"
|
|
64
70
|
color="active"
|
|
65
71
|
icon="arrow-down"
|
|
66
|
-
@mousedown.
|
|
72
|
+
@mousedown.prevent.stop="toggle"
|
|
67
73
|
></wt-icon-btn>
|
|
68
74
|
</template>
|
|
69
75
|
|
|
@@ -7,13 +7,16 @@
|
|
|
7
7
|
}"
|
|
8
8
|
>
|
|
9
9
|
<wt-label
|
|
10
|
+
v-bind="labelProps"
|
|
10
11
|
:for="name"
|
|
11
12
|
:disabled="disabled"
|
|
12
13
|
:invalid="invalid"
|
|
13
|
-
v-bind="labelProps"
|
|
14
14
|
>
|
|
15
15
|
<!-- @slot Custom input label -->
|
|
16
|
-
<slot
|
|
16
|
+
<slot
|
|
17
|
+
v-bind="{ label }"
|
|
18
|
+
name="label"
|
|
19
|
+
>{{ requiredLabel }}</slot>
|
|
17
20
|
</wt-label>
|
|
18
21
|
<div class="wt-textarea__wrapper">
|
|
19
22
|
<textarea
|
|
@@ -8,15 +8,18 @@
|
|
|
8
8
|
}"
|
|
9
9
|
>
|
|
10
10
|
<wt-label
|
|
11
|
+
v-bind="labelProps"
|
|
11
12
|
v-if="hasLabel"
|
|
12
13
|
:for="name"
|
|
13
14
|
:outline="outline"
|
|
14
15
|
:disabled="disabled"
|
|
15
16
|
:invalid="invalid"
|
|
16
|
-
v-bind="labelProps"
|
|
17
17
|
>
|
|
18
18
|
<!-- @slot Custom input label -->
|
|
19
|
-
<slot
|
|
19
|
+
<slot
|
|
20
|
+
v-bind="{ label }"
|
|
21
|
+
name="label"
|
|
22
|
+
>{{ label }}</slot>
|
|
20
23
|
</wt-label>
|
|
21
24
|
<div class="wt-time-input__wrapper">
|
|
22
25
|
<input
|