@webitel/ui-sdk 23.12.43 → 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.
- package/dist/img/sprite/index.js +1 -0
- package/dist/img/sprite/variable-select.svg +9 -0
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.mjs +4300 -4301
- package/dist/ui-sdk.umd.js +6 -6
- package/package.json +1 -1
- package/src/components/wt-checkbox/wt-checkbox.vue +3 -41
- package/src/components/wt-chip/_variables.scss +25 -2
- package/src/components/wt-chip/wt-chip.scss +20 -17
- package/src/components/wt-chip/wt-chip.vue +4 -2
- package/src/components/wt-icon-btn/wt-icon-btn.vue +2 -1
- package/src/components/wt-input/wt-input.vue +1 -1
- package/src/components/wt-popup/_variables.scss +4 -3
- package/src/components/wt-popup/wt-popup.vue +5 -3
- package/src/components/wt-select/_multiselect.scss +48 -52
- package/src/components/wt-select/_variables.scss +0 -3
- package/src/components/wt-select/wt-select.vue +8 -21
- package/src/components/wt-switcher/_variables.scss +30 -7
- package/src/components/wt-switcher/wt-switcher.vue +44 -28
- package/src/components/wt-table/_variables.scss +8 -5
- package/src/components/wt-table/wt-table.vue +13 -18
- package/src/components/wt-table-column-select/wt-table-column-select.vue +5 -2
- package/src/components/wt-tabs/_variables.scss +4 -4
- package/src/components/wt-tabs/wt-tabs.vue +8 -6
- package/src/components/wt-tags-input/wt-tags-input.vue +3 -20
- package/src/components/wt-textarea/wt-textarea.vue +6 -23
- package/src/components/wt-time-input/wt-time-input.vue +17 -50
- package/src/components/wt-timepicker/wt-timepicker.vue +0 -12
- package/src/components/wt-tooltip/__tests__/WtTooltip.spec.js +0 -10
- package/src/components/wt-tooltip/_variables.scss +2 -4
- package/src/components/wt-tooltip/wt-tooltip.vue +2 -14
- package/src/css/styleguide/colors/_colors.scss +6 -6
- package/src/css/styleguide/colors/reusable/_text-field.scss +16 -0
- package/src/css/styleguide/placeholder/_placeholder.scss +5 -0
- package/src/components/wt-tags-input/_variables.scss +0 -24
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
-
class="wt-switcher"
|
|
4
3
|
:class="{
|
|
5
4
|
'wt-switcher--off': !value,
|
|
6
5
|
'wt-switcher--on': value,
|
|
7
6
|
'wt-switcher--disabled': disabled,
|
|
8
7
|
}"
|
|
8
|
+
class="wt-switcher"
|
|
9
9
|
>
|
|
10
10
|
<wt-label
|
|
11
|
-
v-bind="labelProps"
|
|
12
|
-
class="wt-switcher__wrapper"
|
|
13
11
|
:class="{'wt-switcher__wrapper--label-left': labelLeft}"
|
|
12
|
+
:disabled="disabled"
|
|
13
|
+
class="wt-switcher__wrapper"
|
|
14
|
+
v-bind="labelProps"
|
|
14
15
|
>
|
|
15
16
|
<input
|
|
16
|
-
class="wt-switcher__input"
|
|
17
|
-
type="checkbox"
|
|
18
17
|
:checked="value"
|
|
19
18
|
:disabled="disabled"
|
|
19
|
+
class="wt-switcher__input"
|
|
20
|
+
type="checkbox"
|
|
20
21
|
@change="inputHandler"
|
|
21
22
|
>
|
|
22
23
|
<span class="wt-switcher__checkmark" />
|
|
23
24
|
<!-- @slot Custom input label -->
|
|
24
25
|
<slot
|
|
25
|
-
v-bind="{ label, value, disabled }"
|
|
26
26
|
name="label"
|
|
27
|
+
v-bind="{ label, value, disabled }"
|
|
27
28
|
>
|
|
28
29
|
<div
|
|
29
30
|
v-if="label"
|
|
@@ -65,6 +66,9 @@ export default {
|
|
|
65
66
|
description: 'Object with props, passed down to wt-label as props',
|
|
66
67
|
},
|
|
67
68
|
},
|
|
69
|
+
emits: [
|
|
70
|
+
'change',
|
|
71
|
+
],
|
|
68
72
|
methods: {
|
|
69
73
|
inputHandler() {
|
|
70
74
|
this.$emit('change', !this.value);
|
|
@@ -93,8 +97,8 @@ export default {
|
|
|
93
97
|
position: relative;
|
|
94
98
|
display: flex;
|
|
95
99
|
align-items: center;
|
|
96
|
-
user-select: none;
|
|
97
100
|
cursor: pointer;
|
|
101
|
+
user-select: none;
|
|
98
102
|
|
|
99
103
|
&.wt-switcher__wrapper--label-left {
|
|
100
104
|
flex-direction: row-reverse;
|
|
@@ -106,12 +110,8 @@ export default {
|
|
|
106
110
|
transition: var(--transition);
|
|
107
111
|
|
|
108
112
|
.wt-switcher__wrapper--label-left & {
|
|
109
|
-
margin-left: 0;
|
|
110
113
|
margin-right: var(--switcher-icon-margin);
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
.wt-switcher:hover & {
|
|
114
|
-
color: var(--form-label--hover-color);
|
|
114
|
+
margin-left: 0;
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
117
|
|
|
@@ -119,8 +119,8 @@ export default {
|
|
|
119
119
|
position: absolute;
|
|
120
120
|
width: 0;
|
|
121
121
|
height: 0;
|
|
122
|
-
opacity: 0;
|
|
123
122
|
pointer-events: none;
|
|
123
|
+
opacity: 0;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
.wt-switcher__checkmark {
|
|
@@ -129,68 +129,84 @@ export default {
|
|
|
129
129
|
flex: 0 0 var(--switcher-width);
|
|
130
130
|
width: var(--switcher-width);
|
|
131
131
|
height: var(--switcher-height);
|
|
132
|
-
border-radius: var(--switcher-border-radius);
|
|
133
132
|
transition: var(--transition);
|
|
133
|
+
border-radius: var(--switcher-border-radius);
|
|
134
134
|
|
|
135
135
|
&:before {
|
|
136
|
-
content: '';
|
|
137
136
|
position: absolute;
|
|
138
137
|
bottom: var(--switcher-cicle-margin);
|
|
139
138
|
left: var(--switcher-cicle-margin);
|
|
140
|
-
height: var(--switcher-cicle-size);
|
|
141
139
|
width: var(--switcher-cicle-size);
|
|
142
|
-
|
|
143
|
-
|
|
140
|
+
height: var(--switcher-cicle-size);
|
|
141
|
+
content: '';
|
|
144
142
|
transition: var(--transition);
|
|
143
|
+
border-radius: 50%;
|
|
145
144
|
}
|
|
146
145
|
}
|
|
147
146
|
|
|
148
147
|
.wt-switcher--off {
|
|
149
148
|
.wt-switcher__checkmark {
|
|
150
|
-
background: var(--switcher-
|
|
149
|
+
background: var(--wt-switcher-background-color-off);
|
|
150
|
+
|
|
151
|
+
&:before {
|
|
152
|
+
background: var(--wt-switcher-circle-background-color-off);
|
|
153
|
+
}
|
|
151
154
|
}
|
|
152
155
|
|
|
153
156
|
&:hover {
|
|
154
157
|
.wt-switcher__checkmark {
|
|
155
|
-
background: var(--switcher-
|
|
158
|
+
background: var(--wt-switcher-background-color-off-hover);
|
|
159
|
+
|
|
160
|
+
&:before {
|
|
161
|
+
background: var(--wt-switcher-circle-background-color-off-hover);
|
|
162
|
+
}
|
|
156
163
|
}
|
|
157
164
|
}
|
|
158
165
|
|
|
159
166
|
&.wt-switcher--disabled {
|
|
160
167
|
.wt-switcher__checkmark {
|
|
161
|
-
background: var(--switcher-
|
|
168
|
+
background: var(--wt-switcher-background-color-off-disabled);
|
|
169
|
+
|
|
170
|
+
&:before {
|
|
171
|
+
background: var(--wt-switcher-circle-background-color-off-disabled);
|
|
172
|
+
}
|
|
162
173
|
}
|
|
163
174
|
}
|
|
164
175
|
}
|
|
165
176
|
|
|
166
177
|
.wt-switcher--on {
|
|
167
178
|
.wt-switcher__checkmark {
|
|
168
|
-
background: var(--switcher-
|
|
179
|
+
background: var(--wt-switcher-background-color-on);
|
|
169
180
|
|
|
170
181
|
/* Show the indicator (dot/circle) when checked */
|
|
171
182
|
&:before {
|
|
172
183
|
transform: translateX(var(--switcher-cicle-translateX));
|
|
184
|
+
background: var(--wt-switcher-circle-background-color-on);
|
|
173
185
|
}
|
|
174
186
|
}
|
|
175
187
|
|
|
176
188
|
&:hover {
|
|
177
189
|
.wt-switcher__checkmark {
|
|
178
|
-
background: var(--switcher-
|
|
190
|
+
background: var(--wt-switcher-background-color-on-hover);
|
|
191
|
+
|
|
192
|
+
&:before {
|
|
193
|
+
background: var(--wt-switcher-circle-background-color-on-hover);
|
|
194
|
+
}
|
|
179
195
|
}
|
|
180
196
|
}
|
|
181
197
|
|
|
182
198
|
&.wt-switcher--disabled {
|
|
183
199
|
.wt-switcher__checkmark {
|
|
184
|
-
background: var(--switcher-
|
|
200
|
+
background: var(--wt-switcher-background-color-on-disabled);
|
|
201
|
+
|
|
202
|
+
&:before {
|
|
203
|
+
background: var(--wt-switcher-circle-background-color-on-disabled);
|
|
204
|
+
}
|
|
185
205
|
}
|
|
186
206
|
}
|
|
187
207
|
}
|
|
188
208
|
|
|
189
209
|
.wt-switcher--disabled {
|
|
190
210
|
pointer-events: none;
|
|
191
|
-
|
|
192
|
-
.wt-switcher__label {
|
|
193
|
-
color: var(--form-label--disabled-color);
|
|
194
|
-
}
|
|
195
211
|
}
|
|
196
212
|
</style>
|
|
@@ -4,13 +4,16 @@
|
|
|
4
4
|
|
|
5
5
|
--table-head-sort-arrow-margin: var(--spacing-xs);
|
|
6
6
|
--table-head-border: 1px solid;
|
|
7
|
-
--table-head-border-color: var(--secondary-color);
|
|
8
7
|
|
|
9
8
|
--table-min-height: 24px; // 24px icon size or body-1 lh
|
|
10
9
|
--table-column-gap: var(--spacing-xs);
|
|
11
10
|
--table-row-padding: var(--spacing-xs);
|
|
12
11
|
|
|
13
|
-
--table-
|
|
14
|
-
--table
|
|
15
|
-
--table-
|
|
16
|
-
}
|
|
12
|
+
--wt-table-head-border-color: var(--grey-lighten-1);
|
|
13
|
+
--wt-table-primary-color: var(--content-wrapper-color);
|
|
14
|
+
--wt-table-zebra-color: var(--dp-18-surface-color);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
:root.theme--dark {
|
|
18
|
+
--table-head-border-color: var(--grey-darken-1);
|
|
19
|
+
}
|
|
@@ -229,31 +229,26 @@ export default {
|
|
|
229
229
|
border-collapse: collapse;
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
-
.wt-table__head {
|
|
233
|
-
display: block;
|
|
234
|
-
box-sizing: border-box;
|
|
235
|
-
background: var(--table-primary-color);
|
|
236
|
-
border: var(--table-head-border);
|
|
237
|
-
border-color: var(--table-head-border-color);
|
|
238
|
-
border-radius: var(--border-radius);
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
//.wt-table__head {
|
|
242
|
-
// display: block;
|
|
243
|
-
//}
|
|
244
|
-
|
|
245
232
|
.wt-table__tr {
|
|
246
233
|
display: grid;
|
|
247
234
|
padding: var(--table-row-padding);
|
|
248
235
|
transition: var(--transition);
|
|
249
236
|
grid-template-columns: repeat(auto-fit, var(--table-col-min-width));
|
|
250
237
|
grid-column-gap: var(--table-column-gap);
|
|
238
|
+
background: var(--wt-table-primary-color);
|
|
251
239
|
|
|
252
240
|
&:nth-child(2n) {
|
|
253
|
-
background: var(--table-
|
|
241
|
+
background: var(--wt-table-zebra-color);
|
|
254
242
|
}
|
|
255
243
|
}
|
|
256
244
|
|
|
245
|
+
.wt-table__tr__head {
|
|
246
|
+
border: var(--table-head-border);
|
|
247
|
+
border-color: var(--wt-table-head-border-color);
|
|
248
|
+
border-radius: var(--border-radius);
|
|
249
|
+
background: transparent;
|
|
250
|
+
}
|
|
251
|
+
|
|
257
252
|
.wt-table__th,
|
|
258
253
|
.wt-table__td {
|
|
259
254
|
@extend %typo-body-1;
|
|
@@ -281,8 +276,8 @@ export default {
|
|
|
281
276
|
&--sortable {
|
|
282
277
|
cursor: pointer;
|
|
283
278
|
|
|
284
|
-
&:hover
|
|
285
|
-
fill: var(--icon-color
|
|
279
|
+
&:hover :deep .wt-icon__icon {
|
|
280
|
+
fill: var(--icon-active-color);
|
|
286
281
|
}
|
|
287
282
|
}
|
|
288
283
|
|
|
@@ -301,7 +296,7 @@ export default {
|
|
|
301
296
|
}
|
|
302
297
|
|
|
303
298
|
.wt-table__foot {
|
|
304
|
-
border-color: var(--table-head-border-color);
|
|
305
|
-
border-top: var(--table-head-border);
|
|
299
|
+
border-color: var(--wt-table-head-border-color);
|
|
300
|
+
border-top: var(--wt-table-head-border-color);
|
|
306
301
|
}
|
|
307
302
|
</style>
|
|
@@ -35,8 +35,9 @@
|
|
|
35
35
|
@click.capture.prevent="column.show = !column.show"
|
|
36
36
|
>
|
|
37
37
|
<wt-checkbox
|
|
38
|
-
|
|
38
|
+
:selected="column.show"
|
|
39
39
|
:label="shownColLabel(column)"
|
|
40
|
+
@change="column.show = $event"
|
|
40
41
|
/>
|
|
41
42
|
</li>
|
|
42
43
|
</ul>
|
|
@@ -81,7 +82,9 @@ export default {
|
|
|
81
82
|
description: 'Header values to exclude from selection',
|
|
82
83
|
},
|
|
83
84
|
},
|
|
84
|
-
|
|
85
|
+
emits: [
|
|
86
|
+
'change',
|
|
87
|
+
],
|
|
85
88
|
data: () => ({
|
|
86
89
|
draft: [], // headers draft
|
|
87
90
|
isColumnSelectPopup: false,
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
|
|
6
6
|
--tab-padding: var(--spacing-2xs);
|
|
7
7
|
--tab-gap: var(--spacing-2xs);
|
|
8
|
-
--
|
|
9
|
-
--
|
|
10
|
-
--
|
|
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
|
-
--
|
|
12
|
+
--wt-tabs-underline-active-color: var(--primary-color);
|
|
13
13
|
--tab-z-index: 1;
|
|
14
14
|
}
|
|
@@ -49,7 +49,9 @@ export default {
|
|
|
49
49
|
default: () => [],
|
|
50
50
|
},
|
|
51
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(--
|
|
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(--
|
|
106
|
-
border-bottom-color: var(--
|
|
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(--
|
|
111
|
-
border-bottom-color: var(--
|
|
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
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
<wt-icon-btn
|
|
48
48
|
icon="close--filled"
|
|
49
49
|
size="sm"
|
|
50
|
+
color="on-primary"
|
|
50
51
|
@click="remove(option)"
|
|
51
52
|
/>
|
|
52
53
|
</wt-chip>
|
|
@@ -169,10 +170,6 @@ export default {
|
|
|
169
170
|
};
|
|
170
171
|
</script>
|
|
171
172
|
|
|
172
|
-
<style lang="scss">
|
|
173
|
-
@import './variables.scss';
|
|
174
|
-
</style>
|
|
175
|
-
|
|
176
173
|
<style lang="scss" scoped>
|
|
177
174
|
@import '../wt-select/multiselect.scss';
|
|
178
175
|
|
|
@@ -180,21 +177,6 @@ export default {
|
|
|
180
177
|
width: 100%;
|
|
181
178
|
}
|
|
182
179
|
|
|
183
|
-
.wt-tags-input:hover,
|
|
184
|
-
.wt-tags-input:focus-within {
|
|
185
|
-
.wt-label {
|
|
186
|
-
color: var(--form-label--hover-color);
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
.wt-tags-input--invalid,
|
|
191
|
-
.wt-tags-input--invalid:hover,
|
|
192
|
-
.wt-tags-input--invalid:focus-within, {
|
|
193
|
-
.wt-label {
|
|
194
|
-
color: var(--false-color);
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
|
|
198
180
|
.wt-tags-input--disabled {
|
|
199
181
|
.wt-tags-input__tags-input {
|
|
200
182
|
width: 100%;
|
|
@@ -202,7 +184,8 @@ export default {
|
|
|
202
184
|
}
|
|
203
185
|
}
|
|
204
186
|
|
|
205
|
-
|
|
187
|
+
// paddings recalc
|
|
188
|
+
.wt-tags-input .multiselect :deep {
|
|
206
189
|
.multiselect__tags {
|
|
207
190
|
padding-bottom: 0;
|
|
208
191
|
padding-right: calc(
|
|
@@ -162,18 +162,6 @@ export default {
|
|
|
162
162
|
position: relative;
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
-
.wt-label {
|
|
166
|
-
.wt-textarea:hover &,
|
|
167
|
-
.wt-textarea:focus-within & {
|
|
168
|
-
color: var(--form-label--hover-color);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
.wt-textarea--invalid:hover &,
|
|
172
|
-
.wt-textarea--invalid:focus-within & {
|
|
173
|
-
color: var(--wt-label-error-color);
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
|
|
177
165
|
.wt-textarea__textarea {
|
|
178
166
|
@extend %typo-body-1;
|
|
179
167
|
@extend %wt-scrollbar;
|
|
@@ -186,27 +174,22 @@ export default {
|
|
|
186
174
|
padding: var(--textarea-padding);
|
|
187
175
|
resize: none;
|
|
188
176
|
transition: var(--transition);
|
|
189
|
-
color: var(--form-input-color);
|
|
190
177
|
border: var(--input-border);
|
|
191
|
-
border-color: var(--
|
|
178
|
+
border-color: var(--wt-text-field-input-border-color);
|
|
192
179
|
border-radius: var(--border-radius);
|
|
193
180
|
|
|
194
|
-
&:focus {
|
|
195
|
-
@include wt-placeholder('focus');
|
|
196
|
-
|
|
197
|
-
border-color: var(--form-border--hover-color);
|
|
198
|
-
}
|
|
199
|
-
|
|
200
181
|
.wt-textarea--disabled & {
|
|
201
182
|
@include wt-placeholder('disabled');
|
|
202
183
|
|
|
203
|
-
border-color: var(--
|
|
204
|
-
background: var(--
|
|
184
|
+
border-color: var(--wt-text-field-input-border-disabled-color);
|
|
185
|
+
background: var(--wt-text-field-input-background-disabled-color);
|
|
205
186
|
}
|
|
206
187
|
|
|
207
188
|
.wt-textarea--invalid &,
|
|
208
189
|
.wt-textarea--invalid:hover & {
|
|
209
|
-
|
|
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);
|
|
210
193
|
outline: none; // prevent outline overlapping false color
|
|
211
194
|
}
|
|
212
195
|
}
|
|
@@ -2,7 +2,6 @@
|
|
|
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
|
}"
|
|
@@ -10,8 +9,6 @@
|
|
|
10
9
|
<wt-label
|
|
11
10
|
v-if="hasLabel"
|
|
12
11
|
v-bind="labelProps"
|
|
13
|
-
:for="name"
|
|
14
|
-
:outline="outline"
|
|
15
12
|
:disabled="disabled"
|
|
16
13
|
:invalid="invalid"
|
|
17
14
|
>
|
|
@@ -25,7 +22,6 @@
|
|
|
25
22
|
</wt-label>
|
|
26
23
|
<div class="wt-time-input__wrapper">
|
|
27
24
|
<input
|
|
28
|
-
:id="name"
|
|
29
25
|
class="wt-time-input__input"
|
|
30
26
|
:value="value"
|
|
31
27
|
:min="0"
|
|
@@ -65,13 +61,6 @@ export default {
|
|
|
65
61
|
type: String,
|
|
66
62
|
default: '',
|
|
67
63
|
},
|
|
68
|
-
/**
|
|
69
|
-
* Form input name
|
|
70
|
-
*/
|
|
71
|
-
name: {
|
|
72
|
-
type: String,
|
|
73
|
-
default: '',
|
|
74
|
-
},
|
|
75
64
|
/**
|
|
76
65
|
* Time type: day, minute, second
|
|
77
66
|
*/
|
|
@@ -94,22 +83,22 @@ export default {
|
|
|
94
83
|
default: false,
|
|
95
84
|
description: 'Native input disabled attribute',
|
|
96
85
|
},
|
|
97
|
-
|
|
98
|
-
outline: {
|
|
99
|
-
type: Boolean,
|
|
100
|
-
default: false,
|
|
101
|
-
},
|
|
102
|
-
|
|
103
86
|
labelProps: {
|
|
104
87
|
type: Object,
|
|
105
88
|
description: 'Object with props, passed down to wt-label as props',
|
|
106
89
|
},
|
|
107
|
-
|
|
108
90
|
hideInputInfo: {
|
|
109
91
|
type: Boolean,
|
|
110
92
|
default: false,
|
|
111
93
|
},
|
|
112
94
|
},
|
|
95
|
+
emits: [
|
|
96
|
+
/**
|
|
97
|
+
* Emits on input value change
|
|
98
|
+
* @param {string} value
|
|
99
|
+
*/
|
|
100
|
+
'input',
|
|
101
|
+
],
|
|
113
102
|
computed: {
|
|
114
103
|
hasLabel() {
|
|
115
104
|
return !!(this.label || this.$slots.label);
|
|
@@ -137,16 +126,6 @@ export default {
|
|
|
137
126
|
|
|
138
127
|
.wt-label {
|
|
139
128
|
text-align: center;
|
|
140
|
-
|
|
141
|
-
.wt-time-input:hover &,
|
|
142
|
-
.wt-time-input:focus-within & {
|
|
143
|
-
color: var(--form-label--hover-color);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.wt-time-input--invalid:hover &,
|
|
147
|
-
.wt-time-input--invalid:focus-within & {
|
|
148
|
-
color: var(--wt-label-error-color);
|
|
149
|
-
}
|
|
150
129
|
}
|
|
151
130
|
|
|
152
131
|
.wt-time-input__input {
|
|
@@ -156,35 +135,23 @@ export default {
|
|
|
156
135
|
width: 100%;
|
|
157
136
|
box-sizing: border-box;
|
|
158
137
|
padding: var(--input-padding);
|
|
159
|
-
color: var(--form-input-color);
|
|
160
138
|
border: var(--input-border);
|
|
161
|
-
border-color: var(--
|
|
139
|
+
border-color: var(--wt-text-field-input-border-color);
|
|
162
140
|
border-radius: var(--border-radius);
|
|
163
141
|
transition: var(--transition);
|
|
164
142
|
|
|
165
|
-
.wt-time-input:hover &,
|
|
166
|
-
&:focus {
|
|
167
|
-
border-color: var(--form-border--hover-color);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
.wt-time-input--outline & {
|
|
171
|
-
border-color: var(--form-outline-border-color);
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
.wt-time-input--outline:hover &,
|
|
175
|
-
.wt-time-input--outline &:focus {
|
|
176
|
-
border-color: var(--form-outline-border--hover-color);
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
.wt-time-input--disabled & {
|
|
180
|
-
background: var(--form-border--disabled-color);
|
|
181
|
-
border-color: var(--form-border--disabled-color);
|
|
182
|
-
}
|
|
183
|
-
|
|
184
143
|
.wt-time-input--invalid &,
|
|
185
144
|
.wt-time-input--invalid:hover & {
|
|
186
|
-
|
|
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);
|
|
187
148
|
outline: none; // prevent outline overlapping false color
|
|
188
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
|
+
}
|
|
189
156
|
}
|
|
190
157
|
</style>
|
|
@@ -157,18 +157,6 @@ export default {
|
|
|
157
157
|
flex-direction: column;
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
-
.wt-label {
|
|
161
|
-
.wt-timepicker:hover &,
|
|
162
|
-
.wt-timepicker:focus-within & {
|
|
163
|
-
color: var(--form-label--hover-color);
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
.wt-timepicker--invalid:hover &,
|
|
167
|
-
.wt-timepicker--invalid:focus-within & {
|
|
168
|
-
color: var(--wt-label-error-color);
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
|
|
172
160
|
.wt-timepicker__wrapper {
|
|
173
161
|
display: flex;
|
|
174
162
|
}
|
|
@@ -17,14 +17,4 @@ describe('WtTooltip', () => {
|
|
|
17
17
|
});
|
|
18
18
|
expect(wrapper.find('.wt-tooltip').text()).toEqual(content);
|
|
19
19
|
});
|
|
20
|
-
|
|
21
|
-
it('changed tooltip color, if prop is passed', () => {
|
|
22
|
-
const wrapper = shallowMount(WtTooltip, {
|
|
23
|
-
props: {
|
|
24
|
-
contrast: true,
|
|
25
|
-
},
|
|
26
|
-
});
|
|
27
|
-
expect(wrapper.find('.wt-tooltip').classes())
|
|
28
|
-
.toContain('wt-tooltip--contrast');
|
|
29
|
-
});
|
|
30
20
|
});
|
|
@@ -2,10 +2,8 @@
|
|
|
2
2
|
:root {
|
|
3
3
|
--tooltip-padding: var(--spacing-2xs) var(--spacing-xs);
|
|
4
4
|
|
|
5
|
-
--tooltip-
|
|
6
|
-
--tooltip-
|
|
7
|
-
--tooltip-dark-text-color: var(--text-contrast-color);
|
|
8
|
-
--tooltip-dark-bg-color: var(--contrast-color);
|
|
5
|
+
--wt-tooltip-text-color: var(--text-main-color);
|
|
6
|
+
--wt-tooltip-background-color: var(--dp-24-surface-color);
|
|
9
7
|
|
|
10
8
|
--tooltip-elevation: var(--elevation-10);
|
|
11
9
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
:class="{
|
|
4
|
-
'wt-tooltip--contrast': contrast,
|
|
5
4
|
'wt-tooltip--visible': isVisible,
|
|
6
5
|
}"
|
|
7
6
|
class="wt-tooltip"
|
|
@@ -43,10 +42,6 @@ const props = defineProps({
|
|
|
43
42
|
type: Boolean,
|
|
44
43
|
default: false,
|
|
45
44
|
},
|
|
46
|
-
contrast: {
|
|
47
|
-
type: Boolean,
|
|
48
|
-
default: false,
|
|
49
|
-
},
|
|
50
45
|
placement: {
|
|
51
46
|
type: String,
|
|
52
47
|
default: 'auto',
|
|
@@ -133,18 +128,11 @@ onMounted(() => {
|
|
|
133
128
|
.wt-tooltip-floating {
|
|
134
129
|
@extend %typo-body-2;
|
|
135
130
|
padding: var(--spacing-2xs) var(--spacing-xs);
|
|
136
|
-
color: var(--
|
|
137
|
-
background: var(--
|
|
131
|
+
color: var(--wt-tooltip-text-color);
|
|
132
|
+
background: var(--wt-tooltip-background-color);
|
|
138
133
|
border-radius: var(--border-radius);
|
|
139
134
|
box-shadow: var(--elevation-10);
|
|
140
135
|
z-index: 1000;
|
|
141
136
|
}
|
|
142
|
-
|
|
143
|
-
&--contrast {
|
|
144
|
-
.wt-tooltip-floating {
|
|
145
|
-
color: var(--main-color);
|
|
146
|
-
background: var(--contrast-color);
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
137
|
}
|
|
150
138
|
</style>
|