@webitel/ui-sdk 23.12.45 → 23.12.47

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": "23.12.45",
3
+ "version": "23.12.47",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vite",
@@ -35,7 +35,6 @@
35
35
  ],
36
36
  "dependencies": {
37
37
  "@floating-ui/vue": "^1.0.1",
38
- "@vue/compat": "^3.3.8",
39
38
  "@vuelidate/core": "^2.0.3",
40
39
  "@vuelidate/validators": "^2.0.4",
41
40
  "@vuepic/vue-datepicker": "^4.4.0",
@@ -54,7 +53,6 @@
54
53
  "query-string": "^8.1.0",
55
54
  "sortablejs": "^1.15.0",
56
55
  "tiny-emitter": "^2.1.0",
57
- "vue": "^3.3.8",
58
56
  "vue-i18n": "^9.2.2",
59
57
  "vue-multiselect": "^3.0.0-beta.1",
60
58
  "vue-observe-visibility": "^2.0.0-alpha.1",
@@ -63,6 +61,8 @@
63
61
  },
64
62
  "devDependencies": {
65
63
  "@vitejs/plugin-vue": "4.4.1",
64
+ "@vue/compat": "^3.3.8",
65
+ "vue": "^3.3.8",
66
66
  "@vitest/coverage-v8": "^0.34.6",
67
67
  "@vue/compiler-sfc": "^3.2.47",
68
68
  "@vue/test-utils": "^2.3.0",
@@ -4,12 +4,6 @@
4
4
  </header>
5
5
  </template>
6
6
 
7
- <script>
8
- export default {
9
- name: 'WtAppHeader',
10
- };
11
- </script>
12
-
13
7
  <style lang="scss">
14
8
  @import './variables.scss';
15
9
  </style>
@@ -1,11 +1,13 @@
1
1
 
2
2
  :root {
3
- --progress-bar-height: 12px;
4
- --progress-bar-padding: var(--spacing-3xs);
5
- --progress-bar-border-radius: var(--progress-bar-padding);
3
+ --wt-progress-bar-height: 12px;
4
+ --wt-progress-bar-padding: var(--spacing-3xs);
5
+ --wt-progress-bar-border-radius: var(--wt-progress-bar-padding);
6
6
 
7
- --progress-bar-bg-color--primary: var(--primary-color);
8
- --progress-bar-bg-color--secondary: var(--secondary-color);
9
- --progress-bar-bg-color--success: var(--true-color);
10
- --progress-bar-bg-color--danger: var(--false-color);
7
+ --wt-progress-bar-background-color: var(--dp-1-surface-color);
8
+ --wt-progress-bar-background-primary-color: var(--primary-color);
9
+ --wt-progress-bar-background-secondary-color: var(--dp-20-surface-color);
10
+ --wt-progress-bar-background-success-color: var(--success-color);
11
+ --wt-progress-bar-background-error-color: var(--error-color);
12
+ --wt-progress-bar-background-warning-color: var(--warning-color);
11
13
  }
@@ -29,7 +29,7 @@ export default {
29
29
  color: {
30
30
  type: String,
31
31
  default: 'primary',
32
- options: ['primary', 'secondary', 'success', 'danger'],
32
+ options: ['primary', 'secondary', 'success', 'error'],
33
33
  },
34
34
  },
35
35
  computed: {
@@ -56,38 +56,43 @@ export default {
56
56
  box-sizing: border-box;
57
57
  width: 100%;
58
58
  position: relative;
59
- padding: var(--progress-bar-padding);
59
+ padding: var(--wt-progress-bar-padding);
60
60
  line-height: 0;
61
+ background: var(--wt-progress-bar-background-color);
61
62
  border-radius: var(--border-radius);
62
63
  box-shadow: var(--elevation-1);
63
64
  }
64
65
 
65
66
  .wt-progress-bar__progress {
66
67
  display: inline-block;
67
- height: var(--progress-bar-height);
68
+ height: var(--wt-progress-bar-height);
68
69
  will-change: width;
69
- background: var(--primary-color);
70
- border-radius: var(--progress-bar-border-radius) 0 0 var(--progress-bar-border-radius);
70
+ background: var(--wt-progress-bar-background-primary-color);
71
+ border-radius: var(--wt-progress-bar-border-radius) 0 0 var(--wt-progress-bar-border-radius);
71
72
  transition: var(--transition);
72
73
  }
73
74
 
74
75
  .wt-progress-bar--primary .wt-progress-bar__progress {
75
- background: var(--progress-bar-bg-color--primary);
76
+ background: var(--wt-progress-bar-background-primary-color);
76
77
  }
77
78
 
78
79
  .wt-progress-bar--secondary .wt-progress-bar__progress {
79
- background: var(--progress-bar-bg-color--secondary);
80
+ background: var(--wt-progress-bar-background-secondary-color);
80
81
  }
81
82
 
82
83
  .wt-progress-bar--success .wt-progress-bar__progress {
83
- background: var(--progress-bar-bg-color--success);
84
+ background: var(--wt-progress-bar-background-success-color);
84
85
  }
85
86
 
86
- .wt-progress-bar--danger .wt-progress-bar__progress {
87
- background: var(--progress-bar-bg-color--danger);
87
+ .wt-progress-bar--error .wt-progress-bar__progress {
88
+ background: var(--wt-progress-bar-background-error-color);
89
+ }
90
+
91
+ .wt-progress-bar--warning .wt-progress-bar__progress {
92
+ background: var(--wt-progress-bar-background-warning-color);
88
93
  }
89
94
 
90
95
  .wt-progress-bar--overflow .wt-progress-bar__progress {
91
- border-radius: var(--progress-bar-border-radius);
96
+ border-radius: var(--wt-progress-bar-border-radius);
92
97
  }
93
98
  </style>
@@ -71,6 +71,7 @@ export default {
71
71
  default: false,
72
72
  },
73
73
  },
74
+ emits: ['input'],
74
75
  computed: {
75
76
  isChecked() {
76
77
  return this.value === this.selected;
@@ -87,9 +88,11 @@ export default {
87
88
  };
88
89
  </script>
89
90
 
90
- <style lang="scss" scoped>
91
-
91
+ <style lang="scss">
92
92
  @import './variables.scss';
93
+ </style>
94
+
95
+ <style lang="scss" scoped>
93
96
 
94
97
  /* Customize the label (the container) */
95
98
  .wt-radio {
@@ -128,61 +131,22 @@ export default {
128
131
  }
129
132
 
130
133
  .wt-radio:hover {
131
- .wt-radio__label {
132
- color: var(--form-label--hover-color);
133
- }
134
-
135
- ::v-deep .wt-icon__icon {
136
- fill: var(--icon-color--hover);
134
+ :deep .wt-icon__icon {
135
+ fill: var(--icon-btn-hover-color);
137
136
  }
138
137
  }
139
138
 
140
139
  .wt-radio--active {
141
- .wt-radio__label {
142
- color: var(--form-label--active-color);
143
- }
144
-
145
- ::v-deep .wt-icon__icon {
146
- fill: var(--icon-color-active);
147
- }
148
- }
149
-
150
- .wt-radio--outline {
151
- .wt-radio__label {
152
- color: var(--form-outline-label-color);
153
- }
154
-
155
- ::v-deep .wt-icon__icon {
156
- fill: var(--icon-outline-color);
157
- }
158
-
159
- &.wt-radio--active {
160
- .wt-radio__label {
161
- color: var(--form-label--active-color);
162
- }
163
-
164
- ::v-deep .wt-icon__icon {
165
- fill: var(--icon-outline--active-color);
166
- }
167
- }
168
-
169
- &:hover {
170
-
171
- ::v-deep .wt-icon__icon {
172
- fill: var(--icon-outline--hover-color);
173
- }
140
+ :deep .wt-icon__icon {
141
+ fill: var(--icon-active-color);
174
142
  }
175
143
  }
176
144
 
177
145
  .wt-radio--disabled {
178
146
  pointer-events: none;
179
147
 
180
- .wt-radio__label {
181
- color: var(--form-label--disabled-color);
182
- }
183
-
184
- ::v-deep .wt-icon__icon {
185
- fill: var(--icon-color-disabled);
148
+ :deep .wt-icon__icon {
149
+ fill: var(--icon-disabled-color);
186
150
  }
187
151
  }
188
152
  </style>
@@ -1,7 +1,6 @@
1
1
  <template>
2
2
  <div
3
3
  :class="{
4
- 'wt-search-bar--outline': outline,
5
4
  'wt-search-bar--invalid': invalid,
6
5
  }"
7
6
  class="wt-search-bar"
@@ -75,10 +74,6 @@ const props = defineProps({
75
74
  placeholder: {
76
75
  type: String,
77
76
  },
78
- outline: {
79
- type: Boolean,
80
- default: false,
81
- },
82
77
  hint: {
83
78
  type: String,
84
79
  description: 'Adds hint icon + tooltip with text, passed as "hint" prop',
@@ -128,12 +123,13 @@ function handleKeyup(event) {
128
123
 
129
124
  &.wt-search-bar--invalid {
130
125
  .wt-search-bar__wrapper {
131
- border-color: var(--false-color);
126
+ border-color: var(--wt-text-field-input-border-error-color);
132
127
  outline: none; // prevent outline overlapping false color
133
128
  }
134
129
 
135
130
  .wt-search-bar__input {
136
- color: var(--false-color);
131
+ @include wt-placeholder('error');
132
+ color: var(--wt-text-field-error-text-color);
137
133
  }
138
134
  }
139
135
 
@@ -142,7 +138,7 @@ function handleKeyup(event) {
142
138
  align-items: center;
143
139
  padding: calc(var(--spacing-xs) - 1px) var(--spacing-xs);
144
140
  border: var(--input-border);
145
- border-color: var(--form-border-color);
141
+ border-color: var(--wt-text-field-input-border-color);
146
142
  border-radius: var(--border-radius);
147
143
  gap: var(--spacing-xs);
148
144
  }
@@ -167,23 +163,9 @@ function handleKeyup(event) {
167
163
  width: 100%;
168
164
  padding: 0;
169
165
  transition: var(--transition);
170
- color: var(--form-input-color);
166
+ color: var(--wt-text-field-placeholder-color);
171
167
  border: none;
172
168
  outline: none;
173
-
174
- &:focus {
175
- @include wt-placeholder('focus');
176
- border-color: var(--form-border--hover-color);
177
- }
178
-
179
- .wt-search-bar--outline & {
180
- border-color: var(--form-outline-border-color);
181
- }
182
-
183
- .wt-search-bar--outline:hover &,
184
- .wt-search-bar--outline &:focus {
185
- border-color: var(--form-outline-border--hover-color);
186
- }
187
169
  }
188
170
 
189
171
  /* clears the 'X' from Internet Explorer */
@@ -6,6 +6,10 @@
6
6
  --wt-slider-width: 100%;
7
7
  --wt-slider-input-height: 8px;
8
8
  --wt-slider-border: 1px solid var(--secondary-color);
9
+ --wt-slider-background-color: var(--secondary-color);
10
+ --wt-slider-background-completed-color: var(--primary-color);
11
+
12
+ --wt-slider-pointer-background-color: var(--white);
9
13
 
10
14
  --wt-slider-pointer-radius: 50%;
11
15
 
@@ -24,7 +24,7 @@ and swapping height/width of this component in order to have the correct output.
24
24
  class="wt-slider"
25
25
  >
26
26
  <div
27
- :style="{ width: !vertical && verticalHeight }"
27
+ :style="{ width: vertical && verticalHeight }"
28
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 -->
@@ -77,10 +77,11 @@ export default {
77
77
  default: 100,
78
78
  },
79
79
  },
80
+ emits: ['input'],
80
81
  computed: {
81
82
  progressStyle() { // To achieve the correct color styling:
82
83
  const progressPercent = ((this.value - this.min) / (this.max - this.min)) * 100;
83
- return `linear-gradient(to right, var(--primary-color) ${progressPercent}%, var(--secondary-color) 0%)`;
84
+ return `linear-gradient(to right, var(--wt-slider-background-completed-color) ${progressPercent}%, var(--wt-slider-background-color) 0%)`;
84
85
  },
85
86
  verticalHeight() { // in order to have correct parent height after slider rotation
86
87
  return this.vertical ? `${this.height}px` : '100%';
@@ -123,7 +124,7 @@ export default {
123
124
  height: var(--wt-slider-pointer-size);
124
125
  border: var(--wt-slider-border);
125
126
  border-radius: var(--wt-slider-pointer-radius);
126
- background: var(--main-color);
127
+ background: var(--wt-slider-pointer-background-color);
127
128
  -webkit-appearance: none;
128
129
  }
129
130
 
@@ -136,7 +137,7 @@ export default {
136
137
  height: var(--wt-slider-pointer-size);
137
138
  border: var(--wt-slider-border);
138
139
  border-radius: var(--wt-slider-pointer-radius);
139
- background: var(--main-color);
140
+ background: var(--wt-slider-pointer-background-color);
140
141
  -moz-appearance: none;
141
142
  }
142
143
 
@@ -1,6 +1,8 @@
1
1
 
2
2
  :root {
3
- --status-select-padding: 0 calc(var(--icon-size-md) + var(--spacing-xs)) 0 0; // reset wt-select padding, but preserve arrow icon padding
4
- --status-select-option-color: var(--form-input-color);
5
- --status-select-bg--hover-color: var(--secondary-color);
6
- }
3
+ --wt-status-select-padding: 0 calc(var(--icon-size-md) + var(--spacing-xs)) 0 0; // reset wt-select padding, but preserve arrow icon padding
4
+
5
+ --wt-status-select-option-text-color: var(--form-input-color);
6
+ --wt-status-select-option-background-hover-color: var(--secondary-color);
7
+ --wt-status-select-option-background-selected-color: var(--secondary-color);
8
+ }
@@ -52,6 +52,7 @@ export default {
52
52
  // options: ['sm', 'md'],
53
53
  // },
54
54
  },
55
+ emits: ['change'],
55
56
  computed: {
56
57
  selectedOption() {
57
58
  return this.statusOptions.find((option) => option.value === this.status);
@@ -107,7 +108,7 @@ export default {
107
108
 
108
109
  .multiselect__tags {
109
110
  min-height: 0;
110
- padding: var(--status-select-padding);
111
+ padding: var(--wt-status-select-padding);
111
112
  border: none;
112
113
  }
113
114
 
@@ -122,11 +123,15 @@ export default {
122
123
  .multiselect__option {
123
124
  min-height: 0;
124
125
  padding: 0;
125
- color: var(--status-select-option-color);
126
+ color: var(--wt-status-select-option-text-color);
126
127
  }
127
128
 
128
129
  .multiselect__option--highlight {
129
- background: var(--status-select-bg--hover-color);
130
+ background: var(--wt-status-select-option-background-hover-color);
131
+ }
132
+
133
+ .multiselect__option--selected {
134
+ background: var(--wt-status-select-option-background-selected-color);
130
135
  }
131
136
  }
132
137
  }