@webitel/ui-sdk 1.0.5 → 1.0.9
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 +309 -285
- package/dist/ui-sdk.common.js.map +1 -1
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.umd.js +309 -285
- package/dist/ui-sdk.umd.js.map +1 -1
- package/dist/ui-sdk.umd.min.js +2 -2
- package/dist/ui-sdk.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/molecules/wt-datepicker/wt-datepicker.vue +130 -133
- package/src/components/molecules/wt-datetimepicker/wt-datetimepicker.vue +21 -30
- package/src/components/molecules/wt-input/wt-input.vue +1 -0
- package/src/components/molecules/wt-popup/wt-popup.vue +1 -0
- package/src/components/molecules/wt-switcher/wt-switcher.vue +4 -0
- package/src/components/organisms/wt-app-header/wt-app-navigator.vue +1 -1
- package/src/components/organisms/wt-app-header/wt-header-actions.vue +4 -4
- package/src/components/organisms/wt-error-page/wt-error-page.vue +1 -1
- package/src/components/organisms/wt-navigation-bar/wt-navigation-bar.vue +62 -37
- package/src/components/organisms/wt-table/wt-table.vue +29 -28
- package/src/components/organisms/wt-table-actions/wt-table-actions.vue +0 -1
- package/src/css/components/atoms/wt-tooltip/_variables.scss +1 -1
- package/src/css/components/organisms/wt-navigation-bar/_variables.scss +2 -0
- package/src/css/styleguide/colors/_colors.scss +1 -1
package/package.json
CHANGED
|
@@ -1,36 +1,32 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
-
class="wt-datepicker"
|
|
4
3
|
:class="{
|
|
5
4
|
'wt-datepicker--disabled': disabled,
|
|
6
5
|
}"
|
|
6
|
+
class="wt-datepicker"
|
|
7
7
|
>
|
|
8
|
-
<wt-label
|
|
8
|
+
<wt-label v-bind="labelProps" :disabled="disabled">
|
|
9
9
|
<!-- @slot Custom input label -->
|
|
10
|
-
<slot
|
|
10
|
+
<slot v-bind="{ label }" name="label">{{ label }}</slot>
|
|
11
11
|
</wt-label>
|
|
12
12
|
<vue-datepicker
|
|
13
|
-
|
|
14
|
-
:value="+value"
|
|
15
|
-
:format="format"
|
|
16
|
-
:maximum-view="maximumView"
|
|
17
|
-
:disabled="disabled"
|
|
18
|
-
:disabled-dates="disabledDates"
|
|
13
|
+
v-bind="{ ...$attrs, ...$props }"
|
|
19
14
|
:placeholder="label || placeholder"
|
|
20
|
-
:
|
|
15
|
+
:value="+value"
|
|
16
|
+
class="wt-datepicker__datepicker"
|
|
21
17
|
monday-first
|
|
22
18
|
@input="$emit('change', $event.getTime())"
|
|
23
19
|
>
|
|
24
20
|
<template slot="afterDateInput">
|
|
25
21
|
<wt-icon
|
|
22
|
+
:color="disabled ? 'disabled' : 'default'"
|
|
26
23
|
class="wt-datepicker__calendar-icon"
|
|
27
24
|
icon="calendar"
|
|
28
|
-
:color="disabled ? 'disabled' : 'default'"
|
|
29
25
|
></wt-icon>
|
|
30
26
|
<wt-icon
|
|
27
|
+
:color="disabled ? 'disabled' : 'default'"
|
|
31
28
|
class="wt-datepicker__arrow-icon"
|
|
32
29
|
icon="arrow-down"
|
|
33
|
-
:color="disabled ? 'disabled' : 'default'"
|
|
34
30
|
></wt-icon>
|
|
35
31
|
</template>
|
|
36
32
|
<template slot="beforeCalendarHeader">
|
|
@@ -48,159 +44,160 @@
|
|
|
48
44
|
</template>
|
|
49
45
|
|
|
50
46
|
<script>
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
47
|
+
import VueDatepicker from 'vuejs-datepicker';
|
|
48
|
+
|
|
49
|
+
export default {
|
|
50
|
+
name: 'wt-datepicker',
|
|
51
|
+
components: {
|
|
52
|
+
VueDatepicker,
|
|
53
|
+
},
|
|
54
|
+
props: {
|
|
55
|
+
value: {
|
|
56
|
+
type: [String, Number],
|
|
57
|
+
default: 'Date.now()',
|
|
58
|
+
},
|
|
59
|
+
/**
|
|
60
|
+
* label above calendar input
|
|
61
|
+
*/
|
|
62
|
+
label: {
|
|
63
|
+
type: String,
|
|
64
|
+
default: '',
|
|
65
|
+
},
|
|
66
|
+
placeholder: {
|
|
67
|
+
type: String,
|
|
68
|
+
default: '',
|
|
69
|
+
},
|
|
70
|
+
format: {
|
|
71
|
+
type: [String, Function],
|
|
72
|
+
},
|
|
73
|
+
maximumView: {
|
|
74
|
+
type: String,
|
|
75
|
+
default: 'day',
|
|
57
76
|
},
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
default: 'Date.now()',
|
|
62
|
-
},
|
|
63
|
-
/**
|
|
64
|
-
* label above calendar input
|
|
65
|
-
*/
|
|
66
|
-
label: {
|
|
67
|
-
type: String,
|
|
68
|
-
default: '',
|
|
69
|
-
},
|
|
70
|
-
placeholder: {
|
|
71
|
-
type: String,
|
|
72
|
-
default: '',
|
|
73
|
-
},
|
|
74
|
-
format: {
|
|
75
|
-
type: [String, Function],
|
|
76
|
-
},
|
|
77
|
-
maximumView: {
|
|
78
|
-
type: String,
|
|
79
|
-
default: 'day',
|
|
80
|
-
},
|
|
81
|
-
disabled: {
|
|
82
|
-
type: Boolean,
|
|
83
|
-
default: false,
|
|
84
|
-
},
|
|
85
|
-
disabledDates: {
|
|
86
|
-
type: Object,
|
|
87
|
-
},
|
|
88
|
-
lang: {
|
|
89
|
-
type: String,
|
|
90
|
-
default: 'en',
|
|
91
|
-
},
|
|
92
|
-
labelProps: {
|
|
93
|
-
type: Object,
|
|
94
|
-
description: 'Object with props, passed down to wt-label as props',
|
|
95
|
-
},
|
|
77
|
+
disabled: {
|
|
78
|
+
type: Boolean,
|
|
79
|
+
default: false,
|
|
96
80
|
},
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
event: 'change',
|
|
81
|
+
disabledDates: {
|
|
82
|
+
type: Object,
|
|
100
83
|
},
|
|
101
|
-
|
|
84
|
+
lang: {
|
|
85
|
+
type: String,
|
|
86
|
+
default: 'en',
|
|
87
|
+
},
|
|
88
|
+
labelProps: {
|
|
89
|
+
type: Object,
|
|
90
|
+
description: 'Object with props, passed down to wt-label as props',
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
model: {
|
|
94
|
+
prop: 'value',
|
|
95
|
+
event: 'change',
|
|
96
|
+
},
|
|
97
|
+
};
|
|
102
98
|
</script>
|
|
103
99
|
|
|
104
100
|
<style lang="scss" scoped>
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
101
|
+
.wt-datepicker__calendar-icon {
|
|
102
|
+
position: absolute;
|
|
103
|
+
top: var(--spacing-xs);
|
|
104
|
+
left: var(--input-padding);
|
|
105
|
+
pointer-events: none;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.wt-datepicker__arrow-icon {
|
|
109
|
+
position: absolute;
|
|
110
|
+
top: var(--spacing-xs);
|
|
111
|
+
right: var(--input-padding);
|
|
112
|
+
pointer-events: none;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.wt-datepicker__month-arrow {
|
|
116
|
+
position: absolute;
|
|
117
|
+
top: var(--spacing-xs);
|
|
118
|
+
pointer-events: none;
|
|
119
|
+
|
|
120
|
+
&--right {
|
|
121
|
+
right: var(--spacing-xs);
|
|
110
122
|
}
|
|
111
123
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
top: var(--spacing-xs);
|
|
115
|
-
right: var(--input-padding);
|
|
116
|
-
pointer-events: none;
|
|
124
|
+
&--left {
|
|
125
|
+
left: var(--spacing-xs);
|
|
117
126
|
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
::v-deep .vdp-datepicker {
|
|
130
|
+
min-width: var(--datepicker-width);
|
|
131
|
+
|
|
132
|
+
// preview input
|
|
133
|
+
> div:first-child {
|
|
134
|
+
position: relative;
|
|
135
|
+
|
|
136
|
+
input {
|
|
137
|
+
@extend %typo-body-1;
|
|
138
|
+
@include wt-placeholder;
|
|
139
|
+
box-sizing: border-box;
|
|
140
|
+
width: 100%;
|
|
141
|
+
padding: var(--datepicker-padding);
|
|
142
|
+
border: var(--datepicker-border);
|
|
143
|
+
border-color: var(--form-border-color);
|
|
144
|
+
border-radius: var(--border-radius);
|
|
145
|
+
|
|
146
|
+
&:focus {
|
|
147
|
+
@include wt-placeholder('focus');
|
|
148
|
+
}
|
|
126
149
|
}
|
|
127
150
|
|
|
128
|
-
|
|
129
|
-
|
|
151
|
+
.vdp-datepicker__calendar-button {
|
|
152
|
+
display: none;
|
|
130
153
|
}
|
|
131
154
|
}
|
|
132
155
|
|
|
156
|
+
@import '../../../css/components/molecules/wt-datepicker/datepicker-calendar';
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.wt-datepicker:hover,
|
|
160
|
+
.wt-datepicker:focus-within {
|
|
161
|
+
.wt-label {
|
|
162
|
+
color: var(--form-label--hover-color);
|
|
163
|
+
}
|
|
164
|
+
|
|
133
165
|
::v-deep .vdp-datepicker {
|
|
134
166
|
min-width: var(--datepicker-width);
|
|
135
167
|
|
|
136
168
|
// preview input
|
|
137
169
|
> div:first-child {
|
|
138
|
-
position: relative;
|
|
139
170
|
|
|
140
171
|
input {
|
|
141
|
-
|
|
142
|
-
@include wt-placeholder;
|
|
143
|
-
box-sizing: border-box;
|
|
144
|
-
width: 100%;
|
|
145
|
-
padding: var(--datepicker-padding);
|
|
146
|
-
border: var(--datepicker-border);
|
|
147
|
-
border-color: var(--form-border-color);
|
|
148
|
-
border-radius: var(--border-radius);
|
|
149
|
-
|
|
150
|
-
&:focus {
|
|
151
|
-
@include wt-placeholder('focus');
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
.vdp-datepicker__calendar-button {
|
|
156
|
-
display: none;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
@import '../../../css/components/molecules/wt-datepicker/datepicker-calendar';
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
.wt-datepicker:hover,
|
|
163
|
-
.wt-datepicker:focus-within {
|
|
164
|
-
.wt-label {
|
|
165
|
-
color: var(--form-label--hover-color);
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
::v-deep .vdp-datepicker {
|
|
169
|
-
min-width: var(--datepicker-width);
|
|
170
|
-
|
|
171
|
-
// preview input
|
|
172
|
-
> div:first-child {
|
|
173
|
-
|
|
174
|
-
input {
|
|
175
|
-
border-color: var(--form-border--hover-color);
|
|
176
|
-
}
|
|
172
|
+
border-color: var(--form-border--hover-color);
|
|
177
173
|
}
|
|
178
174
|
}
|
|
179
175
|
}
|
|
176
|
+
}
|
|
180
177
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
}
|
|
178
|
+
.wt-datepicker:focus-within {
|
|
179
|
+
::v-deep .vdp-datepicker {
|
|
180
|
+
// arrow down icon
|
|
181
|
+
.vdp-datepicker__calendar-button:before {
|
|
182
|
+
transform: rotate(180deg);
|
|
187
183
|
}
|
|
188
184
|
}
|
|
185
|
+
}
|
|
189
186
|
|
|
190
|
-
|
|
191
|
-
|
|
187
|
+
.wt-datepicker--disabled {
|
|
188
|
+
pointer-events: none;
|
|
192
189
|
|
|
193
|
-
|
|
194
|
-
|
|
190
|
+
::v-deep .vdp-datepicker {
|
|
191
|
+
min-width: var(--datepicker-width);
|
|
195
192
|
|
|
196
|
-
|
|
197
|
-
|
|
193
|
+
// preview input
|
|
194
|
+
> div:first-child {
|
|
198
195
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
}
|
|
196
|
+
input {
|
|
197
|
+
border-color: var(--form-border--disabled-color);
|
|
198
|
+
background: var(--form-border--disabled-color);
|
|
203
199
|
}
|
|
204
200
|
}
|
|
205
201
|
}
|
|
202
|
+
}
|
|
206
203
|
</style>
|
|
@@ -42,15 +42,24 @@
|
|
|
42
42
|
</span>
|
|
43
43
|
</div>
|
|
44
44
|
<div class="wt-datetimepicker__form-wrapper">
|
|
45
|
-
<datepicker
|
|
45
|
+
<!-- <datepicker-->
|
|
46
|
+
<!-- class="wt-datetimepicker__datepicker"-->
|
|
47
|
+
<!-- :value="draft"-->
|
|
48
|
+
<!-- :maximum-view="'day'"-->
|
|
49
|
+
<!-- :disabled-dates="disabledDates"-->
|
|
50
|
+
<!-- monday-first-->
|
|
51
|
+
<!-- inline-->
|
|
52
|
+
<!-- @input="setDraft($event.getTime())"-->
|
|
53
|
+
<!-- ></datepicker>-->
|
|
54
|
+
<wt-datepicker
|
|
46
55
|
class="wt-datetimepicker__datepicker"
|
|
47
56
|
:value="draft"
|
|
48
57
|
:maximum-view="'day'"
|
|
49
58
|
:disabled-dates="disabledDates"
|
|
50
59
|
monday-first
|
|
51
60
|
inline
|
|
52
|
-
@
|
|
53
|
-
></datepicker>
|
|
61
|
+
@change="setDraft"
|
|
62
|
+
></wt-datepicker>
|
|
54
63
|
<wt-timepicker
|
|
55
64
|
class="wt-datetimepicker__timepicker"
|
|
56
65
|
v-model="draft"
|
|
@@ -71,12 +80,12 @@
|
|
|
71
80
|
</template>
|
|
72
81
|
|
|
73
82
|
<script>
|
|
74
|
-
import Datepicker from 'vuejs-datepicker';
|
|
83
|
+
// import Datepicker from 'vuejs-datepicker';
|
|
75
84
|
|
|
76
85
|
export default {
|
|
77
86
|
name: 'wt-datetimepicker',
|
|
78
87
|
components: {
|
|
79
|
-
Datepicker,
|
|
88
|
+
// Datepicker,
|
|
80
89
|
},
|
|
81
90
|
|
|
82
91
|
props: {
|
|
@@ -226,18 +235,15 @@
|
|
|
226
235
|
display: flex;
|
|
227
236
|
flex-direction: column;
|
|
228
237
|
|
|
229
|
-
.wt-datetimepicker__datepicker {
|
|
230
|
-
|
|
238
|
+
.wt-datetimepicker__datepicker ::v-deep {
|
|
239
|
+
.wt-datepicker__calendar-icon,
|
|
240
|
+
.wt-datepicker__arrow-icon {
|
|
231
241
|
display: none;
|
|
232
242
|
}
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
.vdp-datepicker__calendar {
|
|
238
|
-
margin: auto;
|
|
239
|
-
border: none;
|
|
240
|
-
}
|
|
243
|
+
.vdp-datepicker__calendar {
|
|
244
|
+
padding: 0;
|
|
245
|
+
border-color: transparent;
|
|
246
|
+
box-shadow: none;
|
|
241
247
|
}
|
|
242
248
|
}
|
|
243
249
|
|
|
@@ -266,11 +272,6 @@
|
|
|
266
272
|
.wt-datetimepicker__preview__input {
|
|
267
273
|
border-color: var(--form-border--hover-color);
|
|
268
274
|
}
|
|
269
|
-
|
|
270
|
-
.wt-datetimepicker__calendar-icon ::v-deep .wt-icon__icon,
|
|
271
|
-
.wt-datetimepicker__arrow-icon ::v-deep .wt-icon__icon {
|
|
272
|
-
fill: var(--icon-color--hover);
|
|
273
|
-
}
|
|
274
275
|
}
|
|
275
276
|
|
|
276
277
|
.wt-datetimepicker:focus-within,
|
|
@@ -286,11 +287,6 @@
|
|
|
286
287
|
.wt-datetimepicker__arrow-icon {
|
|
287
288
|
transform: translateY(-50%) rotate(180deg);
|
|
288
289
|
}
|
|
289
|
-
|
|
290
|
-
.wt-datetimepicker__calendar-icon ::v-deep .wt-icon__icon,
|
|
291
|
-
.wt-datetimepicker__arrow-icon ::v-deep .wt-icon__icon {
|
|
292
|
-
fill: var(--icon-color-active);
|
|
293
|
-
}
|
|
294
290
|
}
|
|
295
291
|
|
|
296
292
|
.wt-datetimepicker--disabled {
|
|
@@ -300,10 +296,5 @@
|
|
|
300
296
|
border-color: var(--form-border--disabled-color);
|
|
301
297
|
background: var(--form-border--disabled-color);
|
|
302
298
|
}
|
|
303
|
-
|
|
304
|
-
.wt-datetimepicker__calendar-icon ::v-deep .wt-icon__icon,
|
|
305
|
-
.wt-datetimepicker__arrow-icon ::v-deep .wt-icon__icon {
|
|
306
|
-
fill: var(--icon-color-disabled);
|
|
307
|
-
}
|
|
308
299
|
}
|
|
309
300
|
</style>
|
|
@@ -203,7 +203,7 @@ export default {
|
|
|
203
203
|
transition: var(--transition);
|
|
204
204
|
border-radius: var(--border-radius);
|
|
205
205
|
background: var(--wt-app-header-content-bg-color);
|
|
206
|
-
box-shadow: var(--elevation-
|
|
206
|
+
box-shadow: var(--elevation-10);
|
|
207
207
|
}
|
|
208
208
|
|
|
209
209
|
.wt-app-navigator__nav-title {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
target="_blank"
|
|
27
27
|
@click="close"
|
|
28
28
|
>
|
|
29
|
-
<wt-icon icon="docs"
|
|
29
|
+
<wt-icon icon="docs"></wt-icon>
|
|
30
30
|
<span>{{ $t('webitelUI.headerActions.docs') }}</span>
|
|
31
31
|
</a>
|
|
32
32
|
</li>
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
class="wt-header-actions__action__link"
|
|
36
36
|
@click.prevent="settings"
|
|
37
37
|
>
|
|
38
|
-
<wt-icon icon="settings"
|
|
38
|
+
<wt-icon icon="settings"></wt-icon>
|
|
39
39
|
<span>{{ $t('webitelUI.headerActions.settings') }}</span>
|
|
40
40
|
</a>
|
|
41
41
|
</li>
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
class="wt-header-actions__action__link"
|
|
45
45
|
@click.prevent="logout"
|
|
46
46
|
>
|
|
47
|
-
<wt-icon color="danger" icon="logout"
|
|
47
|
+
<wt-icon color="danger" icon="logout"></wt-icon>
|
|
48
48
|
<span>{{ $t('webitelUI.headerActions.logout') }}</span>
|
|
49
49
|
</a>
|
|
50
50
|
</li>
|
|
@@ -137,7 +137,7 @@ export default {
|
|
|
137
137
|
transition: var(--transition);
|
|
138
138
|
border-radius: var(--border-radius);
|
|
139
139
|
background: var(--wt-app-header-content-bg-color);
|
|
140
|
-
box-shadow: var(--elevation-
|
|
140
|
+
box-shadow: var(--elevation-10);
|
|
141
141
|
}
|
|
142
142
|
|
|
143
143
|
.wt-header-actions__name {
|