@webitel/ui-sdk 0.9.45 → 0.9.49

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": "0.9.45",
3
+ "version": "0.9.49",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve-lib": "vue-cli-service serve",
@@ -100,15 +100,15 @@
100
100
 
101
101
  &:not(&--outline) {
102
102
  &.secondary {
103
- color: var(--btn-secondary-color);
103
+ color: var(--btn-dark-font-color);
104
104
  border-color: var(--btn-secondary-color);
105
- background: var(--btn-secondary-bg-color);
105
+ background: var(--btn-secondary-color);
106
106
 
107
107
  &:hover,
108
108
  &:active {
109
- color: var(--btn-secondary--hover-color);
109
+ color: var(--btn-dark-font-color);
110
110
  border-color: var(--btn-secondary--hover-color);
111
- background: var(--btn-secondary-bg-color);
111
+ background: var(--btn-secondary-color);
112
112
  }
113
113
  }
114
114
 
@@ -218,6 +218,7 @@ export default {
218
218
  },
219
219
 
220
220
  updateInputPaddings() {
221
+ // cant test this thing cause vue test utils doesnt render elements width :/
221
222
  const afterWrapperWidth = this.$refs['after-wrapper'].offsetWidth;
222
223
  const inputEl = this.$refs['wt-input'];
223
224
  const defaultInputPadding = parseInt(getComputedStyle(document.documentElement)
@@ -26,9 +26,8 @@
26
26
  --btn-primary-color: var(--main-accent-color);
27
27
  --btn-primary--hover-color: #EFB917;
28
28
 
29
- --btn-secondary-color: #808080;
30
- --btn-secondary-bg-color: transparent;
31
- --btn-secondary--hover-color: #000;
29
+ --btn-secondary-color: hsla(var(--_secondary-color), var(--_opacity--default));
30
+ --btn-secondary--hover-color: hsla(var(--_secondary-color), var(--_opacity--hover));
32
31
 
33
32
  --btn-disabled-color: var(--disabled-color);
34
33
  --btn-disabled-bg-color: transparent;
@@ -9,7 +9,7 @@
9
9
  --button-select-buttons-gap: 1px;
10
10
 
11
11
  --button-select-icon-color-primary: var(--btn-primary-color);
12
- --button-select-icon-color-secondary: var(--btn-secondary-color);
12
+ --button-select-icon-color-secondary: var(--btn-dark-font-color);
13
13
  --button-select-icon-color-dark: var(--btn-dark-font-color);
14
14
  --button-select-icon-color-ligth: var(--main-color);
15
15
 
@@ -17,24 +17,25 @@ export default {
17
17
  return this.isValidation && this.v.$error;
18
18
  },
19
19
  validationText() {
20
+ let validationText = '';
20
21
  if (this.isValidation && this.invalid) {
21
- if (this.v.required === false) return this.$t('validation.required');
22
- if (this.v.numeric === false) return this.$t('validation.numeric');
23
- if (this.v.email === false) return this.$t('validation.email');
24
- if (this.v.gatewayHostValidator === false) return this.$t('validation.gatewayHostValidator');
25
- if (this.v.ipValidator === false) return this.$t('validation.ipValidator');
26
- if (this.v.macValidator === false) return this.$t('validation.macValidator');
27
- if (this.v.minValue === false) return `${this.$t('validation.minValue')} ${this.v.$params.minValue.min}`;
28
- if (this.v.maxValue === false) return `${this.$t('validation.maxValue')} ${this.v.$params.maxValue.max}`;
29
- if (this.v.sipAccountValidator === false) return this.$t('validation.sipAccountValidator');
30
- if (this.v.minLength === false) return `${this.$t('validation.minLength')} ${this.v.$params.minLength.min}`;
31
- if (this.v.url === false) return `${this.$t('validation.url')}`;
22
+ if (this.v.required === false) validationText = this.$t('validation.required');
23
+ else if (this.v.numeric === false) validationText = this.$t('validation.numeric');
24
+ else if (this.v.email === false) validationText = this.$t('validation.email');
25
+ else if (this.v.gatewayHostValidator === false) validationText = this.$t('validation.gatewayHostValidator');
26
+ else if (this.v.ipValidator === false) validationText = this.$t('validation.ipValidator');
27
+ else if (this.v.macValidator === false) validationText = this.$t('validation.macValidator');
28
+ else if (this.v.minValue === false) validationText = `${this.$t('validation.minValue')} ${this.v.$params.minValue.min}`;
29
+ else if (this.v.maxValue === false) validationText = `${this.$t('validation.maxValue')} ${this.v.$params.maxValue.max}`;
30
+ else if (this.v.sipAccountValidator === false) validationText = this.$t('validation.sipAccountValidator');
31
+ else if (this.v.minLength === false) validationText = `${this.$t('validation.minLength')} ${this.v.$params.minLength.min}`;
32
+ else if (this.v.url === false) validationText = `${this.$t('validation.url')}`;
32
33
  }
33
34
  // eslint-disable-next-line no-restricted-syntax
34
35
  for (const { name, text } of this.customValidators) {
35
- if (this.v[name] === false) return text;
36
+ if (this.v[name] === false) validationText = text;
36
37
  }
37
- return '';
38
+ return validationText;
38
39
  },
39
40
  },
40
41
  };