@webitel/ui-sdk 1.0.14 → 1.0.18

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/ui-sdk",
3
- "version": "1.0.14",
3
+ "version": "1.0.18",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve-lib": "vue-cli-service serve",
@@ -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);
@@ -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
- type="range"
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
- :disabled="disabled"
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
- width: var(--wt-slider-width)
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: var(--wt-slider-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-vertical-container-width);
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>
@@ -28,7 +28,7 @@
28
28
  --btn-secondary--hover-color: hsla(var(--_secondary-color), var(--_opacity--hover));
29
29
 
30
30
  --btn-disabled-font-color: var(--secondary-color-50);
31
- --btn-disabled-color: hsla(var(--_secondary-color-hue), 15%, 80%, var(--_opacity--active));
31
+ --btn-disabled-color: hsla(var(--_secondary-color-hue), 15%, 75%, var(--_opacity--active));
32
32
 
33
33
  --btn-true-color: var(--true-color);
34
34
  --btn-true--hover-color: var(--true--hover-color);
@@ -1,7 +1,7 @@
1
1
 
2
2
  :root {
3
- --chip-padding: var(--spacing-2xs) var(--spacing-xs);
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,5 +1,5 @@
1
1
  .wt-chip {
2
- @extend %typo-caption;
2
+ @extend %typo-body-2;
3
3
 
4
4
  display: inline-block;
5
5
  padding: var(--chip-padding);
@@ -1,14 +1,14 @@
1
1
 
2
2
  :root {
3
- --wt-slider-box-sizing: border-box;
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;
@@ -65,7 +65,7 @@
65
65
  size: 12px;
66
66
  weight: 400;
67
67
  }
68
- line-height: 20px;
68
+ line-height: 16px;
69
69
  //letter-spacing: 0.16px; // 0.01em
70
70
  }
71
71