@webitel/ui-sdk 23.12.50 → 23.12.51

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.50",
3
+ "version": "23.12.51",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vite",
@@ -163,7 +163,7 @@ function handleKeyup(event) {
163
163
  width: 100%;
164
164
  padding: 0;
165
165
  transition: var(--transition);
166
- color: var(--wt-text-field-placeholder-color);
166
+ color: var(--wt-text-field-text-color);
167
167
  border: none;
168
168
  outline: none;
169
169
  }
@@ -52,7 +52,7 @@
52
52
 
53
53
  .multiselect__custom-tag,
54
54
  .multiselect__single-label {
55
- color: var(--wt-text-field-placeholder-color);
55
+ color: var(--wt-text-field-text-color);
56
56
  }
57
57
 
58
58
  .multiselect__placeholder {
@@ -6,9 +6,12 @@
6
6
  --wt-helper-text-color: var(--text-main-color);
7
7
  --wt-helper-text-disabled-color: var(--text-disabled-color);
8
8
 
9
+ // text
10
+ --wt-text-field-text-color: var(--black);
11
+
9
12
  // placeholder
10
13
  --wt-text-field-error-text-color: var(--error-color);
11
- --wt-text-field-placeholder-color: var(--text-main-color);
14
+ --wt-text-field-placeholder-color: var(--grey-lighten-1);
12
15
  --wt-text-field-placeholder-error-color: var(--error-color);
13
16
  --wt-text-field-placeholder-disabled-color: var(--text-disabled-color);
14
17
 
@@ -32,5 +35,8 @@
32
35
  }
33
36
 
34
37
  :root.theme--dark {
38
+ // text
39
+ --wt-text-field-text-color: var(--white);
40
+
35
41
  --wt-text-field-input-border-color: var(--grey-lighten-1);
36
42
  }
@@ -1,4 +1,4 @@
1
- import { computed, isReactive } from 'vue';
1
+ import { computed, isReactive, isRef } from 'vue';
2
2
  import { useI18n } from 'vue-i18n';
3
3
 
4
4
  export function useValidation({ v: inputV, customValidators: inputCustomValidators }) {
@@ -12,15 +12,14 @@ export function useValidation({ v: inputV, customValidators: inputCustomValidato
12
12
  v = computed(() => inputV);
13
13
  customValidators = computed(() => inputCustomValidators);
14
14
  }
15
-
16
- // support end
15
+ // end
17
16
 
18
17
  const isValidation = computed(() => !!v && !!v.value && !!Object.keys(v.value).length);
19
18
  const invalid = computed(() => isValidation.value && v.value.$error);
20
19
 
21
20
  const validationText = computed(() => {
22
21
  let validationText = '';
23
- if (isValidation.value && invalid) {
22
+ if (isValidation.value && invalid.value) {
24
23
  if (v.value.required?.$invalid) validationText = t('validation.required');
25
24
  else if (v.value.numeric?.$invalid) validationText = t('validation.numeric');
26
25
  else if (v.value.email?.$invalid) validationText = t('validation.email');
@@ -39,11 +38,14 @@ export function useValidation({ v: inputV, customValidators: inputCustomValidato
39
38
  else if (v.value.websocketValidator?.$invalid) validationText = `${t('validation.websocketValidator')}`;
40
39
  else if (v.value.integer?.$invalid) validationText = `${t('validation.integer')}`;
41
40
  }
42
- // eslint-disable-next-line no-restricted-syntax
43
- for (const { name, text } of customValidators) {
44
- if (v.value[name]?.$invalid) validationText = text;
41
+
42
+ if (customValidators && customValidators.value) {
43
+ // eslint-disable-next-line no-restricted-syntax
44
+ for (const { name, text } of customValidators.value) {
45
+ if (v.value[name]?.$invalid) validationText = text;
46
+ }
47
+ return validationText;
45
48
  }
46
- return validationText;
47
49
  });
48
50
 
49
51
  return {