@webitel/ui-sdk 1.0.13 → 1.0.17
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 +168 -165
- package/dist/ui-sdk.common.js.map +1 -1
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.umd.js +168 -165
- 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/atoms/wt-button/wt-button.vue +11 -0
- package/src/components/atoms/wt-icon/wt-icon.vue +1 -1
- package/src/components/atoms/wt-rounded-action/wt-rounded-action.vue +54 -18
- package/src/components/molecules/wt-slider/wt-slider.vue +16 -17
- package/src/css/components/atoms/wt-chip/_variables.scss +2 -2
- package/src/css/components/atoms/wt-chip/wt-chip.scss +1 -1
- package/src/css/components/atoms/wt-rounded-action/_variables.scss +1 -1
- package/src/css/components/molecules/wt-slider/_variables.scss +4 -4
- package/src/css/styleguide/typography/_typography.scss +1 -1
package/package.json
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
colorClass,
|
|
6
6
|
`wt-button--size-${size}`,
|
|
7
7
|
{
|
|
8
|
+
'wt-button--contains-icon': containsIcon,
|
|
8
9
|
'wt-button--outline': outline,
|
|
9
10
|
'wt-button--wide': wide,
|
|
10
11
|
'wt-button--rounded': rounded,
|
|
@@ -58,6 +59,11 @@ export default {
|
|
|
58
59
|
type: Boolean,
|
|
59
60
|
default: false,
|
|
60
61
|
},
|
|
62
|
+
containsIcon: {
|
|
63
|
+
type: Boolean,
|
|
64
|
+
default: false,
|
|
65
|
+
description: 'https://stackoverflow.com/a/11126701',
|
|
66
|
+
},
|
|
61
67
|
},
|
|
62
68
|
computed: {
|
|
63
69
|
colorClass() {
|
|
@@ -95,6 +101,11 @@ export default {
|
|
|
95
101
|
border-radius: var(--border-radius--pill);
|
|
96
102
|
}
|
|
97
103
|
|
|
104
|
+
// https://stackoverflow.com/a/11126701
|
|
105
|
+
&--contains-icon {
|
|
106
|
+
line-height: 0;
|
|
107
|
+
}
|
|
108
|
+
|
|
98
109
|
&--size {
|
|
99
110
|
&-sm {
|
|
100
111
|
padding: var(--btn-padding--size-sm);
|
|
@@ -29,7 +29,7 @@ export default {
|
|
|
29
29
|
color: {
|
|
30
30
|
type: String,
|
|
31
31
|
default: 'default',
|
|
32
|
-
options: ['default', 'contrast', 'active', 'disabled', 'success', 'danger', 'transfer', 'hold'],
|
|
32
|
+
options: ['default', 'contrast', 'active', 'accent', 'disabled', 'success', 'danger', 'transfer', 'hold', 'secondary-50'],
|
|
33
33
|
},
|
|
34
34
|
iconPrefix: {
|
|
35
35
|
type: String,
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<wt-button
|
|
3
|
-
|
|
3
|
+
v-bind="{ ...$attrs, ...$props }"
|
|
4
4
|
:class="[
|
|
5
|
+
`wt-rounded-action--color-${color}`,
|
|
6
|
+
{ 'wt-rounded-action--active': active },
|
|
5
7
|
{ 'wt-rounded-action--disabled': disabled },
|
|
6
8
|
]"
|
|
7
|
-
|
|
9
|
+
class="wt-rounded-action"
|
|
8
10
|
color="secondary"
|
|
9
11
|
@click="$emit('click', $event)"
|
|
10
12
|
>
|
|
11
13
|
<wt-icon
|
|
12
|
-
:icon="icon"
|
|
13
14
|
:color="iColor"
|
|
15
|
+
:icon="icon"
|
|
14
16
|
:size="size"
|
|
15
17
|
></wt-icon>
|
|
16
18
|
</wt-button>
|
|
@@ -25,7 +27,8 @@ export default {
|
|
|
25
27
|
},
|
|
26
28
|
color: {
|
|
27
29
|
type: String,
|
|
28
|
-
default: '',
|
|
30
|
+
default: 'secondary',
|
|
31
|
+
options: ['secondary', 'accent', 'success', 'danger', 'hold', 'transfer'],
|
|
29
32
|
},
|
|
30
33
|
iconColor: {
|
|
31
34
|
type: String,
|
|
@@ -36,6 +39,10 @@ export default {
|
|
|
36
39
|
default: 'md',
|
|
37
40
|
options: ['sm', 'md'],
|
|
38
41
|
},
|
|
42
|
+
active: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: false,
|
|
45
|
+
},
|
|
39
46
|
disabled: {
|
|
40
47
|
type: Boolean,
|
|
41
48
|
default: false,
|
|
@@ -45,16 +52,7 @@ export default {
|
|
|
45
52
|
iColor() {
|
|
46
53
|
if (this.iconColor) return this.iconColor;
|
|
47
54
|
if (this.disabled) return 'secondary-50';
|
|
48
|
-
|
|
49
|
-
case 'success':
|
|
50
|
-
return 'success';
|
|
51
|
-
case 'accent':
|
|
52
|
-
return 'accent';
|
|
53
|
-
case 'danger':
|
|
54
|
-
return 'danger';
|
|
55
|
-
default:
|
|
56
|
-
return 'default';
|
|
57
|
-
}
|
|
55
|
+
return this.color;
|
|
58
56
|
},
|
|
59
57
|
},
|
|
60
58
|
};
|
|
@@ -64,12 +62,50 @@ export default {
|
|
|
64
62
|
<style lang="scss" scoped>
|
|
65
63
|
.wt-button.wt-rounded-action {
|
|
66
64
|
min-width: auto;
|
|
67
|
-
|
|
65
|
+
min-height: 0;
|
|
68
66
|
padding: var(--rounded-action-padding);
|
|
67
|
+
line-height: 0;
|
|
68
|
+
border: var(--btn-border);
|
|
69
|
+
border-color: transparent;
|
|
70
|
+
background: var(--rounded-action-bg-color);
|
|
71
|
+
box-shadow: var(--elevation-1);
|
|
72
|
+
|
|
73
|
+
&:hover {
|
|
74
|
+
background: inherit;
|
|
75
|
+
box-shadow: var(--elevation-2);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&--active {
|
|
79
|
+
border-color: var(--icon-color);
|
|
80
|
+
|
|
81
|
+
&.wt-rounded-action--color-secondary {
|
|
82
|
+
border-color: var(--icon-color);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&.wt-rounded-action--color-accent {
|
|
86
|
+
border-color: var(--btn-accent--hover-color);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&.wt-rounded-action--color-success {
|
|
90
|
+
border-color: var(--btn-true--hover-color);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&.wt-rounded-action--color-danger {
|
|
94
|
+
border-color: var(--btn-false--hover-color);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
&.wt-rounded-action--color-hold {
|
|
98
|
+
border-color: var(--btn-hold--hover-color);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
&.wt-rounded-action--color-transfer {
|
|
102
|
+
border-color: var(--btn-transfer--hover-color);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
69
105
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
box-shadow:
|
|
106
|
+
&.wt-rounded-action--disabled {
|
|
107
|
+
border-color: transparent;
|
|
108
|
+
box-shadow: none;
|
|
73
109
|
}
|
|
74
110
|
}
|
|
75
111
|
</style>
|
|
@@ -16,27 +16,27 @@ and swapping height/width of this component in order to have the correct output.
|
|
|
16
16
|
|
|
17
17
|
<template>
|
|
18
18
|
<div
|
|
19
|
-
class="wt-slider"
|
|
20
19
|
:class="{
|
|
21
20
|
'wt-slider--disabled': disabled,
|
|
22
21
|
'wt-slider--vertical': vertical,
|
|
23
22
|
}"
|
|
24
23
|
:style="{ height: verticalHeight }"
|
|
24
|
+
class="wt-slider"
|
|
25
25
|
>
|
|
26
26
|
<div
|
|
27
|
-
class="wt-slider__wrapper"
|
|
28
27
|
:style="{ width: verticalHeight }"
|
|
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 -->
|
|
31
31
|
<input
|
|
32
|
-
|
|
33
|
-
class="wt-slider__slider"
|
|
34
|
-
:style="{ background: progressStyle }"
|
|
35
|
-
:min="min"
|
|
32
|
+
:disabled="disabled"
|
|
36
33
|
:max="max"
|
|
34
|
+
:min="min"
|
|
37
35
|
:step="step"
|
|
36
|
+
:style="{ background: progressStyle }"
|
|
38
37
|
:value="value"
|
|
39
|
-
|
|
38
|
+
class="wt-slider__slider"
|
|
39
|
+
type="range"
|
|
40
40
|
@input="inputHandler"
|
|
41
41
|
/>
|
|
42
42
|
</div>
|
|
@@ -95,18 +95,21 @@ export default {
|
|
|
95
95
|
</script>
|
|
96
96
|
|
|
97
97
|
<style lang="scss" scoped>
|
|
98
|
-
|
|
99
98
|
.wt-slider__wrapper {
|
|
100
|
-
|
|
99
|
+
display: flex;
|
|
100
|
+
align-items: center;
|
|
101
|
+
width: var(--wt-slider-width);
|
|
102
|
+
height: var(--wt-slider-height);
|
|
101
103
|
}
|
|
102
104
|
|
|
103
105
|
.wt-slider__slider {
|
|
104
|
-
box-sizing:
|
|
106
|
+
box-sizing: border-box;
|
|
105
107
|
width: var(--wt-slider-width);
|
|
106
|
-
height: var(--wt-slider-height);
|
|
108
|
+
height: var(--wt-slider-input-height);
|
|
109
|
+
margin: 0;
|
|
110
|
+
cursor: pointer;
|
|
107
111
|
border: var(--wt-slider-border);
|
|
108
112
|
border-radius: var(--border-radius);
|
|
109
|
-
cursor: pointer;
|
|
110
113
|
-webkit-appearance: none;
|
|
111
114
|
-moz-appearance: none;
|
|
112
115
|
|
|
@@ -160,16 +163,12 @@ export default {
|
|
|
160
163
|
}
|
|
161
164
|
|
|
162
165
|
.wt-slider--vertical {
|
|
163
|
-
width: var(--wt-slider-
|
|
166
|
+
width: var(--wt-slider-height);
|
|
164
167
|
transform: var(--wt-slider-vertical-container-translation);
|
|
165
168
|
|
|
166
169
|
.wt-slider__wrapper {
|
|
167
170
|
transform: var(--wt-slider-vertical-transform);
|
|
168
171
|
transform-origin: var(--wt-slider-vertical-transform-origin);
|
|
169
|
-
|
|
170
|
-
.wt-slider__slider {
|
|
171
|
-
margin: 0;
|
|
172
|
-
}
|
|
173
172
|
}
|
|
174
173
|
}
|
|
175
174
|
</style>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
:root {
|
|
3
|
-
--chip-padding: var(--spacing-
|
|
3
|
+
--chip-padding: var(--spacing-3xs) var(--spacing-sm);
|
|
4
4
|
--chip-border-radius: var(--spacing-lg);
|
|
5
5
|
--chip-bg-color: var(--accent-secondary-color);
|
|
6
6
|
--chip-bg-color--outline: var(--secondary-color);
|
|
7
|
-
}
|
|
7
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
|
|
2
2
|
:root {
|
|
3
|
-
--wt-slider-
|
|
3
|
+
--wt-slider-pointer-size: 16px;
|
|
4
|
+
--wt-slider-height: var(--wt-slider-pointer-size);
|
|
5
|
+
|
|
4
6
|
--wt-slider-width: 100%;
|
|
5
|
-
--wt-slider-height: 8px;
|
|
7
|
+
--wt-slider-input-height: 8px;
|
|
6
8
|
--wt-slider-border: 1px solid var(--secondary-color);
|
|
7
9
|
|
|
8
|
-
--wt-slider-pointer-size: 16px;
|
|
9
10
|
--wt-slider-pointer-radius: 50%;
|
|
10
11
|
|
|
11
|
-
--wt-slider-vertical-container-width: 20px;
|
|
12
12
|
--wt-slider-vertical-container-translation: translate(2px);
|
|
13
13
|
--wt-slider-vertical-transform: translate(-100%, 0) rotate(-90deg);
|
|
14
14
|
--wt-slider-vertical-transform-origin: 100% 0;
|